UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 1.91 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{_x as t,cP as n,dv as r,fv as i,mx as a,zv as o}from"./_2_____________________________.js";import{P as s,U as c,j as l,u}from"./_6____________________.js";function d(e,t){let n=!1;s(e,(e,r)=>{n=t.requested(e,r)??n,n&&t.ready?.(e)!==!1&&(n=!1,t.focus(e))})}function f(){return(f=e((()=>{c()})))()}function p(e,t){let n=t.findIndex(t=>t===e.target);if(n<0||t.length===0)return;if(e.key===`Home`)return t[0];if(e.key===`End`)return t[t.length-1];let r=m[e.key];if(r!==void 0)return(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&getComputedStyle(t[n]).direction===`rtl`&&(r=-r),t[(n+r+t.length)%t.length]}var m;function h(){return(h=e((()=>{m={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}})))()}function g(e,t){let i=t.composedPath();if(t.metaKey||t.ctrlKey||t.altKey||i.some(e=>e instanceof Element&&e.matches(`input, textarea, select, [contenteditable=true]`)))return;let a=n(t);if(a)for(let n of[e,...i]){let e=n instanceof HTMLElement&&r(n,a);if(e){t.preventDefault(),t.stopPropagation(),e.click();return}}}function _(){return(_=e((()=>{o(),i()})))()}function v(e,t=`top`){return{tabindex:-1,"aria-hidden":`true`,style:{position:`fixed`,left:`${e.x}px`,[t]:`${e.y}px`,width:`1px`,height:`1px`,opacity:0,"pointer-events":`none`}}}function y(){return(y=e((()=>{})))()}function b(){return globalThis.matchMedia(x).matches}var x;function S(){return(S=e((()=>{x=`(max-width: 768px), (max-width: 932px) and (max-height: 500px) and (orientation: landscape)`})))()}function C(e){return l(a,{get class(){return[`refresh-button`,e.class]},icon:`refresh`,get label(){return e.label},get tooltip(){return e.tooltip||!1},get busy(){return e.busy},get disabled(){return e.busy||e.disabled},onClick:()=>e.onClick()})}function w(){return(w=e((()=>{u(),t()})))()}export{b as a,g as c,p as d,d as f,S as i,_ as l,w as n,y as o,f as p,x as r,v as s,C as t,h as u};