UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 2.16 kB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./control-ui-connection-D5QrEAFW.css","./control-ui-boot-shared-styles-BorAdMVO.css"])))=>i.map(i=>d[i]); import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{lu as t,uu as n}from"./control-ui-connection-Bfj9beF_.js";import{BA as r,a_ as i,dj as a,i_ as o,mj as s,pj as c,zA as l}from"./control-ui-boot-shared-DFTSUQQ0.js";import{F as u,O as d,Rt as f,U as p,d as m,ht as h,j as g,u as _,x as v}from"./solid-runtime-C416s-HC.js";import{a as y,i as b,n as x,t as S}from"./chat-attachment-preview-chip-wl3qMjij.js";import{n as C,r as w}from"./chat-attachment-text-reader-DYgn--mC.js";function T(e){let n=u(()=>({src:e.src,sizeBytes:e.sizeBytes,scope:e.scope}),{equals:(e,t)=>e.src===t.src&&e.sizeBytes===t.sizeBytes&&e.scope===t.scope}),r=u(()=>{let{src:e,sizeBytes:r}=n();if(!e)return()=>``;let i=new AbortController;return h(()=>i.abort()),u(async()=>{try{let n=await w(e,r,i.signal,`excerpt`);if(i.signal.aborted)return``;let{derivePastedTextExcerpt:a}=await t(async()=>{let{derivePastedTextExcerpt:e}=await import(`./pasted-text-excerpt-CAZfx-UP.js`);return{derivePastedTextExcerpt:e}},__vite__mapDeps([0,1]),import.meta.url);return i.signal.aborted?``:a(n)}catch{return``}},{loadingValue:``})}),i=()=>r()()||s(`chat.attachments.pastedText`);var a=D();return a._$owner=f(),m(a,g(d,{get when(){return e.composerAction},get fallback(){return g(S,{get label(){return i()},get icon(){return g(l,{name:`fileText`})},get onClick(){return e.onOpen},get onReveal(){return e.admission?.onAdmit},get elementRef(){return e.admission?.observeElement}})},get children(){var t=E(),n=t.firstChild,r=n.nextSibling;return m(t,g(b,{get attachment(){return{id:e.scope,mimeType:`text/plain`}},get label(){return i()},get metadata(){return e.composerAction},get onOpen(){return e.onOpen}}),n),m(t,()=>e.composerRemoveAction,r),t}})),a}var E,D;function O(){return(O=e((()=>{_(),p(),r(),o(),a(),y(),x(),C(),n(),E=v(`<div class="chat-attachment-thumb chat-attachment-thumb--file chat-attachment-thumb--pasted-text"><!><!>`),D=v(`<openclaw-chat-pasted-text style=display:contents>`,1),c(i)})))()}export{O as n,T as t};