import{_ as h}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.9740e649.js";import{C as w}from"./ContentLayout.3ecf07ec.js";import{l as b}from"./fetch.3db27e7c.js";import{d as g,e3 as k,e4 as v,f as C,c as i,w as s,o as c,b as p,a as x,u as d,d2 as _,az as m,Q as I}from"./index.79dc3613.js";import{u as T,E as D}from"./editor.53929e78.js";import{C as L}from"./Card.b1519b39.js";import"./Logo.93621b35.js";import"./userStore.d0fdc011.js";import"./workspaceStore.527cc49d.js";import"./url.c29c9736.js";import"./colorHelpers.473bf6ef.js";import"./linters.a2a3c525.js";import"./asyncComputed.3aa6bfc4.js";import"./TabPane.1571cc7a.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]="3f97d549-4457-4095-aa63-373e8323b658",e._sentryDebugIdIdentifier="sentry-dbid-3f97d549-4457-4095-aa63-373e8323b658")}catch{}})();const N={class:"card-content"},j=g({__name:"Welcome",setup(e){const t=k(),{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 b("/_editor/api/web-editor/welcome",{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)=>(c(),i(w,null,{default:s(()=>[p(d(L),{bordered:!1,class:"card"},{default:s(()=>[x("div",N,[p(h,{style:{"margin-bottom":"10px"}}),l.value?(c(),i(d(_),{key:0},{default:s(()=>[m("Loading...")]),_:1})):(c(),i(d(_),{key:1},{default:s(()=>[m("Authentication failed. You are been redirected...")]),_:1}))])]),_:1})]),_:1}))}});const Y=I(j,[["__scopeId","data-v-0cfdf641"]]);export{Y as default};
//# sourceMappingURL=Welcome.984d39cf.js.map
