@lacneu/atrium 0.42.1 → 0.43.2
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.
- package/README.md +28 -12
- package/dist/assets/AccessTab-94MtF5lT.js +1 -0
- package/dist/assets/{AdvancedFilter-CO1cUNNw.js → AdvancedFilter-BnA7f0yX.js} +1 -1
- package/dist/assets/AgentFilesTab-sjdoEmO4.js +3 -0
- package/dist/assets/AnomaliesTab-DbH8S6fZ.js +1 -0
- package/dist/assets/AuditTab-B4enDRkk.js +1 -0
- package/dist/assets/BridgeTab-DqV2JfAL.js +1 -0
- package/dist/assets/ChatDefaultsTab-VjBCgiMX.js +1 -0
- package/dist/assets/DataTableShell-BwOKMopJ.js +1 -0
- package/dist/assets/{DetailChips-CqxPS6Xc.js → DetailChips-B7PRsQ8X.js} +1 -1
- package/dist/assets/FeedbacksTab-WbanMd0X.js +1 -0
- package/dist/assets/{FieldLabel-DMT2Hkyy.js → FieldLabel-D6e92lXR.js} +1 -1
- package/dist/assets/FilesTab-BRT-LD5j.js +1 -0
- package/dist/assets/{FilterBar-CghkUT3Y.js → FilterBar-Z4TZZeJs.js} +1 -1
- package/dist/assets/GroupsTab-BDmYIdOy.js +1 -0
- package/dist/assets/InstancesTab-Bion8hoW.js +1 -0
- package/dist/assets/IntegrationsTab-C1rqnuOD.js +1 -0
- package/dist/assets/{KpiTab-DIl1PUwB.js → KpiTab-DXJRXni-.js} +1 -1
- package/dist/assets/PreferencesTab-U9LNPEoY.js +1 -0
- package/dist/assets/PromptInjectionsTab-Qkodd11k.js +4 -0
- package/dist/assets/RolesTab-B9DClwCJ.js +1 -0
- package/dist/assets/ServiceAccountsTab-CZnWRSm3.js +1 -0
- package/dist/assets/SubAgentReportsTab-Dk4U8jt3.js +1 -0
- package/dist/assets/ThemeShowroom-C5FSV0-b.js +1 -0
- package/dist/assets/{TimeRangePicker-xtCsggB6.js → TimeRangePicker-CcUEMoXD.js} +1 -1
- package/dist/assets/TracesTab-9U3IirNk.js +1 -0
- package/dist/assets/UsersTab-AzjFhn2N.js +1 -0
- package/dist/assets/VoiceTab-BYE2xI7l.js +1 -0
- package/dist/assets/{button-BMEzTwMt.js → button-B9CsHmrJ.js} +1 -1
- package/dist/assets/{card-B1HFd4xj.js → card-CMDVfuXr.js} +1 -1
- package/dist/assets/chevrons-up-down-C13y3ij3.js +1 -0
- package/dist/assets/{compatView-C7qH0iQd.js → compatView-BU4Wp3dH.js} +1 -1
- package/dist/assets/dispatchErrorInfo-dqUyKO3V.js +1 -0
- package/dist/assets/{dist-D7m7ryC2.js → dist-B7IaMcdm.js} +5 -5
- package/dist/assets/{dist-DnoignCJ.js → dist-CulxjFIv.js} +1 -1
- package/dist/assets/{dist-C9SiL-Kv.js → dist-D87j9TcT.js} +1 -1
- package/dist/assets/{dist-CISpbyhZ.js → dist-UNwILdG2.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-qrGeiXTR.js → highlighted-body-OFNGDK62-VCSqL6Ck.js} +1 -1
- package/dist/assets/index-DYfClpT4.js +233 -0
- package/dist/assets/mermaid-GHXKKRXX-BVRnJa6t.js +1 -0
- package/dist/assets/roleDescriptions-ow1wfNQF.js +1 -0
- package/dist/assets/{table-vlXds7sd.js → table-r4XuUszk.js} +1 -1
- package/dist/assets/{tabs-CZZSNNGS.js → tabs-K6MF5os_.js} +1 -1
- package/dist/assets/x-CJSI-sn5.js +1 -0
- package/dist/index.html +7 -7
- package/package.json +1 -1
- package/dist/assets/AccessTab-7oUNhFz1.js +0 -1
- package/dist/assets/AgentFilesTab-DDaKUZVQ.js +0 -3
- package/dist/assets/AnomaliesTab-BwN4hyVY.js +0 -1
- package/dist/assets/AuditTab--JJkDPIe.js +0 -1
- package/dist/assets/BridgeTab-D_ZDAPja.js +0 -1
- package/dist/assets/ChatDefaultsTab-kUb2IOW3.js +0 -1
- package/dist/assets/DataTableShell-BB1Bp-iF.js +0 -1
- package/dist/assets/FeedbacksTab-B_TKW5tq.js +0 -1
- package/dist/assets/FilesTab-S52Eip5O.js +0 -1
- package/dist/assets/GroupsTab-4qA6hYSX.js +0 -1
- package/dist/assets/InstancesTab-DcTjSMdS.js +0 -1
- package/dist/assets/IntegrationsTab-Osutx3AF.js +0 -1
- package/dist/assets/PreferencesTab-oX3gGWZq.js +0 -1
- package/dist/assets/PromptInjectionsTab-DyYdCXtn.js +0 -4
- package/dist/assets/RolesTab-BLB85Fx_.js +0 -1
- package/dist/assets/ServiceAccountsTab-iGJvmXO8.js +0 -1
- package/dist/assets/SubAgentReportsTab-B8ZIdQCy.js +0 -1
- package/dist/assets/ThemeShowroom-Dq-FeNYt.js +0 -1
- package/dist/assets/TracesTab-CohGGYH-.js +0 -1
- package/dist/assets/UsersTab-DdnixSeG.js +0 -1
- package/dist/assets/VoiceTab-Dxx8qprL.js +0 -1
- package/dist/assets/chevrons-up-down-D1ZuXFq9.js +0 -1
- package/dist/assets/dispatchErrorInfo-Bg7B8_Mz.js +0 -1
- package/dist/assets/index-CvZ8WIcf.js +0 -233
- package/dist/assets/mermaid-GHXKKRXX-B3J6Tm21.js +0 -1
- package/dist/assets/roleDescriptions-B5qSDg7b.js +0 -1
- package/dist/assets/x-g5TNru3k.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$O as r,$k as i,Ak as a,Bi as o,Bk as s,Ck as c,D as l,Dk as u,E as d,Ek as f,Fk as p,GO as m,Gk as h,HO as g,Hk as _,Ik as v,JO as y,Jk as b,KO as ee,Kk as te,Li as ne,Lk as re,Mk as ie,Nk as ae,Ok as oe,Pk as se,QO as ce,Qk as le,Ri as ue,Rk as de,Sk as fe,Tk as pe,UO as me,Uk as he,VO as ge,Vk as _e,WO as ve,Wk as ye,XO as be,Xk as xe,YO as x,Yk as Se,ZO as Ce,Zk as we,_k as Te,aA as Ee,ak as De,bj as S,bk as Oe,cA as ke,cj as Ae,ck as je,dk as Me,eA as Ne,ek as Pe,fk as Fe,gk as Ie,hk as Le,iA as Re,ik as ze,jk as Be,kk as Ve,lA as He,lj as Ue,lk as We,mk as Ge,n as Ke,nA as qe,nk as Je,oA as Ye,ok as Xe,pk as Ze,qO as Qe,qk as $e,rA as et,rk as tt,sA as nt,sk as C,tA as rt,tk as it,uj as at,uk as ot,vj as st,vk as ct,wk as lt,xj as w,xk as ut,yk as dt,zi as T,zk as ft}from"./dist-B7IaMcdm.js";import{n as E}from"./dist-UNwILdG2.js";import{t as D}from"./x-CJSI-sn5.js";import{t as O}from"./button-B9CsHmrJ.js";import{C as k,Ht as pt,S as A,Vt as j,at as M,b as N,bt as P,ct as F,gt as mt,ht,it as gt,nt as _t,ot as vt,p as I,rt as L,st as R,tt as yt,w as z,x as B}from"./index-DYfClpT4.js";import{t as bt}from"./localePickerView-C2RmOS86.js";import{a as xt,i as St,n as Ct,o as wt,r as Tt,t as Et}from"./card-CMDVfuXr.js";import{a as Dt,i as V,n as Ot,o as H,r as U,t as kt}from"./table-r4XuUszk.js";import{t as At}from"./TimeRangePicker-CcUEMoXD.js";import{t as jt}from"./FilterBar-Z4TZZeJs.js";import{t as Mt}from"./AdvancedFilter-BnA7f0yX.js";var W=l(`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`}]]),G=t(e(),1),Nt=.1,Pt=[248,248,248],Ft=[24,24,24];function It(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 Lt(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 K(e,t,n){return Lt(e,t,n)>=Nt}function Rt(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 zt(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 Bt=12*1024*1024,Vt=480,Ht=160,Ut=.92;async function Wt(e,t={}){if(!e.type.startsWith(`image/`))throw Error(ot());if(e.size>Bt)throw Error(We());let{source:n,width:r,height:i,cleanup:a}=await Gt(e);try{let a=e.type===`image/svg+xml`,o=Math.min(Vt/r,Ht/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=It(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);K(e.data,d.width,d.height)?Rt(e.data,t.variantFor===`dark`?Pt:Ft):zt(e.data),p.putImageData(e,0,0)}let m=K(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await J(f,`image/webp`,Ut)??await J(f,`image/png`);if(!h)throw Error(Xe());return{blob:h,hasAlpha:m}}finally{a()}}async function Gt(e){if(e.type===`image/svg+xml`)return q(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 q(e)}async function q(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(je())),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 J(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var Y=n();function Kt(e,t){let n=e.trim().replace(/[^A-Za-z0-9_.-]+/g,`-`).replace(/^-+|-+$/g,``)||`chart`,r=new Blob([JSON.stringify(t,null,2)],{type:`application/json`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${n}.chart.json`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}var X=`__all__`,Z={kind:`relative`,from:`now-24h`,to:`now`},qt=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function Q({title:e,description:t,children:n}){return(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,Y.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function Jt(e){return e===`light`?at():e===`dark`?Ue():Ae()}var Yt=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Xt({tokens:e,mode:t}){let n=e.colors[t];return(0,Y.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Yt.map(e=>{let t=n[e];return(0,Y.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function $({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a,onExport:s}){return(0,Y.jsxs)(`div`,{className:`oc-chart-card-wrap`,children:[(0,Y.jsxs)(`button`,{type:`button`,className:Ke(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,Y.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,Y.jsx)(E,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,Y.jsx)(Xt,{tokens:r,mode:i}):(0,Y.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,Y.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,Y.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]}),s?(0,Y.jsx)(O,{type:`button`,variant:`ghost`,size:`icon`,className:`oc-chart-card__export`,onClick:s,"aria-label":o(),title:o(),children:(0,Y.jsx)(pt,{className:`size-4`})}):null]})}function Zt({selectedKey:e,resolvedMode:t}){let n=w(d.charts.listMyCharts),r=S(d.charts.setMyChart);async function a(e){try{await r({name:e})}catch{}}return(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h2`,{className:`oc-show__title`,children:rt()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:Ne()})]}),(0,Y.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,Y.jsx)($,{selected:e===null,title:i(),subtitle:le(),tokens:null,mode:t,onSelect:()=>void a(null)}),(n??[]).map(n=>{let r=n.via===`common`?we():n.via===`owner`?xe():Se({group:n.via.group});return(0,Y.jsx)($,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void a(n.key),onExport:()=>Kt(n.name,n.tokens)},n.key)})]}),n!==void 0&&n.length===0?(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:b()}):null]})}function Qt(){let e=S(d.charts.importChart),[t,n]=(0,G.useState)(``),[r,i]=(0,G.useState)(``),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(!1),[p,m]=(0,G.useState)(!1);async function h(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),l(!1);try{i(await t.text())}catch{s(f())}}}async function g(){if(s(null),l(!1),t.trim()===``){s(lt());return}let a;try{a=JSON.parse(r)}catch{s(f());return}m(!0);try{await e({name:t.trim(),tokens:a}),l(!0),n(``),i(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{m(!1)}}return(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h2`,{className:`oc-show__title`,children:se()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:ae()})]}),(0,Y.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,Y.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-import__label`,children:ie()}),(0,Y.jsx)(F,{value:t,onChange:e=>n(e.target.value),placeholder:Be(),maxLength:60})]}),(0,Y.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-import__label`,children:a()}),(0,Y.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:Ve(),rows:8,spellCheck:!1})]}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(O,{variant:`outline`,size:`sm`,asChild:!0,children:(0,Y.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,Y.jsx)(W,{className:`size-4`}),oe(),(0,Y.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void h(e)})]})}),(0,Y.jsx)(O,{size:`sm`,disabled:p,onClick:()=>void g(),children:u()})]}),o?(0,Y.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,c?(0,Y.jsx)(`p`,{className:`oc-chart-import__ok`,children:pe()}):null]})]})}function $t({chart:e}){let t=st(d.charts.setChartLogo),n=S(d.charts.removeChartLogo),[r,i]=(0,G.useState)(!1),[a,o]=(0,G.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 Wt(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 f(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 p({mode:e}){let t=s(e),n=s(e===`light`?`dark`:`light`);return(0,Y.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?Te():Ie()}),(0,Y.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,Y.jsx)(`img`,{src:t,alt:``}):null}),(0,Y.jsx)(O,{variant:`outline`,size:`sm`,asChild:!0,children:(0,Y.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,Y.jsx)(W,{className:`size-4`}),t?Ge():Le(),(0,Y.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,Y.jsx)(O,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void f(e),children:Fe()}):null,t?(0,Y.jsx)(O,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:Ze()}):null]})}return(0,Y.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:ct()}),(0,Y.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,Y.jsx)(p,{mode:`light`}),(0,Y.jsx)(p,{mode:`dark`})]}),r?(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:Me()}):null,a?(0,Y.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function en({chart:e}){let t=w(d.me.getMe,{host:P}),n=S(d.charts.addChartDomain),r=S(d.charts.removeChartDomain),[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)(null),[c,l]=(0,G.useState)(!1);if(t?.role!==`admin`)return null;let u=e.domains??[];async function f(){let t=i.trim();if(t!==``){s(null),l(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}async function p(t){s(null);try{await r({chartKey:e.key,domain:t})}catch{}}return(0,Y.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:De()}),(0,Y.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,Y.jsx)(`div`,{className:`oc-chart-avail__groups`,children:u.length===0?(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:it()}):u.map(e=>(0,Y.jsxs)(R,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,Y.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Pe({domain:e}),onClick:()=>void p(e),children:(0,Y.jsx)(D,{className:`size-3`})})]},e))}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(F,{value:i,onChange:e=>a(e.target.value),placeholder:tt(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&f()}}),(0,Y.jsx)(O,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void f(),children:Je()})]}),(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:ze()}),o?(0,Y.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function tn(e){let t={...e};return delete t.bpm,JSON.stringify(t,null,2)}function nn({chart:e}){let t=S(d.charts.updateChart),n=S(d.charts.deleteChart),[i,a]=(0,G.useState)(!1),[o,s]=(0,G.useState)(e.name),[c,l]=(0,G.useState)(()=>tn(e.tokens)),[u,p]=(0,G.useState)(e.tokens.bpm??0),[m,h]=(0,G.useState)(null),[g,_]=(0,G.useState)(!1);function v(){s(e.name),l(tn(e.tokens)),p(e.tokens.bpm??0),h(null),a(!0)}async function y(){if(e.chartId===void 0)return;h(null);let n;try{n=JSON.parse(c)}catch{h(f());return}if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;u>0?e.bpm=u:delete e.bpm}_(!0);try{await t({chartId:e.chartId,name:o.trim(),tokens:n}),a(!1)}catch(e){h(e instanceof Error?e.message:String(e))}finally{_(!1)}}async function b(){if(e.chartId!==void 0&&window.confirm(x()))try{await n({chartId:e.chartId})}catch{}}return(0,Y.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,Y.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,Y.jsx)(`div`,{className:`oc-show__row`,children:i?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O,{variant:`outline`,size:`sm`,onClick:v,children:Oe()}),(0,Y.jsx)(O,{variant:`ghost`,size:`sm`,onClick:()=>void b(),children:dt()})]})})]}),i?(0,Y.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,Y.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-import__label`,children:Ce()}),(0,Y.jsx)(F,{value:o,onChange:e=>s(e.target.value),maxLength:60})]}),(0,Y.jsxs)(`div`,{className:`oc-chart-import__field`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-import__label`,children:T()}),(0,Y.jsxs)(`div`,{className:`oc-chart-bpm`,children:[(0,Y.jsx)(`input`,{type:`range`,className:`oc-chart-bpm__slider`,min:0,max:90,step:5,value:u,onChange:e=>p(Number(e.target.value)),"aria-label":T()}),(0,Y.jsx)(`span`,{className:`oc-chart-bpm__value`,children:u===0?ue():`${u} BPM`})]}),(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:ne()})]}),(0,Y.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-import__label`,children:be()}),(0,Y.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:c,onChange:e=>l(e.target.value),rows:10,spellCheck:!1})]}),m?(0,Y.jsx)(`p`,{className:`oc-chart-import__error`,children:m}):null,(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(O,{size:`sm`,disabled:g,onClick:()=>void y(),children:r()}),(0,Y.jsx)(O,{variant:`ghost`,size:`sm`,onClick:()=>a(!1),children:ce()})]})]}):null,(0,Y.jsx)($t,{chart:e}),(0,Y.jsx)(en,{chart:e})]})}function rn(){let e=w(d.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h2`,{className:`oc-show__title`,children:c()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:fe()})]}),e!==void 0&&t.length===0?(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:ut()}):(0,Y.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,Y.jsx)(nn,{chart:e},e.key))})]})}function an({chart:e,groups:t}){let n=S(d.charts.addChartToGroupPool),r=S(d.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,o=new Set((a??[]).map(e=>e.groupId)),c=t.filter(e=>!o.has(e._id));async function l(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function u(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,Y.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,Y.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,Y.jsx)(R,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?s():e.kind===`custom`&&e.scope===`personal`?m():_e()}),e.isGlobalDefault?(0,Y.jsx)(R,{variant:`default`,children:ft()}):null]}),(0,Y.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:re()}),(a??[]).map(e=>(0,Y.jsxs)(R,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,Y.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":p({group:e.name}),onClick:()=>void u(e.groupId),children:(0,Y.jsx)(D,{className:`size-3`})})]},e.groupId)),c.length>0?(0,Y.jsxs)(N,{value:``,onValueChange:e=>void l(e),children:[(0,Y.jsx)(k,{size:`sm`,className:`w-56`,children:(0,Y.jsx)(z,{placeholder:v()})}),(0,Y.jsx)(B,{children:c.map(e=>(0,Y.jsx)(A,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:de()}):null]})]})}function on({chart:e}){let t=S(d.charts.promoteChartToCommon),n=S(d.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(x()))try{await n({chartId:e.chartId})}catch{}}return(0,Y.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,Y.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,Y.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,Y.jsx)(R,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?ve():m()}),e.ownerLabel?(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:ee({owner:e.ownerLabel})}):null]}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,Y.jsx)(O,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:me()}):null,(0,Y.jsx)(O,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:g()})]})]})}function sn({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=S(d.admin.setDefaultThemeMode),a=S(d.admin.setDefaultLocale),o=S(d.charts.setDefaultChart),s=w(d.charts.listChartsAdmin),c=w(d.groups.listGroups,{}),l=e??`system`,u=t??`fr`;return(0,Y.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h2`,{className:`oc-show__title`,children:et()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:qe()})]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:$e()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:te()})]}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(O,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void o({name:null}),children:i()}),mt.map(e=>(0,Y.jsx)(O,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key)),(s??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,Y.jsx)(O,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key))]})]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:h()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:ye()})]}),(0,Y.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,Y.jsx)(an,{chart:e,groups:c??[]},e.key))})]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:he()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:_()})]}),(0,Y.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,Y.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,Y.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,Y.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,Y.jsx)(en,{chart:e})]},e.key))})]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:y()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:Qe()})]}),(()=>{let e=(s??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:ge()}):(0,Y.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,Y.jsx)(on,{chart:e},e.key))})})()]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:He()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:ke()})]}),(0,Y.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,Y.jsx)(O,{variant:l===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:Jt(e)},e))})]}),(0,Y.jsxs)(`section`,{className:`oc-show__section`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,Y.jsx)(`h3`,{className:`oc-show__title`,children:nt()}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:Ye()})]}),(0,Y.jsx)(`div`,{className:`oc-show__row`,children:bt().map(e=>(0,Y.jsx)(O,{variant:u===e.value?`default`:`outline`,size:`sm`,onClick:()=>void a({locale:e.value}),children:e.label},e.value))}),(0,Y.jsx)(`p`,{className:`oc-show__desc`,children:Ee()})]})]})}function cn(){let e=w(d.me.getMe,{host:P}),t=ht(e?.resolvedThemeMode);return(0,Y.jsxs)(`div`,{className:`oc-appearance`,children:[(0,Y.jsx)(Zt,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,Y.jsx)(Qt,{}),(0,Y.jsx)(rn,{}),e?.role===`admin`?(0,Y.jsx)(sn,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function ln(){let[e,t]=(0,G.useState)(!0),[n,r]=(0,G.useState)(`per-user`),[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)(X),[c,l]=(0,G.useState)(X),[u,d]=(0,G.useState)(Z),f=i!==``||o!==X||c!==X;function p(){a(``),s(X),l(X),d(Z)}return(0,Y.jsxs)(`div`,{className:`oc-show`,children:[(0,Y.jsx)(cn,{}),(0,Y.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,Y.jsx)(`summary`,{className:`oc-show__title`,children:Re()}),(0,Y.jsxs)(Q,{title:`Buttons`,description:`Variants`,children:[(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(O,{children:`Default`}),(0,Y.jsx)(O,{variant:`secondary`,children:`Secondary`}),(0,Y.jsx)(O,{variant:`outline`,children:`Outline`}),(0,Y.jsx)(O,{variant:`ghost`,children:`Ghost`}),(0,Y.jsx)(O,{variant:`destructive`,children:`Destructive`}),(0,Y.jsx)(O,{variant:`link`,children:`Link`})]}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(O,{size:`sm`,children:`Small`}),(0,Y.jsx)(O,{children:`Default`}),(0,Y.jsx)(O,{size:`lg`,children:`Large`}),(0,Y.jsx)(O,{size:`icon`,"aria-label":`more`,children:(0,Y.jsx)(j,{})}),(0,Y.jsx)(O,{disabled:!0,children:`Disabled`})]})]}),(0,Y.jsx)(Q,{title:`Badges`,children:(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(R,{children:`Default`}),(0,Y.jsx)(R,{variant:`secondary`,children:`Secondary`}),(0,Y.jsx)(R,{variant:`outline`,children:`Outline`}),(0,Y.jsx)(R,{variant:`destructive`,children:`Destructive`})]})}),(0,Y.jsx)(Q,{title:`Inputs & selection`,children:(0,Y.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,Y.jsx)(F,{placeholder:`Text input…`}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsxs)(N,{value:n,onValueChange:r,children:[(0,Y.jsx)(k,{className:`w-56`,children:(0,Y.jsx)(z,{placeholder:`Select…`})}),(0,Y.jsxs)(B,{children:[(0,Y.jsx)(A,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,Y.jsx)(A,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,Y.jsxs)(`label`,{className:`oc-show__check`,children:[(0,Y.jsx)(I,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,Y.jsx)(Q,{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,Y.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,Y.jsxs)(jt,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,Y.jsxs)(N,{value:o,onValueChange:s,children:[(0,Y.jsx)(k,{size:`sm`,children:(0,Y.jsx)(z,{})}),(0,Y.jsxs)(B,{children:[(0,Y.jsx)(A,{value:X,children:`Toutes directions`}),(0,Y.jsx)(A,{value:`inbound`,children:`inbound`}),(0,Y.jsx)(A,{value:`outbound`,children:`outbound`}),(0,Y.jsx)(A,{value:`internal`,children:`internal`})]})]}),(0,Y.jsxs)(N,{value:c,onValueChange:l,children:[(0,Y.jsx)(k,{size:`sm`,children:(0,Y.jsx)(z,{})}),(0,Y.jsxs)(B,{children:[(0,Y.jsx)(A,{value:X,children:`Toutes sévérités`}),(0,Y.jsx)(A,{value:`info`,children:`info`}),(0,Y.jsx)(A,{value:`warn`,children:`warn`}),(0,Y.jsx)(A,{value:`critical`,children:`critical`})]})]})]}),(0,Y.jsx)(Mt,{fields:qt,onChange:()=>{}}),(0,Y.jsxs)(`div`,{className:`oc-show__row`,children:[(0,Y.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,Y.jsx)(At,{value:u,onChange:d})]})]})}),(0,Y.jsx)(Q,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,Y.jsxs)(yt,{children:[(0,Y.jsx)(vt,{asChild:!0,children:(0,Y.jsx)(O,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,Y.jsx)(j,{})})}),(0,Y.jsxs)(_t,{align:`start`,children:[(0,Y.jsx)(gt,{children:`Actions`}),(0,Y.jsx)(M,{}),(0,Y.jsx)(L,{children:`Edit`}),(0,Y.jsx)(L,{children:`Duplicate`}),(0,Y.jsx)(M,{}),(0,Y.jsx)(L,{variant:`destructive`,children:`Delete`})]})]})}),(0,Y.jsx)(Q,{title:`Card`,children:(0,Y.jsxs)(Et,{className:`w-80`,children:[(0,Y.jsxs)(xt,{children:[(0,Y.jsx)(wt,{children:`Instance`}),(0,Y.jsx)(Tt,{children:`Non-secret metadata only.`})]}),(0,Y.jsx)(Ct,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,Y.jsxs)(St,{className:`gap-2`,children:[(0,Y.jsx)(O,{size:`sm`,children:`Save`}),(0,Y.jsx)(O,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,Y.jsx)(Q,{title:`Table`,children:(0,Y.jsxs)(kt,{children:[(0,Y.jsx)(Dt,{children:(0,Y.jsxs)(H,{children:[(0,Y.jsx)(V,{className:`w-8`,children:(0,Y.jsx)(I,{"aria-label":`select all`})}),(0,Y.jsx)(V,{children:`Name`}),(0,Y.jsx)(V,{children:`Mode`}),(0,Y.jsx)(V,{className:`text-right`,children:`Status`}),(0,Y.jsx)(V,{className:`w-8`})]})}),(0,Y.jsx)(Ot,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,Y.jsxs)(H,{children:[(0,Y.jsx)(U,{children:(0,Y.jsx)(I,{"aria-label":`select ${e.n}`})}),(0,Y.jsx)(U,{className:`font-medium`,children:e.n}),(0,Y.jsx)(U,{children:(0,Y.jsx)(R,{variant:`secondary`,children:e.m})}),(0,Y.jsx)(U,{className:`text-right`,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,Y.jsx)(E,{className:`size-3.5`}),` `,e.s]})}),(0,Y.jsx)(U,{children:(0,Y.jsx)(O,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,Y.jsx)(j,{})})})]},e.n))})]})}),(0,Y.jsx)(Q,{title:`App fragments`,description:`Chat-specific components`,children:(0,Y.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,Y.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,Y.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,Y.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,Y.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,Y.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,Y.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,Y.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,Y.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,Y.jsx)(`span`,{className:`oc-run-status__dot`}),(0,Y.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}export{ln as ThemeShowroom};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{Bn as r,Cm as i,Hn as a,In as o,Ln as s,Rn as c,Sm as l,Tm as u,Vn as d,_m as f,bm as p,gm as m,hm as h,mm as g,pm as _,vm as v,wm as y,xm as b,ym as x,zn as S}from"./dist-B7IaMcdm.js";import{t as C}from"./button-B9CsHmrJ.js";import{A as w,Ct as T,Nt as E,St as D,Wt as O,ct as k,wt as A,xt as j}from"./index-DYfClpT4.js";var M=t(e(),1),N={s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5};function P(e,t){let n=e.trim();if(n===`now`)return t;let r=/^now-(\d+)([smhdw])$/.exec(n);if(r===null)return null;let i=Number(r[1]),a=N[r[2]];return!Number.isFinite(i)||a===void 0?null:t-i*a}function F(e,t=Date.now()){return e.kind===`absolute`?{from:e.from,to:e.to}:{from:P(e.from,t)??t-N.h,to:P(e.to,t)??t}}var I=[{label:u(),from:`now-5m`},{label:y(),from:`now-15m`},{label:i(),from:`now-30m`},{label:l(),from:`now-1h`},{label:b(),from:`now-3h`},{label:p(),from:`now-6h`},{label:x(),from:`now-12h`},{label:v(),from:`now-24h`},{label:f(),from:`now-2d`},{label:m(),from:`now-7d`},{label:h(),from:`now-30d`},{label:g(),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,i]=(0,M.useState)(!1),[l,u]=(0,M.useState)(``),f=F(e),[p,m]=(0,M.useState)(()=>z(f.from)),[h,g]=(0,M.useState)(()=>z(f.to));function _(t){if(t){let t=F(e);m(z(t.from)),g(z(t.to)),u(``)}i(t)}function v(e){t({kind:`relative`,from:e,to:`now`}),i(!1)}function y(){let e=B(p),n=B(h);e===null||n===null||(t({kind:`absolute`,from:e,to:n}),i(!1))}let b=(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]),x=B(p)!==null&&B(h)!==null;return(0,H.jsxs)(T,{open:n,onOpenChange:_,children:[(0,H.jsx)(A,{asChild:!0,children:(0,H.jsxs)(C,{variant:`outline`,size:`sm`,className:`oc-timerange__trigger`,children:[(0,H.jsx)(O,{}),R(e)]})}),(0,H.jsx)(D,{children:(0,H.jsx)(j,{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:a()}),(0,H.jsxs)(`label`,{className:`oc-field`,children:[(0,H.jsx)(`span`,{className:`oc-field__label`,children:d()}),(0,H.jsx)(k,{type:`datetime-local`,value:p,onChange:e=>m(e.target.value)})]}),(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:h,onChange:e=>g(e.target.value)})]}),(0,H.jsx)(C,{size:`sm`,className:`oc-timerange__apply`,disabled:!x,onClick:y,children:S()})]}),(0,H.jsxs)(`div`,{className:`oc-timerange__relative`,children:[(0,H.jsxs)(`div`,{className:`oc-timerange__search`,children:[(0,H.jsx)(E,{className:`oc-timerange__search-icon`,"aria-hidden":!0}),(0,H.jsx)(k,{value:l,onChange:e=>u(e.target.value),placeholder:c(),"aria-label":s()})]}),(0,H.jsx)(`ul`,{className:`oc-timerange__list`,children:b.length===0?(0,H.jsx)(`li`,{className:`oc-timerange__empty`,children:o()}):b.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:()=>v(t.from),children:t.label})},t.from))})]})]})})})]})}export{U as n,V as r,G as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,$g as i,Aw as a,C_ as o,Cw as s,D as c,D_ as l,Dw as u,E as d,E_ as f,Ew as p,GC as m,Gg as h,JC as g,Jg as _,KC as v,Kg as y,Mw as b,Nw as x,O_ as ee,Ow as S,QC as C,Qg as te,S_ as ne,Sw as w,T_ as re,Tw as T,WC as E,Wg as ie,XC as ae,Xg as oe,YC as se,Yg as ce,ZC as le,Zg as ue,__ as de,_w as fe,a_ as pe,b_ as me,bj as D,bw as O,c_ as he,d_ as ge,dw as k,e_ as _e,ew as A,f_ as ve,fw as j,g_ as ye,gw as M,h_ as be,hn as xe,hw as Se,i_ as Ce,iw as we,jw as N,kw as Te,l_ as Ee,lw as De,m_ as Oe,mn as ke,mw as Ae,n_ as je,nw as Me,o_ as Ne,p_ as Pe,pn as Fe,pw as Ie,qC as Le,qg as Re,r_ as ze,rw as Be,s_ as Ve,t_ as He,tw as Ue,u_ as We,uw as P,v_ as Ge,vw as Ke,w_ as qe,ww as Je,x_ as Ye,xj as F,xw as I,y_ as Xe,yw as Ze}from"./dist-B7IaMcdm.js";import{n as Qe}from"./dist-UNwILdG2.js";import{t as $e}from"./x-CJSI-sn5.js";import{i as L,n as R,r as et,t as tt}from"./tabs-K6MF5os_.js";import{t as z}from"./button-B9CsHmrJ.js";import{A as B,Bt as nt,C as V,Jt as rt,N as it,S as H,Ut as at,a as ot,b as U,bt as st,dt as ct,i as lt,j as ut,lt as dt,mt as ft,o as pt,pt as mt,qt as ht,r as gt,st as W,ut as _t,w as G,x as K,zt as vt}from"./index-DYfClpT4.js";import{n as q}from"./TimeRangePicker-CcUEMoXD.js";import{t as yt}from"./FilterBar-Z4TZZeJs.js";import{t as bt}from"./AdvancedFilter-BnA7f0yX.js";import{t as xt}from"./DataTableShell-BwOKMopJ.js";var St=c(`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=c(`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`?Ae():n===`agent`?`${Ie()} - ${r}`:e}function Tt(){let e=F(d.me.getMe,{host:st})?.role===`admin`,t=F(d.deliveryTiming.getDeliveryStatus,{}),n=D(d.deliveryTiming.startDeliveryRecord),r=D(d.deliveryTiming.stopDeliveryRecord),[i,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await r({}):await n({})}finally{c(!1)}};return(0,Y.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold`,children:x()}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:b()})]}),e?(0,Y.jsx)(z,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?a():N()}):null]}),l?(0,Y.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,Y.jsx)(W,{variant:`secondary`,children:Te()}),t?.startedAt?(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:S({time:ut(t.startedAt)})}):null]}):null,(0,Y.jsx)(`div`,{children:(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:i?T():p()})}),i?(0,Y.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=F(d.deliveryTiming.listDeliverySessions,{}),n=D(d.deliveryTiming.deleteDeliverySessions),[r,i]=(0,J.useState)(``),[a,o]=(0,J.useState)(`all`),[c,l]=(0,J.useState)(X),[u,f]=(0,J.useState)(null),{from:p,to:h}=q(c),g=c.to===`now`?1/0:h,_=r.trim()!==``||a!==`all`||c!==X,v=()=>{i(``),o(`all`),l(X)},y=(0,J.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(a===`all`||(a===`active`?t.active:!t.active))&&t.startedAt>=p&&t.startedAt<=g).map(e=>({...e,_id:e.sessionId}))},[t,r,a,p,g]),b=e=>{let t=new Set((y??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&f(null))};return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:s(),timeRange:c,onTimeRangeChange:l,onReset:v,canReset:_,children:(0,Y.jsxs)(U,{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:w()}),(0,Y.jsx)(H,{value:`active`,children:I()}),(0,Y.jsx)(H,{value:`stopped`,children:O()})]})]})}),(0,Y.jsx)(xt,{title:Je(),rows:y,emptyHint:m(),columns:[{header:``,className:`w-8`,cell:e=>(0,Y.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?k():j(),onClick:()=>f(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,Y.jsx)(St,{size:15,"aria-hidden":!0}):(0,Y.jsx)(nt,{size:15,"aria-hidden":!0})})},{header:Ze(),sort:e=>e.startedAt,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:B(e.startedAt)})},{header:Ke(),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:fe(),sort:e=>e.count,cell:e=>(0,Y.jsx)(`span`,{className:`tabular-nums`,children:Z(e.count)})},{header:M(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:Se(),sort:e=>e.active,cell:e=>e.active?(0,Y.jsx)(W,{variant:`secondary`,children:I()}):(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:O()})}],rowActions:e?e=>[{label:P(),variant:`destructive`,onSelect:()=>b([e.sessionId])}]:void 0,bulkActions:e?[{label:P(),variant:`destructive`,onSelect:e=>b(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,Y.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=F(d.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,J.useState)(!1);return(0,Y.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(it(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:De()});if(e.count===0||e.segments===null)return(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:u()});let i=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,` `,E()]}),(0,Y.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,Y.jsx)(Qe,{size:13,"aria-hidden":!0}):(0,Y.jsx)(at,{size:13,"aria-hidden":!0}),t?v():Le()]})]}),(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:Me()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:Ue()}),(0,Y.jsx)(`th`,{className:`py-1 text-right font-medium`,children:A()})]})}),(0,Y.jsxs)(`tbody`,{children:[a(r(),i.bridge),a(C(),i.A),a(le(),i.C)]})]}),(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:ae()}),e.truncated?(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:g()}):null,(0,Y.jsx)(`p`,{className:`oc-admin__hint`,children:se()})]})}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:xe()},{value:`principalType`,label:ke()},{value:`direction`,label:`direction`},{value:`roleKey`,label:Fe()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function It(){let e=rt({from:`/settings/traces`}),t=ht({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,s=e.principalType??Q,c=e.direction??Q,u=e.roleKey??Q,p=e.q??``,m=gt(e.from,e.to),h=(0,J.useMemo)(()=>pt(e.adv),[e.adv]),{from:g,to:v}=q(m),[y,b]=(0,J.useState)(null),[x,S]=(0,J.useState)(null),C=e=>void t({search:t=>({...t,limit:e})}),w=e=>void t({search:t=>({...t,kind:e})}),T=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),E=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),ie=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),ae=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),se=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),le=e=>void t({search:t=>({...t,...ot(e)})}),fe=e=>void t({search:t=>({...t,adv:lt(e)}),replace:!0}),D=F(d.observability.listEvents,{limit:n}),O=F(d.observability.listEvents,{limit:n,kind:r===At?void 0:r,filter:{q:p||void 0,from:g,to:v,statusClass:a===Q?void 0:a,principalType:s===Q?void 0:s,direction:c===Q?void 0:c,roleKey:u===Q?void 0:u,advanced:h.length>0?h:void 0}}),k=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])e.add(t.kind);return[...e].sort()},[D]),A=(0,J.useMemo)(()=>{let e=new Set;for(let t of D??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[D]),j=p!==``||a!==Q||s!==Q||c!==Q||u!==Q||h.length>0||m.kind!==`relative`||m.from!==Pt.from;function M(){t({search:{limit:100,kind:`all`},replace:!0})}let xe=y?D?.filter(e=>e.correlationId===y):O,Se=e.section,N=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,Y.jsxs)(tt,{value:Se,onValueChange:e=>N(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)(vt,{size:13,"aria-hidden":!0}),we()]}),(0,Y.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,Y.jsx)(Ct,{size:13,"aria-hidden":!0}),Be()]})]}),(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:[ee(),(0,Y.jsx)(`strong`,{children:l()}),f(),` `,(0,Y.jsx)(`span`,{className:`oc-filter__window`,children:re()})]}),(0,Y.jsxs)(yt,{q:p,onQChange:T,searchPlaceholder:qe(),timeRange:m,onTimeRangeChange:le,onReset:M,canReset:j,children:[(0,Y.jsxs)(U,{value:a,onValueChange:E,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:o()})}),(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)(U,{value:s,onValueChange:ie,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-32`,children:(0,Y.jsx)(G,{placeholder:Ye()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:me()}),Mt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:c,onValueChange:ae,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:Ge()}),Nt.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:u,onValueChange:se,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Y.jsx)(G,{placeholder:de()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:Q,children:ye()}),A.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:r,onValueChange:w,children:[(0,Y.jsx)(V,{size:`sm`,className:`w-44`,children:(0,Y.jsx)(G,{placeholder:be()})}),(0,Y.jsxs)(K,{children:[(0,Y.jsx)(H,{value:At,children:Oe()}),k.map(e=>(0,Y.jsx)(H,{value:e,children:e},e))]})]}),(0,Y.jsxs)(U,{value:String(n),onValueChange:e=>C(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:Pe({count:e})},e))})]})]}),(0,Y.jsx)(bt,{fields:Ft,seed:h,onChange:fe}),y?(0,Y.jsx)(`div`,{className:`oc-traces__followline`,children:(0,Y.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>b(null),title:ve(),children:[(0,Y.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ge(),(0,Y.jsx)(`code`,{children:$(y)})]}),(0,Y.jsx)($e,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`sr-only`,children:We()})]})}):null,(0,Y.jsx)(xt,{title:Ee(),rows:xe,emptyHint:y?he():Ve(),columns:[{header:Ne(),sort:e=>e.at,cell:e=>(0,Y.jsx)(`span`,{className:`oc-traces__time`,children:B(e.at)})},{header:pe(),sort:e=>e.kind,cell:e=>(0,Y.jsx)(W,{variant:`secondary`,children:e.kind})},{header:Ce(),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":ze(),children:`✓`})}},{header:je(),sort:e=>e.direction,cell:e=>e.direction?(0,Y.jsx)(W,{variant:`outline`,children:e.direction}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:He(),sort:e=>e.principalType,cell:e=>(0,Y.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,Y.jsx)(W,{variant:`outline`,children:e.principalType}),e.principalId?(0,Y.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:_e(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,Y.jsx)(W,{variant:`secondary`,children:e.roleKey}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:i(),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:te(),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:ue(),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:oe(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,Y.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:ce(),onClick:()=>b(e.correlationId),children:$(e.correlationId)}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:_(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,Y.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:Re()}):(0,Y.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,Y.jsx)(zt,{row:x,onClose:()=>S(null)})]})]})}function Lt(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Rt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function zt({row:e,onClose:t}){let n=(0,J.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,Y.jsx)(dt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,Y.jsxs)(_t,{className:`max-w-lg`,children:[(0,Y.jsxs)(mt,{children:[(0,Y.jsxs)(ft,{className:`oc-traces__meta-title`,children:[y(),` `,(0,Y.jsx)(`code`,{children:e.kind}),(0,Y.jsx)(W,{variant:`outline`,children:h()})]}),(0,Y.jsx)(ct,{children:ie()})]}),(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{$x as r,Bl as i,Bx as a,E as o,Fx as s,Gx as c,Hl as l,Hx as u,Ix as d,Jx as f,Kx as ee,Lx as te,Qx as ne,Rx as re,Ux as ie,Vl as p,Vx as ae,Wx as oe,Xx as se,Yx as ce,Zx as le,aS as ue,ag as m,bj as h,cS as g,cg as _,dg as v,eS as de,fg as y,gg as b,gx as x,hg as S,iS as fe,ig as C,lS as w,lg as T,mg as E,nS as pe,oS as me,og as D,pg as O,qx as he,rS as ge,sS as k,sg as A,tS as _e,ug as j,xj as M,zx as ve}from"./dist-B7IaMcdm.js";import{t as N}from"./button-B9CsHmrJ.js";import{C as P,H as F,Jt as ye,Mt as I,S as L,U as be,V as R,b as z,bt as xe,c as B,dt as V,it as Se,jt as H,l as U,lt as Ce,mt as we,nt as Te,ot as Ee,p as W,pt as De,qt as Oe,rt as ke,s as G,st as K,tt as Ae,ut as je,w as q,x as J}from"./index-DYfClpT4.js";import{t as Y}from"./FilterBar-Z4TZZeJs.js";import{t as Me}from"./DataTableShell-BwOKMopJ.js";import{t as Ne}from"./DetailChips-B7PRsQ8X.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let i=M(o.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),a=M(o.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((a??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(a??[]).find(e=>e.isDefault)??null,l=c?`${c.instanceName}/${c.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)(Ce,{open:n,onOpenChange:r,children:(0,Z.jsxs)(je,{className:`oc-access`,children:[(0,Z.jsxs)(De,{children:[(0,Z.jsx)(we,{children:b({user:t})}),(0,Z.jsx)(V,{children:S()})]}),i?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:i.inGroup?E():O()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:i===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:y()}):d.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:T()}):[...f.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let s=h(o.agents.assignAgent),c=h(o.agents.removeAgent),l=h(o.agents.setDefaultAgent),u=R();if(!e)return null;async function d(n,r){try{r?await c({profileId:e,instanceName:t,agentId:n}):await s({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(v(),e)}}async function f(n){try{await l({profileId:e,instanceName:t,agentId:n})}catch(e){u.error(j(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(I,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`;return(0,Z.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Z.jsx)(W,{checked:r,disabled:s&&!r,onCheckedChange:()=>void d(e.agentId,r),"aria-label":_({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:A()}):null,e.outOfPool?(0,Z.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:D()}):null,r?o?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":m(),title:m(),children:(0,Z.jsx)(H,{size:14,fill:`currentColor`})}):(0,Z.jsx)(N,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":C(),title:C(),onClick:()=>void f(e.agentId),children:(0,Z.jsx)(H,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return i();case`user`:return p();case`admin`:return l();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),r=G.filter(e=>n.has(U[e])).length;return(0,Z.jsxs)(Ae,{children:[(0,Z.jsx)(Ee,{asChild:!0,children:(0,Z.jsx)(N,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?w():g({count:r})})}),(0,Z.jsxs)(Te,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(Se,{children:k()}),G.map(e=>{let r=U[e];return(0,Z.jsxs)(ke,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(W,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:B[e]()})]},e)})]})]})}function Le(){let e=ye({from:`/settings/users`}),t=Oe({from:`/settings/users`}),n=e.q??``,i=e.role??Q,l=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),p=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),m=M(o.admin.listUsers,{filter:{q:n||void 0,role:i===Q?void 0:i},withAgents:!0}),g=M(o.me.getMe,{host:xe}),_=h(o.admin.setRole),v=h(o.admin.setUserPermissions),y=h(o.admin.startImpersonation),b=h(o.admin.deleteUser),S=h(o.admin.setUserName),C=F(),w=be(),T=R(),[E,D]=(0,X.useState)(null),O=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of m??[])e.add(t.role);return[...e]},[m]),k=n!==``||i!==Q;function A(){t({search:{},replace:!0})}async function j(e){try{await _(e)}catch(e){T.error(me(),e)}}async function N(e){try{await v(e)}catch(e){T.error(ue(),e)}}async function B(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await C({title:ne(),description:le({user:t}),confirmWord:se(),confirmLabel:ce(),destructive:!0}))try{await b({profileId:e._id}),T.success(he({user:t}))}catch(e){T.error(f(),e)}}async function V(e){let t=e.email||e.name||e.userId.slice(0,8),n=await w({title:c(),label:oe({user:t}),placeholder:ie(),defaultValue:e.name??``,confirmLabel:x()});if(n!==null)try{await S({profileId:e._id,name:n}),T.success(u())}catch(e){T.error(ae(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{q:n,onQChange:l,searchPlaceholder:fe(),onReset:A,canReset:k,children:(0,Z.jsxs)(z,{value:i,onValueChange:p,children:[(0,Z.jsx)(P,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:Q,children:ge()}),O.map(e=>(0,Z.jsx)(L,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:pe(),rows:m,emptyHint:_e(),rowActions:e=>{let t=[{label:s(),onSelect:()=>D({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:ee(),onSelect:()=>void V(e)}];return e.userId!==g?.userId&&t.push({label:de(),onSelect:()=>void y({profileId:e._id})},{label:r(),variant:`destructive`,onSelect:()=>void B(e)}),t},columns:[{header:a(),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:ve(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(z,{value:e.role,onValueChange:t=>void j({profileId:e._id,role:t}),children:[(0,Z.jsx)(P,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(q,{})}),(0,Z.jsxs)(J,{children:[(0,Z.jsx)(L,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(L,{value:`user`,children:$(`user`)}),(0,Z.jsx)(L,{value:`admin`,children:$(`admin`)})]})]})},{header:re(),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:te()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),N({profileId:e._id,permissions:[...n]})}})},{header:d(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(I,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Pe,{profileId:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||D(null)}})]})}export{Le as UsersTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$ as r,At as i,B as a,Ct as o,D as s,Dt as c,E as l,Et as u,G as d,H as ee,J as f,K as p,Ms as m,Mt as h,Nt as g,O as te,Ot as _,Ps as v,Pt as y,Q as b,St as ne,Tt as re,U as x,V as S,Z as C,_t as w,bj as T,bt as ie,dt as ae,el as E,et as oe,fj as se,ft as ce,gt as le,ht as D,jt as ue,kt as O,lt as de,mj as fe,mt as pe,pt as k,q as me,tt as A,ut as j,vj as M,vt as N,wt as P,xj as F,xt as I,yt as L}from"./dist-B7IaMcdm.js";import{i as R,n as z,r as he,t as ge}from"./tabs-K6MF5os_.js";import{t as B}from"./button-B9CsHmrJ.js";import{B as _e,C as V,F as ve,I as ye,It as be,Jt as xe,L as Se,Ot as Ce,P as we,R as H,S as U,b as W,bt as Te,p as G,qt as Ee,st as K,w as q,x as J,z as Y}from"./index-DYfClpT4.js";/* empty css */var X=s(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Z=t(e(),1),Q=n(),De=[[`auto`,()=>c()],[`fr-FR`,()=>A()],[`en-US`,()=>oe()],[`en-GB`,()=>r()],[`de-DE`,()=>b()],[`es-ES`,()=>C()]],Oe=[[`0.75`,()=>re()],[`1`,()=>P()],[`1.25`,()=>o()],[`1.5`,()=>ne()]],$=0;function ke({instance:e}){let t=T(l.admin.upsertInstanceConfig),n=e.config??{},r={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[i,o]=(0,Z.useState)(r),[s,c]=(0,Z.useState)(`idle`),[d,f]=(0,Z.useState)(!1),[p,h]=(0,Z.useState)(!1),g=M(l.voice.gatewayTtsPreview);(0,Z.useEffect)(()=>{o({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),c(`idle`)},[e._id]);let y=i.enabled!==r.enabled||i.engine!==r.engine||i.lang!==r.lang||i.rate!==r.rate||i.autoRead!==r.autoRead;async function b(){c(`saving`);try{let n={...e.config??{}};n.voiceEnabled=i.enabled,i.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,i.lang===`auto`?delete n.voiceLang:n.voiceLang=i.lang;let r=Number.parseFloat(i.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,i.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),c(`idle`)}catch{c(`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)(G,{checked:i.enabled,onCheckedChange:e=>o({...i,enabled:e===!0}),"aria-label":O()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:O()})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:x()}),(0,Q.jsxs)(W,{value:i.engine,onValueChange:e=>o({...i,engine:e}),disabled:!i.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":x(),children:(0,Q.jsx)(q,{})}),(0,Q.jsxs)(J,{children:[(0,Q.jsx)(U,{value:`browser`,children:ee()}),e.kind===`hermes`?null:(0,Q.jsx)(U,{value:`gateway`,children:S()})]})]})]}),i.engine===`gateway`?(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:a()}):null,i.engine===`gateway`?null:(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:_()}),(0,Q.jsxs)(W,{value:i.lang,onValueChange:e=>o({...i,lang:e}),disabled:!i.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":_(),children:(0,Q.jsx)(q,{})}),(0,Q.jsx)(J,{children:De.map(([e,t])=>(0,Q.jsx)(U,{value:e,children:t()},e))})]})]}),(0,Q.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:u()}),(0,Q.jsxs)(W,{value:i.rate,onValueChange:e=>o({...i,rate:e}),disabled:!i.enabled,children:[(0,Q.jsx)(V,{size:`sm`,"aria-label":u(),children:(0,Q.jsx)(q,{})}),(0,Q.jsx)(J,{children:Oe.map(([e,t])=>(0,Q.jsx)(U,{value:e,children:t()},e))})]})]}),i.engine===`gateway`?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:i.autoRead,onCheckedChange:e=>o({...i,autoRead:e===!0}),disabled:!i.enabled,"aria-label":I()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:I()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ie()})]}),(0,Q.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Q.jsx)(B,{size:`sm`,disabled:!y||s===`saving`,onClick:()=>void b(),children:s===`saving`?E():v()}),(0,Q.jsx)(B,{variant:`outline`,size:`sm`,disabled:!i.enabled||d,onClick:()=>{let t=Number.parseFloat(i.rate)||1,n=++$;if(h(!1),Y(),H(),i.engine!==`gateway`){Se(w(),{lang:ye(i.lang,fe()),rate:t});return}f(!0),g({instanceName:e.name,text:w()}).then(({mime:e,audioBase64:r})=>{n===$&&ve(r,e,{rate:t})}).catch(()=>{n===$&&h(!0)}).finally(()=>f(!1))},children:d?E():L()}),(0,Q.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,f(!1),Y(),H()},children:N()})]}),s===`error`||p?(0,Q.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:p?te():m()}):null]})}function Ae({stt:e}){let t=F(l.me.getMe,{host:Te}),n=T(l.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?j():de()}),(0,Q.jsx)(K,{variant:r?`secondary`:`destructive`,children:r?me():p()})]}),i?(0,Q.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Q.jsx)(G,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":f()}),(0,Q.jsx)(`span`,{className:`oc-cdefaults__label`,children:f()})]}):null,(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:pe()})]})}function je(){let e=F(l.admin.listInstances,{}),t=(0,Z.useMemo)(()=>_e(),[]),n=(0,Z.useMemo)(()=>we(),[]),{section:r}=xe({from:`/settings/voice`}),a=Ee({from:`/settings/voice`});return(0,Q.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:y()}),(0,Q.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Q.jsx)(K,{variant:t?`secondary`:`destructive`,children:t?g():h()}),(0,Q.jsx)(K,{variant:n?`secondary`:`destructive`,children:n?ue():i()})]}),(0,Q.jsxs)(ge,{value:r,onValueChange:e=>void a({search:{section:e},replace:!0}),children:[(0,Q.jsxs)(he,{className:`w-full`,children:[(0,Q.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(Ce,{size:13,"aria-hidden":!0}),d()]}),(0,Q.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(be,{size:13,"aria-hidden":!0}),D()]}),(0,Q.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Q.jsx)(X,{size:13,"aria-hidden":!0}),k()]})]}),(0,Q.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:se()}):e.length===0?(0,Q.jsx)(`p`,{className:`oc-admin__hint`,children:le()}):e.map(e=>(0,Q.jsx)(ke,{instance:e},e._id))}),(0,Q.jsx)(z,{value:`dictation`,children:(0,Q.jsx)(Ae,{stt:n})}),(0,Q.jsx)(z,{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:k()}),(0,Q.jsx)(K,{variant:`outline`,children:ce()})]}),(0,Q.jsx)(`p`,{className:`oc-cdefaults__help`,children:ae()})]})})]})]})}export{je as VoiceTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n,t as r,x as i}from"./dist-B7IaMcdm.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-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-B7IaMcdm.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-B7IaMcdm.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{
|
|
1
|
+
import{Es as e,Kt as t,_s as n,gs as r,ms as i,ps as a,vs as o}from"./dist-B7IaMcdm.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`?n():r()}function m(t){return t??e()}function h(e,n){return n&&n!==`openclaw`?t({provider:n}):e===null?a():i({version:e})}function g(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{m as a,h as i,g as n,l as o,p as r,d as s,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ad as e,Bd as t,Dd as n,Ed as r,Fd as i,Gd as a,Hd as o,Id as s,Jd as c,Kd as l,Ld as u,Md as d,Nd as f,Od as p,Pd as m,Qd as h,Rd as g,Td as _,Ud as v,Vd as y,Wd as b,Xd as x,Yd as S,Zd as C,jd as w,kd as T,qd as E,wd as D,zd as O}from"./dist-B7IaMcdm.js";var k={AGENT_NOT_FOUND:()=>({label:h(),hint:C()}),AUTH_TOKEN_MISMATCH:()=>({label:x(),hint:S()}),DEVICE_SIGNING_FAILED:()=>({label:c(),hint:E()}),SESSION_SCOPE_DENIED:()=>({label:l(),hint:a()}),GATEWAY_TIMEOUT:()=>({label:b(),hint:v()}),GATEWAY_DISCONNECTED:()=>({label:o(),hint:y()}),ATTACHMENT_TOO_LARGE:()=>({label:g(),hint:u()}),ATTACHMENT_REJECTED:()=>({label:s(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:t(),hint:O()}),INVALID_REQUEST:()=>({label:m(),hint:f()}),NOT_CONFIGURED:()=>({label:d(),hint:w()}),UNROUTED:()=>({label:e(),hint:T()}),UPSTREAM_ERROR:()=>({label:p(),hint:n()}),UNKNOWN:()=>({label:r(),hint:_()})};function A(e){return e?k[e]?.()??{label:e,hint:D()}:k.UNKNOWN()}export{A as t};
|