local-operator-ui 0.52.10 → 0.52.12
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/out/main/index.js +83 -11
- package/out/renderer/assets/{_basePickBy-DfU-0OMa.js → _basePickBy-B_KMiT8d.js} +1 -1
- package/out/renderer/assets/{_baseUniq-Cf60T05n.js → _baseUniq-KyfqdLxl.js} +1 -1
- package/out/renderer/assets/{agent-details-page-DupNgrsR.js → agent-details-page-CU0scOGo.js} +1 -1
- package/out/renderer/assets/agent-hub-page-CXqP5D9l.js +7 -0
- package/out/renderer/assets/{agents-page-BkyCjnFQ.js → agents-page-CITewnbE.js} +3 -3
- package/out/renderer/assets/{appearance-DZQCtGzt.js → appearance-D9ltCB_v.js} +1 -1
- package/out/renderer/assets/{approvalsOverlay-ArPhFGMQ.js → approvalsOverlay-BZB3HD2h.js} +1 -1
- package/out/renderer/assets/{arc-fEAyQagZ.js → arc-BXROWqfO.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-DjOxdPIv.js → architectureDiagram-IEHRJDOE-BtQxVFkY.js} +1 -1
- package/out/renderer/assets/{avatar-cropper-D16ksP5n.js → avatar-cropper-BTe4ms8a.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-5-oQe6Hg.js → blockDiagram-JOT3LUYC-CwTmzFtC.js} +1 -1
- package/out/renderer/assets/{book-open-Cc4Qb21L.js → book-open-6C6zIo02.js} +1 -1
- package/out/renderer/assets/browser-page-B2NihKE2.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-Dc9AqNJW.js → browser-webauthn-prompt-DPvR_HeR.js} +1 -1
- package/out/renderer/assets/{building-2-DnSBO_7V.js → building-2-FEXDSINI.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BIOwqCdp.js → c4Diagram-VJAJSXHY-CYKeqVN1.js} +1 -1
- package/out/renderer/assets/channel-DY01KOru.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-DM74xdpX.js → chunk-4BMEZGHF-B56Z7VdS.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-DTDoq5W_.js → chunk-A2AXSNBT-IyCFScSx.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-CxtPWm0S.js → chunk-AEK57VVT-D2L7lw6w.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-Bjwgn7JA.js → chunk-D6G4REZN-B8uaZQWB.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-Cz1t_ff3.js → chunk-RZ5BOZE2-C--iJ4M_.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-Cx2f2oFX.js → chunk-XZIHB7SX-B-F0sf_j.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-DQFi7G48.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-DQFi7G48.js +1 -0
- package/out/renderer/assets/clone-aBDebZqi.js +1 -0
- package/out/renderer/assets/{console-mirror-Be1UXdZX.js → console-mirror--tzRIcEs.js} +1 -1
- package/out/renderer/assets/{consoleCapture-owojwcFe.js → consoleCapture-BP7oATnc.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-59C2VH9z.js → conversation-input-sync-BxH_-j4i.js} +106 -106
- package/out/renderer/assets/{dagre-OKDRZEBW-CRWH_RFn.js → dagre-OKDRZEBW-BsSAtXm_.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-BvXHb9nV.js → diagram-SSKATNLV-BOhVLfAp.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-BYVbLF6o.js → diagram-VNBRO52H-DaL0vz6g.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-3BFtmsTF.js → erDiagram-Q7BY3M3F-DzgDBqFG.js} +1 -1
- package/out/renderer/assets/{error-boundary--DgTWGAQ.js → error-boundary-CpC5mJlj.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-CtwFLhwt.js → flowDiagram-4HSFHLVR-829SQdcy.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-BcQzDi4k.js → ganttDiagram-APWFNJXF-lBvxRG__.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-Rdn1bGJ0.js → gitGraphDiagram-7IBYFJ6S-Bh31oee9.js} +1 -1
- package/out/renderer/assets/{graph-zJQyU8lA.js → graph-CK7j5dDy.js} +1 -1
- package/out/renderer/assets/{heart-K9BBaPRd.js → heart-BbvU9pm2.js} +1 -1
- package/out/renderer/assets/{index-DGMX2k_z.js → index-5vJkUwlK.js} +1 -1
- package/out/renderer/assets/{index-BK8yBNNa.js → index-BQ1tPrpy.js} +1 -1
- package/out/renderer/assets/{index-IJLdoh2_.js → index-DbYAjJtZ.js} +1 -1
- package/out/renderer/assets/{index-CCtgdHHn.js → index-YSSL7S4C.js} +180 -180
- package/out/renderer/assets/infoDiagram-PH2N3AL5-AJh3UEen.js +2 -0
- package/out/renderer/assets/{installer-BqIFRN1B.js → installer-Cn0-OumE.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-B69MjoFr.js → journeyDiagram-U35MCT3I-CBCoVdHM.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-C2cZYJGg.js → kanban-definition-NDS4AKOZ-JJwJUmNc.js} +1 -1
- package/out/renderer/assets/{layout-DqdvdvIz.js → layout-CTBLSCRW.js} +1 -1
- package/out/renderer/assets/legacy-agents-page-B3jSUdUx.js +33 -0
- package/out/renderer/assets/{library-page-BBZOeMKB.js → library-page-DC8NBFTZ.js} +3 -3
- package/out/renderer/assets/{log-in-BguF0cMT.js → log-in-B0SnHGej.js} +1 -1
- package/out/renderer/assets/{mermaid.core-C74Lu-Og.js → mermaid.core-di_s04Km.js} +5 -5
- package/out/renderer/assets/{mesh-page-BGVCExVu.js → mesh-page-CCY0Naxa.js} +1 -1
- package/out/renderer/assets/{messages-CqvhgjgC.js → messages-BOFOVo9w.js} +8 -8
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-Pua25oeD.js → mindmap-definition-ALO5MXBD-dRAEsXTb.js} +1 -1
- package/out/renderer/assets/{mini-CnOyRuzB.js → mini-Cj2W_Me4.js} +1 -1
- package/out/renderer/assets/{notebook-pen-CYYzWKVu.js → notebook-pen-D18NYo9D.js} +1 -1
- package/out/renderer/assets/{notifications-page-BaGZSA3o.js → notifications-page-BSqhGl7W.js} +1 -1
- package/out/renderer/assets/{org-access-BsT6ienF.js → org-access--CXw9Sdw.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-Bp50tkVp.js → org-surface-gate-CaRcKcSt.js} +1 -1
- package/out/renderer/assets/{page-header-CrTly4cs.js → page-header-pza-RCSF.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-B7O0-XBp.js → pieDiagram-IB7DONF6-B9tFEOr3.js} +1 -1
- package/out/renderer/assets/{project-markdown-BRlfZTkB.js → project-markdown-Fk51EUtB.js} +1 -1
- package/out/renderer/assets/{projects-page-BK4_RzG1.js → projects-page-BpGLh1A1.js} +1 -1
- package/out/renderer/assets/{publication-validation-BsdGPymf.js → publication-validation-BAG4HOS-.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-2u8wfxzO.js → quadrantDiagram-7GDLP6J5-3lzCuN5P.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-ZmHcgFsG.js → radar-MK3ICKWK-l1VDzGrH.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-VAvFX8bW.js → radient-auth-buttons-3mMNLcWm.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-SBJAktgj.js → requirementDiagram-KVF5MWMF-8XzZgDMe.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DlJYg7ak.js → sankeyDiagram-QLVOVGJD-DDPjKmci.js} +1 -1
- package/out/renderer/assets/{schedules-page-B0RhZ3B2.js → schedules-page-87bqQvXm.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CdvZLNtu.js → sequenceDiagram-X6HHIX6F-gZCEHJYF.js} +1 -1
- package/out/renderer/assets/{settings-page-C_Ui4Qu2.js → settings-page-PYRjAvWm.js} +1 -1
- package/out/renderer/assets/{smartart-Bp-6frEa.js → smartart-DSxL1H0h.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-BTIzql3d.js → stateDiagram-DGXRK772-Uc4IIAKi.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-w4I9qZhs.js +1 -0
- package/out/renderer/assets/{team-bridge-page-Y7kfORf7.js → team-bridge-page-DKg851BV.js} +1 -1
- package/out/renderer/assets/{team-bridge-scope-preference-0e228o8i.js → team-bridge-scope-preference-C-xErBix.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-CV2qVMM7.js → timeline-definition-BDJGKUSR-CINvO-ds.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-D_BdjsyK.js → use-download-agent-mutation-DsOHpNRz.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-BGgV5JES.js → use-session-snapshot-DE4-f8hJ.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-zG2rJLeN.js → xychartDiagram-VJFVF3MP-B6H4PKTC.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +1 -1
- package/out/renderer/assets/agent-hub-page-DleDc1gI.js +0 -7
- package/out/renderer/assets/browser-page-CheY_71A.js +0 -1
- package/out/renderer/assets/channel-CAbqKi5K.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-fQHFRQre.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-fQHFRQre.js +0 -1
- package/out/renderer/assets/clone-lH5iTXYN.js +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-BLrJMgnv.js +0 -2
- package/out/renderer/assets/legacy-agents-page-Jrwbxc_A.js +0 -33
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-D7-M_MQG.js +0 -1
package/out/renderer/assets/{stateDiagram-DGXRK772-BTIzql3d.js → stateDiagram-DGXRK772-Uc4IIAKi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-CxtPWm0S.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-C74Lu-Og.js";import{G as F}from"./graph-zJQyU8lA.js";import{l as O}from"./layout-DqdvdvIz.js";import{q as J,u as X}from"./conversation-input-sync-59C2VH9z.js";import"./chunk-RZ5BOZE2-Cz1t_ff3.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./_baseUniq-Cf60T05n.js";import"./_basePickBy-DfU-0OMa.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},q=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),j=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&q(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&j(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},St={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{St as diagram};
|
|
1
|
+
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-D2L7lw6w.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-di_s04Km.js";import{G as F}from"./graph-CK7j5dDy.js";import{l as O}from"./layout-CTBLSCRW.js";import{q as J,u as X}from"./conversation-input-sync-BxH_-j4i.js";import"./chunk-RZ5BOZE2-C--iJ4M_.js";import"./index-DbYAjJtZ.js";import"./messages-BOFOVo9w.js";import"./_baseUniq-KyfqdLxl.js";import"./_basePickBy-B_KMiT8d.js";import"./appearance-D9ltCB_v.js";import"./roles-D1pcbxAx.js";import"./error-boundary-CpC5mJlj.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},q=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),j=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&q(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&j(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},St={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{St as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as e,a,S as i}from"./chunk-AEK57VVT-D2L7lw6w.js";import{_ as s}from"./mermaid.core-di_s04Km.js";import"./chunk-RZ5BOZE2-C--iJ4M_.js";import"./conversation-input-sync-BxH_-j4i.js";import"./index-DbYAjJtZ.js";import"./messages-BOFOVo9w.js";import"./appearance-D9ltCB_v.js";import"./roles-D1pcbxAx.js";import"./error-boundary-CpC5mJlj.js";var f={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{f as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,c as U,r as u}from"./index-
|
|
1
|
+
import{j as t,c as U,r as u}from"./index-DbYAjJtZ.js";import{c2 as eu,t as Yr,N as Kl,c3 as nu,c4 as tu,v as At,c5 as iu,bO as Ca,c6 as au,c7 as Zr,c8 as ru,c9 as tn,ca as su,cb as ou,c1 as Ul,cc as mr,cd as Hl,c as lu,ce as di,cf as du,cg as cu,ch as Gl,ci as Wl,cj as uu,ck as mu,cl as hu,cm as gu,cn as pu,co as so,cp as fu,a as ka,cq as ku,cr as Vl,cs as wu,ct as bu,cu as wa,aZ as Ta,cv as yu,cw as xu,cx as vu,cy as Jl,R as ju,cz as _u,cA as Nu,cB as Ql,cC as es,cD as Bu,cE as Su,cF as at,cG as oo,cH as lo,cI as Eu,cJ as Iu,cK as Ru,cL as hr,cM as Cu,cN as Tu,cO as Au,cP as Mu,cQ as zu,cR as Pu,cS as co,cT as Ou,cU as Du,cV as Lu,cW as qu,cX as Fu,cY as $u,cZ as Ku,c_ as Uu,c$ as Hu,d0 as Gu,d1 as Wu,d2 as Vu,d3 as Ju,d4 as Qu,d5 as Xu,d6 as Yu,d7 as Zu,d8 as em,d9 as nm,da as tm,db as im,dc as am,dd as rm,de as sm,df as om,dg as uo,dh as mo}from"./index-YSSL7S4C.js";import{b2 as gr,di as ns,dj as lm,dk as dm,dl as nn,dm as ts,dn as rt,dp as cm,dq as is,dr as pr,ds as mi,cB as Xl,dt as ba,du as Yl,dv as as,dw as ya,dx as cn,c5 as Zl,dy as ed,dz as xa,dA as um,dB as mm,dC as hm,dD as gm,cM as rs,dE as pm,b5 as fm,az as km,dF as wm,dG as bm,dH as ym,aF as ca,dI as xm,dJ as vm,dK as jm,dL as ho,dM as _m,dN as Nm,dO as Bm,dP as Sm,b1 as Em,dQ as Im,dR as It,dS as Rm,dT as Cm,dU as nd,a1 as Aa,dV as Tm,dW as Am,dX as go,dY as Mm,dZ as zm,cv as ct,d_ as Ma,d$ as td,e0 as ot,e1 as id,cQ as za,c_ as Pm,bx as ad,e2 as rd,e3 as sd,e4 as Om,e5 as Dm,e6 as Lm,e7 as od,e8 as pi,e9 as hi,d8 as qm,cW as ld,ea as Fm,eb as dd,ec as va,ed as ja,ee as cd,ef as $m,eg as po,eh as Km,r as Um,ca as Hm,ei as ud,ej as Gm,ek as Wm,el as Vm,em as Jm,en as md,eo as ss,ep as hd,eq as Qm,aR as We,er as Xm,es as Ym,et as Zm,cK as Pa,eu as Oa,ev as os,ew as ri,d5 as gd,cG as ls,ex as eh,ey as pd,ez as fd,eA as fo,bv as nh,aS as yn,eB as th,eC as ih,eD as ah,eE as kd,eF as rh,eG as wd,eH as _a,eI as fr,eJ as bd,eK as sh,eL as oh,eM as ko,eN as wo,eO as bo,eP as yo,cI as lh,eQ as xo,eR as dh,eS as kr,eT as ch,eU as uh,ad as mh,bu as hh,cb as gh,eV as ph,eW as fh,eX as kh,eY as wh,eZ as bh,e_ as wr,e$ as yh,f0 as xh}from"./conversation-input-sync-BxH_-j4i.js";import{N as In,u as ut,h as Da,m as La,s as vh,al as ds,ar as yd,aA as jh,n as ua,ao as _h,H as En,aB as Nh,aC as vo,aD as Bh,L as G,aE as Sh,aF as xd,aG as Eh,aH as vd,aI as jd,ai as qa,d as br,au as jo,aJ as yr,aK as st,aL as _o,a as Ih,t as Ti}from"./appearance-D9ltCB_v.js";import{c as Cn,u as ge,A as zi,B as X,aj as _d,X as mt,a7 as Nd,ai as Bd,a8 as Rh,a9 as Sd,ak as Ch,i as gi,n as Mt,o as zt,y as Ed,p as Pt,z as Ot,S as Ze,K as Li,w as $i,h as Th,F as Fa,J as Id,al as cs,r as us,a as Ah,D as Ki,b as Ui,d as Hi,I as Rd,H as si,l as zr,m as Na,e as Gi,am as Ba,f as ci,an as Mh,aa as zh,ao as Ph,ap as Oh,a6 as Dh,aq as Lh,ar as qh,as as qi,k as Fh,at as ms,q as $h}from"./error-boundary-CpC5mJlj.js";import{t as o}from"./messages-BOFOVo9w.js";import{r as Kh,u as Uh,a as Hh,D as Gh,b as Wh,c as No,s as Vh,w as Jh}from"./team-bridge-scope-preference-C-xErBix.js";import{I as Cd,L as Qh}from"./log-in-B0SnHGej.js";import{B as Xh}from"./building-2-FEXDSINI.js";import"./console-mirror--tzRIcEs.js";import"./roles-D1pcbxAx.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t,c as h}from"./index-
|
|
1
|
+
import{r as o,j as t,c as h}from"./index-DbYAjJtZ.js";import{N as S,u as N,d as w}from"./index-YSSL7S4C.js";import{u as I,A as E,q as A,B as y,X as k}from"./error-boundary-CpC5mJlj.js";import{t as i}from"./messages-BOFOVo9w.js";import{v as B}from"./appearance-D9ltCB_v.js";import{aR as m,aS as j,aT as D}from"./conversation-input-sync-BxH_-j4i.js";let _;function J(e){_=e}function K(e){const n=_===e;return _=void 0,n}const X=({consentText:e,pending:n,failure:s,onTurnOff:a,onDismiss:r,defaultExpanded:d=!1})=>{I();const[c,b]=o.useState(d),u=o.useId(),g=o.useId(),f=n!==null,l=n==="turn_off";return t.jsx("section",{"data-agent-messages-banner":"default-on","aria-label":i("ui.agentMessages.banner.title"),children:t.jsx(E,{variant:"info",className:h(S,"items-start border-transparent"),children:t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-start gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[t.jsx(A,{children:i("ui.agentMessages.banner.title")}),t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.body")})]}),t.jsx(y,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-ink-muted","aria-label":i("ui.agentMessages.banner.dismiss"),disabled:f,onClick:r,"data-agent-messages-banner-action":"dismiss",children:t.jsx(k,{"aria-hidden":"true"})})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(y,{variant:"secondary",size:"sm",disabled:f,onClick:a,"aria-describedby":g,"data-agent-messages-banner-action":"turn_off",children:t.jsxs("span",{className:"grid",children:[t.jsx("span",{className:h("col-start-1 row-start-1",l&&"invisible"),"aria-hidden":l,children:i("ui.agentMessages.banner.turn_off")}),t.jsx("span",{className:h("col-start-1 row-start-1",!l&&"invisible"),"aria-hidden":!l,children:i("ui.agentMessages.banner.turning_off")})]})}),t.jsx(y,{variant:"ghost",size:"sm",className:"text-ink","aria-expanded":c,"aria-controls":c?u:void 0,onClick:()=>b(x=>!x),"data-agent-messages-banner-action":"read",children:c?i("ui.agentMessages.banner.hide"):i("ui.agentMessages.banner.read")}),t.jsx("span",{id:g,className:"text-pretty text-meta text-ink-muted",children:i("ui.agentMessages.banner.turn_off_hint")})]}),c&&t.jsx("section",{id:u,className:"rounded-md bg-sunken p-3 @max-[1024px]/bridge:max-h-[35dvh] @max-[1024px]/bridge:overflow-y-auto focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2","aria-label":i("ui.agentMessages.banner.read"),"data-agent-messages-banner-consent":"",children:e?t.jsx("p",{className:"max-w-prose whitespace-pre-wrap text-body-sm text-ink-muted",children:e}):t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.consent_unavailable")})}),s&&t.jsx("p",{role:"alert",className:"text-body-sm text-ink",children:s==="turn_off"?i("ui.agentMessages.banner.turn_off_failed"):i("ui.agentMessages.banner.dismiss_failed")})]})})})};function q(e,n,s){const a=e?.tenant_id??null;return!N(d=>s&&a?d.defaultOnDismissed[w(s,a)]===!0:!1)&&B(e,n)}function V(e){const{api:n,accountId:s,tenantId:a,markerTenantId:r,onSettings:d,onChanged:c}=e,[b,u]=o.useState(null),[g,f]=o.useState(null),l=o.useRef(!1);async function x(p,O){if(!(l.current||!s)){l.current=!0,u(p),f(null);try{await O()}catch{f(p);return}finally{l.current=!1,u(null)}try{await c?.()}catch{}}}return{pending:b,failure:g,turnOff:()=>x("turn_off",async()=>{const p=await n.updateSettings({expected_account_id:s,...a?{tenant_id:a}:{},state:"disabled"});d?.(p)}),dismiss:()=>x("dismiss",async()=>{await n.dismissOnboarding(),s&&r&&N.getState().markDefaultOnDismissed(s,r)})}}const v="lo.teamBridge.scope.v1",P=128;function C(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function M(e){try{const n=JSON.parse(e.getItem(v)??"{}");return C(n)?n:{}}catch{return{}}}function Y(e,n){const s=M(e)[n];if(typeof s!="string")return;if(s===m)return m;const a=s.trim();if(!(!a||a.length>P))return j(a)}function Q(e,n,s){try{const a=M(e);e.setItem(v,JSON.stringify({...a,[n]:s}))}catch{}}function U(e,n){return n===m?[...e]:e.filter(s=>s.tenant_id===n)}function W({organizations:e,stored:n,requestedTenant:s,chosen:a,current:r,snapshotRows:d}){return s?j(s):a?r:e.length===1?e[0].tenantId:n!==void 0&&(n===m||e.some(c=>c.tenantId===n))?n:e.length>1?m:D(e,r,a,d)}export{X as D,v as S,V as a,Y as b,W as c,K as d,J as r,U as s,q as u,Q as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-
|
|
1
|
+
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-di_s04Km.js";import{d as nt}from"./arc-BXROWqfO.js";import"./conversation-input-sync-BxH_-j4i.js";import"./index-DbYAjJtZ.js";import"./messages-BOFOVo9w.js";import"./appearance-D9ltCB_v.js";import"./roles-D1pcbxAx.js";import"./error-boundary-CpC5mJlj.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c,c as p,r as $}from"./index-
|
|
1
|
+
import{j as c,c as p,r as $}from"./index-DbYAjJtZ.js";import{c as d,u as T,i as Q}from"./error-boundary-CpC5mJlj.js";import{t as i}from"./messages-BOFOVo9w.js";import{cy as E,cv as H,cz as V,bu as M,bv as A,ay as S,c6 as B,b5 as N,c7 as P}from"./conversation-input-sync-BxH_-j4i.js";import{bk as Y,bl as Z,bm as G,bn as W,bo as X,bp as J,bq as ee,br as K}from"./index-YSSL7S4C.js";import{B as te}from"./book-open-6C6zIo02.js";import{t as C,n as ae,a as v,g as ne,e as w,h as D,i as q,j as I,f as L}from"./en-US-CW_dDnkH.js";import{h as se,u as _,s as oe,y as ie}from"./appearance-D9ltCB_v.js";import{b as re,l as ce}from"./publication-validation-BAG4HOS-.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/assets/{use-session-snapshot-BGgV5JES.js → use-session-snapshot-DE4-f8hJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c}from"./appearance-
|
|
1
|
+
import{d as c}from"./appearance-D9ltCB_v.js";import{r as n}from"./index-DbYAjJtZ.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-di_s04Km.js";import{o as kt,n as Tt,q as Rt}from"./conversation-input-sync-BxH_-j4i.js";import"./index-DbYAjJtZ.js";import"./messages-BOFOVo9w.js";import"./appearance-D9ltCB_v.js";import"./roles-D1pcbxAx.js";import"./error-boundary-CpC5mJlj.js";var at=function(){var t=n(function(B,r,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=r);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],h=[1,36],D=[1,37],N=[1,43],yt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,l,c,u,y,a,X){var x=a.length-1;switch(y){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(m,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:39,13:38,24:N,27:yt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:yt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:h,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:n(function(r){var l=this,c=[0],u=[],y=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(r,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,y.length=y.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),y.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=y[y.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],y,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),y=y.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),y.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var l=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
http-equiv="Content-Security-Policy"
|
|
22
22
|
content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'none'; font-src 'none'; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"
|
|
23
23
|
/>
|
|
24
|
-
<script type="module" crossorigin src="./assets/approvalsOverlay-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
24
|
+
<script type="module" crossorigin src="./assets/approvalsOverlay-BZB3HD2h.js"></script>
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BOFOVo9w.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
27
27
|
<link rel="stylesheet" crossorigin href="./assets/approvalsOverlay-CAjdhWyk.css">
|
|
28
28
|
</head>
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
<title>Local Operator Console Capture</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/consoleCapture-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-BP7oATnc.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BOFOVo9w.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-DbYAjJtZ.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-D9ltCB_v.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror--tzRIcEs.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
16
16
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-C58ni4_c.css">
|
|
17
17
|
</head>
|
package/out/renderer/index.html
CHANGED
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
<meta http-equiv="Content-Security-Policy"
|
|
42
42
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
43
43
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
44
|
-
<script type="module" crossorigin src="./assets/index-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-YSSL7S4C.js"></script>
|
|
45
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BOFOVo9w.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="./assets/index-DbYAjJtZ.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
50
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
51
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror
|
|
48
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-D9ltCB_v.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-CpC5mJlj.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BxH_-j4i.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror--tzRIcEs.js">
|
|
52
52
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
53
53
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-BmGWvjex.css">
|
|
54
54
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-C58ni4_c.css">
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
9
9
|
<meta http-equiv="Content-Security-Policy"
|
|
10
10
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/installer-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-Cn0-OumE.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BOFOVo9w.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/index-DbYAjJtZ.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-CpC5mJlj.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
16
16
|
</head>
|
|
17
17
|
|
package/out/renderer/mini.html
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
<title>Local Operator Quick Send</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/mini-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-Cj2W_Me4.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-BOFOVo9w.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-DbYAjJtZ.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/roles-D1pcbxAx.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/appearance-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary
|
|
15
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/appearance-D9ltCB_v.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-CpC5mJlj.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BxH_-j4i.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-DE4-f8hJ.js">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/index-xOFm2yrV.css">
|
|
18
18
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-BmGWvjex.css">
|
|
19
19
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.12",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as B}from"./index-IJLdoh2_.js";import{s as Ss,N as Cs,h as Ps,d as ut,a as Ts,c as Ve,r as ct,u as ot,ai as dt,f as Ge,aj as mt,t as ht}from"./appearance-DZQCtGzt.js";import{P as xt}from"./page-header-CrTly4cs.js";import{c as bt,u as U,w as ue,B as _,f as O,J as pt,h as gt,K as Te,T as Is,n as Oe,o as Fe,y as ze,p as De,z as Me,F as qe,A as xe,q as be,x as pe,N as ft,O as jt,P as kt,Q as yt,R as ns,U as ls,V as rs,W as us,Y as cs}from"./error-boundary--DgTWGAQ.js";import{bu as Je,bx as os,c4 as vt,c5 as Rs,b5 as Qe,bv as Nt,c6 as _t,ay as wt,c7 as St,T as As,bC as Es,c8 as Se,c9 as Ct,ca as Pt}from"./conversation-input-sync-59C2VH9z.js";import{t as s}from"./messages-CqvhgjgC.js";import{a as Tt,p as Ls,P as ce,u as It}from"./publication-validation-BsdGPymf.js";import{h as ne,O as Rt,A as At,c as Os,a as Et,b as Lt,d as Ot,e as Fs,C as Ft,n as zt,u as Dt,i as Mt}from"./use-download-agent-mutation-D_BdjsyK.js";import{H as qt}from"./heart-K9BBaPRd.js";import{x as $t,aY as Ut,aZ as Ht,a_ as Bt,a$ as zs,b0 as Vt,b1 as Qt,y as Wt,D as Kt,E as ds,T as ms,b2 as Gt,b3 as Jt,L as Yt,t as Xt,b4 as Zt}from"./index-CCtgdHHn.js";import{u as Ds,s as ea,a as sa,n as ta,b as aa,i as ia,H as na,p as hs,c as Ms,h as xs,d as la,e as ra,f as ua,g as ca,j as oa,k as da,l as bs,m as ps,o as gs,q as fs,S as js,r as ma,t as ha,v as xa,w as qs,x as $s,P as Us,y as ba,z as pa}from"./org-access-BsT6ienF.js";import{R as Hs}from"./radient-auth-buttons-VAvFX8bW.js";import{o as ga,a as $e}from"./org-surface-gate-Bp50tkVp.js";import{B as fa}from"./building-2-DnSBO_7V.js";import"./roles-D1pcbxAx.js";import"./book-open-Cc4Qb21L.js";import"./en-US-CW_dDnkH.js";import"./console-mirror-Be1UXdZX.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ja=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],ka=bt("circle-ellipsis",ja),ya=({agent:t,isLiked:a,isFavourited:i,onLikeToggle:n,onFavouriteToggle:u,onDownload:h,isLikeActionLoading:x=!1,isFavouriteActionLoading:f=!1,isDownloading:b=!1,actionError:j=null,onRetryAction:T,showActions:w=!0,viewerStateKnown:c=!0,orgName:o=null})=>{U();const E=Ss(),{isAuthenticated:k}=Je();U();const C=t.description??"",[I,z]=l.useState(!1),R=l.useRef(null),y=l.useCallback(L=>{if(R.current?.disconnect(),R.current=null,!L)return;const A=()=>z(L.scrollHeight-L.clientHeight>1);A();const V=new ResizeObserver(A);V.observe(L),R.current=V},[]),F=k?c?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unknown"):s("ui.hub.viewer.like_signed_out"),N=k?c?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unknown"):s("ui.hub.viewer.favourite_signed_out"),g=c?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unavailable"),v=c?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unavailable"),d=t.visibility==="org",p=ne(t.name);return e.jsxs("div",{"data-glass-block":"",className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>E(`/agent-hub/${t.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":s("ui.hub.card.view_details",{name:p}),children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:p}),d&&e.jsx(Rt,{orgName:o}),e.jsx(ue,{content:I?C:"",children:e.jsx("span",{ref:y,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:C})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(At,{tags:t.tags,categories:t.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[t.account_metadata?.name??s("ui.hub.card.unknown_author"),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.pages.card.updated",{when:Os(new Date(t.updated_at))})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-0.5","data-viewer-state":d?"org":k?c?"known":"unknown":"signed-out",children:[!d&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{content:F,children:e.jsx("span",{children:e.jsxs(_,{variant:"ghost",size:"sm",onClick:k&&c?()=>n(t.id):void 0,disabled:x||!k||!c,"aria-label":g,className:B(a&&"text-danger"),children:[e.jsx(qt,{fill:a?"currentColor":"none","data-testid":"agent-like-heart"}),e.jsx("span",{"data-testid":"agent-like-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.like_count??0})]})})}),e.jsx(ue,{content:N,children:e.jsx("span",{children:e.jsxs(_,{variant:"ghost",size:"sm",onClick:k?()=>u(t.id):void 0,disabled:f||!k||!c,"aria-label":v,className:B(i&&"text-warning"),children:[e.jsx($t,{fill:i?"currentColor":"none","data-testid":"agent-favourite-star"}),e.jsx("span",{"data-testid":"agent-favourite-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.favourite_count??0})]})})})]}),e.jsx(ue,{content:s("ui.hub.card.downloads_tooltip"),children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(os,{"aria-hidden":"true",className:"size-3.5"}),e.jsx("span",{className:"inline-flex h-4 min-w-6 items-center font-mono text-mono-sm",children:b?e.jsx(O,{className:"h-3 w-6"}):(t.download_count??0).toLocaleString()})]})})]}),w&&h&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(_,{variant:"secondary",size:"sm",onClick:()=>h(t),disabled:b,"aria-label":s("ui.hub.card.download_named",{name:p}),"data-tour-tag":"agent-hub-download-button",children:[e.jsx(os,{"data-testid":"agent-download"}),s("ui.hub.pages.card.get")]})})]}),j&&e.jsxs("output",{"data-testid":"agent-card-error",className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2 text-body-sm text-danger",children:[e.jsx("span",{className:"min-w-0 flex-1",children:j}),T&&e.jsx(_,{variant:"ghost",size:"sm",onClick:T,children:s("ui.common.actions.retry_again")})]})]})},va=({agent:t,status:a,viewerStateKnown:i=!0,orgName:n=null})=>{const{isAuthenticated:u}=Je(),[h,x]=l.useState(null),f=a?.liked??!1,b=a?.favourited??!1,j=Et(),T=Lt(),w=Ot(),c=()=>{!u||j.isPending||(x(null),j.mutate({agentId:t.id,isCurrentlyLiked:f},{onError:()=>x("like")}))},o=()=>{!u||T.isPending||(x(null),T.mutate({agentId:t.id,isCurrentlyFavourited:b},{onError:()=>x("favourite")}))},E=()=>{w.isPending||(x(null),w.mutate({agentId:t.id,agentName:t.name},{onError:()=>x("download")}))},k=h?h==="like"?{action:"like",error:j.error,retry:c}:h==="favourite"?{action:"favourite",error:T.error,retry:o}:{action:"download",error:w.error,retry:E}:null;return e.jsx(ya,{agent:t,isLiked:u&&f,isFavourited:u&&b,onLikeToggle:c,onFavouriteToggle:o,onDownload:E,isLikeActionLoading:j.isPending,isFavouriteActionLoading:T.isPending,isDownloading:w.isPending,viewerStateKnown:i,orgName:n,actionError:k?Tt(k.action,k.error,ne(t.name)):null,onRetryAction:k?.retry})},ks=({selected:t,onClick:a,children:i,...n})=>e.jsx("button",{type:"button",onClick:a,"aria-pressed":t,className:B("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",t?Ht:"text-ink hover:bg-row-hover"),...n,children:i}),ys=Object.keys(Ft),Na=t=>[...t].sort((a,i)=>{const n=ys.indexOf(a),u=ys.indexOf(i);return n!==-1&&u!==-1?n-u:n!==-1?-1:u!==-1?1:a.localeCompare(i)}),_a=({selectedCategory:t,onSelectCategory:a,categories:i})=>{U();const n=Na(t&&!i.includes(t)?[...i,t]:i);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:s("ui.hub.taxonomy.heading")}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ks,{selected:t===null,onClick:()=>a(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(Ut,{size:16,"aria-hidden":"true"})}),s("ui.hub.taxonomy.all")]}),n.map(u=>{const h=Fs(u),x=u==="other"?e.jsx(ka,{size:16}):h.icon;return e.jsxs(ks,{selected:t===u,onClick:()=>a(u),"data-testid":`category-${u}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:x}),h.label]},u)})]})]})},Ye=({page:t,count:a,onChange:i,ariaLabel:n})=>{U();const u=l.useRef(null),h=l.useRef(null),x=l.useRef(null);return l.useEffect(()=>{const f=x.current;x.current=null,f==="previous"&&u.current?.focus(),f==="next"&&h.current?.focus()},[t]),a<=1?null:e.jsxs("nav",{"aria-label":n??s("ui.hub.pages.pager.nav_aria"),className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsx("span",{className:"select-none text-meta text-ink-dim",children:s("ui.common.forms.pagination.position",{page:String(t),count:String(a)})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_,{variant:"secondary",size:"sm",ref:u,onClick:()=>{t-1<=1&&(x.current="next"),i(t-1)},disabled:t<=1,"aria-label":s("ui.common.forms.compact_pagination.previous_page"),children:[e.jsx(vt,{"aria-hidden":"true"}),s("ui.hub.pages.pager.previous")]}),e.jsxs(_,{variant:"secondary",size:"sm",ref:h,onClick:()=>{t+1>=a&&(x.current="previous"),i(t+1)},disabled:t>=a,"aria-label":s("ui.common.forms.compact_pagination.next_page"),children:[s("ui.hub.pages.pager.next"),e.jsx(pt,{"aria-hidden":"true"})]})]})]})},wa=/alias/i;function _e(t){return t instanceof Cs?t.code==="alias-occupied"?!0:t.code==="origin-conflict"&&wa.test(t.message):!1}const Sa={same:"ui.hub.adoption.file_same","hub-only":"ui.hub.adoption.file_hub","local-only":"ui.hub.adoption.file_local","kept-local":"ui.hub.adoption.file_local","taken-hub":"ui.hub.adoption.file_hub",merged:"ui.hub.adoption.file_merged","set-aside":"ui.hub.adoption.file_aside","needs-choice":"ui.hub.adoption.file_choice",carried:"ui.hub.adoption.file_carried","not-installed":"ui.hub.adoption.file_not_adopted",relocated:"ui.hub.adoption.file_relocated"};function Ca(t){return Sa[t]??"ui.hub.adoption.file_review"}function Ue({text:t,diff:a=!1}){return e.jsx("pre",{className:"max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded border border-hairline bg-surface p-3 font-mono text-body-sm text-ink",children:t||(a?s("ui.hub.adoption.no_difference"):"")})}function Pa({state:t,allowLlm:a,onAllowLlm:i,onPreview:n,onConfirm:u,onCancel:h}){U();const x=l.useId(),{preview:f,pending:b,applied:j,error:T}=t,w=f?.adoption.state==="needs-choice";return j?e.jsxs("div",{"aria-live":"polite",className:"space-y-2 text-body-sm text-success",children:[e.jsx("p",{children:s("ui.hub.adoption.applied")}),f&&e.jsx("p",{className:"break-all text-ink-muted",children:s("ui.hub.adoption.snapshot",{path:f.snapshot.path})}),e.jsx(_,{variant:"outline",onClick:h,children:s("ui.hub.adoption.done")})]}):e.jsxs("section",{"aria-label":s("ui.hub.adoption.title"),className:"min-w-0 space-y-4 rounded border border-warning-border p-4","data-testid":"hub-skill-adoption",children:[e.jsx("h3",{className:"text-body font-medium text-ink",children:s("ui.hub.adoption.title")}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.preservation")}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(gt,{id:x,checked:a,disabled:b||!!f,onCheckedChange:c=>i(c===!0)}),e.jsx("label",{htmlFor:x,className:"text-body-sm text-ink",children:s("ui.hub.adoption.model_consent")})]}),b&&e.jsx("p",{"aria-live":"polite",className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.loading")}),T&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s(T==="stale"?"ui.hub.adoption.stale":"ui.hub.adoption.failed")}),f&&e.jsxs("div",{className:"min-w-0 space-y-4",children:[e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.snapshot",{path:f.snapshot.path})}),f.adoption.model&&e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.model",{model:f.adoption.model})}),f.adoption.warnings?.map((c,o)=>e.jsx("p",{className:"text-body-sm text-warning",children:c},`${o}-${c}`)),w&&e.jsx("p",{"aria-live":"polite",className:"text-body-sm text-warning",children:s("ui.hub.adoption.needs_choice")}),f.adoption.files.map(c=>e.jsxs("article",{className:"min-w-0 space-y-3 border-t border-hairline pt-4",children:[e.jsx("h4",{className:"break-all font-mono text-body-sm text-ink",children:c.path}),c.local_path&&c.local_path!==c.path&&e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.local_path",{path:c.local_path})}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:s(Ca(c.action))}),c.kept&&e.jsx("dl",{className:"space-y-1 text-body-sm text-ink-muted",children:["local","hub","combined","unresolved"].map(o=>c.kept?.[o]?.length?e.jsxs("div",{children:[e.jsx("dt",{className:"font-medium",children:s(`ui.hub.adoption.kept_${o}`)}),e.jsx("dd",{className:"whitespace-pre-wrap break-words",children:c.kept[o].join(`
|
|
7
|
-
`)})]},o):null)}),e.jsx("h5",{className:"text-body-sm font-medium text-ink",children:s("ui.hub.adoption.proposed")}),c.proposed===null?e.jsx("p",{className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.no_proposal")}):e.jsx(Ue,{text:c.proposed}),e.jsxs("details",{open:!0,children:[e.jsx("summary",{className:"cursor-pointer text-body-sm text-ink",children:s("ui.hub.adoption.diff_local")}),e.jsx(Ue,{diff:!0,text:c.diff_vs_local})]}),e.jsxs("details",{open:!0,children:[e.jsx("summary",{className:"cursor-pointer text-body-sm text-ink",children:s("ui.hub.adoption.diff_hub")}),e.jsx(Ue,{diff:!0,text:c.diff_vs_hub})]})]},c.path))]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(_,{variant:"outline",disabled:b,onClick:()=>n(f?.adoption.strategy==="equal"?"merge":f?.adoption.strategy??"merge"),children:s(f||T?"ui.hub.adoption.repreview":"ui.hub.adoption.preview")}),w&&e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"outline",disabled:b,onClick:()=>n("keep-local"),children:s("ui.hub.adoption.keep_local")}),e.jsx(_,{variant:"outline",disabled:b,onClick:()=>n("take-hub"),children:s("ui.hub.adoption.take_hub")})]}),f&&e.jsx(_,{disabled:b||!!T||w,onClick:u,children:s("ui.hub.adoption.confirm")}),e.jsx(_,{variant:"ghost",disabled:b,onClick:h,children:s("ui.hub.adoption.cancel")})]})]})}function Ta({input:t,onClose:a}){const i=Ds({retry:0}),[n,u]=l.useState(null),[h,x]=l.useState("merge"),[f,b]=l.useState(!1),[j,T]=l.useState(null),[w,c]=l.useState(!1),o=l.useRef(""),E=I=>T(I instanceof Cs&&I.code==="adoption-preview-changed"?"stale":"failed"),k=I=>{T(null),u(null),x(I),i.mutate({...t,requestId:crypto.randomUUID(),dryRun:!0,adoptionStrategy:I,allowLlm:f},{onSuccess:z=>{const R=sa.safeParse(z);if(!R.success){T("failed");return}o.current=crypto.randomUUID(),u(R.data)},onError:E})},C=()=>{!n||n.adoption.state==="needs-choice"||j||i.isPending||i.mutate({...t,requestId:o.current,dryRun:!1,confirm:!0,adoptionReceipt:n.adoption_receipt,adoptionStrategy:h,allowLlm:f},{onSuccess:I=>{ea(I)?c(!0):T("failed")},onError:E})};return e.jsx(Pa,{state:{preview:n,pending:i.isPending,applied:w,error:j},allowLlm:f,onAllowLlm:b,onPreview:k,onConfirm:C,onCancel:a})}function Ia({scope:t,source:a,verifiedCas:i,enabled:n=!0,heading:u=!0}){U();const h=l.useId(),[x,f]=l.useState(""),[b,j]=l.useState(""),[T,w]=l.useState(ta),[c,o]=l.useState(null),[E,k]=l.useState(!1),C=aa(),I=l.useRef(null),z=Ps({queryKey:["desktop","skills","hub-publication"],queryFn:()=>ut({op:"skills.list"}),staleTime:3e4,retry:!1}),R=`${t.visibility}:${t.tenantId??""}`,y=l.useRef(R);l.useEffect(()=>{y.current!==R&&(y.current=R,w(v=>({...v,autoPush:!1,confirmPublicEgress:!1})),o(null),k(!0))},[R]);const F={sourceSkill:x,localAlias:b,visibility:t.visibility,tenantId:t.tenantId,...T},N=c?ia(c,F):!1;l.useEffect(()=>{if(!c)return;const v=setTimeout(()=>{o(null),k(!0)},Math.max(0,Math.min(Date.parse(c.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(v)},[c]);const g=v=>{if(!n||C.isPending||!x||!b||v&&!N)return;const d=JSON.stringify({draft:F,receipt:v?c?.preview_receipt:null}),p=I.current&&I.current.tuple===d&&(v||C.error)?I.current:{tuple:d,id:crypto.randomUUID()};I.current=p,v||(o(null),k(!1)),C.mutate({requestId:p.id,draft:F,...v&&c?{previewReceipt:c.preview_receipt}:{}},{onSuccess:L=>{L.preview?(o(L.preview),k(!1)):hs(L)&&o(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[u&&e.jsx("h3",{className:"text-heading text-ink",children:s("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${h}-source`,className:"text-body-sm text-ink",children:s("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${h}-source`,"data-testid":"hub-skill-publish-source",value:x,disabled:C.isPending||!n,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:v=>{f(v.target.value),j(v.target.value),o(null),w(d=>({...d,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:s("ui.hub.skills.select_authored")}),z.data?.data.skills.map(v=>e.jsx("option",{value:v.name,children:v.name},v.name))]}),e.jsx("label",{htmlFor:`${h}-alias`,className:"text-body-sm text-ink",children:s("ui.hub.subscriptions.alias")}),e.jsx(Te,{id:`${h}-alias`,"data-testid":"hub-skill-publish-alias",value:b,disabled:C.isPending||!n,onChange:v=>{j(v.target.value),w(d=>({...d,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.text_limits")}),e.jsx(na,{value:T,onChange:w,source:a,item:x||b,visibility:t.visibility,organization:t.organization,destinationKey:`${R}:${x}`,canEnableAutoPush:i,disabled:C.isPending||!n}),z.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),z.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.status.other_error")}),C.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.links.action_failed",{direction:s("ui.hub.links.direction_push"),item:x||b,source:a})}),(E||c&&!N&&c.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.links.preview_changed")}),c&&c.visibility===t.visibility&&c.tenant_id===t.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.links.preview_payload",{source:a})}),e.jsx(Is,{readOnly:!0,rows:12,"aria-label":s("ui.hub.links.preview_payload",{source:a}),value:JSON.stringify(c.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),c.warnings.map((v,d)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:v},`${d}-${v}`)),c.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:Bt(c.reason)})]}),C.data?.publication===null&&C.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:s("ui.hub.links.publication_pending")}),C.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:hs(C.data)?s("ui.hub.links.published",{item:C.data.link?.name??b,source:C.data.link?zs(C.data.link):a}):s("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(_,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!n||C.isPending||!x||!b,onClick:()=>g(!1),children:s("ui.hub.subscriptions.preview_publish")}),e.jsx(_,{"data-testid":"hub-skill-publish-confirm",disabled:!n||C.isPending||!N,onClick:()=>g(!0),children:s("ui.hub.links.confirm_publish")})]})]})}function vs(t,a){const i=t.publisher?.trim();return i?s("ui.hub.skills.published_by",{publisher:i}):t.visibility==="org"?a??s("ui.hub.links.source_unavailable"):s("ui.hub.skills.public_hub")}function Ra({scope:t,signedIn:a,accessible:i=!0}){U();const n=l.useId(),[u,h]=l.useState(1),[x,f]=l.useState(""),[b,j]=l.useState(null),[T,w]=l.useState(!1),[c,o]=l.useState("unsubscribe"),[E,k]=l.useState(!1),C=l.useRef(null),I=t.visibility==="public"?s("ui.hub.links.source_public"):t.organization?s("ui.hub.links.source_private",{organization:t.organization}):s("ui.hub.links.source_unavailable"),z=Ts(),R=i&&Ve(z.data,"hub_updates"),y=Ms(t,u,i&&(t.visibility==="public"||a)),F=xs(y.data?.contract),N=la(t,b,F&&i),g=Ds(),[v,d]=l.useState(null),p=ra(),L=ua(),A=Vt(),V=_e(p.error)&&p.variables?{...p.variables,subscribe:!0,autoPush:!1,consent:!1}:_e(g.error)&&g.variables?g.variables:null,D=Qt(i&&Ve(z.data,"hub_links")),$=Wt(R),S=l.useMemo(()=>ca(D.data?.links,oa(Qe.radientBaseUrl)),[D.data]),M=l.useMemo(()=>Kt($.data),[$.data]),oe=g.data?.link?.link_id,ae=!D.isLoading&&!D.error,ge=D.error?s("ui.hub.skills.inventory_unknown"):s("ui.hub.links.loading"),de=N.data?.visibility===t.visibility&&(t.visibility==="public"?!N.data.tenant_id:N.data.tenant_id===t.tenantId),se=i&&!N.error&&!y.error&&de&&xs(N.data?.sync_contract)&&!!N.data?.revision,me=(y.data?.rows??[]).filter(m=>da(m,t)),fe=me.filter(m=>`${m.name} ${m.description}`.toLocaleLowerCase().includes(x.toLocaleLowerCase())),Y=me.find(m=>m.id===b),P=Y?S.get(bs({id:Y.id,visibility:Y.visibility,tenantId:Y.tenant_id??null})):void 0,je=P?M.get(ds("skill",P.name)):void 0,ke=ps(P,je,ae),Q=P?ms(P)==="present":!1,Ie=m=>{const q=S.get(bs({id:m.id,visibility:m.visibility,tenantId:m.tenant_id??null})),Z=q?M.get(ds("skill",q.name)):void 0;return{link:q,update:Z,state:ps(q,Z,ae)}},he=m=>(C.current?.tuple!==m&&(C.current={tuple:m,id:crypto.randomUUID()}),C.current.id),W=m=>{if(!b||!se||!a)return;const q=m?.name??Y?.name??"";if(!q)return;p.reset();const Z=m?m.policy.subscribe:!1,re=m?.policy.auto_push??!1,ve=!1;g.mutate({requestId:he(ha({selected:b,scope:t,localAlias:q,subscribe:Z,autoPush:re,consent:ve})),remoteId:b,scope:t,alias:q,subscribe:Z,autoPush:re,consent:ve})},X=()=>{if(!b||!se||!a)return;if(xa(P)==="policy"&&P){if(P.policy.subscribe||A.isPending)return;o("subscribe"),A.mutate({link:P,patch:{subscribe:!0}});return}const m=Y?.name??"";m&&(g.reset(),p.mutate({requestId:he(JSON.stringify({op:"subscribe",selected:b,scope:t,localAlias:m})),remoteId:b,scope:t,alias:m}))},ye=()=>{P&&L.mutate({requestId:he(JSON.stringify({op:"unpull",link:P.link_id})),linkId:P.link_id},{onSuccess:()=>{g.reset(),p.reset()}})},K=()=>{!P||P.policy.subscribe===!1||A.isPending||!A.canWrite||(o("unsubscribe"),A.mutate({link:P,patch:{subscribe:!1}}))},te=a&&F&&i&&!y.error,ie=y.data?.total??me.length,le=y.error?null:y.isLoading?s("ui.hub.skills.loading"):t.organization?s("ui.hub.skills.count_shared",{count:ie,organization:t.organization}):s("ui.hub.skills.count",{count:ie});return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skills-library":!0,children:[t.visibility==="org"&&!a?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Rs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(Te,{id:`${n}-search`,type:"search","data-testid":"hub-skill-search",value:x,placeholder:s("ui.hub.skills.search"),"aria-label":s("ui.hub.skills.search"),onChange:m=>f(m.target.value),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none"})]}),te&&e.jsx(_,{variant:"secondary","data-testid":"hub-skill-publish-open",onClick:()=>k(!0),children:s("ui.hub.skills.publish_title")})]}),le!==null&&e.jsx("p",{"aria-live":"polite",className:"text-meta text-ink-dim","data-testid":"hub-skill-status",children:t.organization||y.isLoading?e.jsx("span",{"data-testid":"hub-skill-source",children:le}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:le})," · ",e.jsx("span",{"data-testid":"hub-skill-source",children:s("ui.hub.skills.public_hub")})]})}),y.error&&e.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:s("ui.hub.skills.catalogue_failed",{source:I})}),e.jsx(_,{variant:"outline",className:"self-start",disabled:y.isFetching,onClick:()=>void y.refetch(),children:s("ui.hub.links.retry")})]}),y.isSuccess&&!F&&e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")}),F&&e.jsxs(e.Fragment,{children:[fe.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:s(x?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("ul",{className:"grid list-none grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6 p-0",children:fe.map(m=>{const q=Ie(m),Z=gs(q.state,q.update,q.link?ms(q.link)==="present":!1);return e.jsx("li",{className:"min-w-0",children:e.jsxs("button",{type:"button","aria-haspopup":"dialog","aria-expanded":b===m.id,"aria-label":s("ui.hub.skills.open_detail",{item:m.name}),"data-testid":"hub-skill-open","data-skill-id":m.id,"data-skill-state":q.state.kind,onClick:()=>{j(m.id),g.reset(),p.reset(),L.reset(),A.reset()},className:B("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface text-left","transition-colors duration-fast ease-out-quart hover:bg-elevated","focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-1"),children:[e.jsxs("span",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx("span",{className:"truncate font-medium text-heading text-ink",children:m.name}),m.description?e.jsx("span",{className:"line-clamp-3 text-body-sm text-ink-muted",children:m.description}):null,e.jsx("span",{className:"mt-auto truncate text-ink-dim text-meta",children:vs(m,t.organization)})]}),e.jsxs("span",{className:"flex items-center justify-between gap-2 border-t border-hairline px-4 py-2 text-meta",children:[e.jsx("span",{className:"truncate text-ink-muted",children:fs(q.state,ge)}),e.jsx(js,{mark:Z})]})]})},m.id)})}),e.jsx(Ye,{page:u,count:y.data?.pages??1,onChange:h,ariaLabel:s("ui.hub.skills.title")})]})]}),!i&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.access_lost")}),e.jsx(Oe,{open:!!b&&F,onOpenChange:m=>{m||(j(null),d(null),g.reset(),p.reset())},children:e.jsxs(Fe,{"data-hub-skill-detail":"",className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(ze,{children:[e.jsx(De,{"data-testid":"hub-skill-detail-name",children:N.data?.name??Y?.name??s("ui.hub.skills.title")}),e.jsx(Me,{children:N.data&&de?vs(N.data,t.organization):I})]}),N.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),N.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.other_error")}),N.data&&de&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-body-sm text-ink-muted",children:[fs(ke,ge),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.skills.revision",{revision:String(N.data.content_revision)})]}),e.jsx(js,{mark:gs(ke,je,Q)})]}),e.jsx("p",{"data-testid":"hub-skill-description",className:"max-w-3xl select-text whitespace-pre-wrap break-words text-body-sm text-ink-muted",children:N.data.description}),P&&Q&&P.local_path&&e.jsx("p",{"data-testid":"hub-skill-local-path",className:"break-words font-mono text-meta text-ink-dim",children:s("ui.hub.skills.local_path",{path:`${P.local_path}`})}),e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.skills.files")}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.file_count",{count:N.data.files.length})}),N.data.files.map(m=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:m.path}),e.jsx(Is,{readOnly:!0,rows:12,"aria-label":m.path,value:m.content,className:"max-h-96 bg-sunken text-mono-sm"})]},m.path)),P&&e.jsxs("div",{className:"flex flex-col gap-2 border-t border-hairline pt-3",children:[e.jsx(Gt,{link:P}),P.policy.subscribe&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(_,{variant:"outline",size:"sm","data-testid":"hub-skill-unsubscribe",disabled:A.isPending||!A.canWrite,onClick:K,children:s("ui.hub.skills.unsubscribe")}),e.jsx("span",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.unsubscribe_help")})]}),A.error&&e.jsx("p",{role:"alert",className:"text-meta text-danger",children:s("ui.hub.subscriptions.save_failed",{setting:c==="subscribe"?s("ui.hub.subscriptions.subscribe"):s("ui.hub.skills.unsubscribe"),source:I})})]}),P&&Q&&e.jsx(ma,{kind:"skill",name:P.name,enabled:R}),g.error&&!v&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s(_e(g.error)?"ui.hub.skills.local_exists":"ui.hub.skills.pull_failed")}),!v&&V&&e.jsx(_,{variant:"outline",onClick:()=>d(V),children:s("ui.hub.adoption.review")}),v&&e.jsx(Ta,{input:v,onClose:()=>{d(null),g.reset(),p.reset()}}),g.data&&!g.data.reports?.some(m=>m.applied||m.outcome==="unchanged")&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s("ui.hub.skills.pull_failed")}),g.data?.link&&g.data.reports?.some(m=>m.link_id===oe&&m.direction==="pull"&&m.applied)&&e.jsx("output",{"data-testid":"hub-skill-installed",className:"text-body-sm text-ink",children:s("ui.hub.skills.installed_alias",{item:g.data.link.name,source:zs(g.data.link)})}),L.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-unpull-failed",children:s("ui.hub.skills.unpull_failed")}),p.error&&!v&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-subscribe-failed",children:s(_e(p.error)?"ui.hub.skills.local_exists":"ui.hub.skills.subscribe_failed")}),!a&&e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.status.no_credential")}),!v&&(!P||!Q)&&e.jsxs(qe,{className:"flex-row flex-wrap justify-start gap-2",children:[e.jsx(_,{"data-testid":"hub-skill-download",disabled:!a||!se||g.isPending||!ae,"aria-label":s("ui.hub.skills.pull_title",{item:N.data.name,source:I}),onClick:()=>W(P),children:s("ui.hub.skills.download")}),!P?.policy.subscribe&&e.jsx(_,{variant:"outline","data-testid":"hub-skill-subscribe",disabled:!a||!se||!ae||p.isPending||A.isPending||(P?!A.canWrite:!1),onClick:X,children:s("ui.hub.subscriptions.subscribe")})]}),P&&Q&&e.jsx(qe,{className:"flex-row flex-wrap justify-start gap-2",children:e.jsx(_,{variant:"outline","data-testid":"hub-skill-unpull",disabled:L.isPending,onClick:()=>{L.reset(),w(!0)},children:s("ui.hub.skills.unpull")})}),!v&&(!P||!Q)&&e.jsx("p",{className:"text-meta text-ink-muted",children:P?.policy.subscribe?s("ui.hub.skills.download_help"):s("ui.hub.skills.subscribe_help")})]})]})}),e.jsx(Oe,{open:T,onOpenChange:m=>{m||w(!1)},children:e.jsxs(Fe,{className:"sm:max-w-md",children:[e.jsxs(ze,{children:[e.jsx(De,{children:s("ui.hub.skills.unpull_title",{item:N.data?.name??P?.name??""})}),e.jsx(Me,{children:s("ui.hub.skills.unpull_body")})]}),e.jsxs(qe,{children:[e.jsx(_,{variant:"outline",onClick:()=>w(!1),children:s("ui.hub.subscriptions.cancel")}),e.jsx(_,{"data-testid":"hub-skill-unpull-confirm",disabled:L.isPending,onClick:()=>{ye(),w(!1)},children:s("ui.hub.skills.unpull")})]})]})}),e.jsx(Oe,{open:E,onOpenChange:k,children:e.jsxs(Fe,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(ze,{children:[e.jsx(De,{children:s("ui.hub.skills.publish_title")}),e.jsx(Me,{children:I})]}),e.jsx(Ia,{scope:t,source:I,verifiedCas:F&&i&&a,enabled:F&&i&&a,heading:!1})]})})]})}const Bs={all:["org-teams"],list:t=>[...Bs.all,"list",t]},Vs=({tenantId:t,enabled:a=!0})=>{const i=Ps({queryKey:Bs.list(t??""),queryFn:async()=>(await Jt(t)).result??{teams:[]},enabled:a&&!!t,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:ct});return{...i,teams:i.data?.teams??[]}},Aa=(t,a)=>{const i=t?.name?.trim()||a?.trim()||"Team",n=t?.renamed_from?.trim()||null;return t?.invalid_name===!0&&n?{level:"warning",message:s("ui.notices.hub.team_pulled_renamed",{stored:i,published:n})}:n?{level:"success",message:s("ui.notices.hub.team_pulled_collision",{stored:i,published:n})}:{level:"success",message:s("ui.notices.hub.team_pulled",{name:i})}},Qs=()=>{const t=ot();return Nt({mutationFn:async({teamId:a,tenantId:i})=>{if(!Qe.baseUrl)throw new Error("Local Operator API URL is not configured.");return St.pullOrgTeamFromRadient(Qe.baseUrl,a,i)},onSuccess:(a,i)=>{const n=Aa(a.result,i.name);n.level==="warning"?_t(n.message):wt(n.message),t.invalidateQueries({queryKey:["desktop","teams"]})},onError:a=>{console.error("Pulling an organization team failed:",a)}})},Ea=/^v/i,Ws=t=>t.members.reduce((a,i)=>a+i.count,0),La=t=>t.count>1?`${t.role} ×${t.count}`:t.role,We=t=>t.members.map(La).join(", "),Ks=t=>{const a=(t.version??"").trim().replace(Ea,"").trim();return a===""?null:a},Gs=t=>{const a=t.account_metadata?.name?.trim();return a||null},Oa=t=>{const a=(t.description??"").trim();return a===""?null:a},Ke=240,Fa=Ke/2,za=(t,a)=>{if(a||t.length<=Ke)return t;const i=t.slice(0,Ke),n=i.lastIndexOf(" ");return`${(n>=Fa?i.slice(0,n):i).trimEnd()}…`},Ce=t=>dt(t,{day:"numeric",month:"short",year:"numeric"}),Pe=t=>{if(!t)return null;const a=new Date(t);return Number.isNaN(a.getTime())?null:a},Ns=(t,a,i)=>{const n=i-a.getTime();let u;return n<0?u=Ce(a):n<6e4?u=s("ui.hub.updates.ago.now"):u=Os(a,i),{label:t,when:u,iso:a.toISOString(),exact:Ce(a)}},Da=(t,a=Date.now())=>{const i=Pe(t.updated_at);if(i)return Ns("updated",i,a);const n=Pe(t.created_date);return n?Ns("created",n,a):null},Ma=t=>{const a=Pe(t.created_date),i=Pe(t.updated_at);return{created:a?Ce(a):null,updated:i?Ce(i):null}},qa=t=>t==="role"?s("ui.hub.teams.kind.role"):t==="specialist"?s("ui.hub.teams.kind.specialist"):t,$a=["refresh-hub","retry","sign-in"],Ua=({tenantId:t,orgName:a})=>{const{teams:i,isLoading:n,isFetching:u,isError:h,error:x,refetch:f}=Vs({tenantId:t}),b=qs(x),j=Qs(),[T,w]=l.useState(null),[c,o]=l.useState(null),E=l.useRef(new Map),k=l.useRef(null);l.useEffect(()=>{j.isPending||k.current===null||(E.current.get(k.current)?.focus(),k.current=null)},[j.isPending]);const[C,I]=l.useState(!1),[z,R]=l.useState(()=>new Set),y=(d,p)=>R(L=>{const A=new Set(L);return p?A.add(d):A.delete(d),A}),F=(d,p)=>{d.key!=="Escape"||!z.has(p)||(d.target instanceof Element?d.target:null)?.closest('[data-testid="org-team-pull-error"]')||(y(p,!1),d.currentTarget.querySelector("button[aria-expanded]")?.focus(),d.preventDefault())},N=l.useMemo(()=>{if(!As(j.error))return null;const d=i.find(p=>p.id===T);return Ls({code:j.error.code,message:j.error.message,details:j.error.details},{name:d?.name??s("ui.hub.teams.unnamed_team"),hubAgentId:null,surface:"pull"})},[j.error,T,i]),g=(d,p)=>{switch(d){case"refresh-hub":f();break;case"retry":v(p);break;case"sign-in":I(!0);break}},v=d=>{j.isPending||(k.current=d.id,w(null),o(d.id),j.mutate({teamId:d.id,tenantId:t,name:d.name},{onSettled:()=>o(null),onError:()=>w(d.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":s("ui.hub.teams.org.aria",{org:a??s("ui.hub.pages.scope.org_unnamed")}),"data-testid":"org-teams",children:[n&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(He,{}),e.jsx(He,{}),e.jsx(He,{})]}),!n&&h&&e.jsxs(xe,{variant:b?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(be,{children:b==="plan"?s("ui.hub.teams.org.plan_headline"):b==="no_access"?s("ui.hub.teams.org.no_access_headline"):s("ui.hub.teams.org.load_headline")}),e.jsx(pe,{children:b==="plan"?s("ui.hub.teams.org.plan_body",{org:a??s("ui.hub.pages.scope.org_unnamed")}):b==="no_access"?s("ui.hub.teams.org.no_access_body",{org:a??s("ui.hub.teams.org.that_organization")}):Ge(s("ui.hub.teams.org.unreadable"),x)}),b!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(_,{variant:"primary",size:"sm",onClick:()=>void f(),disabled:u,"aria-busy":u,children:u?s("ui.hub.teams.public.trying"):ce.retry})})]}),!n&&!h&&i.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:s("ui.hub.teams.org.empty",{org:a??s("ui.hub.pages.scope.org_unnamed")})}),!n&&!h&&i.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:i.map(d=>e.jsxs("li",{className:B(Js,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:p=>F(p,d.id),children:[e.jsx(Es,{className:"min-w-0",open:z.has(d.id),onOpenChange:p=>y(d.id,p),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(Va,{team:d,expanded:z.has(d.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(_,{ref:p=>{p?E.current.set(d.id,p):E.current.delete(d.id)},variant:"secondary",size:"sm",onClick:()=>v(d),disabled:j.isPending,"aria-label":s("ui.hub.teams.pull_target",{name:ne(d.name)}),children:c===d.id?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")})}),children:e.jsx(Qa,{team:d})}),T===d.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1 pl-5","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:N?.body??j.error?.message??s("ui.hub.teams.pull_failed",{name:ne(d.name)})}),N?.actions.filter(p=>$a.includes(p)).map(p=>e.jsx(_,{variant:"primary",size:"sm",onClick:()=>g(p,d),children:ce[p]},p)),C&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Hs,{titleText:ce["sign-in"],descriptionText:"",onSignInSuccess:()=>{I(!1),w(null),f()}})})]})]},d.id))})]})},Js="px-4 py-3",Ys=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),Ha=({team:t})=>{U();const a=t.manager?.trim(),i=Ws(t);return e.jsxs("span",{className:"block truncate text-meta",children:[a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")})," ",e.jsx("span",{className:"text-ink-muted",children:a})]}):null,a?e.jsx(Ys,{}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:i})})," ",e.jsx("span",{className:"text-ink-muted",children:We(t)})]})]})},Ba=({team:t})=>{U();const a=t.project?.trim(),i=Gs(t),n=Da(t),u=[];return a&&u.push({key:"project",node:a}),i&&u.push({key:"author",node:i}),n&&u.push({key:"recency",node:e.jsx(ue,{content:n.exact,children:e.jsx("time",{dateTime:n.iso,children:n.label==="updated"?s("ui.hub.teams.recency.updated",{when:n.when}):s("ui.hub.teams.recency.created",{when:n.when})})})}),u.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:u.map((h,x)=>e.jsxs("span",{children:[x>0?e.jsx(Ys,{}):null,h.node]},h.key))})},Va=({team:t,expanded:a})=>{U();const i=Oa(t),n=Ks(t);return e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsxs("span",{className:"flex min-w-0 items-baseline",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:ne(t.name)}),n?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",n]}):null]}),i?e.jsxs(e.Fragment,{children:[e.jsx("span",{...Se,"aria-hidden":"true",className:B("mt-1 select-text break-words text-body-sm text-ink-muted",a?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:i}),e.jsx("span",{className:"sr-only",children:za(i,a)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(Ha,{team:t}),e.jsx(Ba,{team:t})]})]})},Qa=({team:t})=>{U();const a=t.manager?.trim(),i=Ma(t),n=[i.created?s("ui.hub.teams.detail.created",{date:i.created}):null,i.updated?s("ui.hub.teams.detail.updated",{date:i.updated}):null].filter(h=>h!==null),u=!!a||t.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[u||n.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.members")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,t.members.map(h=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:h.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:qa(h.kind)}),h.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",h.count]}):null]},`${h.kind}:${h.role}`)),u?null:e.jsx("li",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.no_members")})]})]}):null,n.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:n.join(" · ")}):null]})},He=()=>e.jsxs("div",{className:B(Js,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(O,{className:"h-4.5 w-40"})}),e.jsxs("div",{className:"mt-1 flex h-[2lh] flex-col justify-evenly text-body-sm",children:[e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(O,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(O,{className:"h-3 w-48"})})]}),Xs=(t,a)=>a instanceof Yt?a.message:Ge(t,a),Wa=["refresh-hub","retry","sign-in"],Ka=({signedIn:t,onOpenSettings:a})=>{U();const[i,n]=l.useState(1),[u,h]=l.useState(""),{teams:x,isLoading:f,isFetching:b,isError:j,error:T,refetch:w,pagination:c}=$s({page:i,perPage:Us}),o=Qs(),[E,k]=l.useState(null),[C,I]=l.useState(null),z=l.useRef(new Map),R=l.useRef(null);l.useEffect(()=>{o.isPending||R.current===null||(z.current.get(R.current)?.focus(),R.current=null)},[o.isPending]);const y=zt(u.trim()),F=l.useMemo(()=>y?x.filter(S=>ne(S.name).toLowerCase().includes(y)||(S.description??"").toLowerCase().includes(y)):x,[x,y]),N=S=>{o.isPending||(k(null),I(S.id),R.current=S.id,o.mutate({teamId:S.id,name:S.name},{onSettled:()=>I(null),onError:()=>k(S.id)}))},g=l.useMemo(()=>{if(!As(o.error))return null;const S=x.find(M=>M.id===E);return Ls({code:o.error.code,message:o.error.message,details:o.error.details},{name:S?.name??s("ui.hub.teams.unnamed_team"),hubAgentId:null,surface:"pull"})},[o.error,E,x]),v=g?.body??(mt(o.error)==="unauthorized"?s("ui.hub.teams.public.pull_no_signin"):s("ui.hub.teams.public.pull_failed")),[d,p]=l.useState(!1),L=(S,M)=>{switch(S){case"refresh-hub":w();break;case"retry":N(M);break;case"sign-in":p(!0);break}},A=f&&x.length===0,V=c?.totalRecords??x.length,D=l.useRef(null),$=S=>{const M=u!=="";h(S),M&&S===""&&D.current?.focus()};return e.jsxs("section",{"aria-label":s("ui.hub.teams.public.aria"),className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:s("ui.hub.teams.public.aria")}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:s("ui.hub.teams.public.intro")}),t?null:e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2","data-testid":"agent-hub-public-teams-signed-out",children:[e.jsx("span",{className:"text-meta text-ink-dim",children:s("ui.hub.teams.public.sign_in_hint")}),e.jsx(_,{variant:"secondary",size:"sm",onClick:a,children:s("ui.hub.teams.public.open_settings")})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Rs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(Te,{ref:D,type:"search",value:u,onChange:S=>$(S.target.value),placeholder:s("ui.hub.teams.public.search_placeholder"),"aria-label":s("ui.hub.teams.public.search_aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),A&&e.jsxs("div",{"aria-hidden":"true",className:"flex max-w-4xl flex-col gap-3","data-testid":"agent-hub-public-teams-loading",children:[e.jsx(Be,{}),e.jsx(Be,{}),e.jsx(Be,{})]}),!A&&j&&e.jsxs(xe,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(be,{children:s("ui.hub.teams.public.load_failed")}),e.jsx(pe,{children:Xs(s("ui.hub.teams.public.catalogue_unreadable"),T)}),e.jsx("div",{className:"mt-2",children:e.jsx(_,{variant:"primary",size:"sm",onClick:()=>void w(),disabled:b,"aria-busy":b,children:b?s("ui.hub.teams.public.trying"):s("ui.common.actions.retry_again")})})]}),!A&&!j&&x.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:s("ui.hub.teams.public.empty")}),!A&&!j&&x.length>0&&e.jsxs(e.Fragment,{children:[!y||F.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[y?s("ui.hub.teams.public.match_line",{visible:String(F.length),total:x.length,query:u.trim()}):s("ui.hub.pages.status.count.teams",{count:V,scope:s("ui.hub.pages.status.scope.public")}),y?e.jsxs("span",{className:"text-ink-dim",children:[" ",s("ui.hub.teams.public.search_scope")]}):null]}):null,F.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:s("ui.hub.teams.public.search_miss",{query:u.trim()})}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:F.map(S=>e.jsx(Ga,{team:S,pulling:C===S.id,pullPending:o.isPending,onPull:N,pullButtonRef:M=>{M?z.current.set(S.id,M):z.current.delete(S.id)},failed:E===S.id,failureBody:v,treatment:g,onTreatmentAction:L,reauthenticating:d,onReauthenticated:()=>{p(!1),k(null),w()}},S.id))}),!y&&c&&c.totalPages>1&&e.jsx(Ye,{count:c.totalPages,page:c.page,onChange:S=>{n(S),D.current?.scrollIntoView({block:"nearest"})}})]})]})},Ga=({team:t,pulling:a,pullPending:i,onPull:n,failed:u,failureBody:h,treatment:x,onTreatmentAction:f,reauthenticating:b,onReauthenticated:j,pullButtonRef:T})=>{U();const[w,c]=l.useState(!1),o=ba({teamId:w?t.id:void 0}),E=ne(t.name),k=Ks(t),C=Gs(t),I=t.manager?.trim(),z=Ws(t),R=(t.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":t.name,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:E}),k?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",k]}):null]}),R?e.jsx("p",{...Se,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:R}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[I?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")}),e.jsx("span",{className:"text-ink-muted",children:I})]}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:z})}),e.jsx(ue,{content:We(t),children:e.jsx("span",{className:"truncate text-ink-muted",children:We(t)})})]})]}),C?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:[s("ui.hub.teams.public.published_by")," ",e.jsx("span",{className:"text-ink-muted",children:C})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(_,{ref:T,variant:"secondary",size:"sm",onClick:()=>n(t),disabled:i,"aria-label":s("ui.hub.teams.pull_target",{name:E}),children:a?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")}),u&&e.jsxs("div",{className:"flex max-w-56 flex-col items-end gap-1","data-testid":"agent-hub-public-team-pull-error",children:[e.jsx("output",{className:"text-right text-meta text-danger",children:h}),x?.actions.filter(y=>Wa.includes(y)).map(y=>e.jsx(_,{variant:"primary",size:"sm",onClick:()=>f(y,t),children:ce[y]},y)),b&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Hs,{titleText:ce["sign-in"],descriptionText:"",onSignInSuccess:j})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(Es,{summary:s("ui.hub.teams.brief.trigger"),open:w,onOpenChange:c,className:"w-full",triggerClassName:"w-full",triggerLabel:s("ui.hub.teams.brief.trigger_aria",{name:E}),chevronClassName:"text-ink-dim",children:e.jsx(Ja,{detail:o})})})]})},Ja=({detail:t})=>{if(U(),t.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(O,{className:"h-[1lh] w-2/3"}),e.jsx(O,{className:"h-[2lh] w-full"})]});if(t.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Xs(s("ui.hub.teams.brief.unreadable"),t.error)}),e.jsx(_,{variant:"primary",size:"sm",onClick:()=>void t.refetch(),disabled:t.isFetching,"aria-busy":t.isFetching,children:t.isFetching?s("ui.hub.teams.public.trying"):ce.retry})]});const a=t.team;if(!a)return null;const i=(a.instructions??"").trim(),n=(a.project??"").trim();return e.jsxs("div",{className:"flex max-w-3xl flex-col gap-3 text-body-sm","data-testid":"agent-hub-public-team-brief",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.collaboration")}),i?e.jsx("p",{...Se,className:"whitespace-pre-line select-text text-ink-muted",children:i}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.collaboration_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.project")}),n?e.jsx("p",{...Se,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.project_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.roster")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,a.members.length===0?e.jsx("li",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):a.members.map(u=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:u.count>1?`${u.role} ×${u.count}`:u.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:u.kind})]},`${u.kind}:${u.role}`))]})]})]})},Be=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(O,{className:"h-[1lh] w-1/3"}),e.jsx(O,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(O,{className:"mt-2 h-[1lh] w-2/3"})]}),Ya=(t,a)=>{const[i,n]=l.useState(t);return l.useEffect(()=>{const u=setTimeout(()=>n(t),a);return()=>clearTimeout(u)},[t,a]),i},we=[{value:"download_count:desc",label:"ui.hub.pages.sort.most_downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"ui.hub.pages.sort.most_liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"ui.hub.pages.sort.most_favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"ui.hub.pages.sort.newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"ui.hub.pages.sort.recently_updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"ui.hub.pages.sort.name_asc",sort:"name",order:"asc"}],Xa=[{value:"name",label:"ui.hub.pages.search_field.name"},{value:"description",label:"ui.hub.pages.search_field.description"}],Za=300,H="public",_s={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},ws="agent-hub-view-panel",ei=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(O,{className:"h-5.5 w-2/3"}),e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-1/2"}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(O,{className:"h-5.5 w-24"}),e.jsx(O,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(O,{className:"h-5.5 w-24"})})]}),e.jsx(O,{className:"h-4.5 w-32"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-hairline px-3 py-2",children:[e.jsx(O,{className:"size-4"}),e.jsx(O,{className:"h-4 w-6"}),e.jsx(O,{className:"size-4"}),e.jsx(O,{className:"h-4 w-6"}),e.jsx(O,{className:"ml-auto h-7 w-16"})]})]}),ji=()=>{const t=Ss(),{isAuthenticated:a}=Je(),[i,n]=l.useState(1),[u]=l.useState(12),[h,x]=l.useState(null),[f,b]=l.useState(""),[j,T]=l.useState("name"),[w,c]=l.useState(we[0].value),[o,E]=l.useState(H),[k,C]=l.useState("agents");U();const[I,z]=l.useState([]),R=Ya(f,Za),y=we.find(r=>r.value===w)??we[0],F=Ts(),N=!F.isError&&Ve(F.data,"hub_skills"),g=k==="skills"&&!N?"agents":k;l.useEffect(()=>{k==="skills"&&!N&&C("agents")},[k,N]);const v=Ct(),d=ht(F.data,"radient_org"),p=a?ga(d,v??null):null,{memberships:L}=Xt({enabled:$e(d)}),A=l.useMemo(()=>pa(L),[L]),V=o===H||A.some(r=>r.tenant_id===o);l.useEffect(()=>{!V&&g!=="skills"&&E(H)},[V,g]);const D=o===H?null:A.find(r=>r.tenant_id===o)??null,$=D?.tenant_id,S=D?.tenant_name||null,M=h!==null||R!=="",oe=Vs({tenantId:$}),ae=$s({page:1,perPage:Us,enabled:o===H}),ge=$&&oe.isSuccess?oe.teams.length:null,de=ae.isSuccess?ae.pagination?.totalRecords??null:null,se=M?null:o===H?de:ge,me=o===H?{visibility:"public",tenantId:null}:{visibility:"org",tenantId:o},fe=V&&(o===H||$e(d)),Y=Ms(me,1,N&&fe&&(o===H||a)),P=Y.isSuccess?Y.data.total:null,je=D?.role==="owner"||D?.role==="admin",ke=l.useMemo(()=>new Map(L.map(r=>[r.tenant_id,r.tenant_name])),[L]),{data:Q,agents:Ie,isLoading:he,isFetching:W,error:X,refetch:ye,pagination:K}=It({page:i,perPage:u,categories:h?[h]:void 0,name:j==="name"&&R||void 0,description:j==="description"&&R||void 0,sort:y.sort,order:y.order,tenantId:$}),te=D?qs(X):null,ie=Ie??[],le=W&&Q!==void 0,{statuses:m,isKnown:q,isError:Z,isFetching:re,refetch:ve}=Dt({agentIds:$?[]:ie.map(r=>r.id)}),Re=l.useRef(null),Ae=l.useRef(null),[Xe,Zs]=l.useState(0);l.useEffect(()=>{Xe!==0&&(Re.current??Ae.current)?.focus()},[Xe]);const Ze=l.useRef(null),Ee=l.useRef(!1),Le=l.useMemo(()=>[...new Set((Q?.records??[]).flatMap(r=>r.categories??[]))],[Q]);l.useEffect(()=>{z(r=>Le.every(J=>r.includes(J))?r:[...new Set([...r,...Le])])},[Le]);const et=()=>{x(null),b(""),n(1),Zs(r=>r+1)},G=(he||W)&&Q===void 0,es=!G&&!M&&(X!==null||ie.length===0);l.useEffect(()=>{!Ee.current||G||(Ee.current=!1,X?Ze.current?.focus():(Re.current??Ae.current)?.focus())},[G,X]);const ss=l.useRef(null),st=r=>{n(r),ss.current?.scrollIntoView({block:"nearest"})},tt=r=>{x(r),n(1)},at=r=>{b(r),n(1)},it=r=>{E(r),n(1)},ts=l.useRef(new Map),nt=r=>{T(r),n(1)},lt=K&&!M?K.totalRecords:null,Ne=$?s("ui.hub.pages.status.scope.shared_with",{org:S??s("ui.hub.pages.scope.org_unnamed")}):s("ui.hub.pages.status.scope.public"),as=(r,J)=>J==="team"?s("ui.hub.pages.status.count.teams",{count:r,scope:Ne}):s("ui.hub.pages.status.count.agents",{count:r,scope:Ne});let ee;return g==="skills"?ee=" ":g==="teams"?$?oe.isLoading?ee=s("ui.hub.pages.status.loading_teams"):se!==null?ee=as(se,"team"):ee=s("ui.hub.pages.status.teams_scope",{scope:Ne}):ee=" ":G?ee=s("ui.hub.pages.status.loading_agents"):K?ee=as(K.totalRecords,"agent"):ee=s("ui.hub.pages.status.agents_scope",{scope:Ne}),e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(xt,{title:s("ui.hub.pages.header.title"),subtitle:s("ui.hub.pages.header.subtitle"),icon:Zt}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[p&&e.jsxs(xe,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(be,{children:s("ui.hub.pages.orgs_unavailable")}),e.jsx(pe,{children:p})]}),e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2","data-testid":"agent-hub-browse-bar",children:[e.jsx(ft,{value:g,onValueChange:r=>C(r),children:e.jsx(jt,{"aria-label":s("ui.hub.pages.browse_aria"),children:["agents","teams",...N?["skills"]:[]].map(r=>{const J=r==="agents"?lt:r==="teams"?se:P;return e.jsxs(kt,{value:r,id:_s[r],"aria-controls":g===r?ws:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?s("ui.hub.pages.tab.agents"):r==="teams"?s("ui.hub.pages.tab.teams"):s("ui.hub.skills.title"),J!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:J})]},r)})})}),A.length>0&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",className:"text-meta text-ink-muted",children:s("ui.hub.pages.scope_label")}),e.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0","data-testid":"agent-hub-scope",children:[e.jsx("legend",{className:"sr-only",children:s("ui.hub.pages.scope_legend")}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:H,label:s("ui.hub.pages.scope.public"),Icon:Pt},...A.map(r=>({value:r.tenant_id,label:r.tenant_name||s("ui.hub.pages.scope.org_label"),Icon:fa}))].map(({value:r,label:J,Icon:rt})=>e.jsxs(_,{ref:is=>{is?ts.current.set(r,is):ts.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":o===r,onClick:()=>it(r),title:J,"data-testid":`agent-hub-scope-${r===H?"public":`org-${r}`}`,className:B("max-w-48",o===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(rt,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:J})]},r))})]})]})]}),e.jsx(yt,{id:ws,labelledBy:_s[g],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[g==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!es&&e.jsx(_a,{selectedCategory:h,onSelectCategory:tt,categories:I})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[g==="agents"&&!es&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Te,{ref:Re,type:"search",value:f,onChange:r=>at(r.target.value),placeholder:s("ui.hub.pages.search.placeholder"),"aria-label":s("ui.hub.pages.search.aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(ns,{value:j,onValueChange:nt,children:[e.jsx(ls,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":s("ui.hub.pages.search.scope_aria"),"data-testid":"agent-hub-search-scope",children:e.jsx(rs,{})}),e.jsx(us,{children:Xa.map(r=>e.jsx(cs,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs(ns,{value:w,onValueChange:c,children:[e.jsx(ls,{className:"w-48","aria-label":s("ui.hub.pages.sort.aria"),"data-testid":"agent-hub-sort",children:e.jsx(rs,{})}),e.jsx(us,{children:we.map(r=>e.jsx(cs,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs("p",{ref:ss,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[ee,g==="agents"&&le?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:s("ui.hub.pages.updating")})]}):null]}),g==="agents"&&e.jsxs(e.Fragment,{children:[a&&Z&&e.jsxs("output",{className:"mb-3 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-hub-status-unknown",children:[e.jsx("span",{children:s("ui.hub.pages.viewer_unknown")}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>void ve(),disabled:re,"aria-busy":re,children:re?s("ui.common.actions.retrying"):s("ui.common.actions.retry_again")})]}),G&&e.jsx("div",{"data-testid":"agent-hub-loading",className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6",children:Array.from({length:6},(r,J)=>e.jsx(ei,{},J))}),G&&K===void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-6 flex min-h-13 items-center justify-center","data-testid":"agent-hub-pager-placeholder",children:e.jsx(O,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:B(!G&&X&&!te?"block":"sr-only"),children:!G&&X&&!te&&e.jsxs(xe,{variant:"danger",className:"max-w-2xl","aria-busy":W,"data-testid":"agent-hub-error",children:[e.jsx(be,{children:a?s("ui.hub.pages.load_failed.title"):s("ui.hub.pages.signed_out.title")}),e.jsx(pe,{children:a?Ge(s("ui.hub.pages.list_unreadable"),X):s("ui.hub.pages.signed_out.body")}),e.jsx("div",{className:"mt-2",children:e.jsx(_,{ref:Ze,variant:"outline",size:"sm",onClick:()=>{Ee.current=!0,ye()},disabled:W,"aria-busy":W,children:W?s("ui.hub.detail.trying"):s("ui.common.actions.retry_again")})})]})}),!G&&te&&D&&e.jsxs(xe,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(be,{children:te==="plan"?s("ui.hub.pages.org.plan_headline"):s("ui.hub.pages.org.no_access_headline")}),e.jsx(pe,{children:te==="plan"?s("ui.hub.pages.org.plan_body",{org:S??s("ui.hub.pages.scope.org_unnamed")}):s("ui.hub.pages.org.no_access_body",{org:S??s("ui.hub.pages.org.that_organization")})}),te==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(_,{variant:"primary",size:"sm",onClick:()=>void ye(),disabled:W,"aria-busy":W,children:W?s("ui.hub.detail.trying"):s("ui.common.actions.retry_again")})})]}),!G&&!X&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":le,children:ie.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:B("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!$&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:$?s("ui.hub.pages.empty.org.title"):h?s("ui.hub.pages.empty.category.title",{category:Fs(h).label}):M?s("ui.hub.pages.empty.search.title"):s("ui.hub.pages.empty.public.title")}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:$?s("ui.hub.pages.empty.org.body",{org:S??s("ui.hub.pages.scope.org_unnamed")}):h?s("ui.hub.pages.empty.category.body"):M?s("ui.hub.pages.empty.search.body"):s("ui.hub.pages.empty.public.body")}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:M?e.jsx(_,{variant:"secondary",onClick:et,children:h?s("ui.hub.pages.clear.filter"):s("ui.hub.pages.clear.search")}):$&&!je?null:e.jsx(_,{ref:Ae,variant:"secondary",onClick:()=>t("/agents"),children:s("ui.hub.pages.publish")})})]}):ie.map(r=>e.jsx(va,{agent:r,status:a?m[r.id]:void 0,viewerStateKnown:a&&Mt(q,m,r.id),orgName:r.visibility==="org"?ke.get(r.tenant_id)??null:null},r.id))}),!G&&K&&K.totalPages>1&&e.jsx(Ye,{count:K.totalPages,page:K.page,onChange:st})]}),g==="skills"&&(N?e.jsx(Ra,{scope:o===H?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:o,organization:S},signedIn:a,accessible:V&&(o===H||$e(d))},`skills:${o}`):e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")})),g==="teams"&&(D?e.jsx(Ua,{tenantId:D.tenant_id,orgName:S}):e.jsx(Ka,{signedIn:a,onOpenSettings:()=>t("/settings")}))]})]})})]})]})};export{ji as AgentHubPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-IJLdoh2_.js";import{B as o}from"./index-CCtgdHHn.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";import"./conversation-input-sync-59C2VH9z.js";import"./console-mirror-Be1UXdZX.js";const c=()=>r.jsx(o,{tabScope:"all",requestScope:"all",hostSessionId:null,isRoutePage:!0,surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{c as BrowserPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-C74Lu-Og.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-DTDoq5W_.js";import{_ as i}from"./mermaid.core-C74Lu-Og.js";import"./chunk-RZ5BOZE2-Cz1t_ff3.js";import"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-DTDoq5W_.js";import{_ as i}from"./mermaid.core-C74Lu-Og.js";import"./chunk-RZ5BOZE2-Cz1t_ff3.js";import"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-Cf60T05n.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,l as o,K as s,e as p,L as n}from"./mermaid.core-C74Lu-Og.js";import{p as m}from"./radar-MK3ICKWK-ZmHcgFsG.js";import"./conversation-input-sync-59C2VH9z.js";import"./index-IJLdoh2_.js";import"./messages-CqvhgjgC.js";import"./appearance-DZQCtGzt.js";import"./roles-D1pcbxAx.js";import"./error-boundary--DgTWGAQ.js";import"./_baseUniq-Cf60T05n.js";import"./_basePickBy-DfU-0OMa.js";import"./clone-lH5iTXYN.js";var g={parse:e(async r=>{const a=await m("info",r);o.debug(a)},"parse")},v={version:n.version},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,i)=>{o.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=s(a);p(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),f={draw:l},V={parser:g,db:c,renderer:f};export{V as diagram};
|