UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 5.16 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./plugin-contracts-runtime-DdmZDqWI.js","./creation-recovery.runtime-DYBq8TjX.js","./en-agent-creation-po1rUscy.js","./route-controls-runtime-LXiVRSj4.js","./control-ui-boot-new-pHXPNTZp.js","./control-ui-boot-new-styles-C3bRIOZh.js","./command-discovery-english-zfhZUSVO.js","./composer-invocation-menus-Dvscf6c8.js","./gateway-page-runtime-CW2orlv_.js","./settings-controls-runtime-CwXZmgDo.js","./route-chrome-Dr9fhzjf.js","./en-route-subtitles-CjswZHfJ.js","./route-chrome-styles-NRybfaJ0.js","./hub-tabs-B2BTtoLm.js","./file-preview-document-CnOpuMR8.js","./deferred-ui-support-DZEPWjAk.js","./markdown-runtime-CtlJb8xA.js","./file-preview-modal-Bl9gr3Vu.js","./tooltip-CiZaaGC3.js","./overview-CG7I1zlA.js","./en-plugin-management-D2xHjJYC.js","./presentation-DumN14oJ.js","./panel-empty-state-B1lP2be5.js","./consent-dialog-CiJWSKZS.js","./en-plugin-consent-Dd9Te7_9.js","./plugin-catalog-runtime-DizT4IFV.js","./virtual-core-runtime-LhyriIY5.js","./carapace-control-ui-BXUc8yK1.js","./plugins-C9Yd-naE.js","./detail-shell-_r84UGhe.js","./template-workspace-file-roles-g7z8wiHC.js","./_1____________________________.css","./_0____________________________________.css","./control-ui-boot-new-styles-C8rpwVHV.css","./route-chrome-styles-3PguhbQm.css","./templates-catalog-BQv5OUhV.css","./overview-BEVXJ1DM.css","./carapace-control-ui-Bsnmd0yZ.css","./plugins-BsIvCBAx.css"])))=>i.map(i=>d[i]); import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{$u as t,Qu as n,Wo as r}from"./_4____________________________.js";import{GN as i,JN as a,Ks as o,NN as s,Op as c,PN as l,kp as u,qN as d,qs as f}from"./_2_____________________________.js";import{B as p,F as m,H as h,O as g,S as _,U as v,W as y,d as b,f as x,gt as S,j as C,s as w,u as T,w as E,x as D}from"./_6____________________.js";import{c as O,d as k,o as A,s as j,u as M}from"./templates-catalog-client-m--GTHXZ.js";import"./templates-catalog-CW9igxeC.js";function N(e){let t=()=>e.presented&&e.intent.client===e.source().gatewayClient&&e.intent.sessionKey===e.source().sessionKey;return C(g,{get when(){return x(()=>!!t())()?e.source().applicationContext:t()},children:t=>C(g,{get when(){return e.intent.anchor},keyed:!0,children:n=>C(P,{get application(){return t()},get intent(){return e.intent},get onDismiss(){return e.onDismiss}})})})}function P(e){let[t,n]=p(null);S(()=>{e.intent.type===`click`&&n(e.intent)});let i=()=>e.intent.type===`click`?e.intent:t(),l=c(()=>{i()||e.onDismiss()},180),u=m(()=>e.intent,{equals:(e,t)=>e.anchor===t.anchor&&e.client===t.client&&e.sessionKey===t.sessionKey});S(()=>{let e=u().anchor,t=()=>l.schedule(),n=()=>l.cancel(),i=[r(e,`pointerleave`,t),r(e,`focusout`,t),r(e,`pointerenter`,n),r(e,`focusin`,n)];return e.matches(`:hover, :focus`)||t(),()=>i.forEach(e=>e())});let d=h();return[C(g,{get when(){return x(()=>!i())()&&u()},keyed:!0,children:t=>{let r=m(async()=>{let e=t.anchor.dataset.templatePackage;return e?(await A(t.client,e,100)).find(t=>t.packageName===e)??null:null});return C(o,{id:d,get label(){return a(`templatesCatalog.review`)},get anchor(){return t.anchor},open:!0,placement:`bottom-start`,dismissOutsideFocus:!1,onOpenChange:t=>{t||e.onDismiss()},class:`template-reference-card`,get children(){var e=F(),i=e.firstChild;return e._$$focusout=()=>l.schedule(180),e._$$focusin=()=>l.cancel(),e.addEventListener(`pointerleave`,()=>l.schedule(180)),e.addEventListener(`pointerenter`,()=>l.cancel()),b(e,C(_,{fallback:()=>(()=>{var e=I();return b(e,()=>a(`templatesCatalog.unavailable`)),e})(),get children(){return C(E,{get fallback(){var e=I();return b(e,()=>a(`templatesCatalog.loading`)),e},get children(){return C(g,{get when(){return r()},get fallback(){var e=I();return b(e,()=>a(`templatesCatalog.unavailable`)),e},children:e=>[(()=>{var t=L(),n=t.firstChild,r=n.nextSibling.firstChild,i=r.nextSibling;return b(n,C(j,{get src(){return e().iconUrl}})),b(r,()=>e().displayName),b(i,()=>a(`templatesCatalog.byCreator`,{creator:`@${e().ownerHandle}`})),t})(),(()=>{var t=R();return b(t,()=>e().summary),t})()]})}})}}),i),i._$$click=()=>n(t),b(i,()=>a(`templatesCatalog.viewTemplate`)),e}})}}),C(g,{get when(){return x(()=>!!i())()?e.application:i()},keyed:!0,children:t=>C(s,{value:t,get children(){return C(z,{get initialPackageName(){return i().anchor.dataset.templatePackage},modal:!0,onClose:()=>{let t=i()?.anchor;e.onDismiss(),S(()=>{t?.isConnected&&t.focus({preventScroll:!0})})}})}})})]}var F,I,L,R,z;function B(){return(B=e((()=>{T(),v(),M(),l(),i(),u(),O(),f(),t(),F=D(`<div><button type=button class="btn template-reference-card__view">`),I=D(`<p role=status>`),L=D(`<header><span class=template-reference-card__art></span><span><strong></strong><small>`),R=D(`<p>`),d(k),z=y(()=>n(()=>import(`./templates-catalog-dialog-Dxug9Z6t.js`).then(e=>(e.n(),e.r)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url),{export:`TemplatesCatalogDialog`},`src/pages/agents-home/templates-catalog-dialog.tsx`),w([`focusin`,`focusout`,`click`])})))()}B();export{N as TemplateReferenceView};