(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5469],{37101:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/password-reset",function(){return n(70182)}])},2391:function(e,s,n){"use strict";n.d(s,{E:function(){return r}});var r={maxWidth:"400px",margin:"auto",border:"1px solid lightgrey",borderRadius:"5px",padding:"10px 20px 20px 20px",backgroundColor:"#fafafa",fontSize:"12pt",color:"#606060"}},73306:function(e,s,n){"use strict";n.d(s,{Z:function(){return u}});var r=n(85893),t=n(9008),i=n.n(t),a=n(54),o=n(48397),c=n(1864);function u(e){var s=e.title,n=(0,a.i)().siteName;return(0,r.jsxs)(i(),{children:[(0,r.jsxs)("title",{children:[n," ",n?"\u2013":""," ",s]}),(0,r.jsx)("meta",{name:"description",content:"CoCalc landing pages and documentation"}),(0,r.jsx)("link",{rel:"icon",href:(0,c.join)(null!==o.Z&&void 0!==o.Z?o.Z:"","/webapp/favicon-32x32.png")})]})}},70182:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return E},default:function(){return C}});var r=n(85893),t=n(97183),i=n(47568),a=n(26042),o=n(69396),c=n(34051),u=n.n(c),d=n(79531),l=n(71577),p=n(14670),x=n(67294),h=n(61429),f=n(17682),m=n(40981),g=n(2391),j=n(9125),v=n(7772),y=n(92771),w=n(77389);function _(){var e=(0,f.Z)().siteName,s=(0,x.useState)(""),n=s[0],t=s[1],c=(0,x.useState)(!1),_=c[0],Z=c[1],b=(0,x.useState)(""),S=b[0],k=b[1],E=(0,x.useState)(""),C=E[0],N=E[1];function P(){return T.apply(this,arguments)}function T(){return(T=(0,i.Z)(u().mark((function e(){var s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,k(""),N(""),Z(!0),e.next=8,(0,j.Z)("/auth/password-reset",{email:n});case 8:(s=e.sent).success&&(t(""),N(s.success)),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),k("".concat(e.t0));case 15:return e.prev=15,Z(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))).apply(this,arguments)}return(0,r.jsxs)("div",{style:{padding:"0 15px"},children:[(0,r.jsxs)("div",{style:{textAlign:"center",marginBottom:"15px"},children:[(0,r.jsx)(h.Z,{style:{width:"100px",height:"100px"}}),(0,r.jsxs)("h1",{children:["Reset Your ",e," Password"]})]}),(0,r.jsxs)("div",{style:g.E,children:[(0,r.jsxs)("div",{style:{margin:"10px 0"},children:["Enter your ",e," account's email address and we will email a password reset link to you."]}),(0,r.jsxs)("form",{children:[(0,r.jsx)(d.Z,{style:{fontSize:"13pt"},autoFocus:!0,placeholder:"Enter your email address",autoComplete:"username",value:n,onChange:function(e){t(e.target.value),k(""),N("")},onPressEnter:function(e){e.preventDefault(),!_&&(0,w.is_valid_email_address)(n)&&P()}}),n&&(0,r.jsx)(l.Z,{disabled:_||!(0,w.is_valid_email_address)(n)||!!S,shape:"round",size:"large",type:"primary",style:{width:"100%",marginTop:"20px"},onClick:P,children:_?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.Icon,{name:"spinner",spin:!0})," Sending password reset email..."]}):n&&(0,w.is_valid_email_address)(n)&&!S?"Send password reset email":"Enter your email address."})]}),S&&(0,r.jsx)(p.Z,{style:{marginTop:"20px"},message:"Error",description:(0,r.jsxs)("div",{style:{fontSize:"12pt"},children:[(0,r.jsx)("b",{children:S}),(0,r.jsx)("br",{})," If you are stuck ",(0,r.jsx)(y.Z,{lower:!0}),"."]}),type:"error",showIcon:!0}),C&&(0,r.jsx)(p.Z,{style:{marginTop:"20px"},message:(0,r.jsx)("b",{children:"Success"}),description:(0,r.jsx)("div",{style:{fontSize:"12pt"},children:C}),type:"success",showIcon:!0})]}),(0,r.jsxs)("div",{style:(0,o.Z)((0,a.Z)({},g.E),{backgroundColor:"white",marginTop:"30px",marginBottom:"30px",paddingTop:"15px"}),children:[(0,r.jsxs)("p",{children:["Remember your password? ",(0,r.jsx)(m.Z,{href:"/auth/sign-in",children:"Sign In"})]}),(0,r.jsxs)("p",{children:["Do not have an account? ",(0,r.jsx)(m.Z,{href:"/auth/sign-up",children:"Sign Up"})]}),"You can also"," ",(0,r.jsxs)(m.Z,{href:"/auth/try",children:["try ",e," without creating an account"]})]})]})}var Z=n(31910),b=n(73306),S=n(31498),k=n(54),E=!0;function C(e){var s=e.customize;return(0,r.jsxs)(k.l,{value:s,children:[(0,r.jsx)(b.Z,{title:"Forgot your Password?"}),(0,r.jsxs)(t.Z,{children:[(0,r.jsx)(S.Z,{page:"sign-in",subPage:"password-reset"}),(0,r.jsxs)(t.Z.Content,{style:{backgroundColor:"white"},children:[(0,r.jsx)(_,{}),(0,r.jsx)(Z.Z,{})]})]})]})}}},function(e){e.O(0,[5386,1271,4089,7731,6747,6994,2231,9066,6735,9774,2888,179],(function(){return s=37101,e(e.s=s);var s}));var s=e.O();_N_E=s}]);