UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.61 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{GN as t,JN as n,ck as r,fN as i,pN as a,uk as o}from"./_2_____________________________.js";import{j as s,u as c}from"./_6____________________.js";import{h as l,m as u}from"./chat-composer-plus-menu-content-BGl914ym.js";function d(e){if(!o(e.attachments.uploadConfig))return[];let t=[],r=e.attachments.imagesOnly?[`photo`,`image`,n(`chat.composer.attachPhoto`)]:[`media`,`image`,n(`chat.composer.attachMedia`)],a=l();for(let[o,c,l]of a?[[`file`,`paperclip`,n(`chat.composer.attach`)]]:[[`camera`,`camera`,n(`chat.composer.cameraInput`)],r,...e.attachments.imagesOnly?[]:[[`file`,`paperclip`,n(`chat.composer.attachFileOption`)]]])t.push({id:o,label:l,class:a?`agent-chat__attach-menu-option agent-chat__capability-menu-item`:`agent-chat__attach-menu-option`,icon:s(i,{name:c})});return[{kind:`group`,id:`attachment-sources`,class:t.length===1?void 0:`agent-chat__attachment-sources`,items:t}]}function f(e,t,n,r){if(!o(r.attachments.uploadConfig)||e!==`camera`&&e!==`photo`&&e!==`file`&&e!==`media`)return!1;t.preventDefault();let{overlay:i}=n,{surface:a}=i;return r.inputHandle.open(e,()=>{let e=[`--oc-overlay-show-duration`,`--oc-overlay-hide-duration`].map(e=>({name:e,value:a.style.getPropertyValue(e),priority:a.style.getPropertyPriority(e)}));for(let{name:t}of e)a.style.setProperty(t,`0s`);try{return i.request(!1,`none`)&&!a.matches(`:popover-open`)}finally{for(let{name:t,value:n,priority:r}of e)n?a.style.setProperty(t,n,r):a.style.removeProperty(t)}}),!0}function p(){return(p=e((()=>{c(),a(),t(),r(),u()})))()}export{f as n,p as r,d as t};