1import{d as N,u as C,a as F,a3 as m,Y as R,c as l,g as t,e,t as n,q as S,p as w,v as h,m as i,f as T,h as q,j as A,o as d,i as D,s as v,ac as L,_ as M}from"./DFim2bqs.js";import{_ as U}from"./B8-6hX07.js";import{u as j}from"./ZJG1LDfV.js";const E={class:"forgot-page"},Q={key:0,class:"forgot-page__container"},Y={class:"forgot-page__container__form"},z={class:"order-title headlilne"},G={class:"form__item"},H=["placeholder"],J={class:"form__item"},K=["placeholder"],O={key:0,class:"message-info error"},W={key:1,class:"message-info error"},X={key:2,class:"message-info error"},Z={class:"form__btn btn-style",type:"submit"},x={key:1,class:"forgot-page__container"},ss={class:"forgot-page__container__change-success"},es={class:"change-success"},os={class:"change-success-title headlilne"},ts={class:"change-success-subtitle subheadline"},rs=N({__name:"reset",setup(as){const{t:p}=C(),{fields:a,registerField:_,setFieldValue:f,validateField:g,validateAll:y}=j(),{resetPassword:k}=F(),c=v(!1),u=v(!1),b=s=>s.length<6||s.length>32?p("register_short-long-password-error"):null,$=s=>s===a.value.password?.value?null:p("register_match-password-error");_("password","",b),_("confirmPassword","",$);const P=m("token",""),V=m("success","");R(V,s=>{c.value=!!s},{immediate:!0});const B=async()=>{if(u.value=!1,y())try{await k({token:P.value,password:a.value.password.value}),L().push({query:{success:1}})}catch{u.value=!0}};return(s,o)=>{const I=A;return d(),l("main",E,[t(c)?i("",!0):(d(),l("div",Q,[e("div",Y,[e("h1",z,n(s.$t("forgot-password_title")),1),e("form",{novalidate:"true",method:"post",class:"form",onSubmit:S(B,["prevent"])},[e("div",G,[w(e("input",{"onUpdate:modelValue":o[0]||(o[0]=r=>t(a).password.value=r),type:"password",placeholder:s.$t("forgot-password_placeholder1"),onInput:o[1]||(o[1]=r=>t(f)("password",r.target.value)),onBlur:o[2]||(o[2]=r=>t(g)("password"))},null,40,H),[[h,t(a).password.value]])]),e("div",J,[w(e("input",{"onUpdate:modelValue":o[3]||(o[3]=r=>t(a).confirmPassword.value=r),type:"password",placeholder:s.$t("forgot-password_placeholder2"),onInput:o[4]||(o[4]=r=>t(f)("confirmPassword",r.target.value)),onBlur:o[5]||(o[5]=r=>t(g)("confirmPassword"))},null,40,K),[[h,t(a).confirmPassword.value]]),t(a).confirmPassword.error?(d(),l("div",O,[e("p",null,n(s.$t("forgot-password_match-password-error")),1)])):i("",!0),t(a).password.error?(d(),l("div",W,[e("p",null,n(s.$t("forgot-password_short-long-password-error")),1)])):i("",!0),t(u)?(d(),l("div",X,[e("p",null,n(s.$t("forgot-password_invalid-token-error")),1)])):i("",!0)]),e("button",Z,n(s.$t("forgot-password_send-btn")),1)],32)])])),t(c)?(d(),l("div",x,[e("div",ss,[e("div",es,[o[6]||(o[6]=e("div",{class:"change-success-success"},[e("img",{class:"change-success-img",src:U,alt:""})],-1)),e("h1",os,n(s.$t("forgot-password_change-success-title")),1),e("span",ts,n(s.$t("forgot-password_change-success-message")),1),T(I,{class:"btn-style change-success-btn",to:"login"},{default:q(()=>[D(n(s.$t("forgot-password_login-btn")),1)]),_:1})])])])):i("",!0)])}}}),is=M(rs,[["__scopeId","data-v-402ad4b1"]]);export{is 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.