UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 787 B
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{P as t,U as n,ht as r}from"./solid-runtime-C416s-HC.js";function i(e){let n=!0,i;r(()=>{i!==void 0&&cancelAnimationFrame(i)});function a(t,r=!1){let a=n;i!==void 0&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=void 0;let o=e.container();o?.isConnected&&e.identity()===t&&(!r&&(!e.enabled()||!a&&o.scrollHeight-o.scrollTop-o.clientHeight>=120)||(e.scrollToEnd?e.scrollToEnd():o.scrollTop=o.scrollHeight,n=!0))})}return e.content&&t(()=>[e.content?.(),e.identity()],([,e],t)=>a(e,e!==t?.[1])),{reset(){n=!0},schedule(t=!1){a(e.identity(),t)},handleScroll:e=>{let t=e.currentTarget;t instanceof HTMLElement&&(n=t.scrollHeight-t.scrollTop-t.clientHeight<120)}}}function a(){return(a=e((()=>{n()})))()}export{i as n,a as t};