"use strict";(()=>{vare={};e.id=6827,e.ids=[3220,6827],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,r){returnrint?t[r]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,r)):"function"==typeoft&&"default"===r?t:void0}}})},90678:(e,t,r)=>{r.r(t),r.d(t,{config:()=>b,default:()=>v,getServerSideProps:()=>w,getStaticPaths:()=>A,getStaticProps:()=>E,reportWebVitals:()=>N,routeModule:()=>C,unstable_getServerProps:()=>I,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>O,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>k});vars={};r.r(s),r.d(s,{SendPassResetContext:()=>S,default:()=>y,getServerSideProps:()=>P});vara=r(63865),n=r(9455),i=r(30671),o=r(5583),c=r(19796),l=r(8732),u=r(82015),d=r.n(u),p=r(1013),m=r(91258),h=r(16757),f=r(92702),g=r(46169),x=r(90048);let_=(0,r(82544).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);functionj({message:e}){return(0,l.jsxs)("div",{className:"info gray",children:[(0,l.jsx)(_,{}),(0,l.jsx)("span",{className:"font-normal",children:e})]})}letS=d().createContext({});functiony(e){lett="Cloudbased SQL data management system | Datasquirel",r="Datasquirel is a fast and efficient cloud-based SQL data management system that takes away the entire hassle of dealing with data both locally and across different platforms.",s=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t}),(0,l.jsx)("meta",{name:"description",content:r}),(0,l.jsx)(m.A,{pageTitle:t,pageDescription:r,pagePathname:"/"})]}),[a,n]=d().useState(!1),[i,o]=d().useState(!1);return(0,l.jsx)(p.A,{head:s,user:e.user,children:(0,l.jsx)(S.Provider,{value:{user:e.user},children:(0,l.jsx)("main",{children:(0,l.jsxs)("section",{children:[a&&(0,l.jsx)(h.A,{}),i?(0,l.jsx)(x.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,l.jsx)("div",{className:"paper",children:(0,l.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,l.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,l.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,l.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{n(!0),e.preventDefault();lett=e.target["email-address"].value;(0,g.A)(`/api/sendPasswordResetLink?email=${t}`).then(e=>{console.log(e),setTimeout(()=>{n(!1)},500),e.success&&o(!0)})},children:[(0,l.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:e?.user?.logged_in_status?e.user.email:"",required:!0}),(0,l.jsx)("button",{children:"Send password reset Email"}),(0,l.jsx)(j,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}asyncfunctionP({req:e,res:t}){letr=await(0,f.A)(e,t);returnr?.social_login?{redirect:{destination:"/",permanent:!1}}:{props:{user:r}}}letv=(0,i.M)(s,"default"),E=(0,i.M)(s,"getStaticProps"),A=(0,i.M)(s,"getStaticPaths"),w=(0,i.M)(s,"getServerSideProps"),b=(0,i.M)(s,"config"),N=(0,i.M)(s,"reportWebVitals"),k=(0,i.M)(s,"unstable_getStaticProps"),D=(0,i.M)(s,"unstable_getStaticPaths"),O=(0,i.M)(s,"unstable_getStaticParams"),I=(0,i.M)(s,"unstable_getServerProps"),q=(0,i.M)(s,"unstable_getServerSideProps"),C=newa.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/send-password-reset-link",pathname:"/send-password-reset-link",bundlePath:"",filename:""},components:{App:c.default,Document:o.default},userland:s})},90048:(e,t,r)=>{r.d(t,{A:()=>a});vars=r(8732);functiona({message:e,className:t}){return(0,s.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,s.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,s.jsx)("span",{children:e})]})}r(82015)},91258:(e,t,r)=>{r.d(t,{A:()=>i});vars=r(8732),a=r(82015),n=r.n(a);functioni({pageTitle:e,pageDescription:t,pagePathname:r,aceEditor:a}){return(0,s.jsxs)(n().Fra