PageSourceSearch

https://www.alpinestars.com/cdn/shop/t/196/assets/soft-navigation.js?v=160950836955125951891784987692

js alpinestars.com collected 2026-10-02 05:47:28 UTC 4,510 bytes, 2 lines download raw bytes

1if(!window.__lengthSoftNavInit){window.__lengthSoftNavInit=!0;const getPageSections=()=>{const sectionIds=[],mainSection=document.querySelector('[id^="shopify-section-"][id*="__main"], #shopify-section-main');sectionIds.push(mainSection?mainSection.id.replace("shopify-section-",""):"main");const recommendationsSection=document.querySelector('[id^="shopify-section-"][id*="recommendations"]');return recommendationsSection&&sectionIds.push(recommendationsSection.id.replace("shopify-section-","")),sectionIds},updateSection=(sectionId,parsedDocument)=>{const sectionElement=document.querySelector(`#shopify-section-${sectionId}`)||document.querySelector(`[id^="shopify-section-"][id$="__${sectionId}"]`);if(!sectionElement)return;const newContent=parsedDocument.querySelector(".shopify-section")||parsedDocument.body.firstElementChild;if(!newContent)return;const originalId=sectionElement.id,originalClassName=sectionElement.className;sectionElement.innerHTML=newContent.innerHTML,sectionElement.id=originalId,sectionElement.className=originalClassName;for(const scriptElement of sectionElement.querySelectorAll("script[src]")){const newScript=document.createElement("script");newScript.type=scriptElement.type||"module",newScript.src=scriptElement.src,scriptElement.replaceWith(newScript)}sectionElement.dispatchEvent(new CustomEvent("shopify:section:load",{bubbles:!0}))};let abortController=null;const softNavigate=async targetUrl=>{abortController&&abortController.abort(),abortController=new AbortController;const mainSectionElement=document.querySelector("#shopify-section-main");mainSectionElement&&(mainSectionElement.classList.add("is-loading"),mainSectionElement.setAttribute("aria-busy","true"));try{const baseUrl=targetUrl.split("?")[0],sectionIdsParam=getPageSections().join(","),response=await fetch(`${baseUrl}?sections=${sectionIdsParam}`,{credentials:"same-origin",signal:abortController.signal});if(!response.ok)throw new Error(`HTTP ${response.status}`);const sectionsData=await response.json(),parsedSections=Object.entries(sectionsData).filter(([,htmlContent])=>htmlContent&&typeof htmlContent=="string").map(([sectionId,htmlContent])=>({sectionId,parsedDocument:new DOMParser().parseFromString(htmlContent,"text/html")})),scrollPosition=window.scrollY,applyUpdates=()=>{for(const{sectionId,parsedDocument}of parsedSections)updateSection(sectionId,parsedDocument);const pageHeading=parsedSections[0]?.parsedDocument.querySelector("h1");pageHeading&&(document.title=`${pageHeading.textContent?.trim()??""} \u2013 ${window.Shopify?.shop??""}`)};typeof document.startViewTransition=="function"?await document.startViewTransition(applyUpdates).finished:applyUpdates(),window.scrollTo(0,scrollPosition),history.pushState({softNav:!0},"",targetUrl)}catch(error){if(error.name==="AbortError")return;window.location.href=targetUrl}finally{abortController=null,mainSectionElement&&(mainSectionElement.classList.remove("is-loading"),mainSectionElement.setAttribute("aria-busy","false"))}};document.addEventListener("click",event=>{const navigationLink=event.target?.closest("a[data-length-navigate], a[data-gear-set-navigate]");navigationLink&&(event.preventDefault(),event.stopPropagation(),softNavigate(navigationLink.href))}),window.addEventListener("popstate",async event=>{if(!event.state?.softNav)return;abortController&&abortController.abort(),abortController=new AbortController;const mainSectionElement=document.querySelector("#shopify-section-main");mainSectionElement&&(mainSectionElement.classList.add("is-loading"),mainSectionElement.setAttribute("aria-busy","true"));try{const baseUrl=document.location.href.split("?")[0],sectionIdsParam=getPageSections().join(","),response=await fetch(`${baseUrl}?sections=${sectionIdsParam}`,{credentials:"same-origin",signal:abortController.signal});if(!response.ok)throw new Error(`HTTP ${response.status}`);const sectionsData=await response.json(),scrollPosition=window.scrollY;for(const[sectionId,htmlContent]of Object.entries(sectionsData))htmlContent&&typeof htmlContent=="string"&&updateSection(sectionId,new DOMParser().parseFromString(htmlContent,"text/html"));window.scrollTo(0,scrollPosition)}catch(error){error.name!=="AbortError"&&(window.location.href=document.location.href)}finally{abortController=null,mainSectionElement&&(mainSectionElement.classList.remove("is-loading"),mainSectionElement.setAttribute("aria-busy","false"))}})}
2//# sourceMappingURL=/cdn/shop/t/196/assets/soft-navigation.js.map?v=160950836955125951891784987692

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.