@lacneu/atrium 0.27.0 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/assets/AccessTab-DvvDXBXb.js +1 -0
  2. package/dist/assets/{AdvancedFilter-C7EdUbso.js → AdvancedFilter-BFrnFKT8.js} +1 -1
  3. package/dist/assets/AgentFilesTab-jMVGc-7o.js +3 -0
  4. package/dist/assets/AnomaliesTab-JRqIpCQ3.js +1 -0
  5. package/dist/assets/AuditTab-BrQtjSHt.js +1 -0
  6. package/dist/assets/BridgeTab-CVMr5-7B.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-CRnsKi17.js +1 -0
  8. package/dist/assets/{DataTableShell-B9cSAz8l.js → DataTableShell-D3UoYiLm.js} +1 -1
  9. package/dist/assets/{DetailChips-CWQEoST8.js → DetailChips-CEPLO74z.js} +1 -1
  10. package/dist/assets/FeedbacksTab-DtcTHukp.js +1 -0
  11. package/dist/assets/{FieldLabel-BGZ_qKFR.js → FieldLabel-D-Hzx5_p.js} +2 -2
  12. package/dist/assets/FilesTab-9huo9v-_.js +1 -0
  13. package/dist/assets/{FilterBar-CHAmMDFh.js → FilterBar-BwVt4XJ7.js} +1 -1
  14. package/dist/assets/GroupsTab-CtYeHOBA.js +1 -0
  15. package/dist/assets/InstancesTab-BNzkCJvr.js +1 -0
  16. package/dist/assets/IntegrationsTab-BRGKBdRH.js +1 -0
  17. package/dist/assets/KpiTab-J9KHRyfK.js +1 -0
  18. package/dist/assets/PreferencesTab-C_MSfGKP.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-twM5Wu4M.js +3 -0
  20. package/dist/assets/RolesTab-C9h6psGw.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-CxPmhPYx.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-BlTwmb10.js +1 -0
  23. package/dist/assets/ThemeShowroom-DZ0Zkebx.js +1 -0
  24. package/dist/assets/{TimeRangePicker-Dj6YRWgA.js → TimeRangePicker-pz6n37si.js} +1 -1
  25. package/dist/assets/TracesTab-Bn3nIxEe.js +1 -0
  26. package/dist/assets/UsersTab-C4Vr4jwt.js +1 -0
  27. package/dist/assets/{button-J0r_4wz5.js → button-BKx-78Cz.js} +1 -1
  28. package/dist/assets/{card-dyG2YjyY.js → card-r-aJwNEo.js} +1 -1
  29. package/dist/assets/chevrons-up-down-59d1_9hJ.js +1 -0
  30. package/dist/assets/{compatView-DPRQjsZh.js → compatView-Cvvm-eZM.js} +1 -1
  31. package/dist/assets/dispatchErrorInfo-BY-uJbtG.js +1 -0
  32. package/dist/assets/{dist-DS1M4Gey.js → dist-CEZ2NhYx.js} +1 -1
  33. package/dist/assets/{dist-DggIHtPt.js → dist-CLSp0oLP.js} +1 -1
  34. package/dist/assets/{dist-BFIP7qvw.js → dist-CdJRWSN2.js} +1 -1
  35. package/dist/assets/dist-DcNll3Cm.js +1 -0
  36. package/dist/assets/{highlighted-body-OFNGDK62-EPlwFMM-.js → highlighted-body-OFNGDK62-BB_6m41R.js} +1 -1
  37. package/dist/assets/{index-B08-jWhj.css → index-BARs9CRG.css} +1 -1
  38. package/dist/assets/index-BDVPDgRe.js +229 -0
  39. package/dist/assets/mermaid-GHXKKRXX-Bt2lAXSp.js +1 -0
  40. package/dist/assets/roleDescriptions-BVyzh7hN.js +1 -0
  41. package/dist/assets/{table-BuMPc1vP.js → table-v_cIgz3K.js} +1 -1
  42. package/dist/assets/{tabs-BTVXPiSJ.js → tabs-ClKgxi4q.js} +1 -1
  43. package/dist/assets/x-DmVX0ZZY.js +1 -0
  44. package/dist/index.html +8 -8
  45. package/package.json +1 -1
  46. package/dist/assets/AccessTab-CEmMOcXT.js +0 -1
  47. package/dist/assets/AgentFilesTab-C9tMrmAg.js +0 -3
  48. package/dist/assets/AnomaliesTab-DrUwzDmG.js +0 -1
  49. package/dist/assets/AuditTab-Aj8uI0v6.js +0 -1
  50. package/dist/assets/BridgeTab-CA5_P4aZ.js +0 -1
  51. package/dist/assets/ChatDefaultsTab-CVNE9suc.js +0 -1
  52. package/dist/assets/FeedbacksTab-DSeHh3a5.js +0 -1
  53. package/dist/assets/FilesTab-Bkb5DTn0.js +0 -1
  54. package/dist/assets/GroupsTab-CR4m4DqG.js +0 -1
  55. package/dist/assets/InstancesTab-V2KYNZTK.js +0 -1
  56. package/dist/assets/IntegrationsTab-B3B8_e3n.js +0 -1
  57. package/dist/assets/KpiTab-Bh67xpFW.js +0 -1
  58. package/dist/assets/PreferencesTab-Bp7NvRbP.js +0 -1
  59. package/dist/assets/PromptInjectionsTab-Bp6feq2x.js +0 -3
  60. package/dist/assets/RolesTab-B22EPCra.js +0 -1
  61. package/dist/assets/ServiceAccountsTab-pWc6hbtd.js +0 -1
  62. package/dist/assets/SubAgentReportsTab-CzLYKjvx.js +0 -1
  63. package/dist/assets/ThemeShowroom-Da9-MU65.js +0 -1
  64. package/dist/assets/TracesTab-Bxfvod8I.js +0 -1
  65. package/dist/assets/UsersTab-C6FpLZh2.js +0 -1
  66. package/dist/assets/chevrons-up-down-0_epvFU7.js +0 -1
  67. package/dist/assets/dispatchErrorInfo-xSgyy7Pa.js +0 -1
  68. package/dist/assets/dist-dDi5a2bA.js +0 -1
  69. package/dist/assets/index-BI4JM57h.js +0 -229
  70. package/dist/assets/mermaid-GHXKKRXX-Dap6Di3w.js +0 -1
  71. package/dist/assets/roleDescriptions-BJkLcyAA.js +0 -1
  72. package/dist/assets/x-CjN2swsp.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$b as r,Ap as i,Ax as a,Bp as o,Cp as s,Cx as c,Dp as l,Dx as u,Ep as d,Ex as f,Fp as p,Gb as m,Gp as ee,Hb as h,Hp as g,Ip as te,Jb as _,Kb as v,Lp as ne,MO as y,Mp as re,NO as b,Np as ie,Op as ae,Ox as x,Pp as oe,Qb as S,RO as C,Rp as se,Sp as ce,Sx as w,Tp as le,Tx as T,Ub as E,Up as ue,Vp as de,Wb as D,Wp as fe,Xb as O,Yb as k,Zb as A,_p as pe,_x as me,bp as he,bx as ge,cp as _e,cx as j,dp as ve,dx as ye,ex as be,fp as xe,fx as Se,gp as Ce,gx as we,hp as Te,hx as Ee,jp as De,jx as M,kp as Oe,kx as N,lp as P,lx as ke,mp as Ae,mx as je,nx as Me,pp as Ne,px as Pe,qb as Fe,sp as Ie,sx as Le,tx as Re,up as ze,ux as Be,vp as Ve,vx as F,wp as He,wx as Ue,xp as We,xx as Ge,yp as Ke,yx as I,zO as L,zp as qe}from"./dist-CLSp0oLP.js";import{n as Je}from"./dist-CdJRWSN2.js";import{t as Ye}from"./x-DmVX0ZZY.js";import{i as R,n as z,r as Xe,t as Ze}from"./tabs-ClKgxi4q.js";import{t as B}from"./button-BKx-78Cz.js";import{$ as Qe,C as V,Ct as $e,Dt as et,Mt as tt,Q as nt,S as H,X as U,a as rt,b as W,et as it,i as at,jt as ot,k as st,nt as ct,o as lt,ot as ut,r as dt,rt as ft,wt as pt,x as G,y as K}from"./index-BDVPDgRe.js";import{n as mt}from"./TimeRangePicker-pz6n37si.js";import{t as ht}from"./FilterBar-BwVt4XJ7.js";import{t as gt}from"./AdvancedFilter-BFrnFKT8.js";import{t as _t}from"./DataTableShell-D3UoYiLm.js";var vt=b(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),yt=b(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),q=t(e(),1),J=n(),Y={kind:`relative`,from:`now-520w`,to:`now`},X=e=>e===null?`-`:String(Math.round(e));function bt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?Se():n===`agent`?`${ye()} - ${r}`:e}function xt(){let e=L(y.me.getMe,{host:ut})?.role===`admin`,t=L(y.deliveryTiming.getDeliveryStatus,{}),n=C(y.deliveryTiming.startDeliveryRecord),r=C(y.deliveryTiming.stopDeliveryRecord),[i,o]=(0,q.useState)(!1),[s,l]=(0,q.useState)(!1),d=t?.recording??!1,p=async()=>{l(!0);try{d?await r({}):await n({})}finally{l(!1)}};return(0,J.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h3`,{className:`text-sm font-semibold`,children:M()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:a()})]}),e?(0,J.jsx)(B,{variant:d?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void p(),children:d?x():N()}):null]}),d?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:u()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:f({time:new Date(t.startedAt).toLocaleTimeString()})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:i?c():Ue()})}),i?(0,J.jsx)(St,{isAdmin:e}):null]})}function St({isAdmin:e}){let t=L(y.deliveryTiming.listDeliverySessions,{}),n=C(y.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(`all`),[s,c]=(0,q.useState)(Y),[l,u]=(0,q.useState)(null),{from:d,to:f}=mt(s),p=s.to===`now`?1/0:f,m=r.trim()!==``||a!==`all`||s!==Y,ee=()=>{i(``),o(`all`),c(Y)},h=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=d&&t.startedAt<=p).map(e=>({...e,_id:e.sessionId}))},[t,r,a,d,p]),g=e=>{let t=new Set((h??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),l!==null&&r.includes(l)&&u(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(ht,{q:r,onQChange:i,searchPlaceholder:Ge(),timeRange:s,onTimeRangeChange:c,onReset:ee,canReset:m,children:(0,J.jsxs)(K,{value:a,onValueChange:e=>o(e),children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:`all`,children:ge()}),(0,J.jsx)(G,{value:`active`,children:I()}),(0,J.jsx)(G,{value:`stopped`,children:F()})]})]})}),(0,J.jsx)(_t,{title:w(),rows:h,emptyHint:E(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":l===e.sessionId?ke():Be(),onClick:()=>u(t=>t===e.sessionId?null:e.sessionId),children:l===e.sessionId?(0,J.jsx)(vt,{size:15,"aria-hidden":!0}):(0,J.jsx)(pt,{size:15,"aria-hidden":!0})})},{header:me(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.startedAt).toLocaleString()})},{header:we(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,J.jsx)(`span`,{className:`tabular-nums`,children:new Date(e.stoppedAt).toLocaleString()})},{header:Ee(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:je(),sort:e=>e.startedBy,cell:e=>bt(e.startedBy)},{header:Pe(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(U,{variant:`secondary`,children:I()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:F()})}],rowActions:e?e=>[{label:j(),variant:`destructive`,onSelect:()=>g([e.sessionId])}]:void 0,bulkActions:e?[{label:j(),variant:`destructive`,onSelect:e=>g(e)}]:void 0,isExpanded:e=>e.sessionId===l,renderExpanded:e=>(0,J.jsx)(Ct,{sessionId:e.sessionId})})]})}function Ct({sessionId:e}){let t=L(y.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(wt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(st(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function wt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Le()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:T()});let i=e.segments,a=(e,t)=>(0,J.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,J.jsx)(`td`,{className:`py-1`,children:e}),(0,J.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,J.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,h()]}),(0,J.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Je,{size:13,"aria-hidden":!0}):(0,J.jsx)(et,{size:13,"aria-hidden":!0}),t?D():m()]})]}),(0,J.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,J.jsx)(`th`,{className:`py-1 font-medium`,children:be()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:r()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:S()})]})}),(0,J.jsxs)(`tbody`,{children:[a(A(),i.bridge),a(O(),i.A),a(k(),i.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:_()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:v()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Fe()})]})}var Tt=[50,100,200,500],Z=`all`,Q=`__all__`,Et=[`2xx`,`4xx`,`5xx`],Dt=[`user`,`service`,`system`],Ot=[`inbound`,`outbound`,`internal`],kt={kind:`relative`,from:`now-30d`,to:`now`},At=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function jt(){let e=tt({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,c=e.principalType??Q,u=e.direction??Q,f=e.roleKey??Q,m=e.q??``,h=dt(e.from,e.to),_=(0,q.useMemo)(()=>lt(e.adv),[e.adv]),{from:v,to:b}=mt(h),[x,S]=(0,q.useState)(null),[C,w]=(0,q.useState)(null),T=e=>void t({search:t=>({...t,limit:e})}),E=e=>void t({search:t=>({...t,kind:e})}),D=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),O=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),A=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),me=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),ge=e=>void t({search:t=>({...t,...rt(e)})}),_e=e=>void t({search:t=>({...t,adv:at(e)}),replace:!0}),j=L(y.observability.listEvents,{limit:n}),ye=L(y.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:m||void 0,from:v,to:b,statusClass:a===Q?void 0:a,principalType:c===Q?void 0:c,direction:u===Q?void 0:u,roleKey:f===Q?void 0:f,advanced:_.length>0?_:void 0}}),be=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),Se=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),we=m!==``||a!==Q||c!==Q||u!==Q||f!==Q||_.length>0||h.kind!==`relative`||h.from!==kt.from;function Ee(){t({search:{limit:100,kind:`all`},replace:!0})}let M=x?j?.filter(e=>e.correlationId===x):ye,[N,P]=(0,q.useState)(`events`);return(0,J.jsxs)(Ze,{value:N,onValueChange:e=>P(e),children:[(0,J.jsxs)(Xe,{className:`w-full`,children:[(0,J.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)($e,{size:13,"aria-hidden":!0}),Me()]}),(0,J.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(yt,{size:13,"aria-hidden":!0}),Re()]})]}),(0,J.jsx)(z,{value:`latency`,children:(0,J.jsx)(xt,{})}),(0,J.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[ee(),(0,J.jsx)(`strong`,{children:fe()}),ue(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:g()})]}),(0,J.jsxs)(ht,{q:m,onQChange:D,searchPlaceholder:de(),timeRange:h,onTimeRangeChange:ge,onReset:Ee,canReset:we,children:[(0,J.jsxs)(K,{value:a,onValueChange:O,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:o()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:qe()}),Et.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:c,onValueChange:k,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:se()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:ne()}),Dt.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:u,onValueChange:A,children:[(0,J.jsx)(H,{size:`sm`,className:`w-32`,children:(0,J.jsx)(V,{placeholder:te()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:p()}),Ot.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:f,onValueChange:me,children:[(0,J.jsx)(H,{size:`sm`,className:`w-36`,children:(0,J.jsx)(V,{placeholder:oe()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Q,children:ie()}),Se.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:r,onValueChange:E,children:[(0,J.jsx)(H,{size:`sm`,className:`w-44`,children:(0,J.jsx)(V,{placeholder:re()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(G,{value:Z,children:De()}),be.map(e=>(0,J.jsx)(G,{value:e,children:e},e))]})]}),(0,J.jsxs)(K,{value:String(n),onValueChange:e=>T(Number(e)),children:[(0,J.jsx)(H,{size:`sm`,className:`w-28`,children:(0,J.jsx)(V,{})}),(0,J.jsx)(W,{children:Tt.map(e=>(0,J.jsx)(G,{value:String(e),children:i({count:e})},e))})]})]}),(0,J.jsx)(gt,{fields:At,seed:_,onChange:_e}),x?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>S(null),title:Oe(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ae(),(0,J.jsx)(`code`,{children:$(x)})]}),(0,J.jsx)(Ye,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:l()})]})}):null,(0,J.jsx)(_t,{title:d(),rows:M,emptyHint:x?le():He(),columns:[{header:s(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:ce(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:We(),sort:e=>Nt(e)??null,cell:e=>{let t=Nt(e);return t?(0,J.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,J.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":he(),children:`✓`})}},{header:Ke(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(U,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ve(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(U,{variant:`outline`,children:e.principalType}),e.principalId?(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:pe(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,J.jsx)(U,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ce(),sort:e=>e.route,cell:e=>e.route?(0,J.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,J.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Te(),sort:e=>e.status,cell:e=>e.status===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsx)(`span`,{className:`oc-traces__status ${Mt(e.status)}`,children:e.status})},{header:Ae(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:Ne(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:xe(),onClick:()=>S(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ve(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>w(e),children:ze()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(Pt,{row:C,onClose:()=>w(null)})]})]})}function Mt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Nt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function Pt({row:e,onClose:t}){let n=(0,q.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,J.jsx)(nt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(Qe,{className:`max-w-lg`,children:[(0,J.jsxs)(ct,{children:[(0,J.jsxs)(ft,{className:`oc-traces__meta-title`,children:[P(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:_e()})]}),(0,J.jsx)(it,{children:Ie()})]}),(0,J.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{jt as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$_ as r,Af as i,Cf as a,Cv as o,Df as s,Ef as c,Ev as l,MO as u,Mf as d,N_ as f,Nf as p,Of as m,Q_ as h,RO as g,Sf as _,Sv as ee,Tf as v,Tv as y,_v as b,av as te,bv as x,cv as ne,dv as re,ev as ie,fv as ae,gv as S,hv as oe,iv as se,jf as C,kf as w,lv as T,mv as E,nv as D,ov as O,pv as ce,rv as le,sv as ue,tv as de,uv as fe,vv as pe,wf as k,wv as A,xf as j,xv as me,yv as he,zO as M}from"./dist-CLSp0oLP.js";import{t as N}from"./button-BKx-78Cz.js";import{$ as P,A as F,C as I,G as L,K as R,M as ge,Mt as _e,Q as z,S as B,W as V,X as H,Y as ve,_ as U,_t as W,b as G,d as K,et as ye,f as be,gt as q,j as xe,jt as Se,nt as Ce,ot as we,p as J,q as Te,rt as Ee,x as Y,y as X}from"./index-BDVPDgRe.js";import{t as De}from"./FilterBar-BwVt4XJ7.js";import{t as Oe}from"./DataTableShell-D3UoYiLm.js";import{t as ke}from"./DetailChips-CEPLO74z.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let a=M(u.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=M(u.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),l=(o??[]).find(e=>e.isDefault)??null,f=l?`${l.instanceName}/${l.agentId}`:null,m=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),h=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!m.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],g=new Map;for(let e of h){let t=g.get(e.instanceName)??[];t.push(e),g.set(e.instanceName,t)}return(0,Q.jsx)(z,{open:n,onOpenChange:r,children:(0,Q.jsxs)(P,{className:`oc-access`,children:[(0,Q.jsxs)(Ce,{children:[(0,Q.jsx)(Ee,{children:p({user:t})}),(0,Q.jsx)(ye,{children:d()})]}),a?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?C():i()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:w()}):h.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:c()}):[...g.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:f},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:o}){let c=g(u.agents.assignAgent),l=g(u.agents.removeAgent),d=g(u.agents.setDefaultAgent),f=F();if(!e)return null;async function p(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await c({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(m(),e)}}async function h(n){try{await d({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(s(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(W,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),s=o===n,c=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(U,{checked:r,disabled:c&&!r,onCheckedChange:()=>void p(e.agentId,r),"aria-label":v({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,c?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:k()}):null,e.outOfPool?(0,Q.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:a()}):null,r?s?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":_(),title:_(),children:(0,Q.jsx)(q,{size:14,fill:`currentColor`})}):(0,Q.jsx)(N,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":j(),title:j(),onClick:()=>void h(e.agentId),children:(0,Q.jsx)(q,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=K.filter(e=>n.has(J[e])).length;return(0,Q.jsxs)(V,{children:[(0,Q.jsx)(ve,{asChild:!0,children:(0,Q.jsx)(N,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?l():y({count:r})})}),(0,Q.jsxs)(L,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(Te,{children:A()}),K.map(e=>{let r=J[e];return(0,Q.jsxs)(R,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(U,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:be[e]??e})]},e)})]})]})}function Ne(){let e=_e({from:`/settings/users`}),t=Se({from:`/settings/users`}),n=e.q??``,i=e.role??$,a=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),c=M(u.admin.listUsers,{filter:{q:n||void 0,role:i===$?void 0:i},withAgents:!0}),l=M(u.me.getMe,{host:we}),d=g(u.admin.setRole),p=g(u.admin.setUserPermissions),m=g(u.admin.startImpersonation),_=g(u.admin.deleteUser),v=g(u.admin.setUserName),y=xe(),C=ge(),w=F(),[k,A]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of c??[])e.add(t.role);return[...e]},[c]),N=n!==``||i!==$;function P(){t({search:{},replace:!0})}async function L(e){try{await d(e)}catch(e){w.error(o(),e)}}async function R(e){try{await p(e)}catch(e){w.error(ee(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await y({title:oe(),description:E({user:t}),confirmWord:ce(),confirmLabel:ae(),destructive:!0}))try{await _({profileId:e._id}),w.success(fe({user:t}))}catch(e){w.error(re(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await C({title:ne(),label:ue({user:t}),placeholder:O(),defaultValue:e.name??``,confirmLabel:f()});if(n!==null)try{await v({profileId:e._id,name:n}),w.success(te())}catch(e){w.error(se(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(De,{q:n,onQChange:a,searchPlaceholder:me(),onReset:P,canReset:N,children:(0,Q.jsxs)(X,{value:i,onValueChange:s,children:[(0,Q.jsx)(B,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(I,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:$,children:x()}),j.map(e=>(0,Q.jsx)(Y,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:he(),rows:c,emptyHint:pe(),rowActions:e=>{let t=[{label:h(),onSelect:()=>A({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:T(),onSelect:()=>void V(e)}];return e.userId!==l?.userId&&t.push({label:b(),onSelect:()=>void m({profileId:e._id})},{label:S(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:le(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:D(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(X,{value:e.role,onValueChange:t=>void L({profileId:e._id,role:t}),children:[(0,Q.jsx)(B,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(I,{})}),(0,Q.jsxs)(G,{children:[(0,Q.jsx)(Y,{value:`pending`,children:`pending`}),(0,Q.jsx)(Y,{value:`user`,children:`user`}),(0,Q.jsx)(Y,{value:`admin`,children:`admin`})]})]})},{header:de(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:ie()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),R({profileId:e._id,permissions:[...n]})}})},{header:r(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(W,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:k?.profileId??null,userLabel:k?.label??``,open:k!==null,onOpenChange:e=>{e||A(null)}})]})}export{Ne as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{SO as n,n as r,t as i}from"./dist-DggIHtPt.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{DO as n,n as r,t as i}from"./dist-CLSp0oLP.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-DggIHtPt.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-CLSp0oLP.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
@@ -0,0 +1 @@
1
+ import{NO as e}from"./dist-CLSp0oLP.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
@@ -1 +1 @@
1
- import{Hr as e,Mr as t,Nr as n,Or as r,jr as i,kr as a}from"./dist-DggIHtPt.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?n():e===`beyond`?t():i()}function p(t){return t??e()}function m(e){return e===null?r():a({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
1
+ import{Ir as e,Lr as t,Nr as n,Pr as r,Rr as i,qr as a}from"./dist-CLSp0oLP.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(n){return n===`supported`?i():n===`beyond`?t():e()}function p(e){return e??a()}function m(e){return e===null?n():r({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
@@ -0,0 +1 @@
1
+ import{$s as e,Cc as t,Qs as n,Sc as r,Xs as i,Ys as a,Zs as o,_c as s,ac as c,bc as l,cc as u,dc as d,ec as f,fc as p,gc as m,hc as h,ic as g,lc as _,mc as v,nc as y,oc as b,pc as x,rc as S,sc as C,tc as w,uc as T,vc as E,xc as D,yc as O}from"./dist-CLSp0oLP.js";var k={AGENT_NOT_FOUND:()=>({label:t(),hint:r()}),AUTH_TOKEN_MISMATCH:()=>({label:D(),hint:l()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:E()}),SESSION_SCOPE_DENIED:()=>({label:s(),hint:m()}),GATEWAY_TIMEOUT:()=>({label:h(),hint:v()}),GATEWAY_DISCONNECTED:()=>({label:x(),hint:p()}),ATTACHMENT_TOO_LARGE:()=>({label:_(),hint:u()}),ATTACHMENT_REJECTED:()=>({label:C(),hint:b()}),BRIDGE_UNREACHABLE:()=>({label:d(),hint:T()}),INVALID_REQUEST:()=>({label:c(),hint:g()}),NOT_CONFIGURED:()=>({label:S(),hint:y()}),UNROUTED:()=>({label:w(),hint:f()}),UPSTREAM_ERROR:()=>({label:e(),hint:n()}),UNKNOWN:()=>({label:o(),hint:i()})};function A(e){return e?k[e]?.()??{label:e,hint:a()}:k.UNKNOWN()}export{A as t};
@@ -1,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{CO as r,EO as i,aO as a,bO as o,cO as s,dO as c,fO as l,gO as u,hO as d,lO as f,oO as p,pO as m,sO as h,uO as g,yO as _}from"./dist-DggIHtPt.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=u(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),l=v.useRef(null),[u,d]=m({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:c(),titleId:c(),descriptionId:c(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),s=i(t,a.triggerRef);return(0,y.jsx)(o.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:s,onClick:_(e.onClick,a.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(l,{present:n||a.open,children:(0,y.jsx)(s,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(l,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(p,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(o.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(l,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),o=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return a(e)},[]),(0,y.jsx)(B,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:_(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=i(t,l);return h(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(f,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(g,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(o.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(o.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(o.button,{type:`button`,...r,ref:t,onClick:_(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=d(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{OO as r,TO as i,_O as a,bO as o,dO as s,fO as c,gO as l,hO as u,jO as d,mO as f,pO as p,uO as m,vO as h,wO as g,xO as _}from"./dist-CLSp0oLP.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=_(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u,d]=h({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:l(),titleId:l(),descriptionId:l(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(E,n),o=d(t,a.triggerRef);return(0,y.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":q(a.open),...r,ref:o,onClick:g(e.onClick,a.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(a,{present:n||o.open,children:(0,y.jsx)(p,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=w(M,e.__scopeDialog);return o.modal?(0,y.jsx)(a,{present:r||o.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=r(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(M,n);return(0,y.jsx)(s,{as:P,allowPinchZoom:!0,shards:[a.contentRef],children:(0,y.jsx)(i.div,{"data-state":q(a.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=w(I,e.__scopeDialog);return(0,y.jsx)(a,{present:r||o.open,children:o.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(null),i=d(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return m(e)},[]),(0,y.jsx)(B,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:g(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:g(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=w(I,n),l=v.useRef(null),p=d(t,l);return c(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(f,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,y.jsx)(u,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":q(s.open),...o,ref:p,onDismiss:()=>s.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:s.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:s.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(V,n);return(0,y.jsx)(i.h2,{id:a.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(U,n);return(0,y.jsx)(i.p,{id:a.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,a=w(G,n);return(0,y.jsx)(i.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>a.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=o(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4