@lacneu/atrium 0.36.0 → 0.37.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 (71) hide show
  1. package/dist/assets/AccessTab-Cj-435U_.js +1 -0
  2. package/dist/assets/{AdvancedFilter-S-HO9nIN.js → AdvancedFilter-CFbVcIVy.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DkWky9tq.js +3 -0
  4. package/dist/assets/AnomaliesTab-DafLABhY.js +1 -0
  5. package/dist/assets/AuditTab-Z12dloZn.js +1 -0
  6. package/dist/assets/BridgeTab-yZLStY0J.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-cUX9eMpc.js +1 -0
  8. package/dist/assets/{DataTableShell-0Ttkz82b.js → DataTableShell-BSo6Gpdb.js} +1 -1
  9. package/dist/assets/{DetailChips-DCOUgVDY.js → DetailChips-DgPWeAKa.js} +1 -1
  10. package/dist/assets/FeedbacksTab-DdLMMPD3.js +1 -0
  11. package/dist/assets/{FieldLabel-BY0GU-yp.js → FieldLabel-CgPjQZ-8.js} +1 -1
  12. package/dist/assets/FilesTab-BncabHvG.js +1 -0
  13. package/dist/assets/{FilterBar-CkxsjoMo.js → FilterBar-C8Wq0ph8.js} +1 -1
  14. package/dist/assets/GroupsTab-B0GdjxoR.js +1 -0
  15. package/dist/assets/InstancesTab-BphQCaUF.js +1 -0
  16. package/dist/assets/IntegrationsTab-BAIo8JKI.js +1 -0
  17. package/dist/assets/KpiTab-NWCp7LgR.js +1 -0
  18. package/dist/assets/PreferencesTab-BNb0oe0-.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-D5Jlnbpc.js +4 -0
  20. package/dist/assets/RolesTab-CJbSbslX.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-DZqIVTX4.js +1 -0
  22. package/dist/assets/{SubAgentReportsTab-CQuFTC8k.js → SubAgentReportsTab-P2LzjEwq.js} +1 -1
  23. package/dist/assets/ThemeShowroom-BUK8ki-n.js +1 -0
  24. package/dist/assets/{TimeRangePicker-Dtnfk3jk.js → TimeRangePicker-l2VQ6XRA.js} +1 -1
  25. package/dist/assets/TracesTab-DIAqI0Ii.js +1 -0
  26. package/dist/assets/UsersTab-3mWGoElG.js +1 -0
  27. package/dist/assets/{button-Bv-PK2-Y.js → button-DECMF9xc.js} +1 -1
  28. package/dist/assets/{card-B1IlPRv3.js → card-C772dq9N.js} +1 -1
  29. package/dist/assets/chevrons-up-down-DOCcrGX5.js +1 -0
  30. package/dist/assets/{compatView-dNW7KqXq.js → compatView-DNyIFFcm.js} +1 -1
  31. package/dist/assets/dispatchErrorInfo-DwGoSQtL.js +1 -0
  32. package/dist/assets/{dist-DIuY2jzI.js → dist-CbbrYJTZ.js} +1 -1
  33. package/dist/assets/{dist-DqF6O0L8.js → dist-CcezpVf5.js} +1 -1
  34. package/dist/assets/dist-Cm6iEVVR.js +44 -0
  35. package/dist/assets/{dist-LRVQ8Aeg.js → dist-CyzF5o6P.js} +1 -1
  36. package/dist/assets/{highlighted-body-OFNGDK62-M3coudTw.js → highlighted-body-OFNGDK62-6gc3uLm-.js} +1 -1
  37. package/dist/assets/index-B-Vyc9er.js +231 -0
  38. package/dist/assets/{index-BJ8KUScf.css → index-BXEqld-9.css} +1 -1
  39. package/dist/assets/mermaid-GHXKKRXX-C7r_B0wt.js +1 -0
  40. package/dist/assets/roleDescriptions-mJPQgYQb.js +1 -0
  41. package/dist/assets/{table-Dv9jX9eF.js → table-DLvIK9jU.js} +1 -1
  42. package/dist/assets/{tabs-BSiIDxTa.js → tabs-vaC1bfxC.js} +1 -1
  43. package/dist/assets/x-Bp69ZSrJ.js +1 -0
  44. package/dist/index.html +8 -8
  45. package/package.json +1 -1
  46. package/dist/assets/AccessTab-Cr3ztAfe.js +0 -1
  47. package/dist/assets/AgentFilesTab-vFxwzq66.js +0 -3
  48. package/dist/assets/AnomaliesTab-r5VxDkWH.js +0 -1
  49. package/dist/assets/AuditTab-BGhAhpvt.js +0 -1
  50. package/dist/assets/BridgeTab-RozR95O-.js +0 -1
  51. package/dist/assets/ChatDefaultsTab-hRkzEosi.js +0 -1
  52. package/dist/assets/FeedbacksTab-3VcXRruH.js +0 -1
  53. package/dist/assets/FilesTab-mOXihu5T.js +0 -1
  54. package/dist/assets/GroupsTab-Cpe1zCFE.js +0 -1
  55. package/dist/assets/InstancesTab-BxcnITXD.js +0 -1
  56. package/dist/assets/IntegrationsTab-DO__uVCz.js +0 -1
  57. package/dist/assets/KpiTab-DK6kxWKf.js +0 -1
  58. package/dist/assets/PreferencesTab-CuphjTEb.js +0 -1
  59. package/dist/assets/PromptInjectionsTab-Cfo4Mq-9.js +0 -4
  60. package/dist/assets/RolesTab-CDQcpiM5.js +0 -1
  61. package/dist/assets/ServiceAccountsTab-Bx5Kbxar.js +0 -1
  62. package/dist/assets/ThemeShowroom-Bb62MCzH.js +0 -1
  63. package/dist/assets/TracesTab-DKRy25rR.js +0 -1
  64. package/dist/assets/UsersTab-BLi7LEyO.js +0 -1
  65. package/dist/assets/chevrons-up-down-Drx4hbha.js +0 -1
  66. package/dist/assets/dispatchErrorInfo-BF7yQgVh.js +0 -1
  67. package/dist/assets/dist-Cjlv3ZK-.js +0 -44
  68. package/dist/assets/index-BWV7nAxJ.js +0 -229
  69. package/dist/assets/mermaid-GHXKKRXX-CHLSnVjI.js +0 -1
  70. package/dist/assets/roleDescriptions-Br5xnRg9.js +0 -1
  71. package/dist/assets/x-3dY-o4JV.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$f as r,Qf as i,Xf as a,Zf as o,_t as s,ap as c,bt as l,cp as u,ep as d,gt as f,ht as p,ip as m,mt as h,np as g,op as _,rp as v,sp as y,tp as b,vt as x,yt as S}from"./dist-Cjlv3ZK-.js";import{t as C}from"./button-Bv-PK2-Y.js";import{A as w,Mt as T,St as E,dt as D,ft as O,mt as k,pt as A,tt as j}from"./index-BWV7nAxJ.js";var M=t(e(),1),N={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function P(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=N[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function F(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:P(e.from,t)??t-N.h,to:P(e.to,t)??t}}var I=[{label:u(),from:`now-5m`},{label:y(),from:`now-15m`},{label:_(),from:`now-30m`},{label:c(),from:`now-1h`},{label:m(),from:`now-3h`},{label:v(),from:`now-6h`},{label:g(),from:`now-12h`},{label:b(),from:`now-24h`},{label:d(),from:`now-2d`},{label:r(),from:`now-7d`},{label:i(),from:`now-30d`},{label:o(),from:`now-90d`},{label:a(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,r]=(0,M.useState)(!1),[i,a]=(0,M.useState)(``),o=F(e),[c,u]=(0,M.useState)(()=>z(o.from)),[d,m]=(0,M.useState)(()=>z(o.to));function g(t){if(t){let t=F(e);u(z(t.from)),m(z(t.to)),a(``)}r(t)}function _(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function v(){let e=B(c),n=B(d);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let y=(0,M.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),b=B(c)!==null&&B(d)!==null;return(0,H.jsxs)(A,{open:n,onOpenChange:g,children:[(0,H.jsx)(k,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(T,{}),R(e)]})}),(0,H.jsx)(O,{children:(0,H.jsx)(D,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,H.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,H.jsx)(`div`,{className:`oc-timerange__section-title`,children:l()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:S()}),(0,H.jsx)(j,{type:`datetime-local`,value:c,onChange:e=>u(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:x()}),(0,H.jsx)(j,{type:`datetime-local`,value:d,onChange:e=>m(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!b,onClick:v,children:s()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(E,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(j,{value:i,onChange:e=>a(e.target.value),placeholder:f(),"aria-label":p()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:y.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:h()}):y.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>_(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$f as r,_t as i,ap as a,bt as o,cp as s,dp as c,ep as l,gt as u,ht as d,ip as f,lp as p,mt as m,np as h,op as g,rp as _,sp as v,tp as y,up as b,vt as x,yt as S}from"./dist-Cm6iEVVR.js";import{t as C}from"./button-DECMF9xc.js";import{A as w,Mt as T,St as E,dt as D,ft as O,mt as k,pt as A,tt as j}from"./index-B-Vyc9er.js";var M=t(e(),1),N={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function P(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=N[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function F(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:P(e.from,t)??t-N.h,to:P(e.to,t)??t}}var I=[{label:c(),from:`now-5m`},{label:b(),from:`now-15m`},{label:p(),from:`now-30m`},{label:s(),from:`now-1h`},{label:v(),from:`now-3h`},{label:g(),from:`now-6h`},{label:a(),from:`now-12h`},{label:f(),from:`now-24h`},{label:_(),from:`now-2d`},{label:h(),from:`now-7d`},{label:y(),from:`now-30d`},{label:l(),from:`now-90d`},{label:r(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,r]=(0,M.useState)(!1),[a,s]=(0,M.useState)(``),c=F(e),[l,f]=(0,M.useState)(()=>z(c.from)),[p,h]=(0,M.useState)(()=>z(c.to));function g(t){if(t){let t=F(e);f(z(t.from)),h(z(t.to)),s(``)}r(t)}function _(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function v(){let e=B(l),n=B(p);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let y=(0,M.useMemo)(()=>{let e=a.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[a]),b=B(l)!==null&&B(p)!==null;return(0,H.jsxs)(A,{open:n,onOpenChange:g,children:[(0,H.jsx)(k,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(T,{}),R(e)]})}),(0,H.jsx)(O,{children:(0,H.jsx)(D,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,H.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,H.jsx)(`div`,{className:`oc-timerange__section-title`,children:o()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:S()}),(0,H.jsx)(j,{type:`datetime-local`,value:l,onChange:e=>f(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:x()}),(0,H.jsx)(j,{type:`datetime-local`,value:p,onChange:e=>h(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!b,onClick:v,children:i()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(E,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(j,{value:a,onChange:e=>s(e.target.value),placeholder:u(),"aria-label":d()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:y.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:m()}):y.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsx)(`button`,{type:`button`,className:`oc-timerange__option`+(e.kind===`relative`&&e.from===t.from&&e.to===`now`?` is-active`:``),onClick:()=>_(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,$h as i,AC as a,Ah as o,BC as s,Bh as c,CC as l,D as u,E as d,FC as f,Fh as p,G as m,GC as h,Gh as g,HA as _,HC as v,Hh as y,IC as b,Ih as x,JC as S,Jh as C,K as w,KC as ee,Kh as te,LC as ne,Lh as re,MC as ie,Mh as ae,NC as T,Nh as oe,PC as E,Ph as se,QC as D,Qh as ce,RC as O,Rh as le,SC as k,TC as ue,UA as A,UC as j,Uh as de,VC as M,Vh as fe,WC as N,Wh as pe,XC as P,Xh as me,YC as he,Yh as ge,ZC as _e,Zh as ve,_C as ye,ag as be,bC as F,cg as xe,dC as I,dg as Se,eg as Ce,ew as we,fC as Te,fg as Ee,gC as De,hC as Oe,ig as ke,jC as L,jh as Ae,lg as je,mC as Me,mg as Ne,ng as Pe,og as Fe,pC as Ie,pg as Le,q as Re,qC as ze,qh as Be,rg as Ve,sg as He,tg as Ue,ug as We,vC as Ge,wC as Ke,xC as qe,yC as Je,zC as Ye,zh as Xe}from"./dist-Cm6iEVVR.js";import{n as Ze}from"./dist-CyzF5o6P.js";import{t as Qe}from"./x-Bp69ZSrJ.js";import{i as R,n as z,r as $e,t as et}from"./tabs-vaC1bfxC.js";import{t as B}from"./button-DECMF9xc.js";import{A as V,C as H,Dt as tt,Ft as nt,It as rt,N as it,Ot as at,S as U,a as ot,b as W,et as G,i as st,it as ct,j as lt,jt as ut,nt as dt,o as ft,ot as pt,r as mt,rt as ht,st as gt,ut as _t,w as K,x as q}from"./index-B-Vyc9er.js";import{n as vt}from"./TimeRangePicker-l2VQ6XRA.js";import{t as yt}from"./FilterBar-C8Wq0ph8.js";import{t as bt}from"./AdvancedFilter-CFbVcIVy.js";import{t as xt}from"./DataTableShell-BSo6Gpdb.js";var St=u(`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`}]]),Ct=u(`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`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?f():n===`agent`?`${E()} - ${r}`:e}function Tt(){let e=A(d.me.getMe,{host:_t})?.role===`admin`,t=A(d.deliveryTiming.getDeliveryStatus,{}),n=_(d.deliveryTiming.startDeliveryRecord),i=_(d.deliveryTiming.stopDeliveryRecord),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await i({}):await n({})}finally{c(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:we()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:r()})]}),e?(0,Y.jsx)(B,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?_e():D()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(G,{variant:`secondary`,children:P()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:he({time:lt(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?ee():ze()})}),a?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=A(d.deliveryTiming.listDeliverySessions,{}),n=_(d.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,o]=(0,J.useState)(`all`),[c,l]=(0,J.useState)(X),[u,f]=(0,J.useState)(null),{from:p,to:m}=vt(c),g=c.to===`now`?1/0:m,y=r.trim()!==``||a!==`all`||c!==X,x=()=>{i(``),o(`all`),l(X)},S=(0,J.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>=p&&t.startedAt<=g).map(e=>({...e,_id:e.sessionId}))},[t,r,a,p,g]),C=e=>{let t=new Set((S??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&f(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:N(),timeRange:c,onTimeRangeChange:l,onReset:x,canReset:y,children:(0,Y.jsxs)(W,{value:a,onValueChange:e=>o(e),children:[(0,Y.jsx)(H,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(K,{})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:`all`,children:j()}),(0,Y.jsx)(U,{value:`active`,children:v()}),(0,Y.jsx)(U,{value:`stopped`,children:M()})]})]})}),(0,Y.jsx)(xt,{title:h(),rows:S,emptyHint:Te(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(B,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?ie():T(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(at,{size:15,"aria-hidden":!0})})},{header:s(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:V(e.startedAt)})},{header:Ye(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:V(e.stoppedAt)})},{header:O(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:ne(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:b(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(G,{variant:`secondary`,children:v()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:M()})}],rowActions:e?e=>[{label:L(),variant:`destructive`,onSelect:()=>C([e.sessionId])}]:void 0,bulkActions:e?[{label:L(),variant:`destructive`,onSelect:e=>C(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=A(d.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:a()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:S()});let r=e.segments,i=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[Z(t.p50),` / `,Z(t.p95),` / `,Z(t.max)]})]});return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,I()]}),(0,Y.jsxs)(B,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Ze,{size:13,"aria-hidden":!0}):(0,Y.jsx)(ut,{size:13,"aria-hidden":!0}),t?Ie():Me()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:l()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:k()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:qe()})]})}),(0,Y.jsxs)(`tbody`,{children:[i(F(),r.bridge),i(Je(),r.A),i(Ge(),r.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:ye()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Oe()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:De()})]})}var kt=[50,100,200,500],At=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:Re()},{value:`principalType`,label:w()},{value:`direction`,label:`direction`},{value:`roleKey`,label:m()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=rt({from:`/settings/traces`}),t=nt({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,o=e.principalType??Q,s=e.direction??Q,l=e.roleKey??Q,u=e.q??``,f=mt(e.from,e.to),m=(0,J.useMemo)(()=>ft(e.adv),[e.adv]),{from:h,to:_}=vt(f),[v,b]=(0,J.useState)(null),[S,w]=(0,J.useState)(null),ee=e=>void t({search:t=>({...t,limit:e})}),ne=e=>void t({search:t=>({...t,kind:e})}),ie=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),ae=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),T=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),E=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),D=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,...ot(e)})}),k=e=>void t({search:t=>({...t,adv:st(e)}),replace:!0}),j=A(d.observability.listEvents,{limit:n}),M=A(d.observability.listEvents,{limit:n,kind:r===At?void 0:r,filter:{q:u||void 0,from:h,to:_,statusClass:a===Q?void 0:a,principalType:o===Q?void 0:o,direction:s===Q?void 0:s,roleKey:l===Q?void 0:l,advanced:m.length>0?m:void 0}}),N=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),P=(0,J.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),he=u!==``||a!==Q||o!==Q||s!==Q||l!==Q||m.length>0||f.kind!==`relative`||f.from!==Pt.from;function _e(){t({search:{limit:100,kind:`all`},replace:!0})}let ye=v?j?.filter(e=>e.correlationId===v):M,[F,I]=(0,J.useState)(`events`);return(0,Y.jsxs)(et,{value:F,onValueChange:e=>I(e),children:[(0,Y.jsxs)($e,{className:`w-full`,children:[(0,Y.jsxs)(R,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(tt,{size:13,"aria-hidden":!0}),ue()]}),(0,Y.jsxs)(R,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),Ke()]})]}),(0,Y.jsx)(z,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(z,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[Ne(),(0,Y.jsx)(`strong`,{children:Le()}),Ee(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:Se()})]}),(0,Y.jsxs)(yt,{q:u,onQChange:ie,searchPlaceholder:We(),timeRange:f,onTimeRangeChange:O,onReset:_e,canReset:he,children:[(0,Y.jsxs)(W,{value:a,onValueChange:ae,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:je()})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:Q,children:xe()}),jt.map(e=>(0,Y.jsx)(U,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:o,onValueChange:T,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:He()})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:Q,children:Fe()}),Mt.map(e=>(0,Y.jsx)(U,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:s,onValueChange:E,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(K,{placeholder:be()})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:Q,children:ke()}),Nt.map(e=>(0,Y.jsx)(U,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:l,onValueChange:D,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(K,{placeholder:Ve()})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:Q,children:Pe()}),P.map(e=>(0,Y.jsx)(U,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:r,onValueChange:ne,children:[(0,Y.jsx)(H,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(K,{placeholder:Ue()})}),(0,Y.jsxs)(q,{children:[(0,Y.jsx)(U,{value:At,children:Ce()}),N.map(e=>(0,Y.jsx)(U,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:String(n),onValueChange:e=>ee(Number(e)),children:[(0,Y.jsx)(H,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(K,{})}),(0,Y.jsx)(q,{children:kt.map(e=>(0,Y.jsx)(U,{value:String(e),children:i({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:m,onChange:k}),v?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>b(null),title:ce(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ve(),(0,Y.jsx)(`code`,{children:$(v)})]}),(0,Y.jsx)(Qe,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:me()})]})}):null,(0,Y.jsx)(xt,{title:ge(),rows:ye,emptyHint:v?C():Be(),columns:[{header:te(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:V(e.at)})},{header:g(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(G,{variant:`secondary`,children:e.kind})},{header:pe(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":de(),children:`✓`})}},{header:y(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(G,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:fe(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(G,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:c(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(G,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Xe(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:le(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:re(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:x(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:p(),onClick:()=>b(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:se(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(B,{variant:`outline`,size:`sm`,onClick:()=>w(e),children:oe()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:S,onClose:()=>w(null)})]})]})}function Lt(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 Rt(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 zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(dt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(ht,{className:`max-w-lg`,children:[(0,Y.jsxs)(pt,{children:[(0,Y.jsxs)(gt,{className:`oc-traces__meta-title`,children:[ae(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(G,{variant:`outline`,children:Ae()})]}),(0,Y.jsx)(ct,{children:o()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$m as r,Ab as i,Bb as a,Cb as o,Db as s,Dc as c,E as l,Eb as u,Ec as d,Fb as f,Gb as p,Gm as m,HA as h,Hb as ee,Ib as te,Jb as g,Jm as _,Kb as ne,Km as v,Lb as re,Mb as ie,Nb as ae,Ob as oe,Oc as y,Pb as se,Qm as b,Rb as ce,Sb as le,Tb as ue,UA as x,Ub as S,Vb as C,Wb as de,Wm as w,Xm as T,Yb as E,Ym as D,Zm as O,eh as k,jb as fe,kb as pe,nb as me,nh as A,qb as j,qm as M,th as N,wb as he,xb as ge,zb as _e}from"./dist-Cm6iEVVR.js";import{t as P}from"./button-DECMF9xc.js";import{$ as F,C as I,F as ve,Ft as ye,I as be,It as xe,J as L,P as R,S as z,X as Se,Y as Ce,Z as we,b as B,bt as V,c as Te,et as H,it as Ee,l as U,nt as De,ot as Oe,p as W,rt as ke,s as G,st as Ae,ut as je,w as K,x as q,xt as J}from"./index-B-Vyc9er.js";import{t as Y}from"./FilterBar-C8Wq0ph8.js";import{t as Me}from"./DataTableShell-BSo6Gpdb.js";import{t as Ne}from"./DetailChips-DgPWeAKa.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:i}){let a=x(l.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=x(l.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(o??[]).find(e=>e.isDefault)??null,u=c?`${c.instanceName}/${c.agentId}`:null,d=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),f=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!d.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}))],p=new Map;for(let e of f){let t=p.get(e.instanceName)??[];t.push(e),p.set(e.instanceName,t)}return(0,Z.jsx)(De,{open:n,onOpenChange:i,children:(0,Z.jsxs)(ke,{className:`oc-access`,children:[(0,Z.jsxs)(Oe,{children:[(0,Z.jsx)(Ae,{children:A({user:t})}),(0,Z.jsx)(Ee,{children:N()})]}),a?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?k():r()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:b()}):f.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:D()}):[...p.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:u},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=h(l.agents.assignAgent),s=h(l.agents.removeAgent),c=h(l.agents.setDefaultAgent),u=R();if(!e)return null;async function d(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(O(),e)}}async function f(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(T(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(J,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(H,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,Z.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Z.jsx)(W,{checked:r,disabled:s&&!r,onCheckedChange:()=>void d(e.agentId,r),"aria-label":_({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Z.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:M()}):null,e.outOfPool?(0,Z.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:v()}):null,r?o?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":m(),title:m(),children:(0,Z.jsx)(V,{size:14,fill:`currentColor`})}):(0,Z.jsx)(P,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":w(),title:w(),onClick:()=>void f(e.agentId),children:(0,Z.jsx)(V,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return d();case`user`:return c();case`admin`:return y();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=G.filter(e=>n.has(U[e])).length;return(0,Z.jsxs)(L,{children:[(0,Z.jsx)(F,{asChild:!0,children:(0,Z.jsx)(P,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?E():g({count:r})})}),(0,Z.jsxs)(Ce,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(we,{children:j()}),G.map(e=>{let r=U[e];return(0,Z.jsxs)(Se,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(W,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:Te[e]()})]},e)})]})]})}function Le(){let e=xe({from:`/settings/users`}),t=ye({from:`/settings/users`}),n=e.q??``,r=e.role??Q,c=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),d=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),m=x(l.admin.listUsers,{filter:{q:n||void 0,role:r===Q?void 0:r},withAgents:!0}),g=x(l.me.getMe,{host:je}),_=h(l.admin.setRole),v=h(l.admin.setUserPermissions),y=h(l.admin.startImpersonation),b=h(l.admin.deleteUser),w=h(l.admin.setUserName),T=ve(),E=be(),D=R(),[O,k]=(0,X.useState)(null),A=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of m??[])e.add(t.role);return[...e]},[m]),j=n!==``||r!==Q;function M(){t({search:{},replace:!0})}async function N(e){try{await _(e)}catch(e){D.error(ne(),e)}}async function P(e){try{await v(e)}catch(e){D.error(p(),e)}}async function F(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await T({title:ce(),description:re({user:t}),confirmWord:te(),confirmLabel:f(),destructive:!0}))try{await b({profileId:e._id}),D.success(ae({user:t}))}catch(e){D.error(se(),e)}}async function L(e){let t=e.email||e.name||e.userId.slice(0,8),n=await E({title:fe(),label:i({user:t}),placeholder:pe(),defaultValue:e.name??``,confirmLabel:me()});if(n!==null)try{await w({profileId:e._id,name:n}),D.success(oe())}catch(e){D.error(s(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{q:n,onQChange:c,searchPlaceholder:de(),onReset:M,canReset:j,children:(0,Z.jsxs)(B,{value:r,onValueChange:d,children:[(0,Z.jsx)(I,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(K,{})}),(0,Z.jsxs)(q,{children:[(0,Z.jsx)(z,{value:Q,children:S()}),A.map(e=>(0,Z.jsx)(z,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:ee(),rows:m,emptyHint:C(),rowActions:e=>{let t=[{label:ge(),onSelect:()=>k({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ie(),onSelect:()=>void L(e)}];return e.userId!==g?.userId&&t.push({label:a(),onSelect:()=>void y({profileId:e._id})},{label:_e(),variant:`destructive`,onSelect:()=>void F(e)}),t},columns:[{header:u(),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,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{children:t}),n?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:ue(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(B,{value:e.role,onValueChange:t=>void N({profileId:e._id,role:t}),children:[(0,Z.jsx)(I,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(K,{})}),(0,Z.jsxs)(q,{children:[(0,Z.jsx)(z,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(z,{value:`user`,children:$(`user`)}),(0,Z.jsx)(z,{value:`admin`,children:$(`admin`)})]})]})},{header:he(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:o()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),P({profileId:e._id,permissions:[...n]})}})},{header:le(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(J,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Pe,{profileId:O?.profileId??null,userLabel:O?.label??``,open:O!==null,onOpenChange:e=>{e||k(null)}})]})}export{Le as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-Cjlv3ZK-.js";e();var a=t(),o=r(`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:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-Cm6iEVVR.js";e();var a=t(),o=r(`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:r=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?i:`button`,{"data-slot":`button`,"data-variant":t,"data-size":r,className:n(o({variant:t,size:r,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-Cjlv3ZK-.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-Cm6iEVVR.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{D as e}from"./dist-Cm6iEVVR.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{Ga as e,Ja as t,Ka as n,Xa as r,Ya as i,ao as a}from"./dist-Cjlv3ZK-.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`?r():e===`beyond`?i():t()}function p(e){return e??a()}function m(t){return t===null?e():n({version:t})}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{Ga as e,Ja as t,Ka as n,Xa as r,Ya as i,ao as a}from"./dist-Cm6iEVVR.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`?r():e===`beyond`?i():t()}function p(e){return e??a()}function m(t){return t===null?e():n({version:t})}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{Au as e,Cu as t,Du as n,Eu as r,Fu as i,Iu as a,Lu as o,Mu as s,Nu as c,Ou as l,Pu as u,Ru as d,Su as f,Tu as p,_u as m,bu as h,du as g,fu as _,gu as v,hu as y,ju as b,ku as x,mu as S,pu as C,uu as w,vu as T,wu as E,xu as D,yu as O}from"./dist-Cm6iEVVR.js";var k={AGENT_NOT_FOUND:()=>({label:d(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:a(),hint:i()}),DEVICE_SIGNING_FAILED:()=>({label:u(),hint:c()}),SESSION_SCOPE_DENIED:()=>({label:s(),hint:b()}),GATEWAY_TIMEOUT:()=>({label:e(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:l(),hint:n()}),ATTACHMENT_TOO_LARGE:()=>({label:E(),hint:t()}),ATTACHMENT_REJECTED:()=>({label:f(),hint:D()}),BRIDGE_UNREACHABLE:()=>({label:r(),hint:p()}),INVALID_REQUEST:()=>({label:h(),hint:O()}),NOT_CONFIGURED:()=>({label:T(),hint:m()}),UNROUTED:()=>({label:v(),hint:y()}),UPSTREAM_ERROR:()=>({label:S(),hint:C()}),UNKNOWN:()=>({label:_(),hint:g()})};function A(e){return e?k[e]?.()??{label:e,hint:w()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-Cjlv3ZK-.js";var s=r(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=r(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,r]=o(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,r]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-Cm6iEVVR.js";var s=r(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),c=r(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),l=t(e(),1),u=n();function d(e){let t=e+`CollectionProvider`,[n,r]=o(t),[s,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=l.useRef(null),i=l.useRef(new Map).current;return(0,u.jsx)(s,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=l.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,u.jsx)(p,{ref:a(t,c(f,n).collectionRef),children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=l.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=l.useRef(null),s=a(t,o),d=c(h,n);return l.useEffect(()=>(d.itemMap.set(o,{ref:o,...i}),()=>void d.itemMap.delete(o))),(0,u.jsx)(_,{[g]:``,ref:s,children:r})});v.displayName=h;function y(t){let n=c(e+`CollectionConsumer`,t);return l.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,r]}var f=l.createContext(void 0);function p(e){let t=l.useContext(f);return e||t||`ltr`}export{s as i,d as n,c as r,p as t};
@@ -1,4 +1,4 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-Cjlv3ZK-.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=l(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]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),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=i(t,a.triggerRef);return(0,y.jsx)(_.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,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(s,{present:n||a.open,children:(0,y.jsx)(m,{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)(s,{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)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.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)(s,{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),a=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,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:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:l.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:l.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(_.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)(_.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)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(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{S as r,T as i,a,c as o,d as s,f as c,h as l,i as u,l as d,m as f,o as p,s as m,u as h,v as g,y as _}from"./dist-Cm6iEVVR.js";var v=t(e(),1),y=n(),b=`Dialog`,[x,S]=l(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]=c({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),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=i(t,a.triggerRef);return(0,y.jsx)(_.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,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(s,{present:n||a.open,children:(0,y.jsx)(m,{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)(s,{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)(a,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(_.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)(s,{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),a=i(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return u(e)},[]),(0,y.jsx)(B,{...e,ref:a,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:a,onCloseAutoFocus:s,...c}=e,l=w(I,n),u=v.useRef(null),f=i(t,u);return p(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(o,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:s,children:(0,y.jsx)(d,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":q(l.open),...c,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:l.titleId}),(0,y.jsx)($,{contentRef:u,descriptionId:l.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(_.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)(_.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)(_.button,{type:`button`,...r,ref:t,onClick:g(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=f(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