(()=>{rimg.shopify.init('[data-rimg="lazy"]',{round:1});const sections=new ShopifySectionsManager;sections.register("age-gate",section=>new AgeGate.PageAgeGate(section));const ageGatePage=document.getElementById("age-gate-page");ageGatePage&&new AgeGate.SiteAgeGate(ageGatePage),document.addEventListener("DOMContentLoaded",function(){window.utils.enableDisclosure();const oldFlickityCreate=window.Flickity.prototype._create;window.Flickity.prototype._create=function(){const that=this;return this.element.addEventListener&&this.element.addEventListener("load",()=>{that.onresize()},!0),this._create=oldFlickityCreate,oldFlickityCreate.apply(this,arguments)},document.addEventListener("lazyloaded",e2=>{let bg=e2.target.getAttribute("data-bg");const mobileBg=e2.target.getAttribute("data-mobile-bg");bg&&(window.PXUTheme.media_queries.medium.matches&&mobileBg&&(bg=mobileBg),e2.target.style.backgroundImage=`url(${bg})`)}),window.imageFunctions.flickityIosFix(),window.header.init(),window.mobileSearch.init(),window.siteOverlay.init(),window.meganavManager.injectAll(),window.PXUTheme.theme_settings.enable_autocomplete&&window.predictiveSearch.init(),window.utils.initializeSectionWrapper(),window.slideshow.init(),window.testimonials.init(),window.video.init(),window.gallery.init(),window.videoFeature.setupVideoPlayer(),window.featuredPromotions.init(),window.featuredCollection.init(),window.logoList.init(),window.collectionSidebarFilter.init(),window.cart.init(),window.map.init(),window.shoppableImage.init(),window.productPage.init(),window.productPage.runOptionSelector(),window.productPage.initializeQuantityBox(),window.recentlyViewed.init(),window.sidebarAccordions.init(),(window.PXUTheme.currency.show_multiple_currencies||window.PXUTheme.currency.native_multi_currency)&&window.currencyConverter.init();const{pathname}=location;pathname.startsWith("/challenge")&&$("html, body").animate({scrollTop:0},"slow");let resizeTimeout;const beforeResizeWidth=$(window).width();window.addEventListener("resize",()=>{resizeTimeout||(resizeTimeout=setTimeout(()=>{resizeTimeout=null;const currentScreenWidth=$(window).width();window.PXUTheme.media_queries.medium.matches&¤tScreenWidth!==beforeResizeWidth&&(window.cart.init(),window.is_touch_device()||(window.header.unload(),window.header.init())),window.logoList.init(),document.querySelectorAll("[data-bg]").forEach(image=>{let bg=image.getAttribute("data-bg");const mobileBg=image.getAttribute("data-mobile-bg");bg&&(window.PXUTheme.media_queries.medium.matches&&mobileBg&&(bg=mobileBg),image.style.backgroundImage=`url(${bg})`)})},66))},!1),$.fancybox.defaults.animationEffect="fade",$.fancybox.defaults.transitionEffect="fade",$.fancybox.defaults.hash=!1,$.fancybox.defaults.infobar=!1,$.fancybox.defaults.toolbar=!1,$.fancybox.defaults.arrows=!1,$.fancybox.defaults.loop=!0,$.fancybox.defaults.smallBtn=!0,$.fancybox.defaults.live=!1,$.fancybox.defaults.zoom=!1,$.fancybox.defaults.mobile.preventCaptionOverlap=!1,$.fancybox.defaults.mobile.toolbar=!0,$.fancybox.defaults.mobile.buttons=["close"],$.fancybox.defaults.mobile.clickSlide="close",$.fancybox.defaults.mobile.clickContent="zoom",$.fancybox.defaults.afterLoad=function(instance,slide){instance.current.type==="image"&&slide.$content.wrapInner("
"),instance.group.length>1&&slide.$content.find(".fancybox-image-wrap").append(`${window.svgArrowSizeLeft}${svgArrowSizeRight}`)},$('.lightbox[rel="gallery"]').fancybox();const $videoIframes=$('iframe[src*="youtube.com"], iframe[src*="vimeo.com"], iframe[src*="facebook.com/plugins/video"]');function getAspectRatio(width,height){const ratio=width/height;return Math.abs(ratio-1/1)===0?"1:1":Math.abs(ratio-4/3){const $iframe=$(iframe),source=$iframe.attr("src");!$iframe.parents(".plyr__video-wrapper").length&&!$iframe.parents(".lazyframe").length&&$iframe.wrap(`
`)}),window.lazyframe(".lazyframe"),$(".shopify-policy__container").wrap('
'),$(".shopify-policy__container").addClass("five-eighths offset-by-three columns is-hidden-offset-mobile-only medium-down--one-whole"),$(".shopify-policy__title").append('
');const sortByEl=document.querySelector("[data-sort-by]");sortByEl&&sortByEl.addEventListener("change",e2=>{const{target}=e2,sortValue=target.value;if(target){const queryString=new URLSearchParams(document.location.search);queryString.set("sort_by",sortValue),window.location.search=queryString}}),$("body").on("change","#tag_filter",()=>{$("[data-option-filter] input").prop("checked",!1),window.quickFilter.init()}),$("body").on("change","#blog_filter",function(){const url=$(this).val();window.location=url}),$("input, select, textarea").on("focus blur",event=>{$("meta[name=viewport]").attr("content",`width=device-width,initial-scale=1,maximum-scale=${event.type==="blur"?10:1}`)}),$("body").on("change","[data-option-filter] input",()=>{window.quickFilter.init(),$("html, body").animate({scrollTop:$(".content").offset().top},500)}),$("body").on("click","[data-reset-filters]",()=>{window.collectionSidebarFilter.clearAllFilters()}),$("body").on("click","[data-clear-filter]",e2=>{const selectedOption=$(e2.currentTarget).parents(".filter-active-tag");window.collectionSidebarFilter.clearSelectedFilter(selectedOption)}),$("body").on("change",".currencies",()=>{$("[data-initial-modal-price]").attr("data-initial-modal-price","")}),$("body").on("change",".js-quick-shop select",()=>{const currentVariant=$('.js-quick-shop select[name="id"]').val();currentVariant&&window.globalQuickShopProduct&&window.quickShop.updateVariant(currentVariant)}),window.PXUTheme.theme_settings.quick_shop_enabled&&window.quickShop.init();let touchStartPos=0;if($(document).bind("touchstart",()=>{touchStartPos=$(window).scrollTop()}).bind("touchend",e2=>{const distance=touchStartPos-$(window).scrollTop();(distance>20||distance<-20)&&e2.preventDefault}),$("body").on("click",".sidebar .parent-link--false",function(e2){e2.preventDefault();const $menu=$(this).parent("li");$menu.find(".menu-toggle").toggleClass("active"),$menu.find("ul").slideToggle()}),window.PXUTheme.theme_settings.newsletter_popup&&window.newsletter_popup.init(),window.PXUTheme.theme_settings.enable_back_to_top_button&&window.back_to_top_button.init(),window.location.pathname.indexOf("/comments")!==-1&&$("html,body").animate({scrollTop:$("#new-comment").offset().top-140},"slow"),window.PXUTheme.media_queries.large.matches&&($(".animate_right").waypoint(function(){$(this.element).addClass("animated fadeInRight")},{offset:"70%"}),$(".animate_left").waypoint(function(){$(this.element).addClass("animated fadeInLeft")},{offset:"70%"}),$(".animate_up").waypoint(function(){$(this.element).addClass("animated fadeInUp")},{offset:"70%"}),$(".animate_down").waypoint(function(){$(this.element).addClass("animated fadeInDown")},{offset:"70%"})),$(".slider, .flexslider").find("li").unwrap(),$(".slider, .flexslider").flickity({pageDots:window.usePageDots,imagesLoaded:!0,arrowShape:window.arrowSize,lazyLoad:2}),window.utils.createAccordion(".footer_menu","h6","ul"),window.utils.createAccordion(".footer_content","h6","div.toggle_content"),window.utils.createAccordion(".product_section .accordion-tabs",".tabs li > a",".tabs-content li"),window.utils.mobileParentActiveAccordion("#mobile_menu","li.sublink > a.parent-link--true span"),window.utils.mobileAccordion("#mobile_menu","li.sublink > a"),window.utils.initializeTabs(),window.accordion.init(),$("body").on("click",".menu-toggle",function(){$(this).next("ul").slideToggle(),$(this).toggleClass("active"),$(this).attr("aria-expanded",$(this).attr("aria-expanded")==="true"?"false":"true")}),window.PXUTheme.theme_settings.collection_swatches&&window.PXUTheme.media_queries.large.matches&&($("body").on("mouseenter",".collection_swatches",function(){$(".swatch span",$(this)).each(function(){$(this).data("image").indexOf("no-image")===-1&&($("")[0].src=$(this).data("image"))})}),$("body").on("mouseenter",".swatch span",function(){$(this).data("image").indexOf("no-image")===-1&&($(this).parents(".thumbnail").find(".image__container img:not(.secondary)").attr("src",$(this).data("image")),$(this).parents(".thumbnail").find(".image__container img:not(.secondary)").attr("srcset",$(this).data("image")))})),window.PXUTheme.theme_settings.display_tos_checkbox&&$("body").on("click touchstart",".cart_content .tos_label",function(){$(this).prev("input").prop("checked",!0)}),window.PXUTheme.theme_settings.display_tos_checkbox&&window.PXUTheme.theme_settings.go_to_checkout?$("body").on("click",".tos_warning [data-cart-checkout-button]",function(e2){if($(this).parents("form").find(".tos_agree").is(":checked"))window.PXUTheme.theme_settings.go_to_checkout||$("body").hasClass("cart")?$(this).submit():(e2.preventDefault(),document.location.href=window.PXUTheme.routes.cart_url);else{const warning2=`

${window.PXUTheme.translation.agree_to_terms_warning}

`;return $("p.warning").length===0&&$(this).before(warning2),!1}}):window.PXUTheme.theme_settings.go_to_checkout||$("body").on("click",".cart_content [data-minicart-checkout-button]",e2=>{e2.preventDefault(),document.location.href=window.PXUTheme.routes.cart_url}),window.PXUTheme.theme_settings.collection_secondary_image&&window.imageFunctions.showSecondaryImage(),$("[data-is-required]").length){const $checkboxGroup=$(".custom-contact__checkbox");$checkboxGroup.prop("required",!0),$checkboxGroup.on("change",()=>{$checkboxGroup.prop("required",!0),$checkboxGroup.is(":checked")&&$checkboxGroup.prop("required",!1)})}$(".maps").click(()=>{$(".maps iframe").css("pointer-events","auto")}),window.PXUTheme.theme_settings.pagination_type==="load_more"&&window.enableLoadMoreProducts(),window.PXUTheme.theme_settings.pagination_type==="load_more_button"&&window.enableLoadMoreButton("[data-product-list]"),window.PXUTheme.theme_settings.pagination_type==="infinite_scroll"&&window.enableInfiniteScroll("[data-product-list]");function ajaxSubmitCart(cart){const $cart=cart;$.ajax({url:"/cart/update.js",dataType:"json",cache:!1,type:"post",data:$cart.serialize(),success(data){refreshCart(data)}})}function updateCartItemQuantity(cartItem){$.ajax({url:"/cart/change.js",dataType:"json",cache:!1,type:"post",data:{quantity:cartItem.quantity,line:cartItem.lineID},success(data){const cartItemsArray=data.items,lineIDIndex=cartItem.lineID-1,totalCartItems=cartItem.parentCartForm.find("[data-variant-id]").length,$quantityInputs=cartItem.parentCartForm.find(`[data-variant-id="${cartItem.variantID}"] input`);let initialQuantityTotal=0,apiQuantityTotal=0;const apiLineItemQuantity=typeof data.items[lineIDIndex]<"u"?data.items[lineIDIndex].quantity:0;if($quantityInputs.length>1?($.each($quantityInputs,(_i,input)=>{initialQuantityTotal+=parseInt($(input).val())}),cartItemsArray.forEach(item=>{item.variant_id===cartItem.variantID&&(apiQuantityTotal+=item.quantity)})):(initialQuantityTotal=parseInt($quantityInputs.val()),apiQuantityTotal=typeof data.items[lineIDIndex]<"u"?data.items[lineIDIndex].quantity:0),initialQuantityTotal>0&&initialQuantityTotal>apiQuantityTotal)if(apiQuantityTotal===1?itemsLeftText=window.PXUTheme.translation.one_item_left:itemsLeftText=window.PXUTheme.translation.items_left_text,$(".warning--quantity").remove(),totalCartItems${apiQuantityTotal} ${itemsLeftText}

`;cartItem.parentCartForm.find(`[data-line-id='${cartItem.lineID}'] input`).parent().after(warning2),cartItem.parentCartForm.find(`[data-line-id='${cartItem.lineID}'] input`).val(apiLineItemQuantity)}else cartItem.parentCartForm.data("cart-form")==="cart-template"?cartItem.parentCartForm.submit():refreshCart(data)}})}function refreshCartID(){const cartItem=document.querySelectorAll(".cart__item");for(let i=0;i{const itemDiscounts=item.discounts;let discountMessage="";for(let i=0;i${title}

`}const lineID=index+1;if(cartItemsHTML+=`
  • `,item.image&&(cartItemsHTML+=`
    ${htmlEncode(item.title)}
    `),cartItemsHTML+=`
    ${item.title}`,item.selling_plan_allocation&&(cartItemsHTML+=`
    ${item.selling_plan_allocation.selling_plan.name}
    `),item.properties&&(cartItemsHTML+='
    ',$.each(item.properties,(title,value2)=>{value2&&value2!=="on"&&(cartItemsHTML+=`
    ${title}: ${value2}
    `)}),cartItemsHTML+="
    "),cartItemsHTML+='
    ',$.ajax({dataType:"json",async:!1,cache:!1,url:`${window.Shopify.routes.root}products/${item.handle}.js`,success(data){let productData=data;if(productData.variants){const itemVariants=productData.variants;if(itemVariants.length>1)for(let v=0;vproductData.price?(productHasSale=!0,productCompareAtPrice=productData.compare_at_price,productFinalPrice=productData.price):productHasSale=!1}}),productHasSale===!0){const itemPrice=`${window.Shopify.formatMoney(productFinalPrice,$("body").data("money-format"))} ${window.Shopify.formatMoney(productCompareAtPrice,$("body").data("money-format"))}`;cartItemsHTML+=`${itemPrice}`,saving=(productCompareAtPrice-productFinalPrice)*item.quantity,totalSaving=saving+totalSaving}else if(item.price>item.final_price){const itemPrice=`${window.Shopify.formatMoney(item.final_price,$("body").data("money-format"))} ${window.Shopify.formatMoney(item.price,$("body").data("money-format"))}`;cartItemsHTML+=`${itemPrice}`}else{const itemPrice=window.Shopify.formatMoney(item.final_price,$("body").data("money-format"));item.final_price>0?cartItemsHTML+=`${itemPrice}`:cartItemsHTML+=`${window.PXUTheme.translation.cart_free_text}`}if(cartItemsHTML+="
    ",item.unit_price_measurement&&item.price>0){let unitPriceMeasurementReferenceValue="";item.unit_price_measurement.reference_value!==1&&(unitPriceMeasurementReferenceValue=item.unit_price_measurement.reference_value),cartItemsHTML+=`

    ${item.unit_price_measurement.quantity_value}${item.unit_price_measurement.quantity_unit} | ${Shopify.formatMoney(item.unit_price,$("body").data("money-format"))} / ${unitPriceMeasurementReferenceValue}${item.unit_price_measurement.reference_unit}

    `}item.price>item.final_price&&(cartItemsHTML+=discountMessage),cartItemsHTML+='
    ',cartItemsHTML+='',cartItemsHTML+=``,cartItemsHTML+='',cartItemsHTML+="
    ",cartItemsHTML+=``});const cartDiscounts=cart.cart_level_discount_applications;for(let i=0;i${title}`,cartDiscountsHTML+='',cartDiscountsHTML+=`-${amount}`}cartActionHTML+=`${window.Shopify.formatMoney(cart.total_price,$("body").data("money-format"))} ${window.PXUTheme.translation.cart_subtotal_text}`,totalSaving+=cart.total_discount,window.PXUTheme.theme_settings.display_savings&&totalSaving>0?cartSavingsHTML=`${window.Shopify.formatMoney(totalSaving,$("body").data("money-format"))}${window.PXUTheme.translation.cart_savings_text}`:cartSavingsHTML=""}$(".js-cart_items").html(cartItemsHTML),$(".js-cart_discounts").html(cartDiscountsHTML),$(".js-cart_subtotal").html(cartActionHTML),$(".js-cart_savings").html(cartSavingsHTML),window.PXUTheme.currency.show_multiple_currencies&&window.currencyConverter.convertCurrencies()}$("body").on("change","[data-cart-quantity-input]",function(){const cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:$(this).val(),parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};$(this).parents(".product-quantity-box").find(".js-change-quantity").addClass("is-disabled"),updateCartItemQuantity(cartItem)}),$("body").on("click","[data-remove-item]",function(e2){e2.preventDefault();const cartItem={lineID:$(this).parents("[data-cart-item]").data("line-id"),variantID:$(this).parents("[data-cart-item]").data("variant-id"),quantity:0,parentCartForm:$(this).parents("[data-cart-form]"),totalDiscount:$(this).parents("[data-cart-form]").data("total-discount"),$element:$(this).parents("[data-cart-item]")};cartItem.$element.addClass("animated fadeOutLeft"),updateCartItemQuantity(cartItem),cartItem.parentCartForm.data("cart-form")==="cart-template"&&(cartItem.$element.find("input").val("0"),cartItem.parentCartForm.submit()),cartItem.parentCartForm.data("cart-form")==="mini-cart"&&cartItem.$element.find("input").val("0")}),window.PXUTheme.theme_settings.cart_action==="ajax"&&$(document).on("click",".ajax-submit",function(e){e.preventDefault();const $addToCartForm=$(this).closest("form"),$addToCartBtn=$addToCartForm.find(".add_to_cart");return this.recipientForm=$addToCartForm[0].querySelector("[data-recipient-form]"),$(".warning").remove(),this.recipientForm&&this.recipientForm.classList.remove("recipient-form--has-errors"),$("body").hasClass("cart")&&$addToCartForm.submit(),$.ajax({url:"/cart/add.js",dataType:"json",cache:!1,type:"post",data:$addToCartForm.serialize(),beforeSend(){$addToCartBtn.attr("disabled","disabled").addClass("disabled"),$addToCartBtn.find("span").removeClass("fadeInDown").addClass("animated zoomOut")},success(){$addToCartBtn.find(".checkmark").addClass("checkmark-active"),window.setTimeout(()=>{$addToCartBtn.removeAttr("disabled").removeClass("disabled"),$addToCartBtn.find(".checkmark").removeClass("checkmark-active"),$addToCartBtn.find("span").removeClass("zoomOut").addClass("fadeInDown")},1e3),$.ajax({url:"/cart.js",dataType:"json",cache:!1,success(cart){setTimeout(function(){refreshCart(cart),$("body").hasClass("fancybox-active")&&$.fancybox.close(),$("#header").is(":visible")?$("#header .cart-container").addClass("active_link"):$(".sticky_nav--stick").length?$(".sticky_nav .cart-container").addClass("active_link"):$(".top-bar .cart-container").addClass("active_link"),window.PXUTheme.media_queries.medium.matches&&($(this).parent().hasClass("active_link"),$("body").addClass("blocked-scroll"),document.getElementById("header").classList.contains("mobile_nav-fixed--false")&&window.scroll({top:0,left:0,behavior:"smooth"}))},500)}})},error:XMLHttpRequest=>{const response=eval(`(${XMLHttpRequest.responseText})`);$(".warning").remove();let warning;response.errors&&response.errors.email?this.recipientForm.classList.add("recipient-form--has-errors"):(warning=`

    ${response.description.replace("All 1 ","All ")}

    `,$addToCartForm.after(warning)),$addToCartBtn.removeAttr("disabled").removeClass("disabled"),$addToCartBtn.find("span").text(window.PXUTheme.translation.add_to_cart).removeClass("zoomOut").addClass("zoomIn")}}),!1}),window.productPage.productSwatches()}),window.Shopify.updateOptionsInSelector=function(selectorIndex,parent){switch(selectorIndex){case 0:var key="root";break;case 1:var key=$(`${parent} .single-option-selector:eq(0)`).val();break;case 2:var key=$(`${parent} .single-option-selector:eq(0)`).val();key+=` / ${$(`${parent} .single-option-selector:eq(1)`).val()}`}const availableOptions=Shopify.optionsMap[key];$(`${parent} .swatch[data-option-index="${selectorIndex}"] .swatch-element`).each(function(){$.inArray($(this).attr("data-value"),availableOptions)!==-1?$(this).removeClass("soldout").find(":radio").removeAttr("disabled","disabled").removeAttr("checked"):$(this).addClass("soldout").find(":radio").removeAttr("checked").attr("disabled","disabled")})},window.Shopify.linkOptionSelectors=function(product,parent){window.Shopify.optionsMap={};for(let i=0;i1){const key=variant.option1;window.Shopify.optionsMap[key]=window.Shopify.optionsMap[key]||[],window.Shopify.optionsMap[key].push(variant.option2),window.Shopify.optionsMap[key]=window.Shopify.uniq(window.Shopify.optionsMap[key])}if(product.options.length===3){const key=`${variant.option1} / ${variant.option2}`;window.Shopify.optionsMap[key]=window.Shopify.optionsMap[key]||[],window.Shopify.optionsMap[key].push(variant.option3),window.Shopify.optionsMap[key]=window.Shopify.uniq(window.Shopify.optionsMap[key])}}}window.Shopify.updateOptionsInSelector(0,parent),product.options.length>1&&window.Shopify.updateOptionsInSelector(1,parent),product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),$(`${parent} .single-option-selector:eq(0)`).change(()=>(window.Shopify.updateOptionsInSelector(1,parent),product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),!0)),$(`${parent} .single-option-selector:eq(1)`).change(()=>(product.options.length===3&&window.Shopify.updateOptionsInSelector(2,parent),!0))},window.htmlEncode=function htmlEncode2(value){return value?$("
    ").text(value).html():""},window.is_touch_device=function is_touch_device(){return"ontouchstart"in window||navigator.maxTouchPoints},window.touch_device=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)})(); //# sourceMappingURL=/cdn/shop/t/14/assets/app.js.map?v=97157402213020947651727198619