(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");i{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded"),this.addEvent(),call_gafunction2()}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}hideButton(el){el&&el.classList.add(this.config.cls.hide)}showButton(el){el&&el.classList.remove(this.config.cls.hide)}updateButtonState(show=!0){const $button=this.querySelector(this.config.dom.button)||null;$button&&(show?this.showButton($button):this.hideButton($button))}addEvent(){const $inputs=this.querySelectorAll(this.config.dom.input)||[];!$inputs?.length>0||[...$inputs].forEach($input=>{$input.addEventListener("change",()=>{this.querySelector(this.config.dom.selected)||null?this.updateButtonState():this.updateButtonState(!1)})})}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}}(),function(){if(__sections__.header)try{class StickyHeader extends HTMLElement{constructor(){super()}connectedCallback(){this.header=document.querySelector(".section-header"),this.headerIsAlwaysSticky=this.getAttribute("data-sticky-type")==="always"||this.getAttribute("data-sticky-type")==="reduce-logo-size",this.headerBounds={},this.setHeaderHeight(),window.matchMedia("(max-width: 990px)").addEventListener("change",this.setHeaderHeight.bind(this)),this.headerIsAlwaysSticky&&this.header.classList.add("shopify-section-header-sticky"),this.currentScrollTop=0,this.preventReveal=!1,this.predictiveSearch=this.querySelector("predictive-search"),this.onScrollHandler=this.onScroll.bind(this),this.hideHeaderOnScrollUp=()=>this.preventReveal=!0,this.addEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}setHeaderHeight(){document.documentElement.style.setProperty("--header-height",`${this.header.offsetHeight}px`)}disconnectedCallback(){this.removeEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()}).observe(this.header)}onScroll(){const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(!(this.predictiveSearch&&this.predictiveSearch.isOpen)){if(scrollTop>this.currentScrollTop&&scrollTop>this.headerBounds.bottom){if(this.header.classList.add("scrolled-past-header"),this.preventHide)return;requestAnimationFrame(this.hide.bind(this))}else scrollTopthis.headerBounds.bottom?(this.header.classList.add("scrolled-past-header"),this.preventReveal?(window.clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.preventReveal=!1},66),requestAnimationFrame(this.hide.bind(this))):requestAnimationFrame(this.reveal.bind(this))):scrollTop<=this.headerBounds.top&&(this.header.classList.remove("scrolled-past-header"),requestAnimationFrame(this.reset.bind(this)));this.currentScrollTop=scrollTop}}hide(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-hidden","shopify-section-header-sticky"),this.closeMenuDisclosure())}reveal(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-sticky","animate"),this.header.classList.remove("shopify-section-header-hidden"))}reset(){this.headerIsAlwaysSticky||this.header.classList.remove("shopify-section-header-hidden","shopify-section-header-sticky","animate")}closeMenuDisclosure(){this.disclosures=this.disclosures||this.header.querySelectorAll("header-menu"),this.disclosures.forEach(disclosure=>disclosure.close())}closeSearchModal(){this.searchModal=this.searchModal||this.header.querySelector("details-modal"),this.searchModal.close(!1)}}customElements.define("sticky-header",StickyHeader)}catch(e){console.error(e)}}(),function(){if(__sections__["main-cart-items"])try{$(document).ready(function(){var isMobile=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(isMobile=!0);var pop_apple=$(".apple_desc_pop_cont").html(),pop_apple_sw=$(".swarranty_desc_pop_cont").html(),regex=/(<([^>]+)>)/gi,pop_apple_remove_html=pop_apple,pop_apple_remove_html_sw=pop_apple_sw;pop_apple!=null&&(pop_apple_remove_html=pop_apple.replace(regex,"")),pop_apple_sw!=null&&(pop_apple_remove_html_sw=pop_apple_sw.replace(regex,""));var learn_more_modal=document.getElementById("apple_care_learn_more_modal"),learn_more_modal_sw=document.getElementById("swarranty_learn_more_modal"),learn_more_btn=document.getElementById("learn_more_btn"),learn_more_btn=document.getElementById("learn_more_btn"),learn_more_close=$(".learn_more_close img"),learn_more_close_sw=$(".learn_more_close_sw img"),apple_dsce1="",apple_dsce1_sw="";$(document).on("click",".applecare_learn_more_btn",function(){$(".apple_care_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),$(".apple_care_popup_price").html(""),$(".show_desk").find(".apple_desc").html(""),$(".show_mob").find(".apple_desc_mob").html("");var apple_price=$(this).data("appleprice");apple_dsce1=$(this).data("appledsce"),$(".apple_care_popup_price").html(apple_price),$(".show_desk").find(".apple_desc").html(apple_dsce1);var popplusdsce=apple_dsce1+pop_apple;if(pop_apple_remove_html.length==0)if(apple_dsce1.length>244)var shortText=jQuery.trim(apple_dsce1).substring(0,244).trim(this)+"...";else var shortText=apple_dsce1;else if(popplusdsce.length>244)var shortText=jQuery.trim(popplusdsce).substring(0,244).trim(this)+"...";else var shortText=popplusdsce;return $(".show_mob").find(".apple_desc_mob").html(shortText),learn_more_modal.style.display="block",isMobile&&($(".apple_care_popup_content_cart.show_mob").css("display","block"),$(".apple_care_popup_content_cart.show_desk").css("display","none"),apple_dsce1.length>244||popplusdsce.length>244?$(".more_info_url").css("display","block"):$(".more_info_url").css("display","none")),!1}),$(document).on("click",".sec_warranty_learn_more_btn",function(){$(".swarranty_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),$(".swarranty_popup_price").html(""),$(".show_desk").find(".swarranty_desc").html(""),$(".show_mob").find(".swarranty_desc_mob").html("");var sw_price=$(this).data("swprice");sw_dsce1=$(this).data("swdsce"),$(".swarranty_popup_price").html(sw_price),$(".show_desk").find(".swarranty_desc").html(sw_dsce1);var protect_plus_desc=sw_dsce1+pop_apple_sw;if(pop_apple_remove_html_sw.length==0)if(sw_dsce1.length>244)var shortText=jQuery.trim(sw_dsce1).substring(0,244).trim(this)+"...";else var shortText=sw_dsce1;else if(protect_plus_desc.length>244)var shortText=jQuery.trim(protect_plus_desc).substring(0,244).trim(this)+"...";else var shortText=protect_plus_desc;return $(".show_mob").find(".swarranty_desc_mob").html(shortText),learn_more_modal_sw.style.display="block",isMobile&&($(".swarranty_popup_content_cart.show_mob").css("display","block"),$(".swarranty_popup_content_cart.show_desk").css("display","none"),sw_dsce1.length>244||protect_plus_desc.length>244?$(".more_info_url_sw").css("display","block"):$(".more_info_url_sw").css("display","none")),!1}),$(".learn_more_close").click(function(){learn_more_modal.style.display="none";var vid=document.getElementById("videoId");vid!=null&&(vid.pause(),vid.currentTime=0),$(".apple_care_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),isMobile&&($(".apple_care_popup_content_cart").css("height","48px"),$(".apple_care_popup_content_cart").css("overflow-y","hidden"))}),$(".learn_more_close_sw").click(function(){learn_more_modal_sw.style.display="none";var vid=document.getElementById("videoId");vid!=null&&(vid.pause(),vid.currentTime=0),$(".swarranty_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),isMobile&&($(".swarranty_popup_content_cart").css("height","48px"),$(".swarranty_popup_content_cart").css("overflow-y","hidden"))}),window.onclick=function(event){if(event.target==learn_more_modal){learn_more_modal.style.display="none";var vid=document.getElementById("videoId");vid!=null&&(vid.pause(),vid.currentTime=0),$(".apple_care_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),isMobile&&($(".apple_care_popup_content_cart").css("height","48px"),$(".apple_care_popup_content_cart").css("overflow-y","hidden"))}},window.onclick=function(event){if(event.target==learn_more_modal){learn_more_modal_sw.style.display="none";var vid=document.getElementById("videoId");vid!=null&&(vid.pause(),vid.currentTime=0),$(".swarranty_popup_content_cart").animate({scrollTop:$("div").offset().top},"smooth"),isMobile&&($(".swarranty_popup_content_cart").css("height","48px"),$(".swarranty_popup_content_cart").css("overflow-y","hidden"))}},$(".more_info_url").click(function(){return $(".apple_care_popup_content_cart.show_mob").css("display","none"),$(".apple_care_popup_content_cart.show_desk").css("display","block"),$(".apple_care_popup_content_cart").css("height","130px"),$(".apple_care_popup_content_cart").css("overflow-y","scroll"),$(".more_info_url").css("display","none"),$(".apple_care_popup_content_cart").animate({scrollTop:$("div").offset().top},0),!1}),$(".more_info_url_sw").click(function(){return $(".swarranty_popup_content_cart.show_mob").css("display","none"),$(".swarranty_popup_content_cart.show_desk").css("display","block"),$(".swarranty_popup_content_cart").css("height","130px"),$(".swarranty_popup_content_cart").css("overflow-y","scroll"),$(".more_info_url_sw").css("display","none"),$(".swarranty_popup_content_cart").animate({scrollTop:$("div").offset().top},0),!1})})}catch(e){console.error(e)}}(),function(){if(__sections__["product-recommendations-cart"])try{class ProductRecommendations extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}}(),function(){if(__sections__["product-recommendations"])try{class ProductRecommendations extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}}()})(); //# sourceMappingURL=/cdn/shop/t/39/compiled_assets/scripts.js.map?19998=