@lacneu/atrium 0.42.0 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/assets/{AccessTab-BL-D0RWF.js → AccessTab-7oUNhFz1.js} +1 -1
  2. package/dist/assets/{AdvancedFilter--hO9zyz3.js → AdvancedFilter-CO1cUNNw.js} +1 -1
  3. package/dist/assets/AgentFilesTab-DDaKUZVQ.js +3 -0
  4. package/dist/assets/AnomaliesTab-BwN4hyVY.js +1 -0
  5. package/dist/assets/AuditTab--JJkDPIe.js +1 -0
  6. package/dist/assets/BridgeTab-D_ZDAPja.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-kUb2IOW3.js +1 -0
  8. package/dist/assets/{DataTableShell-qDyq_xxR.js → DataTableShell-BB1Bp-iF.js} +1 -1
  9. package/dist/assets/{DetailChips-izXRLBqs.js → DetailChips-CqxPS6Xc.js} +1 -1
  10. package/dist/assets/FeedbacksTab-B_TKW5tq.js +1 -0
  11. package/dist/assets/{FieldLabel-BZyPIkg8.js → FieldLabel-DMT2Hkyy.js} +1 -1
  12. package/dist/assets/FilesTab-S52Eip5O.js +1 -0
  13. package/dist/assets/{FilterBar-5McK3w7W.js → FilterBar-CghkUT3Y.js} +1 -1
  14. package/dist/assets/GroupsTab-4qA6hYSX.js +1 -0
  15. package/dist/assets/InstancesTab-DcTjSMdS.js +1 -0
  16. package/dist/assets/IntegrationsTab-Osutx3AF.js +1 -0
  17. package/dist/assets/{KpiTab-DkbJVBPh.js → KpiTab-DIl1PUwB.js} +1 -1
  18. package/dist/assets/PreferencesTab-oX3gGWZq.js +1 -0
  19. package/dist/assets/PromptInjectionsTab-DyYdCXtn.js +4 -0
  20. package/dist/assets/RolesTab-BLB85Fx_.js +1 -0
  21. package/dist/assets/ServiceAccountsTab-iGJvmXO8.js +1 -0
  22. package/dist/assets/SubAgentReportsTab-B8ZIdQCy.js +1 -0
  23. package/dist/assets/ThemeShowroom-Dq-FeNYt.js +1 -0
  24. package/dist/assets/{TimeRangePicker-BSn6eVzh.js → TimeRangePicker-xtCsggB6.js} +1 -1
  25. package/dist/assets/TracesTab-CohGGYH-.js +1 -0
  26. package/dist/assets/UsersTab-DdnixSeG.js +1 -0
  27. package/dist/assets/VoiceTab-Dxx8qprL.js +1 -0
  28. package/dist/assets/{button-ANIiyoGJ.js → button-BMEzTwMt.js} +1 -1
  29. package/dist/assets/{card-DBM3tlH1.js → card-B1HFd4xj.js} +1 -1
  30. package/dist/assets/chevrons-up-down-D1ZuXFq9.js +1 -0
  31. package/dist/assets/{compatView-7kUvOpPX.js → compatView-C7qH0iQd.js} +1 -1
  32. package/dist/assets/dispatchErrorInfo-Bg7B8_Mz.js +1 -0
  33. package/dist/assets/{dist-C7FCY2SP.js → dist-C9SiL-Kv.js} +1 -1
  34. package/dist/assets/{dist-B1vUBlGT.js → dist-CISpbyhZ.js} +1 -1
  35. package/dist/assets/{dist-BjwyR-Rb.js → dist-D7m7ryC2.js} +5 -5
  36. package/dist/assets/{dist-Bo3HymDk.js → dist-DnoignCJ.js} +1 -1
  37. package/dist/assets/{highlighted-body-OFNGDK62-2ke1wKtw.js → highlighted-body-OFNGDK62-qrGeiXTR.js} +1 -1
  38. package/dist/assets/{index-BsEfIgPs.css → index-B4voP0zS.css} +1 -1
  39. package/dist/assets/index-CvZ8WIcf.js +233 -0
  40. package/dist/assets/mermaid-GHXKKRXX-B3J6Tm21.js +1 -0
  41. package/dist/assets/roleDescriptions-B5qSDg7b.js +1 -0
  42. package/dist/assets/{table-CMG1KRZm.js → table-vlXds7sd.js} +1 -1
  43. package/dist/assets/{tabs-WMNx-KXA.js → tabs-CZZSNNGS.js} +1 -1
  44. package/dist/assets/x-g5TNru3k.js +1 -0
  45. package/dist/index.html +8 -8
  46. package/package.json +1 -1
  47. package/dist/assets/AgentFilesTab-CqDiGMNH.js +0 -3
  48. package/dist/assets/AnomaliesTab-BX2kTeDF.js +0 -1
  49. package/dist/assets/AuditTab-B_b_jEqf.js +0 -1
  50. package/dist/assets/BridgeTab-CljQLbGy.js +0 -1
  51. package/dist/assets/ChatDefaultsTab-CsQOgs8v.js +0 -1
  52. package/dist/assets/FeedbacksTab-B_xc9m8w.js +0 -1
  53. package/dist/assets/FilesTab-CS-wCMiC.js +0 -1
  54. package/dist/assets/GroupsTab-BeiKXHnJ.js +0 -1
  55. package/dist/assets/InstancesTab-C-m6f25i.js +0 -1
  56. package/dist/assets/IntegrationsTab-DsRNO8vX.js +0 -1
  57. package/dist/assets/PreferencesTab-MosSvdiK.js +0 -1
  58. package/dist/assets/PromptInjectionsTab-CGedejI8.js +0 -4
  59. package/dist/assets/RolesTab-CLdqp6kf.js +0 -1
  60. package/dist/assets/ServiceAccountsTab-CET__Sdi.js +0 -1
  61. package/dist/assets/SubAgentReportsTab-8ct5u4Vu.js +0 -1
  62. package/dist/assets/ThemeShowroom-FOLK9Y43.js +0 -1
  63. package/dist/assets/TracesTab-DPoyHlxC.js +0 -1
  64. package/dist/assets/UsersTab-BpNHWue_.js +0 -1
  65. package/dist/assets/VoiceTab-CLA8rIEV.js +0 -1
  66. package/dist/assets/chevrons-up-down-Bk2JiK_g.js +0 -1
  67. package/dist/assets/dispatchErrorInfo-JTswda6A.js +0 -1
  68. package/dist/assets/index-BGXPyQxx.js +0 -233
  69. package/dist/assets/mermaid-GHXKKRXX-CRt8o-g1.js +0 -1
  70. package/dist/assets/roleDescriptions-MwIEr4oZ.js +0 -1
  71. package/dist/assets/x-y131Bn-k.js +0 -1
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{An as r,Dn as i,En as a,On as o,Tn as s,am as c,cm as l,dm as u,fm as d,im as f,jn as p,kn as m,lm as h,mm as g,nm as _,om as v,pm as y,rm as b,sm as x,um as S}from"./dist-BjwyR-Rb.js";import{t as C}from"./button-ANIiyoGJ.js";import{A as w,Dt as T,Rt as E,_t as D,gt as O,ot as k,vt as A,yt as j}from"./index-BGXPyQxx.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:g(),from:`now-5m`},{label:y(),from:`now-15m`},{label:d(),from:`now-30m`},{label:u(),from:`now-1h`},{label:S(),from:`now-3h`},{label:h(),from:`now-6h`},{label:l(),from:`now-12h`},{label:x(),from:`now-24h`},{label:v(),from:`now-2d`},{label:c(),from:`now-7d`},{label:f(),from:`now-30d`},{label:b(),from:`now-90d`},{label:_(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(``),d=F(e),[f,h]=(0,M.useState)(()=>z(d.from)),[g,_]=(0,M.useState)(()=>z(d.to));function v(t){if(t){let t=F(e);h(z(t.from)),_(z(t.to)),u(``)}c(t)}function y(e){t({kind:`relative`,from:e,to:`now`}),c(!1)}function b(){let e=B(f),n=B(g);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),c(!1))}let x=(0,M.useMemo)(()=>{let e=l.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[l]),S=B(f)!==null&&B(g)!==null;return(0,H.jsxs)(A,{open:n,onOpenChange:v,children:[(0,H.jsx)(j,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(E,{}),R(e)]})}),(0,H.jsx)(D,{children:(0,H.jsx)(O,{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:p()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:r()}),(0,H.jsx)(k,{type:`datetime-local`,value:f,onChange:e=>h(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:m()}),(0,H.jsx)(k,{type:`datetime-local`,value:g,onChange:e=>_(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:b,children:o()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(T,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(k,{value:l,onChange:e=>u(e.target.value),placeholder:i(),"aria-label":a()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:x.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:s()}):x.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:()=>y(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{An as r,Dn as i,Mn as a,Nn as o,On as s,am as c,cm as l,dm as u,fm as d,gm as f,hm as p,im as m,jn as h,kn as g,lm as _,mm as v,om as y,pm as b,sm as x,um as S}from"./dist-D7m7ryC2.js";import{t as C}from"./button-BMEzTwMt.js";import{A as w,Ot as T,_t as E,gt as D,ot as O,vt as k,yt as A,zt as j}from"./index-CvZ8WIcf.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:v(),from:`now-30m`},{label:b(),from:`now-1h`},{label:d(),from:`now-3h`},{label:u(),from:`now-6h`},{label:S(),from:`now-12h`},{label:_(),from:`now-24h`},{label:l(),from:`now-2d`},{label:x(),from:`now-7d`},{label:y(),from:`now-30d`},{label:c(),from:`now-90d`},{label:m(),from:`now-520w`}];function L(e){return w(e,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function R(e){if(e.kind===`relative`){let t=I.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${L(e.from)} → ${L(e.to)}`}function z(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function B(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function V(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var H=n();function U(e){let[t,n]=(0,M.useState)(0);return(0,M.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,M.useMemo)(()=>{let{from:t,to:n}=F(e);return e.kind===`absolute`?{from:t,to:n}:{from:W(t),to:W(n)}},[e,t])}function W(e){return Math.floor(e/6e4)*6e4}function G({value:e,onChange:t}){let[n,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(``),d=F(e),[f,p]=(0,M.useState)(()=>z(d.from)),[m,_]=(0,M.useState)(()=>z(d.to));function v(t){if(t){let t=F(e);p(z(t.from)),_(z(t.to)),u(``)}c(t)}function y(e){t({kind:`relative`,from:e,to:`now`}),c(!1)}function b(){let e=B(f),n=B(m);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),c(!1))}let x=(0,M.useMemo)(()=>{let e=l.trim().toLowerCase();return e===``?I:I.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[l]),S=B(f)!==null&&B(m)!==null;return(0,H.jsxs)(k,{open:n,onOpenChange:v,children:[(0,H.jsx)(A,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(j,{}),R(e)]})}),(0,H.jsx)(E,{children:(0,H.jsx)(D,{align:`end`,sideOffset:6,className:`oc-timerange__panel z-50 rounded-lg border border-border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,children:(0,H.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,H.jsx)(`div`,{className:`oc-timerange__section-title`,children:o()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:a()}),(0,H.jsx)(O,{type:`datetime-local`,value:f,onChange:e=>p(e.target.value)})]}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:h()}),(0,H.jsx)(O,{type:`datetime-local`,value:m,onChange:e=>_(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!S,onClick:b,children:r()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(T,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(O,{value:l,onChange:e=>u(e.target.value),placeholder:g(),"aria-label":s()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:x.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:i()}):x.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:()=>y(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{$g as r,BC as i,Bg as a,Cw as o,D as s,E as c,FC as l,Fg as u,GC as d,Gg as f,HC as p,Hg as m,IC as h,Ig as g,JC as _,Jg as v,KC as y,Kg as ee,LC as b,Lg as x,Qg as te,RC as S,Rg as ne,Sw as C,UC as w,Ug as re,VC as T,Vg as ie,WC as ae,Wg as oe,Xg as se,YC as ce,Yg as le,Zg as ue,__ as de,_w as fe,a_ as pe,an as me,aw as he,bw as ge,c_ as _e,cw as ve,d_ as ye,dj as E,dw as D,e_ as be,ew as O,f_ as xe,fj as k,fw as A,g_ as Se,gw as j,h_ as Ce,hw as M,i_ as we,in as N,iw as P,l_ as Te,lw as Ee,m_ as De,mw as F,n_ as Oe,nw as ke,o_ as Ae,on as je,ow as Me,p_ as Ne,pw as Pe,qC as Fe,qg as Ie,r_ as Le,rw as Re,s_ as ze,sw as Be,t_ as Ve,tw as I,u_ as He,uw as Ue,v_ as We,vw as Ge,ww as Ke,xw as qe,y_ as Je,yw as Ye,zC as Xe,zg as Ze}from"./dist-D7m7ryC2.js";import{n as Qe}from"./dist-CISpbyhZ.js";import{t as $e}from"./x-g5TNru3k.js";import{i as L,n as R,r as et,t as tt}from"./tabs-CZZSNNGS.js";import{t as z}from"./button-BMEzTwMt.js";import{A as B,C as V,Ft as nt,Ht as rt,N as it,Pt as at,Rt as ot,S as H,Ut as st,a as ct,at as U,b as W,ct as lt,dt as ut,ft as dt,ht as ft,i as pt,j as mt,lt as ht,o as gt,r as _t,st as vt,w as G,x as K}from"./index-CvZ8WIcf.js";import{n as q}from"./TimeRangePicker-xtCsggB6.js";import{t as yt}from"./FilterBar-CghkUT3Y.js";import{t as bt}from"./AdvancedFilter-CO1cUNNw.js";import{t as xt}from"./DataTableShell-BB1Bp-iF.js";var St=s(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=s(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),J=t(e(),1),Y=n(),X={kind:`relative`,from:`now-520w`,to:`now`},Z=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?he():n===`agent`?`${P()} - ${r}`:e}function Tt(){let e=k(c.me.getMe,{host:ft})?.role===`admin`,t=k(c.deliveryTiming.getDeliveryStatus,{}),n=E(c.deliveryTiming.startDeliveryRecord),r=E(c.deliveryTiming.stopDeliveryRecord),[i,a]=(0,J.useState)(!1),[s,l]=(0,J.useState)(!1),u=t?.recording??!1,d=async()=>{l(!0);try{u?await r({}):await n({})}finally{l(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:Ke()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:o()})]}),e?(0,Y.jsx)(z,{variant:u?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void d(),children:u?qe():C()}):null]}),u?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(U,{variant:`secondary`,children:ge()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:Ye({time:mt(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>a(e=>!e),children:i?j():fe()})}),i?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=k(c.deliveryTiming.listDeliverySessions,{}),n=E(c.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,o]=(0,J.useState)(`all`),[s,l]=(0,J.useState)(X),[u,d]=(0,J.useState)(null),{from:f,to:p}=q(s),m=s.to===`now`?1/0:p,g=r.trim()!==``||a!==`all`||s!==X,_=()=>{i(``),o(`all`),l(X)},v=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=f&&t.startedAt<=m).map(e=>({...e,_id:e.sessionId}))},[t,r,a,f,m]),y=e=>{let t=new Set((v??[]).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,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:F(),timeRange:s,onTimeRangeChange:l,onReset:_,canReset:g,children:(0,Y.jsxs)(W,{value:a,onValueChange:e=>o(e),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(G,{})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:`all`,children:Pe()}),(0,Y.jsx)(H,{value:`active`,children:A()}),(0,Y.jsx)(H,{value:`stopped`,children:D()})]})]})}),(0,Y.jsx)(xt,{title:M(),rows:v,emptyHint:h(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?ke():Re(),onClick:()=>d(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(nt,{size:15,"aria-hidden":!0})})},{header:Ue(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:B(e.startedAt)})},{header:Ee(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,Y.jsx)(`span`,{className:`tabular-nums`,children:B(e.stoppedAt)})},{header:ve(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:Be(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:Me(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(U,{variant:`secondary`,children:A()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:D()})}],rowActions:e?e=>[{label:I(),variant:`destructive`,onSelect:()=>y([e.sessionId])}]:void 0,bulkActions:e?[{label:I(),variant:`destructive`,onSelect:e=>y(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=k(c.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:O()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Ge()});let r=e.segments,a=(e,t)=>(0,Y.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,Y.jsx)(`td`,{className:`py-1`,children:e}),(0,Y.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,Y.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[Z(t.p50),` / `,Z(t.p95),` / `,Z(t.max)]})]});return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,l()]}),(0,Y.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,Y.jsx)(ot,{size:13,"aria-hidden":!0}),t?b():S()]})]}),(0,Y.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,Y.jsx)(`th`,{className:`py-1 font-medium`,children:Fe()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:y()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:d()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(ae(),r.bridge),a(w(),r.A),a(p(),r.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:T()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:Xe()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:i()})]})}var kt=[50,100,200,500],At=`all`,Q=`__all__`,jt=[`2xx`,`4xx`,`5xx`],Mt=[`user`,`service`,`system`],Nt=[`inbound`,`outbound`,`internal`],Pt={kind:`relative`,from:`now-30d`,to:`now`},Ft=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:je()},{value:`principalType`,label:me()},{value:`direction`,label:`direction`},{value:`roleKey`,label:N()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=st({from:`/settings/traces`}),t=rt({from:`/settings/traces`}),n=e.limit,i=e.kind,o=e.statusClass??Q,s=e.principalType??Q,l=e.direction??Q,u=e.roleKey??Q,d=e.q??``,p=_t(e.from,e.to),h=(0,J.useMemo)(()=>gt(e.adv),[e.adv]),{from:g,to:y}=q(p),[b,x]=(0,J.useState)(null),[S,C]=(0,J.useState)(null),w=e=>void t({search:t=>({...t,limit:e})}),T=e=>void t({search:t=>({...t,kind:e})}),ae=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),fe=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),me=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),he=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),ge=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),ve=e=>void t({search:t=>({...t,...ct(e)})}),E=e=>void t({search:t=>({...t,adv:pt(e)}),replace:!0}),D=k(c.observability.listEvents,{limit:n}),O=k(c.observability.listEvents,{limit:n,kind:i===At?void 0:i,filter:{q:d||void 0,from:g,to:y,statusClass:o===Q?void 0:o,principalType:s===Q?void 0:s,direction:l===Q?void 0:l,roleKey:u===Q?void 0:u,advanced:h.length>0?h:void 0}}),A=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])e.add(t.kind);return[...e].sort()},[D]),j=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[D]),M=d!==``||o!==Q||s!==Q||l!==Q||u!==Q||h.length>0||p.kind!==`relative`||p.from!==Pt.from;function N(){t({search:{limit:100,kind:`all`},replace:!0})}let P=b?D?.filter(e=>e.correlationId===b):O,Ee=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,Y.jsxs)(tt,{value:Ee,onValueChange:e=>F(e),children:[(0,Y.jsxs)(et,{className:`w-full`,children:[(0,Y.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(at,{size:13,"aria-hidden":!0}),ce()]}),(0,Y.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),_()]})]}),(0,Y.jsx)(R,{value:`latency`,children:(0,Y.jsx)(Tt,{})}),(0,Y.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,Y.jsxs)(`p`,{className:`oc-admin__hint`,children:[Je(),(0,Y.jsx)(`strong`,{children:We()}),de(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:Se()})]}),(0,Y.jsxs)(yt,{q:d,onQChange:ae,searchPlaceholder:Ce(),timeRange:p,onTimeRangeChange:ve,onReset:N,canReset:M,children:[(0,Y.jsxs)(W,{value:o,onValueChange:fe,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:De()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:Ne()}),jt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:s,onValueChange:me,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:xe()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:ye()}),Mt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:l,onValueChange:he,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:He()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:Te()}),Nt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:u,onValueChange:ge,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(G,{placeholder:_e()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:ze()}),j.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:i,onValueChange:T,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(G,{placeholder:Ae()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:At,children:pe()}),A.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(W,{value:String(n),onValueChange:e=>w(Number(e)),children:[(0,Y.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Y.jsx)(G,{})}),(0,Y.jsx)(K,{children:kt.map(e=>(0,Y.jsx)(H,{value:String(e),children:we({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:h,onChange:E}),b?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>x(null),title:Le(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[Oe(),(0,Y.jsx)(`code`,{children:$(b)})]}),(0,Y.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:Ve()})]})}):null,(0,Y.jsx)(xt,{title:be(),rows:P,emptyHint:b?r():te(),columns:[{header:ue(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:B(e.at)})},{header:se(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(U,{variant:`secondary`,children:e.kind})},{header:le(),sort:e=>Rt(e)??null,cell:e=>{let t=Rt(e);return t?(0,Y.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,Y.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":v(),children:`✓`})}},{header:Ie(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(U,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ee(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(U,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:f(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(U,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:oe(),sort:e=>e.route,cell:e=>e.route?(0,Y.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,Y.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:re(),sort:e=>e.status,cell:e=>e.status===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsx)(`span`,{className:`oc-traces__status ${Lt(e.status)}`,children:e.status})},{header:m(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,Y.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:ie(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:a(),onClick:()=>x(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Ze(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>C(e),children:ne()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:S,onClose:()=>C(null)})]})]})}function Lt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Rt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(vt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(lt,{className:`max-w-lg`,children:[(0,Y.jsxs)(ut,{children:[(0,Y.jsxs)(dt,{className:`oc-traces__meta-title`,children:[x(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(U,{variant:`outline`,children:g()})]}),(0,Y.jsx)(ht,{children:u()})]}),(0,Y.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{It as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$h as r,$x as i,Ax as a,Bx as o,Dx as s,E as c,Ex as l,Fx as u,Gx as d,Hx as f,Ix as p,Jx as ee,Kx as m,Lx as te,Ml as h,Mx as g,Nl as _,Nx as ne,Ox as re,Px as ie,Qh as v,Qx as y,Rx as ae,Ux as oe,Vx as se,Wx as ce,Xh as b,Xx as le,Yh as x,Yx as ue,Zh as S,Zx as de,ag as C,dj as w,eS as T,eg as E,fj as D,ig as O,jl as k,jx as fe,kx as pe,ng as A,og as j,qx as me,rg as M,sg as N,sx as he,tg as P,zx as ge}from"./dist-D7m7ryC2.js";import{t as F}from"./button-BMEzTwMt.js";import{$ as I,B as L,C as R,Dt as z,Et as B,Ht as _e,S as V,Ut as ve,V as ye,at as H,b as U,c as be,ct as xe,dt as Se,et as Ce,ft as we,ht as Te,it as Ee,l as W,lt as De,nt as Oe,p as G,s as K,st as ke,tt as Ae,w as q,x as J,z as Y}from"./index-CvZ8WIcf.js";import{t as je}from"./FilterBar-CghkUT3Y.js";import{t as Me}from"./DataTableShell-BB1Bp-iF.js";import{t as Ne}from"./DetailChips-CqxPS6Xc.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=D(c.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=D(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}`)),d=[...(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,state:e.state,outOfPool:!0}))],f=new Map;for(let e of d){let t=f.get(e.instanceName)??[];t.push(e),f.set(e.instanceName,t)}return(0,Z.jsx)(ke,{open:n,onOpenChange:r,children:(0,Z.jsxs)(xe,{className:`oc-access`,children:[(0,Z.jsxs)(Se,{children:[(0,Z.jsx)(we,{children:N({user:t})}),(0,Z.jsx)(De,{children:j()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?C():O()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:M()}):d.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:E()}):[...f.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:i,assigned:a,defaultKey:o}){let s=w(c.agents.assignAgent),l=w(c.agents.removeAgent),u=w(c.agents.setDefaultAgent),d=Y();if(!e)return null;async function f(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(A(),e)}}async function p(n){try{await u({profileId:e,instanceName:t,agentId:n})}catch(e){d.error(P(),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)(H,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=a.has(n),s=o===n,c=e.state===`deleted`;return(0,Z.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Z.jsx)(G,{checked:i,disabled:c&&!i,onCheckedChange:()=>void f(e.agentId,i),"aria-label":r({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:v()}):null,e.outOfPool?(0,Z.jsx)(H,{variant:`outline`,className:`oc-access__gone`,children:S()}):null,i?s?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":b(),title:b(),children:(0,Z.jsx)(B,{size:14,fill:`currentColor`})}):(0,Z.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":x(),title:x(),onClick:()=>void p(e.agentId),children:(0,Z.jsx)(B,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return k();case`user`:return h();case`admin`:return _();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=K.filter(e=>n.has(W[e])).length;return(0,Z.jsxs)(I,{children:[(0,Z.jsx)(Ee,{asChild:!0,children:(0,Z.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?T():i({count:r})})}),(0,Z.jsxs)(Ce,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(Oe,{children:y()}),K.map(e=>{let r=W[e];return(0,Z.jsxs)(Ae,{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:be[e]()})]},e)})]})]})}function Le(){let e=ve({from:`/settings/users`}),t=_e({from:`/settings/users`}),n=e.q??``,r=e.role??Q,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),h=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),_=D(c.admin.listUsers,{filter:{q:n||void 0,role:r===Q?void 0:r},withAgents:!0}),v=D(c.me.getMe,{host:Te}),y=w(c.admin.setRole),b=w(c.admin.setUserPermissions),x=w(c.admin.startImpersonation),S=w(c.admin.deleteUser),C=w(c.admin.setUserName),T=L(),E=ye(),O=Y(),[k,A]=(0,X.useState)(null),j=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of _??[])e.add(t.role);return[...e]},[_]),M=n!==``||r!==Q;function N(){t({search:{},replace:!0})}async function P(e){try{await y(e)}catch(e){O.error(de(),e)}}async function F(e){try{await b(e)}catch(e){O.error(le(),e)}}async function I(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await T({title:oe(),description:f({user:t}),confirmWord:se(),confirmLabel:o(),destructive:!0}))try{await S({profileId:e._id}),O.success(ae({user:t}))}catch(e){O.error(ge(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await E({title:p(),label:u({user:t}),placeholder:ie(),defaultValue:e.name??``,confirmLabel:he()});if(n!==null)try{await C({profileId:e._id,name:n}),O.success(ne())}catch(e){O.error(g(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{q:n,onQChange:i,searchPlaceholder:ue(),onReset:N,canReset:M,children:(0,Z.jsxs)(U,{value:r,onValueChange:h,children:[(0,Z.jsx)(R,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(V,{value:Q,children:ee()}),j.map(e=>(0,Z.jsx)(V,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:me(),rows:_,emptyHint:m(),rowActions:e=>{let t=[{label:l(),onSelect:()=>A({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:te(),onSelect:()=>void B(e)}];return e.userId!==v?.userId&&t.push({label:d(),onSelect:()=>void x({profileId:e._id})},{label:ce(),variant:`destructive`,onSelect:()=>void I(e)}),t},columns:[{header:fe(),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:a(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(U,{value:e.role,onValueChange:t=>void P({profileId:e._id,role:t}),children:[(0,Z.jsx)(R,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(V,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(V,{value:`user`,children:$(`user`)}),(0,Z.jsx)(V,{value:`admin`,children:$(`admin`)})]})]})},{header:pe(),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:s(),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:k?.profileId??null,userLabel:k?.label??``,open:k!==null,onOpenChange:e=>{e||A(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{Cs as r,Ct as i,D as a,E as o,G as s,Gc as ee,H as c,I as l,K as u,L as d,M as te,N as ne,P as f,R as re,St as ie,Ts as p,Tt as m,U as ae,W as oe,_t as h,aj as g,at as _,bt as v,ct as y,dj as b,dt as se,et as ce,fj as x,ft as S,gt as le,ht as ue,it as C,j as de,lt as w,mt as T,nt as E,ot as D,pt as O,rj as k,rt as A,st as j,tt as M,ut as N,vt as P,wt as F,xt as I,yt as L,z as R}from"./dist-D7m7ryC2.js";import{i as z,n as B,r as V,t as H}from"./tabs-CZZSNNGS.js";import{t as U}from"./button-BMEzTwMt.js";import{C as W,Ct as fe,F as pe,Ht as me,I as he,L as ge,P as _e,R as ve,S as G,Ut as ye,at as K,b as q,ht as be,jt as xe,p as J,w as Y,x as X}from"./index-CvZ8WIcf.js";/* empty css */var Se=a(`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`}]]),Z=t(e(),1),Q=n(),Ce=[[`auto`,()=>P()],[`fr-FR`,()=>u()],[`en-US`,()=>s()],[`en-GB`,()=>oe()],[`de-DE`,()=>ae()],[`es-ES`,()=>c()]],we=[[`0.75`,()=>le()],[`1`,()=>ue()],[`1.25`,()=>T()],[`1.5`,()=>O()]];function $({instance:e}){let t=b(o.admin.upsertInstanceConfig),n=e.config??{},i={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,s]=(0,Z.useState)(i),[c,l]=(0,Z.useState)(`idle`);(0,Z.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}),l(`idle`)},[e._id]);let u=a.enabled!==i.enabled||a.engine!==i.engine||a.lang!==i.lang||a.rate!==i.rate||a.autoRead!==i.autoRead;async function d(){l(`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}),l(`idle`)}catch{l(`error`)}}return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Q.jsx)(K,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:a.enabled,onCheckedChange:e=>s({...a,enabled:e===!0}),"aria-label":v()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:v()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:f()}),(0,Q.jsxs)(q,{value:a.engine,onValueChange:e=>s({...a,engine:e}),disabled:!a.enabled,children:[(0,Q.jsx)(W,{size:`sm`,"aria-label":f(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsxs)(X,{children:[(0,Q.jsx)(G,{value:`browser`,children:ne()}),e.kind===`hermes`?null:(0,Q.jsx)(G,{value:`gateway`,children:te()})]})]})]}),a.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:de()}):null,(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:L()}),(0,Q.jsxs)(q,{value:a.lang,onValueChange:e=>s({...a,lang:e}),disabled:!a.enabled,children:[(0,Q.jsx)(W,{size:`sm`,"aria-label":L(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsx)(X,{children:Ce.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:h()}),(0,Q.jsxs)(q,{value:a.rate,onValueChange:e=>s({...a,rate:e}),disabled:!a.enabled,children:[(0,Q.jsx)(W,{size:`sm`,"aria-label":h(),children:(0,Q.jsx)(Y,{})}),(0,Q.jsx)(X,{children:we.map(([e,t])=>(0,Q.jsx)(G,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:a.autoRead,onCheckedChange:e=>s({...a,autoRead:e===!0}),disabled:!a.enabled,"aria-label":S()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:S()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:se()}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(U,{size:`sm`,disabled:!u||c===`saving`,onClick:()=>void d(),children:c===`saving`?ee():p()}),(0,Q.jsx)(U,{variant:`outline`,size:`sm`,disabled:!a.enabled,onClick:()=>{let e=Number.parseFloat(a.rate)||1;he(y(),{lang:pe(a.lang,g()),rate:e})},children:N()}),(0,Q.jsx)(U,{variant:`ghost`,size:`sm`,onClick:()=>ge(),children:w()})]}),c===`error`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:r()}):null]})}function Te({stt:e}){let t=x(o.me.getMe,{host:be}),n=b(o.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:D()}),(0,Q.jsx)(K,{variant:e?`secondary`:`outline`,children:e?M():ce()}),(0,Q.jsx)(K,{variant:r?`secondary`:`destructive`,children:r?re():d()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(J,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":R()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:R()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:_()})]})}function Ee(){let e=x(o.admin.listInstances,{}),t=(0,Z.useMemo)(()=>ve(),[]),n=(0,Z.useMemo)(()=>_e(),[]),{section:r}=ye({from:`/settings/voice`}),a=me({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:m()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(K,{variant:t?`secondary`:`destructive`,children:t?F():i()}),(0,Q.jsx)(K,{variant:n?`secondary`:`destructive`,children:n?ie():I()})]}),(0,Q.jsxs)(H,{value:r,onValueChange:e=>void a({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(V,{className:`w-full`,children:[(0,Q.jsxs)(z,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(fe,{size:13,"aria-hidden":!0}),l()]}),(0,Q.jsxs)(z,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(xe,{size:13,"aria-hidden":!0}),D()]}),(0,Q.jsxs)(z,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Se,{size:13,"aria-hidden":!0}),C()]})]}),(0,Q.jsx)(B,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:k()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:j()}):e.map(e=>(0,Q.jsx)($,{instance:e},e._id))}),(0,Q.jsx)(B,{value:`dictation`,children:(0,Q.jsx)(Te,{stt:n})}),(0,Q.jsx)(B,{value:`talk`,children:(0,Q.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Q.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Q.jsx)(`span`,{className:`oc-voice__instance`,children:C()}),(0,Q.jsx)(K,{variant:`outline`,children:A()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:E()})]})})]})]})}export{Ee 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-BjwyR-Rb.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-D7m7ryC2.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-BjwyR-Rb.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-D7m7ryC2.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-D7m7ryC2.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{Ft as e,as as t,hs as n,ns as r,os as i,rs as a,ss as o}from"./dist-BjwyR-Rb.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`?i():t()}function m(e){return e??n()}function h(t,n){return n&&n!==`openclaw`?e({provider:n}):t===null?r():a({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{Lt as e,_s as t,as as n,cs as r,is as i,ls as a,ss as o}from"./dist-D7m7ryC2.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`?a():e===`beyond`?r():o()}function m(e){return e??t()}function h(t,r){return r&&r!==`openclaw`?e({provider:r}):t===null?i():n({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{Ad as e,Bd as t,Cd as n,Dd as r,Ed as i,Fd as a,Hd as o,Id as s,Ld as c,Md as l,Nd as u,Od as d,Pd as f,Rd as p,Sd as m,Td as h,Ud as g,Vd as _,_d as v,bd as y,gd as b,hd as x,jd as S,kd as C,vd as w,wd as T,xd as E,yd as D,zd as O}from"./dist-D7m7ryC2.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:t()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:c(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:a(),hint:f()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:C(),hint:d()}),ATTACHMENT_REJECTED:()=>({label:r(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:S(),hint:e()}),INVALID_REQUEST:()=>({label:h(),hint:T()}),NOT_CONFIGURED:()=>({label:n(),hint:m()}),UNROUTED:()=>({label:E(),hint:y()}),UPSTREAM_ERROR:()=>({label:D(),hint:w()}),UNKNOWN:()=>({label:v(),hint:b()})};function A(e){return e?k[e]?.()??{label:e,hint:x()}:k.UNKNOWN()}export{A as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{D as r,S as i,T as a,h as o}from"./dist-BjwyR-Rb.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-D7m7ryC2.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 +1 @@
1
- import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-BjwyR-Rb.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
1
+ import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{D as n}from"./dist-D7m7ryC2.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};