1import{r as u,j as p}from"./react-vendor-BKgfKFZH.js";import{G as f,e as s}from"./graphql-WBhJzdnw.js";import{s as m,a as l}from"./operations-Cnp__Iuy.js";import{a as w,v as d,n as a,w as g}from"./entry-C8wUDEw9.js";import{getPaywallContinuationPath as k}from"./session-B58NCI26.js";import"./makePostHogHeaders-DBJS6Pqp.js";import"./pathPrefix-C6KjWwRj.js";import"./types-BQz_GrV3.js";import"./identity-CPeTn7lB.js";import"./Identity-BmVeq4PW.js";import"./billing-BoSVWj_Q.js";import"./EvalCloneMarker-DcaKrgBx.js";import"./speechToText-BwTQh1Op.js";import"./types-C1NrGZG4.js";function i(t,r,e,o){return g(`${t}${r}${e}`,o)}function E(t,r=window.location.search,e=window.location.hash){if(!(t instanceof f))return"/500";const o=t.errors.find(({extensions:c})=>c?.code==="FORBIDDEN"),n=`/${r}${e}`;return o?.message==="UNVERIFIED"?`/verify?redirectTo=${encodeURIComponent(n)}`:o?.message==="PAYWALL_INCOMPLETE"?k(n):t.status===401||t.status===403||o?`/login${r}${e}`:"/500"}function $(t,r=window.location.search,e=window.location.hash){if(t.lastVisitedWorkspace)return i("/home",r,e,t.lastVisitedWorkspace.url);if(t.currentAgentDefinition){const n=w(t.currentAgentDefinition,null,"tasks");return i(n,r,e,t.currentAgentDefinition.workspace?.url)}const o=t.workspaceMemberships[0]?.workspace;return o?i("/home",r,e,o.url):`/create-workspace${e}`}async function x(t,r){if(!(await s(m)).maybeMe)return`/login${t}${r}`;try{const o=await s(l);return $(o.me,t,r)}catch(o){return E(o,t,r)}}function V(){return u.useEffect(()=>{let t=!1;const r=window.location.search,e=window.location.hash;return d(x(r,e).then(o=>{t||a(o,{replace:!0})},()=>{t||a("/500",{replace:!0})})),()=>{t=!0}},[]),p.jsx("p",{className:"p-6 text-sm text-gray-500",children:"Loadingâ¦"})}export{V as View,$ as getRootDestination,E as getRootErrorDestination};
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.