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=["./_1____________________________.css","./_0____________________________________.css"])))=>i.map(i=>d[i]); import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{$u as t,Qu as n}from"./_4____________________________.js";import{GN as r,JN as i,fN as a,oS as o,pN as s,qN as c,sS as l}from"./_2_____________________________.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"./_6____________________.js";import{a as y,i as b,n as x,t as S}from"./chat-attachment-preview-chip-4QygB_YJ.js";import{n as C,r as w}from"./chat-attachment-text-reader-nCp-5odC.js";function T(e){let t=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}=t();if(!e)return()=>``;let i=new AbortController;return h(()=>i.abort()),u(async()=>{try{let t=await w(e,r,i.signal,`excerpt`);if(i.signal.aborted)return``;let{derivePastedTextExcerpt:a}=await n(async()=>{let{derivePastedTextExcerpt:e}=await import(`./pasted-text-excerpt-B4jFQW90.js`);return{derivePastedTextExcerpt:e}},__vite__mapDeps([0,1]),import.meta.url);return i.signal.aborted?``:a(t)}catch{return``}},{loadingValue:``})}),o=()=>r()()||i(`chat.attachments.pastedText`);var s=D();return s._$owner=f(),m(s,g(d,{get when(){return e.composerAction},get fallback(){return g(S,{get label(){return o()},get icon(){return g(a,{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 o()},get metadata(){return e.composerAction},get onOpen(){return e.onOpen}}),n),m(t,()=>e.composerRemoveAction,r),t}})),s}var E,D;function O(){return(O=e((()=>{_(),p(),s(),o(),r(),y(),x(),C(),t(),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(l)})))()}export{O as n,T as t};