PageSourceSearch

https://wanderingbearcoffee.com/cdn/shop/t/443/assets/overflow-list.js?v=84238115477175937461790356517

js wanderingbearcoffee.com collected 2026-09-26 03:15:39 UTC 4,012 bytes, 2 lines download raw bytes

1import{ResizeNotifier}from"@theme/utilities";import{DeclarativeShadowElement}from"@theme/component";export class OverflowMinimumEvent extends Event{constructor(minimumReached){super("overflowMinimum",{bubbles:!0}),this.detail={minimumReached}}}export class OverflowList extends DeclarativeShadowElement{static get observedAttributes(){return["disabled","minimum-items"]}attributeChangedCallback(name,oldValue,newValue){name==="disabled"&&newValue==="true"&&this.#reset()}async connectedCallback(){super.connectedCallback(),await this.#waitForStyles(),this.#initialize()}#waitForStyles(){const styles=this.shadowRoot?.querySelector('link[rel="stylesheet"]');return!styles||styles.sheet?Promise.resolve():new Promise(resolve=>{styles.addEventListener("load",resolve)})}#initialize(){const{shadowRoot}=this;if(!shadowRoot)throw new Error("Missing shadow root");const defaultSlot=shadowRoot.querySelector("slot:not([name])"),overflowSlot=shadowRoot.querySelector('slot[name="overflow"]'),moreSlot=shadowRoot.querySelector('slot[name="more"]'),overflow=shadowRoot.querySelector('[part="overflow"]'),list=shadowRoot.querySelector('[part="list"]'),placeholder=shadowRoot.querySelector('[part="placeholder"]');if(!(defaultSlot instanceof HTMLSlotElement)||!(overflowSlot instanceof HTMLSlotElement)||!(moreSlot instanceof HTMLSlotElement)||!(overflow instanceof HTMLElement)||!(list instanceof HTMLElement)||!(placeholder instanceof HTMLElement))throw new Error("Invalid element types in <OverflowList />");this.#refs={defaultSlot,overflowSlot,moreSlot,overflow,list,placeholder},this.addEventListener("reflow",event=>{});const elements=defaultSlot.assignedElements().filter(element=>!(element instanceof HTMLTemplateElement)),firstElement=elements[0],lastElement=elements[elements.length-1];firstElement&&this.#intersectionObserver.observe(firstElement),lastElement&&lastElement!==firstElement&&this.#intersectionObserver.observe(lastElement)}disconnectedCallback(){this.#resizeObserver.disconnect(),this.#mutationObserver.disconnect(),this.#intersectionObserver.disconnect()}get schedule(){return typeof Theme?.utilities?.scheduler?.schedule=="function"?Theme.utilities.scheduler.schedule:callback=>requestAnimationFrame(()=>setTimeout(callback,0))}#scheduled=!1;get minimumItems(){const value=this.getAttribute("minimum-items");return value?parseInt(value,10):null}get overflowSlot(){const{overflowSlot}=this.#refs;return overflowSlot}get defaultSlot(){const{defaultSlot}=this.#refs;return defaultSlot}#handleIntersection=entries=>{entries[0]?.isIntersecting&&(this.#intersectionObserver.disconnect(),setTimeout(()=>{this.querySelector(':scope > template[shadowrootmode="open"]')?.remove()},0))};#handleChange=()=>{this.#scheduled||(this.#scheduled=!0,requestAnimationFrame(()=>setTimeout(()=>{this.#scheduled=!1},0)))};#moveItemsToDefaultSlot(){const{defaultSlot,overflowSlot}=this.#refs;for(const element of overflowSlot.assignedElements())element.slot!==defaultSlot.name&&(element.slot=defaultSlot.name)}#reset(){const{list}=this.#refs;this.#unobserveChanges(),this.#moveItemsToDefaultSlot(),list.style.removeProperty("height"),this.style.setProperty("--overflow-count","0")}#updateMinimumReached(visibleElements){this.minimumItems}showAll(){const{placeholder}=this.#refs;placeholder.style.setProperty("width","0"),placeholder.style.setProperty("display","none"),this.setAttribute("disabled","true")}#observeChanges(){this.#resizeObserver.observe(this),this.#mutationObserver.observe(this,{childList:!0})}#unobserveChanges(){this.#resizeObserver.disconnect(),this.#mutationObserver.disconnect()}#refs;#resizeObserver=new ResizeNotifier(this.#handleChange);#mutationObserver=new MutationObserver(this.#handleChange);#intersectionObserver=new IntersectionObserver(this.#handleIntersection,{rootMargin:"640px 360px 640px 360px"})}customElements.get("overflow-list")||customElements.define("overflow-list",OverflowList);
2//# sourceMappingURL=/cdn/shop/t/443/assets/overflow-list.js.map?v=84238115477175937461790356517

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.