export function elementNotVisible(selector: string): boolean { const container = document.querySelector(selector); if (!container) return true; const { scrollHeight, scrollWidth } = document.documentElement; const { bottom, left, right, top } = container.getBoundingClientRect(); return ( bottom <= 0 || left >= scrollWidth || right <= 0 || top >= scrollHeight ); }