import{o,c as s,w as e,a as n,b as a,u as r,s as m}from"./app-BYcXwl4U.js";import{i as c,c as h}from"./app-a6cKceqE.js";import{m as l,_ as p}from"./app-RH_I2L4E.js";import{_ as d}from"./app-Dm_95vqi.js";import"./app-CqkleIqs.js";import"./app-CMBe1IbX.js";import"./app-D5k1HLu9.js";import"./app-DwtlHtUX.js";import"./app-BHl80pFw.js";import"./app-BG60hdvp.js";import"./app-CrjU8lgK.js";import"./app-CQ-vNlMj.js";import"./app-Ufpj4Ll4.js";import"./app-ysQ8KbGS.js";import"./app-BQ5ggxk2.js";import"./app-SxAW7vhf.js";import"./app-D3zbrzdO.js";import"./app-u5shTDG_.js";import"./app-SsPWW0_a.js";import"./app-C14NbwKQ.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});
