(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6827],{7934:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/send-password-reset-link",function(){return t(7569)}])},4179:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(4848);function r(e){let{message:s,className:t}=e;return(0,a.jsxs)("div",{className:"info green"+(t?" "+t:""),children:[(0,a.jsx)("img",{src:"/images/checkmark.svg",alt:"Warning Image Icon",width:22,className:"-my-2"}),(0,a.jsx)("span",{children:s})]})}t(6540)},9625:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var a=t(4848),r=t(3430),n=t(6540);function i(e){var s;let{pageTitle:t,pageDescription:i,pagePathname:l,aceEditor:c}=e,{DSQL_HOST:o}=(null===(s=n.useContext(r.AppContext).pageProps)||void 0===s?void 0:s.appData)||{DSQL_HOST:"https://datasquirel.com"};return(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)("link",{rel:"canonical",href:o+l}),(0,a.jsx)("meta",{property:"og:url",content:o+l}),(0,a.jsx)("meta",{itemProp:"url",content:o+l}),(0,a.jsx)("meta",{name:"twitter:url",content:o+l}),(0,a.jsx)("meta",{property:"og:title",content:t}),(0,a.jsx)("meta",{property:"og:description",content:i}),(0,a.jsx)("meta",{itemProp:"name",content:t}),(0,a.jsx)("meta",{itemProp:"description",content:i}),(0,a.jsx)("meta",{name:"twitter:title",content:t}),(0,a.jsx)("meta",{name:"twitter:description",content:i}),c&&(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js",integrity:"sha512-q6CTB0jS+VuJnSct82rVcWlI06LGzNjaG3CWenHWVUncRvc4UQMFkA3a5Ip880xr+lBx38FcHDclOxPdSg+sBw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"}),(0,a.jsx)("script",{src:"https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js",integrity:"sha512-6g6cvocV7eT/J8L44lL8gJKqq9onqQeYGgJO0DmrsYFcCfRl6wYkYA/KHS768r4QVTB4JxsCcMQ9gIezxpTCZw==",crossOrigin:"anonymous",referrerPolicy:"no-referrer"})]})]})}},7569:(e,s,t)=>{"use strict";t.r(s),t.d(s,{SendPassResetContext:()=>x,__N_SSP:()=>u,default:()=>p});var a=t(4848),r=t(6540),n=t(8883),i=t(9625),l=t(1710),c=t(9020),o=t(4179);let d=(0,t(5737).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"}]]);function m(e){let{message:s}=e;return(0,a.jsxs)("div",{className:"info gray",children:[(0,a.jsx)(d,{}),(0,a.jsx)("span",{className:"font-normal",children:s})]})}var u=!0;let x=r.createContext({});function p(e){var s;let t="Cloudbased SQL data management system | Datasquirel",d="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.",u=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("title",{children:t}),(0,a.jsx)("meta",{name:"description",content:d}),(0,a.jsx)(i.A,{pageTitle:t,pageDescription:d,pagePathname:"/"})]}),[p,h]=r.useState(!1),[j,g]=r.useState(!1);return(0,a.jsx)(n.A,{head:u,user:e.user,children:(0,a.jsx)(x.Provider,{value:{user:e.user},children:(0,a.jsx)("main",{children:(0,a.jsxs)("section",{children:[p&&(0,a.jsx)(l.A,{}),j?(0,a.jsx)(o.A,{message:"Email Sent. Please check your email address and follow the link provided",className:"whitespace-nowrap"}):(0,a.jsx)("div",{className:"paper",children:(0,a.jsxs)("div",{className:"max-w-xl flex-col items-stretch",children:[(0,a.jsx)("h1",{className:"m-0 text-4xl",children:"Send Password Reset Link"}),(0,a.jsx)("span",{children:"Please enter your email address to receive a password reset link"}),(0,a.jsxs)("form",{className:"w-full flex flex-col items-stretch gap-4",onSubmit:e=>{h(!0),e.preventDefault();let s=e.target["email-address"].value;(0,c.A)("/api/sendPasswordResetLink?email=".concat(s)).then(e=>{console.log(e),setTimeout(()=>{h(!1)},500),e.success&&g(!0)})},children:[(0,a.jsx)("input",{type:"text",autoComplete:"email",name:"email-address",id:"email-address",className:"w-full",placeholder:"Email Address",defaultValue:(null==e?void 0:null===(s=e.user)||void 0===s?void 0:s.logged_in_status)?e.user.email:"",required:!0}),(0,a.jsx)("button",{children:"Send password reset Email"}),(0,a.jsx)(m,{message:"Please note that this link will expire after 1 hour"})]})]})})]})})})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(7934)),_N_E=e.O()}]);