1var module_221909472480=void document.addEventListener("alpine:init",(()=>{Alpine.data("productListing",(()=>({filters:{},resultCount:0,get productElements(){return document.querySelectorAll(".product-filter")},get filterCheckboxes(){return document.querySelectorAll(".product-filter-checkbox")},get resultText(){return 1===this.resultCount?"result":"results"},init(){this.resultCount=this.productElements.length},updateResultCount(){this.resultCount=Array.from(this.productElements).filter((el=>"none"!==el.style.display)).length},animateCards(cards){cards.length&&(gsap.killTweensOf(cards),gsap.set(cards,{autoAlpha:0,y:10}),gsap.to(cards,{autoAlpha:1,y:0,duration:.8,ease:"power2.out",stagger:.1}))},filterProducts(e,filterType){this.filters[filterType]||(this.filters[filterType]=[]),e.target.checked?this.filters[filterType].push(e.target.value):(this.filters[filterType]=this.filters[filterType].filter((filter=>filter!==e.target.value)),0===this.filters[filterType].length&&delete this.filters[filterType]);const cardsToShow=[];if(0===Object.keys(this.filters).length)return this.productElements.forEach((element=>{element.style.display="",cardsToShow.push(element.querySelector(".product-card"))})),this.updateResultCount(),void this.animateCards(cardsToShow);this.productElements.forEach((element=>{element.style.display="none",Object.entries(this.filters).every((([filterType,filterValues])=>filterValues.some((filterValue=>element.classList.contains(filterValue)))))&&(element.style.display="",cardsToShow.push(element.querySelector(".product-card")))})),this.updateResultCount(),this.animateCards(cardsToShow)},resetFilter(){this.filters={};const cardsToShow=[];this.filterCheckboxes.forEach((checkbox=>{checkbox.checked=!1})),this.productElements.forEach((element=>{element.style.display="",cardsToShow.push(element.querySelector(".product-card"))})),this.updateResultCount(),this.animateCards(cardsToShow)}})))})); 2//# sourceURL=https://143576122.fs1.hubspotusercontent-eu1.net/hubfs/143576122/hub_generated/module_assets/1/221909472480/1753371429217/module_product-listing.js
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.