import{o,c as s,w as e,a as n,b as a,u as r,s as m}from"./app-SC54XQDl.js";import{i as c,c as h}from"./app-Ba7ZqSpq.js";import{m as l,_ as p}from"./app-HITGvrjl.js";import{_ as d}from"./app-vNuZ2BVW.js";import"./app-CqkleIqs.js";import"./app-iiAIFCF5.js";import"./app-Dw0jKdCD.js";import"./app-FlPLZh9D.js";import"./app-DZaelcLs.js";import"./app-PPG0ZS4d.js";import"./app-CNHjdV6U.js";import"./app-DFulsyXy.js";import"./app-CVQkwzlf.js";import"./app-DnXuoh8P.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-DyP4Nide.js";import"./app-CDCZqmkG.js";import"./app-Bt2pXSov.js";function f(){c(this),this.encodedFrom=window.encodeURIComponent(this.from),this.showOTP=!1,this.isSubmitting=!1,this.$delay(function(){this.changePassword()}),this.usernamePlaceholder="请输入用户名";var t=[];this.emailCanLogin&&t.push("邮箱"),this.mobileCanLogin&&t.push("手机号码"),t.length>0&&(this.usernamePlaceholder+="/"+t.join("/")),this.changeUsername=function(){},this.changePassword=function(){this.passwordMd5=l(this.password.trim())},this.moreOptionsVisible=!1,this.showMoreOptions=function(){this.moreOptionsVisible=!this.moreOptionsVisible},this.submitBefore=function(){this.isSubmitting=!0},this.submitDone=function(){this.isSubmitting=!1},this.submitSuccess=function(i){localStorage.setItem("sid",i.data.localSid),localStorage.setItem("ip",i.data.ip),this.$delay(function(){if(i.data.requireOTP){window.location="/login/otp?sid="+i.data.sid+"&remember="+(i.data.remember?1:0)+"&from="+window.encodeURIComponent(this.from);return}this.from.length==0?window.location="/dashboard":window.location=this.from})}}const u={class:"form-box"},w={__name:"index",setup(t){const i=h(new f);return(_,b)=>(o(),s(d,null,{default:e(()=>[n("div",u,[a(p,{ctx:r(i)},null,8,["ctx"])])]),_:1}))}};m({app:w,useRouter:!1});
