1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1493],{74613:function(e,t,a){a.d(t,{Z:function(){return p}});var i=a(42704);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 c={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 d=(0,i.forwardRef)((e,t)=>{let{color:a="currentColor",size:l=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:d="",children:p,iconNode:u,...h}=e;return(0,i.createElement)("svg",{ref:t,...c,width:l,height:l,stroke:a,strokeWidth:n?24*Number(r)/Number(l):r,className:s("lucide",d),...!p&&!o(h)&&{"aria-hidden":"true"},...h},[...u.map(e=>{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,...c}=a;return(0,i.createElement)(d,{ref:r,iconNode:t,className:s("lucide-".concat(l(n(e))),"lucide-".concat(e),o),...c})});return a.displayName=n(e),a}},82875:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(74613).Z)("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"}]])},60916:function(e,t,a){var i=a(42704);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"}))});t.Z=l},48445:function(e,t,a){a.d(t,{C:function(){return m}});var i=a(48470),l=a(82875),r=a(42704),n=a(68471),s=a(72059),o=a(44925),c=a(70727),d=a(16312),p=a(75245),u=a(37707),h=a(19340),g=a(31665),f=a(1472);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:C}=(0,d.u)(),{initLoginWithEmail:k}=(0,o.u)(),{navigate:b,setModalData:S,currentScreen:M,data:T}=(0,d.a)(),{enabled:A,token:L}=(0,c.a)(),[E,N]=(0,r.useState)(!1),{accountType:W}=(0,p.F)(),I=(0,s.u)();(0,r.useEffect)(()=>{!a&&I.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),P=j||!V,D=()=>{S({login:T?.login,inlineError:void 0}),!A||L||C?(v(!0),k({email:a,captchaToken:L,disableSignup:T?.login?.disableSignup,withPrivyUi:!0}).then(()=>{b("AwaitingPasswordlessCodeScreen")}).catch(e=>{S({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),b("ErrorScreen")}).finally(()=>{v(!1)})):(S({captchaModalData:{callback:e=>k({email:a,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),b("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.Z,{})}),(0,i.jsx)("input",{ref:t,id:"email-input",className:"login-method-button",type:"email",placeholder:"[email protected]",onFocus:()=>N(!0),onChange:e=>n(e.target.value),onKeyUp:e=>{"Enter"===e.key&&D()},value:a,autoComplete:"email"}),"email"!==W||E?e.stacked?(0,i.jsx)("span",{}):(0,i.jsx)(u.E,{isSubmitting:j,onClick:D,disabled:P,children:"Submit"}):(0,i.jsx)(h.C,{color:"gray",children:"Recent"})]})]}),e.stacked?(0,i.jsx)(u.P,{loadingText:null,loading:j,disabled:P,onClick:D,style:{width:"100%"},children:"Submit"}):null]})}),x=g.I,y=g.a,w=(0,n.zo)(p.V).withConfig({displayName:"StyledLoginMethodIconWrapper",componentId:"sc-30d3bab7-0"})(["display:inline-flex;"])},11493:function(e,t,a){a.d(t,{C:function(){return et},L:function(){return G}});var i=a(48470),l=a(42704);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(68471),s=a(69882),o=a(72059),c=a(75245),d=a(44925),p=a(16312),u=a(70727),h=a(72749),g=a(82875),f=a(74613);let m=(0,f.Z)("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.Z)("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(48445),w=a(19340),j=a(92461);let v=(e,t=!0)=>e.reduce((e,a)=>({...e,[a]:t}),{});
1var C=a(34178),k=a(60916),b=a(51394),S=a(6783),M=a(61688),T=a(410),A=a(89669),L=a(22753),E=a(97602);let N=()=>{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},W=n.zo.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;"]),I=({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,d.u)();return(0,l.useEffect)(()=>{(async()=>{o&&a(await o.getCrossAppProviderDetails(e))})()},[o]),(0,i.jsx)(c.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)(I,{name:t.name,logoUrl:t.icon_url||void 0,size:"24px"})," ",t.name]}):(0,i.jsx)(c.G,{})})},P=({isEditable:e,setIsEditable:t,defaultValue:a})=>{let r=(0,l.useRef)(null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.H,{$if:!e,children:(0,i.jsx)(y.C,{ref:r,defaultValue:a})}),(0,i.jsx)(c.H,{$if:e,children:(0,i.jsxs)(c.U,{onClick:()=>{t(),setTimeout(()=>{r.current?.focus()},0)},children:[(0,i.jsx)(c.V,{children:(0,i.jsx)(g.Z,{})}),"Continue with Email"]})})]})},D=()=>{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,d.u)(),{accountType:f}=(0,c.F)();return(0,i.jsxs)(c.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"))}catch(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)(c.G,{}),"farcaster"===f&&(0,i.jsx)(H,{color:"gray",children:"Recent"})]})},H=(0,n.zo)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-2f1c7323-0"})(["margin-left:auto;"]),F=({...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"})})})]}),U=({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)(c.W,{$withPadding:t,children:(0,i.jsxs)(c.X,{children:[(0,i.jsx)(C.Z,{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")},_=()=>{let{enabled:e,token:t}=(0,u.a)(),{navigate:a,setModalData:r,data:n}=(0,p.a)(),s=(0,o.u)(),{initLoginWithPasskey:h}=(0,d.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)(c.U,{onClick:g,children:[(0,i.jsx)(k.Z,{})," Continue with passkey"]}):(0,i.jsx)(b.L,{as:"button",onClick:g,size:"sm",variant:"navigation",style:{width:"100%",justifyContent:"center"},children:"I have a passkey"})}
1,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,d.u)(),{enabled:y,token:w}=(0,u.a)(),{whatsAppEnabled:j}=(0,o.u)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.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")},defaultValue:a})}),(0,i.jsx)(c.H,{$if:e,children:(0,i.jsxs)(c.U,{onClick:()=>{t(),setTimeout(()=>{r.current?.focus()},0)},children:[(0,i.jsx)(c.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"}},Z=({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,d.u)(),{accountType:x}=(0,c.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)(c.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)(c.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.zo)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-e74c7091-0"})(["margin-left:auto;"]),$=()=>{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,d.u)(),{accountType:g}=(0,c.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)(c.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)(q,{color:"gray",children:"Recent"})]})},q=(0,n.zo)(w.C).withConfig({displayName:"StyledChip",componentId:"sc-639dd483-0"})(["margin-left:auto;"]),B=({onClick:e,text:t,icon:a})=>(0,i.jsxs)(c.U,{onClick:e,children:[(0,i.jsx)(c.V,{children:a}),(0,i.jsx)(c.Y,{children:t})]}),G=({connectOnly:e})=>{let{closePrivyModal:t}=(0,d.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:C}=(0,c.F)(),k=(0,l.useMemo)(()=>w&&"guest"!==w&&"authorization_key"!==w&&"cross_app"!==w?(0,u.t)(w):null,[w]),{email:b,sms:S,google:M,twitter:T,discord:A,github:W,spotify:I,instagram:H,tiktok:F,line:R,twitch:z,linkedin:q,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,c.e)(et?x:[]),walletList:x,walletChainType:y}),er=f.customOAuthProviders,en=f.crossAppProviders,{passkey:es}=f.loginMethods,eo=[b&&"email",S&&"sms",M&&"google",T&&"twitter",A&&"discord",W&&"github",I&&"spotify",H&&"instagram",F&&"tiktok",R&&"line",z&&"twitch",q&&"linkedin",G&&"apple",ea&&"farcaster",ei&&"telegram",...er.map(e=>e.provider),...en].filter(e=>!!e),ec=eo.length>0,ed=(0,l.useMemo)(()=>et&&!ec?"web3-first":et&&f?.appearance.loginGroupPriority||"web2-first",[et,ec,f?.appearance.loginGroupPriority]),ep=f?.appearance.hideDirectWeb2Inputs,[eu,eh]=(0,l.useState)("default"),[eg,ef]=(0,l.useState)(ee({mostRecentlyUsedAccountType:w,smsAvailable:S,emailAvailable:b,prefilledType:m?.prefill?.type}));(0,l.useEffect)(()=>{ef(ee({mostRecentlyUsedAccountType:w,smsAvailable:S,emailAvailable:b,prefilledType:m?.prefill?.type}))},[b,S,w]);let em=()=>{t({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{eh("default")},150)};n.current=em;let ex=[];j&&et?ex.push(j):k?.loginMethod&&eo.includes(k.loginMethod)&&ex.push(k.loginMethod);let ey=t=>{if("email"===t)return(0,i.jsx)(P,{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)(Z,{provider:"apple"},t);if("discord"===t)return(0,i.jsx)(Z,{provider:"discord"},t);if("farcaster"===t)return(0,i.jsx)(D,{},t);if("github"===t)return(0,i.jsx)(Z,{provider:"github"},t);if("google"===t)return(0,i.jsx)(Z,{provider:"google"},t);if("linkedin"===t)return(0,i.jsx)(Z,{provider:"linkedin"},t);if("tiktok"===t)return(0,i.jsx)(Z,{provider:"tiktok"},t);if("line"===t)return(0,i.jsx)(Z,{provider:"line"},t);if("twitch"===t)return(0,i.jsx)(Z,{provider:"twitch"},t);if("spotify"===t)return(0,i.jsx)(Z,{provider:"spotify"},t);if("instagram"===t)return(0,i.jsx)(Z,{provider:"instagram"},t);if("twitter"===t)return(0,i.jsx)(Z,{provider:"twitter"},t);if("telegram"===t)return(0,i.jsx)($,{},t);if((0,p.i)(t))return(0,i.jsx)(Z,{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"===C?"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!==k?.loginMethod).flatMap(ey),eC=ex.flatMap(ey);"web3-first"===ed&&"default"===eu?ej.unshift(...eC):"web2-first"===ed&&ev.unshift(...eC);let ek="web2-overflow"===eu?()=>eh("default"):void 0,eb=eo.filter(e=>"email"!==e&&"sms"!==e),eS=X({priority:ed,email:b,sms:S,social:eb}),eM=J({priority:ed,email:b,sms:S,social:eb}),eT=(0,i.jsx)(L.W,{text:Q({priority:ed}),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")}),eL=ep?0:1,eE=et&&ej.length>0,eN=0===ev.length&&et&&0===ej.length,eW=5-(eE?1:0),eI="default"===eu&&f?.appearance.logo,eV="default"===eu&&f.appearance.loginMessage;return(0,i.jsxs)(E.S,{title:f.appearance.landingHeader,icon:eI?(0,i.jsx)(N,{}):void 0,iconVariant:eI?"logo":void 0,onClose:em,showClose:!0,onBack:ek,showBack:!!ek,helpText:f||es&&"default"===eu?(0,i.jsxs)(i.Fragment,{children:[es&&"default"===eu&&(0,i.jsx)(_,{}),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)(c.Z,{$colorScheme:f.appearance.palette.colorScheme,children:"default"===eu&&"web2-first"===ed?(0,i.jsxs)(i.Fragment,{children:[ev.length>eW?ev.slice(0,eW-1):ev,ev.length>eW&&eA,eE&&eT,eN&&(0,i.jsx)(U,{chainType:f.appearance.walletChainType})]}):"default"===eu&&"web3-first"===ed?(0,i.jsxs)(i.Fragment,{children:[et&&(0,i.jsxs)(i.Fragment,{children:[ej.length>eW?ej.slice(0,eW-1):ej,ej.length>eW&&eT]}),ev.length>eL&&eA,ev.length===eL&&ev[0],eN&&(0,i.jsx)(U,{chainType:f.appearance.walletChainType})]}):"web2-overflow"===eu?(0,i.jsx)(i.Fragment,{children:"web3-first"===ed?ev:ev.slice(3)}):null})]})},K=n.zo.div.withConfig({displayName:"StyledSubtitle",componentId:"sc-c85d71fe-0"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),Y=n.zo.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)(F,{}):t?(0,i.jsx)(g.Z,{}):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,d.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,c.F)(),v=(0,l.useMemo)(()=>w&&"guest"!==w&&"authorization_key"!==w&&"cross_app"!==w?(0,u.t)(w):null,[w]),C=x.loginMethodsAndOrder?.primary??[],k=x.loginMethodsAndOrder?.overflow??[],b=(0,l.useMemo)(()=>[...C,...k],[C,k]),S=x.loginMethods.passkey,M=n?.login,T=[];j&&b.includes(j)?T.push(j):w&&b.includes(v?.loginMethod)&&T.push(v?.loginMethod);let[A,L]=(0,l.useState)("default"),[E,N]=(0,l.useState)(ee({mostRecentlyUsedAccountType:w,smsAvailable:b.includes("sms"),emailAvailable:b.includes("email"),prefilledType:M?.prefill?.type}));(0,l.useEffect)(()=>{N(ee({mostRecentlyUsedAccountType:w,smsAvailable:b.includes("sms"),emailAvailable:b.includes("email"),prefilledType:M?.prefill?.type}))},[b,w]),(0,l.useEffect)(()=>{"phone"===w&&N("sms");let e=b.indexOf("sms"),t=b.indexOf("email");e>-1&&e<t&&N("sms")},[w,C,k]);let W=()=>{t({shouldCallAuthOnSuccess:!0}),setTimeout(()=>{L("default")},150)};f.current=W;let{listings:I}=(0,c.d)(),H=t=>{if("email"===t)return(0,i.jsx)(P,{isEditable:"email"===E,setIsEditable:()=>{N("email")},defaultValue:"email"===M?.prefill?.type?M.prefill.value:void 0},t);if("sms"===t)return(0,i.jsx)(O,{isEditable:"sms"===E,setIsEditable:()=>{N("sms")},defaultValue:"phone"===M?.prefill?.type?M.prefill.value:void 0},t);if("apple"===t)return(0,i.jsx)(Z,{provider:"apple"},t);if("discord"===t)return(0,i.jsx)(Z,{provider:"discord"},t);if("farcaster"===t)return(0,i.jsx)(D,{},t);if("github"===t)return(0,i.jsx)(Z,{provider:"github"},t);if("google"===t)return(0,i.jsx)(Z,{provider:"google"},t);if("linkedin"===t)return(0,i.jsx)(Z,{provider:"linkedin"},t);if("spotify"===t)return(0,i.jsx)(Z,{provider:"spotify"},t);if("instagram"===t)return(0,i.jsx)(Z,{provider:"instagram"},t);if("tiktok"===t)return(0,i.jsx)(Z,{provider:"tiktok"},t);if("line"===t)return(0,i.jsx)(Z,{provider:"line"},t);if("twitch"===t)return(0,i.jsx)(Z,{provider:"twitch"},t);if("twitter"===t)return(0,i.jsx)(Z,{provider:"twitter"},t);if("telegram"===t)return(0,i.jsx)($,{},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,I);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:b,walletChainType:l,preSelectedWalletId:t.id}})),m(e?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id+a))},F=T.flatMap(H),U=C.filter(e=>e!==j&&e!==v?.loginMethod).flatMap(H),R=k.filter(e=>e!==j&&e!==v?.loginMethod).flatMap(H),[z,q]=(0,c._)([...F,...U,...R],ea({primary:U.length+F.length,overflow:R.length}));return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.M,{title:x.appearance.landingHeader,onClose:W,backFn:"default"===A?void 0:()=>{L("default")}}),"default"===A&&(0,i.jsx)(ei,{}),"default"===A&&("string"==typeof x.appearance.loginMessage?(0,i.jsx)(c.$,{children:x.appearance.loginMessage}):x.appearance.loginMessage),(0,i.jsx)(c.a0,{style:{overflow:"hidden"},children:(0,i.jsxs)(c.Z,{$colorScheme:y,children:["default"===A&&(0,i.jsxs)(i.Fragment,{children:[z,q.length>0&&(0,i.jsx)(B,{text:"More options",icon:(0,i.jsx)(r,{}),onClick:()=>L("overflow")})]}),"overflow"===A&&(0,i.jsx)(i.Fragment,{children:q}),S&&"default"===A&&(0,i.jsx)(_,{})]})}),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.zo)(e=>{let t=(0,o.u)();return t?.appearance.logo?(0,i.jsx)(W,{...e,children:(0,i.jsx)(N,{})}):null}).withConfig({displayName:"StyledAppLogoHeader",componentId:"sc-ead54d53-0"})(["margin-bottom:16px;"])},22753:function(e,t,a){a.d(t,{W:function(){return n}});var i=a(48470);let l=(0,a(74613).Z)("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(75245);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})]})},92461:function(e,t,a){a.d(t,{F:function(){return l}});var i=a(48470);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)"})})})]})},89669:function(e,t,a){a.d(t,{T:function(){return l}});var i=a(48470);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"})]})}}}]);
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.