1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0ed7e-984b-0000-d32a-9ad2941af02f";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="12284246-e01e-574d-93f3-0f7b062fe88a")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48616,e=>{"use strict";var s=e.i(843476),a=e.i(167881);e.i(64107);var r=e.i(158795);e.s(["GoogleButton",0,function({text:e="Continue with Google",disabled:t,claimCompanyId:i,redirect:o}){return(0,s.jsxs)(a.Button,{type:"button",variant:"outline",className:"h-14 w-full rounded-xl bg-white text-base font-medium transition-all hover:border-border-strong hover:bg-brand-blue/5 hover:shadow-md cursor-pointer",onClick:()=>{(0,r.redirectToGoogleAuth)({prompt:"consent",claimCompanyId:i,redirect:o})},disabled:t,children:[(0,s.jsxs)("svg",{className:"mr-3 h-5 w-5",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,s.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,s.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,s.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,s.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),(0,s.jsx)("span",{children:e})]})}])},783361,e=>{"use strict";var s=e.i(843476),a=e.i(994814),r=e.i(643531),t=e.i(286536),i=e.i(77705),o=e.i(531278),l=e.i(270756),n=e.i(37727),d=e.i(271645),c=e.i(653145),m=e.i(167881),x=e.i(23750),u=e.i(10708);e.i(558486);var p=e.i(513793),h=e.i(365466),b=e.i(566867);e.s(["VerificationCodeFlow",0,function({email:e,purpose:g,onSuccess:w,onCancel:f}){let[v,j]=(0,d.useState)("code"),[y,N]=(0,d.useState)(""),[C,S]=(0,d.useState)(""),[k,P]=(0,d.useState)(!1),[F,R]=(0,d.useState)(null),[E,L]=(0,d.useState)(null),[I,A]=(0,d.useState)(60),[z,O]=(0,d.useState)(!1),_=(0,d.useRef)(null),[V,B]=(0,d.useState)(!1),[T,M]=(0,d.useState)(null),[H,$]=(0,d.useState)(!1),[G,U]=(0,d.useState)(!1),D=(0,d.useRef)(null),{register:W,handleSubmit:X,formState:{errors:q},watch:Z}=(0,c.useForm)({resolver:(0,a.zodResolver)(b.passwordWithConfirmSchema)}),K=Z("password",""),J=K.length>=8,Q=/[A-Z]/.test(K),Y=/[a-z]/.test(K),ee=/[0-9]/.test(K),es=(0,d.useCallback)(()=>{A(60),_.current&&clearInterval(_.current),_.current=setInterval(()=>{A(e=>e<=1?(_.current&&clearInterval(_.current),0):e-1)},1e3)},[]);(0,d.useEffect)(()=>(es(),D.current?.focus(),()=>{_.current&&clearInterval(_.current)}),[es]);let ea=async s=>{let a=s||y;if(6!==a.length)return void R("Please enter all 6 digits");P(!0),R(null);try{let s=await (0,h.verifyCode)(e,a);S(s.verification_token),j("password")}catch(e){e instanceof p.ApiError?(R(e.message),"MAX_ATTEMPTS_EXCEEDED"===e.errorCode?L(0):L(null)):R("Verification failed. Please try again."),N(""),D.current?.focus()}finally{P(!1)}},er=async()=>{O(!0),R(null),N(""),L(null);try{await (0,h.sendVerificationCode)(e,g),es()}catch{R("Failed to resend code. Please try again.")}finally{O(!1),D.current?.focus()}},et=async e=>{B(!0),M(null);try{let s=await (0,h.setPasswordWithToken)(C,e.password);(0,p.setLoggedInCookie)(),s.user.role&&(0,p.setUserRoleCookie)(s.user.role),w()}catch(e){e instanceof p.ApiError?M(e.message):M("Failed to set password. Please try again.")}finally{B(!1)}},ei=({met:e,text:a})=>(0,s.jsxs)("div",{className:`flex items-center gap-2 text-sm ${e?"text-emerald-600":"text-brand-gray-400"}`,children:[e?(0,s.jsx)(r.Check,{className:"h-3 w-3"}):(0,s.jsx)(n.X,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:a})]});return"code"===v?(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsxs)("p",{className:"text-sm text-brand-gray-600",children:["We sent a 6-digit code to"," ",(0,s.jsx)("span",{className:"font-medium text-brand-gray-900",children:e})]}),(0,s.jsx)("p",{className:"mt-1 text-xs text-brand-gray-400",children:"Check your spam folder if you don't see it"})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(u.Label,{htmlFor:"verification-code",className:"sr-only",children:"Verification code"}),(0,s.jsx)(x.Input,{ref:D,id:"verification-code",type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:6,autoComplete:"one-time-code",placeholder:"000000",value:y,onChange:e=>{let s=e.target.value.replace(/\D/g,"").slice(0,6);N(s),R(null),6===s.length&&ea(s)},disabled:k,className:"h-16 rounded-xl bg-brand-blue/5/80 text-center font-mono text-3xl tracking-[0.5em] transition-all placeholder:text-brand-gray-300 focus:border-rose-300 focus:bg-white focus:ring-rose-200","aria-label":"6-digit verification code","aria-invalid":!!F}),F&&(0,s.jsx)("div",{id:"verification-code-error",role:"alert",className:"rounded-lg bg-destructive/10 p-3 text-center text-sm text-destructive",children:F}),null!==E&&E>0&&(0,s.jsx)("p",{className:"text-center text-xs text-brand-gray-400",children:`${E} attempt${1!==E?"s":""} remaining`})]}),(0,s.jsx)(m.Button,{onClick:()=>ea(),disabled:k||6!==y.length,className:"h-14 w-full rounded-xl bg-gradient-to-r from-rose-500 via-pink-500 to-brand-pink text-base font-semibold shadow-lg shadow-rose-200/60 transition-all hover:from-brand-pink hover:via-pink-600 hover:to-rose-700 hover:shadow-xl",children:k?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Loader2,{className:"mr-2 h-5 w-5 animate-spin"}),(0,s.jsx)("span",{children:"Verifying..."})]}):"Verify Code"}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[f&&(0,s.jsx)("button",{type:"button",onClick:f,className:"text-sm text-brand-gray-600 transition-colors hover:text-brand-pink",children:"Back"}),(0,s.jsx)("button",{type:"button",onClick:er,disabled:I>0||z,className:"ml-auto text-sm text-brand-gray-600 transition-colors hover:text-brand-pink disabled:cursor-not-allowed disabled:opacity-50",children:z?"
1Sending...":I>0?`Resend code (${I}s)`:"Resend code"})]})]}):(0,s.jsxs)("form",{onSubmit:X(et),className:"space-y-5",children:[(0,s.jsx)("div",{className:"text-center",children:(0,s.jsx)("p",{className:"text-sm text-brand-gray-600",children:"Code verified! Now set your password."})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(u.Label,{htmlFor:"new-password",className:"text-sm font-medium text-brand-gray-700",children:"Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(l.Lock,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(x.Input,{id:"new-password",type:H?"text":"password",placeholder:"Create a password",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 pr-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",...W("password"),"aria-describedby":q.password?"verify-password-error":void 0,"aria-invalid":!!q.password,autoComplete:"new-password",disabled:V}),(0,s.jsx)("button",{type:"button",className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",onClick:()=>$(!H),"aria-label":H?"Hide password":"Show password",children:H?(0,s.jsx)(i.EyeOff,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"}):(0,s.jsx)(t.Eye,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"})})]}),K&&(0,s.jsxs)("div",{className:"space-y-2 rounded-xl bg-brand-blue/5 p-4",children:[(0,s.jsx)(ei,{met:J,text:"At least 8 characters"}),(0,s.jsx)(ei,{met:Q,text:"One uppercase letter"}),(0,s.jsx)(ei,{met:Y,text:"One lowercase letter"}),(0,s.jsx)(ei,{met:ee,text:"One number"})]}),q.password&&(0,s.jsx)("p",{id:"verify-password-error",className:"text-sm text-brand-pink",children:q.password.message})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(u.Label,{htmlFor:"confirm-new-password",className:"text-sm font-medium text-brand-gray-700",children:"Confirm Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(l.Lock,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(x.Input,{id:"confirm-new-password",type:G?"text":"password",placeholder:"Confirm your password",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 pr-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",...W("confirmPassword"),"aria-describedby":q.confirmPassword?"verify-confirm-error":void 0,"aria-invalid":!!q.confirmPassword,autoComplete:"new-password",disabled:V}),(0,s.jsx)("button",{type:"button",className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",onClick:()=>U(!G),"aria-label":G?"Hide password":"Show password",children:G?(0,s.jsx)(i.EyeOff,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"}):(0,s.jsx)(t.Eye,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"})})]}),q.confirmPassword&&(0,s.jsx)("p",{id:"verify-confirm-error",className:"text-sm text-brand-pink",children:q.confirmPassword.message})]}),T&&(0,s.jsx)("div",{role:"alert",className:"rounded-xl bg-rose-50 p-4 text-sm text-rose-700",children:T}),(0,s.jsx)(m.Button,{type:"submit",disabled:V,className:"h-14 w-full rounded-xl bg-gradient-to-r from-rose-500 via-pink-500 to-brand-pink text-base font-semibold shadow-lg shadow-rose-200/60 transition-all hover:from-brand-pink hover:via-pink-600 hover:to-rose-700 hover:shadow-xl",children:V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Loader2,{className:"mr-2 h-5 w-5 animate-spin"}),(0,s.jsx)("span",{children:"Setting password..."})]}):"Set Password"})]})}])},174155,e=>{"use strict";var s=e.i(843476),a=e.i(994814),r=e.i(531278),t=e.i(270756),i=e.i(263488),o=e.i(522016),l=e.i(618566),n=e.i(271645),d=e.i(653145),c=e.i(167881),m=e.i(23750),x=e.i(10708);e.i(558486);var u=e.i(513793),p=e.i(365466);e.i(64107);var h=e.i(567754),b=e.i(158795);e.i(826280);var g=e.i(681307),w=e.i(783361);let f=g.z.object({email:g.z.string().email("Please enter a valid email address").max(254,"Email is too long"),password:g.z.string().min(1,"Password is required")});e.s(["LoginForm",0,function({onSuccess:e,redirect:g}
1){let v=(0,l.useRouter)(),[j,y]=(0,n.useState)(!1),[N,C]=(0,n.useState)(null),[S,k]=(0,n.useState)("loginForm"),[P,F]=(0,n.useState)(""),[R,E]=(0,n.useState)(3),[L,I]=(0,n.useState)(!1),A=(0,n.useRef)(null),{register:z,handleSubmit:O,formState:{errors:_}}=(0,d.useForm)({resolver:(0,a.zodResolver)(f)}),V=(0,n.useCallback)(()=>{e?.(),g&&(0,h.isValidRedirect)(g)?v.replace(g):g&&(0,h.isValidSSORedirect)(g)?v.replace(`/activate/jobcopilot?state=${encodeURIComponent(g)}`):v.replace("/dashboard")},[e,g,v]);(0,n.useEffect)(()=>{if("gmailRedirect"===S)return A.current=setInterval(()=>{E(e=>e<=1?(A.current&&clearInterval(A.current),(0,b.redirectToGoogleAuth)({prompt:"select_account",loginHint:P,redirect:g}),0):e-1)},1e3),()=>{A.current&&clearInterval(A.current)}},[S,P,g]);let B=async s=>{y(!0),C(null);try{let a=await (0,p.login)(s.email,s.password);if((0,u.setLoggedInCookie)(),a.user.role&&(0,u.setUserRoleCookie)(a.user.role),e?.(),a.is_new_user){if(g){let e=(0,h.toStorableRedirect)(g);if(e)try{sessionStorage.setItem("post_onboarding_redirect",e)}catch{}}v.replace("/onboarding")}else g&&(0,h.isValidRedirect)(g)?v.replace(g):g&&(0,h.isValidSSORedirect)(g)?v.replace(`/activate/jobcopilot?state=${encodeURIComponent(g)}`):"company"===a.user.role?v.replace("/employer/jobs"):v.replace("/dashboard")}catch(e){if(e instanceof u.ApiError&&"PASSWORD_NOT_SET"===e.errorCode){let a=e.data?.is_gmail===!0;if(F(s.email),a)E(3),k("gmailRedirect");else{I(!0);try{await (0,p.sendVerificationCode)(s.email,"set_password")}catch{}finally{I(!1)}k("codeFlow")}}else C(e instanceof Error?e.message:"Login failed. Please try again.")}finally{y(!1)}},T=async()=>{A.current&&clearInterval(A.current),I(!0);try{await (0,p.sendVerificationCode)(P,"set_password")}catch{}finally{I(!1)}k("codeFlow")};return"gmailRedirect"===S?(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-5 text-center",children:[(0,s.jsx)("h3",{className:"font-semibold text-amber-900",children:"This account uses Google sign-in"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-amber-800",children:`Redirecting to Google in ${R}...`})]}),(0,s.jsx)(c.Button,{onClick:()=>(0,b.redirectToGoogleAuth)({prompt:"select_account",loginHint:P,redirect:g}),className:"h-14 w-full rounded-xl bg-gradient-to-r from-rose-500 via-pink-500 to-brand-pink text-base font-semibold shadow-lg shadow-rose-200/60 transition-all hover:from-brand-pink hover:via-pink-600 hover:to-rose-700 hover:shadow-xl",children:"Continue with Google"}),(0,s.jsx)("div",{className:"text-center",children:(0,s.jsx)("button",{type:"button",onClick:T,disabled:L,className:"text-sm text-brand-gray-600 transition-colors hover:text-brand-pink disabled:opacity-50",children:L?"Sending code...":"Set a password instead"})}),(0,s.jsx)("div",{className:"text-center",children:(0,s.jsx)("button",{type:"button",onClick:()=>{A.current&&clearInterval(A.current),k("loginForm"),C(null)},className:"text-sm text-brand-gray-600 transition-colors hover:text-brand-pink",children:"Back to login"})})]}):"codeFlow"===S?(0,s.jsx)(w.VerificationCodeFlow,{email:P,purpose:"set_password",onSuccess:V,onCancel:()=>{k("loginForm"),C(null)}}):(0,s.jsxs)("form",{onSubmit:O(B),className:"space-y-5","data-testid":"form-login",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(x.Label,{htmlFor:"email",className:"text-sm font-medium text-brand-gray-700",children:"Email"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(i.Mail,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(m.Input,{id:"email",type:"email",placeholder:"[email protected]",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",...z("email"),"aria-describedby":_.email?"login-email-error":void 0,"aria-invalid":!!_.email,autoComplete:"email",disabled:j})]}),_.email&&(0,s.jsx)("p",{id:"login-email-error",className:"text-sm text-brand-pink",children:_.email.message})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(x.Label,{htmlFor:"password",className:"text-sm font-medium text-brand-gray-700",children:"Password"}),(0,s.jsx)(o.default,{href:"/forgot-password",className:"text-sm text-brand-gray-600 transition-colors hover:text-brand-pink",children:"Forgot password?"})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(t.Lock,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}
1),(0,s.jsx)(m.Input,{id:"password",type:"password",placeholder:"Enter your password",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",...z("password"),"aria-describedby":_.password?"login-password-error":void 0,"aria-invalid":!!_.password,autoComplete:"current-password",disabled:j})]}),_.password&&(0,s.jsx)("p",{id:"login-password-error",className:"text-sm text-brand-pink",children:_.password.message})]}),N&&(0,s.jsx)("div",{role:"alert",className:"rounded-xl bg-rose-50 p-4 text-sm text-rose-700",children:N}),(0,s.jsx)(c.Button,{type:"submit",className:"h-14 w-full rounded-xl bg-gradient-to-r from-rose-500 via-pink-500 to-brand-pink text-base font-semibold shadow-lg shadow-rose-200/60 transition-all hover:from-brand-pink hover:via-pink-600 hover:to-rose-700 hover:shadow-xl",disabled:j,children:j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Loader2,{className:"mr-2 h-5 w-5 animate-spin"}),(0,s.jsx)("span",{children:"Signing in..."})]}):"Sign In"})]})}])},599428,e=>{"use strict";var s=e.i(843476),a=e.i(994814),r=e.i(63209),t=e.i(643531),i=e.i(531278),o=e.i(270756),l=e.i(37727),n=e.i(522016),d=e.i(618566),c=e.i(271645),m=e.i(653145),x=e.i(167881),u=e.i(23750),p=e.i(10708);e.i(558486);var h=e.i(513793),b=e.i(365466);let g=e.i(566867).passwordWithConfirmSchema;e.s(["PasswordResetForm",0,function(){let e=(0,d.useRouter)(),w=(0,d.useSearchParams)(),[f]=(0,c.useState)(()=>w.get("token"));(0,c.useEffect)(()=>{f&&window.history.replaceState(null,"","/reset-password")},[f]);let[v,j]=(0,c.useState)(!1),[y,N]=(0,c.useState)(null),{register:C,handleSubmit:S,formState:{errors:k},watch:P}=(0,m.useForm)({resolver:(0,a.zodResolver)(g)}),F=P("password",""),R=F.length>=8,E=/[A-Z]/.test(F),L=/[a-z]/.test(F),I=/[0-9]/.test(F),A=async s=>{if(!f)return void N("Invalid or missing reset token");j(!0),N(null);try{await (0,b.resetPassword)(f,s.password),e.replace("/dashboard")}catch(e){e instanceof h.ApiError?N(e.message):N("Failed to reset password. Please try again.")}finally{j(!1)}},z=({met:e,text:a})=>(0,s.jsxs)("div",{className:`flex items-center gap-2 text-sm ${e?"text-success":"text-muted-foreground"}`,children:[e?(0,s.jsx)(t.Check,{className:"h-3 w-3"}):(0,s.jsx)(l.X,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:a})]});return f?(0,s.jsxs)("form",{onSubmit:S(A),className:"space-y-4","data-testid":"form-reset-password",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p.Label,{htmlFor:"password",children:"New Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(o.Lock,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(u.Input,{id:"password",type:"password",placeholder:"Create a new password",className:"pl-10",...C("password"),disabled:v})]}),F&&(0,s.jsxs)("div",{className:"space-y-1 rounded-lg bg-muted/50 p-3",children:[(0,s.jsx)(z,{met:R,text:"At least 8 characters"}),(0,s.jsx)(z,{met:E,text:"One uppercase letter"}),(0,s.jsx)(z,{met:L,text:"One lowercase letter"}),(0,s.jsx)(z,{met:I,text:"One number"})]}),k.password&&(0,s.jsx)("p",{className:"text-sm text-destructive",children:k.password.message})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(p.Label,{htmlFor:"confirmPassword",children:"Confirm New Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(o.Lock,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(u.Input,{id:"confirmPassword",type:"password",placeholder:"Confirm your new password",className:"pl-10",...C("confirmPassword"),disabled:v})]}),k.confirmPassword&&(0,s.jsx)("p",{className:"text-sm text-destructive",children:k.confirmPassword.message})]}),y&&(0,s.jsx)("div",{className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:y}),(0,s.jsx)(x.Button,{type:"submit",className:"w-full",disabled:v,children:v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),(0,s.jsx)("span",{children:"Resetting..."})]}):"Reset Password"})]}):(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-center",children:[(0,s.jsx)(r.AlertCircle,{className:"mx-auto h-8 w-8 text-destructive"}),(0,s.jsx)("h3",{className:"mt-2 font-semibold text-destructive",children:"Invalid Reset Link"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"This password reset link is invali
1d or has expired."}),(0,s.jsx)(x.Button,{asChild:!0,className:"mt-4",children:(0,s.jsx)(n.default,{href:"/forgot-password",children:"Request New Link"})})]})}])},668131,e=>{"use strict";var s=e.i(843476),a=e.i(994814),r=e.i(531278),t=e.i(263488),i=e.i(618566),o=e.i(271645),l=e.i(653145),n=e.i(167881),d=e.i(23750),c=e.i(10708);e.i(558486);var m=e.i(365466);e.i(826280);var x=e.i(681307),u=e.i(783361);let p=x.z.object({email:x.z.string().email("Please enter a valid email address").max(254,"Email is too long")});e.s(["PasswordResetRequestForm",0,function(){let e=(0,i.useRouter)(),[x,h]=(0,o.useState)(!1),[b,g]=(0,o.useState)(null),[w,f]=(0,o.useState)("email"),[v,j]=(0,o.useState)(""),{register:y,handleSubmit:N,formState:{errors:C}}=(0,l.useForm)({resolver:(0,a.zodResolver)(p)}),S=async e=>{h(!0),g(null);try{await (0,m.sendVerificationCode)(e.email,"reset_password"),j(e.email),f("code")}catch(e){g(e instanceof Error?e.message:"Failed to send verification code")}finally{h(!1)}};return"code"===w?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"rounded-lg border bg-brand-blue/5 p-4 text-center",children:(0,s.jsx)("p",{className:"text-sm text-brand-gray-600",children:"If an account exists with that email, we've sent a verification code."})}),(0,s.jsx)(u.VerificationCodeFlow,{email:v,purpose:"reset_password",onSuccess:()=>{e.replace("/dashboard")},onCancel:()=>{f("email"),g(null)}})]}):(0,s.jsxs)("form",{onSubmit:N(S),className:"space-y-4","data-testid":"form-forgot-password",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(c.Label,{htmlFor:"email",children:"Email"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(t.Mail,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(d.Input,{id:"email",type:"email",placeholder:"[email protected]",className:"pl-10",...y("email"),"aria-describedby":C.email?"reset-email-error":void 0,"aria-invalid":!!C.email,autoComplete:"email",disabled:x})]}),C.email&&(0,s.jsx)("p",{id:"reset-email-error",className:"text-sm text-destructive",children:C.email.message})]}),b&&(0,s.jsx)("div",{role:"alert",className:"rounded-lg bg-destructive/10 p-3 text-sm text-destructive",children:b}),(0,s.jsx)(n.Button,{type:"submit",className:"w-full",disabled:x,children:x?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),(0,s.jsx)("span",{children:"Sending..."})]}):"Send Verification Code"})]})}])},311372,e=>{"use strict";var s=e.i(843476),a=e.i(994814),r=e.i(643531),t=e.i(286536),i=e.i(77705),o=e.i(531278),l=e.i(270756),n=e.i(263488),d=e.i(37727),c=e.i(618566),m=e.i(271645),x=e.i(653145),u=e.i(167881),p=e.i(23750),h=e.i(10708);e.i(558486);var b=e.i(513793),g=e.i(365466),w=e.i(566867);e.i(64107);var f=e.i(188084),v=e.i(567754);e.i(826280);var j=e.i(681307);let y=j.z.object({email:j.z.string().email("Please enter a valid email address").max(254,"Email is too long"),password:w.passwordSchema,confirmPassword:j.z.string()}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]});e.s(["SignupForm",0,function({onSuccess:e,collapsible:w=!1,redirect:j,defaultEmail:N,intent:C}){let S=(0,c.useRouter)(),[k,P]=(0,m.useState)(!1),[F,R]=(0,m.useState)(null),[E,L]=(0,m.useState)(!w),[I,A]=(0,m.useState)(!1),[z,O]=(0,m.useState)(!1),{register:_,handleSubmit:V,formState:{errors:B},watch:T,trigger:M}=(0,x.useForm)({resolver:(0,a.zodResolver)(y),defaultValues:{email:N||""}}),H=T("password",""),$=H.length>=8,G=/[A-Z]/.test(H),U=/[a-z]/.test(H),D=/[0-9]/.test(H),W=async s=>{P(!0),R(null);try{let a=await (0,g.signup)(s.email,s.password);if((0,b.setLoggedInCookie)(),a.user.role&&(0,b.setUserRoleCookie)(a.user.role),e?.(),(0,f.isExpressCheckoutPath)(j))return void S.replace(j);if(j){let e=(0,v.toStorableRedirect)(j);if(e)try{sessionStorage.setItem("post_onboarding_redirect",e)}catch{}}if("post"===C)return void S.replace("/employer");S.replace("/onboarding")}catch(e){e instanceof b.ApiError?R(e.message):R("Signup failed. Please try again.")}finally{P(!1)}},X=async e=>{if(e.preventDefault(),w&&!E){await M("email")&&L(!0);return}await V(W)(e)},q=({met:e,text:a})=>(0,s.jsxs)("div",{className:`flex items-center gap-2 text-sm ${e?"text-success":"text-muted-foreground"}`,children:[e?(0,s.jsx)(r.Check,{className:"h-3.5 w-3.5"}):(0,s.jsx)(d.X,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:a})]});return(0,s.jsxs)("form",{onSubmit:X,className:"space-y-5","data-testid":"form-signup",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(h.Label,{htmlFor:"email",className:"text-sm font-medium text-brand-gray-700",children:"Email"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(n.Mail,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(p.Input,{id:"email",type:"email",placeholder:"[email protected]",className:"h-14 roun
1ded-xl bg-brand-blue/5/80 pl-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",..._("email"),"aria-describedby":B.email?"signup-email-error":void 0,"aria-invalid":!!B.email,autoComplete:"email",onFocus:()=>{w&&!E&&L(!0)},disabled:k})]}),B.email&&(0,s.jsx)("p",{id:"signup-email-error",className:"text-sm text-brand-pink",children:B.email.message})]}),E&&(0,s.jsxs)("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300 space-y-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(h.Label,{htmlFor:"password",className:"text-sm font-medium text-brand-gray-700",children:"Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(l.Lock,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(p.Input,{id:"password",type:I?"text":"password",placeholder:"Create a password",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 pr-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",..._("password"),"aria-describedby":B.password?"signup-password-error":void 0,"aria-invalid":!!B.password,autoComplete:"new-password",disabled:k}),(0,s.jsx)("button",{type:"button",className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",onClick:()=>A(!I),"aria-label":I?"Hide password":"Show password",children:I?(0,s.jsx)(i.EyeOff,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"}):(0,s.jsx)(t.Eye,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"})})]}),H&&(0,s.jsxs)("div",{className:"space-y-1.5 rounded-xl bg-brand-blue/5 p-4",children:[(0,s.jsx)(q,{met:$,text:"At least 8 characters"}),(0,s.jsx)(q,{met:G,text:"One uppercase letter"}),(0,s.jsx)(q,{met:U,text:"One lowercase letter"}),(0,s.jsx)(q,{met:D,text:"One number"})]}),B.password&&(0,s.jsx)("p",{id:"signup-password-error",className:"text-sm text-brand-pink",children:B.password.message})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(h.Label,{htmlFor:"confirmPassword",className:"text-sm font-medium text-brand-gray-700",children:"Confirm Password"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(l.Lock,{className:"absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-brand-gray-400"}),(0,s.jsx)(p.Input,{id:"confirmPassword",type:z?"text":"password",placeholder:"Confirm your password",className:"h-14 rounded-xl bg-brand-blue/5/80 pl-12 pr-12 text-base transition-all placeholder:text-brand-gray-400 focus:border-rose-300 focus:bg-white focus:ring-rose-200",..._("confirmPassword"),"aria-describedby":B.confirmPassword?"signup-confirm-error":void 0,"aria-invalid":!!B.confirmPassword,autoComplete:"new-password",disabled:k}),(0,s.jsx)("button",{type:"button",className:"absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer",onClick:()=>O(!z),"aria-label":z?"Hide password":"Show password",children:z?(0,s.jsx)(i.EyeOff,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"}):(0,s.jsx)(t.Eye,{className:"h-5 w-5 text-brand-gray-400 transition-colors hover:text-brand-gray-600"})})]}),B.confirmPassword&&(0,s.jsx)("p",{id:"signup-confirm-error",className:"text-sm text-brand-pink",children:B.confirmPassword.message})]})]}),F&&(0,s.jsx)("div",{role:"alert",className:"rounded-xl bg-rose-50 p-4 text-sm text-rose-700",children:F}),(0,s.jsx)(u.Button,{type:"submit",className:"h-14 w-full rounded-xl bg-gradient-to-r from-rose-500 via-pink-500 to-brand-pink text-base font-semibold shadow-lg shadow-rose-200/60 transition-all hover:from-brand-pink hover:via-pink-600 hover:to-rose-700 hover:shadow-xl",disabled:k,children:k?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Loader2,{className:"mr-2 h-5 w-5 animate-spin"}),(0,s.jsx)("span",{children:"Creating account..."})]}):E?"Create Account":"Continue"})]})}])}]); 2 3//# chunkId=12284246-e01e-574d-93f3-0f7b062fe88a
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.