1import{x as ie,k as oe,r as a,j as e,ab as K,b as Ze,d as et,i as ke,X as ce,a6 as F,ac as tt,f as d,ad as st,ae as at,a0 as nt,a5 as lt,c as rt,B as ae,af as Ce,ag as se,ah as it,a9 as ot,a8 as ct,ai as dt}from"./index-Dyb6OM34.js";import{P as de}from"./plus-B7XxCwRh.js";import{R as C,T as B}from"./trash-2-D2so6ZJj.js";import{C as _}from"./credit-card-CGObFqfx.js";import{S as mt}from"./shield-CmuyZR1b.js";const xt=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],ut=ie("crown",xt);const pt=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ht=ie("star",pt);const bt=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],ne=ie("user-plus",bt);function le({type:s}){const l=s==="shared";return e.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${l?"bg-cyan-500/10 text-cyan-300":"bg-slate-700/60 text-slate-400"}`,children:l?"Shared":"Personal"})}le.propTypes={type:d.string};function Se({onNewOrganization:s}){const{accounts:l,activeAccount:r,activeAccountId:x,setActiveAccount:y,defaultAccountId:m,updateDefaultAccount:j}=oe(),[g,p]=a.useState(null),h=async(o,f)=>{if(o.stopPropagation(),!g){p(f);try{await j(f===m?null:f)}catch{}finally{p(null)}}},[n,u]=a.useState(!1),S=a.useRef(null);a.useEffect(()=>{if(!n)return;const o=N=>{S.current&&!S.current.contains(N.target)&&u(!1)},f=N=>{N.key==="Escape"&&u(!1)};return document.addEventListener("mousedown",o),window.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",o),window.removeEventListener("keydown",f)}},[n]);const w=r?.name||r?.owner_email||"Account",L=[...l].sort((o,f)=>o.account_type!==f.account_type?o.account_type==="personal"?-1:1:(o.name||o.owner_email||"").localeCompare(f.name||f.owner_email||""));return e.jsxs("div",{className:"relative",ref:S,children:[e.jsxs("button",{type:"button",onClick:()=>u(o=>!o),"aria-haspopup":"menu","aria-expanded":n,"data-tour":"account-switcher",className:"flex items-center gap-2 rounded-lg border border-slate-700 bg-slate-950/60 px-3 py-2 text-sm transition-colors hover:border-slate-600",children:[e.jsx(K,{className:"h-4 w-4 flex-shrink-0 text-slate-400"}),e.jsx("span",{className:"max-w-[12rem] truncate font-medium text-slate-200",children:w}),r&&e.jsx(le,{type:r.account_type}),e.jsx(Ze,{className:`h-4 w-4 text-slate-400 transition-transform ${n?"rotate-180":""}`})]}),n&&e.jsxs("div",{role:"menu",className:"absolute left-0 z-50 mt-2 w-72 overflow-hidden rounded-xl border border-slate-800 bg-slate-900 shadow-2xl",children:[e.jsxs("div",{className:"border-b border-slate-800 px-4 py-2 text-xs font-semibold uppercase tracking-wider text-slate-500",children:["Accounts (",l.length,")"]}),e.jsx("div",{className:"account-switcher-list max-h-64 overflow-y-auto py-1",children:L.map(o=>{const f=o.account_id===x,N=o.account_id===m;return e.jsxs("div",{className:"flex w-full items-center transition-colors hover:bg-slate-800",children:[e.jsxs("button",{type:"button",onClick:()=>{u(!1),y(o.account_id)},className:"flex min-w-0 flex-1 items-center gap-2 py-2.5 pl-4 text-left",children:[e.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-white",children:o.name||o.owner_email}),e.jsx(le,{type:o.account_type})]}),e.jsxs("span",{className:"truncate text-xs capitalize text-slate-500",children:[o.role,o.owner_email?` · ${o.owner_email}`:""]})]}),f&&e.jsx(et,{className:"h-4 w-4 flex-shrink-0 text-cyan-400"})]}),e.jsx("button",{type:"button",onClick:i=>h(i,o.account_id),disabled:g!==null,"aria-label":N?"Clear sign-in default":"Set as sign-in default",title:N?"Default account at sign-in. Click to clear.":"Set as your default account at sign-in.",className:`shrink-0 px-3 py-2.5 transition-colors ${N?"text-amber-300 hover:text-amber-200":"text-slate-600 hover:text-slate-300"} disabled:opacity-50`,children:e.jsx(ht,{className:`h-4 w-4 ${N?"fill-current":""}`})})]},o.account_id)})}),e.jsx("div",{className:"border-t border-slate-800 px-4 py-2 text-[11px] text-slate-500",children:"The starred account is where you land at sign-in."}),e.jsx("div",{className:"border-t border-slate-800",children:e.jsxs("button",{type:"button",onClick:()=>{u(!1),s?.()},className:"flex w-full items-center gap-2 px-4 py-3 text-left text-sm font-medium text-cyan-300 transition-colors hover:bg-slate-800",children:[e.jsx(de,{className:"h-4 w-4"}),"New organization"]})})]})]})}Se.propTypes={onNewOrganization:d.func};function Ae({onClose:s}){const{getValidToken:l}=ke(),{setActiveAccount:r}
1=oe(),[x,y]=a.useState(""),[m,j]=a.useState(!1),[g,p]=a.useState(null);a.useEffect(()=>{const n=u=>{u.key==="Escape"&&!m&&s()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[s,m]);const h=async()=>{const n=x.trim();if(!n){p("Enter a name for the organization.");return}j(!0),p(null);try{const S=(await tt(l,n))?.account_id;if(S){r(S);return}p("Could not create the organization.")}catch(u){p(u.message||"Could not create the organization.")}finally{j(!1)}};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",onMouseDown:n=>{n.target===n.currentTarget&&!m&&s()},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-slate-800 bg-slate-900 p-6 shadow-2xl",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("h3",{className:"flex items-center gap-2 text-lg font-semibold text-white",children:[e.jsx(K,{className:"h-5 w-5 text-cyan-400"}),"New organization"]}),e.jsx("button",{type:"button",onClick:()=>!m&&s(),className:"rounded-md p-1 text-slate-400 transition-colors hover:bg-slate-800 hover:text-white","aria-label":"Close",children:e.jsx(ce,{className:"h-5 w-5"})})]}),e.jsx("p",{className:"mb-4 text-sm text-slate-400",children:"A shared account you administer â add members, monitors, and seats. Shared accounts run on seats only."}),g&&e.jsxs("div",{className:"mb-3 flex items-start gap-2 rounded-lg border border-red-500/20 bg-red-500/10 p-3 text-sm text-red-400",children:[e.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:g})]}),e.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-300",children:"Organization name"}),e.jsx("input",{type:"text",value:x,onChange:n=>y(n.target.value),maxLength:120,autoFocus:!0,placeholder:"e.g. Acme SecOps",onKeyDown:n=>{n.key==="Enter"&&h()},className:"w-full rounded-xl border border-slate-700 bg-slate-950 px-4 py-3 text-white placeholder:text-slate-600 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-cyan-500"}),e.jsxs("div",{className:"mt-5 flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:s,disabled:m,className:"rounded-lg px-4 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50",children:"Cancel"}),e.jsx("button",{type:"button",onClick:h,disabled:m,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-5 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Creatingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(de,{className:"h-4 w-4"}),"Create"]})})]})]})})}Ae.propTypes={onClose:d.func.isRequired};const U=[{value:"admin",label:"Admin",Icon:ut,blurb:"Can sign in and manage the account. Sees all runs, members, and billing.",chip:"border-cyan-400/30 bg-cyan-400/10 text-cyan-300"},{value:"member",label:"Member",Icon:ae,blurb:"Monitor-only. Cannot sign in and has no visibility into the account â just granted monitor keys to use on the platform. Uses one seat.",chip:"border-slate-500/30 bg-slate-500/10 text-slate-300"}],re=s=>U.find(l=>
1l.value===s)||U[1],gt=s=>s==="member";function ft(s){if(!s)return null;try{const l=s.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=JSON.parse(atob(l.padEnd(Math.ceil(l.length/4)*4,"="))),x=r.email||r["cognito:username"];return typeof x=="string"?x:null}catch{return null}}function $e({status:s}){const r={active:"border-emerald-400/20 bg-emerald-400/10 text-emerald-400",invited:"border-amber-400/20 bg-amber-400/10 text-amber-400",revoked:"border-slate-500/20 bg-slate-500/10 text-slate-500"}[s]||"border-slate-500/20 bg-slate-500/10 text-slate-400";return e.jsx("span",{className:`inline-flex items-center whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize ${r}`,children:s||"unknown"})}$e.propTypes={status:d.string};function Ee({role:s}){const l=re(s),{Icon:r}=l;return e.jsxs("span",{className:`inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-medium ${l.chip}`,children:[e.jsx(r,{className:"h-3.5 w-3.5"}),l.label]})}Ee.propTypes={role:d.string};function Me({onClose:s,onAdd:l,busy:r}){const[x,y]=a.useState(""),[m,j]=a.useState("member"),[g,p]=a.useState(null);a.useEffect(()=>{const n=u=>{u.key==="Escape"&&!r&&s()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[s,r]);const h=async()=>{const n=x.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){p("Enter a valid email address.");return}p(null),await l({email:n,role:m})};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",onMouseDown:n=>{n.target===n.currentTarget&&!r&&s()},children:e.jsxs("div",{className:"w-full max-w-lg rounded-2xl border border-slate-800 bg-slate-900 shadow-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-slate-800 p-5 sm:p-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"flex items-center gap-2 text-lg font-semibold text-white",children:[e.jsx(ne,{className:"h-5 w-5 text-cyan-400"}),"Add to organization"]}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"Billing rolls up to this account."})]}),e.jsx("button",{type:"button",onClick:s,disabled:r,className:"shrink-0 rounded-md p-1 text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50","aria-label":"Close",children:e.jsx(ce,{className:"h-5 w-5"})})]}),e.jsxs("div",{className:"space-y-5 p-5 sm:p-6",children:[g&&e.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-red-500/20 bg-red-500/10 p-3 text-sm text-red-400",children:[e.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:g})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-300",children:"Email"}),e.jsx("input",{type:"email",value:x,onChange:n=>y(n.target.value),placeholder:"[email protected]",className:"w-full rounded-xl border border-slate-700 bg-slate-950 px-4 py-3 text-white placeholder:text-slate-600 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-cyan-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-slate-300",children:"Role"}),e.jsx("div",{className:"grid gap-3",children:U.map(n=>{const u=m===n.value;return e.jsxs("button",{type:"button",onClick:()=>j(n.value),className:`flex items-start gap-3 rounded-xl border p-3 text-left transition-colors ${u?"border-cyan-400/60 bg-cyan-400/10":"border-slate-700 bg-slate-950/60 hover:border-slate-600"}`,children:[e.jsx(n.Icon,{className:`mt-0.5 h-5 w-5 shrink-0 ${u?"text-cyan-300":"text-slate-400"}`}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-medium text-white",children:n.label}),e.jsx("span",{className:"mt-0.5 block text-xs text-slate-400",children:n.blurb})]})]},n.value)})})]}),e.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-slate-800 pt-4",children:[e.jsx("button",{type:"button",onClick:s,disabled:r,className:"rounded-lg px-4 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50",children:"Cancel"}),e.jsx("button",{type:"button",onClick:h,disabled:r,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-5 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",children:r?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Addingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"h-4 w-4"}),"Add member"]})})]})]})]})})}
1Me.propTypes={onClose:d.func.isRequired,onAdd:d.func.isRequired,busy:d.bool};function _e({email:s,onCancel:l,onConfirm:r,busy:x,error:y}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",onMouseDown:m=>{m.target===m.currentTarget&&!x&&l()},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-slate-800 bg-slate-900 p-6 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"rounded-lg bg-red-500/10 p-2 text-red-400",children:e.jsx(B,{className:"h-5 w-5"})}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Remove member"})]}),e.jsxs("p",{className:"mt-4 text-sm text-slate-300",children:["Remove ",e.jsx("span",{className:"font-medium text-white",children:s})," from the organization? They lose access and stop consuming a seat."]}),y&&e.jsxs("p",{className:"mt-3 flex items-center gap-1.5 text-sm text-red-400",children:[e.jsx(F,{className:"h-4 w-4"}),y]}),e.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:l,disabled:x,className:"rounded-lg px-4 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50",children:"Cancel"}),e.jsx("button",{type:"button",onClick:r,disabled:x,className:"inline-flex items-center gap-2 rounded-lg bg-red-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-red-500 disabled:cursor-not-allowed disabled:opacity-50",children:x?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Removingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"h-4 w-4"}),"Remove"]})})]})]})})}_e.propTypes={email:d.string,onCancel:d.func.isRequired,onConfirm:d.func.isRequired,busy:d.bool,error:d.string};function Re({onClose:s,onManageSeats:l}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",onMouseDown:r=>{r.target===r.currentTarget&&s()},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-slate-800 bg-slate-900 p-6 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"rounded-lg bg-amber-500/10 p-2 text-amber-400",children:e.jsx(_,{className:"h-5 w-5"})}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Seat limit reached"})]}),e.jsx("p",{className:"mt-4 text-sm text-slate-300",children:"You've used every purchased seat. Add seats to bring on more monitored members."}),e.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:s,className:"rounded-lg px-4 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white",children:"Not now"}),e.jsxs("button",{type:"button",onClick:l,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500",children:[e.jsx(_,{className:"h-4 w-4"}),"Manage seats"]})]})]})})}Re.propTypes={onClose:d.func.isRequired,onManageSeats:d.func.isRequired};function Te({current:s,target:l,seatPrice:r,onCancel:x,onConfirm:y,busy:m}){const j=l-s,g=r?.unitAmount!=null?r.unitAmount/100:null,p=r?.interval||"month";return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",onMouseDown:h=>{h.target===h.currentTarget&&!m&&x()},children:e.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-slate-800 bg-slate-900 p-6 shadow-2xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"rounded-lg bg-cyan-500/10 p-2 text-cyan-400",children:e.jsx(_,{className:"h-5 w-5"})}),e.jsx("h3",{className:"text-lg font-semibold text-white",children:"Confirm seat change"})]}),e.jsxs("div",{className:"mt-4 space-y-3 text-sm text-slate-300",children:[e.jsxs("p",{children:["Your plan changes from ",e.jsx("span",{className:"font-semibold text-white",children:s})," to"," ",e.jsx("span",{className:"font-semibold text-white",children:l})," seat",l===1?"":"s"," ","(",j>0?`adding ${j}`:`removing ${-j}`,")."]}),g!=null&&e.jsxs("p",{children:["New price: ",e.jsxs("span",{className:"font-semibold text-white",children:["$",(l*g).toLocaleStr
1ing()]})," per ",p," ","(",l," à $",g.toLocaleString(),"/seat)."]}),e.jsx("p",{className:"rounded-lg border border-amber-500/20 bg-amber-500/5 px-3 py-2 text-xs text-amber-300/90",children:j>0?"Takes effect immediately. Nothing is charged today â the added seats are billed prorated on your next invoice.":"Takes effect immediately. Removed seats become a prorated credit on your upcoming invoices."})]}),e.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:x,disabled:m,className:"rounded-lg px-4 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50",children:"Cancel"}),e.jsx("button",{type:"button",onClick:y,disabled:m,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?e.jsxs(e.Fragment,{children:[e.jsx(C,{className:"h-4 w-4 animate-spin"}),"Updatingâ¦"]}):"Confirm change"})]})]})})}Te.propTypes={current:d.number.isRequired,target:d.number.isRequired,seatPrice:d.shape({unitAmount:d.number,interval:d.string}),onCancel:d.func.isRequired,onConfirm:d.func.isRequired,busy:d.bool};function Le({name:s,onCreate:l}){return e.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900 p-8 text-center sm:p-12",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-slate-800 text-slate-400",children:e.jsx(K,{className:"h-6 w-6"})}),e.jsx("h2",{className:"text-lg font-semibold text-white",children:s||"Your personal account"}),e.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-slate-400",children:"This is your personal account â it's just for you. You can't add members or manage seats here. Create an organization to collaborate with a team under shared billing."}),e.jsxs("button",{type:"button",onClick:l,"data-tour":"create-org",className:"mt-5 inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-cyan-500",children:[e.jsx(de,{className:"h-4 w-4"}),"Create an organization"]})]})}Le.propTypes={name:d.string,onCreate:d.func.isRequired};function Ct(){const{getValidToken:s,idToken:l}=ke(),{activeAccount:r,accountsLoading:x}=oe(),y=a.useMemo(()=>ft(l),[l]),m=r?.account_type==="shared",j=!x&&!!r,[g,p]=a.useState(!1),[h,n]=a.useState([]),[u,S]=a.useState(!0),[w,L]=a.useState(null),[o,f]=a.useState(null),[N,i]=a.useState(null),[ze,z]=a.useState(!1),[Be,me]=a.useState(!1),[P,V]=a.useState(null),[xe,ue]=a.useState(!1),[Fe,H]=a.useState(null),[Pe,D]=a.use
1State(null),[pe,he]=a.useState(null),[De,J]=a.useState(!1),[I,be]=a.useState(""),[R,ge]=a.useState(!1),[O,fe]=a.useState(!1),[Ie,X]=a.useState(!1),[ye,je]=a.useState(!1),[G,Q]=a.useState(null),W=a.useRef(null);a.useEffect(()=>()=>clearTimeout(W.current),[]);const A=a.useCallback(async()=>{try{n(await st(s))}catch(t){i({type:"error",text:t.message||"Failed to load members."})}finally{S(!1)}},[s]),k=a.useCallback(async()=>{try{L(await at(s))}catch{L(null)}},[s]);a.useEffect(()=>{let t=!1;return A(),k(),nt(s).then(c=>{t||f(c)}).catch(()=>{}),()=>{t=!0}},[A,k,s]);const $=a.useMemo(()=>h.filter(t=>t.monitored&&t.status!=="revoked").length,[h]),Z=t=>t?.status===402?(z(!1),J(!0),!0):!1,Oe=async({email:t,role:c})=>{me(!0),i(null);const b=gt(c);try{await Ce(s,{email:t,role:c,monitored:b}),z(!1),i({type:"success",text:`${t} added as ${re(c).label.toLowerCase()}.`}),await Promise.all([A(),k()])}catch(T){if(T?.status===402&&b){try{await Ce(s,{email:t,role:c,monitored:!1}),z(!1),i({type:"success",text:`${t} added without a seat â the seat plan is full, so they are not monitored yet. Add seats to license them.`}),await Promise.all([A(),k()])}catch(M){i({type:"error",text:M.message||"Failed to add member."})}return}i({type:"error",text:T.message||"Failed to add member."})}finally{me(!1)}},qe=async(t,c)=>{if(c!==t.role){D(t.email),i(null);try{await se(s,{email:t.email,role:c}),i({type:"success",text:`${t.email} is now ${re(c).label.toLowerCase()}.`}),await Promise.all([A(),k()])}catch(b){if(Z(b))return;i({type:"error",text:b.message||"Failed to update member."})}finally{D(null)}}},Ye=async t=>{const c=!t.monitored;he(t.email),i(null);try{await se(s,{email:t.email,monitored:c}),i({type:"success",text:c?`${t.email} now uses a Seat License.`:`${t.email} no longer uses a seat.`}),await Promise.all([A(),k()])}catch(b){if(Z(b))return;i({type:"error",text:b.message||"Failed to update seat assignment."})}finally{he(null)}},Ue=async t=>{D(t.email),i(null);try{await se(s,{email:t.email,status:"active"}),i({type:"success",text:`${t.email} reinstated.`}),await Promise.all([A(),k()])}catch(c){if(Z(c))return;i({type:"error",text:c.message||"Failed to reinstate member."})}finally{D(null)}},Ke=async()=>{ue(!0),H(null);try{await it(s,P.email),i({type:"success",text:`${P.email} removed.`}),V(null),await Promise.all([A(),k()])}catch(t){H(t.message||"Failed to remove member.")}finally{ue(!1)}},ee=w?.plan==="seat",we=ee&&w?.status==="canceled",q=ee&&!we,v=w?.seats_used??$,E=w?.seat_count??0,te=q?Math.max(0,v-E):0,Ve=ee,Y=w?.cancel_at_period_end?w.current_period_end:null,Ne=async t=>{if(!Number.isInteger(t)||t<1){i({type:"error",text:"Enter a valid total seat count."});return}if(t<v){i({type:"error",text:`You can't drop below ${v} seat${v===1?"":"s"} currently in use.`});return}ge(!0),i(null);try{const c=await dt(s,{seats:t,priceId:o?.priceId});if(c?.checkout_url){window.location.assign(c.checkout_url);return}i({type:"success",text:`Plan updated to ${t} seat${t===1?"":"s"}. Changes are prorated on your next invoice.`}),await k(),clearTimeout(W.current),W.current=setTimeout(k,6e3)}catch(c){i({type:"error",text:c.message||"Failed to update seats."})}finally{ge(!1)}},He=()=>{const t=Number(I);if(!Number.isInteger(t)||t<1){i({type:"error",text:"Enter a valid total seat count."});return}if(t<v){i({type:"error",text:`You can't drop below ${v} seat${v===1?"":"s"} currently in use.`});return}if(t===E){i({type:"error",text:`Your plan is already ${E} seat${E===1?"":"s"}.`});return}i(null),Q(t)},Je=async()=>{await Ne(G),Q(null)},Xe=()=>{if(!o){i({type:"error",text:"Seat plan pricing is unavailable right now."});return}Ne(Number(I)||Math.max($,1))},Ge=async()=>{je(!0),i(null);try{const t=await ot(s);if(t?.portal_url){window.location.assign(t.portal_url);return}i({type:"error",text:"Could not open the billing portal."})}catch(t){i({type:"error",text:t.message||"Could not open the billing portal."})}finally{je(!1)}},Qe=async()=>{fe(!0),i(null);try{const t=await ct(s);X(!1),L(b=>({...b||{},...t}));const c=t?.current_period_end?new Date(t.current_period_end).toLocaleDateString():null;i({type:"success",text:c?`Cancellation scheduled â seats stay active until ${c}, then monitoring stops.`:"Cancellation scheduled."})}catch(t){i({type:"error",text:t?.status===502?"Couldn't confirm the cancellation with Stripe â nothing changed, please try again.":t.message||"Failed to cancel the subscription."})}finally{fe(!1)}},We=()=>{J(!1),document.getElementById("org-billing")?.scrollIntoView({behavior:"smooth"})}
1,ve=o?.unitAmount!=null?`$${(o.unitAmount/100).toFixed(0)}/seat / ${o.interval}`:null;return e.jsxs("div",{className:"min-h-screen bg-slate-950 px-4 pb-12 pt-24 text-white sm:px-6",children:[e.jsxs("div",{className:"mx-auto max-w-5xl space-y-6 sm:space-y-8",children:[e.jsxs("div",{className:"relative rounded-3xl border border-slate-800 bg-slate-900 p-6 shadow-2xl",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-3xl",children:e.jsx("div",{className:"absolute -right-16 -top-16 h-64 w-64 rounded-full bg-cyan-400/10 blur-3xl"})}),e.jsxs("div",{className:"relative z-10 flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h1",{className:"flex items-center gap-3 text-2xl font-bold text-white sm:text-3xl",children:[e.jsx(K,{className:"h-7 w-7 shrink-0 text-cyan-300"}),"Organization"]}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm text-slate-400 sm:text-base",children:m?e.jsxs(e.Fragment,{children:["Manage who belongs to ",e.jsx("span",{className:"text-white",children:r?.name})," â all under one bill. ",e.jsx("span",{className:"text-cyan-300",children:"Admins"})," can sign in and see everything; ",e.jsx("span",{className:"text-slate-200",children:"members"})," are monitor-only."]}):"Switch between accounts, or create an organization to collaborate with a team under shared billing. Your personal account is just for you."})]}),e.jsx("div",{className:"shrink-0",children:e.jsx(Se,{onNewOrganization:()=>p(!0)})})]})]}),!q&&e.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl border border-cyan-500/20 bg-cyan-500/5 p-5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:"No seats yet"}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"Organizations run on Seat Licenses. Add seats to enable scans, monitoring, integrations, and API keys for your members."})]}),e.jsxs("a",{href:"#org-billing",className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500",children:[e.jsx(_,{className:"h-4 w-4"}),"Buy seats"]})]}),te>0&&e.jsxs("div",{className:"flex items-start gap-2 rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-400",children:[e.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("span",{className:"flex-1",children:["Total seat count in use above subscription allocation â ",te," ",te===1?"seat is":"seats are"," not running on licenses; their scans are refused until you add seats."]})]}),N&&e.jsxs("div",{className:`flex items-start gap-2 rounded-xl border px-4 py-3 text-sm ${N.type==="error"?"border-red-500/20 bg-red-500/10 text-red-400":"border-emerald-500/20 bg-emerald-500/10 text-emerald-300"}`,children:[N.type==="error"?e.jsx(F,{className:"mt-0.5 h-4 w-4 shrink-0"}):e.jsx(lt,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{className:"flex-1",children:N.text}),e.jsx("button",{type:"button",onClick:()=>i(null),className:"text-current/70 hover:text-current",children:e.jsx(ce,{className:"h-4 w-4"})})]}),j?m?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-slate-800 bg-slate-900",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-slate-800 p-5 sm:flex-row sm:items-center sm:justify-between sm:p-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-white",children:"Members"}),e.jsxs("p",{className:"mt-1 text-sm text-slate-400",children:[h.length," ",h.length===1?"person":"people"," · ",$," monitored seat",$===1?"":"s"," · click a seat to assign or release a license"]})]}),e.jsxs("button",{type:"button",onClick:()=>z(!0),className:"inline-flex items-center justify-center gap-2 self-start rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500",children:[e.jsx(ne,{className:"h-4 w-4"}),"Add member"]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{className:"border-b border-slate-800 bg-slate-950/50 text-xs font-semibold uppercase tracking-wider text-slate-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-4 font-medium",children:"Email"}),e.jsx("th",{className:"px-4 py-4 font-medium",children:"Role"}),e.jsx("th",{className:"px-4 py-4 font-medium",children:"Status"}),e.jsx("th",{className:"px-4 py-4 text-center font-medium",children:"Seat"}),e.jsx("th",{className:"px-4 py-4 text-right font-medium",children:"Actions"})]})}),e.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[u?e.jsx("tr",{children:e.jsx("td",{colSpan:"5",className:"p-8 text-center text-slate-500",children:"Loadingâ¦"})}):h.map(t=>{const c=y&&t.email?.toLowerCase()===y.toLowerCase(),b=Pe===t.email||pe===t.email,T=t.status==="revoked";return e.jsxs("tr",{className:`transition-colors hover:bg-slate-800/30 ${T?"opacity-60":""}`,children:[e.jsx("td",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-white",children:[e.jsx(rt,{className:"h-3.5 w-3.5 shrink-0 text-slate-500"}),e.jsx("span",{className:"truncate",children:t.email}),c&&e.jsx("span",{className:"rounded bg-slate-800 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-slate-400",children:"You"})]})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx(Ee,{role:t.role})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx($e,{status:t.status})}),e.jsx("td",{className:"px-4 py-4 text-center",children:T?t.monitored?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-slate-500",children:[e.jsx(ae,{className:"h-3.5 w-3.5"}),"1 seat"]}):e.jsx("span",{className:"text-xs text-slate-600",children:"â"}):e.jsxs("button",{type:"button",disabled:b,onClick:()=>Ye(t),title:t.monitored?"Using a Seat License â click to release it":"Not using a seat â click to assign a Seat License","aria-pressed":t.monitored,className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t.monitored?"border-cyan-400/30 bg-cyan-400/10 text-cyan-300 hover:bg-cyan-400/20":"border-slate-700 bg-slate-800/40 text-slate-400 hover:border-slate-600 hover:text-slate-200"}`,children:[pe===t.email?e.jsx(C,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ae,{className:"h-3.5 w-3.5"}),t.monitored?"1 seat":"No seat"]})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("div",{className:"flex items-center justify-end gap-2",children:T?e.jsxs("button",{type:"button",disabled:b,onClick:()=>Ue(t),className:"inline-flex items-center gap-1 rounded-md border border-emerald-400/30 bg-emerald-500/10 px-2.5 py-1.5 text-xs font-medium text-emerald-300 transition-colors hover:bg-emerald-500/20 disabled:opacity-50","aria-label":`Reinstate ${t.email}`,children:[e.jsx(C,{className:`h-3 w-3 ${b?"animate-spin":""}`}),"Reinstate"]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:t.role,disabled:b,onChange:M=>qe(t,M.target.value),"aria-label":`Change role for ${t.email}`,className:"appearance-none rounded-lg border border-slate-700 bg-slate-950/60 py-1.5 pl-2.5 pr-7 text-xs font-medium text-slate-200 transition-colors focus:border-cyan-400/60 focus:outline-none disabled:opacity-50",children:U.map(M=>e.jsx("option",{value:M.value,children:M.label},M.value))}),b?e.jsx(C,{className:"pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 animate-spin text-slate-500"}):e.jsx(mt,{className:"pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-500"})]}),e.jsxs("button",{type:"button",onClick:()=>{H(null),V(t)},className:"inline-flex items-center gap-1 rounded-md border border-red-400/30 bg-red-500/10 px-2.5 py-1.5 text-xs font-medium text-red-300 transition-colors hover:bg-red-500/20","aria-label":`Remove ${t.email}`,children:[e.jsx(B,{className:"h-3 w-3"}),"Remove"]})]})})})]},t.email)}),!u&&h.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:"5",className:"p-12 text-center text-slate-500",children:"No members yet. Add an admin or a monitored member to get started."})})]})]})})]}),e.jsxs("div",{id:"org-billing",className:"overflow-hidden rounded-2xl border border-slate-800 bg-slate-900 scroll-mt-24",children:[e.jsxs("div",{className:"border-b border-slate-800 p-5 sm:p-6",children:[e.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold text-white",children:[e.jsx(_,{className:"h-5 w-5 text-cyan-400"}),"Billing & seats"]}),e.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"Every member is billed to this account."})]}),e.jsxs("div",{className:"p-5 sm:p-6",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Plan"}),e.jsx("p",{className:"mt-1 text-lg font-semibold capitalize text-white",children:w?.plan==="seat"?"Seat License":"No plan"}),we?e.jsx("p",{className:"mt-0.5 text-xs font-semibold capitalize text-amber-400",children:"Canceled â no active seats"}):Y?e.jsxs("p",{className:"mt-0.5 text-xs font-semibold text-amber-400",children:["Cancels on ",new Date(Y).toLocaleDateString()]}):w?.status&&e.jsxs("p",{className:"mt-0.5 text-xs capitalize text-slate-400",children:[w.status,w.current_period_end?` · renews ${new Date(w.current_period_end).toLocaleDateString()}`:""]})]}),e.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Seats"}),q?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-1 text-lg font-semibold text-white",children:[v," ",e.jsx("span",{className:"font-normal text-slate-500",children:"used"})," / ",E," ",e.jsx("span",{className:"font-normal text-slate-500",children:"purchased"})]}),e.jsxs("p",{className:"mt-0.5 text-xs text-slate-400",children:[Math.max(0,E-v)," available"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mt-1 text-lg font-semibold text-white",children:[v," ",e.jsx("span",{className:"font-normal text-slate-500",children:"in use"})]}),e.jsx("p",{className:"mt-0.5 text-xs text-slate-400",children:"No seat plan â shared accounts need active seats to run scans"})]})]}),e.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:"Access"}),e.jsx("p",{className:"mt-1 text-lg font-semibold text-white",children:"Seat-only"}),e.jsx("p",{className:"mt-0.5 text-xs text-slate-400",children:"Scans, monitoring, integrations, and API keys all require active seats"})]})]}),Ve&&e.jsxs("div",{className:"mt-4 flex flex-col gap-3 rounded-xl border border-slate-800 bg-slate-950/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"Payment method"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Update your card, billing details, and view invoices in Stripe."})]}),e.jsxs("button",{type:"button",onClick:Ge,disabled:ye,className:"inline-flex items-center gap-2 self
1-start rounded-lg border border-slate-700 bg-slate-800/60 px-4 py-2 text-sm font-medium text-slate-200 transition-colors hover:border-slate-600 hover:bg-slate-800 disabled:opacity-50",children:[ye?e.jsx(C,{className:"h-4 w-4 animate-spin"}):e.jsx(_,{className:"h-4 w-4"}),"Manage billing"]})]}),q?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-6 flex flex-col gap-3 rounded-xl border border-slate-800 bg-slate-950/40 p-4 sm:flex-row sm:items-end sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"seat-adjust",className:"block text-sm font-medium text-slate-300",children:"Total seats"}),e.jsxs("p",{className:"mt-1 text-xs text-slate-500",children:["Enter the new total (not the number to add). Prorated. Minimum ",v," in use."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"seat-adjust",type:"number",min:Math.max(1,v),value:I,onChange:t=>be(t.target.value),placeholder:String(E),className:"w-24 rounded-lg border border-slate-700 bg-slate-950 px-3 py-2 text-sm text-white placeholder:text-slate-600 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-cyan-500"}),e.jsxs("button",{type:"button",onClick:He,disabled:R,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:[R?e.jsx(C,{className:"h-4 w-4 animate-spin"}):null,"Update"]})]})]}),e.jsxs("div",{className:"mt-3 flex flex-col gap-3 rounded-xl border border-slate-800 bg-slate-950/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"Cancel seat subscription"}),e.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Cancels at the end of the current billing period â seats keep working until then, after which monitoring stops."})]}),Y?e.jsxs("span",{className:"self-start text-xs font-semibold text-amber-400 sm:self-auto",children:["Cancels on ",new Date(Y).toLocaleDateString()]}):Ie?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:Qe,disabled:O,className:"inline-flex items-center gap-2 rounded-lg bg-red-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-red-500 disabled:opacity-50",children:[O?e.jsx(C,{className:"h-4 w-4 animate-spin"}):e.jsx(B,{className:"h-4 w-4"}),O?"Schedulingâ¦":"Confirm cancel"]}),e.jsx("button",{type:"button",onClick:()=>X(!1),disabled:O,className:"rounded-lg px-3 py-2 text-sm font-medium text-slate-400 transition-colors hover:bg-slate-800 hover:text-white disabled:opacity-50",children:"Keep"})]}):e.jsxs("button",{type:"button",onClick:()=>X(!0),className:"inline-flex items-center gap-2 self-start rounded-lg border border-red-400/30 bg-red-500/10 px-4 py-2 text-sm font-medium text-red-300 transition-colors hover:bg-red-500/20",children:[e.jsx(B,{className:"h-4 w-4"}),"Cancel subscription"]})]})]}):e.jsxs("div",{className:"mt-6 flex flex-col gap-3 rounded-xl border border-cyan-500/20 bg-cyan-500/5 p-4 sm:flex-row sm:items-end sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-white",children:"Switch to the seat plan"}),e.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Roll monitored members onto per-seat billing",ve?` (${ve})`:"",". Enter the total number of seats to purchase â you have ",$," monitored member",$===1?"":"s"," today."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"number",min:Math.max(1,$),value:I,onChange:t=>be(t.target.value),placeholder:String(Math.max($,1)),className:"w-24 rounded-lg border border-slate-700 bg-slate-950 px-3 py-2 text-sm text-white placeholder:text-slate-600 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-cyan-500"}),e.jsxs("button",{type:"button",onClick:Xe,disabled:R||!o,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-600 px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-cyan-500 disabled:cursor-not-allowed disabled:opacity-50",children:[R?e.jsx(C,{className:"h-4 w-4 animate-spin"}):e.jsx(_,{className:"h-4 w-4"}),"Buy seats"]})]})]})]})]})]}):e.jsx(Le,{name:r?.name,onCreate:()=>p(!0)}):e.jsx("div",{className:"rounded-2xl border border-slate-800 bg-slate-900 p-10 text-center text-slate-500",children:"Loading accountâ¦"})]}),ze&&e.jsx(Me,{onClose:()=>z(!1),onAdd:Oe,busy:Be}),g&&e.jsx(Ae,{onClose:()=>p(!1)}),P&&e.jsx(_e,{email:P.email,onCancel:()=>{xe||V(null)},onConfirm:Ke,busy:xe,error:Fe}),De&&e.jsx(Re,{onClose:()=>J(!1),onManageSeats:We}),G!=null&&e.jsx(Te,{current:E,target:G,seatPrice:o,busy:R,onCancel:()=>{R||Q(null)},onConfirm:Je})]})}
1export{Ct 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.