PageSourceSearch

https://www.championstore.com/cdn/shop/t/14/assets/_product.js?v=9200144567133003861788433656

js championstore.com collected 2026-10-02 06:22:32 UTC 9,038 bytes, 5 lines download raw bytes

1document.addEventListener("DOMContentLoaded",()=>{const RESTOCK_SDK_URL="https://static.shopgram.io/restock-alerts-sdk.js";function scheduleIdle(task){"requestIdleCallback"in window?requestIdleCallback(task,{timeout:1500}):setTimeout(task,200)}function initSizeSelection(){const sizeContainer=document.querySelector(".size__variant--selector");if(!sizeContainer)return;const selectedVariantElement=document.getElementById("js-selected-variant"),omnibusElement=document.getElementById("js-omnibus-price"),stockLevelElement=document.getElementById("stock-level"),addToCartButton=document.querySelector(".button-add-cart");function updateButtonText(isSelected){if(!addToCartButton)return;const textAvailable=addToCartButton.dataset.textAvailable||"Add to cart",textDefault=addToCartButton.dataset.textDefault||"Select size";if(isSelected){const cartIcon=`<svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2            <path d="M6.32129 1.11888H6.27129V1.16888V7.16888V7.21888H6.32129H7.29481H7.34481V7.16888V2.27919H12.2978V7.16888V7.21888H12.3478H13.3213H13.3713V7.16888V1.16888V1.11888H13.3213H6.32129Z" fill="white" stroke="white" stroke-width="0.1"/>
3            <path d="M2.32129 4.11888H2.27129V4.16888V17.1689V17.2189H2.32129H17.3213H17.3713V17.1689V4.16888V4.11888H17.3213H2.32129ZM3.34052 16.0523V5.28556H16.3021V16.0523H3.34052Z" fill="white" stroke="white" stroke-width="0.1"/>
4          </svg>`;addToCartButton.innerHTML=cartIcon+" "+textAvailable,addToCartButton.disabled=!1}else addToCartButton.textContent=textDefault,addToCartButton.disabled=!0}function updateUrlWithVariant(variantId){if(!variantId)return;const url=new URL(window.location.href);url.searchParams.set("variant",variantId),window.history.replaceState({path:url.toString()},"",url.toString())}function applySelection(labelEl){if(!labelEl)return;const variantTitle=labelEl.getAttribute("data-title"),omnibusPrice=labelEl.getAttribute("data-omnibus"),omnibusDiscounted=labelEl.getAttribute("data-omnibus-discounted"),stockValue=labelEl.getAttribute("data-stock"),variantInput=labelEl.querySelector("input"),variantId=variantInput?variantInput.value:null;if(selectedVariantElement)if(window.product?.tags?.includes("champ_conceptline:nowhere university")){const map={1:"S-M",2:"M-L",3:"L-XL",I:"S-M",II:"M-L",III:"L-XL"};selectedVariantElement.textContent=map[variantTitle]||variantTitle}else selectedVariantElement.textContent=variantTitle;if(omnibusElement)if(omnibusDiscounted==="true"){const prevText=omnibusElement.getAttribute("data-prev")||"";omnibusElement.textContent=prevText+omnibusPrice}else omnibusElement.textContent="";if(stockLevelElement){const parsedStock=Number(stockValue);if(!Number.isNaN(parsedStock)&&parsedStock<=3){const translationTemplate=labelEl.getAttribute("data-t")||stockLevelElement.getAttribute("data-t")||"{stock}";stockLevelElement.textContent=translationTemplate.replace("{stock}",String(parsedStock))}else stockLevelElement.textContent=""}updateButtonText(!0),updateUrlWithVariant(variantId);const acceleratedCheckoutVariant=document.getElementById("product-variant-id");acceleratedCheckoutVariant&&variantId&&(acceleratedCheckoutVariant.value=variantId)}sizeContainer.addEventListener("change",event=>{const targetInput=event.target.closest('input[type="radio"]');if(!targetInput)return;const labelEl=targetInput.closest(".js-size");applySelection(labelEl)});const checkedSize=sizeContainer.querySelector("input:checked");checkedSize?applySelection(checkedSize.closest(".js-size")):updateButtonText(!1);function initFromUrlParam(){const variantId=new URLSearchParams(window.location.search).get("variant");if(variantId){const matchingInput=sizeContainer.querySelector(`input[value="${variantId}"]`);matchingInput&&(matchingInput.checked=!0,applySelection(matchingInput.closest(".js-size")))}}initFromUrlParam()}initSizeSelection();function initCustomScrollbar(){const progressBar=document.querySelector(".progress-bar"),rail=document.querySelector(".rail");let scrollableElement=null;function isDesktop(){return window.innerWidth>=1024}function updateScrollbarThumb(){if(!scrollableElement||!progressBar||!rail)return;const scrollTop=scrollableElement.scrollTop,scrollHeight=scrollableElement.scrollHeight,clientHeight=scrollableElement.clientHeight,railHeight=rail.offsetHeight,progressHeight=rail.querySelector(".progress").offsetHeight;if(scrollHeight<=clientHeight||railHeight<=0){progressBar.style.height="0px",progressBar.style.top="0px";return}
4const thumbHeightRatio=clientHeight/scrollHeight;let thumbHeight=Math.max(thumbHeightRatio*progressHeight,20);thumbHeight=Math.min(thumbHeight,progressHeight);const maxScrollTop=scrollHeight-clientHeight,maxThumbTop=progressHeight-thumbHeight;let thumbTopRatio=scrollTop/maxScrollTop;thumbTopRatio=Math.min(Math.max(thumbTopRatio,0),1);const thumbTop=thumbTopRatio*maxThumbTop;progressBar.style.height=`${thumbHeight}px`,progressBar.style.top=`${thumbTop}px`,progressBar.style.transform="translateY(0)"}function setupScrollTracking(){if(scrollableElement&&(scrollableElement.removeEventListener("scroll",updateScrollbarThumb),scrollableElement=null),progressBar&&(progressBar.style.height="0px",progressBar.style.top="0px"),isDesktop()){const potentialScrollElements=[document.querySelector(".splide__list"),document.querySelector(".splide__track"),document.querySelector(".product__images-silder")];for(const el of potentialScrollElements)if(el&&el.scrollHeight>el.clientHeight){scrollableElement=el,scrollableElement.addEventListener("scroll",updateScrollbarThumb,{passive:!0}),updateScrollbarThumb(),setupScrollButtons(scrollableElement);break}}}function setupScrollButtons(elementToScroll){const scrollUpBtn=document.querySelector(".scroll-up"),scrollDownBtn=document.querySelector(".scroll-down");if(scrollUpBtn){const newScrollUpBtn=scrollUpBtn.cloneNode(!0);scrollUpBtn.parentNode.replaceChild(newScrollUpBtn,scrollUpBtn),newScrollUpBtn.addEventListener("click",()=>{elementToScroll&&elementToScroll.scrollBy({top:-300,behavior:"smooth"})})}if(scrollDownBtn){const newScrollDownBtn=scrollDownBtn.cloneNode(!0);scrollDownBtn.parentNode.replaceChild(newScrollDownBtn,scrollDownBtn),newScrollDownBtn.addEventListener("click",()=>{elementToScroll&&elementToScroll.scrollBy({top:300,behavior:"smooth"})})}}setupScrollTracking();let resizeTimeout;window.addEventListener("resize",()=>{clearTimeout(resizeTimeout),resizeTimeout=setTimeout(setupScrollTracking,250)});const listElement=document.querySelector(".splide__list");if(listElement){let scrollTrackingTimeout;new MutationObserver(()=>{clearTimeout(scrollTrackingTimeout),scrollTrackingTimeout=setTimeout(setupScrollTracking,200)}).observe(listElement,{childList:!0}),listElement.querySelectorAll("img").forEach(img=>{img.addEventListener("load",()=>{clearTimeout(scrollTrackingTimeout),scrollTrackingTimeout=setTimeout(setupScrollTracking,200)})})}}function initCopyToClipboard(){const copyButton=document.querySelector(".product__copy-link");if(!copyButton)return;let popoverTimeout=null;const popover=document.querySelector(".popover");function showPopover(){popover&&(clearTimeout(popoverTimeout),popover.classList.add("active"),popoverTimeout=window.setTimeout(()=>{popover.classList.remove("active")},2e3))}function fallbackCopyText(text){try{const textarea=document.createElement("textarea");return textarea.value=text,textarea.style.position="fixed",textarea.style.left="-9999px",document.body.appendChild(textarea),textarea.select(),document.execCommand("copy"),document.body.removeChild(textarea),!0}catch(err){return console.error("Fallback: Oops, unable to copy",err),!1}}copyButton.addEventListener("click",e=>{e.preventDefault();const textToCopy=copyButton.getAttribute("data-link")||copyButton.dataset.link;textToCopy&&(navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(textToCopy).then(()=>{showPopover()}).catch(err=>{console.warn("Clipboard API failed, using fallback. Error:",err),fallbackCopyText(textToCopy)&&showPopover()}):fallbackCopyText(textToCopy)&&showPopover())})}function loadRestockSdk(){return window._restockSdkPromise?window._restockSdkPromise:window.RestockAlerts?(window._restockSdkPromise=Promise.resolve(),window._restockSdkPromise):(window._restockSdkPromise=new Promise((resolve,reject)=>{const script=document.createElement("script");script.src=RESTOCK_SDK_URL,script.async=!0,script.onload=()=>resolve(),script.onerror=reject,document.head.appendChild(script)}),window._restockSdkPromise)}function initRestockLazyLoad(){const notifyButtons=document.querySelectorAll(".notify-me");
4if(!notifyButtons.length)return;const triggerLoad=()=>{loadRestockSdk().catch(err=>{console.warn("Restock SDK failed to load",err)})};notifyButtons.forEach(btn=>{btn.addEventListener("click",()=>{triggerLoad()},{once:!0})})}scheduleIdle(initCustomScrollbar),scheduleIdle(initCopyToClipboard),scheduleIdle(initRestockLazyLoad)});
5//# sourceMappingURL=/cdn/shop/t/14/assets/_product.js.map?v=9200144567133003861788433656

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.