import{_ as b}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.62cc75bb.js";import{C as h}from"./ContentLayout.ab469395.js";import{l as k}from"./fetch.e588e7da.js";import{d as w,e3 as g,e4 as v,f as C,c,w as s,o as i,b as p,a as x,u as d,d2 as _,az as m,Q as I}from"./index.f8cd7fc7.js";import{u as T,E as D}from"./editor.a8449fec.js";import{C as L}from"./Card.1e7a4e39.js";import"./Logo.4e3c3806.js";import"./userStore.d326fa43.js";import"./workspaceStore.ad71991a.js";import"./url.f92805c8.js";import"./colorHelpers.58a1d2b7.js";import"./linters.9e909d26.js";import"./asyncComputed.57e338d8.js";import"./TabPane.aa07834e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b9eb8f83-16ad-46c2-8c26-da4c6fc8b145",e._sentryDebugIdIdentifier="sentry-dbid-b9eb8f83-16ad-46c2-8c26-da4c6fc8b145")}catch{}})();const N={class:"card-content"},j=w({__name:"Welcome",setup(e){const t=g(),{query:n}=v(),a=T();a.loadLogin();const l=C(!0),u=async()=>{l.value=!1,setInterval(()=>{var o;return window.location.replace(((o=a==null?void 0:a.links)==null?void 0:o.project)||D.consoleUrl)},5e3)};return(async()=>{const o=n.token,r=n.redirect,f=await k("/_editor/auth/set-cookie",{method:"POST",body:JSON.stringify({token:o}),headers:{"Content-Type":"application/json"}});if(!f.ok)return u();const{ok:y}=await f.json();if(!y)return u();r?await t.push({path:r}):await t.push({name:"workspace"})})(),(o,r)=>(i(),c(h,null,{default:s(()=>[p(d(L),{bordered:!1,class:"card"},{default:s(()=>[x("div",N,[p(b,{style:{"margin-bottom":"10px"}}),l.value?(i(),c(d(_),{key:0},{default:s(()=>[m("Loading...")]),_:1})):(i(),c(d(_),{key:1},{default:s(()=>[m("Authentication failed. You are been redirected...")]),_:1}))])]),_:1})]),_:1}))}});const Y=I(j,[["__scopeId","data-v-ba310460"]]);export{Y as default};
//# sourceMappingURL=Welcome.36e98241.js.map
