1import{d as e,u as a,b as s,r as t,o as r,aW as o,c as n,e as l,f as i,y as u,l as c,g as d,t as m,w as p,k as f,i as v,F as y,N as g,L as _,E as x,z as h,M as j}from"./index-b25171b5.js";import{L as k}from"./loading_purple_dot-7ea576c9.js";import{i as w,e as b,s as L,f as S}from"./router_controller-8f776b59.js";import{W as I}from"./warning_svg-fabaa4e8.js";import{c as R}from"./controller-aa1def94.js";import{a as N}from"./aes-6c26aac0.js";import"./plugin-vue_export-helper-1b428a4d.js";import"./lodash-c200b85d.js";import"./aigc-2eb3aff5.js";import"./sha256-a33e07d1.js";import"./___vite-browser-external_commonjs-proxy-ec477302.js";import"./__vite-browser-external-874befbc.js";const q={key:0,class:"w-screen h-screen flex justify-center items-center"},M={class:"h-screen w-full flex justify-center items-center"},A={class:"flex flex-col justify-center space-y-2"},B={class:"flex justify-center"},C={class:"flex flex-col justify-center text-gray-800"},O={class:"flex justify-center text-sm font-medium"},T={class:"flex justify-center text-sm text-gray-800 cursor-pointer"},E=e({__name:"pop_login",props:{guest:{default:!1,type:Boolean}},setup(e){const E=e,F=a(),G=s();t(!1);const U=t();t(!0);const W=t();t(!1),t(),t(),t(""),t(!E.guest),t("");const z=t(""),D=t(!1),H=()=>{z.value="Something went wrong.",D.value=!0};return r((()=>{if(w(G,!0),!G.currentRoute.value.query.key)return void H();G.currentRoute.value.query.bg&&(F.backgroundMode=Number(G.currentRoute.value.query.bg));const e=o(F.domain+F.siteId);let a,s=G.currentRoute.value.query.key;if(s=decodeURIComponent(s),s=N(s,e),""!=s){try{a=JSON.parse(s)}catch(t){return void H()}a.e&&a.p?(U.value=a.e,W.value=a.p,(async()=>{const e={email:U.value,pwd:W.value,site:F.siteId};await g(e).then((e=>{if(0==e.code)z.value="Invalid email or password.",D.value=!0;else if(1==e.code){let a=e.data;F.uid=a.userid+"",F.name=a.name,F.sex=a.sex,F.age=a.age,F.location=a.location,F.signature=a.signature,F.token=a.access_token,F.avatar=a.avatar,F.email=U.value,F.face=a.face,F.hair=a.hair,F.glass=a.glass,F.cloth=a.cloth,F.shoesColor=a.shoes_color,F.token=a.access_token,F.refresh_token=a.refresh_token,F.userType=a.user_type,null!=a.current_avatar_id&&L(a.current_avatar_id,a.readyplayer_id),F.currentAvatarId=a.current_avatar_id,F.readyplayerId=a.readyplayer_id,F.isLogon=1,F.characterSex=1==F.sex?"m":"f",_(),F.isAdmin=F.userType>=90,x({message:"Login successfully.",type:"success"}),F.openLoginPage=!1,S(G)}else z.value="Something went wrong"})).catch((function(e){z.value="Something went wrong"}))})()):a.n&&(U.value=a.n,F.name=U.value,R((e=>{e?(F.characterSex=1==F.sex?"m":"f",F.isLogon=h.GUEST_LOGON,F.uid="guest"+(Math.floor(9e5*Math.random())+1e5),_(),j(),S(G)):(D.value=!0,z.value="Nickname is taken, please try another one.")})))}else H()})),(e,a)=>{const s=n("el-button");return l(),i(y,null,[D.value?c("",!0):(l(),i("div",q,[u(k)])),d("div",M,[d("div",A,[d("div",B,[u(I,{class:"text-red-500"})]),d("div",C,[d("span",O,m(z.value),1)]),d("div",T,[u(s,{onClick:a[0]||(a[0]=e=>v(b)())},{default:p((()=>[f(" Back to home")])),_:1})])])])],64)}}});export{E as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.