1import{c as f,b as v,d as b,e as j,f as l,n as y,v as C,z as d,w as _,u as N,a as S,r as w,j as s,i as F,I as h,F as m,h as u,k as g}from"./index-Az_DQIbU.js";const k="_container_rvwcc_11",I="_resetPasswordBox_rvwcc_28",V="_logo_rvwcc_40",E="_title_rvwcc_49",B="_rtl_rvwcc_100",t={container:k,resetPasswordBox:I,logo:V,title:E,rtl:B},$=()=>{const n=f(),r=v();return{changePasswordFormik:b({initialValues:{password:"",cpassword:""},validationSchema:j({password:l().trim().min(8,"Must be 8 or more than 8 characters").required("Password field is Required").matches(/\w/,"Please enter valid password"),cpassword:l().trim().min(8,"Must be 8 or more than 8 characters").required("Confirm Password field is Required").oneOf([y("password")],"Passwords must match").matches(/\w/,"Please enter valid password")}),onSubmit:async c=>{const i={password:c.password};try{const a=await C(i);a&&(d.success(a.message||"Password has been changed successfully"),r(_()),localStorage.clear(),n("/login"))}catch(a){d.error("An error occurred while changeting the password."+a)}}})}};function q(){const{lang:n}=N(o=>o.langSlice),{t:r}=S(),{changePasswordFormik:e}=$(),[c,i]=w.useState(!1),[a,p]=w.useState(!1),x=()=>{i(o=>!o)},P=()=>{p(o=>!o)};return s.jsx("div",{className:`${t.container} ${n==="fa"?t.rtl:""}`,children:s.jsxs("div",{className:t.resetPasswordBox,children:[s.jsx("div",{className:t.logo,children:s.jsx("img",{src:F.logo,alt:"logo"})}),s.jsx("h2",{className:t.title,style:{textAlign:"center"},children:r("Change Password")}),s.jsxs("form",{id:"resetpassword",className:"login-form ",onSubmit:e.handleSubmit,children:[s.jsx("div",{className:"formgrp",children:s.jsx(h,{classes:"passwordlabel",type:c?"text":"password",id:"Password",placeholder:r("Enter your password"),name:"password",onChange:e.handleChange,value:e.values.password,errorMsg:e.errors.password,rightIcon:s.jsx(m,{icon:c?u:g,onClick:x,style:{cursor:"pointer"}})})}),s.jsx("div",{className:"formgrp",children:s.jsx(h,{classes:"passwordlabel",type:a?"text":"password",id:"Cpassword",placeholder:r("Enter your confirm password"),name:"cpassword",onChange:e.handleChange,value:e.values.cpassword,errorMsg:e.errors.cpassword,rightIcon:s.jsx(m,{icon:a?u:g,onClick:P,style:{cursor:"pointer"}})})}),s.jsx("button",{type:"submit",className:"custom-button mt-30",children:r("Update")})]})]})})}function M(){return s.jsx("section",{className:"resetPasswordpage",children:s.jsx(q,{})})}export{M 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.