1function onShopifyReady(callback){const interval=setInterval(()=>{const selected=document.querySelector('input[name="id"]:checked, select[name="id"] option:checked');selected&&selected.value&&(clearInterval(interval),callback())},100)}onShopifyReady(()=>{const variantSelectors=document.querySelectorAll("variant-radios, variant-selects"),variants=window.productVariants||[];function filterImagesByUPC(upc){document.querySelectorAll(".product__media-item").forEach(item=>{const img=item.querySelector("img"),match=(img?.alt||img?.getAttribute("data-media-alt")||"").includes(upc);item.style.display=match?"":"none"})}function getSelectedVariantId(){return document.querySelector('input[name="id"]:checked, select[name="id"] option:checked')?.value}function handleVariantChange(){const selectedId=getSelectedVariantId(),variant=variants.find(v=>v.id==selectedId);console.log("Selected variant ID:",selectedId),console.log("Matching variant:",variant),console.log("Filtering images for barcode:",variant?.barcode),variant&&variant.barcode&&filterImagesByUPC(variant.barcode)}variantSelectors.forEach(selector=>{selector.addEventListener("change",handleVariantChange)}),document.addEventListener("variant:change",handleVariantChange),handleVariantChange()}); 2//# sourceMappingURL=/cdn/shop/t/41/assets/variant-image-filter.js.map?v=96519500036860138461790281845
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.