UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 900 B
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{lo as t}from"./control-ui-connection-Bfj9beF_.js";function n(e,n,i){let a=i,o=()=>r(e,a)(),s=new ResizeObserver(o);s.observe(e),n!==e&&s.observe(n);let c=t(e,`scroll`,o,{passive:!0});return o(),{setEnabled(e){e!==a&&(a=e,o())},destroy(){s.disconnect(),c(),e.classList.remove(`sidebar-file-mobile__scroll`),e.removeAttribute(`data-fade-top`),e.removeAttribute(`data-fade-bottom`),e.style.removeProperty(`--mobile-file-scrollbar-width`)}}}function r(e,t){let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1,i=Math.max(0,e.offsetWidth-e.clientWidth);return()=>{e.classList.toggle(`sidebar-file-mobile__scroll`,t),e.toggleAttribute(`data-fade-top`,t&&n),e.toggleAttribute(`data-fade-bottom`,t&&r),e.style.setProperty(`--mobile-file-scrollbar-width`,String(i)+`px`)}}function i(){return(i=e((()=>{})))()}export{r as n,n as r,i as t};