1import{c as i,d as e,Q as x,f as u,N as f,aq as v,r as m,z as p,t as d,o as n,a2 as y}from"./K1b_ijTh.js";const g={class:"flex min-h-full flex-1 flex-col justify-center py-12 sm:px-6 lg:px-8"},w={class:"mt-3 sm:mx-auto sm:w-full sm:max-w-[480px]"},h={class:"bg-white px-6 py-12 shadow sm:rounded-lg sm:px-12"},_={class:"mb-4"},b={class:"mt-2"},k={key:0,class:"text-red-500 text-sm mt-1"},A={key:0,class:"mb-4 text-red-500 text-sm"},E={key:1,class:"mb-4 text-green-500 text-sm"},q={__name:"reset",setup(S){const l=m(""),t=m({email:"",general:""}),o=m(""),c=async()=>{if(t.value={email:"",general:""},o.value="",!l.value){t.value.email="Email is required.";return}try{const{data:r,error:s}=await y("/api/auth/password/reset",{method:"POST",body:{email:l.value}},"$k_2d2_ocGj");if(s.value){const a=s.value.data?.data;a&&a?.email?t.value.email=Array.isArray(a.email)?a.email.join(" "):a.email:t.value.general="An error occurred while sending the reset email.";return}r.value?.detail?(o.value=r.value.detail,l.value=""):t.value.general="Something went wrong, please try again."}catch(r){console.error(r),t.value.general="An unexpected error occurred."}};return(r,s)=>(n(),i("div",g,[s[3]||(s[3]=e("div",{class:"sm:mx-auto sm:w-full sm:max-w-md"},[e("h2",{class:"mt-6 text-center text-2xl font-bold tracking-tight text-gray-900"}," Reset Your Password "),e("p",{class:"mt-3 text-center text-sm text-gray-600"}," Enter your email address and weâll send you a link to reset your password. ")],-1)),e("div",w,[e("div",h,[e("form",{onSubmit:x(c,["prevent"])},[e("div",_,[s[1]||(s[1]=e("label",{for:"email",class:"block text-sm font-medium text-gray-900"}," Email Address ",-1)),e("div",b,[f(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>l.value=a),type:"email",name:"email",id:"email",autocomplete:"email",required:"",class:p([{"border-red-500":t.value.email},"block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:outline-primary sm:text-sm"])},null,2),[[v,l.value]])]),t.value.email?(n(),i("span",k,d(t.value.email),1)):u("",!0)]),t.value.general?(n(),i("div",A,d(t.value.general),1)):u("",!0),o.value?(n(),i("div",E,d(o.value),1)):u("",!0),s[2]||(s[2]=e("div",{class:"pt-4"},[e("button",{type:"submit",class:"flex w-full justify-center rounded-md bg-primary px-3 py-1.5 text-sm font-semibold text-white shadow-sm focus:outline focus:outline-2 focus:outline-offset-2"}," Send Reset Link ")],-1))],32)])])]))}};export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.