1const PT26_EVENTS=Object.freeze({variantChange:"pt26:variant:change",cartUpdated:"pt26:cart:updated",cartDrawerOpen:"pt26:cart-drawer:open"}),componentRegistry={slider:"pt26-slider.js","multi-column":"pt26-multi-column.js",accordion:"pt26-accordion.js","product-price":"pt26-product-price.js","product-cta":"pt26-product-cta.js","product-gallery":"pt26-product-gallery.js","product-bio-badge":"pt26-product-bio-badge.js","product-ingredients":"pt26-product-ingredients.js","product-purchase-options":"pt26-product-purchase-options.js","content-slider":"pt26-content-slider.js","variant-drawer":"pt26-variant-drawer.js","bundle-selection":"pt26-bundle-selection.js","sticky-element":"pt26-sticky-element.js","cart-notification":"pt26-cart-notification.js"};let moduleUrls=null;function resolveModuleUrl(file){if(moduleUrls===null){const node=document.getElementById("pt26-module-urls");try{moduleUrls=node?JSON.parse(node.textContent):{}}catch(error){console.error("[pt26] #pt26-module-urls is not valid JSON",error),moduleUrls={}}}return moduleUrls[file]||new URL("./"+file,import.meta.url).href}const moduleImports=new Map;function loadComponent(name){const file=componentRegistry[name];if(!file)return Promise.resolve();const url=resolveModuleUrl(file);return moduleImports.has(url)||moduleImports.set(url,import(url).catch(error=>{console.error('[pt26] component module "'+file+'" failed to load',error)})),moduleImports.get(url)}class Pt26LazyMount extends HTMLElement{constructor(){super(),this.hasMounted=!1,this.observer=null,this.idleHandle=null,this.timeoutHandle=null,this.interactionEvents=["pointerenter","focusin","click"],this.handleInteraction=this.handleInteraction.bind(this)}connectedCallback(){if(!this.getAttribute("component"))return;switch(this.getAttribute("load")||"visible"){case"eager":this.mount();break;case"idle":this.observeIdle();break;case"interaction":this.observeInteraction();break;default:this.observeVisible();break}}disconnectedCallback(){this.teardown()}mount(){this.hasMounted||(this.hasMounted=!0,this.teardown(),loadComponent(this.getAttribute("component")))}observeVisible(){if(!("IntersectionObserver"in window)){this.mount();return}this.observer=new IntersectionObserver(entries=>{entries.some(entry=>entry.isIntersecting)&&this.mount()},{rootMargin:"300px"}),this.observer.observe(this)}observeIdle(){"requestIdleCallback"in window?this.idleHandle=window.requestIdleCallback(()=>this.mount()):this.timeoutHandle=window.setTimeout(()=>this.mount(),200)}observeInteraction(){this.interactionEvents.forEach(eventName=>{this.addEventListener(eventName,this.handleInteraction,{capture:!0,once:!0})})}handleInteraction(){this.mount()}teardown(){this.observer&&(this.observer.disconnect(),this.observer=null),this.idleHandle!==null&&"cancelIdleCallback"in window&&(window.cancelIdleCallback(this.idleHandle),this.idleHandle=null),this.timeoutHandle!==null&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this.interactionEvents.forEach(eventName=>{this.removeEventListener(eventName,this.handleInteraction,{capture:!0})})}}customElements.get("pt26-lazy-mount")||customElements.define("pt26-lazy-mount",Pt26LazyMount);export{PT26_EVENTS,componentRegistry,loadComponent}; 2//# sourceMappingURL=/cdn/shop/t/340/assets/pt26-core.js.map?v=13894420389425419011790772049
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.