import{e as _,aj as g,r as y,W as m,f as b,g as n,n as d,w as s,v as l,p as a,T as w,q as f,t as u,B as v,l as p,H as h,b8 as k,aP as x}from"./jwt-decode.esm-CuqABuF0.js";import{u as R}from"./organizationSwitcher-C3nwECnr.js";import"./router-C-Pd0gHD.js";import"./ts.worker-D20Caz_K.js";import"./organization-CFugdneJ.js";import"./tables-BHu5fUrG.js";import"./string-CcKlk4eJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="ec7b7691-df6d-4395-a20a-fe819556d7b1",e._sentryDebugIdIdentifier="sentry-dbid-ec7b7691-df6d-4395-a20a-fe819556d7b1")}catch{}})();const D={class:"loading-container"},I=_({__name:"RootRedirector",setup(e){const r=R(),i=g(),o=y(null);async function c(){o.value=null;try{const t=await r.selectDefaultOrganization();t.name==="onboarding"?window.location.href="/onboarding":i.replace(t)}catch(t){o.value=p.translate("i18n_projectsview_loading_error"),console.error("RootRedirector failed:",t)}}return m(c),(t,B)=>(n(),b("div",D,[o.value?(n(),d(a(h),{key:0,vertical:"",align:"center",gap:16},{default:s(()=>[l(a(w),{type:"danger"},{default:s(()=>[f(u(o.value),1)]),_:1}),l(a(v),{type:"primary",onClick:c},{default:s(()=>[f(u(a(p).translate("i18n_projectsview_retry")),1)]),_:1})]),_:1})):(n(),d(a(k),{key:1,size:"large"}))]))}}),O=x(I,[["__scopeId","data-v-c1eea334"]]);export{O as default};
//# sourceMappingURL=RootRedirector-BZcxrY9A.js.map
