import{o as s,c as o,w as e,a as n,b as a,u as r,s as m}from"./app-SC54XQDl.js";import{i as h,c}from"./app-Ba7ZqSpq.js";import{m as d,_ as p}from"./app-HITGvrjl.js";import{_ as l}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(){h(this),this.username="",this.password="",this.passwordMd5="",this.encodedFrom=window.encodeURIComponent(this.from),this.isDemo&&(this.username="user",this.password="123456"),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=d(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=c(new f);return(_,b)=>(s(),o(l,null,{default:e(()=>[n("div",u,[a(p,{ctx:r(i)},null,8,["ctx"])])]),_:1}))}};m({app:w,useRouter:!1});
