1(function(){const slider=document.getElementById("testimonialSlider"),sliderContainer=document.querySelector(".testimonial-slider-container"),prevBtn=document.getElementById("prevArrow"),nextBtn=document.getElementById("nextArrow"),cards=slider.querySelectorAll(".testimonial-card"),totalCards=cards.length;let currentIndex=0,cardsVisible=3;const CARD_GAP=20,RESIZE_DEBOUNCE_DELAY=250,MOBILE_BREAKPOINT=768,TABLET_BREAKPOINT=1024;function updateCardsVisible(){const width=window.innerWidth;width<MOBILE_BREAKPOINT?cardsVisible=1:width<TABLET_BREAKPOINT?cardsVisible=2:cardsVisible=3}function updateSlider(){const cardWidth=cards[0].offsetWidth,offset=-(currentIndex*(cardWidth+CARD_GAP));slider.style.transform=`translateX(${offset}px)`,updateContainerHeight()}function updateContainerHeight(){const visibleCards=Array.from(cards).slice(currentIndex,currentIndex+cardsVisible);if(!visibleCards.length)return;cards.forEach(card=>{card.style.height="auto"});const maxHeight=visibleCards.reduce((max,card)=>Math.max(max,card.getBoundingClientRect().height),0);sliderContainer.style.height=`${Math.ceil(maxHeight)}px`}prevBtn.addEventListener("click",function(){currentIndex>0?currentIndex--:currentIndex=totalCards-cardsVisible,updateSlider()}),nextBtn.addEventListener("click",function(){currentIndex<totalCards-cardsVisible?currentIndex++:currentIndex=0,updateSlider()});let resizeTimer;window.addEventListener("resize",function(){clearTimeout(resizeTimer),resizeTimer=setTimeout(function(){const oldCardsVisible=cardsVisible;updateCardsVisible(),oldCardsVisible!==cardsVisible&&(currentIndex=0),updateSlider()},RESIZE_DEBOUNCE_DELAY)}),updateCardsVisible(),updateSlider()})(),(function(){const spotlightSlider=document.getElementById("spotlightSlider"),spotlightPrevBtn=document.getElementById("spotlightPrevArrow"),spotlightNextBtn=document.getElementById("spotlightNextArrow"),spotlightSlides=spotlightSlider.querySelectorAll(".spotlight-slide"),totalSlides=spotlightSlides.length;let currentSlideIndex=0;const RESIZE_DEBOUNCE_DELAY=250;function updateSpotlightSlider(){const slideWidth=spotlightSlides[0].offsetWidth,offset=-(currentSlideIndex*slideWidth);spotlightSlider.style.transform=`translateX(${offset}px)`}spotlightPrevBtn.addEventListener("click",function(){currentSlideIndex>0?currentSlideIndex--:currentSlideIndex=totalSlides-1,updateSpotlightSlider()}),spotlightNextBtn.addEventListener("click",function(){currentSlideIndex<totalSlides-1?currentSlideIndex++:currentSlideIndex=0,updateSpotlightSlider()});let spotlightResizeTimer;window.addEventListener("resize",function(){clearTimeout(spotlightResizeTimer),spotlightResizeTimer=setTimeout(function(){updateSpotlightSlider()},RESIZE_DEBOUNCE_DELAY)}),updateSpotlightSlider()})(),(function(){const logoTrack=document.querySelector(".logo-slider-track");if(!logoTrack)return;let isCalculated=!1;const DEFAULT_GAP=100,LAYOUT_STABILITY_DELAY=100;function calculateScrollDistance(){const allLogos=logoTrack.querySelectorAll("img"),totalLogos=allLogos.length;if(totalLogos===0)return;const uniqueLogoCount=totalLogos/2,computedStyle=window.getComputedStyle(logoTrack),gap=parseFloat(computedStyle.gap)||DEFAULT_GAP;let totalWidth=0;for(let i=0;i<uniqueLogoCount;i++)totalWidth+=allLogos[i].offsetWidth,i<uniqueLogoCount-1&&(totalWidth+=gap);totalWidth>0&&(logoTrack.style.setProperty("--scroll-distance",`-${totalWidth}px`),isCalculated=!0)}function initSlider(){const allLogos=logoTrack.querySelectorAll("img");let loadedCount=0;const totalLogos=allLogos.length;if(totalLogos===0)return;function checkAllLoaded(){loadedCount++,loadedCount===totalLogos&&!isCalculated&&setTimeout(calculateScrollDistance,LAYOUT_STABILITY_DELAY)}allLogos.forEach(img=>{img.complete?checkAllLoaded():(img.addEventListener("load",checkAllLoaded),img.addEventListener("error",checkAllLoaded))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initSlider):initSlider(),window.addEventListener("load",function(){isCalculated||calculateScrollDistance()})})(),(function(){document.addEventListener("DOMContentLoaded",function(){const form=document.querySelector(".newsletter-form"),successMessage=document.querySelector(".form-success-message"),newsletterFooter=document.querySelector(".newsletter-footer");if(!form)return;const submitButton=form.querySelector(".newsletter-submit"),originalButtonText=submitButton?submitButton.textContent:"Get 10% Off";let isSubmitting=!1,beforeUnloadHandler=null;const HUBSPOT_API_URL="https://api.hsforms.com/submissions/v3/integration/submit/242488439/88489357-437f-4cc5-a56c-958f0ec85aac";form.addEventListener("submit",function(e){if(e.preventDefault(),isSubmitting)return;isSubmitting=!0,submitButton&&(submitButton.disabled=!0,submitButton.textContent="Submitting...");const hubspotData={fields:[{name:"email",value:new FormData(form).get("email")||""}]};beforeUnloadHandler=function(e2){return e2.preventDefault(),e2.returnValue="Your form is being submitted. Are you sure you want to leave?",e2.returnValue},window.addEventListener("beforeunload",beforeUnloadHandler),fetch(HUBSPOT_API_URL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(hubspotData)}).then(response=>{if(!response.ok)throw new Error("Network response was not ok");return response.json()}).then(data=>{if(console.log("HubSpot submission response:",data),data.inlineMessage||data.errors||data.status==="error")throw console.error("HubSpot returned error in response:",data),new Error(data.inlineMessage||"HubSpot submission failed");const email=hubspotData.fields[0].value;email&&rudderanalytics.identify(email),beforeUnloadHandler&&window.removeEventListener("beforeunload",beforeUnloadHandler),isSubmitting=!1,form.classList.add("hidden"),newsletterFooter&&newsletterFooter.classList.add("hidden"),successMessage.classList.add("show"),successMessage.scrollIntoView({behavior:"smooth",block:"center"})}).catch(error=>{console.error("HubSpot submission error:",error),Bugsnag.notify(error),beforeUnloadHandler&&window.removeEventListener("beforeunload",beforeUnloadHandler),isSubmitting=!1,submitButton&&(submitButton.disabled=!1,submitButton.textContent=originalButtonText)})})})})(),(function(){const heroBottomText=document.querySelector(".hero-bottom-text p");
1if(!heroBottomText)return;const ORIGINAL_HTML=heroBottomText.innerHTML,MOBILE_BREAKPOINT=700;function updateHeroBottomText(){if(window.innerWidth<=MOBILE_BREAKPOINT){const mobileHTML=ORIGINAL_HTML.replace(/\s* \s*â¢\s* \s*/g,"<br>").replace(/\s*â¢\s*/g,"<br>");heroBottomText.innerHTML=mobileHTML}else heroBottomText.innerHTML=ORIGINAL_HTML}updateHeroBottomText(),window.addEventListener("resize",updateHeroBottomText)})(); 2//# sourceMappingURL=/cdn/shop/t/3/assets/homepage.js.map?v=1057171577087246161776291166
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.