@lacneu/atrium 0.45.0 → 0.46.0

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-CnqowIoW.js +1 -0
  2. package/dist/assets/{AdvancedFilter-DTbUf7Uh.js → AdvancedFilter-BwM0tgcf.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DDg4ICzb.js +3 -0
  4. package/dist/assets/AnomaliesTab-CGcJ3wmF.js +1 -0
  5. package/dist/assets/AuditTab-zCOZM2TR.js +1 -0
  6. package/dist/assets/BridgeTab-CNu53hNw.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-B46jHJ28.js +1 -0
  8. package/dist/assets/{DataTableShell-Cu3JqhO0.js → DataTableShell-q5ZC3kNL.js} +1 -1
  9. package/dist/assets/{DetailChips-DsU6cc30.js → DetailChips-BI5FFFCD.js} +1 -1
  10. package/dist/assets/FeedbacksTab-CBcmw16u.js +1 -0
  11. package/dist/assets/{FieldLabel-CK9i2-CR.js → FieldLabel--ykPvwgz.js} +1 -1
  12. package/dist/assets/FilesTab-D3HsZ9ry.js +1 -0
  13. package/dist/assets/{FilterBar-BIebILEF.js → FilterBar-Bjp3W3-O.js} +1 -1
  14. package/dist/assets/GroupsTab-VfM-4Ecl.js +1 -0
  15. package/dist/assets/InstancesTab-F3IfZLE3.js +1 -0
  16. package/dist/assets/IntegrationsTab-DJxr_XK1.js +1 -0
  17. package/dist/assets/{KpiTab-CUvEA1Vs.js → KpiTab-D6fmcfqo.js} +1 -1
  18. package/dist/assets/PreferencesTab-B41aNAtO.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-C5r10hCQ.js +4 -0
  20. package/dist/assets/RolesTab-CYEWa_KN.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-BszQMvl9.js +1 -0
  22. package/dist/assets/{SubAgentReportsTab-VpnYYzS8.js → SubAgentReportsTab-thWzL8aO.js} +1 -1
  23. package/dist/assets/ThemeShowroom-DpP1Qhwh.js +1 -0
  24. package/dist/assets/{TimeRangePicker-NNSu8mCt.js → TimeRangePicker-DyTyIIGL.js} +1 -1
  25. package/dist/assets/TracesTab-DeyNQxGK.js +1 -0
  26. package/dist/assets/UsersTab-BLqkvz9t.js +1 -0
  27. package/dist/assets/VoiceTab-Bd-wwhq_.js +1 -0
  28. package/dist/assets/{button-DK1qmYDJ.js → button-BZ2ghM2f.js} +1 -1
  29. package/dist/assets/{card-D0s3oDw3.js → card-CDvtHf5l.js} +1 -1
  30. package/dist/assets/chevrons-up-down-DVUxe1j7.js +1 -0
  31. package/dist/assets/{compatView-D2caU8vq.js → compatView-e2VbQwBf.js} +1 -1
  32. package/dist/assets/dispatchErrorInfo-DDqhw8fE.js +1 -0
  33. package/dist/assets/{dist-Ciwp9Ovi.js → dist-C6Q7qHg4.js} +1 -1
  34. package/dist/assets/{dist-DCABHmKq.js → dist-C6Yu7C_m.js} +1 -1
  35. package/dist/assets/dist-CQKky_Rh.js +44 -0
  36. package/dist/assets/{dist-8uYlaw3Q.js → dist-Dp0-U7Ca.js} +1 -1
  37. package/dist/assets/{highlighted-body-OFNGDK62-DSUwEB_f.js → highlighted-body-OFNGDK62-BAwLXCoD.js} +1 -1
  38. package/dist/assets/index-BuqxeAUW.js +233 -0
  39. package/dist/assets/mermaid-GHXKKRXX-ruH5qf7k.js +1 -0
  40. package/dist/assets/{pdf-Bkk0DZGy.js → pdf-CalEjQAS.js} +1 -1
  41. package/dist/assets/roleDescriptions-Bkj7WtCA.js +1 -0
  42. package/dist/assets/{table-EwCph6eW.js → table-IXupQ5w1.js} +1 -1
  43. package/dist/assets/{tabs-oKL6bnDA.js → tabs-e0oOoEId.js} +1 -1
  44. package/dist/assets/x-Do-PZuRM.js +1 -0
  45. package/dist/index.html +7 -7
  46. package/package.json +1 -1
  47. package/dist/assets/AccessTab-CeM6DU3j.js +0 -1
  48. package/dist/assets/AgentFilesTab-CMkpQWSX.js +0 -3
  49. package/dist/assets/AnomaliesTab-D0i-H1F-.js +0 -1
  50. package/dist/assets/AuditTab-BGkuzfTz.js +0 -1
  51. package/dist/assets/BridgeTab-RQWxNBYu.js +0 -1
  52. package/dist/assets/ChatDefaultsTab-CsSF3H0g.js +0 -1
  53. package/dist/assets/FeedbacksTab-BjSu8m8B.js +0 -1
  54. package/dist/assets/FilesTab-VunHJ3Lm.js +0 -1
  55. package/dist/assets/GroupsTab-CdZIVswx.js +0 -1
  56. package/dist/assets/InstancesTab-CTiBjGZm.js +0 -1
  57. package/dist/assets/IntegrationsTab-BFgO7Lv0.js +0 -1
  58. package/dist/assets/PreferencesTab-B4SJqQ6Q.js +0 -1
  59. package/dist/assets/PromptInjectionsTab-iWFE9MNO.js +0 -4
  60. package/dist/assets/RolesTab-BBIaufnh.js +0 -1
  61. package/dist/assets/ServiceAccountsTab-JBIFWSDh.js +0 -1
  62. package/dist/assets/ThemeShowroom-3hLnrfvP.js +0 -1
  63. package/dist/assets/TracesTab-pFMHb6OV.js +0 -1
  64. package/dist/assets/UsersTab-CQyH6-vc.js +0 -1
  65. package/dist/assets/VoiceTab-CPXr9SEe.js +0 -1
  66. package/dist/assets/chevrons-up-down-DOso-2c4.js +0 -1
  67. package/dist/assets/dispatchErrorInfo-evHHi1jG.js +0 -1
  68. package/dist/assets/dist-TE9n7zkZ.js +0 -44
  69. package/dist/assets/index-ctX_-fgr.js +0 -233
  70. package/dist/assets/mermaid-GHXKKRXX-DWoP8Llb.js +0 -1
  71. package/dist/assets/roleDescriptions-CCsDWcXg.js +0 -1
  72. package/dist/assets/x-C-AIvdVt.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$n as r,Bm as i,Fm as a,Gm as o,Hm as s,Im as c,Km as l,Lm as u,Pm as d,Rm as f,Um as p,Vm as m,Wm as h,ar as g,er as _,ir as v,nr as y,rr as b,tr as x,zm as S}from"./dist-TE9n7zkZ.js";import{t as C}from"./button-DK1qmYDJ.js";import{Ct as w,Gt as T,Pt as E,St as D,Tt as O,j as k,lt as A,wt as j}from"./index-ctX_-fgr.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:l(),from:`now-5m`},{label:o(),from:`now-15m`},{label:h(),from:`now-30m`},{label:p(),from:`now-1h`},{label:s(),from:`now-3h`},{label:m(),from:`now-6h`},{label:i(),from:`now-12h`},{label:S(),from:`now-24h`},{label:f(),from:`now-2d`},{label:u(),from:`now-7d`},{label:c(),from:`now-30d`},{label:a(),from:`now-90d`},{label:d(),from:`now-520w`}];function L(e){return k(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,i]=(0,M.useState)(!1),[a,o]=(0,M.useState)(``),s=F(e),[c,l]=(0,M.useState)(()=>z(s.from)),[u,d]=(0,M.useState)(()=>z(s.to));function f(t){if(t){let t=F(e);l(z(t.from)),d(z(t.to)),o(``)}i(t)}function p(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function m(){let e=B(c),n=B(u);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!1))}let h=(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]),S=B(c)!==null&&B(u)!==null;return(0,H.jsxs)(j,{open:n,onOpenChange:f,children:[(0,H.jsx)(O,{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)(w,{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:g()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:v()}),(0,H.jsx)(A,{type:`datetime-local`,value:c,onChange:e=>l(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:b()}),(0,H.jsx)(A,{type:`datetime-local`,value:u,onChange:e=>d(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:m,children:y()})]}),(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)(A,{value:a,onChange:e=>o(e.target.value),placeholder:x(),"aria-label":_()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:h.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:r()}):h.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:()=>p(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{$n as r,Bm as i,Fm as a,Gm as o,Hm as s,Im as c,Km as l,Lm as u,Rm as d,Um as f,Vm as p,Wm as m,ar as h,er as g,ir as _,nr as v,qm as y,rr as b,tr as x,zm as S}from"./dist-CQKky_Rh.js";import{t as C}from"./button-BZ2ghM2f.js";import{Ct as w,Gt as T,Pt as E,St as D,Tt as O,j as k,lt as A,wt as j}from"./index-BuqxeAUW.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:y(),from:`now-5m`},{label:l(),from:`now-15m`},{label:o(),from:`now-30m`},{label:m(),from:`now-1h`},{label:f(),from:`now-3h`},{label:s(),from:`now-6h`},{label:p(),from:`now-12h`},{label:i(),from:`now-24h`},{label:S(),from:`now-2d`},{label:d(),from:`now-7d`},{label:u(),from:`now-30d`},{label:c(),from:`now-90d`},{label:a(),from:`now-520w`}];function L(e){return k(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,i]=(0,M.useState)(!1),[a,o]=(0,M.useState)(``),s=F(e),[c,l]=(0,M.useState)(()=>z(s.from)),[u,d]=(0,M.useState)(()=>z(s.to));function f(t){if(t){let t=F(e);l(z(t.from)),d(z(t.to)),o(``)}i(t)}function p(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function m(){let e=B(c),n=B(u);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!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]),S=B(c)!==null&&B(u)!==null;return(0,H.jsxs)(j,{open:n,onOpenChange:f,children:[(0,H.jsx)(O,{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)(w,{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:h()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:_()}),(0,H.jsx)(A,{type:`datetime-local`,value:c,onChange:e=>l(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:b()}),(0,H.jsx)(A,{type:`datetime-local`,value:u,onChange:e=>d(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:m,children:v()})]}),(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)(A,{value:a,onChange:e=>o(e.target.value),placeholder:x(),"aria-label":g()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:y.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:r()}):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:()=>p(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{$w as r,A_ as i,B_ as a,Bw as o,C_ as s,Cw as c,D as l,D_ as u,E as d,E_ as f,Ew as p,F_ as ee,Fw as m,G_ as h,Gj as g,Gw as _,H_ as v,Hw as y,I_ as b,Iw as x,J_ as te,Jw as ne,K_ as re,Kw as ie,L_ as ae,Lw as S,M_ as oe,Mw as C,N_ as se,Nw as w,O_ as ce,P_ as le,Pw as T,Qw as E,R_ as ue,Rw as D,S_ as de,Sw as O,T_ as fe,Tw as pe,U_ as me,Uw as k,V_ as he,Vw as ge,W_ as _e,Wj as A,Ww as ve,X_ as ye,Xw as be,Y_ as xe,Yw as Se,Zw as j,__ as Ce,_w as we,b_ as Te,bw as Ee,eT as De,f_ as M,fw as N,g_ as Oe,gn as P,gw as F,h_ as ke,hn as I,hw as Ae,j_ as je,jw as Me,k_ as Ne,m_ as Pe,mn as Fe,mw as Ie,p_ as Le,pw as Re,q_ as ze,qw as Be,tT as Ve,v_ as He,vw as Ue,w_ as We,ww as Ge,x_ as Ke,xw as qe,y_ as Je,yw as Ye,z_ as Xe,zw as Ze}from"./dist-CQKky_Rh.js";import{n as Qe}from"./dist-Dp0-U7Ca.js";import{t as $e}from"./x-Do-PZuRM.js";import{i as L,n as R,r as et,t as tt}from"./tabs-e0oOoEId.js";import{t as z}from"./button-BZ2ghM2f.js";import{Bt as nt,C as B,M as rt,P as it,S as V,Vt as at,Wt as ot,Xt as st,Yt as ct,a as lt,b as H,ct as U,dt as ut,ft as dt,ht as ft,i as pt,j as W,mt,o as ht,r as gt,ut as _t,w as G,x as K,xt as vt}from"./index-BuqxeAUW.js";import{n as yt}from"./TimeRangePicker-DyTyIIGL.js";import{t as bt}from"./FilterBar-Bjp3W3-O.js";import{t as xt}from"./AdvancedFilter-BwM0tgcf.js";import{t as St}from"./DataTableShell-q5ZC3kNL.js";var Ct=l(`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`}]]),wt=l(`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 Tt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?x():n===`agent`?`${m()} - ${r}`:e}function Et(){let e=g(d.me.getMe,{host:vt})?.role===`admin`,t=g(d.deliveryTiming.getDeliveryStatus,{}),n=A(d.deliveryTiming.startDeliveryRecord),i=A(d.deliveryTiming.stopDeliveryRecord),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await i({}):await n({})}finally{c(!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:Ve()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:De()})]}),e?(0,J.jsx)(z,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?E():r()}):null]}),l?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:j()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:be({time:rt(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?Be():ne()})}),a?(0,J.jsx)(Dt,{isAdmin:e}):null]})}function Dt({isAdmin:e}){let t=g(d.deliveryTiming.listDeliverySessions,{}),n=A(d.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,s]=(0,q.useState)(`all`),[c,l]=(0,q.useState)(Y),[u,f]=(0,q.useState)(null),{from:p,to:ee}=yt(c),m=c.to===`now`?1/0:ee,h=r.trim()!==``||a!==`all`||c!==Y,v=()=>{i(``),s(`all`),l(Y)},b=(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>=p&&t.startedAt<=m).map(e=>({...e,_id:e.sessionId}))},[t,r,a,p,m]),x=e=>{let t=new Set((b??[]).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,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(bt,{q:r,onQChange:i,searchPlaceholder:_(),timeRange:c,onTimeRangeChange:l,onReset:v,canReset:h,children:(0,J.jsxs)(H,{value:a,onValueChange:e=>s(e),children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(G,{})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:`all`,children:ve()}),(0,J.jsx)(V,{value:`active`,children:k()}),(0,J.jsx)(V,{value:`stopped`,children:y()})]})]})}),(0,J.jsx)(St,{title:ie(),rows:b,emptyHint:Re(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?w():T(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,J.jsx)(Ct,{size:15,"aria-hidden":!0}):(0,J.jsx)(at,{size:15,"aria-hidden":!0})})},{header:ge(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:W(e.startedAt)})},{header:o(),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:W(e.stoppedAt)})},{header:Ze(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:D(),sort:e=>e.startedBy,cell:e=>Tt(e.startedBy)},{header:S(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(U,{variant:`secondary`,children:k()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:y()})}],rowActions:e?e=>[{label:C(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:C(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,J.jsx)(Ot,{sessionId:e.sessionId})})]})}function Ot({sessionId:e}){let t=g(d.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(kt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function kt({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Me()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Se()});let r=e.segments,i=(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,` `,N()]}),(0,J.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,J.jsx)(ot,{size:13,"aria-hidden":!0}),t?Ie():Ae()]})]}),(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:Ge()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:c()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:O()})]})}),(0,J.jsxs)(`tbody`,{children:[i(qe(),r.bridge),i(Ee(),r.A),i(Ye(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ue()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:F()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:we()})]})}var At=[50,100,200,500],Z=`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:P()},{value:`principalType`,label:I()},{value:`direction`,label:`direction`},{value:`roleKey`,label:Fe()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=st({from:`/settings/traces`}),t=ct({from:`/settings/traces`}),n=e.limit,r=e.kind,o=e.statusClass??Q,c=e.principalType??Q,l=e.direction??Q,m=e.roleKey??Q,_=e.q??``,y=gt(e.from,e.to),x=(0,q.useMemo)(()=>ht(e.adv),[e.adv]),{from:ne,to:ie}=yt(y),[S,C]=(0,q.useState)(null),[w,T]=(0,q.useState)(null),E=e=>void t({search:t=>({...t,limit:e})}),D=e=>void t({search:t=>({...t,kind:e})}),O=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),k=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),ge=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})}),ve=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),be=e=>void t({search:t=>({...t,...lt(e)})}),Se=e=>void t({search:t=>({...t,adv:pt(e)}),replace:!0}),j=g(d.observability.listEvents,{limit:n}),we=g(d.observability.listEvents,{limit:n,kind:r===Z?void 0:r,filter:{q:_||void 0,from:ne,to:ie,statusClass:o===Q?void 0:o,principalType:c===Q?void 0:c,direction:l===Q?void 0:l,roleKey:m===Q?void 0:m,advanced:x.length>0?x:void 0}}),Ee=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),De=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),M=_!==``||o!==Q||c!==Q||l!==Q||m!==Q||x.length>0||y.kind!==`relative`||y.from!==Pt.from;function N(){t({search:{limit:100,kind:`all`},replace:!0})}let P=S?j?.filter(e=>e.correlationId===S):we,F=e.section,I=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(tt,{value:F,onValueChange:e=>I(e),children:[(0,J.jsxs)(et,{className:`w-full`,children:[(0,J.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(nt,{size:13,"aria-hidden":!0}),p()]}),(0,J.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(wt,{size:13,"aria-hidden":!0}),pe()]})]}),(0,J.jsx)(R,{value:`latency`,children:(0,J.jsx)(Et,{})}),(0,J.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[ye(),(0,J.jsx)(`strong`,{children:xe()}),te(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:ze()})]}),(0,J.jsxs)(bt,{q:_,onQChange:O,searchPlaceholder:re(),timeRange:y,onTimeRangeChange:be,onReset:N,canReset:M,children:[(0,J.jsxs)(H,{value:o,onValueChange:k,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:h()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:_e()}),jt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:c,onValueChange:ge,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:me()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:v()}),Mt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:l,onValueChange:A,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:he()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:a()}),Nt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:m,onValueChange:ve,children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(G,{placeholder:Xe()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:ue()}),De.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:r,onValueChange:D,children:[(0,J.jsx)(B,{size:`sm`,className:`w-44`,children:(0,J.jsx)(G,{placeholder:ae()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Z,children:b()}),Ee.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:String(n),onValueChange:e=>E(Number(e)),children:[(0,J.jsx)(B,{size:`sm`,className:`w-28`,children:(0,J.jsx)(G,{})}),(0,J.jsx)(K,{children:At.map(e=>(0,J.jsx)(V,{value:String(e),children:ee({count:e})},e))})]})]}),(0,J.jsx)(xt,{fields:Ft,seed:x,onChange:Se}),S?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>C(null),title:le(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[se(),(0,J.jsx)(`code`,{children:$(S)})]}),(0,J.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:oe()})]})}):null,(0,J.jsx)(St,{title:je(),rows:P,emptyHint:S?i():Ne(),columns:[{header:ce(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:W(e.at)})},{header:u(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:f(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(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":fe(),children:`✓`})}},{header:We(),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:s(),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:de(),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:Ke(),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 ${Lt(e.status)}`,children:e.status})},{header:Je(),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:He(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Ce(),onClick:()=>C(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Oe(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>T(e),children:ke()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(zt,{row:w,onClose:()=>T(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,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)(_t,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(ut,{className:`max-w-lg`,children:[(0,J.jsxs)(mt,{children:[(0,J.jsxs)(ft,{className:`oc-traces__meta-title`,children:[Pe(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:Le()})]}),(0,J.jsx)(dt,{children:M()})]}),(0,J.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{AS as r,Ag as i,CS as a,DS as o,Dg as s,E as c,ES as l,Eg as u,Fg as d,Gj as f,Ig as p,Lg as m,Mg as h,Ng as g,OS as _,Og as v,Pg as y,Rg as b,Rx as ee,SS as x,TS as te,Wj as S,_S as ne,aS as re,bS as ie,cS as ae,cu as C,dS as w,fS as T,gS as oe,hS as se,iS as ce,jS as E,jg as D,kS as O,kg as k,lS as le,lu as A,mS as ue,oS as de,pS as fe,rS as pe,sS as me,su as j,uS as he,vS as ge,wS as M,xS as N,yS as P}from"./dist-CQKky_Rh.js";import{t as F}from"./button-BZ2ghM2f.js";import{C as I,H as L,Mt as R,Nt as z,S as B,U as _e,W as ve,Xt as ye,Yt as be,at as V,b as H,c as xe,ct as U,dt as Se,ft as Ce,ht as we,it as Te,l as W,mt as Ee,nt as De,p as G,rt as Oe,s as K,st as ke,ut as Ae,w as q,x as J,xt as je}from"./index-BuqxeAUW.js";import{t as Y}from"./FilterBar-Bjp3W3-O.js";import{t as Me}from"./DataTableShell-q5ZC3kNL.js";import{t as Ne}from"./DetailChips-BI5FFFCD.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=f(c.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=f(c.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,l=s?`${s.instanceName}/${s.agentId}`:null,u=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),h=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!u.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,enabled:e.enabled,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,Z.jsx)(Ae,{open:n,onOpenChange:r,children:(0,Z.jsxs)(Se,{className:`oc-access`,children:[(0,Z.jsxs)(Ee,{children:[(0,Z.jsx)(we,{children:b({user:t})}),(0,Z.jsx)(Ce,{children:m()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?p():d()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:y()}):h.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:D()}):[...g.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:l},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:a,defaultKey:o}){let l=S(c.agents.assignAgent),d=S(c.agents.removeAgent),f=S(c.agents.setDefaultAgent),p=L();if(!e)return null;async function m(n,r){try{r?await d({profileId:e,instanceName:t,agentId:n}):await l({profileId:e,instanceName:t,agentId:n})}catch(e){p.error(g(),e)}}async function _(n){try{await f({profileId:e,instanceName:t,agentId:n})}catch(e){p.error(h(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(z,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(U,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=a.has(n),c=o===n,l=e.state===`deleted`,d=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${d?` is-disabled`:``}`,children:[(0,Z.jsx)(G,{checked:r,disabled:(l||d)&&!r,onCheckedChange:()=>void m(e.agentId,r),"aria-label":i({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,l?(0,Z.jsx)(U,{variant:`outline`,className:`oc-access__gone`,children:k()}):null,e.outOfPool?(0,Z.jsx)(U,{variant:`outline`,className:`oc-access__gone`,children:v()}):null,r?c?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":s(),title:s(),children:(0,Z.jsx)(R,{size:14,fill:`currentColor`})}):(0,Z.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":u(),title:u(),disabled:d,onClick:()=>void _(e.agentId),children:(0,Z.jsx)(R,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return j();case`user`:return C();case`admin`:return A();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),i=K.filter(e=>n.has(W[e])).length;return(0,Z.jsxs)(De,{children:[(0,Z.jsx)(ke,{asChild:!0,children:(0,Z.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:i===0?E():r({count:i})})}),(0,Z.jsxs)(Oe,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(V,{children:O()}),K.map(e=>{let r=W[e];return(0,Z.jsxs)(Te,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(G,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:xe[e]()})]},e)})]})]})}function Le(){let e=ye({from:`/settings/users`}),t=be({from:`/settings/users`}),n=e.q??``,r=e.role??Q,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),u=f(c.admin.listUsers,{filter:{q:n||void 0,role:r===Q?void 0:r},withAgents:!0}),d=f(c.me.getMe,{host:je}),p=S(c.admin.setRole),m=S(c.admin.setUserPermissions),h=S(c.admin.startImpersonation),g=S(c.admin.deleteUser),v=S(c.admin.setUserName),y=_e(),b=ve(),C=L(),[E,D]=(0,X.useState)(null),O=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of u??[])e.add(t.role);return[...e]},[u]),k=n!==``||r!==Q;function A(){t({search:{},replace:!0})}async function j(e){try{await p(e)}catch(e){C.error(_(),e)}}async function F(e){try{await m(e)}catch(e){C.error(o(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await y({title:ie(),description:P({user:t}),confirmWord:ge(),confirmLabel:ne(),destructive:!0}))try{await g({profileId:e._id}),C.success(se({user:t}))}catch(e){C.error(oe(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await b({title:fe(),label:T({user:t}),placeholder:w(),defaultValue:e.name??``,confirmLabel:ee()});if(n!==null)try{await v({profileId:e._id,name:n}),C.success(he())}catch(e){C.error(le(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{q:n,onQChange:i,searchPlaceholder:l(),onReset:A,canReset:k,children:(0,Z.jsxs)(H,{value:r,onValueChange:s,children:[(0,Z.jsx)(I,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(B,{value:Q,children:te()}),O.map(e=>(0,Z.jsx)(B,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:M(),rows:u,emptyHint:a(),rowActions:e=>{let t=[{label:pe(),onSelect:()=>D({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ue(),onSelect:()=>void V(e)}];return e.userId!==d?.userId&&t.push({label:x(),onSelect:()=>void h({profileId:e._id})},{label:N(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:ae(),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:me(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(H,{value:e.role,onValueChange:t=>void j({profileId:e._id,role:t}),children:[(0,Z.jsx)(I,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(B,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(B,{value:`user`,children:$(`user`)}),(0,Z.jsx)(B,{value:`admin`,children:$(`admin`)})]})]})},{header:de(),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:re()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),F({profileId:e._id,permissions:[...n]})}})},{header:ce(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(z,{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:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||D(null)}})]})}export{Le as UsersTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$ as r,$s as i,At as a,Ct as o,D as s,Dt as c,E as l,Et as u,Ft as d,Gj as f,H as ee,Hj as te,Ij as p,J as m,K as h,Mt as g,Nt as _,Ot as v,Pt as y,Q as b,Rj as x,St as S,Tt as ne,U as re,V as ie,W as C,Wj as w,Y as T,_t as E,bt as ae,dt as oe,et as se,ft as ce,gt as D,ht as le,jt as ue,k as de,kt as O,mt as k,nt as fe,pt as pe,q as me,tc as A,tt as j,ut as M,vt as N,wt as P,xl as F,xt as I,yt as L}from"./dist-CQKky_Rh.js";import{i as R,n as z,r as he,t as ge}from"./tabs-e0oOoEId.js";import{t as B}from"./button-BZ2ghM2f.js";import{B as V,C as H,F as _e,I as ve,L as ye,Lt as be,R as xe,S as U,V as Se,Xt as Ce,Yt as we,b as W,ct as G,kt as Te,p as K,w as q,x as J,xt as Ee,z as Y}from"./index-BuqxeAUW.js";/* empty css */var De=s(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),X=t(e(),1),Z=n(),Q=[[`auto`,()=>v()],[`fr-FR`,()=>fe()],[`en-US`,()=>j()],[`en-GB`,()=>se()],[`de-DE`,()=>r()],[`es-ES`,()=>b()]],Oe=[[`0.75`,()=>u()],[`1`,()=>ne()],[`1.25`,()=>P()],[`1.5`,()=>o()]],$=0;function ke({instance:e}){let t=w(l.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[o,s]=(0,X.useState)(r),[u,d]=(0,X.useState)(`idle`),[f,p]=(0,X.useState)(!1),[m,h]=(0,X.useState)(!1),g=te(l.voice.gatewayTtsPreview);(0,X.useEffect)(()=>{s({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),d(`idle`)},[e._id]);let _=o.enabled!==r.enabled||o.engine!==r.engine||o.lang!==r.lang||o.rate!==r.rate||o.autoRead!==r.autoRead;async function v(){d(`saving`);try{let n={...e.config??{}};n.voiceEnabled=o.enabled,o.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,o.lang===`auto`?delete n.voiceLang:n.voiceLang=o.lang;let r=Number.parseFloat(o.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,o.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),d(`idle`)}catch{d(`error`)}}return(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Z.jsx)(G,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(K,{checked:o.enabled,onCheckedChange:e=>s({...o,enabled:e===!0}),"aria-label":a()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:a()})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:C()}),(0,Z.jsxs)(W,{value:o.engine,onValueChange:e=>s({...o,engine:e}),disabled:!o.enabled,children:[(0,Z.jsx)(H,{size:`sm`,"aria-label":C(),children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(U,{value:`browser`,children:re()}),e.kind===`hermes`?null:(0,Z.jsx)(U,{value:`gateway`,children:ee()})]})]})]}),o.engine===`gateway`?(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ie()}):null,o.engine===`gateway`?null:(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:O()}),(0,Z.jsxs)(W,{value:o.lang,onValueChange:e=>s({...o,lang:e}),disabled:!o.enabled,children:[(0,Z.jsx)(H,{size:`sm`,"aria-label":O(),children:(0,Z.jsx)(q,{})}),(0,Z.jsx)(J,{children:Q.map(([e,t])=>(0,Z.jsx)(U,{value:e,children:t()},e))})]})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:c()}),(0,Z.jsxs)(W,{value:o.rate,onValueChange:e=>s({...o,rate:e}),disabled:!o.enabled,children:[(0,Z.jsx)(H,{size:`sm`,"aria-label":c(),children:(0,Z.jsx)(q,{})}),(0,Z.jsx)(J,{children:Oe.map(([e,t])=>(0,Z.jsx)(U,{value:e,children:t()},e))})]})]}),o.engine===`gateway`?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(K,{checked:o.autoRead,onCheckedChange:e=>s({...o,autoRead:e===!0}),disabled:!o.enabled,"aria-label":S()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:S()})]}),(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:I()})]}),(0,Z.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Z.jsx)(B,{size:`sm`,disabled:!_||u===`saving`,onClick:()=>void v(),children:u===`saving`?F():A()}),(0,Z.jsx)(B,{variant:`outline`,size:`sm`,disabled:!o.enabled||f,onClick:()=>{let t=Number.parseFloat(o.rate)||1,n=++$;if(h(!1),V(),Y(),o.engine!==`gateway`){xe(N(),{lang:ye(o.lang,x()),rate:t});return}p(!0),g({instanceName:e.name,text:N()}).then(({mime:e,audioBase64:r})=>{n===$&&ve(r,e,{rate:t})}).catch(()=>{n===$&&h(!0)}).finally(()=>p(!1))},children:f?F():ae()}),(0,Z.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,p(!1),V(),Y()},children:L()})]}),u===`error`||m?(0,Z.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:m?de():i()}):null]})}function Ae({stt:e}){let t=f(l.me.getMe,{host:Ee}),n=w(l.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:D()}),(0,Z.jsx)(G,{variant:e?`secondary`:`outline`,children:e?oe():M()}),(0,Z.jsx)(G,{variant:r?`secondary`:`destructive`,children:r?m():me()})]}),i?(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(K,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":T()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:T()})]}):null,(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:le()})]})}function je(){let e=f(l.admin.listInstances,{}),t=(0,X.useMemo)(()=>Se(),[]),n=(0,X.useMemo)(()=>_e(),[]),{section:r}=Ce({from:`/settings/voice`}),i=we({from:`/settings/voice`});return(0,Z.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:d()}),(0,Z.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Z.jsx)(G,{variant:t?`secondary`:`destructive`,children:t?y():_()}),(0,Z.jsx)(G,{variant:n?`secondary`:`destructive`,children:n?g():ue()})]}),(0,Z.jsxs)(ge,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Z.jsxs)(he,{className:`w-full`,children:[(0,Z.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(Te,{size:13,"aria-hidden":!0}),h()]}),(0,Z.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(be,{size:13,"aria-hidden":!0}),D()]}),(0,Z.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(De,{size:13,"aria-hidden":!0}),k()]})]}),(0,Z.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:p()}):e.length===0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:E()}):e.map(e=>(0,Z.jsx)(ke,{instance:e},e._id))}),(0,Z.jsx)(z,{value:`dictation`,children:(0,Z.jsx)(Ae,{stt:n})}),(0,Z.jsx)(z,{value:`talk`,children:(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:k()}),(0,Z.jsx)(G,{variant:`outline`,children:pe()})]}),(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ce()})]})})]})]})}export{je as VoiceTab};
@@ -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-TE9n7zkZ.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-CQKky_Rh.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-TE9n7zkZ.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-CQKky_Rh.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-CQKky_Rh.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{Is as e,Ks as t,Ls as n,Ns as r,Ps as i,Rs as a,qt as o}from"./dist-TE9n7zkZ.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(t){return t===`supported`?a():t===`beyond`?n():e()}function m(e){return e??t()}function h(e,t){return t&&t!==`openclaw`?o({provider:t}):e===null?r():i({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
1
+ import{Fs as e,Ls as t,Ps as n,Rs as r,qs as i,qt as a,zs as o}from"./dist-CQKky_Rh.js";var s=e=>typeof e==`string`?e:null;function c(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function l(e,t){let n=c(e),r=c(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 u(e,t){if(e===null||t===null)return!1;let n=l(t,e.min);return n!==null&&n>=0}function d(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,o=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=s(e.min),n=s(e.maxValidated);t!==null&&n!==null&&(o={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:o,validatedVersions:c}}function f(e,t,n){if(e===null)return`unknown`;let{range:r}=d(n,t);return u(r,e)?r!==null&&(l(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function p(e){return e===`supported`?o():e===`beyond`?r():t()}function m(e){return e??i()}function h(t,r){return r&&r!==`openclaw`?a({provider:r}):t===null?n():e({version:t})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
@@ -0,0 +1 @@
1
+ import{$d as e,Gd as t,Jd as n,Kd as r,Qd as i,Xd as a,Yd as o,Zd as s,_f as c,af as l,cf as u,df as d,ef as f,ff as p,gf as m,hf as h,if as g,lf as _,mf as v,nf as y,of as b,pf as x,qd as S,rf as C,sf as w,tf as T,uf as E,vf as D,yf as O}from"./dist-CQKky_Rh.js";var k={AGENT_NOT_FOUND:()=>({label:O(),hint:D()}),AUTH_TOKEN_MISMATCH:()=>({label:c(),hint:m()}),DEVICE_SIGNING_FAILED:()=>({label:h(),hint:v()}),SESSION_SCOPE_DENIED:()=>({label:x(),hint:p()}),GATEWAY_TIMEOUT:()=>({label:d(),hint:E()}),GATEWAY_DISCONNECTED:()=>({label:_(),hint:u()}),ATTACHMENT_TOO_LARGE:()=>({label:l(),hint:g()}),ATTACHMENT_REJECTED:()=>({label:C(),hint:y()}),BRIDGE_UNREACHABLE:()=>({label:w(),hint:b()}),INVALID_REQUEST:()=>({label:T(),hint:f()}),NOT_CONFIGURED:()=>({label:e(),hint:i()}),UNROUTED:()=>({label:s(),hint:a()}),UPSTREAM_ERROR:()=>({label:o(),hint:n()}),UNKNOWN:()=>({label:S(),hint:r()})};function A(e){return e?k[e]?.()??{label:e,hint:t()}: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{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-TE9n7zkZ.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-CQKky_Rh.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
 
@@ -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-TE9n7zkZ.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-CQKky_Rh.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};