PageSourceSearch

https://app.myverified.ai/_next/static/chunks/pages/main/sign-up/[[...index]]-d052605ec82aba8b.js

js myverified.ai collected 2026-10-05 12:19:28 UTC 14,577 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6394],{9482:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/main/sign-up/[[...index]]",function(){return a(18703)}])},18703:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>O});var s=a(4930),i=a(16401),l=a(65162),r=a(70740),n=a(1831),c=a(3941),o=a.n(c),d=a(17778),u=a(71026),m=a(58849),x=a(86319),p=a(35718),h=a(74192),f=a(56444),g=a(72112),y=a(48374),b=a(21146),w=a(84741),j=a(13032),v=a(21333),N=a(68396),_=a(7220),k=a(55124),S=a(46229),P=a(59318),A=a(6845);let C="Please enter a valid email address",E="Something went wrong. Please try again or contact support if the issue persists.";function O(){let e=(0,i.useRouter)(),{isLoaded:t,signUp:a,setActive:c}=(0,n.yC)(),[o,u]=(0,l.useState)(""),[m,f]=(0,l.useState)(""),[g,j]=(0,l.useState)(null),v=(0,l.useRef)(!1),[N,_]=(0,l.useState)(!1),[O,I]=(0,l.useState)(!1),[U,z]=(0,l.useState)(!1),[D,L]=(0,l.useState)(null),{remainingSeconds:q,start:B,stop:M}=(0,b.E)(),T=(0,P.S0)(e.query.redirect_url);(0,l.useEffect)(()=>{switch(e.query.error){case"account_already_exists":L("An account with this email already exists. Please try signing in.");break;case"not_allowed_access":L("This email doesn't have access to the platform. If you think this is an error, please contact support.");break;case"sso-callback":L("Sign-up failed. Ensure this email isn't already registered and try again. Contact support if the issue persists.")}},[e.query.error]);let V=e=>{let t=e.trim();if(!t)return"Display name is required";let a=A.G_.safeParse(t);if(!a.success){var s,i;return null!=(i=null==(s=a.error.issues[0])?void 0:s.message)?i:"Please enter a valid display name"}return null},$=async()=>{if(!a)return;let e=V(m);if(e)return void j(e);I(!0),L(null),j(null),localStorage.setItem(w.n,m.trim());try{await a.authenticateWithRedirect({strategy:"oauth_google",redirectUrl:(0,P.yY)(y.bw.SIGN_UP,"sso-callback",T),redirectUrlComplete:T||"/"})}finally{I(!1)}},Y=async()=>{if(!a||v.current||N)return;let t=V(m);if(t){j(t),L(null);return}if(!o){L(C),j(null);return}v.current=!0,_(!0),L(null),j(null),localStorage.setItem(w.n,m.trim());try{await a.create({emailAddress:o}),await a.prepareEmailAddressVerification({strategy:"email_code"}),z(!0),B(w.A),r.Ay.success("Verification code sent")}catch(t){var s,i,l,n;switch(null==t||null==(i=t.errors)||null==(s=i[0])?void 0:s.code){case"form_param_format_invalid":L(C);break;case"not_allowed_access":e.push((0,P.yY)(y.bw.SIGN_UP,"not_allowed_access",T));break;case"form_identifier_exists":e.push((0,P.yY)(y.bw.SIGN_UP,"account_already_exists",T));break;default:L((null==t||null==(n=t.errors)||null==(l=n[0])?void 0:l.longMessage)||E)}}finally{v.current=!1,_(!1)}},W=async()=>{if(a&&!v.current&&!N&&!(q>0)){v.current=!0,_(!0),L(null);try{await a.prepareEmailAddressVerification({strategy:"email_code"}),B(w.A),r.Ay.success("Verification code resent")}catch(a){var e,t;L((null==a||null==(t=a.errors)||null==(e=t[0])?void 0:e.longMessage)||"Unable to resend verification code at the moment.")}finally{v.current=!1,_(!1)}}};return t&&a?(0,s.jsxs)("div",{className:"w-full h-screen flex flex-row relative",children:[(0,s.jsx)(S.z,{size:350,opacity:.25,color:"#0ea5e9",transitionMs:120,className:"blur-3xl z-0"}),(0,s.jsxs)("div",{className:"hidden md:block w-1/2 h-full relative bg-black z-10",children:[(0,s.jsxs)("div",{className:"h-full w-full flex flex-col items-center justify-center",children:[(0,s.jsx)(d.P.div,{initial:{y:30,opacity:0},animate:{y:0,opacity:1},transition:{duration:.7,ease:"easeOut"},children:(0,s.jsx)(x.A,{width:400,className:"mb-6"})}),(0,s.jsx)(p.g,{})]}),(0,s.jsx)(d.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:1,delay:.3,ease:"easeOut"},children:(0,s.jsx)(k.I,{orientation:"vertical"})})]}),(0,s.jsxs)("div",{className:"w-full md:w-1/2 h-full flex flex-col items-center justify-center max-w-100 mx-auto space-y-12 p-4 relative z-10",children:[(0,s.jsxs)("div",{className:"md:hidden",children:[(0,s.jsx)(d.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:1,delay:.3,ease:"easeOut"},className:"absolute top-0 left-0 right-0",children:(0,s.jsx)(k.I,{orientation:"horizontal"})}),(0,s.jsx)(d.P.div,{initial:{y:30,opacity:0},animate:{y:0,opacity:1},transition:{duration:.7,ease:"easeOut"},children:(0,s.jsx)(x.A,{})}),(0,s.jsx)(p.g,{className:"mt-4"})]}),(0,s.jsx)(d.P.div,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},transition:{duration:.8,delay:.2,ease:"easeOut"},className:"w-full",children:U?(0,s.jsx)(R,{handleResendCode:W,resendingCode:N,resendCooldownSeconds:q,redirectUrl:T,signUp:a,setActive:c,isLoaded:t,onGoBack:()=>{z(!1),L(null),M()}}):(0,s.jsx)(G,{handleGoogleSignUp:$,isLoading:N,isGoogleLoading:O,email:o,displayName:m,setDisplayName:f,displayNameError:g,setDisplayNameError:j,validateDisplayName:V,clearError:()=>L(null),handleInputChange:e=>{u(e.target.value.replace(/\s/g,""))},handleKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),v.current||N||Y())},error:D,handleSubmit:Y,redirectUrl:T})})]})]}):(0,s.jsx)(h.A,{})}let G=e=>{let{handleGoogleSignUp:t,isLoading:a,isGoogleLoading:i,email:r,displayName:n,setDisplayName:c,displayNameError:x,setDisplayNameError:p,validateDisplayName:h,clearError:b,handleInputChange:w,handleKeyDown:k,error:S,handleSubmit:A,redirectUrl:C}=e,E=(0,P.uT)(y.bw.SIGN_IN,C),[O,G]=(0,l.useState)(1),R=null===h(n)&&n.trim().length>0&&!x,I=R&&r.trim();return(0,s.jsx)("div",{className:"w-full flex flex-col items-center justify-center",children:(0,s.jsxs)("div",{className:"flex flex-col items-center text-center w-full",children:[1===O?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(d.P.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.6,delay:.3,ease:"easeOut"},className:"mb-12 flex flex-col items-center justify-center",children:[(0,s.jsx)("span",{className:"font-medium text-3xl text-white mb-3",children:"Welcome"}),(0,s.jsx)("span",{className:"text-white font-light",children:"Let's get started. Enter your display name"})]}),(0,s.jsxs)(d.P.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.6,delay:.35,ease:"easeOut"},className:"w-full mb-6",children:[(0,s.jsx)("div",{className:(0,N.cn)("relative w-full rounded-full p-0.5 border transition-all duration-200 hover:border-transparent focus-within:border-transparent hover:shadow-[0_0_0_1px_rgb(14_165_233),0_0_6px_2px_rgba(14,165,233,0.35)] focus-within:shadow-[0_0_0_1px_rgb(14_165_233),0_0_6px_2px_rgba(14,165,233,0.35)]",x?"border-red-500":"border-white/10"),children:(0,s.jsx)("div",{className:"relative w-full rounded-full bg-white-08",children:(0,s.jsx)(g.pd,{text:"sm","data-testid":"sign-up-display-name",className:"w-full rounded-full bg-transparent border-0 focus-visible:ring-0 focus-visible:border-0",value:n,onChange:e=>{let t=e.target.value;c(t),null===h(t)&&p(null)},onBlur:()=>{p(h(n))},placeholder:"Your display name",type:"text",autoComplete:"name",required:!0})})}),x&&(0,s.jsx)("p",{className:"text-red-400 text-xs mt-1",children:x}),(0,s.jsx)("p",{className:"text-gray-400 text-xs mt-2",children:"This is how others will see your name on the platform"})]}),(0,s.jsx)(d.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.5,delay:.4,ease:"easeOut"},className:"w-full",children:(0,s.jsxs)(f.$,{text:"sm","data-testid":"sign-up-next",onClick:()=>{R&&(p(null),G(2))},disabled:!R,className:"w-full cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Next, continue to email",children:[(0,s.jsx)("span",{className:"text-black text-sm mr-2",children:"Next"}),(0,s.jsx)(u.A,{size:16,className:"text-black"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(d.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4,ease:"easeOut"},className:"mb-12 flex flex-col items-center justify-center",children:[(0,s.jsx)("span",{className:"font-medium text-3xl text-white mb-3",children:"Almost there"}),(0,s.jsx)("span",{className:"text-white font-light",children:"Sign up with your email or Google account"})]},"step2-header"),(0,s.jsx)(d.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.4,delay:.05,ease:"easeOut"},className:"w-full mb-6",children:(0,s.jsx)("div",{className:"relative w-full rounded-full p-0.5 border border-white/10 transition-all duration-200 hover:border-transparent focus-within:border-transparent hover:shadow-[0_0_0_1px_rgb(14_165_233),0_0_6px_2px_rgba(14,165,233,0.35)] focus-within:shadow-[0_0_0_1px_rgb(14_165_233),0_0_6px_2px_rgba(14,165,233,0.35)]",children:(0,s.jsxs)("div",{className:"relative w-full rounded-full bg-white-08",children:[(0,s.jsx)(g.pd,{text:"sm","data-testid":"sign-up-email",className:"w-full pr-12 rounded-full bg-transparent border-0 focus-visible:ring-0 focus-visible:border-0",value:r,onChange:w,onKeyDown:k,placeholder:"[email protected]",type:"email",autoComplete:"email"}),(0,s.jsx)("button",{type:"button","data-testid":"sign-up-submit",onClick:e=>{e.preventDefault(),e.stopPropagation(),A()},disabled:a||!I,"aria-label":a?"Signing up...":"Sign up with email",className:"cursor-pointer absolute right-2 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white text-black hover:bg-gray-100 transition-colors disabled:opacity-50 disabled:cursor-not-allowed z-10",children:a?(0,s.jsx)(v.A,{className:"text-black"}):(0,s.jsx)(u.A,{size:16})})]})})},"step2-email"),(0,s.jsx)(d.P.div,{initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.4,delay:.1,ease:"easeOut"},className:"flex justify-center items-center w-full mb-6 text-white",children:(0,s.jsxs)("div",{className:"flex items-center w-full",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-white/20"}),(0,s.jsx)("span",{className:"mx-4 text-base font-medium",children:"OR"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-white/20"})]})},"step2-or"),(0,s.jsx)(d.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:.15,ease:"easeOut"},className:"w-full mb-6",children:(0,s.jsxs)(f.$,{text:"sm","data-testid":"sign-up-google",onClick:t,className:"w-full cursor-pointer",disabled:i||!R,"aria-label":i?"Signing up with Google...":"Sign up with Google",children:[(0,s.jsx)("span",{className:"mr-3",children:(0,s.jsx)(o(),{src:j.A,alt:"Google",width:24,height:24})}),(0,s.jsx)("span",{className:"text-black text-sm",children:"Sign up with Google"}),i&&(0,s.jsx)(v.A,{className:"text-black ml-3"})]})},"step2-google"),(0,s.jsxs)(f.$,{variant:"ghost","data-testid":"sign-up-back",onClick:()=>{b(),G(1)},className:"w-full cursor-pointer text-gray-400 hover:text-white","aria-label":"Back to display name",children:[(0,s.jsx)(m.A,{size:16,className:"mr-2"}),(0,s.jsx)("span",{className:"text-sm",children:"Back"})]})]}),S&&(0,s.jsx)(d.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.4,ease:"easeOut"},className:"mt-4",children:(0,s.jsx)(_.Q,{type:"warning",message:S})}),(0,s.jsx)(d.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.4,delay:.8,ease:"easeOut"},className:"mt-6 text-center",children:(0,s.jsxs)("span",{className:"text-gray-400 text-sm",children:["Already have an account?"," ",(0,s.jsx)("a",{href:E,"data-testid":"sign-up-sign-in-link",className:"text-white hover:text-gray-300 underline cursor-pointer transition-colors",children:"Sign In"})]})})]})})},R=e=>{let{handleResendCode:t,resendingCode:a,resendCooldownSeconds:r,redirectUrl:n,signUp:c,setActive:o,isLoaded:d,onGoBack:u}=e,x=(0,i.useRouter)(),p=(0,l.useRef)([]),h=(0,l.useRef)(!1),[y,b]=(0,l.useState)(!1),[w,j]=(0,l.useState)(null),[k,S]=(0,l.useState)(Array.from({length:6},()=>"")),P=k.every(e=>""!==e),A=async()=>{if(d&&c&&o&&!h.current&&!y){h.current=!0,b(!0);try{let e=await c.attemptEmailAddressVerification({code:k.join("")});"complete"===e.status?(await o({session:e.createdSessionId}),x.push(n||"/")):j(E)}catch(a){var e,t;j((null==a||null==(t=a.errors)||null==(e=t[0])?void 0:e.longMessage)||E)}finally{h.current=!1,b(!1)}}};return(0,l.useEffect)(()=>{p.current[0]&&p.current[0].focus()},[]),(0,s.jsxs)("div",{className:"w-full flex flex-col items-center justify-center",children:[(0,s.jsx)("span",{className:"text-2xl text-white font-medium mb-4",children:"We sent you a code"}),(0,s.jsx)("div",{className:"flex flex-col items-center justify-center max-w-100 text-gray-400 text-center space-y-2 mb-4",children:(0,s.jsx)("span",{className:"block",children:"Please enter the six-digit code we sent to your email address."})}),(0,s.jsx)("div",{className:"whitespace-nowrap flex items-center justify-center space-x-2 mb-4",children:k.map((e,t)=>(0,s.jsx)(g.pd,{"data-testid":"sign-up-otp-".concat(t),type:"text",inputMode:"numeric",className:"w-12 h-12 p-0 text-center text-xl text-white",onChange:e=>((e,t)=>{var a,s,i;if(0===t&&6===e.length){S(e.split("")),null==(a=p.current[t])||a.blur();return}if(2===e.length)return;let l=[...k];l[t]=e,S(l),t<5&&1===e.length&&(null==(s=p.current[t+1])||s.focus()),t>0&&0===e.length&&(null==(i=p.current[t-1])||i.focus())})(e.target.value,t),ref:e=>{e&&(p.current[t]=e)},value:k[t]},t))}),(0,s.jsxs)("div",{className:"flex items-center text-gray-400 text-sm group/resend",children:[(0,s.jsxs)("div",{children:["Didn't receive?"," ",(0,s.jsx)("a",{href:"#",role:"button","data-testid":"sign-up-resend-code",onClick:e=>{e.preventDefault(),r>0||a||t()},"aria-label":a?"Resending verification code":r>0?"Resend code in ".concat(r," seconds"):"Resend verification code",className:(0,N.cn)(a||r>0?"opacity-50 cursor-not-allowed":"cursor-pointer underline group-hover/resend:text-white"),"aria-disabled":r>0||a,children:a?"Resending...":r>0?"Resend code in ".concat(r,"s"):"Resend code"})]}),a&&(0,s.jsx)(v.A,{className:"ml-3 text-black"})]}),(0,s.jsxs)("div",{className:"flex gap-3 mt-6 w-full",children:[(0,s.jsxs)(f.$,{"data-testid":"sign-up-go-back",onClick:()=>{u(),S(Array.from({length:6},()=>""))},className:"w-1/3 cursor-pointer text-gray-400 hover:text-white",variant:"ghost","aria-label":"Go back to email entry",children:[(0,s.jsx)(m.A,{size:16,className:"mr-2"}),(0,s.jsx)("span",{className:"text-sm",children:"Go Back"})]}),(0,s.jsxs)(f.$,{text:"sm","data-testid":"sign-up-confirm",disabled:!P||y,onClick:A,className:"w-2/3","aria-label":y?"Confirming sign up...":"Confirm verification code",children:[(0,s.jsx)("span",{className:"text-black text-sm",children:"Confirm"}),y&&(0,s.jsx)(v.A,{className:"ml-3 text-black"})]})]}),w&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(_.Q,{type:"error",message:w})})]})}}},e=>{e.O(0,[3941,9182,636,6593,8792],()=>e(e.s=9482)),_N_E=e.O()}]);

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.