1$(document).ready(function(){console.log("announcement"),console.log($(".announcement").length),$(".announcement").length>0&&(console.log("announcement"),$("body").addClass("has-announcement")),$(document).on("click",".copy-btn",function(){const textToCopy=$(this).siblings(".text-to-copy").text();navigator.clipboard.writeText(textToCopy).then(()=>{alert("Code copied to clipboard: "+textToCopy)}).catch(err=>{console.error("Failed to copy text: ",err)})}),$(".announcement").length&&($(".announcement").parent().addClass("announcement_wrapper"),window.innerWidth<=767&&$(".site-header").css("top",$(".announcement").outerHeight(!0)),$("#PageContainer").addClass("hasAnnouncementBar"),window.addEventListener("scroll",function(){const bar=document.querySelector(".announcement");window.scrollY>0})),setTimeout(function(){console.log("doc ready"),console.log($('div[option-name="Style"]').length),$('div[option-name="Style"] ul li').on("click",function(){console.log("style select"),setTimeout(function(){$('div[option-name="Color"] ul li span').click()},500)})},5e3),$(".clear-cart").on("click",function(){$.ajax({type:"POST",url:"/cart/clear.js",dataType:"json",success:function(){$(".cart-items").empty(),$(".cart-total").text("0.00")},error:function(){console.error("Failed to clear the cart.")}})})}),$(document).ready(function(){$(".close-popup").click(function(){return $("#newsletter-popup").fadeOut(),$("#products-popup").css("visibility","hidden"),!1}),$(window).click(function(event){$(event.target).is("#newsletter-popup")&&$("#newsletter-popup").fadeOut()})}),$(document).ready(function(){$(".popup-footer .btn.checkout").click(function(){$(".btn.cart__checkout").click()})});function removeFromCart(event,itemId){return event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),console.log(itemId),console.log("removeFromCart triggered"),fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:itemId,quantity:0})}).then(response=>response.json()).then(cart=>{updateCartUI(cart,itemId)}).catch(error=>console.error("Error:",error)),!1}function updateCartUI(cart,itemId){let itemElement=document.querySelector(`.cart_item_${itemId}`);itemElement&&itemElement.remove(),console.log(cart);let cartTotalElement=document.querySelector("div[data-subtotal]");if(cartTotalElement){let cartTotal=cart.items_subtotal_price/100;cartTotalElement.textContent=`$${cartTotal.toFixed(2)}`}if(cart.item_count===0){let cartContainer=document.querySelector("#CartDrawer .drawer__scrollable"),cartFooter=document.querySelector("#CartDrawer .drawer__footer");cartContainer&&$(".cart-link__bubble").removeClass("cart-link__bubble--visible")}}$(document).ready(function(){setTimeout(function(){$(window).width()<=767&&$(".grid").each(function(){var $grid=$(this),$container=$grid.find("> .product-grid-container"),$items=$container.find(".grid__item");if(console.log($container.length),$items.length!==0){$container.remove();for(var i=0;i<$items.length;i+=2){var $newContainer=$('<div class="product-grid-container"></div>');$newContainer.append($items.slice(i,i+2)),$grid.append($newContainer)}}}),$(".grid-overflow-wrapper .grid, .grid .product-grid-container").each(function(){var $grid=$(this),addClass=!1;$grid.find("ul.swatch-view").each(function(){if($(this).find("li").length>2)return addClass=!0,!1}),addClass&&$grid.find("ul.swatch-view").addClass("extra-height")})},2e3)}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".header-item [data-disclosure-form]").forEach(function(el){new theme.Disclosure(el)})}),document.querySelectorAll(" [data-disclosure-option]").forEach(option=>{option.addEventListener("click",function(e){const redirectUrl=e.currentTarget.getAttribute("data-redirect-url");redirectUrl&&(e.preventDefault(),e.stopImmediatePropagation(),console.log(redirectUrl),window.location.href=redirectUrl)})}),document.addEventListener("DOMContentLoaded",function(){const textureFieldset=document.querySelector('fieldset.variant-input-wrap[name="T"]');if(textureFieldset){const parentDiv=textureFieldset.closest("div");parentDiv&&(parentDiv.style.display="none");const smoothOption=document.querySelector('div.variant-input[data-value="S"] label'),roughOption=document.querySelector('div.variant-input[data-value="R"] label')}}),document.addEventListener("DOMContentLoaded",function(){if(window.location.hostname=="www.sixzeropickleball.com"&&window.location.pathname.endsWith("/apps/product-registration"))console.log("reg : NFS register"),fetch("/browsing_context_suggestions.json").then(res=>res.json()).then(data=>{const country=data?.detected_values?.country?.handle,NORTH_AMERICA_COUNTRIES=["US","MX","BM","GL","PM","GT","BZ","SV","HN","NI","CR","PA","BS","CU","JM","HT","DO","KN","LC","VC","BB","GD","AG","DM","TT"],id=new URLSearchParams(window.location.search).get("ID");id&&(console.log("reg : Detected country:",country),country==="CA"?window.location.href=`https://sixzerocanada.com/apps/product-registration?ID=${encodeURIComponent(id)}`:NORTH_AMERICA_COUNTRIES.includes(country)&&(window.location.href=`https://us.sixzeropickleball.com/apps/product-registration?ID=${encodeURIComponent(id)}`))}).catch(err=>console.error("Geo-location error:",err));else{const ua=navigator.userAgent.toLowerCase(),isBot=["googlebot","google-inspectiontool","googleother","adsbot-google","bingbot","bingpreview","duckduckbot","yandexbot","baiduspider","slurp"].some(bot=>ua.includes(bot));if(console.log("check bot"),console.log(ua),isBot){console.log("Bot detected \u2014 skipping geo redirect");return}const STORES={US:"us.sixzeropickleball.com",CA:"sixzerocanada.com",MAIN:"sixzeropickleball.com"},NORTH_AMERICA_COUNTRIES=["US","MX","BM","GL","PM","GT","BZ","SV","HN","NI","CR","PA","BS","CU","JM","HT","DO","KN","LC","VC","BB","GD","AG","DM","TT"],params=new URLSearchParams(window.location.search);if((params.get("geo_redirect")==="off"||params.get("geo_bypass")==="true")&&sessionStorage.setItem("geo_redirect","off"),(params.get("geo_redirect")==="on"||params.get("geo_bypass")==="false")&&sessionStorage.setItem("geo_redirect","on"),sessionStorage.getItem("geo_redirect")=="off")return;const currentHost=window.location.hostname,currentPath=window.location.pathname,currentQuery=window.location.search,sessionKey="geo_redirect_done";console.log("geo redirect"),fetch("/browsing_context_suggestions.json").then(res=>res.json()).then(data=>{const country=data?.detected_values?.country?.handle;let targetDomain=null;country==="CA"?currentHost!==STORES.CA&&(targetDomain=STORES.CA):NORTH_AMERICA_COUNTRIES.includes(country)?currentHost!==STORES.US&&(targetDomain=STORES.US):(currentHost===STORES.US||currentHost===STORES.CA)&&(targetDomain=STORES.MAIN),targetDomain&&(sessionStorage.setItem(sessionKey,"true"),eraseCookie("localization"),eraseCookie("mdApp_countryCodeDomain"),window.location.href=`https://${targetDomain}${currentPath}${currentQuery}`)}).catch(err=>console.error("Geo-location error:",err))}
1function eraseCookie(name){document.cookie=name+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain="+location.hostname+";"}}),(function(){const sizeGuideEl=document.querySelector(".grid-product__sizeguide");if(!sizeGuideEl)return;const imageUrl=window.__sizeGuideImageUrl||"",overlay=document.createElement("div");overlay.id="size-guide-overlay",Object.assign(overlay.style,{display:"none",position:"fixed",inset:"0",background:"rgba(0,0,0,0.6)",zIndex:"9999",alignItems:"center",justifyContent:"center"});const modal=document.createElement("div");Object.assign(modal.style,{position:"relative",background:"#fff",borderRadius:"8px",padding:"16px",maxWidth:"90vw",maxHeight:"90vh",overflow:"auto",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"});const closeBtn=document.createElement("button");closeBtn.innerHTML="×",Object.assign(closeBtn.style,{position:"absolute",top:"8px",right:"12px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",lineHeight:"1",color:"#333"});const img=document.createElement("img");img.src=imageUrl,img.alt="Size Guide",Object.assign(img.style,{display:"block",maxWidth:"100%",maxHeight:"calc(90vh - 64px)",width:"auto",height:"auto",margin:"auto"}),img.onload=function(){modal.style.width=img.naturalWidth+32+"px"},modal.appendChild(closeBtn),modal.appendChild(img),overlay.appendChild(modal),document.body.appendChild(overlay);function openModal2(){overlay.style.display="flex",document.body.style.overflow="hidden"}function closeModal2(){overlay.style.display="none",document.body.style.overflow=""}sizeGuideEl.style.cursor="pointer",sizeGuideEl.addEventListener("click",openModal2),closeBtn.addEventListener("click",closeModal2),overlay.addEventListener("click",function(e){e.target===overlay&&closeModal2()}),document.addEventListener("keydown",function(e){e.key==="Escape"&&closeModal2()})})(),document.addEventListener("DOMContentLoaded",()=>{initSizeGuideModals()});function initSizeGuideModals(){document.querySelectorAll(".size-guide-trigger").forEach(trigger=>{const modalId=trigger.getAttribute("aria-controls"),modal=document.getElementById(modalId);if(!modal)return;const closeBtn=modal.querySelector(".sg-modal__close");trigger.addEventListener("click",()=>openModal(modal)),closeBtn.addEventListener("click",()=>closeModal(modal)),modal.addEventListener("click",e=>{e.target===modal&&closeModal(modal)}),modal.addEventListener("keydown",e=>{e.key==="Escape"&&closeModal(modal)})})}function openModal(modal){modal.removeAttribute("hidden"),modal.classList.add("is-opening"),modal.removeEventListener("animationend",onOpenEnd),modal.addEventListener("animationend",onOpenEnd,{once:!0}),document.body.style.overflow="hidden",modal.focus()}function closeModal(modal){modal.classList.remove("is-opening"),modal.classList.add("is-closing"),modal.addEventListener("animationend",()=>{modal.setAttribute("hidden",""),modal.classList.remove("is-closing"),document.body.style.overflow=""},{once:!0})}function onOpenEnd(e){e.target.classList.remove("is-opening")}let currentUnit="cm";function setUnit(unit){unit!==currentUnit&&(currentUnit=unit,document.getElementById("btn-cm").classList.toggle("active",unit==="cm"),document.getElementById("btn-in").classList.toggle("active",unit==="in"),document.getElementById("btn-cm").setAttribute("aria-pressed",unit==="cm"),document.getElementById("btn-in").setAttribute("aria-pressed",unit==="in"),document.querySelectorAll("td[data-cm]").forEach(function(td){td.textContent=td.getAttribute("data-"+unit)}))}setUnit("cm");const rebuyHiddenVariantIds=["48916732903728-1 "];function hideRebuyVariants(){document.querySelectorAll(".rebuy-product-block").forEach(function(product){product.querySelectorAll(".rebuy-select option").forEach(function(option){rebuyHiddenVariantIds.includes(option.value)&&option.remove()}),product.querySelectorAll(".rebuy-product-options__button-swatch").forEach(function(swatch){const input=swatch.querySelector("input");input&&rebuyHiddenVariantIds.includes(input.value)&&swatch.remove()})})}hideRebuyVariants();const rebuyVariantObserver=new MutationObserver(function(){hideRebuyVariants()});rebuyVariantObserver.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("DOMContentLoaded",function(){const colorMap={chalk:"#E8E4D8",blue:"#0066FF",navy:"#000080",black:"#000000",white:"#FFFFFF",red:"#FF0000",green:"#008000",yellow:"#FFD700",orange:"#FFA500",pink:"#FFC0CB",purple:"#800080",grey:"#808080",gray:"#808080",brown:"#8B4513",beige:"#F5F5DC","ocean blue":"#0077BE","barely pink":"#F7D6D9",skyway:"#87CEEB","opal black print":"#1C1C1C","opal white print":"#F5F5F5","dazzling blue":"#3A75C4",violet:"#a6236b",burgundy:"#8
100020","ruby red":"#E0115F","cherry blossom pink":"#FFB7C5",teal:"#008080",amethyst:"#9966CC","light purple":"#800080",ruby:"#E0115F","black and grey logo":"#000000","black and white logo":"#000000","pink and white logo":"#FFC0CB","white and black logo":"#FFFFFF","red with white logo":"#FF0000"};function addApparelColorNames(){const productSection=document.querySelector('[data-is-apparel="true"]');if(!productSection)return;const colorOption=productSection.querySelector('[option-name="Color"]');if(!colorOption)return;colorOption.querySelectorAll(".swatch-view-item").forEach(function(swatch){const origValue=swatch.getAttribute("orig-value");if(!origValue)return;const colorName=origValue.split(/\s+(?:with|and)\s+/i)[0].trim();if(!colorName)return;const colorKey=colorName.toLowerCase(),colorValue=colorMap[colorKey];if(!colorValue){console.log("No color mapping found for:",colorName);return}const titleElement=swatch.querySelector(".swatch-button-title-text");if(!titleElement||titleElement.querySelector(".apparel-color-option"))return;const span=document.createElement("span");span.className="apparel-color-option",span.style.backgroundColor=colorValue,span.setAttribute("title",colorName),span.setAttribute("aria-label",colorName),titleElement.insertBefore(span,titleElement.firstChild)})}addApparelColorNames(),new MutationObserver(function(){addApparelColorNames()}).observe(document.body,{childList:!0,subtree:!0})}),document.addEventListener("DOMContentLoaded",function(){const product=document.querySelector('[data-is-apparel="true"]');product&&product.addEventListener("click",function(event){event.target.closest(".swatch-button")&&setTimeout(function(){const colorOption=product.querySelector('[option-name="Color"]');if(!colorOption)return;const selected=colorOption.querySelector(".swatch-button.swatch-selected");if(!selected)return;const value=selected.getAttribute("orig-value");if(!value)return;const label=colorOption.querySelector("legend > label");if(!label)return;let span=label.querySelector(".selected-apparel-color");span||(span=document.createElement("span"),span.className="selected-apparel-color",label.appendChild(span)),span.textContent=" : "+value},50)})}),document.addEventListener("DOMContentLoaded",function(){const colorMap={chalk:"#E8E4D8",blue:"#0066FF",navy:"#000080",black:"#000000",white:"#FFFFFF",red:"#FF0000",green:"#008000",yellow:"#FFD700",orange:"#FFA500",pink:"#FFC0CB",purple:"#800080",grey:"#808080",gray:"#808080",brown:"#8B4513",beige:"#F5F5DC","ocean blue":"#0077BE","barely pink":"#F7D6D9",skyway:"#87CEEB","opal black print":"#1C1C1C","opal white print":"#F5F5F5","dazzling blue":"#3A75C4",violet:"#8F00FF",burgundy:"#800020","ruby red":"#E0115F",ruby:"#E0115F","cherry blossom pink":"#FFB7C5",teal:"#008080",amethyst:"#9966CC","light purple":"#800080",ruby:"#E0115F","black and grey logo":"#000000","black and white logo":"#000000","pink and white logo":"#FFC0CB","white and black logo":"#FFFFFF","red with white logo":"#FF0000"};function createApparelSwatches(product){const colorOption=product.querySelector('[option-name="Color"]');if(!colorOption||colorOption.querySelector(".apparel-grid-color-swatches"))return;const dropdownList=colorOption.querySelector(".swatch-drop-down-list");if(!dropdownList)return;const items=dropdownList.querySelectorAll("li.swatch-drop-down-list-item[orig-value]");if(!items.length)return;const container=document.createElement("div");container.className="apparel-grid-color-swatches",items.forEach(function(item){const origValue=item.getAttribute("orig-value");if(!origValue)return;const colorName=origValue.split(/\s+(?:with|and)\s+/i)[0].trim();if(!colorName)return;const colorValue=colorMap[colorName.toLowerCase()];if(!colorValue)return;const button=document.createElement("button");button.type="button",button.className="apparel-grid-color-option",button.style.backgroundColor=colorValue,button.setAttribute("title",colorName),button.setAttribute("aria-label",colorName),button._swatchKingItem=item,button.addEventListener("click",function(event){event.preventDefault(),event.stopPropagation(),container.querySelectorAll(".apparel-grid-color-option").forEach(function(swatch){swatch.classList.remove("selected")}),button.classList.add("selected");const colorValue2=item.getAttribute("orig-value");if(!colorValue2)return;
1console.log("Selected color:",colorValue2);const colorLinks=product.querySelectorAll(".grid-product__colors a.color-swatch");let matchingLink=null;if(colorLinks.forEach(function(link){(link.getAttribute("aria-label")||"").toLowerCase().includes(colorValue2.toLowerCase())&&(matchingLink=link)}),!matchingLink){console.log("No matching color link found:",colorValue2);return}const variantUrl=matchingLink.getAttribute("href");console.log("Matching variant URL:",variantUrl);const productLink=product.querySelector("a.grid-product__link");productLink&&(productLink.href=variantUrl,console.log("grid-product__link updated:",productLink.href))}),container.appendChild(button)});const wrapper=colorOption.querySelector(".swatch-drop-down-wrapper");wrapper?wrapper.parentNode.insertBefore(container,wrapper):colorOption.appendChild(container),updateSelectedSwatch(container,items)}function updateSelectedSwatch(container,items){items.forEach(function(item,index){const button=container.children[index];button&&(item.getAttribute("aria-selected")==="true"?button.classList.add("apparel-grid-color-selected"):button.classList.remove("apparel-grid-color-selected"))})}function processApparelProducts(){document.querySelectorAll('[data-is-apparel="true"]').forEach(function(product){createApparelSwatches(product)})}processApparelProducts(),new MutationObserver(function(){processApparelProducts()}).observe(document.body,{childList:!0,subtree:!0})}); 2//# sourceMappingURL=/cdn/shop/t/50/assets/custom.js.map?v=114658353919641975061788829213
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.