import{y as s,H as a,v as e,I as t,p as r,J as i,b as l,u as o,K as n,L as c,_ as d}from"./utils-lib.js?v=1761009159";import{F as m,a as p,b as u}from"./form-item.js?v=1761009159";import{o as g,c as w,g as f,q as b,x as h,e as x,y,L as _,C as j,F as v,v as k}from"./base-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const{load:q,request:C}=l(),H=g({password1:"",password2:""}),F=async()=>{let s=q("正在设置面板密码，请稍候...");try{const s=await a({password1:e(H.password1),password2:e(H.password2)});return C(s),s.status&&t("/login?dologin=True",1500),s.status}catch(r){}finally{s.close()}},L=()=>{H.password1=s(10)},I=async()=>{try{await r({icon:"warning-filled",title:"危险操作",isHtml:!0,content:'延用上次密码会降低面板的<span class="text-danger">安全性</span>，是否继续操作？'});const s=await i();C(s),window.location.href="/"}catch(s){}},z=d(w({__name:"index",setup(s){const{mainHeight:a}=o(),e=f(()=>[m(()=>x("div",{class:"text-center !mb-[22px] flex justify-center"},[x("h3",{class:"text-extraLarge font-bold text-default inline-block mr-2 mt-12px"},[j("当前面板密码已过期，请立即修改密码！")])])),p("新的密码","password1",{icon:"el-refresh",iconClick:L,attrs:{placeholder:"请输入新的密码",style:{width:"32rem"}},rules:[{required:!0,message:"请输入新的密码",trigger:["blur","change"]},{min:6,message:"密码长度必须大于5位",trigger:["blur","change"]}]}),u("确认密码","password2",{attrs:{placeholder:"重复输入密码，确认新的密码",style:{width:"32rem"}},rules:[{required:!0,message:"请再次输入密码",trigger:["blur","change"]},{validator:(s,a,e)=>{a!==H.password1?e(new Error("两次输入密码不一致")):e()},trigger:["blur","change"]}]}),m(()=>x(v,null,[x(c,{class:"w-[100%] mt-[1.2rem]",type:"primary",onClick:F},{default:()=>[j("修改密码")]}),x("div",{class:"flex justify-end mt-1rem"},[x("span",{class:"bt-link",onClick:I},[j("延用上一次密码")])])]))]),{BtForm:t}=n({data:()=>H,options:e,submit:async(s,a)=>(await a(),F())});return b(L),(s,e)=>(k(),h("div",{class:"flex flex-col items-center mt-[8%]",style:_({"min-height":y(a)-200+"px"})},[x(y(t),{size:"default",class:"bind-user-info w-[44rem] bind-form"})],4))}}),[["__scopeId","data-v-e12eab93"]]);export{z as default};
