1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8989],{9280:(e,t,r)=>{r.d(t,{EW:()=>p,LQ:()=>o,NZ:()=>l,RO:()=>d,We:()=>s,Zn:()=>n,j2:()=>c,lx:()=>a,m9:()=>u,ns:()=>x,nt:()=>i,te:()=>y,w:()=>f,zB:()=>m});let a=7,s={pro:9.99,premium:14.99},n="\xa3".concat(s.pro.toFixed(2)),i="\xa3".concat(s.premium.toFixed(2));function l(e){return"\xa3".concat(s[e].toFixed(2))}function o(e){return[{id:"free",name:"Free",monthlyPrice:0,summary:"Build a daily study habit",description:"Build a daily habit with adaptive practice",features:["".concat(e," AI-marked practice questions a day"),"Spaced repetition scheduling","Progress tracking","Weekly leaderboard"]},{id:"pro",name:"Pro",monthlyPrice:s.pro,summary:"More practice. Detailed feedback.",description:"Practise exam-style questions and review AI feedback",features:["Everything in Free","Unlimited adaptive, syllabus-specific questions (no daily cap)","Realistic exam questions to practise pacing","AI feedback with suggested marks and points to revisit","Blurt Challenge for active recall","Answer explanations to support your review"],highlighted:!0},{id:"premium",name:"Premium",monthlyPrice:s.premium,summary:"Past papers and coursework support",description:"Practise past papers and reflect on coursework with coaching prompts",features:["Everything in Pro","Past-paper PDF import and handwritten answer feedback","Coursework feedback and coaching questions","Coursework checklists and evaluation prompts"]}]}let c=10;function d(e){return"monthly"===e?"monthly":"annual"}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"monthly";if(0===e)return{amount:"\xa30",period:"forever"};if("monthly"===t)return{amount:"\xa3".concat(e.toFixed(2)),period:"month"};let r=e*c,a=r/12;return{amount:"\xa3".concat(r.toFixed(2)),period:"year",sub:"\xa3".concat(a.toFixed(2),"/month billed annually \xb7 2 months free")}}function m(e){let{subscribed:t,internalTrialActive:r,internalTrialEnd:s,stripeTrialEligible:n,now:i=new Date}=e;if(t||!n)return{kind:"none",endsAt:null,daysLeft:null};if(r){let e=s?new Date(s):null,t=e&&!Number.isNaN(e.getTime())?e:null;return{kind:"internal_trial",endsAt:t,daysLeft:t?Math.max(0,Math.ceil((t.getTime()-i.getTime())/864e5)):null}}return{kind:"fresh_trial",endsAt:new Date(i.getTime()+864e5*a),daysLeft:a}}function h(e){return e.toLocaleDateString("en-GB",{day:"numeric",month:"long"})}function p(e){if("none"===e.kind)return null;if("internal_trial"===e.kind){let t=e.endsAt?"ends ".concat(h(e.endsAt)):"is active";return"Your Premium trial ".concat(t,". A paid plan starts billing when this trial ends; cancel before then to avoid a charge.")}let t=e.endsAt?". Nothing is charged until ".concat(h(e.endsAt)):"";return"Your first ".concat(a," days on a paid plan are free").concat(t,". Cancel before then and you pay nothing.")}function x(e,t){return"internal_trial"===e.kind?e.endsAt?"Choose ".concat(t,", free until ").concat(h(e.endsAt)):"Choose ".concat(t,", free until your trial ends"):"fresh_trial"===e.kind?"Try ".concat(t," free for ").concat(a," days"):"Subscribe to ".concat(t)}function f(e,t){let r="\xa3".concat(t.toFixed(2),"/month");if("none"===e.kind)return"".concat(r," \xb7 cancel any time");let a=e.endsAt?" from ".concat(h(e.endsAt)):"";return"Then ".concat(r).concat(a," \xb7 cancel any time")}let g=[{id:"back_to_school",headline:"New school year",subcopy:"Start the year with a revision habit that sticks â a full year of unlimited practice and AI marking for ".concat(c," months' price."),from:[8,15],to:[9,30]},{id:"exam_season",headline:"Exam season is here",subcopy:"Lock in unlimited practice and AI marking through the whole exam run-in.",from:[4,1],to:[6,30]}];function y(e,t){var r;if(!t)return null;let a=(e.getMonth()+1)*100+e.getDate();return null!=(r=g.find(e=>a>=100*e.from[0]+e.from[1]&&a<=100*e.to[0]+e.to[1]))?r:null}},12008:(e,t,r)=>{r.d(t,{g:()=>a});function a(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}},20063:(e,t,r)=>{var a=r(47260);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},20508:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},23664:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},35299:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},35626:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},52987:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},53120:(e,t,r)=>{r.d(t,{ME:()=>a,dK:()=>s});
1class a extends Error{constructor(){super("This is taking longer than expected. Check your connection and try again."),this.name="ReadTimeoutError"}}async function s(e,t){let r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15e3,n=new AbortController,i=()=>{},l=new Promise((e,l)=>{i=()=>{let e=Error("Read cancelled");e.name="AbortError",l(e),n.abort()},(null==t?void 0:t.aborted)?i():null==t||t.addEventListener("abort",i,{once:!0}),r=setTimeout(()=>{l(new a),n.abort()},s)});try{if(null==t?void 0:t.aborted)return await l;return await Promise.race([l,e(n.signal)])}finally{clearTimeout(r),null==t||t.removeEventListener("abort",i)}}},57828:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},65142:(e,t,r)=>{r.d(t,{p:()=>i});var a=r(95155),s=r(12115),n=r(64269);let i=s.forwardRef((e,t)=>{let{className:r,type:s,...i}=e;return(0,a.jsx)("input",{type:s,className:(0,n.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t,...i})});i.displayName="Input"},68480:(e,t,r)=>{r.d(t,{S:()=>o,i:()=>c});var a=r(95155),s=r(89588),n=r(64269),i=r(90224);let l={background:"hsl(var(--background))",card:"hsl(var(--card))",primary:"hsl(var(--primary))",primaryForeground:"hsl(var(--primary-foreground))",border:"hsl(var(--border))",foreground:"hsl(var(--foreground))",mutedForeground:"hsl(var(--muted-foreground))",milestone:"hsl(var(--milestone))",milestoneForeground:"hsl(var(--milestone-foreground))"};function o(e){let{compact:t=!1,celebrating:r=!1,motion:o,motionKey:c,className:d}=e,u=(0,i.j)(null!=o?o:r?"celebrate":void 0,c);return(0,a.jsx)("div",{"aria-hidden":"true",className:(0,n.cn)("relative w-full overflow-hidden",t?"h-32":"h-52",d),children:(0,a.jsxs)("svg",{width:"100%","aria-hidden":"true",focusable:"false",height:"100%",viewBox:"0 0 360 204",preserveAspectRatio:"xMidYMid meet",children:[(0,a.jsx)("circle",{cx:"252",cy:"102",r:"70",fill:l.primary,opacity:.05}),(0,a.jsx)("path",{d:"M8 174Q52 128 112 159T230 151Q307 113 352 165Q339 190 260 193H94Q34 192 8 174Z",fill:l.primary,opacity:.09}),(0,a.jsx)("path",{d:"M8 180Q61 156 127 180T265 177Q320 158 352 176Q308 201 183 201Q60 201 8 180Z",fill:l.primary,opacity:.09}),(0,a.jsx)("path",{d:"M29 184C73 170 137 197 153 168S140 136 186 149S261 182 303 162",fill:"none",stroke:l.primary,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"2 10",opacity:.7}),(0,a.jsx)("ellipse",{cx:"262",cy:"165",rx:"48",ry:"6",fill:l.background,opacity:.3}),(0,a.jsxs)("g",{transform:"translate(50 67) rotate(-12)",children:[(0,a.jsx)("rect",{width:"62",height:"72",rx:"16",fill:l.card,stroke:l.border,strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M16 22Q23 18 31 23Q39 18 46 22V47Q39 43 31 48Q23 43 16 47ZM31 23V48",fill:"none",stroke:l.primary,strokeWidth:"2.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M21 55H41",stroke:l.mutedForeground,strokeWidth:"2",strokeLinecap:"round"})]}),(0,a.jsxs)("g",{transform:"translate(300 127) rotate(8)",children:[(0,a.jsx)("rect",{width:"40",height:"40",rx:"13",fill:r?l.milestone:l.primary}),(0,a.jsx)("path",{d:"m12 20 6 6 11-13",fill:"none",stroke:r?l.milestoneForeground:l.primaryForeground,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}),[[29,37],[158,36],[315,48]].map((e,t)=>{let[r,s]=e;return(0,a.jsx)("path",{d:"M".concat(r-4," ").concat(s,"h8M").concat(r," ").concat(s-4,"v8"),stroke:l.primary,strokeWidth:"1.5",strokeLinecap:"round",opacity:.7},t)}),(0,a.jsx)("circle",{cx:"124",cy:"57",r:"2",fill:l.foreground,opacity:.5}),(0,a.jsx)("circle",{cx:"286",cy:"30",r:"2",fill:l.foreground,opacity:.5}),(0,a.jsx)("g",{"data-landscape-fox":"",transform:"translate(207 49) scale(0.82)",children:(0,a.jsx)("g",{"data-fox-motion":u,"data-fox-motion-cue":null!=o?o:r?"celebrate":void 0,children:(0,a.jsx)(s.y,{mood:r?"celebrating":"ready",motion:u})})})]})})}function c(e){let{kind:t}=e,r="hsl(var(--primary))",s="hsl(var(--rest-tint))",n="hsl(var(--card))";return(0,a.jsxs)("svg",{width:68,height:56,viewBox:"0 0 80 64","aria-hidden":"true",focusable:"false",children:[(0,a.jsx)("circle",{cx:"39",cy:"31",r:"27",fill:s}),"learn"===t&&(0,a.jsxs)("g",{transform:"rotate(-8 40 32)",children:[(0,a.jsx)("path",{d:"M13 15Q27 10 40 19Q53 10 67 15V50Q53 45 40 54Q27 45 13 50Z",fill:n,stroke:r,strokeWidth:"2.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M40 19V54M21 25l11 2M21 33l11 2M48 27l11-2M48 35l11-2",stroke:r,strokeWidth:"2",strokeLinecap:"round"})]}),"recall"===t&&(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:"25",y:"15",width:"31",height:"37",rx:"9",fill:n,stroke:r,strokeWidth:"2.5",transform:"rotate(10 40 32)"}),(0,a.jsx)("path",{d:"M27 7C9 14 10 44 23 50M21 39l2 11-11-1M53 57c17-8 17-36 4-43M57 25l0-11 11 1",fill:"none",stroke:r,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"m35 30 4 5 8-9",fill:"none",stroke:r,strokeWidth:"2.5",strokeLinecap:"round"})]}),"mix"===t&&(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:"16",y:"16",width:"31",height:"39",rx:"8",fill:s,stroke:r,strokeWidth:"2",transform:"rotate(-18 31 36)"}),(0,a.jsx)("rect",{x:"34",y:"10",width:"31",height:"39",rx:"8",fill:n,stroke:r,strokeWidth:"2.5",transform:"rotate(12 50 29)"}),(0,a.jsx)("path",{d:"m49 21 7 9-9 7-7-9Z",fill:r,opacity:.7})]}),"exam"===t&&(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:"19",y:"10",width:"36",height:"46",rx:"9",fill:n,stroke:r,strokeWidth:"2.5"}),(0,a.jsx)("path",{d:"M27 21h19M27 29h11M27 37h9",stroke:r,strokeWidth:"2",strokeLinecap:"round"}
1),(0,a.jsx)("path",{d:"m44 41-1 11 10-5 15-25-9-5Z",fill:s,stroke:r,strokeWidth:"2.5",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"m57 21 8 5",stroke:r,strokeWidth:"2"})]})]})}},70532:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},76907:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(71847).A)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},88989:(e,t,r)=>{r.r(t),r.d(t,{default:()=>R});var a=r(95155),s=r(52619),n=r.n(s),i=r(93231),l=r(53120),o=r(12008),c=r(20063),d=r(12115),u=r(52739),m=r(84517),h=r(3998),p=r(65142),x=r(86948),f=r(18720),g=r(35626),y=r(35299),v=r(23664),b=r(52987),j=r(20508),w=r(99708),k=r(70532),N=r(57828),A=r(76907),C=r(68480),M=r(67547),S=r(60708),P=r(40631),E=r(9280),L=r(21266),W=r(43742),F=r(68799);function R(){let e=(0,c.useSearchParams)(),[t,r]=(0,d.useState)("forgot"===e.get("mode")?"forgot":"email"),[s,R]=(0,d.useState)(!1),[z,B]=(0,d.useState)(""),[Q,T]=(0,d.useState)(""),[_,D]=(0,d.useState)(""),[I,q]=(0,d.useState)(!1),[V,Z]=(0,d.useState)(!1),[G,U]=(0,d.useState)(null),[$,H]=(0,d.useState)(!1),[Y,O]=(0,d.useState)(!1),[K,X]=(0,d.useState)(0),J=(0,d.useRef)(null);(0,d.useEffect)(()=>{var e;"forgot"===t&&G&&(null==(e=J.current)||e.focus())},[t,G]);let ee=(0,d.useRef)(0),et=(0,d.useRef)(!1),er=(0,d.useRef)(0),ea=(0,d.useRef)(null);(0,d.useEffect)(()=>()=>{var e;ee.current+=1,null==(e=ea.current)||e.abort()},[]),(0,d.useEffect)(()=>{if(!K)return;let e=setTimeout(()=>X(0),Math.max(0,K-Date.now()));return()=>clearTimeout(e)},[K]);let[es,en]=(0,d.useState)(null),[ei,el]=(0,d.useState)(null),[eo,ec]=(0,d.useState)("signup"===e.get("mode")?"signup":"signin"),ed=(0,L.Ix)(_),[eu,em]=(0,d.useState)(!1),[eh,ep]=(0,d.useState)(!1),{user:ex,loading:ef,signIn:eg,signUp:ey,signInWithGoogle:ev,signInWithApple:eb,resetPassword:ej}=(0,u.A)(),{profile:ew,userSubjects:ek,loading:eN}=(0,m.s)(),eA=(0,c.useRouter)(),eC=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(eC.current)return;eC.current=!0;let t=e.get("mode");(0,P.gf)({mode:"signup"===t||"forgot"===t?t:"signin"})},[]),(0,d.useEffect)(()=>{let t=(0,F.B_)(e);if(!(0,W.hY)(t))return;let r=(0,F.XZ)(t,(0,W.N3)());r&&(0,W.Ui)(r)},[]),(0,d.useEffect)(()=>{if(!ef&&!eN&&ex)if(ek&&ek.length>0||(null==ew?void 0:ew.year_group)){let t=e.get("redirect");eA.replace(t&&t.startsWith("/")&&!t.startsWith("//")&&!t.startsWith("/\\")&&!t.includes("\\")?t:"/dashboard")}else{var t;let r=null!=(t=(0,i.Ge)(e.get("redirect")))?t:(0,i.Xf)(ex.id);r&&(0,i.QW)(ex.id,r.slice(6),r.slice(6),"setup"),eA.replace((0,i.BG)(r))}},[ef,eN,ex,ew,ek,eA,e]);let eM=async e=>{e.preventDefault();let t=z.trim().toLowerCase();if(B(t),!(0,o.g)(t))return void en("Enter a valid email address, like [email protected]");en(null),r("password")},eS=async t=>{if(t.preventDefault(),el(null),!Q)return void el("Enter your password.");q(!0);try{if("signin"===eo){let{error:e}=await eg(z,Q);e?e.message.includes("Invalid login credentials")?el('Incorrect email or password. No account yet? Use "Create one" below.'):e.message.includes("Email not confirmed")?el("Please check your email and click the confirmation link."):el(e.message):f.oR.success("Welcome back!")}else{if(Q.length<S.w){el("Use at least ".concat(S.w," characters.")),q(!1);return}let t=_.trim()||(0,L.Wp)(),r=(0,i.Ge)(e.get("redirect")),{error:a,session:s}=r?await ey(z,Q,t,r):await ey(z,Q,t);if(a)a.message.includes("already registered")?(ec("signin"),T(""),el("You already have an account with this email â enter your password to sign in.")):el(a.message);else if(s)f.oR.success("Account created! Let's set up your profile.");else{f.oR.success("Account created! Please check your email inbox to verify your account.");let t=(0,i.Ge)(e.get("redirect"));eA.push("/auth/check-email?email=".concat(encodeURIComponent(z)).concat(t?"&redirect=".concat(encodeURIComponent(t)):""))}}}catch(e){f.oR.error("An unexpected error occurred")}finally{q(!1)}}
1,eP=async e=>{if(e.preventDefault(),et.current||Date.now()<er.current)return;let t=z.trim().toLowerCase();if(B(t),!(0,o.g)(t))return void en("Enter a valid email address, like [email protected]");let r=++ee.current,a=new AbortController;ea.current=a,et.current=!0,er.current=Date.now()+6e4,X(er.current),en(null),H(!1),O(!0);let s=()=>ee.current===r&&!a.signal.aborted;try{let{error:e}=await (0,l.dK)(()=>ej(t),a.signal);if(!s())return;if(e){let r=e.status;r&&r>=400&&r<500&&408!==r?(en(e.message),429!==r&&(er.current=0,X(0))):(H(!0),U(t))}else(0,P.Q5)({eventType:"password_reset_requested",eventData:{email_domain:t.split("@")[1]}}),U(t)}catch(e){if(!s())return;H(!0),U(t)}finally{et.current=!1,ea.current===a&&(ea.current=null),s()&&O(!1)}},eE=()=>{el(null),en(null),U(null),"forgot"===t?(ee.current+=1,O(!1),H(!1),T(""),Z(!1),(0,o.g)(z.trim())?(B(z.trim().toLowerCase()),r("password")):(R(!0),r("email"))):"password"===t&&(r("email"),T(""),Z(!1),"signup"!==e.get("mode")&&ec("signin"))};return ex?(0,a.jsx)("main",{className:"min-h-dvh flex items-center justify-center bg-background px-[16px] py-8",children:(0,a.jsxs)("div",{role:"status",className:"max-w-sm text-center space-y-3",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Opening your study spaceâ¦"}),(0,a.jsx)("p",{className:"text-muted-foreground",children:"Getting your account ready."})]})}):(0,a.jsx)("div",{className:"auth-shell min-h-dvh flex flex-col items-center justify-center p-4 sm:p-8 bg-background auth-safe-area [--auth-gutter:16px] sm:[--auth-gutter:32px]",children:(0,a.jsxs)("div",{className:"auth-frame w-full max-w-lg lg:max-w-5xl",children:[(0,a.jsx)("nav",{"aria-label":"Welcome",className:"auth-nav flex items-center justify-between gap-4 mb-6",children:(0,a.jsxs)(n(),{href:"/",className:"inline-flex min-h-11 min-w-0 items-center gap-2 rounded-lg font-display text-xl font-extrabold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,a.jsx)(M.FoxMascot,{className:"h-[32px] w-[32px] shrink-0"}),(0,a.jsx)("span",{className:"min-w-0 [overflow-wrap:anywhere]",children:"MasteryMind"})]})}),(0,a.jsxs)("div",{className:"auth-layout grid items-center gap-6 lg:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] lg:gap-12",children:[(0,a.jsxs)("section",{className:"auth-hero learning-ink learning-settle overflow-hidden rounded-[2rem] bg-background text-foreground ".concat("email"!==t||s?"hidden lg:block":""),children:[(0,a.jsxs)("div",{className:"auth-hero-copy px-[28px] pt-7 sm:px-[40px] sm:pt-10",children:[(0,a.jsx)("p",{className:"auth-hero-eyebrow text-xs font-semibold uppercase tracking-[0.16em] text-primary mb-3",children:"A little more confident"}),(0,a.jsx)("p",{className:"auth-hero-headline font-display text-3xl sm:text-5xl lg:text-6xl font-extrabold tracking-tight leading-[1.05] text-balance",children:"signup"===eo?(0,a.jsxs)(a.Fragment,{children:["Big ideas.",(0,a.jsx)("br",{}),"Small steps."]}):(0,a.jsxs)(a.Fragment,{children:["Your next",(0,a.jsx)("br",{}),"little win."]})})]}),(0,a.jsx)(C.S,{className:"auth-landscape h-[112px] sm:h-[208px] lg:h-[288px]"})]}),(0,a.jsxs)("div",{className:"auth-actions min-w-0 space-y-4",children:[(0,a.jsxs)(x.Zp,{className:"rounded-3xl border-0 bg-transparent shadow-none",children:[(0,a.jsxs)(x.aR,{className:"auth-card-header space-y-1 pb-3 sm:pb-4 px-[16px] sm:px-[24px]",children:[("email"!==t||s)&&(0,a.jsxs)("button",{type:"button",onClick:()=>"email"===t?R(!1):eE(),className:"inline-flex min-h-11 items-center gap-1 rounded-lg px-2 -ml-2 text-sm text-muted-foreground hover:text-primary transition-colors mb-2 w-fit touch-manipulation focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Back"]}),(0,a.jsxs)("h1",{ref:J,tabIndex:-1,className:"text-xl sm:text-2xl font-display font-bold tracking-tight",children:["email"===t&&(s?"Your email.":"signin"===eo?"Welcome back.":"Make it yours."),"password"===t&&("signin"===eo?"Sign in":"Create your account"),"forgot"===t&&(G?"Check your inbox":"Reset password")]}),(0,a.jsxs)(x.BT,{className:"text-sm",children:["email"===t&&(s?"Use the same account on every device.":"Choose how to continue."),"password"===t&&("signin"===eo?"Enter your password":"Set up your account details"),"forgot"===t&&!G&&"We'll send you a link to reset your password"]})]}),(0,a.jsxs)(x.Wu,{className:"auth-card-content px-[16px] sm:px-[24px]",children:["email"===t&&(0,a.jsxs)("div",{className:"space-y-4",children:[!s&&(0,a.jsxs)("div",{className:"grid gap-3",children:[(0,a.jsxs)(h.$,{type:"button",variant:"outline",className:"h-auto min-h-12 px-[12px] py-3 text-sm gap-2 rounded-2xl",size:"lg",disabled:eu||eh||I,onClick:async()=>{em(!0);try{var t;let{error:r}=await ev(null!=(t=(0,i.Ge)(e.get("redirect")))?t:void 0);r&&f.oR.error(r.message)}finally{em(!1)}},children:[eu?(0,a.jsx)(y.A,{className:"h-5 w-5 animate-spin"}):(0,a.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[(0,a.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,a.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,a.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,a.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"})]}),"Google"]}),(0,a.jsxs)(h.$,{type:"button",variant:"outline",className:"h-auto min-h-12 px-[12px] py-3 text-sm gap-2 rounded-2xl",size:"lg",disabled:eu||eh||I,onClick:async()=>{ep(!0);try{var t;let{error:r}=await eb(null!=(t=(0,i.Ge)(e.get("redirect")))?t:void 0);r&&f.oR.error(r.message)}finally{ep(!1)}},children:[eh?(0,a.jsx)(y.A,{className:"h-5 w-5 animate-spin"}):(0,a.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,a.jsx)("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),"Apple"]})]}),s?(0,a.jsxs)("form",{onSubmit:eM,className:"space-y-4",noValidate:!0,children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(v.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,a.jsx)(p.p,{id:"email",type:"email","aria-label":"Email address",placeholder:"Email address",value:z,onChange:e=>{B(e.target.value),es&&en(null)},required:!0,autoFocus:!0,autoComplete:"email","aria-invalid":!!es,"aria-describedby":es?"email-error":void 0,className:"pl-10 h-12 text-base"})]}),es&&(0,a.jsx)("p",{id:"email-error",role:"alert",className:"text-sm text-destructive",children:es})]}),(0,a.jsxs)(h.$,{type:"submit",className:"w-full h-auto min-h-12 px-[12px] py-3 whitespace-normal text-base",size:"lg",disabled:!z||eu||eh,children:[(0,a.jsx)("span",{className:"min-w-0 leading-tight",children:"Continue with email"}),(0,a.jsx)(b.A,{className:"ml-2 h-4 w-4 shrink-0"})]})]}):(0,a.jsxs)(h.$,{className:"w-full h-auto min-h-12 px-[12px] py-3 whitespace-normal text-base",disabled:eu||eh||I,onClick:()=>R(!0),children:[(0,a.jsx)("span",{className:"min-w-0 leading-tight",children:"Continue with email"}),(0,a.jsx)(v.A,{className:"ml-2 size-4 shrink-0","aria-hidden":"true"})]}),(0,a.jsx)("button",{type:"button",className:"min-h-11 w-full text-sm text-primary hover:underline",disabled:I||eh||eu,onClick:()=>ec("signin"===eo?"signup":"signin"),children:"signin"===eo?"New here? Create an account":"Already learning? Sign in"}),"signup"===eo&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground text-center",children:["By continuing, you agree to our"," ",(0,a.jsx)(n(),{className:"underline",href:"/terms",children:"Terms of Service"})," ","and"," ",(0,a.jsx)(n(),{className:"underline",href:"/privacy",children:"Privacy Policy"}),"."]})]}),"password"===t&&(0,a.jsxs)("form",{onSubmit:eS,className:"space-y-4",noValidate:!0,children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(v.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,a.jsx)(p.p,{type:"email","aria-label":"Email address",value:z,readOnly:!0,className:"pl-10 h-11 bg-muted/50 cursor-not-allowed"})]}),"signup"===eo&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{htmlFor:"auth-nickname",className:"text-sm font-medium",children:"Nickname (optional)"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(j.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,a.jsx)(p.p,{id:"auth-nickname",type:"text","aria-label":"Nickname (optional)",placeholder:"For example, QuietOtter",value:_,onChange:e=>D(e.target.value),autoComplete:"nickname","aria-describedby":"display-name-help",className:"pl-10 h-11"})]}),(0,a.jsx)("p",{id:"display-name-help",className:"text-xs text-muted-foreground",children:ed?L.R4[ed]:"This is the only name other students could ever see. Leave it blank and we'll pick one for you."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"auth-password",className:"text-sm font-medium",children:"signin"===eo?"Password":"Create a password"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(w.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,a.jsx)(p.p,{id:"auth-password",type:V?"text":"password","aria-label":"signin"===eo?"Password":"Create a password",placeholder:"signin"===eo?"Password":"Create a password",value:Q,onChange:e=>{T(e.target.value),ei&&el(null)},required:!0,minLength:6,autoFocus:!0,autoComplete:"signin"===eo?"current-password":"new-password","aria-invalid":!!ei,"aria-describedby":["signup"===eo?"password-help":"",ei?"password-error":""].filter(
1Boolean).join(" ")||void 0,className:"pl-10 pr-11 h-11"}),(0,a.jsx)("button",{type:"button",onClick:()=>Z(e=>!e),"aria-label":V?"Hide password":"Show password","aria-pressed":V,className:"absolute right-0 top-1/2 -translate-y-1/2 h-11 w-11 inline-flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring touch-manipulation",children:V?(0,a.jsx)(k.A,{className:"h-4 w-4"}):(0,a.jsx)(N.A,{className:"h-4 w-4"})})]}),"signup"===eo&&(0,a.jsxs)("p",{id:"password-help",className:"text-xs text-muted-foreground",children:["Use at least ",S.w," characters."]}),ei&&(0,a.jsx)("p",{id:"password-error",role:"alert",className:"text-sm text-destructive",children:ei})]}),"signin"===eo&&(0,a.jsx)("div",{className:"text-right",children:(0,a.jsx)("button",{type:"button",onClick:()=>r("forgot"),className:"inline-flex min-h-11 items-center rounded-lg px-2 -mr-2 text-sm text-muted-foreground hover:text-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Forgot password?"})}),(0,a.jsx)(h.$,{type:"submit",className:"w-full h-auto min-h-12 px-[12px] py-3 whitespace-normal text-base",size:"lg",disabled:I,children:I?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 animate-spin"}),"signin"===eo?"Signing in...":"Creating account..."]}):"signin"===eo?"Sign In":"Start my ".concat(E.lx," free days")}),"signup"===eo&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground text-center leading-relaxed",children:["By creating an account you agree to our"," ",(0,a.jsx)(n(),{href:"/terms",className:"text-primary hover:underline",target:"_blank",children:"Terms"})," ","and"," ",(0,a.jsx)(n(),{href:"/privacy",className:"text-primary hover:underline",target:"_blank",children:"Privacy Policy"}),"."]}),(0,a.jsx)("div",{className:"text-center pt-2",children:(0,a.jsx)("button",{type:"button",onClick:()=>ec("signin"===eo?"signup":"signin"),className:"min-h-11 rounded-lg px-2 text-sm text-muted-foreground hover:text-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"signin"===eo?"Don't have an account? Create one":"Already have an account? Sign in"})})]}),"forgot"===t&&(G?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("p",{role:"status",className:"text-sm text-muted-foreground break-words",children:$?(0,a.jsxs)(a.Fragment,{children:["We couldnât confirm whether a reset link was sent to ",(0,a.jsx)("strong",{className:"text-foreground",children:G}),". Check your inbox and spam folder before requesting another."]}):(0,a.jsxs)(a.Fragment,{children:["If thereâs an account for ",(0,a.jsx)("strong",{className:"text-foreground",children:G}),", youâll receive a reset link. Check your spam folder too."]})}),(0,a.jsx)(h.$,{className:"w-full h-auto min-h-12 px-[12px] py-3 whitespace-normal",onClick:eE,children:"Back to sign in"}),(0,a.jsx)(h.$,{variant:"ghost",className:"w-full h-auto min-h-11 px-[12px] py-3 whitespace-normal",onClick:()=>{U(null),H(!1)},children:"Change email address"})]}):(0,a.jsxs)("form",{onSubmit:eP,noValidate:!0,className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"recovery-email",className:"text-sm font-medium",children:"Email address"}),(0,a.jsx)(p.p,{id:"recovery-email",type:"email",autoComplete:"email",inputMode:"email",value:z,onChange:e=>{B(e.target.value),en(null)},"aria-invalid":!!es,"aria-describedby":es?"recovery-email-error":void 0,disabled:Y,className:"h-12"}),es&&(0,a.jsx)("p",{id:"recovery-email-error",role:"alert",className:"text-sm text-destructive",children:es})]}),K>0&&!Y&&(0,a.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Please wait a minute between reset requests. Check your inbox before trying again."}),(0,a.jsx)(h.$,{type:"submit",className:"w-full h-auto min-h-12 px-[12px] py-3 whitespace-normal text-base",size:"lg",disabled:Y||!!K,children:Y?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Sendingâ¦"]}):"Send reset link"})]}))]})]}),"signup"===eo&&(0,a.jsx)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 px-4 py-3",children:(0,a.jsxs)("ul",{className:"space-y-1.5 text-sm text-muted-foreground",children:[(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)(A.A,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsxs)("span",{className:"font-medium text-foreground",children:[E.lx," days of full Premium"]}),", free"]})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)(A.A,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),(0,a.jsx)("span",{children:"No credit card required, so nothing to cancel"})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)(A.A,{className:"h-4 w-4 text-primary shrink-0 mt-0.5"}),(0,a.jsx)("span",{children:"Keep all your courses together in one account"})]})]})}),(0,a.jsxs)("div",{className:"flex justify-center gap-5 text-xs text-muted-foreground",children:[(0,a.jsx)(n(),{href:"/privacy",className:"min-h-11 min-w-11 inline-flex items-center justify-center rounded-md hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Privacy"}),(0,a.jsx)(n(),{href:"/terms",className:"min-h-11 min-w-11 inline-flex items-center justify-center rounded-md hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Terms"})]})]})]})]})})}},99708:(e,t,r)=>{r.d(t,{A:()=>a});
1let a=(0,r(71847).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])}}]);
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.