document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelectorAll(".ui-table"),t=new WeakMap;function n(){const n=window.innerWidth<=768;e.forEach((e=>{n?function(e){if(t.has(e))return;console.log("Enabled scroll handle");const n=e.closest(".ui-container-box");if(!n)return;let o=!1;const l=()=>{const t=e.scrollLeft,l=e.scrollWidth-(t+e.clientWidth);!o&&l<=32&&(n.classList.add("at-end"),o=!0,setTimeout((()=>{e.scrollTo({left:e.scrollWidth,behavior:"smooth"})}),300)),o&&l>80&&(n.classList.remove("at-end"),o=!1)};e.addEventListener("scroll",l),t.set(e,l)}(e):function(e){const n=t.get(e);n&&(console.log("Disabled scroll handle"),e.removeEventListener("scroll",n),t.delete(e))}(e)}))}n(),window.addEventListener("resize",(()=>{n()}))}));