1import{d as E,r as u,am as B,w as V,c as o,f as t,q as C,E as M,ah as N,k as c,D as T,aj as j,y as D,_ as b,v as f,a4 as S,e as l}from"./edfHDTum.js";import{_ as z}from"./aDnahbNZ.js";import{u as I}from"./D6I7epYB.js";import{b as P}from"./BfPKaf7i.js";import{a as x}from"./DCi-oGBp.js";import"./BYecEvQY.js";const q={class:"max-sm:w-75 max-md:w-123.25 w-123.25 bg-tropical-blue-200/30 dark:bg-polo-blue-500b p-0 rounded-lg mx-auto"},L={class:"mt-5 mx-auto w-full max-w-sm px-4"},R={class:"relative"},U={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 text-punch-600 dark:text-tamarillo-550 pointer-events-none mt-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},A={key:0,class:"text-base text-punch-600 dark:text-tamarillo-550 text-left"},F=["disabled"],H={key:0,class:"animate-spin h-5 w-5 text-white absolute left-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},$={key:1},G={key:2},J={key:0,class:"text-red-500 dark:text-tamarillo-550"},K=2e3,te=E({__name:"ForgottenPasswordView",setup(O){const{notify:w}=P(),s=u(!1),r=u({email:""}),h=S(),v=u(""),a=u({}),{emailError:n,validateEmail:m}=I(r);let i=null;const d=()=>{i!==null&&(clearTimeout(i),i=null)},k=()=>{n.value=!1,d(),i=setTimeout(()=>{m(),i=null},K)},g=()=>{d(),m()};B(d);const y=async()=>{var p;if(d(),!!m()){s.value=!0;try{(await x.post("/forgot-password",r.value)).status===200&&(w("Password reset instructions have been sent to your email.","success"),await h.push({name:"login"}))}catch(e){x.isAxiosError(e)&&((p=e.response)==null?void 0:p.status)===422&&(a.value=e.response.data.errors)}finally{s.value=!1}}};return V(()=>r.value.email,()=>{delete a.value.email}),(p,e)=>(l(),o("div",q,[t("div",L,[t("form",{class:"space-y-6 text-mirage-950 dark:text-white",onSubmit:M(y,["prevent"])},[e[4]||(e[4]=N('<div class="text-center"><h2 class="mx-auto w-fit text-3xl font-light mb-3 pt-10">Reset password</h2><div class="mx-auto w-55 h-1 bg-blue-ribbon-500 dark:bg-dodger-blue-500 rounded-lg mb-6"></div></div><div class="rounded-md bg-tropical-blue-200/50 dark:bg-pickled-bluewood-800 p-4"><div class="flex"><div class="mt-2 text-sm text-woodsmoke-900 dark:text-white"><p>Enter your Email and instructions will be sent to you!</p></div></div></div>',2)),t("div",null,[e[2]||(e[2]=t("div",{class:"flex items-center justify-between"},[t("label",{for:"email",class:"block text-base font-semibold text-woodsmoke-900 dark:text-white"},"Email")],-1)),t("div",R,[T(t("input",{"onUpdate:modelValue":e[0]||(e[0]=_=>r.value.email=_),id:"email",type:"email",required:"",onInput:k,onBlur:g,class:D(["w-full pl-4 pr-10 mt-2 py-3 placeholder:text-base text-lynch-500 dark:text-gray-chateau-400 placeholder:text-lynch-500 dark:placeholder:text-gray-chateau-400 border bg-white dark:bg-big-stone-950a rounded-lg focus:outline-none autofill:shadow-[inset_0_0_0px_1000px_var(--color-white)]! dark:autofill:shadow-[inset_0_0_0px_1000px_var(--color-big-stone-950a)]! autofill:[-webkit-text-fill-color:var(--color-gray-chateau-500)] dark:autofill:[-webkit-text-fill-color:var(--color-link-water-200)]",b(n)||a.value.email?"border-punch-600 focus:border-punch-600 dark:border-tamarillo-550 dark:focus:border-tamarillo-550":"border-tropical-blue-200 dark:border-lynch-500 focus:border-blue-ribbon-500 dark:focus:border-dodger-blue-430"])},null,34),[[j,r.value.email]]),b(n)||a.value.email?(l(),o("svg",U,[...e[1]||(e[1]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M12 5a7 7 0 1 1 0 14a7 7 0 0 1 0-14z"},null,-1)])])):c("",!0)]),b(n)||a.value.email?(l(),o("p",A,f(a.value.email?a.value.email[0]:"Invalid email address."),1)):c("",!0)]),t("div",null,[t("button",{type:"submit",disabled:s.value,class:"cursor-pointer relative flex w-full justify-center rounded-lg bg-blue-ribbon-500 dark:bg-dodger-blue-430 hover:opacity-90 px-3 py-1.5 text-sm/6 font-semibold text-white shadow-sm disabled:opacity-60"},[s.value?(l(),o("svg",H,[...e[3]||(e[3]=[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):c("",!0),s.value?(l(),o("span",G,"Logging inâ¦")):(l(),o("span",$,"Submit"))],8,F)]),v.value?(l(),o("p",J,f(v.value),1)):c("",!0)],32)]),C(z)]))}});
1export{te 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.