@lacneu/atrium 0.10.12 → 0.10.13

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 (57) hide show
  1. package/dist/assets/{AccessTab-ByOF_9U7.js → AccessTab-CEi2jEXZ.js} +1 -1
  2. package/dist/assets/{AdvancedFilter-I8EFwacj.js → AdvancedFilter-EPxqO-eA.js} +1 -1
  3. package/dist/assets/{AgentFilesTab-BbOThmoA.js → AgentFilesTab-lYSv6XmB.js} +2 -2
  4. package/dist/assets/{AnomaliesTab-CZXAth8X.js → AnomaliesTab-BOKqiWd2.js} +1 -1
  5. package/dist/assets/{AuditTab-NDOuL0Lj.js → AuditTab-DnBhTYMJ.js} +1 -1
  6. package/dist/assets/BridgeTab-BiMrYTrr.js +1 -0
  7. package/dist/assets/ChatDefaultsTab-lJmDn_58.js +1 -0
  8. package/dist/assets/{DataTableShell-DB_nXosI.js → DataTableShell-BpD7pA0i.js} +1 -1
  9. package/dist/assets/{DetailChips-D5ajSYYG.js → DetailChips-BA1mq7Wm.js} +1 -1
  10. package/dist/assets/{FeedbacksTab-zXU6kI7V.js → FeedbacksTab-Dt92LCDU.js} +1 -1
  11. package/dist/assets/{FieldLabel-BeAnlLfA.js → FieldLabel-CFckKZrw.js} +1 -1
  12. package/dist/assets/FilesTab-CABwvKIR.js +1 -0
  13. package/dist/assets/{FilterBar-BJDv7ENT.js → FilterBar-DB-b7WAm.js} +1 -1
  14. package/dist/assets/GroupsTab-01UtVbu_.js +1 -0
  15. package/dist/assets/InstancesTab-CRA7-G_l.js +1 -0
  16. package/dist/assets/IntegrationsTab-Dtf3L_gX.js +1 -0
  17. package/dist/assets/{KpiTab-n3i5WDnQ.js → KpiTab-CYRAZPuB.js} +1 -1
  18. package/dist/assets/PreferencesTab-CjVBIxqe.js +1 -0
  19. package/dist/assets/{PromptInjectionsTab-BrI6Q-c7.js → PromptInjectionsTab-O-RMzIb1.js} +2 -2
  20. package/dist/assets/{RolesTab-DE5lmr5N.js → RolesTab-68zkT6ks.js} +1 -1
  21. package/dist/assets/ServiceAccountsTab-CvguS5Iy.js +1 -0
  22. package/dist/assets/ThemeShowroom-DhKQpNPj.js +1 -0
  23. package/dist/assets/{TimeRangePicker-DsW1QCH4.js → TimeRangePicker--wX3a-5x.js} +1 -1
  24. package/dist/assets/{TracesTab-BOrqSSNT.js → TracesTab-DO0c_Ypn.js} +1 -1
  25. package/dist/assets/UsersTab-BMM1oQPU.js +1 -0
  26. package/dist/assets/{button-DgXvFpn-.js → button-x4eiKyNo.js} +1 -1
  27. package/dist/assets/{card-Dbpx1kqO.js → card-BpwyvJ1X.js} +1 -1
  28. package/dist/assets/chevrons-up-down-Dn5VCqqo.js +1 -0
  29. package/dist/assets/{compatView-DsYryBsX.js → compatView-D1fAiei9.js} +1 -1
  30. package/dist/assets/{dispatchErrorInfo-BUw7_r6A.js → dispatchErrorInfo-CIQ2MRwS.js} +1 -1
  31. package/dist/assets/{dist-LmEWWbCO.js → dist-BhemspoL.js} +1 -1
  32. package/dist/assets/{dist-B1WV6sgR.js → dist-BiCy_qcc.js} +1 -1
  33. package/dist/assets/{dist-Cad_J654.js → dist-VD7Y9bPB.js} +1 -1
  34. package/dist/assets/{dist-Ce__brvM.js → dist-uStCogeE.js} +1 -1
  35. package/dist/assets/{highlighted-body-OFNGDK62-mni8GXYM.js → highlighted-body-OFNGDK62-CdPsDE0f.js} +1 -1
  36. package/dist/assets/index-BlZ8oKFa.js +220 -0
  37. package/dist/assets/mermaid-GHXKKRXX-DgFC5iC-.js +1 -0
  38. package/dist/assets/roleDescriptions-DJHA0ezr.js +1 -0
  39. package/dist/assets/{table-SUDKYeE8.js → table-BQp_EgUj.js} +1 -1
  40. package/dist/assets/x-C9JKw9Pc.js +1 -0
  41. package/dist/index.html +7 -7
  42. package/package.json +1 -1
  43. package/dist/assets/BridgeTab-CL3W0gfM.js +0 -1
  44. package/dist/assets/ChatDefaultsTab-BjDJ8Q4m.js +0 -1
  45. package/dist/assets/FilesTab-CCmsh1xd.js +0 -1
  46. package/dist/assets/GroupsTab-Cu2bUJnJ.js +0 -1
  47. package/dist/assets/InstancesTab-BLoVAiLO.js +0 -1
  48. package/dist/assets/IntegrationsTab-BsYuZfmL.js +0 -1
  49. package/dist/assets/PreferencesTab-DDOOdCN6.js +0 -1
  50. package/dist/assets/ServiceAccountsTab-C9EtvgMh.js +0 -1
  51. package/dist/assets/ThemeShowroom-BKg8rdmA.js +0 -1
  52. package/dist/assets/UsersTab-DkwZ1S_U.js +0 -1
  53. package/dist/assets/chevrons-up-down-CTaYCZ4D.js +0 -1
  54. package/dist/assets/index-B0OTsC0S.js +0 -220
  55. package/dist/assets/mermaid-GHXKKRXX-htap4Ez7.js +0 -1
  56. package/dist/assets/roleDescriptions-ASM2ogBV.js +0 -1
  57. package/dist/assets/x-CmMNOdcT.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$b as r,$x as i,Ax as a,Bb as o,Bx as s,Cx as c,Dx as l,Ex as u,Fx as d,GS as f,Gb as p,Gx as m,Hb as h,Hx as g,Ix as ee,Jb as te,Jx as ne,Kb as re,Kx as ie,LC as _,Lb as ae,Lx as oe,Mx as se,Nx as ce,Ox as le,Px as ue,Qb as de,Qx as fe,RC as pe,Rb as me,Rx as he,Sx as v,Tx as ge,UC as y,Ub as _e,Ux as ve,VC as ye,Vb as b,Vx as be,WC as x,WS as xe,Wb as Se,Wx as Ce,Xb as we,Xx as Te,Yb as Ee,Yx as S,Zb as De,Zx as Oe,_x as ke,aS as Ae,ax as je,bx as Me,cC as Ne,cx as Pe,dx as Fe,eS as Ie,ex as Le,fx as Re,gx as ze,hx as Be,iS as Ve,ix as He,jx as Ue,kx as We,lx as Ge,mx as Ke,n as qe,nS as Je,nx as Ye,oC as Xe,ox as Ze,px as Qe,qb as $e,qx as et,rS as tt,rx as C,sC as nt,sx as rt,tS as it,tx as at,ux as ot,vx as st,wx as ct,xx as lt,yx as ut,zb as dt,zx as ft}from"./dist-BhemspoL.js";import{n as w}from"./dist-uStCogeE.js";import{t as pt}from"./TimeRangePicker--wX3a-5x.js";import{t as T}from"./x-C9JKw9Pc.js";import{t as E}from"./button-x4eiKyNo.js";import{$ as D,C as O,O as k,Q as mt,S as A,St as j,Z as ht,at as M,b as N,et as gt,it as _t,m as P,nt as vt,q as F,rt as yt,tt as I,x as L,y as R}from"./index-BlZ8oKFa.js";import{a as bt,i as xt,n as St,o as Ct,r as wt,t as Tt}from"./card-BpwyvJ1X.js";import{a as Et,i as z,n as Dt,o as B,r as V,t as Ot}from"./table-BQp_EgUj.js";import{t as kt}from"./FilterBar-DB-b7WAm.js";import{t as At}from"./AdvancedFilter-EPxqO-eA.js";var H=pe(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),U=t(e(),1),jt=.1,Mt=[248,248,248],Nt=[24,24,24];function Pt(e,t,n){let r=t,i=n,a=-1,o=-1;for(let s=0;s<n;s++)for(let n=0;n<t;n++)e[(s*t+n)*4+3]>8&&(n<r&&(r=n),n>a&&(a=n),s<i&&(i=s),s>o&&(o=s));return a<0?null:{x:r,y:i,width:a-r+1,height:o-i+1}}function Ft(e,t,n){let r=t*n;if(r===0)return 0;let i=0;for(let t=3;t<e.length;t+=4)e[t]<=8&&i++;return i/r}function W(e,t,n){return Ft(e,t,n)>=jt}function It(e,t){for(let n=0;n<e.length;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2]}function Lt(e){for(let t=0;t<e.length;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}var Rt=12*1024*1024,zt=480,Bt=160,Vt=.92;async function Ht(e,t={}){if(!e.type.startsWith(`image/`))throw Error(Ze());if(e.size>Rt)throw Error(je());let{source:n,width:r,height:i,cleanup:a}=await Ut(e);try{let a=e.type===`image/svg+xml`,o=Math.min(zt/r,Bt/i,a?1/0:1),s=Math.max(1,Math.round(r*o)),c=Math.max(1,Math.round(i*o)),l=document.createElement(`canvas`);l.width=s,l.height=c;let u=l.getContext(`2d`);if(!u)throw Error(C());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=Pt(u.getImageData(0,0,s,c).data,s,c)??{x:0,y:0,width:s,height:c},f=document.createElement(`canvas`);f.width=d.width,f.height=d.height;let p=f.getContext(`2d`);if(!p)throw Error(C());if(p.drawImage(l,d.x,d.y,d.width,d.height,0,0,d.width,d.height),t.variantFor){let e=p.getImageData(0,0,d.width,d.height);W(e.data,d.width,d.height)?It(e.data,t.variantFor===`dark`?Mt:Nt):Lt(e.data),p.putImageData(e,0,0)}let m=W(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await K(f,`image/webp`,Vt)??await K(f,`image/png`);if(!h)throw Error(Ye());return{blob:h,hasAlpha:m}}finally{a()}}async function Ut(e){if(e.type===`image/svg+xml`)return G(e);if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,cleanup:()=>t.close()}}catch{}return G(e)}async function G(e){let t=URL.createObjectURL(e);try{let e=new Image;return e.decoding=`async`,await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=()=>r(Error(He())),e.src=t}),{source:e,width:e.naturalWidth||300,height:e.naturalHeight||150,cleanup:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}}function K(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var q=n(),J=`__all__`,Y={kind:`relative`,from:`now-24h`,to:`now`},X=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function Z({title:e,description:t,children:n}){return(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,q.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,q.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function Wt(e){return e===`light`?Ne():e===`dark`?nt():Xe()}var Gt=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Kt({tokens:e,mode:t}){let n=e.colors[t];return(0,q.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Gt.map(e=>{let t=n[e];return(0,q.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function Q({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a}){return(0,q.jsxs)(`button`,{type:`button`,className:qe(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,q.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,q.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,q.jsx)(w,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,q.jsx)(Kt,{tokens:r,mode:i}):(0,q.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,q.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,q.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]})}function qt({selectedKey:e,resolvedMode:t}){let n=x(_.charts.listMyCharts),r=y(_.charts.setMyChart);async function i(e){try{await r({name:e})}catch{}}return(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h2`,{className:`oc-show__title`,children:Oe()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:Te()})]}),(0,q.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,q.jsx)(Q,{selected:e===null,title:S(),subtitle:ne(),tokens:null,mode:t,onSelect:()=>void i(null)}),(n??[]).map(n=>{let r=n.via===`common`?et():n.via===`owner`?ie():m({group:n.via.group});return(0,q.jsx)(Q,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void i(n.key)},n.key)})]}),n!==void 0&&n.length===0?(0,q.jsx)(`p`,{className:`oc-show__desc`,children:Ce()}):null]})}function Jt(){let e=y(_.charts.importChart),[t,n]=(0,U.useState)(``),[r,i]=(0,U.useState)(``),[o,s]=(0,U.useState)(null),[d,f]=(0,U.useState)(!1),[p,m]=(0,U.useState)(!1);async function h(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),f(!1);try{i(await t.text())}catch{s(v())}}}async function g(){if(s(null),f(!1),t.trim()===``){s(Me());return}let a;try{a=JSON.parse(r)}catch{s(v());return}m(!0);try{await e({name:t.trim(),tokens:a}),f(!0),n(``),i(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{m(!1)}}return(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h2`,{className:`oc-show__title`,children:a()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:We()})]}),(0,q.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,q.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,q.jsx)(`span`,{className:`oc-chart-import__label`,children:le()}),(0,q.jsx)(F,{value:t,onChange:e=>n(e.target.value),placeholder:l(),maxLength:60})]}),(0,q.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,q.jsx)(`span`,{className:`oc-chart-import__label`,children:u()}),(0,q.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:ge(),rows:8,spellCheck:!1})]}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(E,{variant:`outline`,size:`sm`,asChild:!0,children:(0,q.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,q.jsx)(H,{className:`size-4`}),ct(),(0,q.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void h(e)})]})}),(0,q.jsx)(E,{size:`sm`,disabled:p,onClick:()=>void g(),children:c()})]}),o?(0,q.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,d?(0,q.jsx)(`p`,{className:`oc-chart-import__ok`,children:lt()}):null]})]})}function Yt({chart:e}){let t=ye(_.charts.setChartLogo),n=y(_.charts.removeChartLogo),[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(null),s=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function c(n,r,a){if(e.chartId!==void 0){o(null),i(!0);try{let{blob:i,hasAlpha:o}=await Ht(r,a?{variantFor:a}:{}),s=await i.arrayBuffer();await t({chartId:e.chartId,bytes:s,mode:n,hasAlpha:o})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function l(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await c(e,n)}async function u(t){if(e.chartId!==void 0){o(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function d(e){let t=s(e===`light`?`dark`:`light`);if(t){o(null),i(!0);try{await c(e,await(await fetch(t)).blob(),e)}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function f({mode:e}){let t=s(e),n=s(e===`light`?`dark`:`light`);return(0,q.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,q.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?Qe():Re()}),(0,q.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,q.jsx)(`img`,{src:t,alt:``}):null}),(0,q.jsx)(E,{variant:`outline`,size:`sm`,asChild:!0,children:(0,q.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,q.jsx)(H,{className:`size-4`}),t?ot():Fe(),(0,q.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,q.jsx)(E,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:Pe()}):null,t?(0,q.jsx)(E,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:Ge()}):null]})}return(0,q.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,q.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:Ke()}),(0,q.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,q.jsx)(f,{mode:`light`}),(0,q.jsx)(f,{mode:`dark`})]}),r?(0,q.jsx)(`span`,{className:`oc-show__desc`,children:rt()}):null,a?(0,q.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function $({chart:e}){let t=x(_.me.getMe,{host:M}),n=y(_.charts.addChartDomain),i=y(_.charts.removeChartDomain),[a,o]=(0,U.useState)(``),[s,c]=(0,U.useState)(null),[l,u]=(0,U.useState)(!1);if(t?.role!==`admin`)return null;let d=e.domains??[];async function f(){let t=a.trim();if(t!==``){c(null),u(!0);try{await n({chartKey:e.key,domain:t}),o(``)}catch(e){c(e instanceof Error?e.message:String(e))}finally{u(!1)}}}async function p(t){c(null);try{await i({chartKey:e.key,domain:t})}catch{}}return(0,q.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,q.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:at()}),(0,q.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,q.jsx)(`div`,{className:`oc-chart-avail__groups`,children:d.length===0?(0,q.jsx)(`span`,{className:`oc-show__desc`,children:De()}):d.map(e=>(0,q.jsxs)(P,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,q.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":we({domain:e}),onClick:()=>void p(e),children:(0,q.jsx)(T,{className:`size-3`})})]},e))}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(F,{value:a,onChange:e=>o(e.target.value),placeholder:r(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&f()}}),(0,q.jsx)(E,{variant:`outline`,size:`sm`,disabled:l,onClick:()=>void f(),children:de()})]}),(0,q.jsx)(`span`,{className:`oc-show__desc`,children:Le()}),s?(0,q.jsx)(`p`,{className:`oc-chart-import__error`,children:s}):null]})]})}function Xt({chart:e}){let t=y(_.charts.updateChart),n=y(_.charts.deleteChart),[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(e.name),[s,c]=(0,U.useState)(()=>JSON.stringify(e.tokens,null,2)),[l,u]=(0,U.useState)(null),[d,f]=(0,U.useState)(!1);function m(){o(e.name),c(JSON.stringify(e.tokens,null,2)),u(null),i(!0)}async function h(){if(e.chartId===void 0)return;u(null);let n;try{n=JSON.parse(s)}catch{u(v());return}f(!0);try{await t({chartId:e.chartId,name:a.trim(),tokens:n}),i(!1)}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(!1)}}async function g(){if(e.chartId!==void 0&&window.confirm(p()))try{await n({chartId:e.chartId})}catch{}}return(0,q.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,q.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,q.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,q.jsx)(`div`,{className:`oc-show__row`,children:r?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(E,{variant:`outline`,size:`sm`,onClick:m,children:ze()}),(0,q.jsx)(E,{variant:`ghost`,size:`sm`,onClick:()=>void g(),children:Be()})]})})]}),r?(0,q.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,q.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,q.jsx)(`span`,{className:`oc-chart-import__label`,children:$e()}),(0,q.jsx)(F,{value:a,onChange:e=>o(e.target.value),maxLength:60})]}),(0,q.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,q.jsx)(`span`,{className:`oc-chart-import__label`,children:re()}),(0,q.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:s,onChange:e=>c(e.target.value),rows:10,spellCheck:!1})]}),l?(0,q.jsx)(`p`,{className:`oc-chart-import__error`,children:l}):null,(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(E,{size:`sm`,disabled:d,onClick:()=>void h(),children:Ee()}),(0,q.jsx)(E,{variant:`ghost`,size:`sm`,onClick:()=>i(!1),children:te()})]})]}):null,(0,q.jsx)(Yt,{chart:e}),(0,q.jsx)($,{chart:e})]})}function Zt(){let e=x(_.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h2`,{className:`oc-show__title`,children:ut()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:st()})]}),e!==void 0&&t.length===0?(0,q.jsx)(`p`,{className:`oc-show__desc`,children:ke()}):(0,q.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,q.jsx)(Xt,{chart:e},e.key))})]})}function Qt({chart:e,groups:t}){let n=y(_.charts.addChartToGroupPool),r=y(_.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,o=new Set((a??[]).map(e=>e.groupId)),s=t.filter(e=>!o.has(e._id));async function c(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function l(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,q.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,q.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,q.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,q.jsx)(P,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?ee():e.kind===`custom`&&e.scope===`personal`?b():oe()}),e.isGlobalDefault?(0,q.jsx)(P,{variant:`default`,children:d()}):null]}),(0,q.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,q.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:ce()}),(a??[]).map(e=>(0,q.jsxs)(P,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,q.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Ue({group:e.name}),onClick:()=>void l(e.groupId),children:(0,q.jsx)(T,{className:`size-3`})})]},e.groupId)),s.length>0?(0,q.jsxs)(R,{value:``,onValueChange:e=>void c(e),children:[(0,q.jsx)(A,{size:`sm`,className:`w-56`,children:(0,q.jsx)(O,{placeholder:se()})}),(0,q.jsx)(N,{children:s.map(e=>(0,q.jsx)(L,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,q.jsx)(`span`,{className:`oc-show__desc`,children:ue()}):null]})]})}function $t({chart:e}){let t=y(_.charts.promoteChartToCommon),n=y(_.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function i(){if(e.chartId!==void 0&&window.confirm(p()))try{await n({chartId:e.chartId})}catch{}}return(0,q.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,q.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,q.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,q.jsx)(P,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?o():b()}),e.ownerLabel?(0,q.jsx)(`span`,{className:`oc-show__desc`,children:h({owner:e.ownerLabel})}):null]}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,q.jsx)(E,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:dt()}):null,(0,q.jsx)(E,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:me()})]})]})}function en({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=y(_.admin.setDefaultThemeMode),a=y(_.admin.setDefaultLocale),o=y(_.charts.setDefaultChart),c=x(_.charts.listChartsAdmin),l=x(_.groups.listGroups,{}),u=e??`system`,d=t??`fr`;return(0,q.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h2`,{className:`oc-show__title`,children:i()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:fe()})]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:ve()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:g()})]}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(E,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void o({name:null}),children:S()}),_t.map(e=>(0,q.jsx)(E,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key)),(c??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,q.jsx)(E,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key))]})]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:be()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:s()})]}),(0,q.jsx)(`div`,{className:`oc-chart-avail-list`,children:(c??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,q.jsx)(Qt,{chart:e,groups:l??[]},e.key))})]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:ft()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:he()})]}),(0,q.jsx)(`div`,{className:`oc-chart-avail-list`,children:(c??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,q.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,q.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,q.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,q.jsx)($,{chart:e})]},e.key))})]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:Se()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:_e()})]}),(()=>{let e=(c??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,q.jsx)(`p`,{className:`oc-show__desc`,children:ae()}):(0,q.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,q.jsx)($t,{chart:e},e.key))})})()]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:Ae()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:Ve()})]}),(0,q.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,q.jsx)(E,{variant:u===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:Wt(e)},e))})]}),(0,q.jsxs)(`section`,{className:`oc-show__section`,children:[(0,q.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,q.jsx)(`h3`,{className:`oc-show__title`,children:tt()}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:Je()})]}),(0,q.jsx)(`div`,{className:`oc-show__row`,children:[`fr`,`en`].map(e=>(0,q.jsx)(E,{variant:d===e?`default`:`outline`,size:`sm`,onClick:()=>void a({locale:e}),children:e===`fr`?f():xe()},e))}),(0,q.jsx)(`p`,{className:`oc-show__desc`,children:it()})]})]})}function tn(){let e=x(_.me.getMe,{host:M}),t=yt(e?.resolvedThemeMode);return(0,q.jsxs)(`div`,{className:`oc-appearance`,children:[(0,q.jsx)(qt,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,q.jsx)(Jt,{}),(0,q.jsx)(Zt,{}),e?.role===`admin`?(0,q.jsx)(en,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function nn(){let[e,t]=(0,U.useState)(!0),[n,r]=(0,U.useState)(`per-user`),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(J),[c,l]=(0,U.useState)(J),[u,d]=(0,U.useState)(Y),f=i!==``||o!==J||c!==J;function p(){a(``),s(J),l(J),d(Y)}return(0,q.jsxs)(`div`,{className:`oc-show`,children:[(0,q.jsx)(tn,{}),(0,q.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,q.jsx)(`summary`,{className:`oc-show__title`,children:Ie()}),(0,q.jsxs)(Z,{title:`Buttons`,description:`Variants`,children:[(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(E,{children:`Default`}),(0,q.jsx)(E,{variant:`secondary`,children:`Secondary`}),(0,q.jsx)(E,{variant:`outline`,children:`Outline`}),(0,q.jsx)(E,{variant:`ghost`,children:`Ghost`}),(0,q.jsx)(E,{variant:`destructive`,children:`Destructive`}),(0,q.jsx)(E,{variant:`link`,children:`Link`})]}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(E,{size:`sm`,children:`Small`}),(0,q.jsx)(E,{children:`Default`}),(0,q.jsx)(E,{size:`lg`,children:`Large`}),(0,q.jsx)(E,{size:`icon`,"aria-label":`more`,children:(0,q.jsx)(j,{})}),(0,q.jsx)(E,{disabled:!0,children:`Disabled`})]})]}),(0,q.jsx)(Z,{title:`Badges`,children:(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(P,{children:`Default`}),(0,q.jsx)(P,{variant:`secondary`,children:`Secondary`}),(0,q.jsx)(P,{variant:`outline`,children:`Outline`}),(0,q.jsx)(P,{variant:`destructive`,children:`Destructive`})]})}),(0,q.jsx)(Z,{title:`Inputs & selection`,children:(0,q.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,q.jsx)(F,{placeholder:`Text input…`}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsxs)(R,{value:n,onValueChange:r,children:[(0,q.jsx)(A,{className:`w-56`,children:(0,q.jsx)(O,{placeholder:`Select…`})}),(0,q.jsxs)(N,{children:[(0,q.jsx)(L,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,q.jsx)(L,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,q.jsxs)(`label`,{className:`oc-show__check`,children:[(0,q.jsx)(k,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,q.jsx)(Z,{title:`Filtres & plage temporelle`,description:`Barre réutilisable (recherche debouncée + selects rapides à largeur auto + plage façon Grafana) et constructeur de filtre avancé. Câblée dans Users, Groups, Comptes de service, Traces, Anomalies, Audit et KPI.`,children:(0,q.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,q.jsxs)(kt,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,q.jsxs)(R,{value:o,onValueChange:s,children:[(0,q.jsx)(A,{size:`sm`,children:(0,q.jsx)(O,{})}),(0,q.jsxs)(N,{children:[(0,q.jsx)(L,{value:J,children:`Toutes directions`}),(0,q.jsx)(L,{value:`inbound`,children:`inbound`}),(0,q.jsx)(L,{value:`outbound`,children:`outbound`}),(0,q.jsx)(L,{value:`internal`,children:`internal`})]})]}),(0,q.jsxs)(R,{value:c,onValueChange:l,children:[(0,q.jsx)(A,{size:`sm`,children:(0,q.jsx)(O,{})}),(0,q.jsxs)(N,{children:[(0,q.jsx)(L,{value:J,children:`Toutes sévérités`}),(0,q.jsx)(L,{value:`info`,children:`info`}),(0,q.jsx)(L,{value:`warn`,children:`warn`}),(0,q.jsx)(L,{value:`critical`,children:`critical`})]})]})]}),(0,q.jsx)(At,{fields:X,onChange:()=>{}}),(0,q.jsxs)(`div`,{className:`oc-show__row`,children:[(0,q.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,q.jsx)(pt,{value:u,onChange:d})]})]})}),(0,q.jsx)(Z,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,q.jsxs)(ht,{children:[(0,q.jsx)(vt,{asChild:!0,children:(0,q.jsx)(E,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,q.jsx)(j,{})})}),(0,q.jsxs)(mt,{align:`start`,children:[(0,q.jsx)(gt,{children:`Actions`}),(0,q.jsx)(I,{}),(0,q.jsx)(D,{children:`Edit`}),(0,q.jsx)(D,{children:`Duplicate`}),(0,q.jsx)(I,{}),(0,q.jsx)(D,{variant:`destructive`,children:`Delete`})]})]})}),(0,q.jsx)(Z,{title:`Card`,children:(0,q.jsxs)(Tt,{className:`w-80`,children:[(0,q.jsxs)(bt,{children:[(0,q.jsx)(Ct,{children:`Instance`}),(0,q.jsx)(wt,{children:`Non-secret metadata only.`})]}),(0,q.jsx)(St,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,q.jsxs)(xt,{className:`gap-2`,children:[(0,q.jsx)(E,{size:`sm`,children:`Save`}),(0,q.jsx)(E,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,q.jsx)(Z,{title:`Table`,children:(0,q.jsxs)(Ot,{children:[(0,q.jsx)(Et,{children:(0,q.jsxs)(B,{children:[(0,q.jsx)(z,{className:`w-8`,children:(0,q.jsx)(k,{"aria-label":`select all`})}),(0,q.jsx)(z,{children:`Name`}),(0,q.jsx)(z,{children:`Mode`}),(0,q.jsx)(z,{className:`text-right`,children:`Status`}),(0,q.jsx)(z,{className:`w-8`})]})}),(0,q.jsx)(Dt,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,q.jsxs)(B,{children:[(0,q.jsx)(V,{children:(0,q.jsx)(k,{"aria-label":`select ${e.n}`})}),(0,q.jsx)(V,{className:`font-medium`,children:e.n}),(0,q.jsx)(V,{children:(0,q.jsx)(P,{variant:`secondary`,children:e.m})}),(0,q.jsx)(V,{className:`text-right`,children:(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,q.jsx)(w,{className:`size-3.5`}),` `,e.s]})}),(0,q.jsx)(V,{children:(0,q.jsx)(E,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,q.jsx)(j,{})})})]},e.n))})]})}),(0,q.jsx)(Z,{title:`App fragments`,description:`Chat-specific components`,children:(0,q.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,q.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,q.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,q.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,q.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,q.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,q.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,q.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,q.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,q.jsx)(`span`,{className:`oc-run-status__dot`}),(0,q.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}export{nn as ThemeShowroom};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,LC as s,Qo as c,Xo as l,Yo as u,Zo as d,es as f,ns as p,qo as m,ts as h}from"./dist-LmEWWbCO.js";import{t as g}from"./button-DgXvFpn-.js";import{_t as _,ct as v,lt as y,ot as b,q as x,st as S}from"./index-B0OTsC0S.js";var C=s(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(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=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:p(),from:`now-5m`},{label:h(),from:`now-15m`},{label:f(),from:`now-30m`},{label:r(),from:`now-1h`},{label:c(),from:`now-3h`},{label:d(),from:`now-6h`},{label:l(),from:`now-12h`},{label:u(),from:`now-24h`},{label:a(),from:`now-2d`},{label:m(),from:`now-7d`},{label:o(),from:`now-30d`},{label:i(),from:`now-90d`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(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 M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(v,{open:n,onOpenChange:d,children:[(0,P.jsx)(y,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(C,{}),A(e)]})}),(0,P.jsx)(S,{children:(0,P.jsx)(b,{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,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(x,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(x,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(_,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(x,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.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{F as n,N as r,L as t};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$o as r,Go as i,Jo as a,Ko as o,Qo as s,RC as c,Xo as l,Yo as u,Zo as d,es as f,ns as p,qo as m,ts as h}from"./dist-BhemspoL.js";import{t as g}from"./button-x4eiKyNo.js";import{_t as _,ct as v,lt as y,ot as b,q as x,st as S}from"./index-BlZ8oKFa.js";var C=c(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),w=t(e(),1),T={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function E(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=T[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function D(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:E(e.from,t)??t-T.h,to:E(e.to,t)??t}}var O=[{label:p(),from:`now-5m`},{label:h(),from:`now-15m`},{label:f(),from:`now-30m`},{label:r(),from:`now-1h`},{label:s(),from:`now-3h`},{label:d(),from:`now-6h`},{label:l(),from:`now-12h`},{label:u(),from:`now-24h`},{label:a(),from:`now-2d`},{label:m(),from:`now-7d`},{label:o(),from:`now-30d`},{label:i(),from:`now-90d`}];function k(e){return new Date(e).toLocaleString(`fr-FR`,{day:`2-digit`,month:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function A(e){if(e.kind===`relative`){let t=O.find(t=>t.from===e.from&&e.to===`now`);return t?t.label:`${e.from} → ${e.to}`}return`${k(e.from)} → ${k(e.to)}`}function j(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 M(e){if(e===``)return null;let t=new Date(e).getTime();return Number.isNaN(t)?null:t}function N(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:t!==``&&Number.isFinite(Number(t))?Number(t):e}var P=n();function F(e){let[t,n]=(0,w.useState)(0);return(0,w.useEffect)(()=>{if(e.kind!==`relative`)return;let t=window.setInterval(()=>n(e=>e+1),3e4);return()=>window.clearInterval(t)},[e.kind]),(0,w.useMemo)(()=>{let{from:t,to:n}=D(e);return e.kind===`absolute`?{from:t,to:n}:{from:I(t),to:I(n)}},[e,t])}function I(e){return Math.floor(e/6e4)*6e4}function L({value:e,onChange:t}){let[n,r]=(0,w.useState)(!1),[i,a]=(0,w.useState)(``),o=D(e),[s,c]=(0,w.useState)(()=>j(o.from)),[l,u]=(0,w.useState)(()=>j(o.to));function d(t){if(t){let t=D(e);c(j(t.from)),u(j(t.to)),a(``)}r(t)}function f(e){t({kind:`relative`,from:e,to:`now`}),r(!1)}function p(){let e=M(s),n=M(l);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),r(!1))}let m=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e===``?O:O.filter(t=>t.label.toLowerCase().includes(e)||t.from.toLowerCase().includes(e))},[i]),h=M(s)!==null&&M(l)!==null;return(0,P.jsxs)(v,{open:n,onOpenChange:d,children:[(0,P.jsx)(y,{asChild:!0,children:(0,P.jsxs)(g,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,P.jsx)(C,{}),A(e)]})}),(0,P.jsx)(S,{children:(0,P.jsx)(b,{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,P.jsxs)(`div`,{className:`oc-timerange__cols`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__absolute`,children:[(0,P.jsx)(`div`,{className:`oc-timerange__section-title`,children:`Plage absolue`}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`De`}),(0,P.jsx)(x,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value)})]}),(0,P.jsxs)(`label`,{className:`oc-field`,children:[(0,P.jsx)(`span`,{className:`oc-field__label`,children:`À`}),(0,P.jsx)(x,{type:`datetime-local`,value:l,onChange:e=>u(e.target.value)})]}),(0,P.jsx)(g,{size:`sm`,className:`oc-timerange__apply`,disabled:!h,onClick:p,children:`Appliquer`})]}),(0,P.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,P.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,P.jsx)(_,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,P.jsx)(x,{value:i,onChange:e=>a(e.target.value),placeholder:`Rechercher une plage`,"aria-label":`Rechercher une plage relative`})]}),(0,P.jsx)(`ul`,{className:`oc-timerange__list`,children:m.length===0?(0,P.jsx)(`li`,{className:`oc-timerange__empty`,children:`Aucune plage.`}):m.map(t=>(0,P.jsx)(`li`,{children:(0,P.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{F as n,N as r,L as t};
@@ -1 +1 @@
1
- import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Al as r,Bl as ee,Cl as te,Dl as i,El as a,Fl as o,Gl as s,Hl as c,IC as l,Il as u,Jl as d,Kl as f,Ll as ne,Ml as re,Nl as ie,Ol as ae,Pl as oe,Rl as se,Sl as ce,Tl as le,UC as p,Ul as ue,Vl as de,Wl as fe,Xl as pe,Yl as me,_l as he,bl as ge,fl as m,gl as h,hl as g,jl as _,kl as v,ml as y,pl as b,ql as x,vl as S,wl as C,xl as w,yl as T,zl as E}from"./dist-LmEWWbCO.js";import{n as D}from"./TimeRangePicker-DsW1QCH4.js";import{t as O}from"./x-CmMNOdcT.js";import{t as k}from"./button-DgXvFpn-.js";import{C as A,Dt as j,F as M,L as N,N as P,Ot as F,P as I,R as L,S as R,a as _e,b as z,i as ve,m as B,o as ye,r as be,x as V,y as H}from"./index-B0OTsC0S.js";import{t as xe}from"./FilterBar-BJDv7ENT.js";import{t as Se}from"./AdvancedFilter-I8EFwacj.js";import{t as Ce}from"./DataTableShell-DB_nXosI.js";var U=t(e(),1),W=n(),we=[50,100,200,500],G=`all`,K=`__all__`,Te=[`2xx`,`4xx`,`5xx`],Ee=[`user`,`service`,`system`],De=[`inbound`,`outbound`,`internal`],Oe={kind:`relative`,from:`now-30d`,to:`now`},ke=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function q(){let e=F({from:`/settings/traces`}),t=j({from:`/settings/traces`}),n=e.limit,m=e.kind,y=e.statusClass??K,b=e.principalType??K,M=e.direction??K,N=e.roleKey??K,P=e.q??``,I=be(e.from,e.to),L=(0,U.useMemo)(()=>ye(e.adv),[e.adv]),{from:q,to:Me}=D(I),[X,Z]=(0,U.useState)(null),[Ne,Q]=(0,U.useState)(null),Pe=e=>void t({search:t=>({...t,limit:e})}),Fe=e=>void t({search:t=>({...t,kind:e})}),Ie=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),Le=e=>void t({search:t=>({...t,statusClass:e===K?void 0:e})}),Re=e=>void t({search:t=>({...t,principalType:e===K?void 0:e})}),ze=e=>void t({search:t=>({...t,direction:e===K?void 0:e})}),Be=e=>void t({search:t=>({...t,roleKey:e===K?void 0:e})}),Ve=e=>void t({search:t=>({...t,..._e(e)})}),He=e=>void t({search:t=>({...t,adv:ve(e)}),replace:!0}),$=p(l.observability.listEvents,{limit:n}),Ue=p(l.observability.listEvents,{limit:n,kind:m===G?void 0:m,filter:{q:P||void 0,from:q,to:Me,statusClass:y===K?void 0:y,principalType:b===K?void 0:b,direction:M===K?void 0:M,roleKey:N===K?void 0:N,advanced:L.length>0?L:void 0}}),We=(0,U.useMemo)(()=>{let e=new Set;for(let t of $??[])e.add(t.kind);return[...e].sort()},[$]),Ge=(0,U.useMemo)(()=>{let e=new Set;for(let t of $??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[$]),Ke=P!==``||y!==K||b!==K||M!==K||N!==K||L.length>0||I.kind!==`relative`||I.from!==Oe.from;function qe(){t({search:{limit:100,kind:`all`},replace:!0})}let Je=X?$?.filter(e=>e.correlationId===X):Ue;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`oc-admin__hint`,children:[pe(),(0,W.jsx)(`strong`,{children:me()}),d(),` `,(0,W.jsx)(`span`,{className:`oc-filter__window`,children:x()})]}),(0,W.jsxs)(xe,{q:P,onQChange:Ie,searchPlaceholder:f(),timeRange:I,onTimeRangeChange:Ve,onReset:qe,canReset:Ke,children:[(0,W.jsxs)(H,{value:y,onValueChange:Le,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:s()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:fe()}),Te.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:b,onValueChange:Re,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:ue()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:c()}),Ee.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:M,onValueChange:ze,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:de()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:ee()}),De.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:N,onValueChange:Be,children:[(0,W.jsx)(R,{size:`sm`,className:`w-36`,children:(0,W.jsx)(A,{placeholder:E()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:se()}),Ge.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:m,onValueChange:Fe,children:[(0,W.jsx)(R,{size:`sm`,className:`w-44`,children:(0,W.jsx)(A,{placeholder:ne()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:G,children:u()}),We.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:String(n),onValueChange:e=>Pe(Number(e)),children:[(0,W.jsx)(R,{size:`sm`,className:`w-28`,children:(0,W.jsx)(A,{})}),(0,W.jsx)(z,{children:we.map(e=>(0,W.jsx)(V,{value:String(e),children:o({count:e})},e))})]})]}),(0,W.jsx)(Se,{fields:ke,seed:L,onChange:He}),X?(0,W.jsx)(`div`,{className:`oc-traces__followline`,children:(0,W.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>Z(null),title:oe(),children:[(0,W.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ie(),(0,W.jsx)(`code`,{children:J(X)})]}),(0,W.jsx)(O,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`sr-only`,children:re()})]})}):null,(0,W.jsx)(Ce,{title:_(),rows:Je,emptyHint:X?r():v(),columns:[{header:ae(),sort:e=>e.at,cell:e=>(0,W.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:i(),sort:e=>e.kind,cell:e=>(0,W.jsx)(B,{variant:`secondary`,children:e.kind})},{header:a(),sort:e=>Y(e)??null,cell:e=>{let t=Y(e);return t?(0,W.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,W.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":le(),children:`✓`})}},{header:C(),sort:e=>e.direction,cell:e=>e.direction?(0,W.jsx)(B,{variant:`outline`,children:e.direction}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:te(),sort:e=>e.principalType,cell:e=>(0,W.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,W.jsx)(B,{variant:`outline`,children:e.principalType}),e.principalId?(0,W.jsx)(`code`,{className:`oc-traces__mono`,children:J(e.principalId)}):null]})},{header:ce(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,W.jsx)(B,{variant:`secondary`,children:e.roleKey}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:w(),sort:e=>e.route,cell:e=>e.route?(0,W.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,W.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,W.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ge(),sort:e=>e.status,cell:e=>e.status===null?(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,W.jsx)(`span`,{className:`oc-traces__status ${Ae(e.status)}`,children:e.status})},{header:T(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,W.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:S(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,W.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:he(),onClick:()=>Z(e.correlationId),children:J(e.correlationId)}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:h(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,W.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>Q(e),children:g()}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,W.jsx)(je,{row:Ne,onClose:()=>Q(null)})]})}function Ae(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 J(e){return e.length>8?e.slice(0,8):e}function Y(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 je({row:e,onClose:t}){let n=(0,U.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,W.jsx)(P,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,W.jsxs)(I,{className:`max-w-lg`,children:[(0,W.jsxs)(N,{children:[(0,W.jsxs)(L,{className:`oc-traces__meta-title`,children:[y(),` `,(0,W.jsx)(`code`,{children:e.kind}),(0,W.jsx)(B,{variant:`outline`,children:b()})]}),(0,W.jsx)(M,{children:m()})]}),(0,W.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{q as TracesTab};
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Al as r,Bl as ee,Cl as te,Dl as i,El as a,Fl as o,Gl as s,Hl as c,Il as l,Jl as u,Kl as d,LC as f,Ll as ne,Ml as re,Nl as ie,Ol as ae,Pl as oe,Rl as se,Sl as ce,Tl as le,Ul as ue,Vl as de,WC as p,Wl as fe,Xl as pe,Yl as me,_l as he,bl as ge,fl as m,gl as h,hl as g,jl as _,kl as v,ml as y,pl as b,ql as x,vl as S,wl as C,xl as w,yl as T,zl as E}from"./dist-BhemspoL.js";import{n as D}from"./TimeRangePicker--wX3a-5x.js";import{t as O}from"./x-C9JKw9Pc.js";import{t as k}from"./button-x4eiKyNo.js";import{C as A,Dt as j,F as M,L as N,N as P,Ot as F,P as I,R as L,S as R,a as _e,b as z,i as ve,m as B,o as ye,r as be,x as V,y as H}from"./index-BlZ8oKFa.js";import{t as xe}from"./FilterBar-DB-b7WAm.js";import{t as Se}from"./AdvancedFilter-EPxqO-eA.js";import{t as Ce}from"./DataTableShell-BpD7pA0i.js";var U=t(e(),1),W=n(),we=[50,100,200,500],G=`all`,K=`__all__`,Te=[`2xx`,`4xx`,`5xx`],Ee=[`user`,`service`,`system`],De=[`inbound`,`outbound`,`internal`],Oe={kind:`relative`,from:`now-30d`,to:`now`},ke=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function q(){let e=F({from:`/settings/traces`}),t=j({from:`/settings/traces`}),n=e.limit,m=e.kind,y=e.statusClass??K,b=e.principalType??K,M=e.direction??K,N=e.roleKey??K,P=e.q??``,I=be(e.from,e.to),L=(0,U.useMemo)(()=>ye(e.adv),[e.adv]),{from:q,to:Me}=D(I),[X,Z]=(0,U.useState)(null),[Ne,Q]=(0,U.useState)(null),Pe=e=>void t({search:t=>({...t,limit:e})}),Fe=e=>void t({search:t=>({...t,kind:e})}),Ie=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),Le=e=>void t({search:t=>({...t,statusClass:e===K?void 0:e})}),Re=e=>void t({search:t=>({...t,principalType:e===K?void 0:e})}),ze=e=>void t({search:t=>({...t,direction:e===K?void 0:e})}),Be=e=>void t({search:t=>({...t,roleKey:e===K?void 0:e})}),Ve=e=>void t({search:t=>({...t,..._e(e)})}),He=e=>void t({search:t=>({...t,adv:ve(e)}),replace:!0}),$=p(f.observability.listEvents,{limit:n}),Ue=p(f.observability.listEvents,{limit:n,kind:m===G?void 0:m,filter:{q:P||void 0,from:q,to:Me,statusClass:y===K?void 0:y,principalType:b===K?void 0:b,direction:M===K?void 0:M,roleKey:N===K?void 0:N,advanced:L.length>0?L:void 0}}),We=(0,U.useMemo)(()=>{let e=new Set;for(let t of $??[])e.add(t.kind);return[...e].sort()},[$]),Ge=(0,U.useMemo)(()=>{let e=new Set;for(let t of $??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[$]),Ke=P!==``||y!==K||b!==K||M!==K||N!==K||L.length>0||I.kind!==`relative`||I.from!==Oe.from;function qe(){t({search:{limit:100,kind:`all`},replace:!0})}let Je=X?$?.filter(e=>e.correlationId===X):Ue;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`oc-admin__hint`,children:[pe(),(0,W.jsx)(`strong`,{children:me()}),u(),` `,(0,W.jsx)(`span`,{className:`oc-filter__window`,children:x()})]}),(0,W.jsxs)(xe,{q:P,onQChange:Ie,searchPlaceholder:d(),timeRange:I,onTimeRangeChange:Ve,onReset:qe,canReset:Ke,children:[(0,W.jsxs)(H,{value:y,onValueChange:Le,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:s()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:fe()}),Te.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:b,onValueChange:Re,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:ue()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:c()}),Ee.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:M,onValueChange:ze,children:[(0,W.jsx)(R,{size:`sm`,className:`w-32`,children:(0,W.jsx)(A,{placeholder:de()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:ee()}),De.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:N,onValueChange:Be,children:[(0,W.jsx)(R,{size:`sm`,className:`w-36`,children:(0,W.jsx)(A,{placeholder:E()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:K,children:se()}),Ge.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:m,onValueChange:Fe,children:[(0,W.jsx)(R,{size:`sm`,className:`w-44`,children:(0,W.jsx)(A,{placeholder:ne()})}),(0,W.jsxs)(z,{children:[(0,W.jsx)(V,{value:G,children:l()}),We.map(e=>(0,W.jsx)(V,{value:e,children:e},e))]})]}),(0,W.jsxs)(H,{value:String(n),onValueChange:e=>Pe(Number(e)),children:[(0,W.jsx)(R,{size:`sm`,className:`w-28`,children:(0,W.jsx)(A,{})}),(0,W.jsx)(z,{children:we.map(e=>(0,W.jsx)(V,{value:String(e),children:o({count:e})},e))})]})]}),(0,W.jsx)(Se,{fields:ke,seed:L,onChange:He}),X?(0,W.jsx)(`div`,{className:`oc-traces__followline`,children:(0,W.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>Z(null),title:oe(),children:[(0,W.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ie(),(0,W.jsx)(`code`,{children:J(X)})]}),(0,W.jsx)(O,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,W.jsx)(`span`,{className:`sr-only`,children:re()})]})}):null,(0,W.jsx)(Ce,{title:_(),rows:Je,emptyHint:X?r():v(),columns:[{header:ae(),sort:e=>e.at,cell:e=>(0,W.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:i(),sort:e=>e.kind,cell:e=>(0,W.jsx)(B,{variant:`secondary`,children:e.kind})},{header:a(),sort:e=>Y(e)??null,cell:e=>{let t=Y(e);return t?(0,W.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,W.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":le(),children:`✓`})}},{header:C(),sort:e=>e.direction,cell:e=>e.direction?(0,W.jsx)(B,{variant:`outline`,children:e.direction}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:te(),sort:e=>e.principalType,cell:e=>(0,W.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,W.jsx)(B,{variant:`outline`,children:e.principalType}),e.principalId?(0,W.jsx)(`code`,{className:`oc-traces__mono`,children:J(e.principalId)}):null]})},{header:ce(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,W.jsx)(B,{variant:`secondary`,children:e.roleKey}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:w(),sort:e=>e.route,cell:e=>e.route?(0,W.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,W.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,W.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ge(),sort:e=>e.status,cell:e=>e.status===null?(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,W.jsx)(`span`,{className:`oc-traces__status ${Ae(e.status)}`,children:e.status})},{header:T(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,W.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:S(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,W.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:he(),onClick:()=>Z(e.correlationId),children:J(e.correlationId)}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:h(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,W.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>Q(e),children:g()}):(0,W.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,W.jsx)(je,{row:Ne,onClose:()=>Q(null)})]})}function Ae(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 J(e){return e.length>8?e.slice(0,8):e}function Y(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 je({row:e,onClose:t}){let n=(0,U.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,W.jsx)(P,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,W.jsxs)(I,{className:`max-w-lg`,children:[(0,W.jsxs)(N,{children:[(0,W.jsxs)(L,{className:`oc-traces__meta-title`,children:[y(),` `,(0,W.jsx)(`code`,{children:e.kind}),(0,W.jsx)(B,{variant:`outline`,children:b()})]}),(0,W.jsx)(M,{children:m()})]}),(0,W.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{q as TracesTab};
@@ -0,0 +1 @@
1
+ import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Ac as r,Am as i,Cm as a,Dc as o,Dm as s,Em as c,Fc as l,Ic as u,LC as d,Lc as f,Mc as p,Nc as m,Oc as h,Om as g,Pc as _,Rc as v,Rp as y,Sm as b,Tm as x,UC as S,WC as C,_m as ee,am as te,bm as ne,cm as re,dm as ie,fm as ae,gm as oe,hm as w,im as T,jc as E,jm as D,kc as O,km as k,lm as A,mm as se,om as ce,pm as le,rm as ue,sm as de,um as fe,vm as pe,wm as me,xm as he,ym as ge,zc as j}from"./dist-BhemspoL.js";import{t as M}from"./button-x4eiKyNo.js";import{$ as N,A as P,C as F,Dt as I,F as L,L as R,M as _e,N as z,O as B,Ot as ve,P as ye,Q as be,R as xe,S as V,Z as Se,at as Ce,b as H,d as U,et as we,f as Te,gt as W,ht as G,j as Ee,m as K,nt as De,p as q,x as J,y as Y}from"./index-BlZ8oKFa.js";import{t as X}from"./FilterBar-DB-b7WAm.js";import{t as Oe}from"./DataTableShell-BpD7pA0i.js";import{t as ke}from"./DetailChips-BA1mq7Wm.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=C(d.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=C(d.agents.listUserAgents,n&&e?{profileId:e}:`skip`),o=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),s=(a??[]).find(e=>e.isDefault)??null,c=s?`${s.instanceName}/${s.agentId}`:null,m=new Set((i?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),h=[...(i?.agents??[]).map(e=>({...e,outOfPool:!1})),...(a??[]).filter(e=>!m.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],g=new Map;for(let e of h){let t=g.get(e.instanceName)??[];t.push(e),g.set(e.instanceName,t)}return(0,Q.jsx)(z,{open:n,onOpenChange:r,children:(0,Q.jsxs)(ye,{className:`oc-access`,children:[(0,Q.jsxs)(R,{children:[(0,Q.jsx)(xe,{children:j({user:t})}),(0,Q.jsx)(L,{children:v()})]}),i?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?f():u()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:l()}):h.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:p()}):[...g.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:o,defaultKey:c},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:i,assigned:a,defaultKey:s}){let c=S(d.agents.assignAgent),l=S(d.agents.removeAgent),u=S(d.agents.setDefaultAgent),f=P();if(!e)return null;async function p(n,r){try{r?await l({profileId:e,instanceName:t,agentId:n}):await c({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(_(),e)}}async function g(n){try{await u({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(m(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(W,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),i.map(e=>{let n=`${t}/${e.agentId}`,i=a.has(n),c=s===n,l=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(B,{checked:i,disabled:l&&!i,onCheckedChange:()=>void p(e.agentId,i),"aria-label":E({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,l?(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:r()}):null,e.outOfPool?(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:O()}):null,i?c?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":h(),title:h(),children:(0,Q.jsx)(G,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":o(),title:o(),onClick:()=>void g(e.agentId),children:(0,Q.jsx)(G,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=U.filter(e=>n.has(q[e])).length;return(0,Q.jsxs)(Se,{children:[(0,Q.jsx)(De,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?D():i({count:r})})}),(0,Q.jsxs)(be,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(we,{children:k()}),U.map(e=>{let r=q[e];return(0,Q.jsxs)(N,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(B,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:Te[e]??e})]},e)})]})]})}function Ne(){let e=ve({from:`/settings/users`}),t=I({from:`/settings/users`}),n=e.q??``,r=e.role??$,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),o=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),l=C(d.admin.listUsers,{filter:{q:n||void 0,role:r===$?void 0:r},withAgents:!0}),u=C(d.me.getMe,{host:Ce}),f=S(d.admin.setRole),p=S(d.admin.setUserPermissions),m=S(d.admin.startImpersonation),h=S(d.admin.deleteUser),_=S(d.admin.setUserName),v=Ee(),E=_e(),D=P(),[O,k]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of l??[])e.add(t.role);return[...e]},[l]),M=n!==``||r!==$;function N(){t({search:{},replace:!0})}async function L(e){try{await f(e)}catch(e){D.error(g(),e)}}async function R(e){try{await p(e)}catch(e){D.error(s(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await v({title:ne(),description:ge({user:t}),confirmWord:pe(),confirmLabel:ee(),destructive:!0}))try{await h({profileId:e._id}),D.success(w({user:t}))}catch(e){D.error(oe(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await E({title:le(),label:ae({user:t}),placeholder:ie(),defaultValue:e.name??``,confirmLabel:y()});if(n!==null)try{await _({profileId:e._id,name:n}),D.success(fe())}catch(e){D.error(A(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(X,{q:n,onQChange:i,searchPlaceholder:c(),onReset:N,canReset:M,children:(0,Q.jsxs)(Y,{value:r,onValueChange:o,children:[(0,Q.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(H,{children:[(0,Q.jsx)(J,{value:$,children:x()}),j.map(e=>(0,Q.jsx)(J,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:me(),rows:l,emptyHint:a(),rowActions:e=>{let t=[{label:ue(),onSelect:()=>k({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:se(),onSelect:()=>void B(e)}];return e.userId!==u?.userId&&t.push({label:b(),onSelect:()=>void m({profileId:e._id})},{label:he(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:re(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:de(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(Y,{value:e.role,onValueChange:t=>void L({profileId:e._id,role:t}),children:[(0,Q.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(H,{children:[(0,Q.jsx)(J,{value:`pending`,children:`pending`}),(0,Q.jsx)(J,{value:`user`,children:`user`}),(0,Q.jsx)(J,{value:`admin`,children:`admin`})]})]})},{header:ce(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:te()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),R({profileId:e._id,permissions:[...n]})}})},{header:T(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(W,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:O?.profileId??null,userLabel:O?.label??``,open:O!==null,onOpenChange:e=>{e||k(null)}})]})}export{Ne as UsersTab};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{jC as n,n as r,t as i}from"./dist-LmEWWbCO.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
1
+ import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{MC as n,n as r,t as i}from"./dist-BhemspoL.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
@@ -1 +1 @@
1
- import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-LmEWWbCO.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-BhemspoL.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{RC as e}from"./dist-BhemspoL.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{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-LmEWWbCO.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
1
+ import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-BhemspoL.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
@@ -1 +1 @@
1
- import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-LmEWWbCO.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
+ import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-BhemspoL.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};