(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{83236:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(47128)}])},46776:function(e,i,n){"use strict";n.d(i,{Z:function(){return c}});var t=n(85893),a=n(2516),s=n.n(a),r=n(41664),l=n.n(r),o={src:"/_next/static/media/Logo-No-Subheadline.43c3fd34.png",height:88,width:340,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAMAAABSSm3fAAAAJFBMVEVhYW5KXXRgX2qDeGlfX2x/f389VW9lZ3KZiod6f4qijomCiH9GhNGiAAAACnRSTlOQVWzNOwR1dMgwEZ5zYQAAAAlwSFlzAAALEwAACxMBAJqcGAAAABpJREFUeJxj4GZmZGJkYmFl4OJgY2BgYOcEAAJuAEb3xuFcAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:2},u=n(59835),d=n(98590);function c(e){let{className:i,style:n}=e;return(0,t.jsx)("div",{className:s().wrap,children:(0,t.jsx)("div",{style:n,className:"".concat(s().container," ").concat(i||s().default),children:(0,t.jsx)(l(),{className:s().logoOnlyImg,href:"/",children:(0,t.jsx)(u.Z,{style:{opacity:.5,width:"100%"},src:o,alt:d.OT,intrinsicWidth:340,intrinsicHeight:88})})})})}},1543:function(e,i,n){"use strict";n.d(i,{Z:function(){return p}});var t=n(85893),a=n(43886),s=n.n(a),r=n(10946),l=n(67294),o=n(39450),u=n(7757),d=n(41664),c=n.n(d),h=n(74997),m=n(20180),_=n(98590),g=n(92258),A=n(93512),x=n(31323),f=n(11163),E=n(54145);function p(e){let{onSubmit:i,status:n,email:a,setEmail:d,isLoading:p,errorMessage:N,hideForm:b,spinnerMessage:j,setSpinnerMessage:y}=e,[I,v]=(0,l.useState)(!1),{user:w,loading:P}=(0,g.Eu)(),F=(0,f.useRouter)();(0,l.useEffect)(()=>{y&&(null==w?void 0:w.emailVerified)&&!F.query.continueUrl&&n!=m.P.RECOVERED_EMAIL&&n!=m.P.UPDATE_EMAIL&&(F.push(u.bf),y("Sending to dashboard..."))},[F,F.query,null==w?void 0:w.emailVerified]);let T=n==m.P.CREATE||n==m.P.LOGIN,C=n==m.P.WAITING_LOGIN,O=[{status:m.P.CREATE,preheader:"Create an account",headline:"First, type your email"},{status:m.P.WAITING_CREATE,headline:"We emailed a sign-in link",subheader:"You don't need a password. Just click the link sent to ".concat(a)},{status:m.P.WAITING_LOGIN,headline:"We sent a sign-in link",subheader:"You'll receive an email if ".concat(a," has an account.")},{status:m.P.NO_EMAIL,headline:"Confirm your email",subheader:"Please re-enter the same email"},{status:m.P.LOGIN,headline:"Login With Email",subheader:"You'll get a 1-click sign-in link"},{status:m.P.LOGIN_AFTER_UPDATE,headline:"Login With New Email",subheader:"Last time."},{status:m.P.RECOVERED_EMAIL,headline:"Email Change Reverted",subheader:"Log in with your original email"}].find(e=>e.status==n),M=null==O?void 0:O.preheader,G=null==O?void 0:O.headline,L=null==O?void 0:O.subheader;return P?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)(t.Fragment,{children:(null==w?void 0:w.emailVerified)&&n!=m.P.NO_EMAIL&&!m.P.LOGIN_AFTER_UPDATE?(0,t.jsx)(x.Z,{message:j}):(0,t.jsxs)("div",{className:s().container,children:[j&&(0,t.jsx)(x.Z,{message:null!=j?j:"Verifying..."}),!j&&(0,t.jsxs)("div",{className:s().textHeaders,children:[M&&(0,t.jsx)("div",{className:s().preheader,children:M}),G&&(0,t.jsx)("h1",{className:s().headline,children:G}),L&&(0,t.jsx)("div",{className:s().subheader,children:L})]}),n!=m.P.WAITING_CREATE&&n!=m.P.WAITING_LOGIN&&n!=m.P.VERIFY&&n!=m.P.VERIFIED&&!j&&!b&&(0,t.jsxs)("form",{onSubmit:i,children:[(0,t.jsx)(r.Z,{required:!0,type:"email",name:"email",id:"email",value:a,classNameInput:s().input,onChange:e=>d(e.target.value),placeholder:I?"":"name@example.com",onFocus:()=>v(!0),onBlur:()=>v(!1)}),(0,t.jsx)(o.Z,{type:"submit",dataCy:E.XC,className:s().button,buttonText:"Continue",color:"blue",loading:p,disabled:p}),N&&(0,t.jsx)(h.Z,{type:"red",children:N}),T&&(0,t.jsxs)("div",{className:s().switchTo,children:[n==m.P.CREATE&&(0,t.jsxs)(t.Fragment,{children:["Existing account? ",(0,t.jsx)(c(),{"data-cy":E.iZ,href:u.R,children:"Login"})]}),n==m.P.LOGIN&&(0,t.jsxs)(t.Fragment,{children:["New here? ",(0,t.jsx)(c(),{"data-cy":E.DC,href:u.q2,children:"Sign up"})]})]})]}),C&&(0,t.jsx)(A.Z,{customMaxWidth:"500px",trigger:(0,t.jsx)(o.Z,{className:s().trigger,color:"link",buttonText:"Trouble logging in?"}),content:(0,t.jsxs)("div",{style:{fontSize:"1.1rem"},children:[(0,t.jsx)("b",{children:"Not receiving an email?"})," You might have signed up with a different email. If you still have trouble, let me know:"," ",_.l4]})})]})})}},47128:function(e,i,n){"use strict";n.r(i),n.d(i,{default:function(){return g}});var t=n(85893),a=n(98690),s=n(46776),r=n(93512),l=n(27542),o=n.n(l),u=n(98590);function d(){let e=(0,t.jsxs)("div",{className:o().container,children:[(0,t.jsx)("h2",{className:o().headline,children:"Did you buy a course before Jan 1, 2024?"}),(0,t.jsx)("p",{className:o().subheadline,children:"I migrated my courses to this website. Just enter your email, and your courses will transfer after verifying it."}),(0,t.jsxs)("p",{children:["If they don't transfer, or if you have questions, email me:"," ",u.l4]})]});return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(r.Z,{customMaxWidth:"600px",trigger:"View message",content:e,style:"link"})})}var c=n(43886),h=n.n(c),m=n(20180),_=n(1543);function g(){let{onLinkRequest:e,email:i,setEmail:n,isLoading:r,status:l,hasError:o,spinnerMessage:c}=(0,m.Z)(m.P.LOGIN);return(0,t.jsxs)(a.Z,{links:"empty",subscribe:"empty",header:"empty",padding:"0",customMaxWidth:"100%",noindex:!0,children:[(0,t.jsxs)("div",{className:h().pastStudents,children:[(0,t.jsx)("span",{style:{fontSize:".9rem"},children:(0,t.jsx)("b",{children:"Past Student?"})})," ",(0,t.jsx)(d,{})]}),(0,t.jsx)(s.Z,{}),(0,t.jsx)(_.Z,{onSubmit:e,status:l,email:i,setEmail:n,isLoading:r,spinnerMessage:c,errorMessage:o?"Couldn't submit email. Try again or email me: ".concat(u.DW):void 0})]})}},2516:function(e){e.exports={container:"MinimalHeader_container__1675G",wrap:"MinimalHeader_wrap__Xi6bo",link:"MinimalHeader_link__iAkm_",arrow:"MinimalHeader_arrow__UmuI2",logoOnlyImg:"MinimalHeader_logoOnlyImg__OcHSZ"}},43886:function(e){e.exports={container:"AuthForm_container__cU_fu",textHeaders:"AuthForm_textHeaders__GitQ_",input:"AuthForm_input__KD5NR",preheader:"AuthForm_preheader__gaeJw",subheader:"AuthForm_subheader__zSA0U",headline:"AuthForm_headline__pPlaZ",switchTo:"AuthForm_switchTo__W9FME",button:"AuthForm_button__oaXxh",trigger:"AuthForm_trigger__USjKJ",pastStudents:"AuthForm_pastStudents__YJ6tb"}},27542:function(e){e.exports={headline:"MigrationDialog_headline___xto2",container:"MigrationDialog_container__UoJAy",subheadline:"MigrationDialog_subheadline__osg_7",email:"MigrationDialog_email__vrkNg"}}},function(e){e.O(0,[7409,8390,4122,2888,9774,179],function(){return e(e.s=83236)}),_N_E=e.O()}]);