PageSourceSearch

https://thumio.com/assets/InviteLandingPage-Dc3UiVoU.js

js thumio.com collected 2026-10-02 00:09:14 UTC 9,153 bytes, 6 lines download raw bytes

1import{f as J,u as G,R as l,j as e,L as A}from"./react-vendor-DvpaPdNC.js";import{c as U,j as Y,k as Q,e6 as W,e7 as m,f as h,v as C,d8 as z,b6 as H,E as V,b2 as q,e8 as D}from"./index-CC9uFMyS.js";import{s as K,c as w,f as X}from"./useMyInvites-m3BWcjhE.js";import{C as Z}from"./circle-check-BQuSVKna.js";import"./firebase-C-c4J6sC.js";import"./motion-CVWa5O5W.js";/**
2 * @license lucide-react v0.548.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ee=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],L=U("shield-alert",ee),te={editor:"Editor",admin:"Admin",owner:"Owner"},se=[{icon:z,title:"Shared credit pool",detail:"Every edit bills the team, one bill for everyone"},{icon:H,title:"Shared team studio",detail:"Projects, versions, and assets in one place"},{icon:V,title:"Full editing power",detail:"AI edits, recipes, and tools from day one"}],j=({children:i})=>e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -inset-10 rounded-[48px] bg-rh-green/[0.07] blur-3xl"}),e.jsx("div",{className:"relative overflow-hidden rounded-3xl border border-white/10 bg-rh-surface/95 shadow-neon-card backdrop-blur",children:i})]}),v=()=>e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-ink/40 shadow-lg ring-1 ring-white/10",children:e.jsx(q,{outfit:"base",showTrail:!1,width:40,height:40})}),o=({onClick:i,to:n,disabled:s,children:u})=>{const c="inline-flex w-full items-center justify-center gap-2 rounded-xl bg-white px-5 py-3.5 text-sm font-semibold text-black shadow-[0_8px_30px_-12px_rgba(255,255,255,0.4)] transition-all hover:bg-white/90 active:scale-[0.99] disabled:opacity-50 disabled:cursor-not-allowed";return n?e.jsx(A,{to:n,className:c,children:u}):e.jsx("button",{type:"button",onClick:i,disabled:s,className:c,children:u})},oe=()=>{var E;const{token:i}=J(),n=G(),{user:s,loading:u}=Y(),{studios:c}=Q(),[t,$]=l.useState(null),[N,g]=l.useState("loading"),[y,k]=l.useState(null),[p,I]=l.useState(!1),[d,_]=l.useState(null);l.useEffect(()=>{if(!d)return;if(c.some(r=>r.id===d)){n(`/studio/${d}`,{replace:!0});return}const a=window.setTimeout(()=>{n(`/studio/${d}`,{replace:!0})},15e3);return()=>window.clearTimeout(a)},[d,c,n]);const B=i?`/invite/${i}`:"/",f=`?redirect=${encodeURIComponent(B)}`,b=t!=null&&t.email?`${f}&email=${encodeURIComponent(t.email)}`:f;l.useEffect(()=>{if(!i){g("invalid");return}let a=!1;return(async()=>{try{const r=await W(i);if(a)return;r.status==="pending"?K(i):w(),$(r),g("ready")}catch{a||(w(),g("invalid"))}})(),()=>{a=!0}},[i]);const P=async()=>{if(!(!i||!s||p)){I(!0),k(null);try{const a=await D(i);w(),a.defaultStudioId?_(a.defaultStudioId):n("/",{replace:!0})}catch(a){k(X(a)),I(!1)}}},x={contentClassName:"flex min-h-screen items-center justify-center px-4 py-16",showGridOverlay:!0,gradientOverlayClassName:"bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-rh-green/5 via-transparent to-transparent"};if(N==="loading"||u)return e.jsxs(m,{...x,children:[e.jsx(h,{title:"Team Invite - Thumio",description:"Loading invite...",noindex:!0}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-rh-text-dark",children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Loading invite..."]})]});if(N==="invalid"||!t)return e.jsxs(m,{...x,children:[e.jsx(h,{title:"Invalid Invite - Thumio",description:"This invite link is invalid or has been revoked.",noindex:!0}),e.jsx(j,{children:e.jsxs("div",{className:"px-8 py-12 text-center",children:[e.jsx(v,{}),e.jsx(L,{className:"mx-auto mt-6 h-8 w-8 text-rh-text-dark"}),e.jsx("h1",{className:"mt-4 text-2xl font-bold text-white",children:"This invite is not valid"}),e.jsx("p",{className:"mt-3 text-sm leading-relaxed text-rh-text-dark",children:"The link may have expired or been revoked. Ask the team owner to send a new invite."}),e.jsx("div",{className:"mt-8",children:e.jsx(o,{to:"/",children:"Go home"})})]})})]});if(t.status==="expired"||t.status==="revoked"||t.status==="declined")return e.jsxs(m,{...x,children:[e.jsx(h,{title:"Expired Invite - Thumio",description:"This invite link has expired.",noindex:!0}),e.jsx(j,{children:e.jsxs("div",{className:"px-8 py-12 text-center",children:[e.jsx(v,{}),e.jsx(L,{className:"mx-auto mt-6 h-8 w-8 text-amber-300"}),e.jsx("h1",{className:"mt-4 text-2xl font-bold text-white",children:t.status==="revoked"?"This invite was revoked":t.status==="declined"?"This invite was declined":"This invite has expired"}),e.jsxs("p",{className:"mt-3 text-sm leading-relaxed text-rh-text-dark",children:["Ask the team owner to send a new invite to join ",t.teamName,"."]}),e.jsx("div",{className:"mt-8",children:e.jsx(o,{to:"/",children:"Go home"})})]})})]});if(t.status==="accepted")return e.jsxs(m,{...x,children:[e.jsx(h,{title:"Invite Accepted - Thumio",description:"You already accepted this invite.",noindex:!0}),e.jsx(j,{children:e.jsxs("div",{className:"px-8 py-12 text-center",children:[e.jsx(v,{}),e.jsx(Z,{className:"mx-auto mt-6 h-8 w-8 text-rh-green"}),e.jsx("h1",{className:"mt-4 text-2xl font-bold text-white",children:"You are already on this team"}),e.jsx("p",{className:"mt-3 text-sm text-rh-text-dark",children:s?`Open ${t.teamName}.`:`Sign in to open ${t.teamName}.`}),e.jsx("div",{className:"mt-8",children:e.jsx(o,{to:s?`/settings/team?team=${t.teamId}`:`/login${f}`,children:s?"Open team settings":"Sign in"})})]})})]});const S=((E=s==null?void 0:s.email)==null?void 0:E.toLowerCase())??"",T=t.email.toLowerCase(),O=!!(s&&S===T),R=!!(s&&S!==T),F=te[t.role]??t.role;return e.jsxs(m,{...x,children:[e.jsx(h,{title:`Join ${t.teamName} - Thumio`,description:`Accept your invite to join ${t.teamName} on Thumio.`,noindex:!0}),e.jsxs(j,{children:[e.jsxs("div",{className:"border-b border-white/5 bg-gradient-to-b from-white/[0.05] to-transparent px-8 pb-8 pt-10 text-center",children:[e.jsx(v,{}),e.jsx("p",{className:"mt-6 text-[11px] font-semibold uppercase tracking-[0.35em] text-rh-text-dark",children:"You are invited to join"}),e.jsx("h1",{className:"mt-2 text-3xl font-bold text-white sm:text-4xl",children:t.teamName}),e.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 text-sm text-rh-text-dark",children:[e.jsxs("span",{className:"inline-flex shrink-0 items-center whitespace-nowrap rounded-full bg-sky-500/15 px-2.5 py-0.5 text-xs font-semibold text-sky-300 ring-1 ring-sky-400/30",children:["Join as ",F]}),t.invitedByEmail&&e.jsxs("span",{className:"truncate",children:["invited by ",t.invitedByEmail]})]})]}),e.jsx("div",{className:"space-y-4 px-8 py-7",children:se.map(({icon:a,title:r,detail
6:M})=>e.jsxs("div",{className:"flex items-start gap-3.5",children:[e.jsx("div",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-xl bg-rh-green/10 ring-1 ring-rh-green/20",children:e.jsx(a,{className:"h-4 w-4 text-rh-green"})}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:r}),e.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-rh-text-dark",children:M})]})]},r))}),e.jsxs("div",{className:"border-t border-white/5 bg-ink/20 px-8 py-7",children:[!s&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-center text-sm text-rh-text-dark",children:["Sign in as ",e.jsx("span",{className:"font-medium text-white",children:t.email})," to join."]}),e.jsxs("div",{className:"mt-5 space-y-3",children:[e.jsx(o,{to:`/signup${b}`,children:"Create account"}),e.jsx(A,{to:`/login${b}`,className:"inline-flex w-full items-center justify-center rounded-xl border border-white/10 bg-white/[0.04] px-5 py-3 text-sm font-semibold text-rh-text-light transition-colors hover:bg-white/[0.08]",children:"I already have an account"})]})]}),R&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-center text-sm leading-relaxed text-rh-text-dark",children:["This invite is for ",e.jsx("span",{className:"font-medium text-white",children:t.email}),", but you are signed in as ",s==null?void 0:s.email,"."]}),e.jsx("div",{className:"mt-5",children:e.jsx(o,{to:`/login${b}`,children:"Switch account"})})]}),O&&e.jsxs(e.Fragment,{children:[y&&e.jsx("p",{className:"mb-4 rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-center text-sm text-red-400",children:y}),e.jsx(o,{onClick:()=>void P(),disabled:p,children:p?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),d?"Opening your team studio...":"Joining..."]}):"Accept invite"}),!p&&e.jsx("button",{type:"button",onClick:()=>n("/",{replace:!0}),className:"mt-3 w-full py-2 text-center text-xs font-medium text-rh-text-dark transition-colors hover:text-white",children:"Not now, take me to my studio"}),e.jsxs("p",{className:"mt-1 text-center text-xs text-rh-text-dark/60",children:["Signed in as ",s==null?void 0:s.email]})]})]})]})]})};export{oe 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.