import{_ as y}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as C,d as $,e as p,f,h as E,j as B}from"./index-BTglIPU2.js?v=1773287522785";import{_ as S}from"./index.vue_vue_type_script_setup_true_lang-DG86e1NA.js?v=1773287522785";import{a1 as T,b as j,B as N,s as c}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as R,R as U,r as V,e as F,$ as I,Z as L,_ as i,aa as u,a0 as e,a9 as r,S as t,j as m,a2 as q,F as z}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";const D={class:"flex-center flex-col pt-8%"},O={class:"pt-44px"},Z={class:"mb-24px text-center text-20p"},A={class:"flex justify-end mt-16px"},Y=R({__name:"index",setup(G){const{t:a}=U(),_=V(null),s=F({password1:"",password2:"",userpassword:""}),g={password1:{trigger:["blur","input"],validator:()=>c(s.password1)?new Error(a("Config.Panel.index_67")):s.password1.length<6?new Error(a("Password.index_6")):!0},password2:{trigger:["blur","input"],validator:()=>c(s.password2)?new Error(a("Config.Panel.index_69")):s.password1!==s.password2?new Error(a("Config.Panel.index_70")):!0},userpassword:{trigger:["blur","input"],required:!0,message:a("Config.Panel.index_67")}},x=async()=>{var o;await((o=_.value)==null?void 0:o.validate()),await $({password1:p(s.password1),password2:p(s.password2),userpassword:p(s.userpassword)}),f("/login?dologin=True",1500)},v=()=>{E({title:a("Password.index_7"),content:()=>e(z,null,[e(q,{tag:"div",scope:"global",keypath:"Password.index_8"},{text_1:()=>e("span",{class:"text-error"},[a("Password.index_9")])})]),onConfirm:async()=>{await B(),f("/login?dologin=True",1500)}})};return(o,n)=>{const w=j,l=T,h=S,P=N,b=C,k=y;return I(),L("div",D,[i("div",O,[i("h3",Z,u(o.$t("Password.index_1")),1)]),e(k,{ref_key:"formRef",ref:_,model:t(s),rules:g,size:"large",class:"w-500px p-32px pt-0"},{default:r(()=>[e(l,{path:"userpassword"},{default:r(()=>[e(w,{value:t(s).userpassword,"onUpdate:value":n[0]||(n[0]=d=>t(s).userpassword=d),placeholder:o.$t("Old Password")},null,8,["value","placeholder"])]),_:1}),e(l,{path:"password1"},{default:r(()=>[e(h,{value:t(s).password1,"onUpdate:value":n[1]||(n[1]=d=>t(s).password1=d),length:10,default:!1,placeholder:o.$t("Password.index_2")},null,8,["value","placeholder"])]),_:1}),e(l,{path:"password2"},{default:r(()=>[e(w,{value:t(s).password2,"onUpdate:value":n[2]||(n[2]=d=>t(s).password2=d),placeholder:o.$t("Password.index_3")},null,8,["value","placeholder"])]),_:1}),e(l,{"show-feedback":!1},{default:r(()=>[e(P,{type:"primary",block:"",onClick:x},{default:r(()=>[m(u(o.$t("Password.index_4")),1)]),_:1})]),_:1}),i("div",A,[e(b,{onClick:v},{default:r(()=>[m(u(o.$t("Password.index_5")),1)]),_:1})])]),_:1},8,["model"])])}}});export{Y as default};
