1import{bY as b,b5 as u,aL as g}from"#entry";import{u as y,_ as w}from"./BehcRoRw.js";import{d as v,r as A,o as k,e as E,E as T,a8 as d,V as S,ac as I,I as x,a2 as D}from"./BQmUMq8P.js";import"./DJlyOly4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"6be9758297c19841282f0f2f141a80fdd4e83eee"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="61cdecf8-577b-43c4-ba03-ad50799b2121",e._sentryDebugIdIdentifier="sentry-dbid-61cdecf8-577b-43c4-ba03-ad50799b2121")}catch{}})();const L={class:"min-h-screen flex items-center justify-center"},P={class:"text-center"},R={class:"text-gray-400 mt-4"},$=v({name:"AuthCallback",__name:"callback",setup(e){const{isAuthenticated:n,isLoading:s,getAccessTokenSilently:f}=y(),_=g(),i=A(null);async function h(){try{const t=await f();await $fetch(`${_.public.apiUrl}/auth/complete-login`,{method:"POST",headers:{Authorization:`Bearer ${t}`}})}catch{}}return k(async()=>{try{const{useAuth0:t}=await b(async()=>{const{useAuth0:o}=await import("#entry").then(r=>r.dK);return{useAuth0:o}},[],import.meta.url),{handleRedirectCallback:l}=t();let a="/";const c=window.location.search;(c.includes("code=")||c.includes("error="))&&c.includes("state=")&&(a=(await l())?.appState?.target||"/"),s.value&&await new Promise(o=>{const r=E(()=>s.value,m=>{m||(r(),o())},{immediate:!0})}),n.value&&await h();const p=a.startsWith("/")&&!a.startsWith("//")?a:"/";await u(p,{replace:!0})}catch(t){i.value="Authentication failed. Please try again.",console.error("Auth callback error:",t),setTimeout(()=>u("/",{replace:!0}),3e3)}}),(t,l)=>{const a=w;return D(),T("div",L,[d("div",P,[S(a),d("p",R,I(x(i)||"Signing you in..."),1)])])}}});export{$ 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.