PageSourceSearch

https://www.avontic.com/cdn/shop/t/164/assets/avontic-pdp-accessory151.js?v=136432286000057960641791557317

js avontic.com collected 2026-10-09 22:43:07 UTC 2,137 bytes, 2 lines download raw bytes

1(()=>{if(window.av151AccessoryGuard)return;window.av151AccessoryGuard=!0;const selector="[data-av151-single-addon]",bound=new WeakSet;let revision=0,timer;const root=window.Shopify?.routes?.root||"/",flatten=items=>(items||[]).flatMap(item=>[item,...flatten(item.item_components||item.components)]),inCart=(cart,productId)=>flatten(cart.items).some(item=>String(item.product_id||item.product?.id)===String(productId)),readCart=async()=>{const response=await fetch(root+"cart.js",{cache:"no-store",headers:{Accept:"application/json"}});if(!response.ok)throw Error("Cart unavailable");return response.json()},conceal=el=>el.setAttribute("data-av151-guard-hidden",""),eligibleCard=el=>[...el.querySelectorAll("[data-extras-kind]")].find(card=>!card.hidden);async function sync(){const current=++revision,offers=[...document.querySelectorAll(selector)];if(offers.forEach(conceal),!offers.length)return;let cart;try{cart=await readCart()}catch{return}if(current===revision)for(const el of offers)!eligibleCard(el)||!el.dataset.addonProductId||inCart(cart,el.dataset.addonProductId)||(el.removeAttribute("data-av151-guard-hidden"),!bound.has(el)&&(bound.add(el),el.addEventListener("submit",event=>{(el.hasAttribute("data-av151-guard-hidden")||!eligibleCard(el))&&(event.preventDefault(),event.stopImmediatePropagation())},!0)))}const schedule=()=>{document.querySelectorAll(selector).forEach(conceal),clearTimeout(timer),timer=setTimeout(sync,120)};["cart:change","cart:refresh","cart:updated","variant:add","variant:change","product:variant-change","shopify:section:load"].forEach(name=>document.addEventListener(name,schedule)),window.addEventListener("pageshow",schedule),document.addEventListener("visibilitychange",()=>{document.hidden||schedule()}),new MutationObserver(records=>{records.some(record=>[...record.addedNodes].some(node=>node.nodeType===1&&(node.matches?.(selector)||node.querySelector?.(selector))))&&schedule()}).observe(document.querySelector("#main")||document.body,{childList:!0,subtree:!0}),schedule()})();
2//# sourceMappingURL=/cdn/shop/t/164/assets/avontic-pdp-accessory151.js.map?v=136432286000057960641791557317

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.