1const SCROLL_REGION_SELECTOR=".scroll-area, .table-wrapper",FOCUSABLE='a[href], area[href], button, input:not([type="hidden"]), select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), [tabindex]',OVERFLOW_BUFFER_PX=13,managed=new WeakSet;function scrolls(element){const style=getComputedStyle(element),canScroll=axis=>["auto","scroll"].includes(style.getPropertyValue(`overflow-${axis}`));return canScroll("x")&&element.scrollWidth>element.clientWidth+13||canScroll("y")&&element.scrollHeight>element.clientHeight+13}function canTakeFocus(element){return element.matches(":disabled")||element.tabIndex<0||element.closest("[hidden]")?!1:element.checkVisibility?element.checkVisibility({visibilityProperty:!0}):!0}function hasFocusableContent(element){return Array.from(element.querySelectorAll(FOCUSABLE)).some(canTakeFocus)}export function syncScrollAreaFocus(element){if(managed.has(element)&&element.getAttribute("tabindex")!=="0"&&managed.delete(element),element.hasAttribute("tabindex")&&!managed.has(element))return;scrolls(element)&&!element.parentElement?.closest("a[href], button")&&!hasFocusableContent(element)?(managed.has(element)||element.setAttribute("tabindex","0"),managed.add(element)):managed.has(element)&&(element.removeAttribute("tabindex"),managed.delete(element))}if("ResizeObserver"in window&&"MutationObserver"in window){const resizeObserver=new ResizeObserver(entries=>entries.forEach(({target})=>syncScrollAreaFocus(target))),regionsIn=root=>[...root.matches?.(SCROLL_REGION_SELECTOR)?[root]:[],...root.querySelectorAll(SCROLL_REGION_SELECTOR)];regionsIn(document).forEach(region=>resizeObserver.observe(region)),new MutationObserver(records=>records.forEach(record=>{record.removedNodes.forEach(node=>node.nodeType===Node.ELEMENT_NODE&®ionsIn(node).forEach(region=>resizeObserver.unobserve(region))),record.addedNodes.forEach(node=>node.nodeType===Node.ELEMENT_NODE&®ionsIn(node).forEach(region=>resizeObserver.observe(region)));const enclosing=record.target.closest?.(SCROLL_REGION_SELECTOR);enclosing&&syncScrollAreaFocus(enclosing)})).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden","tabindex","href"]}),window.addEventListener("load",()=>regionsIn(document).forEach(syncScrollAreaFocus)),document.addEventListener("load",({target})=>{const region=target instanceof HTMLImageElement&&target.closest(SCROLL_REGION_SELECTOR);region&&syncScrollAreaFocus(region)},!0)} 2//# sourceMappingURL=/cdn/shop/t/18/assets/scroll-area-focus.js.map?v=79732843003604141791790629019
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.