1function updateButtonText(){const submitButton=document.querySelector(".quantity-submit-row__submit input");submitButton&&(submitButton.hasAttribute("disabled")||submitButton.disabled?submitButton.value="Sold out":submitButton.value="Add to cart")}function setupButtonTextObserver(){const submitButton=document.querySelector(".quantity-submit-row__submit input");if(submitButton){new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.type==="attributes"&&mutation.attributeName==="disabled"&&updateButtonText()})}).observe(submitButton,{attributes:!0,attributeFilter:["disabled"]});const originalDisabledSetter=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"disabled").set;Object.defineProperty(submitButton,"disabled",{set:function(value){originalDisabledSetter.call(this,value),updateButtonText()},get:function(){return this.hasAttribute("disabled")}})}}function checkShippingAvailability(){var selectedVariant=document.querySelector(".variant-id").getAttribute("data-variant");if(selectedVariant!==void 0&&selectedVariant!=="undefined"&&selectedVariant!==null)document.querySelectorAll(".original-selector option").forEach(function(variant){var variantID=variant.getAttribute("value");if(variantID===selectedVariant){var variantInventory=variant.getAttribute("data-inventory-shipping"),variantShippingObject=window.FWE&&window.FWE.pdpVariantData&&window.FWE.pdpVariantData.variantShipping||{};if(Object.keys(variantShippingObject)[0]){for(const[key,value]of Object.entries(variantShippingObject))if(key===variantID){const availableElem=document.querySelector(".available-to-sell"),datePlusSix=new Date;for(let i=0;i<6;)datePlusSix.setDate(datePlusSix.getDate()+1),datePlusSix.getDay()!==0&&i++;const formattedDatePlusSix=`${datePlusSix.toLocaleString("default",{month:"short"})} ${datePlusSix.getDate()}`,datePlusSeven=new Date(datePlusSix);for(let i=0;i<1;)datePlusSeven.setDate(datePlusSeven.getDate()+1),datePlusSeven.getDay()!==0&&i++;const formattedDatePlusSeven=`${datePlusSeven.toLocaleString("default",{month:"short"})} ${datePlusSeven.getDate()}`,truckSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="30" height="22" viewBox="0 0 42 32" style="fill: #00713A;width:22px;"><path id="b" d="m42,16.69l-7.65-9.84h-6.68V0H0v27.16h4.52c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h6.77c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h8.07v-10.47Zm-31.82,13.43c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm12.49-4.84h-6.9c-.56-2.5-2.85-4.37-5.6-4.37s-5.04,1.88-5.6,4.37H1.95V1.88h23.78v19.63c-1.53.74-2.68,2.11-3.05,3.77Zm5.6,4.84c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm11.78-4.84h-6.18c-.56-2.5-2.85-4.37-5.6-4.37-.21,0-.4.04-.61.06v-12.23h5.71l6.68,8.59v7.96Z"/></svg>',tooltipSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="16" height="16" viewBox="0 0 32 32" style="fill: gray;width:16px;margin-top:-5px;"><path id="b" d="m16,0C7.16,0,0,7.16,0,16s7.16,16,16,16,16-7.16,16-16S24.84,0,16,0Zm1.6,26.5h-3v-3h3v3Zm1.04-9.23c-.7.29-1.16.98-1.16,1.74v1.5h-2.96v-1.5c0-1.99,1.19-3.77,3.01-4.52,1.41-.58,2.01-1.43,2.01-2.76,0-1.76-1.56-3.22-3.54-3.22s-3.54,1.47-3.54,3.22v1.5h-2.96v-1.5c0-3.46,2.93-6.22,6.5-6.22s6.5,2.76,6.5,6.22c0,2.59-1.36,4.51-3.86,5.54Z"/></svg>';if(variantInventory>=1){availableElem.innerHTML=` 2 <div style="display:flex;align-items:flex-start;"> 3 ${truckSVG} 4 <div style="margin-left:12px;font-size:15px;">Usually ships within same or next business day</div> 5 </div> 6 <div class="tooltip-container" style="display:none"> 7 <div style="color:#454545;font-size:15px;font-weight:400;margin-left:32px;">Estimated arrival to you: <span style="color: #00713A;margin:0 1px;font-weight:700;">${formattedDatePlusSeven}</span> or <span style="color: #00713A;font-style: normal;margin:0 1px;font-weight:400;">sooner</span> 8 <div class="tooltip"> 9 ${tooltipSVG} 10 <div class="tooltip-content" style="color:#454545;font-size:15px;">
11 <span class="close-btn"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span> 12 <div class="section" style="padding-top:10px;"> 13 <strong>UPS Ground</strong> 14 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSix}</span></p> 15 </div> 16 <hr style="height:0;margin: 12px 0;"> 17 <div class="section"> 18 <strong>UPS SurePost</strong> 19 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSeven}</span></p> 20 </div> 21 <hr style="height:0;margin: 12px 0;"> 22 <div class="section" style="margin-bottom:5px; 0"> 23 <em style="font-weight: 400;">You can select the delivery method during checkout</em> 24 </div> 25 <div class="arrow"></div> 26 </div> 27 </div> 28 </div> 29 <span style="padding-left: 4px"> | FREE Shipping over $99*</span> 30 </div>`;const tooltipIcon=availableElem.querySelector(".tooltip"),tooltipContent=availableElem.querySelector(".tooltip-content"),closeBtn=availableElem.querySelector(".close-btn");tooltipIcon.addEventListener("click",function(e){if(e.target.closest(".tooltip-content"))return;const isTooltipVisible=tooltipContent.style.display==="block";
30tooltipContent.style.display=isTooltipVisible?"none":"block"}),closeBtn.addEventListener("click",function(){tooltipContent.style.display="none"}),document.addEventListener("click",function(e){tooltipContent.style.display==="block"&&(e.target.closest(".tooltip-content")||e.target.closest(".tooltip")||(tooltipContent.style.display="none"))})}else availableElem.innerHTML="";(value==="Always"||value==="Ok")&&(availableElem.innerHTML="Usually ships direct from the manufacturer within 1-4 business days.")}}else{const availableElem=document.querySelector(".available-to-sell"),datePlusSix=new Date;for(let i=0;i<6;)datePlusSix.setDate(datePlusSix.getDate()+1),datePlusSix.getDay()!==0&&i++;const formattedDatePlusSix=`${datePlusSix.toLocaleString("default",{month:"short"})} ${datePlusSix.getDate()}`,datePlusSeven=new Date(datePlusSix);for(let i=0;i<1;)datePlusSeven.setDate(datePlusSeven.getDate()+1),datePlusSeven.getDay()!==0&&i++;const formattedDatePlusSeven=`${datePlusSeven.toLocaleString("default",{month:"short"})} ${datePlusSeven.getDate()}`,truckSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="34" height="25" viewBox="0 0 42 32" style="fill: #00713A;width:20px;"><path id="b" d="m42,16.69l-7.65-9.84h-6.68V0H0v27.16h4.52c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h6.77c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h8.07v-10.47Zm-31.82,13.43c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm12.49-4.84h-6.9c-.56-2.5-2.85-4.37-5.6-4.37s-5.04,1.88-5.6,4.37H1.95V1.88h23.78v19.63c-1.53.74-2.68,2.11-3.05,3.77Zm5.6,4.84c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm11.78-4.84h-6.18c-.56-2.5-2.85-4.37-5.6-4.37-.21,0-.4.04-.61.06v-12.23h5.71l6.68,8.59v7.96Z"/></svg>',tooltipSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="16" height="16" viewBox="0 0 32 32" style="fill: gray;width:16px;margin-top:-5px;"><path id="b" d="m16,0C7.16,0,0,7.16,0,16s7.16,16,16,16,16-7.16,16-16S24.84,0,16,0Zm1.6,26.5h-3v-3h3v3Zm1.04-9.23c-.7.29-1.16.98-1.16,1.74v1.5h-2.96v-1.5c0-1.99,1.19-3.77,3.01-4.52,1.41-.58,2.01-1.43,2.01-2.76,0-1.76-1.56-3.22-3.54-3.22s-3.54,1.47-3.54,3.22v1.5h-2.96v-1.5c0-3.46,2.93-6.22,6.5-6.22s6.5,2.76,6.5,6.22c0,2.59-1.36,4.51-3.86,5.54Z"/></svg>';if(variantInventory>=1){availableElem.innerHTML=` 31 <div class="tooltip-container" style="display:none"> 32 ${truckSVG} 33 <div style="color:#454545;font-size:15px;font-weight:400;margin-left:12px;">Estimated arrival to you: <span style="color: #00713A;margin:0 1px;font-weight:700;">${formattedDatePlusSeven}</span> or <span style="color: #00713A;font-style: normal;margin:0 1px;font-weight:400;">sooner</span> 34 <div class="tooltip"> 35 ${tooltipSVG} 36 <div class="tooltip-content" style="color:#454545;font-size:15px;"> 37 <span class="close-btn"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span> 38 <div class="section" style="padding-top:10px;"> 39 <strong>UPS Ground</strong> 40 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSix}</span></p> 41 </div> 42 <hr style="height:0;margin: 12px 0;"> 43 <div class="section"> 44 <strong>UPS SurePost</strong> 45 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSeven}</span></p> 46 </div> 47 <hr style="height:0;margin: 12px 0;"> 48 <div class="section" style="margin-bottom:5px; 0"> 49 <em style="font-weight: 400;">You can select the delivery method during checkout</em> 50 </div> 51 <div class="arrow"></div> 52 </div> 53 </div> 54 </div>
55 <span style="padding-left: 4px"> | FREE Shipping over $99*</span> 56 </div>`;const tooltipIcon=availableElem.querySelector(".tooltip"),tooltipContent=availableElem.querySelector(".tooltip-content"),closeBtn=availableElem.querySelector(".close-btn");tooltipIcon.addEventListener("click",function(e){if(e.target.closest(".tooltip-content"))return;const isTooltipVisible=tooltipContent.style.display==="block";tooltipContent.style.display=isTooltipVisible?"none":"block"}),closeBtn.addEventListener("click",function(){tooltipContent.style.display="none"}),document.addEventListener("click",function(e){tooltipContent.style.display==="block"&&(e.target.closest(".tooltip-content")||e.target.closest(".tooltip")||(tooltipContent.style.display="none"))})}else availableElem.innerHTML=""}}});else{const availableElem=document.querySelector(".available-to-sell"),datePlusSix=new Date;for(let i=0;i<6;)datePlusSix.setDate(datePlusSix.getDate()+1),datePlusSix.getDay()!==0&&i++;const formattedDatePlusSix=`${datePlusSix.toLocaleString("default",{month:"short"})} ${datePlusSix.getDate()}`,datePlusSeven=new Date(datePlusSix);for(let i=0;i<1;)datePlusSeven.setDate(datePlusSeven.getDate()+1),datePlusSeven.getDay()!==0&&i++;const formattedDatePlusSeven=`${datePlusSeven.toLocaleString("default",{month:"short"})} ${datePlusSeven.getDate()}`,truckSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="34" height="25" viewBox="0 0 42 32" style="fill: #00713A;width:20px;"><path id="b" d="m42,16.69l-7.65-9.84h-6.68V0H0v27.16h4.52c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h6.77c.36,2.72,2.75,4.84,5.66,4.84s5.3-2.12,5.66-4.84h8.07v-10.47Zm-31.82,13.43c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm12.49-4.84h-6.9c-.56-2.5-2.85-4.37-5.6-4.37s-5.04,1.88-5.6,4.37H1.95V1.88h23.78v19.63c-1.53.74-2.68,2.11-3.05,3.77Zm5.6,4.84c-2.09,0-3.79-1.65-3.79-3.67s1.7-3.67,3.79-3.67,3.79,1.65,3.79,3.67-1.7,3.67-3.79,3.67Zm11.78-4.84h-6.18c-.56-2.5-2.85-4.37-5.6-4.37-.21,0-.4.04-.61.06v-12.23h5.71l6.68,8.59v7.96Z"/></svg>',tooltipSVG='<svg xmlns="http://www.w3.org/2000/svg" id="a" width="16" height="16" viewBox="0 0 32 32" style="fill: gray;width:16px;margin-top:-5px;"><path id="b" d="m16,0C7.16,0,0,7.16,0,16s7.16,16,16,16,16-7.16,16-16S24.84,0,16,0Zm1.6,26.5h-3v-3h3v3Zm1.04-9.23c-.7.29-1.16.98-1.16,1.74v1.5h-2.96v-1.5c0-1.99,1.19-3.77,3.01-4.52,1.41-.58,2.01-1.43,2.01-2.76,0-1.76-1.56-3.22-3.54-3.22s-3.54,1.47-3.54,3.22v1.5h-2.96v-1.5c0-3.46,2.93-6.22,6.5-6.22s6.5,2.76,6.5,6.22c0,2.59-1.36,4.51-3.86,5.54Z"/></svg>';if(document.querySelector(".quantity-submit-row__submit")){if(document.querySelector(".quantity-submit-row__submit input").value.toLowerCase().trim().includes("add to cart")){availableElem.innerHTML=` 57 <div class="tooltip-container" style="display:none"> 58 ${truckSVG} 59 <div style="color:#454545;font-size:15px;font-weight:400;margin-left:12px;">Estimated arrival to you: <span style="color: #00713A;margin:0 1px;font-weight:700;">${formattedDatePlusSeven}</span> or <span style="color: #00713A;font-style: normal;margin:0 1px;font-weight:400;">sooner</span> 60 <div class="tooltip"> 61 ${tooltipSVG} 62 <div class="tooltip-content" style="color:#454545;font-size:15px;"> 63 <span class="close-btn"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span> 64 <div class="section" style="padding-top:10px;"> 65 <strong>UPS Ground</strong> 66 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSix}</span></p> 67 </div> 68 <hr style="height:0;margin: 12px 0;"> 69 <div class="section"> 70 <strong>UPS SurePost</strong> 71 <p style="margin:5px 0 0;font-weight: 400;">Estimated arrival to you: <span style="color: #00713A;font-weight: 700;">${formattedDatePlusSeven}</span></p> 72 </div> 73 <hr style="height:0;margin: 12px 0;"> 74 <div class="section" style="margin-bottom:5px; 0"> 75 <em style="font-weight: 400;">You can select the delivery method during checkout</em> 76 </div> 77 <div class="arrow"></div> 78 </div> 79 </div> 80 </div>
81 <span style="padding-left: 4px"> | FREE Shipping over $99*</span> 82 </div>`;const tooltipIcon=availableElem.querySelector(".tooltip"),tooltipContent=availableElem.querySelector(".tooltip-content"),closeBtn=availableElem.querySelector(".close-btn");tooltipIcon.addEventListener("click",function(e){if(e.target.closest(".tooltip-content"))return;const isTooltipVisible=tooltipContent.style.display==="block";tooltipContent.style.display=isTooltipVisible?"none":"block"}),closeBtn.addEventListener("click",function(){tooltipContent.style.display="none"}),document.addEventListener("click",function(e){tooltipContent.style.display==="block"&&(e.target.closest(".tooltip-content")||e.target.closest(".tooltip")||(tooltipContent.style.display="none"))})}}else availableElem.innerHTML=""}}(function($){var $=jQuery=$;$.fn.clickyBoxes=function(prefix){if(prefix=="destroy")$(this).off(".clickyboxes"),$(this).next(".clickyboxes").off(".clickyboxes");else return $(this).filter("select:not(.clickybox-replaced)").addClass("clickybox-replaced").each(function(){var prefix2=prefix2||$(this).attr("id"),$optCont=$('<ul class="clickyboxes"/>').attr("id","clickyboxes-"+prefix2).data("select",$(this)).insertAfter(this),$label;$(this).is("[id]")?$label=$('label[for="'+$(this).attr("id")+'"]'):$label=$(this).siblings("label"),$label.length>0&&$optCont.addClass("options-"+removeDiacritics($label.text()).toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/-*$/,"")),$(this).find("option").each(function(){$("<li/>").appendTo($optCont).append($('<a href="#"/>').attr("data-value",$(this).val()).html($(this).html()).addClass("opt--"+removeDiacritics($(this).text()).toLowerCase().replace(/'/g,"").replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/-*$/,"")))}),$(this).hide().addClass("replaced").on("change.clickyboxes keyup.clickyboxes",function(){var val=$(this).val();$optCont.find("a").removeClass("active").filter(function(){return $(this).attr("data-value")==val}).addClass("active")}).trigger("keyup"),$optCont.on("click.clickyboxes","a",function(){if(!$(this).hasClass("active")){var $clicky=$(this).closest(".clickyboxes");$clicky.data("select").val($(this).data("value")).trigger("change"),$clicky.trigger("change")}return!1})})},theme.buildGalleryViewer=function(config){for(var $allContainer=$('<div class="gallery-viewer gallery-viewer--pre-reveal">'),$zoomContainer=$('<div class="gallery-viewer__zoom">').appendTo($allContainer),$thumbContainer=$('<div class="gallery-viewer__thumbs">').appendTo($allContainer),$controlsContainer=$('<div class="gallery-viewer__controls">').appendTo($allContainer),$close=$('<a class="gallery-viewer__button gallery-viewer__close" href="#">').html(config.close).appendTo($controlsContainer),$right=$('<a class="gallery-viewer__button gallery-viewer__prev" href="#">').html(config.prev).appendTo($controlsContainer),$left=$('<a class="gallery-viewer__button gallery-viewer__next" href="#">').html(config.next).appendTo($controlsContainer),$currentZoomImage=null,i=0;i<config.images.length;i++){var img=config.images[i];$('<a class="gallery-viewer__thumb" href="#">').data("zoom-url",img.zoomUrl).html(img.thumbTag).appendTo($thumbContainer)}config.images.length===1&&$allContainer.addClass("gallery-viewer--single-image");var panZoomImage=function(inputX,inputY){var doPanX=$currentZoomImage.width()>$allContainer.width(),doPanY=$currentZoomImage.height()>$allContainer.height();if(doPanX||doPanY){var midX=$allContainer.width()/2,midY=$allContainer.height()/2,offsetFromCentreX=inputX-midX,offsetFromCentreY=inputY-midY,finalOffsetX=0,finalOffsetY=0;if(doPanX){var offsetMultiplierX=($currentZoomImage.width()-$allContainer.width())/2/midX;finalOffsetX=Math.round(-offsetFromCentreX*offsetMultiplierX)}if(doPanY){var offsetMultiplierY=($currentZoomImage.height()-$allContainer.height())/2/midY;finalOffsetY=Math.round(-offsetFromCentreY*offsetMultiplierY)}$currentZoomImage.css("transform",["translate3d(",finalOffsetX,"px, ",finalOffsetY,"px, 0)"].join(""))}};$allContainer.on("click.galleryViewer select.galleryViewer",".gallery-viewer__thumb",function(evt){evt.preventDefault(),$(this).addClass("gallery-viewer__thumb--active").siblings(".gallery-viewer__thumb--active").removeClass("gallery-viewer__thumb--active"),$currentZoomImage=$('<img class="gallery-viewer__zoom-image" alt="" style="visibility: hidden">'),$currentZoomImage.on("load",function(){$(this).off("load"),$(this).css({visibility:"",top:$allContainer.height()/2-$(this).height()/2,left:$allContainer.width()/2-$(this).width()/2}),panZoomImage(evt.clientX,evt.clientY)}).attr("src",$(this).data("zoom-url")),$zoomContainer.html($currentZoomImage)}),$allContainer.on("mousemove.galleryViewer touchmove.galleryViewer",function(evt){if(evt.type==="touchmove"){var touch=evt.touches[0];panZoomImage(touch.clientX,touch.clientY)}else panZoomImage(evt.clientX,evt.clientY)}),$allContainer.on("touchmove.galleryViewer",".gallery-viewer__thumbs",function(evt){evt.stopPropagation()}),$allContainer.on("click.galleryViewer",".gallery-viewer__next",function(evt){evt.preventDefault();var $next=$thumbContainer.find(".gallery-viewer__thumb--active").next();$next.length===0&&($next=$thumbContainer.find(".gallery-viewer__thumb:first")),$next.trigger("select")}),$allContainer.on("click.galleryViewer",".gallery-viewer__prev",function(evt){evt.preventDefault();var $prev=$thumbContainer.find(".gallery-viewer__thumb--active").prev();$prev.length===0&&($prev=$thumbContainer.find(".gallery-viewer__thumb:last")),$prev.trigger("select")}),$allContainer.on("click.galleryViewer",".gallery-viewer__close",function(evt){evt.preventDefault(),$allContainer.off(".galleryViewer"),$allContainer.addClass("gallery-viewer--transition-out");var transitionDelay=$allContainer.css("transition-duration");transitionDelay=transitionDelay.indexOf("ms")>-1?parseFloat(transitionDelay):parseFloat(transitionDelay)*1e3,setTimeout(function(){$allContainer.remove(),$("html").removeClass("gallery-viewer-open")},transitionDelay)}),$("html").removeClass("gallery-viewer-open"),$(".gallery-viewer").remove(),$("html").addClass("gallery-viewer-open"),$allContainer.appendTo("body"),$thumbContainer.find(".gallery-viewer__thumb:eq("+(config.current>0?config.current:0)+")").trigger("select"),setTimeout(function(){$allContainer.removeClass("gallery-viewer--pre-reveal")},10)},theme.productGallerySlideshowTabFix=function(slides,current){$(slides[current]).find("a, input, button, select, iframe, video, model-viewer, [tabindex]").each(function(){typeof $(this).data("theme-slideshow-original-tabindex")<"u"?$(this).data("theme-slideshow-original-tabindex")===!1?$(this).removeAttr("tabindex"):$(this).attr("tabindex",$(this).data("theme-slideshow-original-tabindex")):$(this).removeAttr("tabindex")}
82),$(slides).not(slides[current]).find("a, input, button, select, iframe, video, model-viewer, [tabindex]").each(function(){typeof $(this).data("theme-slideshow-original-tabindex")>"u"&&($(this).data("theme-slideshow-original-tabindex",typeof $(this).attr("tabindex")<"u"?$(this).attr("tabindex"):!1),$(this).attr("tabindex","-1"))})},theme.initProductGallery=function(container){var $gallery=$(".gallery",container);if(!$gallery.hasClass("gallery-initialised")){$gallery.addClass("gallery-initialised"),$(document).ready(function(){try{$(".product-slideshow",container).slick({})}catch{}setTimeout(()=>{$(".product-slideshow .slick-slide",container).on("dragstart",function(e){e.preventDefault()})},1e3)}),$(".product-slideshow",container).each(function(){var $slideshow=$(this).on("init",function(evt,slick){$(".lazyload--manual",this).removeClass("lazyload--manual").addClass("lazyload")}).on("beforeChange",function(evt,slick,current,next){$($(this).closest(".gallery").find(".thumbnails a")[next]).trigger("selectFromSlick")}).slick({autoplay:!1,fade:!0,slidesToShow:1,slidesToScroll:1,infinite:!0,useTransform:!0,dots:!1,arrows:!0,centerMode:!0,slidesToShow:1,appendArrows:$(this).siblings(".slideshow-controls").find(".slideshow-controls__arrows"),appendDots:$(this).siblings(".slideshow-controls").find(".slideshow-controls__dots"),prevArrow:'<button type="button" class="slick-product-prev" aria-label="'+theme.strings.previous+'">'+theme.icons.chevronLeft+"</button>",nextArrow:'<button type="button" class="slick-product-next" aria-label="'+theme.strings.next+'">'+theme.icons.chevronRight+"</button>",responsive:[{breakpoint:767,settings:{dots:!0,arrows:!1,fade:!1,slidesToShow:1,slidesToScroll:1,infinite:!1,centerMode:!1}}]});theme.productGallerySlideshowTabFix($slideshow.slick("getSlick").$slides,$slideshow.slick("getSlick").currentSlide),$slideshow.on("afterChange",function(evt,slick,current){$(".product-media--activated").removeClass("product-media--activated").trigger("mediaHidden"),$(".product-media",slick.$slides[current]).addClass("product-media--activated").trigger("mediaVisible"),theme.productGallerySlideshowTabFix(slick.$slides,current),$(this).closest(".quickbuy-container").trigger("changedsize")}),$(container).closest(".collection-listing").length>0&&$slideshow.on("afterChange",function(){$(this).closest(".quickbuy-container").trigger("changedsize")})});var $thumbnails=$(".thumbnails",container);if($thumbnails.length){var carouselVisibleItemCount=6,isCarousel=!1,assessCarousel=function(){$thumbnails.is(":visible")&&(Math.abs($thumbnails.outerWidth()-$thumbnails.parent().width())>20?isCarousel&&(isCarousel=!1,theme.beforeCarouselUnloadEventBlockFix($thumbnails),$thumbnails.removeClass("owl-carousel").data("owl.carousel").destroy()):isCarousel||(isCarousel=!0,theme.beforeCarouselLoadEventBlockFix($thumbnails),$thumbnails.addClass("owl-carousel").on("initialized.owl.carousel",function(){$(".lazyload--manual",this).removeClass("lazyload--manual").addClass("lazyload")}).owlCarousel({items:carouselVisibleItemCount,dots:!1,margin:7})))};$(window).on("debouncedresize.productGallery",assessCarousel),assessCarousel(),$(container).data("assessCarouselCallback",assessCarousel),$(".gallery",container).on("click select selectFromSlick",".thumbnails.owl-carousel a",function(e){e.preventDefault();var $carouselItem=$(this).parent();if(e.type!="selectFromSlick")$(this).closest(".gallery").find(".slideshow").slick("slickGoTo",$carouselItem.index());else{$(this).addClass("selected").parent().siblings().find("a").removeClass("selected");var shelfStart=$carouselItem.parent().children(".active:first").index(),shelfEnd=shelfStart+carouselVisibleItemCount-1,currentIndex=$carouselItem.index();currentIndex<shelfStart?$carouselItem.closest(".owl-carousel").trigger("to.owl.carousel",currentIndex):currentIndex>shelfEnd&&$carouselItem.closest(".owl-carousel").trigger("to.owl.carousel",Math.max(0,currentIndex-carouselVisibleItemCount+1))}}),$(".gallery",container).on("click select selectFromSlick"," .thumbnails:not(.owl-carousel) a",function(e){e.preventDefault(),e.type!="selectFromSlick"?$(this).closest(".gallery").find(".slideshow").slick("slickGoTo",$(this).index()):$(this).addClass("selected").siblings(".selected").removeClass("selected")})}}},theme.destroyProductGallery=function(container){$(window).off(".productGallery");var $gallery=$(".gallery",container).off("click select selectFromSlick");theme.ProductMedia.destroy($gallery),$(".slick-slider",container).slick("unslick").off("init beforeChange afterChange"),$(".owl-carousel",container).each(function(){theme.beforeCarouselUnloadEventBlockFix(this),$(this).data("owl.carousel").destroy()})},theme.ProductTemplateSection=new function(){this.onSectionLoad=function(target){theme.initToggleTargets(),theme.classUpTextLinks(target),$('[name="id"]',target).trigger("optionate"),theme.initProductGallery(target),theme.ProductBlockManager.loadImages(target)},this.onSectionUnload=function(target){theme.destroyProductGallery(target),theme.OptionManager.unloadProductOptions($('[name="id"]',target)),$(".size-chart-link",target).off("click")}},theme.settings.show_size_chart&&$(document).on("click",".size-chart-link",function(){return $.fancybox($.extend({},theme.fbOpts(),{showNavArrows:!1,content:$(this).closest(".size-chart-container").find(".size-chart-content").html()})),!1}),$(document).on("optionate",'[name="id"]',function(e){var $form=$(this).closest("form"),productId=$form.data("product-id");(theme.productData[productId]||document.getElementById("ProductJson-"+productId))&&$(this).closest("form").find(".dynamic-checkout-buttons").each(function(){$(this).before($(this).html()).remove()}).length>0&&window.Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),checkShippingAvailability(),updateButtonText(),setupButtonTextObserver(),$(this).on("variantChanged",function(evt,variant2){var $labelCont=$form.closest(".detail").find(".productlabel-container");$labelCont.find(".productlabel").remove(),$labelCont.append($("#variant-label-"+variant2.id).html()),document.querySelector(".variant-id").setAttribute("data-variant",variant2.id);var quantity=document.querySelector("#quantity");if(quantity){var currentMax=theme.productVariantInventory[variant2.id]||1;quantity.setAttribute("data-max",currentMax);var val=isNaN(+quantity.value)?0:+quantity.value;quantity.value=val>currentMax?currentMax:Math.max(1,val)}checkShippingAvailability(),typeof checkWidthAvailability=="function"&&checkWidthAvailability(),updateButtonText();var waitForKlaviyo=setInterval(function(){var klaviyoBtn=document.querySelector(".klaviyo-bis-trigger");klaviyoBtn&&(clearInterval(waitForKlaviyo),document.querySelector(".productlabel.soldout")?klaviyoBtn.style.setProperty("display","block","important"):klaviyoBtn.style.setProperty("display","none","important"))},500)}),theme.OptionManager.initProductOptions(this),$form.find(".selector-wrapper").filter(function(){return this.id.match(/^selector-wrapper--mens.*/)}).addClass("selector-wrapper--siz").addClass("selector-wrapper--siznew"),$form.find(".selector-wrapper").filter(function(){return this.id.match(/^selector-wrapper--womens.*/)}).addClass("selector-wrapper--siz");
82var $clickies=$form.find("[data-make-box]").addClass("has-clickyboxes").find("select").clickyBoxes();if($clickies.length>0){$(this).closest(".quickbuy-container").trigger("changedsize");for(var productData=theme.OptionManager.getProductData($form),optionIndex=0;optionIndex<productData.options.length;optionIndex++){for(var optionValues={},variantIndex=0;variantIndex<productData.variants.length;variantIndex++){var variant=productData.variants[variantIndex];typeof optionValues[variant.options[optionIndex]]>"u"&&(optionValues[variant.options[optionIndex]]=!1),variant.available&&(optionValues[variant.options[optionIndex]]=!0)}for(var key in optionValues)optionValues[key]||$(".selector-wrapper:eq("+optionIndex+") .clickyboxes li a",$form).filter(function(){return $(this).attr("data-value")==key}).addClass("unavailable")}}$form.find(".selector-wrapper:not([data-make-box]) select").each(function(){theme.select2.init($(this))}),$form.find(".selector-wrapper--siz select").each(function(){theme.select2.init($(this))}),$form.find(".selector-wrapper--uni select").each(function(){theme.select2.init($(this))}),$(this).on("unloading",function(){$(this).off("unloading variantChanged"),$form.find(".selector-wrapper select.clickybox-replaced").clickyBoxes("destroy"),theme.select2.destroyAllIn($form.find(".selector-wrapper"))})}),$(document).on("variantImageSelected",".gallery",function(e,data){var mediaId=data.featured_media.id;$(this).find('.thumbnails a[data-media-id="'+mediaId+'"]:first').trigger("select")}),$(document).on("click",".product-detail .gallery .main-image a.show-gallery",function(){var images=[],currentIndex=0,$thumbs=$(this).closest(".gallery").find(".thumbnails .thumbnail--media-image");if($thumbs.length)$thumbs.each(function(){var $imgThumb2=$(this).find(".rimage-outer-wrapper").clone();$imgThumb2.find(".lazyloaded").removeClass("lazyloaded").addClass("lazyload").parent().addClass("lazyload--placeholder"),images.push({thumbTag:$imgThumb2,zoomUrl:$(this).attr("href")})}),$thumbs.each(function(thisIndex){if($(this).hasClass("selected"))return currentIndex=thisIndex,!1});else{var $imgThumb=$(this).find(".rimage-outer-wrapper").clone();$imgThumb.find(".lazyloaded").removeClass("lazyloaded").addClass("lazyload").parent().addClass("lazyload--placeholder"),images.push({thumbTag:$imgThumb,zoomUrl:$(this).attr("href")})}return theme.buildGalleryViewer({images,current:currentIndex,prev:theme.icons.chevronLeft,next:theme.icons.chevronRight,close:theme.icons.close}),!1}),$(document).on("click",".quantity-wrapper [data-quantity]",function(){var adj=$(this).data("quantity")=="up"?1:-1,$qty=$(this).closest(".quantity-wrapper").find("[name=quantity]"),max=+$qty[0].getAttribute("data-max"),val=isNaN(+$qty.val())?0:+$qty.val();return val+adj>max||$qty.val(Math.max(1,val+adj)).trigger("change"),!1}),$(document).on("keyup",".quantity-wrapper [name=quantity]",function(){if(this.value){var val=isNaN(+this.value)?0:+this.value,max=+this.getAttribute("data-max");this.value=val>max?max:Math.max(1,val)}}),theme.Sections.register("product-template",theme.ProductTemplateSection,{deferredLoad:!1}),$("ul.clickyboxes li a").on("click",function(){var val=$(this).attr("data-values"),lowercaseVal=val.toLowerCase();$(this).parents(".has-clickyboxes").find(".selected_varname").html(lowercaseVal);var size_div=$(this).parents("#selector-wrapper--siz"),width_div=$(this).parents("#selector-wrapper--wid"),uni_div=$(this).parents(".options-uni");size_div.length>0&&$(".product-sticky-size").length>0&&$(".product-sticky-size span").html(lowercaseVal),uni_div.length>0&&$(".product-sticky-size").length>0&&$(".product-sticky-size span").html(lowercaseVal),width_div.length>0&&$(".product-sticky-width").length>0&&$(".product-sticky-width span").html(lowercaseVal)}),setTimeout(function(){$("ul.clickyboxes li a.active").each(function(){var val=$(this).attr("data-values"),lowercaseVal=val;try{lowercaseVal=val.toLowerCase()}catch{}$(this).parents(".has-clickyboxes").find(".selected_varname").html(lowercaseVal);var size_div=$(this).parents("#selector-wrapper--siz"),width_div=$(this).parents("#selector-wrapper--wid"),uni_div=$(this).parents(".options-uni");size_div.length>0&&$(".product-sticky-size").length>0&&$(".product-sticky-size span").html(lowercaseVal),uni_div.length>0&&$(".product-sticky-size").length>0&&$(".product-sticky-size span").html(lowercaseVal),width_div.length>0&&$(".product-sticky-width").length>0&&$(".product-sticky-width span").html(lowercaseVal)}
82)},500),$("#selector-wrapper--wid li p").each(function(){var thishtml=$(this).html();thishtml=="Regular"&&$(this).parents("li a").attr("data-values",thishtml)}),$("ul.clickyboxes li p").each(function(){var text=$(this).text();$(this).parents("li a").attr("data-values",text)})})(theme.jQuery); 83//# sourceMappingURL=/cdn/shop/t/305/assets/product.js.map?v=166037015813411923461781718772
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.