module.exports=[52100,a=>{"use strict";var b=function(){return(b=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c])Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,a.s(["__assign",()=>b,"__awaiter",0,function(a,b,c,d){return new(c||(c=Promise))(function(e,f){function g(a){try{i(d.next(a))}catch(a){f(a)}}function h(a){try{i(d.throw(a))}catch(a){f(a)}}function i(a){var b;a.done?e(a.value):((b=a.value)instanceof c?b:new c(function(a){a(b)})).then(g,h)}i((d=d.apply(a,b||[])).next())})},"__rest",0,function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},"__spreadArray",0,function(a,b,c){if(c||2==arguments.length)for(var d,e=0,f=b.length;e<f;e++)!d&&e in b||(d||(d=Array.prototype.slice.call(b,0,e)),d[e]=b[e]);return a.concat(d||Array.prototype.slice.call(b))}])},31916,a=>{"use strict";var b=a.i(87924),c=a.i(97895),d=a.i(69240),e=a.i(40695),f=a.i(3130),g=a.i(5522),h=a.i(17171),i=a.i(50944),j=a.i(72131);a.s(["UpdatePasswordForm",0,function({className:a,...k}){let[l,m]=(0,j.useState)(""),[n,o]=(0,j.useState)(null),[p,q]=(0,j.useState)(!1),r=(0,i.useRouter)(),s=async a=>{a.preventDefault();let b=(0,d.createClient)();q(!0),o(null);try{let{error:a}=await b.auth.updateUser({password:l});if(a)throw a;r.push("/protected")}catch(a){o(a instanceof Error?a.message:"An error occurred")}finally{q(!1)}};return(0,b.jsx)("div",{className:(0,c.cn)("flex flex-col gap-6",a),...k,children:(0,b.jsxs)(f.Card,{children:[(0,b.jsxs)(f.CardHeader,{children:[(0,b.jsx)(f.CardTitle,{className:"text-2xl",children:"Reset Your Password"}),(0,b.jsx)(f.CardDescription,{children:"Please enter your new password below."})]}),(0,b.jsx)(f.CardContent,{children:(0,b.jsx)("form",{onSubmit:s,children:(0,b.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,b.jsxs)("div",{className:"grid gap-2",children:[(0,b.jsx)(h.Label,{htmlFor:"password",children:"New password"}),(0,b.jsx)(g.Input,{id:"password",type:"password",placeholder:"New password",required:!0,value:l,onChange:a=>m(a.target.value)})]}),n&&(0,b.jsx)("p",{className:"text-sm text-red-500",children:n}),(0,b.jsx)(e.Button,{type:"submit",className:"w-full",disabled:p,children:p?"Saving...":"Save new password"})]})})})]})})}])}];

//# sourceMappingURL=_0_3c09j._.js.map