@lacneu/atrium 0.47.0 → 0.48.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 (73) hide show
  1. package/dist/assets/{AccessTab-BnX4PmPs.js → AccessTab-DMtobe3Y.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-CKkRCk45.js → AdvancedFilter-B6lCXnk_.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DgC5PVEh.js +3 -0
  4. package/dist/assets/AnomaliesTab-D_NGV0y1.js +1 -0
  5. package/dist/assets/AuditTab-Rr5xuXKd.js +1 -0
  6. package/dist/assets/BridgeTab-Cg51jMGo.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-3cQQbcJp.js +1 -0
  8. package/dist/assets/{DataTableShell-BYMlgvYE.js → DataTableShell-Bzopt4OT.js} +1 -1
  9. package/dist/assets/{DetailChips-C89Nbaor.js → DetailChips-PKnLEOOY.js} +1 -1
  10. package/dist/assets/FeedbacksTab-Bvdu_42J.js +1 -0
  11. package/dist/assets/{FieldLabel-BPLfm9JW.js → FieldLabel-RnB1EBjO.js} +1 -1
  12. package/dist/assets/FilesTab-Dizy2z9U.js +1 -0
  13. package/dist/assets/{FilterBar-Br5EycxW.js → FilterBar-Dy10_IPZ.js} +1 -1
  14. package/dist/assets/GroupsTab-DfguxlfH.js +1 -0
  15. package/dist/assets/InstancesTab-CTlgjqaF.js +1 -0
  16. package/dist/assets/IntegrationsTab-DDj4VHj-.js +1 -0
  17. package/dist/assets/{KpiTab-qboMswTC.js → KpiTab-CxrZ8A9u.js} +1 -1
  18. package/dist/assets/PreferencesTab-4GLPWMHl.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-dPl70NdT.js +4 -0
  20. package/dist/assets/RolesTab-CmIvQLbD.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-kzUegapD.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-DDkU2OZ0.js +1 -0
  23. package/dist/assets/ThemeShowroom-ClrciIxw.js +1 -0
  24. package/dist/assets/{TimeRangePicker-DZi8tuoy.js → TimeRangePicker-CZSYqXhd.js} +1 -1
  25. package/dist/assets/TracesTab-CYp5UZUL.js +1 -0
  26. package/dist/assets/UsersTab-CeGA0ymg.js +1 -0
  27. package/dist/assets/VoiceTab-DfO3ivrS.js +1 -0
  28. package/dist/assets/{button-LIt-3xv6.js → button-D5AXX04a.js} +1 -1
  29. package/dist/assets/{card-DzsZ59WU.js → card-DYY__lMj.js} +1 -1
  30. package/dist/assets/chevrons-up-down-C-bHailH.js +1 -0
  31. package/dist/assets/{compatView-CJb6IBah.js → compatView-DWV4JVj_.js} +1 -1
  32. package/dist/assets/dispatchErrorInfo-BtpDRwp-.js +1 -0
  33. package/dist/assets/dist-CGzSsL4i.js +44 -0
  34. package/dist/assets/{dist-DsZthEtc.js → dist-Cy-5Eo9H.js} +1 -1
  35. package/dist/assets/{dist-DLoYO0vC.js → dist-DVwJLFHG.js} +1 -1
  36. package/dist/assets/{dist-CVh1Fq15.js → dist-fE9pwpr-.js} +1 -1
  37. package/dist/assets/{highlighted-body-OFNGDK62-C_RIODx7.js → highlighted-body-OFNGDK62-BAuJrSyk.js} +1 -1
  38. package/dist/assets/index-B0Kloary.js +233 -0
  39. package/dist/assets/{index-CaAfBY4r.css → index-CaPvOhvq.css} +1 -1
  40. package/dist/assets/mermaid-GHXKKRXX-DqdnANNu.js +1 -0
  41. package/dist/assets/{pdf-Dn84Ah8f.js → pdf-Di4Z0VhC.js} +1 -1
  42. package/dist/assets/roleDescriptions-BXezQ4Y4.js +1 -0
  43. package/dist/assets/{table-BWvBHDcJ.js → table-BDhz0ajJ.js} +1 -1
  44. package/dist/assets/{tabs-DewZd9lc.js → tabs-Cd17i-th.js} +1 -1
  45. package/dist/assets/x-CQuunpf5.js +1 -0
  46. package/dist/index.html +8 -8
  47. package/package.json +1 -1
  48. package/dist/assets/AgentFilesTab-CkLgkVsj.js +0 -3
  49. package/dist/assets/AnomaliesTab-DoBVOf86.js +0 -1
  50. package/dist/assets/AuditTab-DMryP-0z.js +0 -1
  51. package/dist/assets/BridgeTab-D0zXMFxl.js +0 -1
  52. package/dist/assets/ChatDefaultsTab-DXTx_IWc.js +0 -1
  53. package/dist/assets/FeedbacksTab-DBkOUMkj.js +0 -1
  54. package/dist/assets/FilesTab-Djlcb2FA.js +0 -1
  55. package/dist/assets/GroupsTab-ZueGeQG8.js +0 -1
  56. package/dist/assets/InstancesTab-BhlWHuUE.js +0 -1
  57. package/dist/assets/IntegrationsTab-CVRwsVxC.js +0 -1
  58. package/dist/assets/PreferencesTab-Zxx8mWLT.js +0 -1
  59. package/dist/assets/PromptInjectionsTab-B66bzRPn.js +0 -4
  60. package/dist/assets/RolesTab-u-d5x70T.js +0 -1
  61. package/dist/assets/ServiceAccountsTab-HabO_UTG.js +0 -1
  62. package/dist/assets/SubAgentReportsTab-C7lBvZWl.js +0 -1
  63. package/dist/assets/ThemeShowroom-B76h-pqY.js +0 -1
  64. package/dist/assets/TracesTab-CX-EEGmG.js +0 -1
  65. package/dist/assets/UsersTab-CcKwRns7.js +0 -1
  66. package/dist/assets/VoiceTab-WUCBEthA.js +0 -1
  67. package/dist/assets/chevrons-up-down-De8tZoyW.js +0 -1
  68. package/dist/assets/dispatchErrorInfo-CQMEEMco.js +0 -1
  69. package/dist/assets/dist-DxRkWXyO.js +0 -44
  70. package/dist/assets/index-DA0_EAyp.js +0 -233
  71. package/dist/assets/mermaid-GHXKKRXX-CCS7XoEq.js +0 -1
  72. package/dist/assets/roleDescriptions-DZ_zo2SB.js +0 -1
  73. package/dist/assets/x-C5l8NTyh.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,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-DxRkWXyO.js";import{t as C}from"./button-LIt-3xv6.js";import{Ct as w,Gt as T,Pt as E,St as D,Tt as O,et as k,lt as A,wt as j}from"./index-DA0_EAyp.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};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Bm as r,Gm as i,Hm as a,Jm as o,Km as s,Rm as c,Um as l,Vm as u,Wm as d,Xm as f,Ym as p,ar as m,cr as h,ir as g,nr as _,or as v,qm as y,rr as b,sr as x,zm as S}from"./dist-CGzSsL4i.js";import{t as C}from"./button-D5AXX04a.js";import{Ct as w,Gt as T,Pt as E,St as D,Tt as O,et as k,lt as A,wt as j}from"./index-B0Kloary.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:f(),from:`now-5m`},{label:p(),from:`now-15m`},{label:o(),from:`now-30m`},{label:y(),from:`now-1h`},{label:s(),from:`now-3h`},{label:i(),from:`now-6h`},{label:d(),from:`now-12h`},{label:l(),from:`now-24h`},{label:a(),from:`now-2d`},{label:u(),from:`now-7d`},{label:r(),from:`now-30d`},{label:S(),from:`now-90d`},{label:c(),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,r]=(0,M.useState)(!1),[i,a]=(0,M.useState)(``),o=F(e),[s,c]=(0,M.useState)(()=>z(o.from)),[l,u]=(0,M.useState)(()=>z(o.to));function d(t){if(t){let t=F(e);c(z(t.from)),u(z(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=B(s),n=B(l);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]),S=B(s)!==null&&B(l)!==null;return(0,H.jsxs)(j,{open:n,onOpenChange:d,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:x()}),(0,H.jsx)(A,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(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:l,onChange:e=>u(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:p,children:m()})]}),(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:i,onChange:e=>a(e.target.value),placeholder:g(),"aria-label":b()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:y.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:_()}):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:()=>f(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{$_ as r,$w as i,A_ as a,B_ as o,Bw as s,C_ as c,Cw as l,D as u,D_ as d,Dw as f,E as p,E_ as m,Ew as h,F_ as g,Fw as _,G_ as ee,Gw as v,H_ as y,Hw as b,I_ as x,Iw as S,J_ as te,Jw as C,K_ as ne,Kw as w,L_ as re,Lw as T,M_ as ie,N_ as ae,O_ as oe,Ow as se,P_ as ce,Pw as E,Q_ as le,Qw as D,R_ as ue,Rw as O,S_ as de,Sw as k,T_ as fe,Tw as pe,U_ as me,Uw as he,V_ as ge,Vw as _e,W_ as ve,Ww as ye,X_ as be,Xw as xe,Y_ as Se,Yw as Ce,Z_ as we,Zw as A,__ as Te,_w as Ee,b_ as De,bw as Oe,eM as j,eT as M,g_ as N,gn as P,gw as F,h_ as ke,hn as Ae,hw as je,iT as Me,j_ as Ne,k_ as Pe,kw as Fe,mn as Ie,nT as Le,q_ as Re,qw as ze,rT as Be,tM as I,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-CGzSsL4i.js";import{n as Qe}from"./dist-fE9pwpr-.js";import{t as $e}from"./x-CQuunpf5.js";import{i as L,n as R,r as et,t as tt}from"./tabs-Cd17i-th.js";import{t as z}from"./button-D5AXX04a.js";import{Bt as nt,C as B,S as V,Vt as rt,Wt as it,Xt as at,Yt as ot,a as st,b as H,ct as U,dt as ct,et as W,ft as lt,ht as ut,i as dt,j as ft,mt as pt,o as mt,r as ht,tt as gt,ut as _t,w as G,x as K,xt as vt}from"./index-B0Kloary.js";import{n as yt}from"./TimeRangePicker-CZSYqXhd.js";import{t as bt}from"./FilterBar-Dy10_IPZ.js";import{t as xt}from"./AdvancedFilter-B6lCXnk_.js";import{t as St}from"./DataTableShell-Bzopt4OT.js";var Ct=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`}]]),wt=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`}]]),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`?Ze():n===`agent`?`${O()} - ${r}`:e}function Et(){let e=I(p.me.getMe,{host:vt})?.role===`admin`,t=I(p.deliveryTiming.getDeliveryStatus,{}),n=j(p.deliveryTiming.startDeliveryRecord),r=j(p.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 r({}):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:Me()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Be()})]}),e?(0,J.jsx)(z,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?Ve():Le()}):null]}),l?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(U,{variant:`secondary`,children:M()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:i({time:gt(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?xe():A()})}),a?(0,J.jsx)(Dt,{isAdmin:e}):null]})}function Dt({isAdmin:e}){let t=I(p.deliveryTiming.listDeliverySessions,{}),n=j(p.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[a,o]=(0,q.useState)(`all`),[c,l]=(0,q.useState)(Y),[u,d]=(0,q.useState)(null),{from:f,to:m}=yt(c),h=c.to===`now`?1/0:m,g=r.trim()!==``||a!==`all`||c!==Y,ee=()=>{i(``),o(`all`),l(Y)},y=(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>=f&&t.startedAt<=h).map(e=>({...e,_id:e.sessionId}))},[t,r,a,f,h]),x=e=>{let t=new Set((y??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&d(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(bt,{q:r,onQChange:i,searchPlaceholder:C(),timeRange:c,onTimeRangeChange:l,onReset:ee,canReset:g,children:(0,J.jsxs)(H,{value:a,onValueChange:e=>o(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:ze()}),(0,J.jsx)(V,{value:`active`,children:w()}),(0,J.jsx)(V,{value:`stopped`,children:v()})]})]})}),(0,J.jsx)(St,{title:Ce(),rows:y,emptyHint:F(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?S():T(),onClick:()=>d(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,J.jsx)(Ct,{size:15,"aria-hidden":!0}):(0,J.jsx)(rt,{size:15,"aria-hidden":!0})})},{header:ye(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:W(e.startedAt)})},{header:he(),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:b(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:_e(),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:w()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:v()})}],rowActions:e?e=>[{label:_(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:_(),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=I(p.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(kt,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(ft(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:E()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:D()});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,` `,je()]}),(0,J.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,J.jsx)(it,{size:13,"aria-hidden":!0}),t?Ee():Ue()]})]}),(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:f()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:h()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:pe()})]})}),(0,J.jsxs)(`tbody`,{children:[i(Ge(),r.bridge),i(l(),r.A),i(k(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:qe()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ye()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Oe()})]})}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:Ae()},{value:`direction`,label:`direction`},{value:`roleKey`,label:Ie()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=at({from:`/settings/traces`}),t=ot({from:`/settings/traces`}),n=e.limit,i=e.kind,s=e.statusClass??Q,l=e.principalType??Q,u=e.direction??Q,f=e.roleKey??Q,h=e.q??``,_=ht(e.from,e.to),v=(0,q.useMemo)(()=>mt(e.adv),[e.adv]),{from:b,to:S}=yt(_),[C,w]=(0,q.useState)(null),[T,E]=(0,q.useState)(null),D=e=>void t({search:t=>({...t,limit:e})}),O=e=>void t({search:t=>({...t,kind:e})}),k=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),pe=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),he=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})}),ye=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),xe=e=>void t({search:t=>({...t,...st(e)})}),Ce=e=>void t({search:t=>({...t,adv:dt(e)}),replace:!0}),A=I(p.observability.listEvents,{limit:n}),Te=I(p.observability.listEvents,{limit:n,kind:i===Z?void 0:i,filter:{q:h||void 0,from:b,to:S,statusClass:s===Q?void 0:s,principalType:l===Q?void 0:l,direction:u===Q?void 0:u,roleKey:f===Q?void 0:f,advanced:v.length>0?v:void 0}}),Ee=(0,q.useMemo)(()=>{let e=new Set;for(let t of A??[])e.add(t.kind);return[...e].sort()},[A]),Oe=(0,q.useMemo)(()=>{let e=new Set;for(let t of A??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[A]),j=h!==``||s!==Q||l!==Q||u!==Q||f!==Q||v.length>0||_.kind!==`relative`||_.from!==Pt.from;function M(){t({search:{limit:100,kind:`all`},replace:!0})}let N=C?A?.filter(e=>e.correlationId===C):Te,P=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(tt,{value:P,onValueChange:e=>F(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}),Fe()]}),(0,J.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(wt,{size:13,"aria-hidden":!0}),se()]})]}),(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:[r(),(0,J.jsx)(`strong`,{children:le()}),we(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:be()})]}),(0,J.jsxs)(bt,{q:h,onQChange:k,searchPlaceholder:Se(),timeRange:_,onTimeRangeChange:xe,onReset:M,canReset:j,children:[(0,J.jsxs)(H,{value:s,onValueChange:pe,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:te()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:Re()}),jt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:l,onValueChange:he,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:ne()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:ee()}),Mt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:u,onValueChange:_e,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(G,{placeholder:ve()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:me()}),Nt.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:f,onValueChange:ye,children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(G,{placeholder:y()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Q,children:ge()}),Oe.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:i,onValueChange:O,children:[(0,J.jsx)(B,{size:`sm`,className:`w-44`,children:(0,J.jsx)(G,{placeholder:o()})}),(0,J.jsxs)(K,{children:[(0,J.jsx)(V,{value:Z,children:Xe()}),Ee.map(e=>(0,J.jsx)(V,{value:e,children:e},e))]})]}),(0,J.jsxs)(H,{value:String(n),onValueChange:e=>D(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:ue({count:e})},e))})]})]}),(0,J.jsx)(xt,{fields:Ft,seed:v,onChange:Ce}),C?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>w(null),title:re(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[x(),(0,J.jsx)(`code`,{children:$(C)})]}),(0,J.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:g()})]})}):null,(0,J.jsx)(St,{title:ce(),rows:N,emptyHint:C?ae():ie(),columns:[{header:Ne(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:W(e.at)})},{header:a(),sort:e=>e.kind,cell:e=>(0,J.jsx)(U,{variant:`secondary`,children:e.kind})},{header:Pe(),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":oe(),children:`✓`})}},{header:d(),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:m(),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:fe(),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:We(),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:c(),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:de(),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:Ke(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:De(),onClick:()=>w(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Je(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>E(e),children:He()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(zt,{row:T,onClose:()=>E(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)(ct,{className:`max-w-lg`,children:[(0,J.jsxs)(pt,{children:[(0,J.jsxs)(ut,{className:`oc-traces__meta-title`,children:[Te(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(U,{variant:`outline`,children:N()})]}),(0,J.jsx)(lt,{children:ke()})]}),(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,Bg as a,CS as o,DS as s,E as c,ES as l,Fg as u,Ig as d,Lg as f,MS as p,Mg as m,NS as h,Ng as g,OS as _,PS as v,Pg as y,Rg as b,SS as ee,TS as x,Vg as S,Vx as te,_S as ne,bS as re,cS as ie,dS as ae,du as C,eM as w,fS as oe,fu as T,gS as E,hS as se,jS as ce,jg as D,kS as O,kg as k,lS as le,mS as ue,oS as de,pS as fe,sS as pe,tM as A,uS as me,uu as j,vS as he,wS as ge,xS as _e,yS as M,zg as N}from"./dist-CGzSsL4i.js";import{t as P}from"./button-D5AXX04a.js";import{B as F,C as I,Mt as L,Nt as R,S as z,V as ve,Xt as ye,Yt as be,at as B,b as V,c as xe,ct as H,dt as Se,ft as Ce,ht as we,it as Te,l as U,mt as Ee,nt as De,p as W,rt as Oe,s as G,st as ke,ut as Ae,w as K,x as q,xt as J,z as Y}from"./index-B0Kloary.js";import{t as je}from"./FilterBar-Dy10_IPZ.js";import{t as Me}from"./DataTableShell-Bzopt4OT.js";import{t as Ne}from"./DetailChips-PKnLEOOY.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=A(c.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=A(c.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),l=(o??[]).find(e=>e.isDefault)??null,u=l?`${l.instanceName}/${l.agentId}`:null,d=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),p=[...(i?.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,enabled:e.enabled,state:e.state,outOfPool:!0}))],m=new Map;for(let e of p){let t=m.get(e.instanceName)??[];t.push(e),m.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:S({user:t})}),(0,Z.jsx)(Ce,{children:a()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?N():b()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:f()}):p.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:y()}):[...m.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:a,defaultKey:o}){let s=w(c.agents.assignAgent),l=w(c.agents.removeAgent),f=w(c.agents.setDefaultAgent),p=Y();if(!e)return null;async function h(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){p.error(d(),e)}}async function _(n){try{await f({profileId:e,instanceName:t,agentId:n})}catch(e){p.error(u(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(R,{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=a.has(n),s=o===n,c=e.state===`deleted`,l=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${l?` is-disabled`:``}`,children:[(0,Z.jsx)(W,{checked:r,disabled:(c||l)&&!r,onCheckedChange:()=>void h(e.agentId,r),"aria-label":g({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,c?(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:D()}):null,r?s?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":i(),title:i(),children:(0,Z.jsx)(L,{size:14,fill:`currentColor`})}):(0,Z.jsx)(P,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":k(),title:k(),disabled:l,onClick:()=>void _(e.agentId),children:(0,Z.jsx)(L,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return j();case`user`:return C();case`admin`:return T();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)(De,{children:[(0,Z.jsx)(ke,{asChild:!0,children:(0,Z.jsx)(P,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?v():h({count:r})})}),(0,Z.jsxs)(Oe,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(B,{children:p()}),G.map(e=>{let r=U[e];return(0,Z.jsxs)(Te,{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:xe[e]()})]},e)})]})]})}function Le(){let e=ye({from:`/settings/users`}),t=be({from:`/settings/users`}),n=e.q??``,i=e.role??Q,a=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),u=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),d=A(c.admin.listUsers,{filter:{q:n||void 0,role:i===Q?void 0:i},withAgents:!0}),f=A(c.me.getMe,{host:J}),p=w(c.admin.setRole),m=w(c.admin.setUserPermissions),h=w(c.admin.startImpersonation),g=w(c.admin.deleteUser),v=w(c.admin.setUserName),y=F(),b=ve(),S=Y(),[C,T]=(0,X.useState)(null),D=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of d??[])e.add(t.role);return[...e]},[d]),k=n!==``||i!==Q;function j(){t({search:{},replace:!0})}async function N(e){try{await p(e)}catch(e){S.error(ce(),e)}}async function P(e){try{await m(e)}catch(e){S.error(r(),e)}}async function L(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await y({title:o(),description:ee({user:t}),confirmWord:_e(),confirmLabel:re(),destructive:!0}))try{await g({profileId:e._id}),S.success(he({user:t}))}catch(e){S.error(M(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await b({title:E(),label:se({user:t}),placeholder:ue(),defaultValue:e.name??``,confirmLabel:te()});if(n!==null)try{await v({profileId:e._id,name:n}),S.success(fe())}catch(e){S.error(oe(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{q:n,onQChange:a,searchPlaceholder:O(),onReset:j,canReset:k,children:(0,Z.jsxs)(V,{value:i,onValueChange:u,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:_()}),D.map(e=>(0,Z.jsx)(z,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:s(),rows:d,emptyHint:l(),rowActions:e=>{let t=[{label:de(),onSelect:()=>T({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ne(),onSelect:()=>void B(e)}];return e.userId!==f?.userId&&t.push({label:x(),onSelect:()=>void h({profileId:e._id})},{label:ge(),variant:`destructive`,onSelect:()=>void L(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)(V,{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:le(),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:ie()}):(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:pe(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(R,{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:C?.profileId??null,userLabel:C?.label??``,open:C!==null,onOpenChange:e=>{e||T(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,At as i,Ct as a,D as o,Dt as s,E as c,Et as l,Ft as u,H as ee,J as d,Jj as te,K as f,Kj as p,Mt as m,Nt as h,Ot as g,Pt as _,Q as v,Qj as ne,St as y,Tt as b,U as re,V as ie,W as x,Y as S,_t as C,bt as w,dt as T,eM as E,et as ae,ft as oe,gt as D,ht as se,ic as ce,jt as le,k as ue,kt as O,mt as k,nc as de,nt as fe,pt as pe,q as me,tM as A,tt as j,ut as M,vt as N,wl as P,wt as F,xt as I,yt as L}from"./dist-CGzSsL4i.js";import{i as R,n as z,r as he,t as ge}from"./tabs-Cd17i-th.js";import{t as B}from"./button-D5AXX04a.js";import{C as V,F as _e,I as H,L as U,Lt as ve,M as ye,N as be,P as xe,R as Se,S as W,Xt as Ce,Yt as we,b as G,ct as K,kt as Te,p as q,w as J,x as Y,xt as Ee}from"./index-B0Kloary.js";/* empty css */var De=o(`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`,()=>g()],[`fr-FR`,()=>fe()],[`en-US`,()=>j()],[`en-GB`,()=>ae()],[`de-DE`,()=>r()],[`es-ES`,()=>v()]],Oe=[[`0.75`,()=>l()],[`1`,()=>b()],[`1.25`,()=>F()],[`1.5`,()=>a()]],$=0;function ke({instance:e}){let t=E(c.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},[a,o]=(0,X.useState)(r),[l,u]=(0,X.useState)(`idle`),[d,f]=(0,X.useState)(!1),[p,m]=(0,X.useState)(!1),h=ne(c.voice.gatewayTtsPreview);(0,X.useEffect)(()=>{o({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}),u(`idle`)},[e._id]);let g=a.enabled!==r.enabled||a.engine!==r.engine||a.lang!==r.lang||a.rate!==r.rate||a.autoRead!==r.autoRead;async function _(){u(`saving`);try{let n={...e.config??{}};n.voiceEnabled=a.enabled,a.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,a.lang===`auto`?delete n.voiceLang:n.voiceLang=a.lang;let r=Number.parseFloat(a.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,a.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),u(`idle`)}catch{u(`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)(K,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(q,{checked:a.enabled,onCheckedChange:e=>o({...a,enabled:e===!0}),"aria-label":i()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:i()})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()}),(0,Z.jsxs)(G,{value:a.engine,onValueChange:e=>o({...a,engine:e}),disabled:!a.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":x(),children:(0,Z.jsx)(J,{})}),(0,Z.jsxs)(Y,{children:[(0,Z.jsx)(W,{value:`browser`,children:re()}),e.kind===`hermes`?null:(0,Z.jsx)(W,{value:`gateway`,children:ee()})]})]})]}),a.engine===`gateway`?(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ie()}):null,a.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)(G,{value:a.lang,onValueChange:e=>o({...a,lang:e}),disabled:!a.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":O(),children:(0,Z.jsx)(J,{})}),(0,Z.jsx)(Y,{children:Q.map(([e,t])=>(0,Z.jsx)(W,{value:e,children:t()},e))})]})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:s()}),(0,Z.jsxs)(G,{value:a.rate,onValueChange:e=>o({...a,rate:e}),disabled:!a.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":s(),children:(0,Z.jsx)(J,{})}),(0,Z.jsx)(Y,{children:Oe.map(([e,t])=>(0,Z.jsx)(W,{value:e,children:t()},e))})]})]}),a.engine===`gateway`?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(q,{checked:a.autoRead,onCheckedChange:e=>o({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":y()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:y()})]}),(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:!g||l===`saving`,onClick:()=>void _(),children:l===`saving`?P():ce()}),(0,Z.jsx)(B,{variant:`outline`,size:`sm`,disabled:!a.enabled||d,onClick:()=>{let t=Number.parseFloat(a.rate)||1,n=++$;if(m(!1),U(),H(),a.engine!==`gateway`){_e(N(),{lang:xe(a.lang,te()),rate:t});return}f(!0),h({instanceName:e.name,text:N()}).then(({mime:e,audioBase64:r})=>{n===$&&be(r,e,{rate:t})}).catch(()=>{n===$&&m(!0)}).finally(()=>f(!1))},children:d?P():w()}),(0,Z.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,f(!1),U(),H()},children:L()})]}),l===`error`||p?(0,Z.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:p?ue():de()}):null]})}function Ae({stt:e}){let t=A(c.me.getMe,{host:Ee}),n=E(c.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)(K,{variant:e?`secondary`:`outline`,children:e?T():M()}),(0,Z.jsx)(K,{variant:r?`secondary`:`destructive`,children:r?d():me()})]}),i?(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(q,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":S()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:S()})]}):null,(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:se()})]})}function je(){let e=A(c.admin.listInstances,{}),t=(0,X.useMemo)(()=>Se(),[]),n=(0,X.useMemo)(()=>ye(),[]),{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:u()}),(0,Z.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Z.jsx)(K,{variant:t?`secondary`:`destructive`,children:t?_():h()}),(0,Z.jsx)(K,{variant:n?`secondary`:`destructive`,children:n?m():le()})]}),(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}),f()]}),(0,Z.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(ve,{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:C()}):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)(K,{variant:`outline`,children:pe()})]}),(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:oe()})]})})]})]})}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-DxRkWXyO.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-CGzSsL4i.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-DxRkWXyO.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-CGzSsL4i.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-CGzSsL4i.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{Fs as e,Ls as t,Ps as n,Rs as r,qs as i,qt as a,zs as o}from"./dist-DxRkWXyO.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};
1
+ import{Bs as e,Hs as t,Ls as n,Rs as r,Vs as i,Xs as a,qt as o}from"./dist-CGzSsL4i.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(n){return n===`supported`?t():n===`beyond`?i():e()}function m(e){return e??a()}function h(e,t){return t&&t!==`openclaw`?o({provider:t}):e===null?n():r({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};
@@ -0,0 +1 @@
1
+ import{$d as e,Jd as t,Qd as n,Sf as r,Xd as i,Yd as a,Zd as o,_f as s,af as c,bf 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,rf as S,sf as C,tf as w,uf as T,vf as E,xf as D,yf as O}from"./dist-CGzSsL4i.js";var k={AGENT_NOT_FOUND:()=>({label:r(),hint:D()}),AUTH_TOKEN_MISMATCH:()=>({label:l(),hint:O()}),DEVICE_SIGNING_FAILED:()=>({label:E(),hint:s()}),SESSION_SCOPE_DENIED:()=>({label:m(),hint:h()}),GATEWAY_TIMEOUT:()=>({label:v(),hint:x()}),GATEWAY_DISCONNECTED:()=>({label:p(),hint:d()}),ATTACHMENT_TOO_LARGE:()=>({label:u(),hint:C()}),ATTACHMENT_REJECTED:()=>({label:b(),hint:c()}),BRIDGE_UNREACHABLE:()=>({label:T(),hint:_()}),INVALID_REQUEST:()=>({label:g(),hint:S()}),NOT_CONFIGURED:()=>({label:y(),hint:w()}),UNROUTED:()=>({label:f(),hint:e()}),UPSTREAM_ERROR:()=>({label:n(),hint:o()}),UNKNOWN:()=>({label:i(),hint:a()})};function A(e){return e?k[e]?.()??{label:e,hint:t()}:k.UNKNOWN()}export{A as t};