1import{X as y,a0 as b,a1 as v,a2 as T,p as k,a3 as S,a4 as h,a5 as w,a6 as x,a7 as P,F as C,a8 as B,a9 as L,_ as A}from"./D6XFxYpn.js";import{a as _,q as M,b4 as R,b as W,t as l,J as q,K as f,z as s,u as n,v as c,V as E,L as D}from"./FG3sOvf_.js";import{t as F}from"./bbFwqRBI.js";import"./Dqk4CETw.js";import"./EmyEphOG.js";import"./Bc18GOEc.js";import"./R4D7s-wa.js";import"./IUV4UvVq.js";function I(){const t=_("booting"),e=_(""),i=_(!1),u=y();async function g(){if(i.value)return!1;const a=T();if(!a)return t.value="not_mini_app",!1;i.value=!0,t.value="signing_in",e.value="";try{const o=await F.loginWebapp({init_data:a},{headers:{"X-Client-Type":"tg"}});if(o.code===10003)return t.value="disabled",e.value="This account has been disabled",!1;const r=o.data;if(o.code!==200||!(r!=null&&r.access_token))return t.value="failed",e.value="Sign in failed. Please retry.",!1;await k(r),S(),t.value="success";const m=h(w(u.query,x(P())));return await C({path:m.path,query:m.query},{replace:!0}),!0}catch(o){return t.value="failed",e.value="Sign in failed. Please retry.",!1}finally{i.value=!1}}async function d(){t.value="booting",await b(800),v(),await g()}async function p(){await g()}return{status:t,errorMessage:e,pending:i,start:d,retry:p}}const V={class:"tg-landing"},N={key:0,class:"tg-landing__text"},O={key:1,class:"tg-landing__block"},Q=["disabled"],X={key:2,class:"tg-landing__block"},z={class:"tg-landing__text"},G={key:3,class:"tg-landing__block"},H=M({__name:"tg",setup(t){R({title:"Telegram",meta:[{name:"robots",content:"noindex, nofollow"}],script:[{src:L,defer:!0}]});const{status:e,errorMessage:i,pending:u,start:g,retry:d}=I();return W(()=>{g()}),(p,a)=>{const o=B;return l(),q(o,null,{fallback:f(()=>[...a[3]||(a[3]=[s("div",{class:"tg-landing"},[s("p",{class:"tg-landing__text"},"Signing you in...")],-1)])]),default:f(()=>[s("div",V,[n(e)==="booting"||n(e)==="signing_in"?(l(),c("p",N," Signing you in... ")):n(e)==="failed"?(l(),c("div",O,[a[1]||(a[1]=s("p",{class:"tg-landing__text"},"Sign in failed. Please retry.",-1)),s("button",{type:"button",class:"tg-landing__btn",disabled:n(u),onClick:a[0]||(a[0]=(...r)=>n(d)&&n(d)(...r))}," Retry ",8,Q)])):n(e)==="disabled"?(l(),c("div",X,[s("p",z,E(n(i)||"This account has been disabled"),1)])):n(e)==="not_mini_app"?(l(),c("div",G,[...a[2]||(a[2]=[s("h1",{class:"tg-landing__title"},"Please open from Telegram Bot",-1),s("p",{class:"tg-landing__text"},"This page only works inside Telegram.",-1),s("a",{class:"tg-landing__btn",href:"https://deepswapface.ai/"}," Back to DeepSwapFace.ai ",-1)])])):D("",!0)])]),_:1})}}}),ae=A(H,[["__scopeId","data-v-203e1423"]]);export{ae 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.