1import{j as e}from"./vendor-ui-BRVg3_iW.js";import{d as H,c as V,r as d}from"./vendor-react-fhnP-ZxB.js";import{u as z,o as w,aZ as X,by as Y,aq as ee,bm as F,aA as q,C as K,v as b,E as te,F as P,cb as U,ai as se,y as Q,k as ae,j as W}from"./index-BTZS4ZAF.js";import{u as re}from"./vendor-query-fmpM_ONB.js";import{C as ie}from"./confirm-delete-BWZ9dBgE.js";import{P as le,a as ne}from"./panel-left-open-B3RdZ0pZ.js";import{T as Z}from"./trash-2-4FJWEhhy.js";import{U as oe}from"./user-plus-DEtXmw-k.js";import"./vendor-three-BixXOMS4.js";import"./vendor-charts-CM-rxR9X.js";import"./vendor-radix-B2hiDlNL.js";import"./vendor-supabase-BDcQUG0T.js";import"./vendor-date-D8Ds2zcx.js";function ce(){const{user:t,isLoading:x}=z(),{data:l,isLoading:u}=re({queryKey:["is-spaces-only",t==null?void 0:t.id],queryFn:async()=>{if(!(t!=null&&t.id))return!1;const{data:n,error:h}=await w.rpc("is_spaces_only_user",{_user_id:t.id});return h?(console.error("[useIsSpacesOnly] rpc failed",h),!1):!!n},enabled:!!(t!=null&&t.id),staleTime:5*60*1e3});return{isSpacesOnly:l===!0,isLoading:x||u}}const de=({collapsed:t,onToggle:x})=>{var v,$;const l=H(),u=V(),{session:n}=z(),{isSpacesOnly:h}
1=ce(),[j,k]=d.useState([]),[y,S]=d.useState(!0),f=(v=u.pathname.match(/\/spaces\/([^/]+)/))==null?void 0:v[1];d.useEffect(()=>{var a;(a=n==null?void 0:n.user)!=null&&a.id&&C()},[($=n==null?void 0:n.user)==null?void 0:$.id]);const C=async()=>{try{const a=await w.from("spaces_projects").select("id, name, updated_at").eq("user_id",n.user.id),p=((await w.from("space_collaborators").select("space_id").eq("user_id",n.user.id).not("accepted_at","is",null)).data||[]).map(_=>_.space_id);let g=[];if(p.length>0){const{data:_}=await w.from("spaces_projects").select("id, name, updated_at").in("id",p);g=_||[]}const L=new Map;[...a.data||[],...g].forEach(_=>L.set(_.id,_));const M=[...L.values()].sort((_,D)=>new Date(D.updated_at).getTime()-new Date(_.updated_at).getTime());k(M)}catch(a){console.error("Failed to load spaces:",a)}finally{S(!1)}},T=async()=>{var a;if(!((a=n==null?void 0:n.user)!=null&&a.id)){b.error("Please sign in to create a space");return}try{const{data:o,error:p}=await w.from("spaces_projects").insert([{user_id:n.user.id,name:"Untitled Space",canvas_data:{nodes:[],edges:[]}}]).select("id").single();if(p)throw p;o&&(await C(),l(`/spaces/${o.id}`))}catch(o){console.error("Failed to create space:",o),b.error("Failed to create space")}},I=async a=>{try{const{error:o}=await w.from("spaces_projects").delete().eq("id",a);if(o)throw o;b.success("Space deleted"),k(p=>p.filter(g=>g.id!==a)),f===a&&l("/spaces")}catch{b.error("Failed to delete space")}},i=a=>{const o=Date.now()-new Date(a).getTime(),p=Math.floor(o/6e4);if(p<60)return`${p}m ago`;const g=Math.floor(p/60);return g<24?`${g}h ago`:`${Math.floor(g/24)}d ago`};return e.jsxs("div",{className:"h-full flex flex-col transition-all duration-300 bg-sidebar-background border-r border-sidebar-border",style:{width:t?52:220},children:[e.jsxs("div",{className:"flex items-center justify-between px-3 h-12 border-b border-sidebar-border",children:[!t&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X,{className:"w-3.5 h-3.5 text-primary/60"}),e.jsx("span",{className:"text-[11px] font-semibold tracking-[0.15em] uppercase text-primary/50",children:"Spaces"})]}),e.jsx("button",{onClick:x,className:"p-1.5 rounded-md transition-colors text-muted-foreground/50 hover:text-muted-foreground",children:t?e.jsx(le,{className:"w-3.5 h-3.5"}):e.jsx(ne,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"px-1.5 py-2 space-y-0.5",children:[e.jsx(A,{icon:e.jsx(Y,{className:"w-3.5 h-3.5"}),label:"Dashboard",collapsed:t,active:u.pathname==="/spaces",onClick:()=>l("/spaces")}),!h&&e.jsx(A,{icon:e.jsx(ee,{className:"w-3.5 h-3.5"}),label:"New Space",collapsed:t,onClick:T,accent:!0}),!h&&e.jsx(A,{icon:e.jsx(F,{className:"w-3.5 h-3.5"}),label:"Team",collapsed:t,active:u.pathname==="/spaces/team",onClick:()=>l("/spaces/team")})]}),e.jsx("div",{className:"mx-3 h-px bg-sidebar-border/50"}),!t&&e.jsxs("div",{className:"flex-1 overflow-y-auto px-1.5 py-2 scrollbar-thin",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 mb-0.5",children:[e.jsx("span",{className:"text-[9px] font-medium uppercase tracking-[0.2em] text-muted-foreground/30",children:"Projects"}),e.jsx("span",{className:"text-[9px] tabular-nums text-muted-foreground/20",children:j.length})]}),y?e.jsx("div",{className:"px-2 py-4 text-center",children:e.jsx("div",{className:"w-4 h-4 mx-auto rounded-full border border-border border-t-primary/40 animate-spin"})}):j.length===0?e.jsxs("div",{className:"px-2 py-8 text-center",children:[e.jsx(q,{className:"w-4 h-4 mx-auto mb-2 text-muted-foreground/15"}),e.jsx("p",{className:"text-[10px] text-muted-foreground/30",children:"No projects yet"})]}):e.jsx("div",{className:"space-y-px",children:j.map(a=>{const o=f===a.id;return e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>l(`/spaces/${a.id}`),className:`w-full group flex items-center gap-2 px-2 py-1.5 rounded-md text-left transition-all duration-150 cursor-pointer ${o?"bg-primary/[0.06]":"hover:bg-secondary/30"}`,style:{borderLeft:o?"2px solid hsl(65 100% 50% / 0.4)":"2px solid transparent"},children:[e.jsx(q,{className:`w-3 h-3 flex-shrink-0 ${o?"text-primary/60":"text-muted-foreground
1/25"}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:`text-[11px] truncate ${o?"text-primary":"text-foreground/40"}`,children:a.name}),e.jsxs("div",{className:"text-[9px] flex items-center gap-1 text-muted-foreground/20",children:[e.jsx(K,{className:"w-2 h-2"}),i(a.updated_at)]})]}),e.jsx(ie,{title:`Delete "${a.name}"?`,description:"The whole canvas goes â every node, every connection, and the arrangement you built. Images and videos it generated are still in your asset library; the space is not. This cannot be undone.",confirmLabel:"Delete space",onConfirm:()=>I(a.id),children:e.jsx("button",{onClick:p=>p.stopPropagation(),"aria-label":`Delete space ${a.name}`,className:"opacity-0 group-hover:opacity-100 p-0.5 rounded transition-all text-destructive/50 hover:text-destructive",children:e.jsx(Z,{className:"w-2.5 h-2.5"})})})]},a.id)})})]}),t&&e.jsx("div",{className:"flex-1 overflow-y-auto px-1.5 py-2 space-y-0.5",children:j.slice(0,8).map(a=>{const o=f===a.id;return e.jsx("button",{onClick:()=>l(`/spaces/${a.id}`),className:`w-full flex items-center justify-center p-2 rounded-md transition-colors ${o?"bg-primary/[0.06]":"hover:bg-secondary/30"}`,title:a.name,children:e.jsx(q,{className:`w-3.5 h-3.5 ${o?"text-primary/60":"text-muted-foreground/30"}`})},a.id)})}),e.jsx("div",{className:"px-1.5 py-2 border-t border-sidebar-border/50"})]})};function A({icon:t,label:x,collapsed:l,active:u,accent:n,onClick:h}){return e.jsxs("button",{onClick:h,className:`w-full flex items-center gap-2 px-2 py-1.5 rounded-md transition-all duration-150 ${u?"bg-secondary/50 text-foreground/75":n?"text-primary/70 hover:text-primary":"text-muted-foreground/50 hover:text-muted-foreground"}`,title:l?x:void 0,children:[e.jsx("span",{className:"flex-shrink-0",children:t}),!l&&e.jsx("span",{className:"text-[11px] font-medium",children:x})]})}const R="hsl(65 100% 50%)",Se=()=>{var B;const{session:t}=z(),x=H(),[l,u]=d.useState("members"),[n,h]=d.useState([]),[j,k]=d.use
1State([]),[y,S]=d.useState(!0),[f,C]=d.useState(""),[T,I]=d.useState(!1),[i,v]=d.useState(null),[$,a]=d.useState(!1);d.useEffect(()=>{var s;(s=t==null?void 0:t.user)!=null&&s.id&&o()},[(B=t==null?void 0:t.user)==null?void 0:B.id]);async function o(){S(!0);try{const{data:s}=await w.from("spaces_projects").select("id").eq("user_id",t.user.id),m=(s||[]).map(N=>N.id);if(m.length===0){h([]),k([]),S(!1);return}const[{data:r},{data:c}]=await Promise.all([w.from("team_members_overview").select("*").in("space_id",m).order("invited_at",{ascending:!1}),w.from("space_activity_log").select("id, space_id, action, target_email, old_role, new_role, created_at").in("space_id",m).order("created_at",{ascending:!1}).limit(50)]);h(r||[]),k(c||[])}catch(s){console.error("[TeamManagement] load failed",s),b.error("Failed to load team")}finally{S(!1)}}const p=d.useMemo(()=>n.filter(s=>s.accepted_at),[n]),g=d.useMemo(()=>n.filter(s=>!s.accepted_at),[n]),L=d.useMemo(()=>{const s=new Map;for(const r of p){const c=(r.profile_email||r.invited_email||r.user_id||"").toLowerCase();c&&(s.has(c)||s.set(c,{email:c,name:r.full_name,avatar:r.avatar_url,spaces:[]}),s.get(c).spaces.push(r))}const m=[...s.values()];if(f.trim()){const r=f.trim().toLowerCase();return m.filter(c=>c.email.includes(r)||(c.name||"").toLowerCase().includes(r))}return m},[p,f]),M=d.useMemo(()=>{if(!f.trim())return g;const s=f.trim().toLowerCase();return g.filter(m=>(m.invited_email||"").toLowerCase().includes(s))},[g,f]);async function _(s,m){h(c=>c.map(N=>N.collaborator_id===s?{...N,role:m}:N)),v(null);const{error:r}=await w.from("space_collaborators").update({role:m}).eq("id",s);if(r){b.error(r.message),o();return}b.success("Role updated")}async function D(s){if(!confirm("Remove this collaborator from the space?"))return;h(r=>r.filter(c=>c.collaborator_id!==s));const{error:m}=await w.from("space_collaborators").delete().eq("id",s);if(m){b.error(m.message),o();return}b.success("Removed")}async function G(s){const m=p.filter(N=>(N.profile_email||N.invited_email||"").toLowerCase()===s);if(!m.length||!confirm(`Remove ${s} from all ${m.length} space(s)?`))return;const r=m.map(N=>N.collaborator_id);h(N=>N.filter(J=>!r.includes(J.collaborator_id)));const{error:c}=await w.from("space_collaborators").delete().in("id",r);if(c){b.error(c.message),o();return}b.success(`Removed from ${r.length} space(s)`)}return e.jsxs("div",{className:"w-screen h-screen flex overflow-hidden bg-background",children:[e.jsx(de,{collapsed:T,onToggle:()=>I(s=>!s)}),e.jsxs("div",{className:"flex-1 min-w-0 h-full overflow-y-auto",style:{background:"#0a0908"},children:[e.jsxs("div",{className:"px-8 py-6 border-b",style:{borderColor:"rgba(255,255,255,0.04)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>x("/spaces"),className:"p-2 rounded-lg text-white/40 hover:text-white hover:bg-white/5 transition-colors",children:e.jsx(te,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-[22px] font-semibold text-white tracking-tight",children:"Team"}),e.jsx("p",{className:"text-[12px] text-white/40 mt-0.5",children:"Manage everyone you've invited across all your Space
1s."})]})]}),e.jsxs("button",{onClick:()=>a(!0),className:"rounded-full px-4 py-2 text-[13px] font-semibold flex items-center gap-2 transition-all hover:brightness-110",style:{background:R,color:"#0a0a0a"},children:[e.jsx(oe,{className:"w-4 h-4"})," Invite to Spaces"]})]}),e.jsxs("div",{className:"flex items-center gap-6 justify-between flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{active:l==="members",onClick:()=>u("members"),icon:e.jsx(F,{className:"w-3.5 h-3.5"}),label:"Members",count:L.length}),e.jsx(E,{active:l==="pending",onClick:()=>u("pending"),icon:e.jsx(P,{className:"w-3.5 h-3.5"}),label:"Pending",count:g.length}),e.jsx(E,{active:l==="activity",onClick:()=>u("activity"),icon:e.jsx(U,{className:"w-3.5 h-3.5"}),label:"Activity",count:j.length})]}),l!=="activity"&&e.jsxs("div",{className:"relative",style:{minWidth:280},children:[e.jsx(se,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-white/30"}),e.jsx("input",{value:f,onChange:s=>C(s.target.value),placeholder:"Search by name or email",className:"w-full bg-[#15140f] border border-white/5 rounded-full pl-9 pr-4 py-2 text-[13px] text-white placeholder:text-white/30 outline-none focus:border-white/20"})]})]})]}),e.jsx("div",{className:"px-8 py-6",children:y?e.jsxs("div",{className:"py-20 text-center text-white/40 flex items-center justify-center gap-2",children:[e.jsx(Q,{className:"w-4 h-4 animate-spin"})," Loadingâ¦"]}):l==="members"?L.length===0?e.jsx(O,{icon:e.jsx(F,{className:"w-6 h-6"}),title:"No team members yet",hint:"Invite collaborators from any Space to see them here."}):e.jsx("div",{className:"space-y-2 max-w-4xl",children:L.map(s=>{var m;return e.jsxs("div",{className:"rounded-2xl p-4",style:{background:"#15140f",border:"1px solid rgba(255,255,255,0.04)"},children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-full flex items-center justify-center text-[12px] font-semibold text-white",style:{background:"rgba(255,255,255,0.06)"},children:s.avatar?e.jsx("img",{src:s.avatar,alt:"",className:"w-9 h-9 rounded-full object-cover"}):(m=s.email[0])==null?void 0:m.toUpperCase()}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[14px] text-white truncate",children:s.name||s.email}),s.name&&e.jsx("div",{className:"text-[11px] text-white/40",children:s.email})]}),e.jsxs("div",{className:"text-[11px] text-white/35 flex items-center gap-1",children:[e.jsx(q,{className:"w-3 h-3"})," ",s.spaces.length," space",s.spaces.length!==1&&"s"]}),e.jsx("button",{onClick:()=>G(s.email),className:"text-[12px] text-red-400/70 hover:text-red-400 ml-2",children:"Remove from all"})]}),e.jsx("div",{className:"space-y-1 pl-12",children:s.spaces.map(r=>e.jsxs("div",{className:"flex items-center gap-3 py-1.5 group",children:[e.jsx("button",{onClick:()=>x(`/spaces/${r.space_id}`),className:"flex-1 text-left text-[12px] text-white/60 hover:text-white truncate",children:r.space_name}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>v(i===r.collaborator_id?null:r.collaborator_id),className:"flex items-center gap-1 rounded-full px-3 py-1 text-[11px] text-white/60 hover:bg-white/5 hover:text-white capitalize",children:[r.role," ",e.jsx(ae,{className:"w-2.5 h-2.5"})]}),i===r.collaborator_id&&e.jsx("div",{className:"absolute right-0 top-full mt-1 w-32 rounded-xl p-1 z-10 shadow-2xl",style:{background:"#0a0908",border:"1px solid rgba(255,255,255,0.12)"},children:["viewer","editor","owner"].map(c=>e.jsxs("button",{onClick:()=>_(r.collaborator_id,c),className:"flex w-full items-center justify-between rounded-lg px-2.5 py-1.5 text-left text-[12px] text-white/85 hover:bg-white/10 capitalize",children:[e.jsx("span",{children:c}),r.role===c&&e.jsx(W,{className:"w-3 h-3",style:{color:R}})]},c))})]}),e.jsx("button",{onClick:()=>D(r.collaborator_id),className:"opacity-0 group-hover:opacity-100 text-white/30 hover:text-red-400 transition-all",children:e.jsx(Z,{className:"w-3 h-3"})})]},r.collaborator_id))})]},s.email)})}):l==="pending"?M.length===0?e.jsx(O,{icon:e.jsx(P,{className:"w-6 h-6"}),title:"No pending invitations",hint:"Invitees who haven't signed up yet will show here."}):e.jsx("div",{className:"space-y-1.5 max-w-3xl",children:M.map(s=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl",style:{background:"#15140f",border:"1px solid rgba(255,255,255,0.04)"},children:[e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center",style:{background:"rgba(191,255,0,0.08)"},children:e.jsx(P,{className:"w-3.5 h-3.5",style:{color:R}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[13px] text-white truncate",children:s.inv
1ited_email}),e.jsxs("div",{className:"text-[11px] text-white/40 flex items-center gap-2",children:[e.jsx(K,{className:"w-2.5 h-2.5"})," Awaiting sign-up · ",s.space_name," · ",s.role]})]}),e.jsx("button",{onClick:()=>D(s.collaborator_id),className:"text-[12px] text-white/40 hover:text-red-400 px-3 py-1.5 rounded-full hover:bg-white/5",children:"Cancel"})]},s.collaborator_id))}):j.length===0?e.jsx(O,{icon:e.jsx(U,{className:"w-6 h-6"}),title:"No activity yet",hint:"Invites, role changes, and removals will appear here."}):e.jsx("div",{className:"space-y-1 max-w-3xl",children:j.map(s=>e.jsx(me,{a:s},s.id))})})]}),$&&e.jsx(xe,{ownerId:t.user.id,onClose:()=>{a(!1),o()}})]})},E=({active:t,onClick:x,icon:l,label:u,count:n})=>e.jsxs("button",{onClick:x,className:`flex items-center gap-2 px-3.5 py-2 rounded-full text-[13px] font-medium transition-all ${t?"bg-white/10 text-white":"text-white/45 hover:text-white/70 hover:bg-white/5"}`,children:[l," ",u,e.jsx("span",{className:`text-[10px] px-1.5 rounded-full tabular-nums ${t?"bg-white/15":"bg-white/5"}`,children:n})]}),O=({icon:t,title:x,hint:l})=>e.jsxs("div",{className:"py-20 text-center",children:[e.jsx("div",{className:"w-12 h-12 mx-auto rounded-full flex items-center justify-center mb-3",style:{background:"rgba(255,255,255,0.04)",color:"rgba(255,255,255,0.3)"},children:t}),e.jsx("div",{className:"text-[14px] text-white/60 mb-1",children:x}),e.jsx("div",{className:"text-[12px] text-white/35",children:l})]}),me=({a:t})=>{const x=t.action==="invited"?"invited":t.action==="accepted"?"joined as":t.action==="role_changed"?"changed role to":t.action==="removed"?"removed":t.action,l=new Date(t.created_at).toLocaleString();return e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-white/[0.02]",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:R}}),e.jsxs("div",{className:"flex-1 text-[12px] text-white/70",children:[e.jsx("span",{className:"text-white",children:t.target_email||"someone"})," ",e.jsx("span",{className:"text-white/40",children:x})," ",t.new_role&&e.jsx("span",{className:"text-white",children:t.new_role}),t.old_role&&t.action==="role_changed"&&e.jsxs("span",{className:"text-white/30",children:[" (was ",t.old_role,")"]})]}),e.jsx("div",{className:"text-[10px] text-white/30",children:l})]})},xe=({ownerId:t,onClose:x})=>{const[l,u]=d.useState(""),[n,h]=d.useState("editor"),[j,k]=d.use
1State([]),[y,S]=d.useState(new Set),[f,C]=d.useState(!1);d.useEffect(()=>{(async()=>{const{data:i}=await w.from("spaces_projects").select("id, name").eq("user_id",t).order("updated_at",{ascending:!1});k(i||[])})()},[t]);function T(i){const v=new Set(y);v.has(i)?v.delete(i):v.add(i),S(v)}async function I(){if(!l.trim()||y.size===0){b.error("Enter an email and pick at least one space");return}C(!0);const i=[...y].map($=>({space_id:$,role:n,invited_email:l.trim().toLowerCase(),invited_by:t})),{error:v}=await w.from("space_collaborators").insert(i);if(C(!1),v){b.error(v.message);return}b.success(`Invited to ${i.length} space${i.length!==1?"s":""}`),x()}return e.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4",onClick:x,children:[e.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),e.jsxs("div",{onClick:i=>i.stopPropagation(),className:"relative w-full max-w-[520px] rounded-[24px] p-6 max-h-[85vh] overflow-y-auto",style:{background:"#1c1b1a",border:"1px solid rgba(255,255,255,0.06)"},children:[e.jsx("h2",{className:"text-[16px] font-semibold text-white mb-1",children:"Invite to multiple Spaces"}),e.jsx("p",{className:"text-[12px] text-white/45 mb-5",children:"One invite, multiple Spaces. Credits used in each Space are billed to you."}),e.jsx("input",{value:l,onChange:i=>u(i.target.value),placeholder:"[email protected]",type:"email",className:"w-full bg-[#0f0e0d] border border-white/5 rounded-full px-4 py-2.5 text-[14px] text-white placeholder:text-white/30 outline-none mb-3"}),e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-[12px] text-white/50",children:"Role:"}),["viewer","editor","owner"].map(i=>e.jsx("button",{onClick:()=>h(i),className:`px-3 py-1 rounded-full text-[12px] capitalize ${n===i?"bg-white/15 text-white":"text-white/50 hover:bg-white/5"}`,children:i},i))]}),e.jsxs("div",{className:"text-[11px] uppercase tracking-wider text-white/40 mb-2",children:["Spaces (",y.size,"/",j.length,")"]}),e.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto mb-5",children:[j.length===0&&e.jsx("div",{className:"text-[12px] text-white/40 px-2 py-3",children:"No spaces yet."}),j.map(i=>e.jsxs("button",{onClick:()=>T(i.id),className:"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-left hover:bg-white/5",children:[e.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${y.has(i.id)?"border-transparent":"border-white/20"}`,style:y.has(i.id)?{background:R}:void 0,children:y.has(i.id)&&e.jsx(W,{className:"w-3 h-3 text-black"})}),e.jsx("span",{className:"text-[13px] text-white/80 truncate",children:i.name})]},i.id))]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("button",{onClick:x,disabled:f,className:"rounded-full px-4 py-2 text-[13px] text-white/60 hover:text-white hover:bg-white/5",children:"Cancel"}),e.jsxs("button",{onClick:I,disabled:f||!l.trim()||y.size===0,className:"rounded-full px-5 py-2 text-[13px] font-semibold disabled:opacity-40 flex items-center gap-2",style:{background:R,color:"#0a0a0a"},children:[f&&e.jsx(Q,{className:"w-3.5 h-3.5 animate-spin"}),"Send invites"]})]})]})]})};export{Se 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.