1/* 2@license 3 Impulse by Archetype Themes (https://archetypethemes.co) 4 Access unminified JS in assets/theme.js 5 6 Use this event listener to run your own JS outside of this file. 7 Documentation - https://archetypethemes.co/blogs/impulse/javascript-events-for-developers 8 9 document.addEventListener('page:loaded', function() { 10 // Page has loaded and theme assets are ready 11 }); 12*/ 13window.theme=window.theme||{},window.Shopify=window.Shopify||{},theme.config={bpSmall:!1,hasSessionStorage:!0,hasLocalStorage:!0,mediaQuerySmall:"screen and (max-width: 769px)",youTubeReady:!1,vimeoReady:!1,vimeoLoading:!1,isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),stickyHeader:!1,rtl:"rtl"==document.documentElement.getAttribute("dir")},theme.config.isTouch&&(document.documentElement.className+=" supports-touch"),console&&console.log&&console.log("Impulse theme ("+theme.settings.themeVersion+") by ARCHÐÑTYPE | Learn more at https://archetypethemes.co"),theme.recentlyViewed={recent:{},productInfo:{}},window.lazySizesConfig=window.lazySizesConfig||{},lazySizesConfig.expFactor=4,function(){"use strict";var e,t,i,n,o,s,a,r,c,l;if(theme.delegate={on:function(e,t,i){return this.namespaces||(this.namespaces={}),this.namespaces[e]=t,i=i||!1,this.addEventListener(e.split(".")[0],t,i),this},off:function(e){if(this.namespaces)return this.removeEventListener(e.split(".")[0],this.namespaces[e]),delete this.namespaces[e],this}},window.on=Element.prototype.on=theme.delegate.on,window.off=Element.prototype.off=theme.delegate.off,theme.utils={defaultTo:function(e,t){return null==e||e!=e?t:e},wrap:function(e,t){e.parentNode.insertBefore(t,e),t.appendChild(e)},debounce:function(e,t,i){var n;return function(){var o=this,s=arguments,a=function(){n=null,i||t.apply(o,s)},r=i&&!n;clearTimeout(n),n=setTimeout(a,e),r&&t.apply(o,s)}},throttle:function(e,t){var i=!1;return function(){i||(t.apply(this,arguments),i=!0,setTimeout((function(){i=!1}),e))}},prepareTransition:function(e,t){e.addEventListener("transitionend",(function t(i){e.classList.remove("is-transitioning"),e.removeEventListener("transitionend",t)})),e.classList.add("is-transitioning"),e.offsetWidth,"function"==typeof t&&t()},compact:function(e){for(var t=-1,i=null==e?0:e.length,n=0,o=[];++t<i;){var s=e[t];s&&(o[n++]=s)}return o},serialize:function(e){var t=[];return Array.prototype.slice.call(e.elements).forEach((function(e){!e.name||e.disabled||["file","reset","submit","button"].indexOf(e.type)>-1||("select-multiple"!==e.type?["checkbox","radio"].indexOf(e.type)>-1&&!e.checked||t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)):Array.prototype.slice.call(e.options).forEach((function(i){i.selected&&t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(i.value))})))})),t.join("&")}},theme.a11y={trapFocus:function(e){var t={focusin:e.namespace?"focusin."+e.namespace:"focusin",focusout:e.namespace?"focusout."+e.namespace:"focusout",keydown:e.namespace?"keydown."+e.namespace:"keydown.handleFocus"},i=e.container.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])'),n=[].slice.call(i).filter((e=>null!==e.offsetParent)),o=n[0],s=n[n.length-1];e.elementToFocus||(e.elementToFocus=e.container),e.container.setAttribute("tabindex","-1"),e.elementToFocus.focus(),document.documentElement.off("focusin"),document.documentElement.on(t.focusout,(function(){document.documentElement.off(t.keydown)})),document.documentElement.on(t.focusin,(function(e){e.target!==s&&e.target!==o||document.documentElement.on(t.keydown,(function(e){!function(e){if(9!==e.keyCode)return;e.target===o&&e.shiftKey&&(e.preventDefault(),s.focus())}(e)}))}))},removeTrapFocus:function(e){var t=e.namespace?"focusin."+e.namespace:"focusin";e.container&&e.container.removeAttribute("tabindex"),document.documentElement.off(t)},lockMobileScrolling:function(e,t){var i=t||document.documentElement;document.documentElement.classList.add("lock-scroll"),i.on("touchmove"+e,(function(){return!0}))},unlockMobileScrolling:function(e,t){document.documentElement.classList.remove("lock-scroll"),(t||document.documentElement).off("touchmove"+e)}},document.documentElement.on("keyup.tab",(function(e){9===e.keyCode&&(document.documentElement.classList.add("tab-outline"),document.documentElement.off("keyup.tab"))})),theme.Currency=(e=theme&&theme.settings&&theme.settings.superScriptPrice,{formatMoney:function(t,i){i||(i=theme.settings.moneyFormat),"string"==typeof t&&(t=t.replace(".",""));var n="",o=/\{\{\s*(\w+)\s*\}\}/,s=i||"${{amount}}";function a(e,t,i,n){if(t=theme.utils.defaultTo(t,2),i=theme.utils.defaultTo(i,","),n=theme.utils.defaultTo(n,"."),isNaN(e)||null==e)return 0;var o=(e=(e/100).toFixed(t)).split(".");return o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i)+(o[1]?n+o[1]:"")}
13switch(s.match(o)[1]){case"amount":n=a(t,2),e&&n&&n.includes(".")&&(n=n.replace(".","<sup>")+"</sup>");break;case"amount_no_decimals":n=a(t,0);break;case"amount_with_comma_separator":n=a(t,2,".",","),e&&n&&n.includes(".")&&(n=n.replace(",","<sup>")+"</sup>");break;case"amount_no_decimals_with_comma_separator":n=a(t,0,".",",");break;case"amount_no_decimals_with_space_separator":n=a(t,0," ")}return s.replace(o,n)},getBaseUnit:function(e){if(e&&e.unit_price_measurement&&e.unit_price_measurement.reference_value)return 1===e.unit_price_measurement.reference_value?e.unit_price_measurement.reference_unit:e.unit_price_measurement.reference_value+e.unit_price_measurement.reference_unit}}),theme.Images={imageSize:function(e){if(!e)return"620x";var t=e.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return null!==t?t[1]:null},getSizedImageUrl:function(e,t){if(!e)return e;if(null==t)return e;if("master"===t)return this.removeProtocol(e);var i=e.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(null!=i){var n=e.split(i[0]),o=i[0];return this.removeProtocol(n[0]+"_"+t+o)}return null},removeProtocol:function(e){return e.replace(/http(s)?:/,"")},lazyloadImagePath:function(e){var t;return null!==e&&(t=e.replace(/(\.[^.]*)$/,"_{width}x$1")),t}},theme.loadImageSection=function(e){function t(){e.classList.remove("loading","loading--delayed"),e.classList.add("loaded")}function i(){return e.querySelector(".lazyloaded")}if(e.querySelector("svg"))t();else if(i())t();else var n=setInterval((function(){i()&&(clearInterval(n),t())}),25)},theme.initWhenVisible=function(e){var t=e.threshold?e.threshold:0;new IntersectionObserver(((t,i)=>{t.forEach((t=>{t.isIntersecting&&"function"==typeof e.callback&&(e.callback(),i.unobserve(t.target))}))}),{rootMargin:"0px 0px "+t+"px 0px"}).observe(e.element)},theme.LibraryLoader=(n="requested",o="loaded",a={youtubeSdk:{tagId:"youtube-sdk",src:"https://www.youtube.com/iframe_api",type:i="script"},vimeo:{tagId:"vimeo-api",src:"https://player.vimeo.com/api/player.js",type:i},shopifyXr:{tagId:"shopify-model-viewer-xr",src:(s="https://cdn.shopify.com/shopifycloud/")+"shopify-xr-js/assets/v1.0/shopify-xr.en.js",type:i},modelViewerUi:{tagId:"shopify-model-viewer-ui",src:s+"model-viewer-ui/assets/v1.0/model-viewer-ui.en.js",type:i},modelViewerUiStyles:{tagId:"shopify-model-viewer-ui-styles",src:s+"model-viewer-ui/assets/v1.0/model-viewer-ui.css",type:t="link"}},{load:function(e,s){var r=a[e];if(r&&r.status!==n)if(s=s||function(){},r.status!==o){var c;switch(r.status=n,r.type){case i:c=function(e,t){var i=document.createElement("script");return i.src=e.src,i.addEventListener("load",(function(){e.status=o,t()})),i}(r,s);break;case t:c=function(e,t){var i=document.createElement("link");return i.href=e.src,i.rel="stylesheet",i.type="text/css",i.addEventListener("load",(function(){e.status=o,t()})),i}(r,s)}c.id=r.tagId,r.element=c;var l=document.getElementsByTagName(r.type)[0];l.parentNode.insertBefore(c,l)}else s()}}),theme.rteInit=function(){function e(e){e.src=e.src;var t=document.createElement("div");t.classList.add("video-wrapper"),theme.utils.wrap(e,t)}document.querySelectorAll(".rte table").forEach((e=>{var t=document.createElement("div");t.classList.add("table-wrapper"),theme.utils.wrap(e,t)})),document.querySelectorAll('.rte iframe[src*="youtube.com/embed"]').forEach((t=>{e(t)})),document.querySelectorAll('.rte iframe[src*="player.vimeo"]').forEach((t=>{e(t)})),document.querySelectorAll(".rte a img").forEach((e=>{e.parentNode.classList.add("rte__image")}))},theme.Sections=function(){this.constructors={},this.instances=[],document.addEventListener("shopify:section:load",this._onSectionLoad.bind(this)),document.addEventListener("shopify:section:unload",this._onSectionUnload.bind(this)),document.addEventListener("shopify:section:select",this._onSelect.bind(this)),document.addEventListener("shopify:section:deselect",this._onDeselect.bind(this)),document.addEventListener("shopify:block:select",this._onBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this._onBlockDeselect.bind(this))},theme.Sections.prototype=Object.assign({},theme.Sections.prototype,{_createInstance:function(e,t,i){var n=e.getAttribute("data-section-id"),o=e.getAttribute("data-section-type");if(void 0!==(t=t||this.constructors[o])){if(i)this._findInstance(n)&&this._removeInstance(n);try{var s=Object.assign(new t(e),{id:n,type:o,container:e});this.instances.push(s)}catch(e){console.error(e)}}},_findInstance:function(e){for(var t=0;t<this.instances.length;t++)if(this.instances[t].id===e)return this.instances[t]},_removeInstance:function(e){for(var t,i=this.instances.length;i--;)if(this.instances[i].id===e){t=this.instances[i],this.instances.splice(i,1);break}return t},_onSectionLoad:function(e,t,i){window.AOS&&AOS.refreshHard(),theme&&theme.initGlobals&&theme.initGlobals();var n=t||e.target,o=t||e.target.querySelector("[data-section-id]");if(o){this._createInstance(o);var s=t?i:this._findInstance(e.detail.sectionId);n.querySelectorAll("[data-subsection]").length&&this.loadSubSections(n),s&&"function"==typeof s.onLoad&&s.onLoad(e),setTimeout((function(){window.dispatchEvent(new Event("scroll"))}),200)}},_onSectionUnload:function(e){this.instances=this.instances.filter((function(t){var i=t.id===e.detail.sectionId;return i&&"function"==typeof t.onUnload&&t.onUnload(e),!i}))},loadSubSections:function(e){e&&e.querySelectorAll("[data-section-id]").forEach((e=>{this._onSectionLoad(null,e,e.dataset.sectionId)}))},_onSelect:function(e){var t=this._findInstance(e.detail.sectionId);void 0!==t&&"function"==typeof t.onSelect&&t.onSelect(e)},_onDeselect:function(e){var t=this._findInstance(e.detail.sectionId);void 0!==t&&"function"==typeof t.onDeselect&&t.onDeselect(e)},_onBlockSelect:function(e){var t=this._findInstance(e.detail.sectionId);void 0!==t&&"function"==typeof t.onBlockSelect&&t.onBlockSelect(e)},_onBlockDeselect:function(e){var t=this._findInstance(e.detail.sectionId);void 0!==t&&"function"==typeof t.onBlockDeselect&&t.onBlockDeselect(e)},register:function(e,t,i){this.constructors[e]=t;var n=document.querySelectorAll('[data-section-type="'+e+'"]');i&&(n=i.querySelectorAll('[data-section-type="'+e+'"]')),n.forEac
13h(function(e){this._createInstance(e,t,i)}.bind(this))},reinit:function(e){for(var t=0;t<this.instances.length;t++){var i=this.instances[t];i.type===e&&"function"==typeof i.forceReload&&i.forceReload()}}}),theme.Variants=function(){function e(e){this.container=e.container,this.variants=e.variants,this.singleOptionSelector=e.singleOptionSelector,this.originalSelectorId=e.originalSelectorId,this.enableHistoryState=e.enableHistoryState,this.currentlySelectedValues=this._getCurrentOptions(),this.currentVariant=this._getVariantFromOptions(this.currentlySelectedValues),this.container.querySelectorAll(this.singleOptionSelector).forEach((e=>{e.addEventListener("change",this._onSelectChange.bind(this))}))}return e.prototype=Object.assign({},e.prototype,{_getCurrentOptions:function(){var e=[];return this.container.querySelectorAll(this.singleOptionSelector).forEach((t=>{var i=t.getAttribute("type");"radio"===i||"checkbox"===i?t.checked&&e.push({value:t.value,index:t.dataset.index}):e.push({value:t.value,index:t.dataset.index})})),e=theme.utils.compact(e)},_getVariantFromOptions:function(e){const t=this._getCurrentOptions(),i=this.variants,n=i.find((e=>t.every((({value:t,index:i})=>e[i]===t))&&e.available)),o=e&&i.find((t=>t[e.index]===e.value&&t.available)),s=i.find((e=>t.every((({value:t,index:i})=>e[i]===t)))),a=e&&i.find((t=>t[e.index]===e.value));return n||o||s||a||null},_updateInputState:function(e){return t=>{const i=t.dataset.index,n=t.value,o=t.getAttribute("type");"radio"!==o&&"checkbox"!==o||(null===e?el!==t&&(t.checked=!1):t.checked=e[i]===n)}},_onSelectChange:function({srcElement:e}){const t=this.container.querySelectorAll(this.singleOptionSelector),i=this._getVariantFromOptions({index:e.dataset.index,value:e.value});t.forEach(this._updateInputState(i));const n={variant:i,currentlySelectedValues:this.currentlySelectedValues=this._getCurrentOptions(),value:e.value,index:e.parentElement.dataset.index};this.container.dispatchEvent(new CustomEvent("variantChange",{detail:n})),document.dispatchEvent(new CustomEvent("variant:change",{detail:n})),i&&(this._updateMasterSelect(i),this._updateImages(i),this._updatePrice(i),this._updateUnitPrice(i),this._updateSKU(i),this.currentVariant=i,this.enableHistoryState&&this._updateHistoryState(i))},_updateImages:function(e){var t=e.featured_image||{},i=this.currentVariant&&this.currentVariant.featured_image||{};e.featured_image&&t.src!==i.src&&this.container.dispatchEvent(new CustomEvent("variantImageChange",{detail:{variant:e}}))},_updatePrice:function(e){this.currentVariant&&e.price===this.currentVariant.price&&e.compare_at_price===this.currentVariant.compare_at_price||this.container.dispatchEvent(new CustomEvent("variantPriceChange",{detail:{variant:e}}))},_updateUnitPrice:function(e){this.currentVariant&&e.unit_price===this.currentVariant.unit_price||this.container.dispatchEvent(new CustomEvent("variantUnitPriceChange",{detail:{variant:e}}))},_updateSKU:function(e){this.currentVariant&&e.sku===this.currentVariant.sku||this.container.dispatchEvent(new CustomEvent("variantSKUChange",{detail:{variant:e}}))},_updateHistoryState:function(e){if(history.replaceState&&e){var t=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+e.id;window.history.replaceState({path:t},"",t)}},_updateMasterSelect:function(e){this.container.querySelector(this.originalSelectorId).value=e.id,this.container.querySelector(this.originalSelectorId).dispatchEvent(new Event("change",{bubbles:!0}))}}),e}(),window.vimeoApiReady=function(){var e,t;theme.config.vimeoLoading=!0,new Promise(((i,n)=>{e=setInterval((function(){Vimeo&&(clearInterval(e),clearTimeout(t),i())}),500),t=setTimeout((function(){clearInterval(e),n()}),4e3)})).then((function(){theme.config.vimeoReady=!0,theme.config.vimeoLoading=!1,document.dispatchEvent(new CustomEvent("vimeoReady"))}))},theme.VimeoPlayer=function(){var e="loading",t="loaded",i="video-interactable",n={background:!0,byline:!1,controls:!1,loop:!0,muted:!0,playsinline:!0,portrait:!1,title:!1};function o(e,t,i){this.divId=e,this.el=document.getElementById(e),this.videoId=t,this.iframe=null,this.options=i,this.options&&this.options.videoParent&&(this.parent=this.el.closest(this.options.videoParent)),this.setAsLoading(),theme.config.vimeoReady?this.init():(theme.LibraryLoader.load("vimeo",window.vimeoApiReady),document.addEventListener("vimeoReady",this.init.bind(this)))}return o.prototype=Object.assign({},o.prototype,{init:function(){var e=n;e.id=this.videoId,this.videoPlayer=new Vimeo.Player(this.el,e),this.videoPlayer.ready().then(this.playerReady.bind(this))},playerReady:function(){this.iframe=this.el.querySelector("iframe"),this.iframe.setAttribute("tabindex","-1"),this.videoPlayer.setMuted(!0),this.setAsLoaded(),new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting?this.play():this.pause()}))}),{rootMargin:"0px 0px 50px 0px"}).observe(this.iframe)},setAsLoading:function(){this.parent&&this.parent.classList.add(e)},setAsLoaded:function(){this.parent&&(this.parent.classList.remove(e),this.parent.classList.add(t),Shopify&&Shopify.designMode&&window.AOS&&AOS.refreshHard())},enableInteraction:function(){this.parent&&this.parent.classList.add(i)},play:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.play&&this.videoPlayer.play()},pause:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.pause&&this.videoPlayer.pause()},destroy:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.destroy&&this.videoPlayer.destroy()}}),o}(),window.onYouTubeIframeAPIReady=function(){theme.config.youTubeReady=!0,document.dispatchEvent(new CustomEvent("youTubeReady"))},theme.YouTube=function(){var e="loading",t="loaded",i="video-interactable",n={width:1280,height:720,playerVars:{autohide:0,autoplay:1,cc_load_policy:0,controls:0,fs:0,iv_load_policy:3,modestbranding:1,playsinline:1,rel:0}};function o(e,t){this.divId=e,this.iframe=null,this.attemptedToPlay=!1,n.events={onReady:this.onVideoPlayerReady.bind(this),onStateChange:this.onVideoStateChange.bind(this)},this.options=Object.assign({},n,t),this.options&&(this.options.videoParent&&(this.parent=document.getElementById(this.divId).closest(this.options.videoParent)),this.options.autoplay||(this.options.playerVars.autoplay=this.options.autoplay),"sound"===this.options.style&&(this.options.playerVars.controls=1,this.options.playerVars.autoplay=0)),this.setAsLoading(),theme.config.youTubeReady?this.init():(theme.LibraryLoader.load("youtubeSdk"),document.addEventListener("youTubeReady",this.init.bind(this)))}return o.prototype=Object.assign({},o.prototype,{init:function(){this.videoPlayer=new YT.Player(this.divId,this.options)},onVideoPlayerReady:function(e){this.iframe=document.getElementById(this.divId),this.iframe.setAttribute("tabindex","-1"),"sound"!==this.options.style&&e.target.mute(),new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting?this.play():this.pause()}))}),{rootMargin:"0px 0px 50px 0px"}).observe(this.iframe)},onVideoStateChange:function(e){switch(e.data){case-1:this.attemptedToPlay&&(this.setAsLoaded(),this.enableInteraction());break;case 0:this.play(e);break;case 1:this.setAsLoaded();break;case 3:this.attemptedToPlay=!0}},setAsLoading:function(){this.parent&&this.parent.classList.add(e)},setAsLoaded:function(){this.parent&&(this.parent.classList.remove(e),this.parent.classList.add(t),Shopify&&Shopify.designMode&&window.AOS&&AOS.refreshHard())},enableInteraction:function(){this.parent&&this.parent.classList.add(i)},play:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.playVideo&&this.videoPlayer.playVideo()},pause:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.pauseVideo&&this.videoPlayer.pauseVideo()},destroy:function(){this.videoPlayer&&"function"==typeof this.videoPlayer.destroy&&this.videoPlayer.destroy()}}),o}(),c=!1,document.body.addEventListener("touchstart",(function(e){if(!e.target.closest(".flickity-slider"))return c=!1;c=!0,r={x:e.touches[0].pageX,y:e.touches[0].pageY}})),document.body.addEventListener("touchmove",(function(e){if(c&&e.cancelable){var t={x:e.touches[0].pageX-r.x,y:e.touches[0].pageY-r.y};Math.abs(t.x)>Flickity.defaults.dragThreshold&&e.preventDefault()}}),{passive:!1}),theme.AjaxRenderer=function(){function e({sections:e,onReplace:t,debug:i}={}){this.sections=e||[],this.cachedSections=[],this.onReplace=t,this.debug=Boolean(i)}return e.prototype=Object.assign({},e.prototype,{renderPage:function(e,t,i=!0){const n=new URLSearchParams(window.location.search),o=this.getUpdatedParams(n,t),s=this.sections.map((t=>{const i=`${e}?section_id=${t.sectionId}&${o.toString()}`,n=e=>e.url===i;
13return this.cachedSections.some(n)?this.renderSectionFromCache(n,t):this.renderSectionFromFetch(i,t)}));return i&&this.updateURLHash(o),Promise.all(s)},renderSectionFromCache:function(e,t){const i=this.cachedSections.find(e);return this.log(`[AjaxRenderer] rendering from cache: url=${i.url}`),this.renderSection(i.html,t),Promise.resolve(t)},renderSectionFromFetch:function(e,t){return this.log(`[AjaxRenderer] redering from fetch: url=${e}`),new Promise(((i,n)=>{fetch(e).then((e=>e.text())).then((n=>{const o=n;this.cachedSections=[...this.cachedSections,{html:o,url:e}],this.renderSection(o,t),i(t)})).catch((e=>n(e)))}))},renderSection:function(e,t){this.log(`[AjaxRenderer] rendering section: section=${JSON.stringify(t)}`);const i=(new DOMParser).parseFromString(e,"text/html");if(this.onReplace)this.onReplace(i,t);else if("string"==typeof t.nodeId){var n=i.getElementById(t.nodeId);if(!n)return;document.getElementById(t.nodeId).innerHTML=n.innerHTML}else t.nodeId.forEach((e=>{document.getElementById(e).innerHTML=i.getElementById(e).innerHTML}));return t},getUpdatedParams:function(e,t){const i=new URLSearchParams(e),n=["sort_by","q","options[prefix]","type"];for(const[e,o]of i.entries())t.getAll(e).includes(o)||n.includes(e)||i.delete(e);for(const[e,n]of t.entries())i.getAll(e).includes(n)||""===n||i.append(e,n);return i},updateURLHash:function(e){history.pushState({},"",`${window.location.pathname}${e&&"?".concat(e)}`)},log:function(...e){this.debug&&console.log(...e)}}),e}(),window.Shopify&&window.Shopify.theme&&navigator&&navigator.sendBeacon&&window.Shopify.designMode&&navigator.sendBeacon("https://api.archetypethemes.co/api/beacon",new URLSearchParams({shop:window.Shopify.shop,themeName:window.theme&&window.theme.settings&&`${window.theme.settings.themeName} v${window.theme.settings.themeVersion}`,role:window.Shopify.theme.role,route:window.location.pathname,themeId:window.Shopify.theme.id,themeStoreId:window.Shopify.theme.theme_store_id||0,isThemeEditor:!!window.Shopify.designMode})),theme.cart={getCart:function(){var e="".concat(theme.routes.cart,"?t=").concat(Date.now());return fetch(e,{credentials:"same-origin",method:"GET"}).then((e=>e.json()))},getCartProductMarkup:function(){var e="".concat(theme.routes.cartPage,"?t=").concat(Date.now());return e=-1===e.indexOf("?")?e+"?view=ajax":e+"&view=ajax",fetch(e,{credentials:"same-origin",method:"GET"}).then((function(e){return e.text()}))},changeItem:function(e,t){return this._updateCart({url:"".concat(theme.routes.cartChange,"?t=").concat(Date.now()),data:JSON.stringify({id:e,quantity:t})})},_updateCart:function(e){return fetch(e.url,{method:"POST",body:e.data,credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((function(e){return e}))},updateAttribute:function(e,t){return this._updateCart({url:"/cart/update.js",data:JSON.stringify({attributes:{[e]:theme.cart.attributeToString(t)}})})},updateNote:function(e){return this._updateCart({url:"/cart/update.js",data:JSON.stringify({note:theme.cart.attributeToString(e)})})},attributeToString:function(e){return"string"!=typeof e&&"undefined"===(e+="")&&(e=""),e.trim()}},theme.CartForm=function(){var e="[data-products]",t=".js-qty__wrapper",i="[data-discounts]",n="[data-savings]",o="[data-subtotal]",s=".cart-link__bubble",a='[name="note"]',r=".cart__terms-checkbox",c=".cart__checkout",l="btn--loading",d={requiresTerms:!1};function h(t){t&&(this.form=t,this.wrapper=t.parentNode,this.location=t.dataset.location,this.namespace=".cart-"+this.location,this.products=t.querySelector(e),this.submitBtn=t.querySelector(c),this.discounts=t.querySelector(i),this.savings=t.querySelector(n),this.subtotal=t.querySelector(o),this.termsCheckbox=t.querySelector(r),this.noteInput=t.querySelector(a),this.termsCheckbox&&(d.requiresTerms=!0),this.init())}return h.prototype=Object.assign({},h.prototype,{init:function(){this.initQtySelectors(),document.addEventListener("cart:quantity"+this.namespace,this.quantityChanged.bind(this)),this.form.on("submit"+this.namespace,this.onSubmit.bind(this)),this.noteInput&&this.noteInput.addEventListener("change",(function(){var e=this.value;theme.cart.updateNote(e)})),document.addEventListener("cart:build",function(){this.buildCart()}.bind(this))},reInit:function(){this.initQtySelectors()},onSubmit:function(e){if(this.submitBtn.classList.add(l),d.requiresTerms&&!this.termsCheckbox.checked)return alert(theme.strings.cartTermsConfirmation),this.submitBtn.classList.remove(l),e.preventDefault(),!1},_parseProductHTML:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return{items:t.querySelector(".cart__items"),discounts:t.querySelector(".cart__discounts")}},buildCart:function(){theme.cart.getCartProductMarkup().then(this.cartMarkup.bind(this))},cartMarkup:function(e){var t=this._parseProductHTML(e),i=t.items,n=parseInt(i.dataset.count),o=i.dataset.cartSubtotal,s=i.dataset.cartSavings;this.updateCartDiscounts(t.discounts),this.updateSavings(s),n>0?this.wrapper.classList.remove("is-empty"):this.wrapper.classList.add("is-empty"),this.updateCount(n),this.products.innerHTML="",this.products.append(i),this.subtotal.innerHTML=theme.Currency.formatMoney(o,theme.settings.moneyFormat),this.reInit(),window.AOS&&AOS.refreshHard(),Shopify&&Shopify.StorefrontExpressButtons&&Shopify.StorefrontExpressButtons.initialize()},updateCartDiscounts:function(e){this.discounts&&(this.discounts.innerHTML="",this.discounts.append(e))},initQtySelectors:function(){this.form.querySelectorAll(t).forEach((e=>{new theme.QtySelector(e,{namespace:this.namespace,isCart:!0})}))},quantityChanged:function(e){var t=e.detail[0],i=e.detail[1],n=e.detail[2];t&&i&&(n&&n.classList.add("is-loading"),theme.cart.changeItem(t,i).then(function(e){e.item_count>0?this.wrapper.classList.remove("is-empty"):this.wrapper.classList.add("is-empty"),this.buildCart(),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:e}}))}.bind(this)).catch((function(e){})))},updateSubtotal:function(e){this.form.querySelector(o).innerHTML=theme.Currency.formatMoney(e,theme.settings.moneyFormat)},updateSavings:function(e){if(this.savings)if(e>0){var t=theme.Currency.formatMoney(e,theme.settings.moneyFormat);this.savings.classList.remove("hide"),this.savings.innerHTML=theme.strings.cartSavings.replace("[savings]",t)}else this.savings.classList.add("hide")},updateCount:function(e){var t=document.querySelectorAll(".cart-link__bubble-num");t.length&&t.forEach((t=>{t.innerText=e}));var i=document.querySelectorAll(s);i.length&&(e>
130?i.forEach((e=>{e.classList.add("cart-link__bubble--visible")})):i.forEach((e=>{e.classList.remove("cart-link__bubble--visible")})))}}),h}(),theme.collapsibles=function(){var e=".collapsible-trigger",t=".collapsible-content",i=".collapsible-content__inner",n=".collapsible-trigger--tab",o="hide",s="is-open",a="collapsible--auto-height",r="collapsible-trigger--tab",c=".collapsible",l=!1;function d(e){if(!l){l=!0;var o=e.currentTarget,d=o.classList.contains(s),u=o.classList.contains(r),m=o.getAttribute("aria-controls"),p=document.getElementById(m);if(m||(m=o.dataset.controls),m){if(!p)document.querySelectorAll('[data-id="'+m+'"]').length>0&&(p=o.parentNode.querySelector('[data-id="'+m+'"]'));if(p){var f=p.querySelector(i).offsetHeight,g=p.classList.contains(a),y=p.parentNode.closest(t),v=f;if(u){if(d)return void(l=!1);document.querySelectorAll(n+'[data-id="'+o.dataset.id+'"]').forEach((e=>{e.classList.remove(s),h(document.querySelector("#"+e.getAttribute("aria-controls")),0,!0)}))}if(d&&g&&setTimeout((function(){h(p,f=0,d,g)}),0),d&&!g&&(f=0),o.setAttribute("aria-expanded",!d),d?o.classList.remove(s):o.classList.add(s),h(p,f,d,g),y){var S=y.style.height;d&&"auto"===S&&(v=0),h(y,d?y.offsetHeight-v:f+y.offsetHeight,!1,!1)}if(window.SPR){var b=p.querySelector(".spr-summary-actions-newreview");if(!b)return;b.off("click"+c),b.on("click"+c,(function(){f=p.querySelector(i).offsetHeight,h(p,f,d,g)}))}}else l=!1}}}function h(e,t,i,n){if(e.classList.remove(o),theme.utils.prepareTransition(e,(function(){e.style.height=t+"px",i?e.classList.remove(s):e.classList.add(s)})),!i&&n){var a=e;window.setTimeout((function(){a.css("height","auto"),l=!1}),500)}else l=!1}return{init:function(t){(t||document).querySelectorAll(e).forEach((e=>{var t=e.classList.contains(s);e.setAttribute("aria-expanded",t),e.off("click"+c),e.on("click"+c,d)}))}}}(),theme.Disclosure=function(){var e="[data-disclosure-form]",t="[data-disclosure-list]",i="[data-disclosure-toggle]",n="[data-disclosure-input]",o="[data-disclosure-option]",s="disclosure-list--visible";function a(e){this.container=e,this._cacheSelectors(),this._setupListeners()}return a.prototype=Object.assign({},a.prototype,{_cacheSelectors:function(){this.cache={disclosureForm:this.container.closest(e),disclosureList:this.container.querySelector(t),disclosureToggle:this.container.querySelector(i),disclosureInput:this.container.querySelector(n),disclosureOptions:this.container.querySelectorAll(o)}},_setupListeners:function(){this.eventHandlers=this._setupEventHandlers(),this.cache.disclosureToggle.addEventListener("click",this.eventHandlers.toggleList),this.cache.disclosureOptions.forEach((function(e){e.addEventListener("click",this.eventHandlers.connectOptions)}),this),this.container.addEventListener("keyup",this.eventHandlers.onDisclosureKeyUp),this.cache.disclosureList.addEventListener("focusout",this.eventHandlers.onDisclosureListFocusOut),this.cache.disclosureToggle.addEventListener("focusout",this.eventHandlers.onDisclosureToggleFocusOut),document.body.addEventListener("click",this.eventHandlers.onBodyClick)},_setupEventHandlers:function(){return{connectOptions:this._connectOptions.bind(this),toggleList:this._toggleList.bind(this),onBodyClick:this._onBodyClick.bind(this),onDisclosureKeyUp:this._onDisclosureKeyUp.bind(this),onDisclosureListFocusOut:this._onDisclosureListFocusOut.bind(this),onDisclosureToggleFocusOut:this._onDisclosureToggleFocusOut.bind(this)}},_connectOptions:function(e){e.preventDefault(),this._submitForm(e.currentTarget.dataset.value)},_onDisclosureToggleFocusOut:function(e){!1===this.container.contains(e.relatedTarget)&&this._hideList()},_onDisclosureListFocusOut:function(e){var t=e.currentTarget.contains(e.relatedTarget);this.cache.disclosureList.classList.contains(s)&&!t&&this._hideList()},_onDisclosureKeyUp:function(e){27===e.which&&(this._hideList(),this.cache.disclosureToggle.focus())},_onBodyClick:function(e){var t=this.container.contains(e.target);this.cache.disclosureList.classList.contains(s)&&!t&&this._hideList()},_submitForm:function(e){this.cache.disclosureInput.value=e,this.cache.disclosureForm.submit()},_hideList:function(){this.cache.disclosureList.classList.remove(s),this.cache.disclosureToggle.setAttribute("aria-expanded",!1)},_toggleList:function(){var e="true"===this.cache.disclosureToggle.getAttribute("aria-expanded");this.cache.disclosureList.classList.toggle(s),this.cache.disclosureToggle.setAttribute("aria-expanded",!e)},destroy:function(){this.cache.disclosureToggle.removeEventListener("click",this.eventHandlers.toggleList),this.cache.disclosureOptions.forEach((function(e){e.removeEventListener("click",this.eventHandlers.connectOptions)}),this),this.container.removeEventListener("keyup",this.eventHandlers.onDisclosureKeyUp),this.cache.disclosureList.removeEventListener("focusout",this.eventHandlers.onDisclosureListFocusOut),this.cache.disclosureToggle.removeEventListener("focusout",this.eventHandlers.onDisclosureToggleFocusOut),document.body.removeEventListener("click",this.eventHandlers.onBodyClick)}}),a}(),theme.Drawers=function(){function e(e,t){this.config={id:e,close:".js-drawer-close",open:".js-drawer-open-"+t,openClass:"js-drawer-open",closingClass:"js-drawer-closing",activeDrawer:"drawer--is-open",namespace:".drawer-"+t},this.nodes={page:document.querySelector("#MainContent")},this.drawer=document.querySelector("#"+e),this.isOpen=!1,this.drawer&&this.init()}return e.prototype=Object.assign({},e.prototype,{init:function(){document.querySelectorAll(this.config.open).forEac
13h((e=>{e.setAttribute("aria-expanded","false"),e.addEventListener("click",this.open.bind(this))})),this.drawer.querySelector(this.config.close).addEventListener("click",this.close.bind(this)),document.addEventListener("modalOpen",function(){this.close()}.bind(this))},open:function(e,t){e&&e.preventDefault(),this.isOpen||(e&&e.stopPropagation?(e.stopPropagation(),e.currentTarget.setAttribute("aria-expanded","true"),this.activeSource=e.currentTarget):t&&(t.setAttribute("aria-expanded","true"),this.activeSource=t),theme.utils.prepareTransition(this.drawer,function(){this.drawer.classList.add(this.config.activeDrawer)}.bind(this)),document.documentElement.classList.add(this.config.openClass),this.isOpen=!0,theme.a11y.trapFocus({container:this.drawer,namespace:"drawer_focus"}),document.dispatchEvent(new CustomEvent("drawerOpen")),document.dispatchEvent(new CustomEvent("drawerOpen."+this.config.id)),this.bindEvents())},close:function(e){if(this.isOpen){if(e)if(e.target.closest(".js-drawer-close"));else if(e.target.closest(".drawer"))return;document.activeElement.blur(),theme.utils.prepareTransition(this.drawer,function(){this.drawer.classList.remove(this.config.activeDrawer)}.bind(this)),document.documentElement.classList.remove(this.config.openClass),document.documentElement.classList.add(this.config.closingClass),window.setTimeout(function(){document.documentElement.classList.remove(this.config.closingClass),this.activeSource&&this.activeSource.getAttribute("aria-expanded")&&(this.activeSource.setAttribute("aria-expanded","false"),this.activeSource.focus())}.bind(this),500),this.isOpen=!1,theme.a11y.removeTrapFocus({container:this.drawer,namespace:"drawer_focus"}),this.unbindEvents()}},bindEvents:function(){window.on("click"+this.config.namespace,function(e){this.close(e)}.bind(this)),window.on("keyup"+this.config.namespace,function(e){27===e.keyCode&&this.close()}.bind(this)),theme.a11y.lockMobileScrolling(this.config.namespace,this.nodes.page)},unbindEvents:function(){window.off("click"+this.config.namespace),window.off("keyup"+this.config.namespace),theme.a11y.unlockMobileScrolling(this.config.namespace,this.nodes.page)}}),e}(),theme.Modals=function(){function e(e,t,i){var n={close:".js-modal-close",open:".js-modal-open-"+t,openClass:"modal--is-active",closingClass:"modal--is-closing",bodyOpenClass:["modal-open"],bodyOpenSolidClass:"modal-open--solid",bodyClosingClass:"modal-closing",closeOffContentClick:!0};if(this.id=e,this.modal=document.getElementById(e),!this.modal)return!1;this.modalContent=this.modal.querySelector(".modal__inner"),this.config=Object.assign(n,i),this.modalIsOpen=!1,this.focusOnOpen=this.config.focusIdOnOpen?document.getElementById(this.config.focusIdOnOpen):this.modal,this.isSolid=this.config.solid,this.init()}return e.prototype.init=function(){document.querySelectorAll(this.config.open).forEach((e=>{e.setAttribute("aria-expanded","false"),e.addEventListener("click",this.open.bind(this))})),this.modal.querySelectorAll(this.config.close).forEach((e=>{e.addEventListener("click",this.close.bind(this))})),document.addEventListener("drawerOpen",function(){this.close()}.bind(this))},e.prototype.open=function(e){var t=!1;this.modalIsOpen||(e?e.preventDefault():t=!0,e&&e.stopPropagation&&(e.stopPropagation(),this.activeSource=e.currentTarget.setAttribute("aria-expanded","true")),this.modalIsOpen&&!t&&this.close(),this.modal.classList.add(this.config.openClass),document.documentElement.classList.add(...this.config.bodyOpenClass),this.isSolid&&document.documentElement.classList.add(this.config.bodyOpenSolidClass),this.modalIsOpen=!0,theme.a11y.trapFocus({container:this.modal,elementToFocus:this.focusOnOpen,namespace:"modal_focus"}),document.dispatchEvent(new CustomEvent("modalOpen")),document.dispatchEvent(new CustomEvent("modalOpen."+this.id)),this.bindEvents())},e.prototype.close=function(e){if(this.modalIsOpen){if(e)if(e.target.closest(".js-modal-close"));else if(e.target.closest(".modal__inner"))return;document.activeElement.blur(),this.modal.classList.remove(this.config.openClass),this.modal.classList.add(this.config.closingClass),document.documentElement.classList.remove(...this.config.bodyOpenClass),document.documentElement.classList.add(this.config.bodyClosingClass),window.setTimeout(function(){document.documentElement.classList.remove(this.config.bodyClosingClass),this.modal.classList.remove(this.config.closingClass),this.activeSource&&this.activeSource.getAttribute("aria-expanded")&&this.activeSource.setAttribute("aria-expanded","fal
13se").focus()}.bind(this),500),this.isSolid&&document.documentElement.classList.remove(this.config.bodyOpenSolidClass),this.modalIsOpen=!1,theme.a11y.removeTrapFocus({container:this.modal,namespace:"modal_focus"}),document.dispatchEvent(new CustomEvent("modalClose."+this.id)),this.unbindEvents()}},e.prototype.bindEvents=function(){window.on("keyup.modal",function(e){27===e.keyCode&&this.close()}.bind(this)),this.config.closeOffContentClick&&this.modal.on("click.modal",this.close.bind(this))},e.prototype.unbindEvents=function(){document.documentElement.off(".modal"),this.config.closeOffContentClick&&this.modal.off(".modal")},e}(),theme.parallaxSections={},theme.Parallax=function(){var e=!1;function t(e,t){this.isInit=!1,this.isVisible=!1,this.container=e,this.image=e.querySelector(".parallax-image"),this.namespace=t.namespace,this.desktopOnly=t.desktopOnly,this.container&&this.image&&(this.desktopOnly&&(document.addEventListener("matchSmall",function(){this.destroy()}.bind(this)),document.addEventListener("unmatchSmall",function(){this.init(!0)}.bind(this))),this.init(this.desktopOnly))}return t.prototype=Object.assign({},t.prototype,{init:function(e){(this.isInit&&this.destroy(),this.isInit=!0,e&&theme.config.bpSmall)||(this.setSizes(),this.scrollHandler(),new IntersectionObserver(((e,t)=>{e.forEach((e=>{this.isVisible=e.isIntersecting,this.isVisible?window.on("scroll"+this.namespace,this.onScroll.bind(this)):window.off("scroll"+this.namespace)}))}),{rootMargin:"200px 0px 200px 0px"}).observe(this.container),window.on("resize"+this.namespace,theme.utils.debounce(250,this.setSizes.bind(this))),document.addEventListener("shopify:section:reorder",theme.utils.debounce(250,this.onReorder.bind(this))))},onScroll:function(){this.isVisible&&(window.SPR&&!e&&(this.setSizes(),e=!0),requestAnimationFrame(this.scrollHandler.bind(this)))},scrollHandler:function(){var e=.85*(window.scrollY-this.elTop);this.image.style.transform="translate3d(0, "+e+"px, 0)"},setSizes:function(){var e=this.container.getBoundingClientRect();this.elTop=e.top+window.scrollY},onReorder:function(){this.setSizes(),this.onScroll()},destroy:function(){this.image.style.transform="none",window.off("scroll"+this.namespace),window.off("resize"+this.namespace)}}),t}(),void 0===window.noUiSlider)throw new Error("theme.PriceRange is missing vendor noUiSlider: // =require vendor/nouislider.js");theme.PriceRange=function(){var e=".price-range__slider",t=".price-range__input-min",i=".price-range__input-max",n=".price-range__display-min",o=".price-range__display-max";function s(e,{onChange:t,onUpdate:i,...n}={}){return this.container=e,this.onChange=t,this.onUpdate=i,this.sliderOptions=n||{},this.init()}return s.prototype=Object.assign({},s.prototype,{init:function(){if(!this.container.classList.contains("price-range"))throw new Error("You must instantiate PriceRange with a valid container");return this.formEl=this.container.closest("form"),this.sliderEl=this.container.querySelector(e),this.inputMinEl=this.container.querySelector(t),this.inputMaxEl=this.container.querySelector(i),this.displayMinEl=this.container.querySelector(n),this.displayMaxEl=this.container.querySelector(o),this.minRange=parseFloat(this.container.dataset.min)||0,this.minValue=parseFloat(this.container.dataset.minValue)||0,this.maxRange=parseFloat(this.container.dataset.max)||100,this.maxValue=parseFloat(this.container.dataset.maxValue)||this.maxRange,this.createPriceRange()},createPriceRange:function(){this.sliderEl&&this.sliderEl.noUiSlider&&"function"==typeof this.sliderEl.noUiSlider.destroy&&this.sliderEl.noUiSlider.destroy();var e=noUiSlider.create(this.sliderEl,{connect:!0,step:10,...this.sliderOptions,start:[this.minValue,this.maxValue],range:{min:this.minRange,max:this.maxRange}});return e.on("update",(e=>{this.displayMinEl.innerHTML=theme.Currency.formatMoney(e[0],theme.settings.moneyFormat),this.displayMaxEl.innerHTML=theme.Currency.formatMoney(e[1],theme.settings.moneyFormat),this.onUpdate&&this.onUpdate(e)})),e.on("change",(e=>{if(this.inputMinEl.value=e[0],this.inputMaxEl.value=e[1],this.onChange){const e=new FormData(this.formEl);this.onChange(e)}})),e}}
13),s}(),theme.AjaxProduct=function(){var e={loading:!1};function t(e,t,i){this.form=e,this.args=i;var n=t||".add-to-cart";this.form&&(this.addToCart=e.querySelector(n),this.form.addEventListener("submit",this.addItemFromForm.bind(this)))}return t.prototype=Object.assign({},t.prototype,{addItemFromForm:function(t,i){if(t.preventDefault(),!e.loading){this.addToCart.classList.add("btn--loading"),e.loading=!0;var n=theme.utils.serialize(this.form);fetch(theme.routes.cartAdd,{method:"POST",body:n,credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then(function(t){if(422===t.status)this.error(t);else{var i=t;this.success(i)}e.loading=!1,this.addToCart.classList.remove("btn--loading"),document.body.classList.contains("template-cart")&&(window.scrollTo(0,0),location.reload())}.bind(this))}},success:function(e){var t=this.form.querySelector(".errors");t&&t.remove(),document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:e,addToCartBtn:this.addToCart}})),this.args&&this.args.scopedEventId&&document.dispatchEvent(new CustomEvent("ajaxProduct:added:"+this.args.scopedEventId,{detail:{product:e,addToCartBtn:this.addToCart}}))},error:function(e){if(e.description){var t=this.form.querySelector(".errors");t&&t.remove();var i=document.createElement("div");i.classList.add("errors","text-center"),i.textContent=e.description,this.form.append(i),document.dispatchEvent(new CustomEvent("ajaxProduct:error",{detail:{errorMessage:e.description}})),this.args&&this.args.scopedEventId&&document.dispatchEvent(new CustomEvent("ajaxProduct:error:"+this.args.scopedEventId,{detail:{errorMessage:e.description}}))}else console.warn(e)}}),t}(),theme.ProductMedia=function(){var e={},t={},i={},n="[data-product-single-media-group]",o="[data-shopify-xr]";function s(t){if(!t)if(window.ShopifyXR){for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n.loaded)continue;var o=document.querySelector("#ModelJson-"+i);window.ShopifyXR.addModels(JSON.parse(o.innerHTML)),n.loaded=!0}window.ShopifyXR.setupXRElements()}else document.addEventListener("shopify_xr_initialized",(function(){s()}))}function a(e){if(!e)for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];!n.modelViewerUi&&Shopify&&(n.modelViewerUi=new Shopify.ModelViewerUI(n.element)),r(n)}}function r(e){var t=i[e.sectionId];e.container.addEventListener("mediaVisible",(function(){t.element.setAttribute("data-shopify-model3d-id",e.modelId),theme.config.isTouch||e.modelViewerUi.play()})),e.container.addEventListener("mediaHidden",(function(){t.element.setAttribute("data-shopify-model3d-id",t.defaultId),e.modelViewerUi.pause()})),e.container.addEventListener("xrLaunch",(function(){e.modelViewerUi.pause()}))}return{init:function(r,c){e[c]={loaded:!1},r.forEach((function(e,s){var a=e.dataset.mediaId,r=e.querySelector("model-viewer"),l=r.dataset.modelId;if(0===s){var d=e.closest(n).querySelector(o);i[c]={element:d,defaultId:l}}t[a]={modelId:l,sectionId:c,container:e,element:r}})),window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:s},{name:"model-viewer-ui",version:"1.0",onLoad:a}]),theme.LibraryLoader.load("modelViewerUiStyles")},removeSectionModels:function(i){for(var n in t){if(t.hasOwnProperty(n))t[n].sectionId===i&&delete t[n]}delete e[i]}}}(),theme.QtySelector=function(){var e=".js-qty__num",t=".js-qty__adjust--plus",i=".js-qty__adjust--minus";function n(n,o){this.wrapper=n,this.plus=n.querySelector(t),this.minus=n.querySelector(i),this.input=n.querySelector(e),this.minValue=this.input.getAttribute("min")||1;var s={namespace:null,isCart:!1,key:this.input.dataset.id};this.options=Object.assign({},s,o),this.init()}return n.prototype=Object.assign({},n.prototype,{init:function(){this.plus.addEventListener("click",function(){var e=this._getQty();this._change(e+1)}.bind(this)),this.minus.addEventListener("click",function(){var e=this._getQty();this._change(e-1)}.bind(this)),this.input.addEventListener("change",function(e){this._change(this._getQty())}.bind(this))},_getQty:function(){var e=this.input.value;return(parseFloat(e)!=parseInt(e)||isNaN(e))&&(e=1),parseInt(e)},_change:function(e){e<=this.minValue&&(e=this.minValue),this.input.value=e,this.options.isCart&&document.dispatchEvent(new CustomEvent("cart:quantity"+this.options.namespace,{detail:[this.options.key,e,this.wrapper]}))}}),n}
13(),theme.initQuickShop=function(){var e=document.querySelectorAll(".grid-product");function t(e){var i=e.currentTarget;if(!theme.config.bpSmall){if(i.removeEventListener("mouseover",t),!i||!i.dataset.productId)return;var n=i.dataset.productId,o=i.dataset.productHandle,s=i.querySelector(".quick-product__btn");theme.preloadProductModal(o,n,s)}}e.length&&theme.settings.quickView&&e.forEach((e=>{e.addEventListener("mouseover",t)}))},theme.preloadProductModal=function(e,t,i){var n=document.getElementById("QuickShopHolder-"+e),o=theme.routes.home+"/products/"+e+"?view=modal";o=o.replace("//","/"),fetch(o).then((function(e){return e.text()})).then((function(o){var s=(new DOMParser).parseFromString(o,"text/html").querySelector('.product-section[data-product-handle="'+e+'"]');if(n){n.innerHTML="",n.append(s);var a="QuickShopModal-"+t,r="quick-modal-"+t;new theme.Modals(a,r),theme.sections.register("product",theme.Product,n),theme.collapsibles.init(),theme.videoModal(),i&&i.classList.remove("quick-product__btn--not-ready")}}))},theme.Slideshow=function(){var e="animate-out",t="is-paused",i="is-active",n=".slideshow__slide",o=".is-selected",s=".slideshow-wrapper",a=".slideshow__pause",r=".product__thumb-item:not(.hide)",c=".product__thumb-item:not(.hide) a",l=".product__thumb-arrow",d={adaptiveHeight:!1,autoPlay:!1,avoidReflow:!1,childNav:null,childNavScroller:null,childVertical:!1,dragThreshold:7,fade:!1,friction:.8,initialIndex:0,pageDots:!1,pauseAutoPlayOnHover:!1,prevNextButtons:!1,rightToLeft:theme.config.rtl,selectedAttraction:.14,setGallerySize:!0,wrapAround:!0};function h(e,t){if(this.el=e,this.args=Object.assign({},d,t),this.args.on={ready:this.init.bind(this),change:this.slideChange.bind(this),settle:this.afterChange.bind(this)},this.args.childNav&&(this.childNavEls=this.args.childNav.querySelectorAll(r),this.childNavLinks=this.args.childNav.querySelectorAll(c),this.arrows=this.args.childNav.querySelectorAll(l),this.childNavLinks.length&&this.initChildNav()),this.args.avoidReflow&&function(e){if(!e.id)return;var t=e.firstChild;for(;null!=t&&3==t.nodeType;)t=t.nextSibling;var i=document.createElement("style");i.innerHTML=`#${e.id} .flickity-viewport{height:${t.offsetHeight}px}`,document.head.appendChild(i)}(e),this.slideshow=new Flickity(e,this.args),this.args.autoPlay){var i=e.closest(s);this.pauseBtn=i.querySelector(a),this.pauseBtn&&this.pauseBtn.addEventListener("click",this._togglePause.bind(this))}window.on("resize",theme.utils.debounce(300,function(){this.resize()}.bind(this)))}return h.prototype=Object.assign({},h.prototype,{init:function(e){this.currentSlide=this.el.querySelector(o),this.args.callbacks&&this.args.callbacks.onInit&&"function"==typeof this.args.callbacks.onInit&&this.args.callbacks.onInit(this.currentSlide),window.AOS&&AOS.refresh()},slideChange:function(t){this.args.fade&&this.currentSlide&&(this.currentSlide.classList.add(e),this.currentSlide.addEventListener("transitionend",function(){this.currentSlide.classList.remove(e)}.bind(this))),this.args.childNav&&this.childNavGoTo(t),this.args.callbacks&&this.args.callbacks.onChange&&"function"==typeof this.args.callbacks.onChange&&this.args.callbacks.onChange(t),this.arrows&&this.arrows.length&&(this.arrows[0].classList.toggle("hide",0===t),this.arrows[1].classList.toggle("hide",t===this.childNavLinks.length-1))},afterChange:function(t){this.args.fade&&this.el.querySelectorAll(n).forEach((t=>{t.classList.remove(e)})),this.currentSlide=this.el.querySelector(o),this.args.childNav&&this.childNavGoTo(this.slideshow.selectedIndex)},destroy:function(){this.args.childNav&&this.childNavLinks.length&&this.childNavLinks.forEach((e=>{e.classList.remove(i)})),this.slideshow.destroy()},reposition:function(){this.slideshow.reposition()},_togglePause:function(){this.pauseBtn.classList.contains(t)?(this.pauseBtn.classList.remove(t),this.slideshow.playPlayer()):(this.pauseBtn.classList.add(t),this.slideshow.pausePlayer())},resize:function(){this.slideshow.resize()},play:function(){this.slideshow.playPlayer()},pause:function(){this.slideshow.pausePlayer()},goToSlide:function(e){this.slideshow.select(e)},setDraggable:function(e){this.slideshow.options.draggable=e,this.slideshow.updateDraggable()}
13,initChildNav:function(){this.childNavLinks[this.args.initialIndex].classList.add("is-active"),this.childNavLinks.forEach(((e,t)=>{e.setAttribute("data-index",t),e.addEventListener("click",function(e){e.preventDefault(),this.goToSlide(this.getChildIndex(e.currentTarget))}.bind(this)),e.addEventListener("focus",function(e){this.goToSlide(this.getChildIndex(e.currentTarget))}.bind(this)),e.addEventListener("keydown",function(e){13===e.keyCode&&this.goToSlide(this.getChildIndex(e.currentTarget))}.bind(this))})),this.arrows.length&&this.arrows.forEach((e=>{e.addEventListener("click",this.arrowClick.bind(this))}))},getChildIndex:function(e){return parseInt(e.dataset.index)},childNavGoTo:function(e){this.childNavLinks.forEach((e=>{e.blur(),e.classList.remove(i)}));var t=this.childNavLinks[e];if(t.classList.add(i),this.args.childNavScroller)if(this.args.childVertical){var n=t.offsetTop;this.args.childNavScroller.scrollTop=n-100}else{var o=t.offsetLeft;this.args.childNavScroller.scrollLeft=o-100}},arrowClick:function(e){e.currentTarget.classList.contains("product__thumb-arrow--prev")?this.slideshow.previous():this.slideshow.next()}}),h}(),theme.VariantAvailability=function(){var e="disabled";function t(e){this.type=e.type,this.variantsObject=e.variantsObject,this.currentVariantObject=e.currentVariantObject,this.container=e.container,this.namespace=e.namespace,this.init()}return t.prototype=Object.assign({},t.prototype,{init:function(){this.container.on("variantChange"+this.namespace,this.setAvailability.bind(this)),this.setInitialAvailability()},createAvailableOptionsTree:(e,t,i,n,o)=>e.reduce(((e,n)=>{n.options.length;return Object.keys(e).forEach((o=>{if(null===n[o])return;let s=e[o].find((e=>e.value===n[o]));void 0===s&&(s={value:n[o],soldOut:!0},e[o].push(s));const a=t.reduce(((e,{value:t,index:i})=>n[i]===t?e+1:e),0);a>=t.length-1&&(s.soldOut=(!s.soldOut||!n.available)&&s.soldOut),i&&i.available||!t.find((e=>e.value===s.value&&o===e.index))||(s.soldOut=!0),"option1"===o&&(s.soldOut=(!s.soldOut||!n.available)&&s.soldOut)})),e}),{option1:[],option2:[],option3:[]}),setInitialAvailability:function(){this.container.querySelectorAll(".variant-input-wrap").forEach((e=>{this.disableVariantGroup(e)}));const e=this.currentVariantObject.options.map(((e,t)=>({value:e,index:`option${t+1}`}))),t=this.createAvailableOptionsTree(this.variantsObject,e,this.currentVariantObject);for(var[i,n]of Object.entries(t))this.manageOptionState(i,n)},setAvailability:function(e){const{value:t,index:i,currentlySelectedValues:n,variant:o}=e.detail,s=this.createAvailableOptionsTree(this.variantsObject,n,o,i,t);for(var[a,r]of(this.container.querySelectorAll(".variant-input-wrap").forEach((e=>{this.disableVariantGroup(e)})),Object.entries(s)))this.manageOptionState(a,r,t)},manageOptionState:function(e,t,i){var n=this.container.querySelector('.variant-input-wrap[data-index="'+e+'"]');t.forEach((e=>{this.enableVariantOption(n,e,i)}))},enableVariantOption:function(t,i,n){var o=i.value.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1");if("dropdown"===this.type)t.querySelector('option[value="'+o+'"]').disabled=!1;else{var s=t.querySelector('.variant-input[data-value="'+o+'"]'),a=s.querySelector("input"),r=s.querySelector("label");a.classList.remove(e),r.classList.remove(e),i.soldOut&&(a.classList.add(e),r.classList.add(e))}},disableVariantGroup:function(t){"dropdown"===this.type?t.querySelectorAll("option").forEach((e=>{e.disabled=!0})):(t.querySelectorAll("input").forEach((t=>{t.classList.add(e)})),t.querySelectorAll("label").forEach((t=>{t.classList.add(e)})))}}),t}(),theme.videoModal=function(){var e,t="VideoHolder",i='a[href*="youtube.com/watch"], a[href*="youtu.be/"]',n=".product-video-trigger--mp4",o=".product-video-mp4-sound",s=document.querySelectorAll(i),a=document.querySelectorAll(n);if(s.length||a.length){var r=document.getElementById(t);s.length&&theme.LibraryLoader.load("youtubeSdk");var c=new theme.Modals("VideoModal","video-modal",{closeOffContentClick:!0,bodyOpenClass:["modal-open","video-modal-open"],solid:!0});s.forEach((e=>{e.addEventListener("click",l)})),a.forEach((e=>{e.addEventListener("click",d)})),document.addEventListener("modalClose.VideoModal",(function(){e&&"function"==typeof e.destroy?e.destroy():u()}))}function l(i){if(theme.config.youTubeReady){i.preventDefault(),u(),c.open(i);var n,o,s,a=(n=i.currentTarget.getAttribute("href"),o=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,!(!(s=n.match(o)
13)||11!=s[7].length)&&s[7]);e=new theme.YouTube(t,{videoId:a,style:"sound",events:{onReady:h}})}}function d(e){u();var t=e.currentTarget.parentNode.querySelector(o).cloneNode(!0);t.classList.remove("hide"),r.append(t),c.open(e),r.querySelector("video").play()}function h(e){e.target.unMute(),e.target.playVideo()}function u(){r.innerHTML=""}};class d extends HTMLElement{constructor(){super(),this.el=this,this.inner=this.querySelector("[data-tool-tip-inner]"),this.closeButton=this.querySelector("[data-tool-tip-close]"),this.toolTipContent=this.querySelector("[data-tool-tip-content]"),this.triggers=document.querySelectorAll("[data-tool-tip-trigger]"),document.addEventListener("tooltip:open",(e=>{this._open(e.detail.context,e.detail.content)}))}_open(e,t){this.toolTipContent.innerHTML=t,theme.a11y.trapFocus({container:this.el,namespace:"tooltip_focus"}),this.closeButton&&this.closeButton.on("click.tooltip-close",(()=>{this._close()})),document.documentElement.on("click.tooltip-outerclick",(e=>{"true"!==this.el.dataset.toolTipOpen||this.inner.contains(e.target)||this._close()})),document.documentElement.on("keydown.tooltip-esc",(e=>{"Escape"===e.code&&this._close()})),this.el.dataset.toolTipOpen=!0,this.el.dataset.toolTip=e}_close(){this.toolTipContent.innerHTML="",this.el.dataset.toolTipOpen="false",this.el.dataset.toolTip="",theme.a11y.removeTrapFocus({container:this.el,namespace:"tooltip_focus"}),this.closeButton.off("click.tooltip-close"),document.documentElement.off("click.tooltip-outerclick"),document.documentElement.off("keydown.tooltip-esc")}}customElements.define("tool-tip",d);class h extends HTMLElement{constructor(){super(),this.el=this,this.toolTipContent=this.querySelector("[data-tool-tip-content]"),this.init()}init(){const e=new CustomEvent("tooltip:open",{detail:{context:this.dataset.toolTip,content:this.toolTipContent.innerHTML},bubbles:!0});this.el.addEventListener("click",(t=>{t.stopPropagation(),this.dispatchEvent(e)}))}}customElements.define("tool-tip-trigger",h),theme.announcementBar=function(){var e,t,i={autoPlay:5e3,avoidReflow:!0,cellAlign:theme.config.rtl?"right":"left"};function n(){t=new theme.Slideshow(e,i)}function o(){t&&"function"==typeof t.destroy&&t.destroy()}return{init:function(){(e=document.getElementById("AnnouncementSlider"))&&(o(),1!==e.dataset.blockCount&&((theme.config.bpSmall||"true"===e.dataset.compact)&&n(),document.addEventListener("matchSmall",(function(){o(),n()})),document.addEventListener("unmatchSmall",(function(){o(),"true"===e.dataset.compact&&n()}))))},onBlockSelect:function(i){var n=e.querySelector("#AnnouncementSlide-"+i),o=parseInt(n.dataset.index);t&&"function"==typeof t.pause&&(t.goToSlide(o),t.pause())},onBlockDeselect:function(){t&&"function"==typeof t.play&&t.play()},unload:o}}(),theme.customerTemplates=function(){function e(){document.getElementById("RecoverPasswordForm").classList.toggle("hide"),document.getElementById("CustomerLoginForm").classList.toggle("hide")}"#recover"===window.location.hash&&e(),function(){var t=document.getElementById("RecoverPassword");t&&t.addEventListener("click",(function(t){t.preventDefault(),e()}));var i=document.getElementById("HideRecoverPasswordLink");i&&i.addEventListener("click",(function(t){t.preventDefault(),e()}))}(),function(){if(!document.querySelector(".reset-password-success"))return;document.getElementById("ResetSuccess").classList.remove("hide")}(),function(){var e=document.getElementById("AddressNewForm"),t=document.querySelectorAll(".js-address-form");if(!e||!t.length)return;setTimeout((function(){document.querySelectorAll(".js-address-country").forEach((e=>{var t=e.dataset.countryId,i=e.dataset.provinceId,n=e.dataset.provinceContainerId;new Shopify.CountryProvinceSelector(t,i,{hideElement:n})}))}),1e3),document.querySelectorAll(".address-new-toggle").forEach((t=>{t.addEventListener("click",(function(){e.classList.toggle("hide")}))})),document.querySelectorAll(".address-edit-toggle").forEach((e=>{e.addEventListener("click",(function(e){var t=e.currentTarget.dataset.formId;document.getElementById("EditAddress_"+t).classList.toggle("hide")}))})),document.querySelectorAll(".address-delete").forEach((e=>{e.addEventListener("click",(function(e){var t=e.currentTarget.dataset.formId,i=e.currentTarget.dataset.confirmMessage;confirm(i||"Are you sure you wish to delete this address?")&&Shopify&&Shopify.postLink("/account/addresses/"+t,{parameters:{_method:"delete"}})}))}))}()},theme.CartDrawer=function(){var e="#CartDrawerForm";function t(){this.form=document.querySelector(e),this.drawer=new theme.Drawers("CartDrawer","cart"),this.init()}return t.prototype=Object.assign({},t.prototype,{init:function(){this.cartForm=new theme.CartForm(this.form),this.cartForm.buildCart(),document.addEventListener("ajaxProduct:added",function(e){this.cartForm.buildCart(),this.open()}.bind(this)),document.addEventListener("cart:open",this.open.bind(this)),document.addEventListener("cart:close",this.close.bind(this))},open:function(){this.drawer.open()},close:function(){this.drawer.close()}}),t}(),theme.headerNav=function(){var e,t,i="#HeaderWrapper",n="#SiteHeader",o=".js-search-header",s="#SearchClose",a=".site-header__search-container",r="#LogoContainer img",c=".megamenu",l=".site-nav__item",d=".site-nav__link",h=".site-nav__link--has-dropdown",u=".site-nav__dropdown-link--second-level",m="site-nav--has-dropdown",p="site-nav__deep-dropdown-trigger",f="is-focused",g={
13namespace:".siteNav",wrapperOverlayed:!1,overlayedClass:"is-light",overlayEnabledClass:"header-wrapper--sticky",stickyEnabled:!1,stickyActive:!1,stickyClass:"site-header--stuck",stickyHeaderWrapper:"StickyHeaderWrap",openTransitionClass:"site-header--opening",lastScroll:0};function y(){if(g.stickyEnabled){var e=t.offsetHeight;document.querySelector("#"+g.stickyHeaderWrapper).style.height=e+"px"}}function v(){g.stickyEnabled&&(g.forceStopSticky||(requestAnimationFrame(S),g.lastScroll=window.scrollY))}function S(){if(window.scrollY>250){if(g.stickyActive)return;g.stickyActive=!0,t.classList.add(g.stickyClass),g.wrapperOverlayed&&e.classList.remove(g.overlayedClass),setTimeout((function(){t.classList.add(g.openTransitionClass)}),100)}else{if(!g.stickyActive)return;g.stickyActive=!1,t.classList.remove(g.openTransitionClass),t.classList.remove(g.stickyClass),g.wrapperOverlayed&&e.classList.add(g.overlayedClass)}}function b(e){e.preventDefault(),e.stopImmediatePropagation();var t=document.querySelector(a);theme.utils.prepareTransition(t,function(){t.classList.add("is-active")}.bind(this)),document.documentElement.classList.add("js-drawer-open","js-drawer-open--search"),setTimeout((function(){theme.a11y.trapFocus({container:t,namespace:"header_search",elementToFocus:t.querySelector(".site-header__search-input")})}),100),theme.config.bpSmall&&g.stickyEnabled&&g.lastScroll<300&&window.scrollTo(0,0),theme.a11y.lockMobileScrolling(g.namespace),function(){window.on("keyup"+g.namespace,function(e){27===e.keyCode&&w()}.bind(this)),document.documentElement.on("click"+g.namespace,function(e){w(e)}.bind(this))}()}function w(e){if(e)for(var t=e.path||e.composedPath&&e.composedPath(),i=0;i<t.length;i++)if(t[i].classList){if(t[i].classList.contains("site-header__search-btn"))break;if(t[i].classList.contains("site-header__search-container"))return}document.activeElement.blur(),document.documentElement.classList.add("js-drawer-closing"),document.documentElement.classList.remove("js-drawer-open","js-drawer-open--search"),window.setTimeout(function(){document.documentElement.classList.remove("js-drawer-closing")}.bind(this),500);var n=document.querySelector(a);theme.utils.prepareTransition(n,function(){n.classList.remove("is-active")}.bind(this)),theme.a11y.removeTrapFocus({container:n,namespace:"header_search"}),theme.a11y.unlockMobileScrolling(g.namespace),window.off("keyup"+g.namespace),document.documentElement.off("click"+g.namespace)}function L(e){document.querySelectorAll(r).forEach((e=>{var t=e.clientWidth,i=e.closest(".header-item").clientWidth;t>i?e.style.maxWidth=i:e.removeAttribute("style")}))}return{init:function(){var a;e=document.querySelector(i),t=document.querySelector(n),g.stickyEnabled="true"===t.dataset.sticky,g.stickyEnabled&&(g.wrapperOverlayed=e.classList.contains(g.overlayedClass),theme.config.stickyHeader=(a=0,t.querySelectorAll(c).forEach((e=>{var t=e.offsetHeight;t>a&&(a=t)})),!(window.innerHeight<a+120)),theme.config.stickyHeader?(g.forceStopSticky=!1,function(){g.lastScroll=0;var e=document.createElement("div");e.id=g.stickyHeaderWrapper,theme.utils.wrap(t,e),y(),window.on("resize"+g.namespace,theme.utils.debounce(50,y)),window.on("scroll"+g.namespace,theme.utils.throttle(20,v)),Shopify&&Shopify.designMode&&setTimeout((function(){y()}),250)}()):g.forceStopSticky=!0),theme.settings.overlayHeader="true"===t.dataset.overlay,theme.settings.overlayHeader&&Shopify&&Shopify.designMode&&document.body.classList.contains("template-collection")&&!document.querySelector(".collection-hero")&&this.disableOverlayHeader(),function(){var e=!1,i=!1,n=!1;theme.config.isTouch&&document.querySelectorAll(h).forEach((e=>{e.on("touchend"+g.namespace,(function(e){e.currentTarget.parentNode.classList.contains(f)?window.location.replace(e.currentTarget.getAttribute("href")):(e.preventDefault(),r(),s(e.currentTarget))}))}));document.querySelectorAll(d).forEach((e=>{e.on("focusin"+g.namespace,o),e.on("mouseover"+g.namespace,o),e.on("mouseleave"+g.namespace,r)})),document.querySelectorAll(u).forEach((e=>{theme.config.isTouch&&e.on("touchend"+g.namespace,(function(e){var t=e.currentTarget.parentNode;t.classList.contains(p)?t.classList.contains(f)?window.location.replace(e.currentTarget.getAttribute("href")):(e.preventDefault(),v(),a(e.currentTarget)):window.location.replace(e.currentTarget.getAttribute("href"))})),e.on("focusin"+g.namespace,(function(e){v(),a(e.currentTarget,!0)}))})),theme.config.isTouch&&(document.body.on("touchend"+g.namespace,(function(){r()}
13)),t.querySelectorAll(c).forEach((e=>{e.on("touchend"+g.namespace,(function(e){e.stopImmediatePropagation()}))})));function o(t){e&&y(),i&&v(),s(t.currentTarget)}function s(t){var i=t.parentNode;if(i.classList.contains(m)&&(i.classList.add(f),e=!0),!theme.config.isTouch&&!n){var o=theme.config.isTouch?"touchend":"click";n=!0,document.documentElement.on(o+g.namespace,function(){r(),document.documentElement.off(o+g.namespace),n=!1}.bind(this))}}function a(e,t){var n=e.parentNode;(n.classList.contains(p)||t)&&(n.classList.add(f),i=!0)}function r(){y(),v()}function y(){document.querySelectorAll(l).forEach((e=>{e.classList.remove(f)}))}function v(){document.querySelectorAll(u).forEach((e=>{e.parentNode.classList.remove(f)}))}}(),document.querySelectorAll(o).forEach((e=>{e.addEventListener("click",b)})),document.querySelector(s).addEventListener("click",w),window.on("load"+g.namespace,L),window.on("resize"+g.namespace,theme.utils.debounce(150,L))},disableOverlayHeader:function(){e.classList.remove(g.overlayEnabledClass,g.overlayedClass),g.wrapperOverlayed=!1,theme.settings.overlayHeader=!1}}}(),window.onpageshow=function(e){e.persisted&&(document.body.classList.remove("unloading"),document.querySelectorAll(".cart__checkout").forEach((e=>{e.classList.remove("btn--loading")})))},theme.predictiveSearch=function(){var e,t="",i=!1,n=".predictive",o="#HeaderSearchForm",s='input[type="search"]',a="#PredictiveWrapper",r="#PredictiveResults",c="[data-predictive-search-button]",l={},d={imageSize:"square"},h=38,u=40,m=9;function p(){l.wrapper.classList.add("hide"),l.results.innerHTML="",clearTimeout(e)}function f(){l.form.submit()}function g(e){e.preventDefault?e.preventDefault():e.returnValue=!1;var t={},i=new FormData(e.target);for(var n of i.keys())t[n]=i.get(n);t.q&&(t.q+="*");var o=v(t);return window.location.href=`${theme.routes.search}?${o}`,!1}function y(n){n.keyCode!==h&&n.keyCode!==u&&n.keyCode!==m&&function(){var n=l.input.value;if(""===n)return void p();var o=function(e){if("string"!=typeof e)return null;return e.trim().replace(/\ /g,"-").toLowerCase()}(n);clearTimeout(e),e=setTimeout(function(){!function(e){if(i)return;if(t===e)return;t=e,i=!0;var n=v({q:e,"resources[type]":theme.settings.predictiveSearchType,"resources[limit]":4,"resources[options][unavailable_products]":"last","resources[options][fields]":"title,product_type,variants.title,vendor"});fetch("/search/suggest.json?"+n).then((e=>e.json())).then((e=>{i=!1;var t={},n=0;l.wrapper.classList.remove("hide");var o=Object.entries(e.resources.results);if(Object.keys(o).forEach((function(e){var i=o[e],s=i[0],a=i[1];switch(n+=a.length,s){case"products":t[s]=function(e){var t="",i=[];if(e.forEach((e=>{var t={title:e.title,url:e.url,image_responsive_url:theme.Images.lazyloadImagePath(e.image),image_aspect_ratio:e.featured_image.aspect_ratio};"PPLR_HIDDEN_PRODUCT"!==e.type&&i.push(t)})),i.length){t=`\n <div data-type-products>\n <div class="grid grid--uniform">\n ${theme.buildProductGridItem(i,"small--one-half medium-up--one-quarter",4,d.imageSize)}\n </div>\n </div>\n `}return t}(a);break;case"collections":t[s]=function(e){var t="";if(e.length){var i=theme.buildCollectionItem(e);t=`\n <div data-type-collections>\n <p class="h6 predictive__label">${theme.strings.searchCollections}</p>\n <ul class="no-bullets">\n ${i}\n </ul>\n </div>\n `}return t}(a);break;case"pages":t[s]=function(e){var t="";if(e.length){var i=theme.buildPageItem(e);t=`\n <div data-type-pages>\n <p class="h6 predictive__label">${theme.strings.searchPages}</p>\n <ul class="no-bullets">\n ${i}\n </ul>\n </div>\n `}return t}(a);break;case"articles":t[s]=function(e){var t="";if(e.forEach((e=>{e.image&&(e.image=theme.Images.getSizedImageUrl(e.image,"200x200_crop_center"))})),e.length){var i=theme.buildArticleItem(e,d.imageSize);t=`\n <div data-type-articles>\n <p class="h6 predictive__label">${theme.strings.searchArticles}</p>\n <div class="grid grid--uniform">\n ${i}\n </div>\n </div>\n `}return t}(a)}})),0!==n){var s=function(e){var t="";e.products&&""!==e.products&&(t+=e.products);e.collections&&""!==e.collections&&(t+=e.collections);e.pages&&""!==e.pages&&(t+=e.pages);e.articles&&""!==e.articles&&(t+=e.articles);return t}(t);l.results.innerHTML="",l.results.innerHTML=s}else p()}))}(o)}.bind(this),500)}()}function v(e){return Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}return{init:function(){if(document.getElementById("shopify-features")&&!JSON.parse(document.getElementById("shopify-features").innerHTML).predictiveSearch)return;l.wrapper=document.querySelector(a),l.wrapper&&(d.imageSize=l.wrapper.dataset.imageSize,l.form=document.querySelector(o),l.form.setAttribute("autocomplete","off"),l.form.on("submit"+n,g),l.input=l.form.querySelector(s),l.input.on("keyup"+n,y),l.submit=l.wrapper.querySelector(c),l.submit.on("click"+n,f),l.results=document.querySelector(r))}}}(),theme.buildProductGridItem=function(e,t,i,n){var o="";return e.forEach((e=>{var s=theme.buildProductImage(e,n),a=`\n <div class="grid__item grid-product ${t} aos-animate" data-aos="row-of-${i}">\n <div class="grid-product__content">\n <a href="${e.url}" class="grid-product__link">\n <div class="grid-product__image-mask">\n ${s}\n </div>\n <div class="grid-product__meta">\n <div class="grid-product__title">${e.title}</div>\n </div>\n </a>\n </div>\n </div>\n `;o+=a})),o},theme.buildProductImage=function(e,t){var i=t||theme.settings.productImageSize,n="";if("natural"===i)n=`\n <div class="image-wrap" style="height: 0; padding-bottom: ${e.image_aspect_ratio}%;">\n <img class="grid-product__image lazyload"\n data-src="${e.image_responsive_url}
13"\n data-widths="[180, 360, 540, 720, 900]"\n data-aspectratio="${e.image_aspect_ratio}"\n data-sizes="auto"\n alt="${e.title}">\n </div>`;else{var o="lazyload";theme.settings.productImageCover||(o+=" grid__image-contain"),n=`\n <div class="grid__image-ratio grid__image-ratio--${i}">\n <img class="${o}"\n data-src="${e.image_responsive_url}"\n data-widths="[360, 540, 720, 900, 1080]"\n data-aspectratio="${e.aspect_ratio}"\n data-sizes="auto"\n alt="${e.title}">\n </div>\n `}return n},theme.buildCollectionItem=function(e){var t="";return e.forEach((e=>{var i=`\n <li>\n <a href="${e.url}">\n ${e.title}\n </a>\n </li>\n `;t+=i})),t},theme.buildPageItem=function(e){var t="";return e.forEach((e=>{var i=`\n <li>\n <a href="${e.url}">\n ${e.title}\n </a>\n </li>\n `;t+=i})),t},theme.buildArticleItem=function(e,t){var i="";return e.forEach((e=>{var n=theme.buildPredictiveImage(e),o=`\n <div class="grid__item grid-product small--one-half medium-up--one-quarter" data-aos="row-of-4">\n <a href="${e.url}" class="grid-product__link grid-product__link--inline">\n <div class="grid-product__image-mask">\n <div\n class="grid__image-ratio grid__image-ratio--object grid__image-ratio--${t}">\n <div class="predictive__image-wrap">\n ${n}\n </div>\n </div>\n </div>\n <div class="grid-product__meta">\n ${e.title}\n </div>\n </a>\n </div>\n `;i+=o})),i},theme.buildPredictiveImage=function(e){var t="";return e.image&&(t=`<img class="lazyload"\n data-src="${e.image}"\n data-widths="[360, 540, 720]"\n data-sizes="auto">`),t},theme.Maps=function(){var e=14,t=null,i=[],n={},o='[data-section-type="map"]',s="[data-map]",a=".map-section__overlay";function r(e){this.container=e,this.sectionId=this.container.getAttribute("data-section-id"),this.namespace=".map-"+this.sectionId,this.map=e.querySelector(s),this.key=this.map.dataset.apiKey,n={addressNoResults:theme.strings.addressNoResults,addressQueryLimit:theme.strings.addressQueryLimit,addressError:theme.strings.addressError,authError:theme.strings.authError},this.key&&theme.initWhenVisible({element:this.container,callback:this.prepMapApi.bind(this),threshold:20})}return window.gm_authFailure=function(){Shopify.designMode&&(document.querySelectorAll(o).forEach((e=>{e.classList.add("map-section--load-error")})),document.querySelectorAll(s).forEach((e=>{e.parentNode.removeChild(e)})),window.mapError(theme.strings.authError))},window.mapError=function(e){var t=document.createElement("div");t.classList.add("map-section__error","errors","text-center"),t.innerHTML=e,document.querySelectorAll(a).forEach((e=>{e.parentNode.prepend(t)})),document.querySelectorAll(".map-section__link").forEach((e=>{e.classList.add("hide")}))},r.prototype=Object.assign({},r.prototype,{prepMapApi:function(){if("loaded"===t)this.createMap();else if(i.push(this),"loading"!==t&&(t="loading",void 0===window.google||void 0===window.google.maps)){var e=document.createElement("script");e.onload=function(){t="loaded",i.forEach((e=>{e.createMap()}))},e.src="https://maps.googleapis.com/maps/api/js?key="+this.key,document.head.appendChild(e)}},createMap:function(){var t=this.map;return function(e){var t=new google.maps.Geocoder;if(e){var i=e.dataset.addressSetting;return new Promise(((e,n)=>{t.geocode({address:i},(function(t,i){i!==google.maps.GeocoderStatus.OK&&n(i),e(t)}))}))}}(t).then(function(i){var n={zoom:e,backgroundColor:"none",center:i[0].geometry.location,draggable:!1,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},o=this.map=new google.maps.Map(t,n),s=this.center=o.getCenter();new google.maps.Marker({map:o,position:o.getCenter()});google.maps.event.addDomListener(window,"resize",theme.utils.debounce(250,(function(){google.maps.event.trigger(o,"resize"),o.setCenter(s),t.removeAttribute("style")}))),Shopify.designMode&&window.AOS&&AOS.refreshHard()}.bind(this)).catch((function(e){var t;switch(e){case"ZERO_RESULTS":t=n.addressNoResults;break;case"OVER_QUERY_LIMIT":t=n.addressQueryLimit;break;case"REQUEST_DENIED":t=n.authError;break;default:t=n.addressError}Shopify.designMode&&window.mapError(t)}))},onUnload:function(){0!==this.map.length&&google&&google.maps&&google.maps.event&&google.maps.event.clearListeners(this.map,"resize")}}),r}(),theme.NewsletterPopup=function(){function e(e){this.container=e;var t=this.container.getAttribute("data-section-id");if(this.cookieName="newsletter-"+t,e&&"/challenge"!==window.location.pathname&&"/password"!==window.location.pathname){this.data={secondsBeforeShow:e.dataset.delaySeconds,daysBeforeReappear:e.dataset.delayDays,cookie
13:Cookies.get(this.cookieName),testMode:e.dataset.testMode},this.modal=new theme.Modals("NewsletterPopup-"+t,"newsletter-popup-modal");var i=e.querySelector(".popup-cta a");i&&i.addEventListener("click",function(){this.closePopup(!0)}.bind(this)),(e.querySelector(".errors")||e.querySelector(".note--success"))&&this.modal.open(),e.querySelector(".note--success")?this.closePopup(!0):(document.addEventListener("modalClose."+e.id,this.closePopup.bind(this)),this.data.cookie&&"true"!==this.data.testMode||this.initPopupDelay())}}return e.prototype=Object.assign({},e.prototype,{initPopupDelay:function(){Shopify&&Shopify.designMode||setTimeout(function(){this.modal.open()}.bind(this),1e3*this.data.secondsBeforeShow)},closePopup:function(e){if("true"!==this.data.testMode){var t=e?200:this.data.daysBeforeReappear;Cookies.set(this.cookieName,"opened",{path:"/",expires:t})}else Cookies.remove(this.cookieName,{path:"/"})},onLoad:function(){this.modal.open()},onSelect:function(){this.modal.open()},onDeselect:function(){this.modal.close()}}),e}(),theme.PasswordHeader=function(){function e(){this.init()}return e.prototype=Object.assign({},e.prototype,{init:function(){if(document.querySelector("#LoginModal")){var e=new theme.Modals("LoginModal","login-modal",{focusIdOnOpen:"password",solid:!0});document.querySelectorAll(".errors").length&&e.open()}}}),e}(),theme.Photoswipe=function(){var e=".js-photoswipe__zoom",t=".photoswipe__image",i=".flickity-viewport ",n=".is-selected";function o(e,t){this.container=e,this.sectionId=t,this.namespace=".photoswipe-"+this.sectionId,this.gallery,this.images,this.items,this.inSlideshow=!1,e&&"false"!==e.dataset.zoom&&this.init()}return o.prototype=Object.assign({},o.prototype,{init:function(){this.container.querySelectorAll(e).forEach((e=>{e.on("click"+this.namespace,this.triggerClick.bind(this))}))},triggerClick:function(e){this.container.dataset&&"true"===this.container.dataset.hasSlideshow?this.inSlideshow=!0:this.inSlideshow=!1,this.items=this.getImageData();var t=this.inSlideshow?this.container.querySelector(n):e.currentTarget,i=this.inSlideshow?this.getChildIndex(t):t.dataset.index;this.initGallery(this.items,i)},getChildIndex:function(e){for(var t=0;null!=(e=e.previousSibling);)t++;return t+1},getImageData:function(){this.images=this.inSlideshow?this.container.querySelectorAll(i+t):this.container.querySelectorAll(t);var e=[];return this.images.forEach((t=>{var i={msrc:t.currentSrc||t.src,src:t.getAttribute("data-photoswipe-src"),w:t.getAttribute("data-photoswipe-width"),h:t.getAttribute("data-photoswipe-height"),el:t,initialZoomLevel:.5};e.push(i)})),e},initGallery:function(e,t){var i=document.querySelectorAll(".pswp")[0],n={allowPanToNext:!1,captionEl:!1,closeOnScroll:!1,counterEl:!1,history:!1,index:t-1,pinchToClose:!1,preloaderEl:!1,scaleMode:"zoom",shareEl:!1,tapToToggleControls:!1,getThumbBoundsFn:function(t){var i=window.pageYOffset||document.documentElement.scrollTop,n=e[t].el.getBoundingClientRect();return{x:n.left,y:n.top+i,w:n.width}}};this.gallery=new PhotoSwipe(i,PhotoSwipeUI_Default,e,n),this.gallery.listen("afterChange",this.afterChange.bind(this)),this.gallery.init(),this.preventiOS15Scrolling()},afterChange:function(){var e=this.gallery.getCurrentIndex();this.container.dispatchEvent(new CustomEvent("photoswipe:afterChange",{detail:{index:e}}))},syncHeight:function(){document.documentElement.style.setProperty("--window-inner-height",`${window.innerHeight}px`)},preventiOS15Scrolling:function(){let e;/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&(this.syncHeight(),e=window.scrollY,document.documentElement.classList.add("pswp-open-in-ios"),window.addEventListener("resize",this.syncHeight),this.gallery.listen("destroy",(()=>{document.documentElement.classList.remove("pswp-open-in-ios"),window.scrollTo(0,e)})))}}),o}(),theme.Recommendations=function(){var e={placeholder:".product-recommendations-placeholder",sectionClass:" .product-recommendations",productResults:".grid-product"};function t(t){this.container=t,this.sectionId=t.getAttribute("data-section-id"),this.url=t.dataset.url,e.recommendations="Recommendations-"+this.sectionId,theme.initWhenVisible({element:t,callback:this.init.bind(this),threshold:500})}return t.prototype=Object.assign({},t.prototype,{init:function(){var t=document.getElementById(e.recommendations);if(t&&"false"!==t.dataset.enable){var i=t.dataset.productId,n=t.dataset.limit,o=this.url+"?section_id=product-recommendations&limit="+n+"&product_id="+i;if(Shopify.designMode){var s=t.querySelector(e.sectionClass);s&&(s.innerHTML="")}fetch(o).then((function(e){return e.text()})).then(function(i){var n=(new DOMParser).parseFromString(i,"text/html").querySelector(e.sectionClass),o=t.querySelector(e.placeholder);if(o){if(o.innerHTML="",!n)return this.container.classList.add("hide"),void(AOS&&AOS.refreshHard());o.appendChild(n),theme.reinitProductGridItem(t),document.dispatchEvent(new CustomEvent("recommendations:loaded",{detail:{section:t}})),0===n.querySelectorAll(e.productResults).length&&this.container.classList.add("hide")}}.bind(this))}}}),t}(),theme.SlideshowSection=function(){var e=".parallax-container";function t(e){this.container=e;var t=e.getAttribute("data-section-id");if(this.slideshow=e.querySelector("#Slideshow-"+t),this.namespace="."+t,this.initialIndex=0,this.slideshow){var i=e.parentElement;0===[].indexOf.call(i.parentElement.children,i)?this.init():theme.initWhenVisible({element:this.container,callback:this.init.bind(this)})}}return t.prototype=Object.assign({},t.prototype,{init:function(){var t=this.slideshow.querySelectorAll(".slideshow__slide");if(this.container.hasAttribute("data-immediate-load")?(this.slideshow.classList.remove("loading","loading--delayed"),this.slideshow.classList.add("loaded")):theme.loadImageSection(this.slideshow),t.length>1){var i={prevNextButtons:this.slideshow.hasAttribute("data-arrows"),pageDots:this.slideshow.hasAttribute("data-dots"),fade:!0,setGallerySize:!1,initialIndex:this.initialIndex,autoPlay:"true"===this.slideshow.dataset.autoplay&&parseInt(this.slideshow.dataset.speed)};this.flickity=new theme.Slideshow(this.slideshow,i)}else t[0].classList.add("is-selected");this.container.hasAttribute("data-parallax")&&this.container.querySelectorAll(e).forEach(function(e,t){new theme.Parallax(e,{namespace:this.namespace+"-parallax-"+t})}.bind(this))},forceReload:function(){this.onUnload(),this.init()},onUnload:function(){this.flickity&&"function"==typeof this.flickity.destroy&&this.flickity.destroy()},onDeselect:function(){this.flickity&&"function"==typeof this.flickity.play&&this.flickity.play()},onBlockSelect:function(e){var t=this.slideshow.querySelector(".slideshow__slide--"+e.detail.blockId),i=parseInt(t.dataset.index);this.flickity&&"function"==typeof this.flickity.pause?(this.flickity.goToSlide(i),this.flickity.pause()):(this.initialIndex=i,setTimeout(function(){this.flickity&&"function"==typeof this.flickity.pause&&this.flickity.pause()}.bind(this),1e3))},onBlockDeselect:function(){this.flickity&&"function"==typeof this.flickity.play&&this.flickity.args.autoPlay&&this.flickity.play()}}),t}(),theme.StoreAvailability=function(){var e=".js-drawer-open-availability",t=".js-modal-open-availability",i="[data-availability-product-title]";function n(e){this.container=e,this.baseUrl=e.dataset.baseUrl,this.productTitle=e.dataset.productName}return n.prototype=Object.assign({},n.prototype,{updateContent:function(n){var o=this.baseUrl+"/variants/"+n+"/?section_id=store-availability",s=this;fetch(o).then((function(e){return e.text()})).then((function(n){if(""!==n.trim()){s.container.innerHTML=n,s.container.innerHTML=s.container.firstElementChild.innerHTML,s.container.querySelector(e)&&(s.drawer=new theme.Drawers("StoreAvailabilityDrawer","availability")),s.container.querySelector(t)&&(s.modal=new theme.Modals("StoreAvailabilityModal","availability"));var o=s.container.querySelector(i);o&&(o.textContent=s.productTitle)}else this.container.innerHTML=""}))}}),n}(),theme.VideoSection=function(){var e=".video-parent-section";function t(e){this.container=e,this.sectionId=e.getAttribute("data-section-id"),this.namespace=".video-"+this.sectionId,this.videoObject,theme.initWhenVisible({element:this.container,callback:this.init.bind(this),threshold:500})}return t.prototype=Object.assign({},t.prototype,{init:function(){var e=this.container.querySelector(".video-div");if(e)switch(e.dataset.type){case"youtube":var t=e.dataset.videoId;this.initYoutubeVideo(t);break;case"vimeo":t=e.dataset.videoId;this.initVimeoVideo(t);break;case"mp4":this.initMp4Video()}}
13,initYoutubeVideo:function(t){this.videoObject=new theme.YouTube("YouTubeVideo-"+this.sectionId,{videoId:t,videoParent:e})},initVimeoVideo:function(t){this.videoObject=new theme.VimeoPlayer("Vimeo-"+this.sectionId,t,{videoParent:e})},initMp4Video:function(){var t="Mp4Video-"+this.sectionId,i=document.getElementById(t),n=i.closest(e);if(i){n.classList.add("loaded");var o=document.querySelector("#"+t).play();void 0!==o&&o.then((function(){})).catch((function(){i.setAttribute("controls",""),n.classList.add("video-interactable")}))}},onUnload:function(e){e.target.id.replace("shopify-section-","");this.videoObject&&"function"==typeof this.videoObject.destroy&&this.videoObject.destroy()}}),t}(),theme.BackgroundImage=function(){var e=".parallax-container";function t(e){if(this.container=e,e){var t=e.getAttribute("data-section-id");this.namespace="."+t,theme.initWhenVisible({element:this.container,callback:this.init.bind(this)})}}return t.prototype=Object.assign({},t.prototype,{init:function(){if(this.container.dataset&&this.container.dataset.parallax){var t=this.container.querySelector(e),i={namespace:this.namespace+"-parallax",desktopOnly:!0};theme.parallaxSections[this.namespace]=new theme.Parallax(t,i)}},onUnload:function(e){this.container&&(theme.parallaxSections[this.namespace]&&"function"==typeof theme.parallaxSections[this.namespace].destroy&&theme.parallaxSections[this.namespace].destroy(),delete theme.parallaxSections[this.namespace])}}),t}(),theme.Blog=function(){function e(e){this.tagFilters()}return e.prototype=Object.assign({},e.prototype,{tagFilters:function(){var e=document.getElementById("BlogTagFilter");e&&e.addEventListener("change",(function(){location.href=e.value}))}}),e}(),theme.CollectionHeader=function(){var e=!1;function t(t){this.namespace=".collection-header";var i=t.querySelector(".collection-hero");if(i){if(e&&this.checkIfNeedReload(),theme.loadImageSection(i),t.dataset&&t.dataset.parallax){var n=t.querySelector(".parallax-container"),o={namespace:this.namespace+"-parallax"};theme.parallaxSections[this.namespace]=new theme.Parallax(n,o)}}else theme.settings.overlayHeader&&theme.headerNav.disableOverlayHeader();e=!0}return t.prototype=Object.assign({},t.prototype,{checkIfNeedReload:function(){Shopify.designMode&&(theme.settings.overlayHeader&&(document.querySelector(".header-wrapper").classList.contains("header-wrapper--overlay")||location.reload()))},onUnload:function(){theme.parallaxSections[this.namespace]&&(theme.parallaxSections[this.namespace].destroy(),delete theme.parallaxSections[this.namespace])}}),t}(),theme.CollectionSidebar=function(){var e=!1,t="#CollectionSidebar";function i(e){this.container=e.querySelector(t)}return i.prototype=Object.assign({},i.prototype,{init:function(){this.container&&(this.onUnload(),e="drawer"===this.container.dataset.style,theme.FilterDrawer=new theme.Drawers("FilterDrawer","collection-filters",!0))},forceReload:function(){this.init()},onSelect:function(){if(theme.FilterDrawer){if(!e)return void theme.FilterDrawer.close();(e||theme.config.bpSmall)&&theme.FilterDrawer.open()}},onDeselect:function(){theme.FilterDrawer&&theme.FilterDrawer.close()},onUnload:function(){theme.FilterDrawer&&theme.FilterDrawer.close()}}),i}(),theme.Collection=function(){var e=!1,t="#SortBy",i=".grid-product__color-image",n=".color-swatch--with-image",o=".collection-grid__wrapper",s=".collapsible-trigger",a="#CollectionSidebar",r=".tag-list--active-tags",c=".tag-list input",l=".tag-list a",d=".filter-form",h=".collection-filter",u=".price-range",m="tag--active",p="tag--remove",f="collapsible-content--sidebar",g="is-open";function y(e){this.container=e,this.sectionId=e.getAttribute("data-section-id"),this.namespace=".collection-"+this.sectionId,this.sidebar=new theme.CollectionSidebar(e),this.ajaxRenderer=new theme.AjaxRenderer({sections:[{sectionId:this.sectionId,nodeId:"CollectionAjaxContent"}],onReplace:this.onReplaceAjaxContent.bind(this)}),this.init()}return y.prototype=Object.assign({},y.prototype,{init:function(){this.initSort(),this.colorSwatchHovering(),this.initFilters(),this.initPriceRange(),this.sidebar.init()},initSort:function(){this.sortSelect=document.querySelector(t),this.sortSelect&&(this.defaultSort=this.getDefaultSortValue(),this.sortSelect.on("change"+this.namespace,this.onSortChange.bind(this)))},getSortValue:function(){return this.sortSelect.value||this.defaultSort},getDefaultSortValue:function(){return this.sortSelect.getAttribute("data-default-sortby")},onSortChange:function(){this.queryParams=new URLSearchParams(window.location.search),this.queryParams.set("sort_by",this.get
13SortValue()),this.queryParams.delete("page"),window.location.search=this.queryParams.toString()},colorSwatchHovering:function(){this.container.querySelectorAll(i).length&&this.container.querySelectorAll(n).forEach((e=>{e.addEventListener("mouseenter",(function(){var t=e.dataset.variantId,i=e.dataset.variantImage,n=document.querySelector(".grid-product__color-image--"+t);n.style.backgroundImage="url("+i+")",n.classList.add("is-active")})),e.addEventListener("mouseleave",(function(){var t=e.dataset.variantId;document.querySelector(".grid-product__color-image--"+t).classList.remove("is-active")}))}))},initFilters:function(){document.querySelectorAll(c).length&&(this.bindBackButton(),theme.config.stickyHeader&&(this.setFilterStickyPosition(),window.on("resize",theme.utils.debounce(500,this.setFilterStickyPosition))),document.querySelectorAll(l).forEach((e=>{e.addEventListener("click",this.tagClick.bind(this))})),document.querySelectorAll(d).forEach((e=>{e.addEventListener("input",this.onFormSubmit.bind(this))})))},initPriceRange:function(){document.querySelectorAll(u).forEach((e=>new theme.PriceRange(e,{onChange:this.renderFromFormData.bind(this)})))},tagClick:function(t){var i=t.currentTarget;if(theme.FilterDrawer&&theme.FilterDrawer.close(),i.classList.contains("no-ajax"))return;if(t.preventDefault(),e)return;e=!0;const n=i.parentNode,o=new URL(i.href);this.renderActiveTag(n,i),this.updateScroll(!0),this.startLoading(),this.renderCollectionPage(o.searchParams)},onFormSubmit:function(t){var i=t.target;if(theme.FilterDrawer&&theme.FilterDrawer.close(),i.classList.contains("no-ajax"))return;if(t.preventDefault(),e)return;e=!0;const n=i.closest("li"),o=i.closest("form"),s=new FormData(o);this.renderActiveTag(n,i),this.updateScroll(!0),this.startLoading(),this.renderFromFormData(s)},fetchOpenCollasibleFilters:function(){return Array.from(document.querySelectorAll(`${a} ${s}.${g}`)).map((e=>e.dataset.collapsibleId))},renderActiveTag:function(e,t){const i=e.querySelector(".tag__text");e.classList.contains(m)?e.classList.remove(m):(e.classList.add(m),t.closest("li").classList.contains(p)?e.remove():document.querySelectorAll(r).forEach((e=>{const t=document.createElement("li"),n=document.createElement("a");t.classList.add("tag","tag--remove"),n.classList.add("btn","btn--small"),n.innerText=i.innerText,t.appendChild(n),e.appendChild(t)})))},renderFromFormData:function(e){const t=new URLSearchParams(e);this.renderCollectionPage(t)},onReplaceAjaxContent:function(e,t){this.fetchOpenCollasibleFilters().forEach((t=>{e.querySelectorAll(`[data-collapsible-id=${t}]`).forEach(this.openCollapsible)}));var i=e.getElementById(t.nodeId);i&&(document.getElementById(t.nodeId).innerHTML=i.innerHTML)},openCollapsible:function(e){e.classList.contains(f)&&(e.style.height="auto"),e.classList.add(g)},renderCollectionPage:function(t,i=!0){this.ajaxRenderer.renderPage(window.location.pathname,t,i).then((()=>{theme.sections.reinit("collection-grid"),this.updateScroll(!1),this.initPriceRange(),theme.reinitProductGridItem(),document.dispatchEvent(new CustomEvent("collection:reloaded")),e=!1}))},bindBackButton:function(){window.off("popstate"+this.namespace),window.on("popstate"+this.namespace,function(e){if(e){const e=new URL(window.location.href);this.renderCollectionPage(e.searchParams,!1)}}.bind(this))},updateScroll:function(e){var t=document.querySelector("[data-scroll-to]"),i=t&&t.offsetTop;(theme.config.bpSmall||(i-=15),theme.config.stickyHeader)&&(i-=document.querySelector(".site-header").offsetHeight);e?window.scrollTo({top:i,behavior:"smooth"}):window.scrollTo({top:i})},setFilterStickyPosition:function(){var e=document.querySelector(".site-header").offsetHeight;document.querySelector(h).style.top=e+10+"px";var t=document.querySelector(".grid__item--sidebar");t&&(t.style.top=e+10+"px")},forceReload:function(){this.init()},startLoading:function(){document.querySelector(o).classList.add("unload")}}),y}(),theme.FooterSection=function(){var e="[data-disclosure-locale]",t="[data-disclosure-currency]";function i(e){this.container=e,this.localeDisclosure=null,this.currencyDisclosure=null,this.init()}return i.prototype=Object.assign({},i.prototype,{init:function(){var i=this.container.querySelector(e),n=this.container.querySelector(t);i&&(this.localeDisclosure=new theme.Disclosure(i)),n&&(this.currencyDisclosure=new theme.Disclosure(n));var o=document.querySelector(".footer__newsletter-input");o&&o.addEventListener("keyup",(function(){o.classList.add("footer__newsletter-input--active")})),theme.collapsibles.init(this.container)},onUnload:function(){this.localeDisclosure&&this.localeDisclosure.destroy(),this.currencyDisclosure&&this.currencyDisclosure.destroy()}}),i}(),theme.HeaderSection=function(){var e="[data-disclosure-locale]",t="[data-disclosure-currency
13]";function i(e){this.container=e,this.sectionId=this.container.getAttribute("data-section-id"),this.init()}return i.prototype=Object.assign({},i.prototype,{init:function(){Shopify&&Shopify.designMode&&(theme.sections.reinit("slideshow-section"),setTimeout((function(){window.dispatchEvent(new Event("resize"))}),500)),this.initDrawers(),this.initDisclosures(),theme.headerNav.init(),theme.announcementBar.init()},initDisclosures:function(){var i=this.container.querySelector(e),n=this.container.querySelector(t);i&&(this.localeDisclosure=new theme.Disclosure(i)),n&&(this.currencyDisclosure=new theme.Disclosure(n))},initDrawers:function(){theme.NavDrawer=new theme.Drawers("NavDrawer","nav"),"drawer"===theme.settings.cartType&&(document.body.classList.contains("template-cart")||new theme.CartDrawer),theme.collapsibles.init(document.getElementById("NavDrawer"))},onBlockSelect:function(e){theme.announcementBar.onBlockSelect(e.detail.blockId)},onBlockDeselect:function(){theme.announcementBar.onBlockDeselect()},onUnload:function(){theme.NavDrawer.close(),theme.announcementBar.unload(),this.localeDisclosure&&this.localeDisclosure.destroy(),this.currencyDisclosure&&this.currencyDisclosure.destroy()}}),i}(),theme.Product=function(){var e={},t="on-sale",i="disabled",n="is-modal",o="hide",s=".product__video",a=".product__video-wrapper",r=".product-main-slide",c=".is-selected",l=".starting-slide",d=".variant-wrapper",h="[data-product-blocks]",u="[data-blocks-holder]";function m(e){this.container=e;var t=this.sectionId=e.getAttribute("data-section-id"),i=this.productId=e.getAttribute("data-product-id");this.inModal="true"===e.dataset.modal,this.modal,this.settings={enableHistoryState:e.dataset.history||!1,namespace:".product-"+t,inventory:!1,inventoryThreshold:10,modalInit:!1,hasImages:!0,imageSetName:null,imageSetIndex:null,currentImageSet:null,imageSize:"620x",currentSlideIndex:0,videoLooping:e.dataset.videoLooping},this.inModal&&(this.settings.enableHistoryState=!1,this.settings.namespace=".product-"+t+"-modal",this.modal=document.getElementById("QuickShopModal-"+i)),this.selectors={variantsJson:"[data-variant-json]",currentVariantJson:"[data-current-variant-json]",form:".product-single__form",media:"[data-product-media-type-model]",closeMedia:".product-single__close-media",photoThumbs:"[data-product-thumb]",thumbSlider:"[data-product-thumbs]",thumbScroller:".product__thumbs--scroller",mainSlider:"[data-product-photos]",imageContainer:"[data-product-images]",productImageMain:"[data-product-image-main]",priceWrapper:"[data-product-price-wrap]",price:"[data-product-price]",comparePrice:"[data-compare-price]",savePrice:"[data-save-price]",priceA11y:"[data-a11y-price]",comparePriceA11y:"[data-compare-price-a11y]",unitWrapper:"[data-unit-price-wrapper]",unitPrice:"[data-unit-price]",unitPriceBaseUnit:"[data-unit-base]",sku:"[data-sku]",inventory:"[data-product-inventory]",incomingInventory:"[data-incoming-inventory]",colorLabel:"[data-variant-color-label]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",originalSelectorId:"[data-product-select]",singleOptionSelector:"[data-variant-input]",variantColorSwatch:".variant__input--color-swatch",availabilityContainer:"[data-store-availability-holder]"},this.cacheElements(),this.firstProductImage=this.cache.mainSlider.querySelector("img"),this.firstProductImage||(this.settings.hasImages=!1);var n=this.cache.mainSlider.querySelector("[data-set-name]");n&&(this.settings.imageSetName=n.dataset.setName),this.init()}return m.prototype=Object.assign({},m.prototype,{init:function(){this.inModal&&(this.container.classList.add(n),document.addEventListener("modalOpen.QuickShopModal-"+this.productId,this.openModalProduct.bind(this)),document.addEventListener("modalClose.QuickShopModal-"+this.productId,this.closeModalProduct.bind(this))),this.inModal||(this.formSetup(),this.productSetup(),this.videoSetup(),this.initProductSlider(),this.customMediaListners(),this.addIdToRecentlyViewed())},cacheElements:function(){this.cache={form:this.container.querySelector(this.selectors.form),mainSlider:this.container.querySelector(this.selectors.mainSlider),thumbSlider:this.container.querySelector(this.selectors.thumbSlider),thumbScroller:this.container.querySelector(this.selectors.thumbScroller),productImageMain:this.container.querySelector(this.selectors.productImageMain),priceWrapper:this.container.querySelector(this.selectors.priceWrapper),comparePriceA11y:this.container.querySelector(this.selectors.comparePriceA11y),comparePrice:this.container.querySelector(this.selectors.comparePrice),price:this.container.querySelector(this.selectors.price),savePrice:this.container.querySelector(this.selectors.savePrice),priceA11y:this.container.querySelector(this.selectors.priceA11y)}},formSetup:function(){this.initQtySelector(),this.initAjaxProductForm(
13),this.availabilitySetup(),this.initVariants(),this.settings.imageSetName&&this.updateImageSet()},availabilitySetup:function(){var e=this.container.querySelector(this.selectors.availabilityContainer);e&&(this.storeAvailability=new theme.StoreAvailability(e))},productSetup:function(){this.setImageSizes(),this.initImageZoom(),this.initModelViewerLibraries(),this.initShopifyXrLaunch(),window.SPR&&(SPR.initDomEls(),SPR.loadBadges())},setImageSizes:function(){if(this.settings.hasImages){var e=this.firstProductImage.currentSrc;e&&(this.settings.imageSize=theme.Images.imageSize(e))}},addIdToRecentlyViewed:function(){var e=this.container.getAttribute("data-product-handle"),t=this.container.getAttribute("data-product-url"),i=this.container.getAttribute("data-aspect-ratio"),n=this.container.getAttribute("data-img-url");theme.recentlyViewed.recent.hasOwnProperty(e)&&delete theme.recentlyViewed.recent[e],theme.recentlyViewed.recent[e]={url:t,aspectRatio:i,featuredImage:n},theme.config.hasLocalStorage&&window.localStorage.setItem("theme-recent",JSON.stringify(theme.recentlyViewed.recent))},initVariants:function(){var e=this.container.querySelector(this.selectors.variantsJson);if(e){this.variantsObject=JSON.parse(e.innerHTML);var t={container:this.container,enableHistoryState:this.settings.enableHistoryState,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,variants:this.variantsObject},i=this.container.querySelectorAll(this.selectors.variantColorSwatch);if(i.length&&i.forEach((e=>{e.addEventListener("change",function(t){var i=e.dataset.colorName,n=e.dataset.colorIndex;this.updateColorName(i,n)}.bind(this))})),this.variants=new theme.Variants(t),this.storeAvailability){var n=this.variants.currentVariant?this.variants.currentVariant.id:this.variants.variants[0].id;this.storeAvailability.updateContent(n),this.container.on("variantChange"+this.settings.namespace,this.updateAvailability.bind(this))}this.container.on("variantChange"+this.settings.namespace,this.updateCartButton.bind(this)),this.container.on("variantImageChange"+this.settings.namespace,this.updateVariantImage.bind(this)),this.container.on("variantPriceChange"+this.settings.namespace,this.updatePrice.bind(this)),this.container.on("variantUnitPriceChange"+this.settings.namespace,this.updateUnitPrice.bind(this)),this.container.querySelector(this.selectors.sku)&&this.container.on("variantSKUChange"+this.settings.namespace,this.updateSku.bind(this));var o=this.container.querySelector(this.selectors.inventory);if(o&&(this.settings.inventory=!0,this.settings.inventoryThreshold=o.dataset.threshold,this.container.on("variantChange"+this.settings.namespace,this.updateInventory.bind(this))),theme.settings.dynamicVariantsEnable){var s=this.container.querySelector(this.selectors.currentVariantJson);if(s){var a=this.container.querySelector(d);a&&new theme.VariantAvailability({container:this.container,namespace:this.settings.namespace,type:a.dataset.type,variantsObject:this.variantsObject,currentVariantObject:JSON.parse(s.innerHTML)})}}if(this.settings.imageSetName){var r=this.container.querySelector('.variant-input-wrap[data-handle="'+this.settings.imageSetName+'"]');r?(this.settings.imageSetIndex=r.dataset.index,this.container.on("variantChange"+this.settings.namespace,this.updateImageSet.bind(this))):this.settings.imageSetName=null}}},initQtySelector:function(){this.container.querySelectorAll(".js-qty__wrapper").forEach((e=>{new theme.QtySelector(e,{namespace:".product"})}))},initAjaxProductForm:function(){"drawer"===theme.settings.cartType&&new theme.AjaxProduct(this.cache.form)},updateColorName:function(e,t){this.container.querySelector(this.selectors.colorLabel+`[data-index="${t}"`).textContent=e},updateCartButton:function(e){var t=e.detail.variant,n=this.container.querySelector(this.selectors.addToCart),o=this.container.querySelector(this.selectors.addToCartText);if(t)if(t.available){n.classList.remove(i),n.disabled=!1;var s=o.dataset.defaultText;o.textContent=s}else n.classList.add(i),n.disabled=!0,o.textContent=theme.strings.soldOut;else n.classList.add(i),n.disabled=!0,o.textContent=theme.strings.unavailable},updatePrice:function(e){var i=e.detail.variant;if(i)if(this.cache.price.innerHTML=theme.Currency.formatMoney(i.price,theme.settings.moneyFormat),i.compare_at_price>i.price){this.cache.comparePrice.innerHTML=theme.Currency.formatMoney(i.compare_at_price,theme.settings.moneyFormat),this.cache.priceWrapper.classList.remove(o),this.cache.price.classList.add(t),this.cache.comparePriceA11y.setAttribute("aria-hidden","false"),this.cache.priceA11y.setAttribute("aria-hidden","false");var n=i.compare_at_price-i.price;n="percent"==theme.settings.saveType?Math.round(100*n/i.compare_at_price)+"%":theme.Currency.formatMoney(n,theme.settings.moneyFormat),this.cache.savePrice.classList.remove(o),this.cache.savePrice.innerHTML=theme.strings.savePrice.replace("[saved_amount]",n)}else this.cache.priceWrapper&&this.cache.priceWrapper.classList.add(o),this.cache.savePrice.classList.add(o),this.cache.price.classList.remove(t),this.cache.comparePriceA11y&&this.cache.comparePriceA11y.setAttribute("aria-hidden","true"),this.cache.priceA11y.setAttribute("aria-hidden","true")},updateUnitPrice:function(e){var t=e.detail.variant;t&&t.unit_price?(this.container.querySelector(this.selectors.unitPrice).innerHTML=theme.Currency.formatMoney(t.unit_price,theme.settings.moneyFormat),this.container.querySelector(this.selectors.unitPriceBaseUnit).innerHTML=theme.Currency.getBaseUnit(t),this.container.querySelector(this.selectors.unitWrapper).classList.remove(o)):this.container.querySelector(this.selectors.unitWrapper).classList.add(o)},imageSetArguments:function(e){if(e=e||(this.variants?this.variants.currentVariant:null)){var t=this.settings.currentImageSet=this.getImageSetName(e[this.settings.imageSetIndex]),i=this.settings.imageSetName+"_"+t;return this.settings.currentSlideIndex=0,{cellSelector:'[data-group="'+i+'"]',imageSet:i,initialIndex:this.settings.currentSlideIndex}}},updateImageSet:function(e){var t=e?e.detail.variant:this.variants?this.variants.currentVariant:null;if(t){var i=this.getImageSetName(t[this.settings.imageSetIndex]);this.settings.currentImageSet!==i&&this.initProductSlider(t)}},updateImageSetThumbs:function(e){this.cache.thumbSlider.querySelectorAll(".product__thumb-item").forEach((t=>{t.classList.toggle(o,t.dataset.group!==e)}))},getImageSetName:function(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")},updateSku:function(e){var t=e.detail.variant,i="";t&&(t.sku&&(i=t.sku),this.container.querySelector(this.selectors.sku).textContent=i)},updateInventory:function(e){var t=e.detail.variant;if(!t||!t.inventory_management||"continue"===t.inventory_policy)return this.toggleInventoryQuantity(t,!1),void this.toggleIncomingInventory(!1);if("shopify"===t.inventory_management&&window.inventories&&window.inventories[this.productId]){var i=window.inventories[this.productId][t.id];if("continue"===i.policy)return this.toggleInventoryQuantity(t,!1),void this.toggleIncomingInventory(!1);var n=i.quantity,o=!0,s=!1;(n<=0||n>this.settings.inventoryThreshold)&&(o=!1),this.toggleInventoryQuantity(t,o,n),!o&&"true"===i.incoming&&n<=this.settings.inventoryThreshold&&(s=!0),this.toggleIncomingInventory(s,t.available,i.next_incoming_date)}},updateAvailability:function(e){var t=e.detail.variant;t&&this.storeAvailability.updateContent(t.id)},toggleInventoryQuantity:function(e,t,i){this.settings.inventory;var n=this.container.querySelector(this.selectors.inventory),s=n.closest(".product-block");parseInt(i)<=parseInt(this.settings.inventoryThreshold)?(n.parentNode.classList.add("inventory--low"),n.textContent=theme.strings.stockLabel.replace("[count]",i)):(n.parentNode.classList.remove("inventory--low"),n.textContent=theme.strings.inStockLabel),e&&e.available?(n.parentNode.classList.remove(o),s&&s.classList.remove(o)):(n.parentNode.classList.add(o),s&&s.classList.add(o))},toggleIncomingInventory:function(e,t,i){var n=this.container.querySelector(this.selectors.incomingInventory),s=n.closest(".product-block");if(n){var a=n.querySelector(".js-incoming-text");if(e){var r=t?theme.strings.willNotShipUntil.replace("[date]",i):theme.strings.willBeInStockAfter.replace("[date]",i);
13i||(r=theme.strings.waitingForStock),n.classList.remove(o),s&&s.classList.remove(o),a.textContent=r}else n.classList.add(o)}},videoSetup:function(){var e=this.cache.mainSlider.querySelectorAll(s);if(!e.length)return!1;e.forEach((e=>{var t=e.dataset.videoType;"youtube"===t?this.initYoutubeVideo(e):"mp4"===t&&this.initMp4Video(e)}))},initYoutubeVideo:function(t){e[t.id]=new theme.YouTube(t.id,{videoId:t.dataset.youtubeId,videoParent:a,autoplay:!1,style:t.dataset.videoStyle,loop:t.dataset.videoLoop,events:{onReady:this.youtubePlayerReady.bind(this),onStateChange:this.youtubePlayerStateChange.bind(this)}})},youtubePlayerReady:function(t){var i=t.target.getIframe().id;if(e[i]){var n=e[i],o=n.videoPlayer;"sound"!==n.options.style&&o.mute(),n.parent.classList.remove("loading"),n.parent.classList.add("loaded"),this._isFirstSlide(i)&&"sound"!==n.options.style&&o.playVideo()}},_isFirstSlide:function(e){return this.cache.mainSlider.querySelector(l+" #"+e)},youtubePlayerStateChange:function(t){var i=t.target.getIframe().id,n=e[i];switch(t.data){case-1:n.attemptedToPlay&&n.parent.classList.add("video-interactable");break;case 0:n&&"true"===n.options.loop&&n.videoPlayer.playVideo();break;case 3:n.attemptedToPlay=!0}},initMp4Video:function(t){e[t.id]={id:t.id,type:"mp4"},this._isFirstSlide(t.id)&&this.playMp4Video(t.id)},stopVideos:function(){for(var[t,i]of Object.entries(e))i.videoPlayer?"function"==typeof i.videoPlayer.stopVideo&&i.videoPlayer.stopVideo():"mp4"===i.type&&this.stopMp4Video(i.id)},_getVideoType:function(e){return e.getAttribute("data-video-type")},_getVideoDivId:function(e){return e.id},playMp4Video:function(e){var t=this.container.querySelector("#"+e),i=t.play();void 0!==i&&i.then((function(){})).catch((function(e){t.setAttribute("controls",""),t.closest(a).setAttribute("data-video-style","unmuted")}))},stopMp4Video:function(e){var t=this.container.querySelector("#"+e);t&&"function"==typeof t.pause&&t.pause()},initImageZoom:function(){var e=this.container.querySelector(this.selectors.imageContainer);if(e){new theme.Photoswipe(e,this.sectionId);e.addEventListener("photoswipe:afterChange",function(e){this.flickity&&this.flickity.goToSlide(e.detail.index)}.bind(this))}},getThumbIndex:function(e){return e.dataset.index},updateVariantImage:function(e){var t=e.detail.variant,i=(theme.Images.getSizedImageUrl(t.featured_media.preview_image.src,this.settings.imageSize),this.container.querySelector('.product__thumb[data-id="'+t.featured_media.id+'"]')),n=this.getThumbIndex(i);void 0!==n&&this.flickity&&this.flickity.goToSlide(n)},initProductSlider:function(e){if(this.cache.mainSlider.querySelectorAll(r).length<=1){var t=this.cache.mainSlider.querySelector(r);t&&t.classList.add("is-selected")}else{if(this.flickity&&"function"==typeof this.flickity.destroy&&this.flickity.destroy(),!e){var i=this.cache.mainSlider.querySelector(l);this.settings.currentSlideIndex=this._slideIndex(i)}var n={adaptiveHeight:!0,avoidReflow:!0,initialIndex:this.settings.currentSlideIndex,childNav:this.cache.thumbSlider,childNavScroller:this.cache.thumbScroller,childVertical:"beside"===this.cache.thumbSlider.dataset.position,pageDots:!0,wrapAround:!0,callbacks:{onInit:this.onSliderInit.bind(this),onChange:this.onSlideChange.bind(this)}};if(this.settings.imageSetName){var o=this.imageSetArguments(e);n=Object.assign({},n,o),this.updateImageSetThumbs(n.imageSet)}this.flickity=new theme.Slideshow(this.cache.mainSlider,n)}},onSliderInit:function(e){this.settings.imageSetName&&this.prepMediaOnSlide(e)},onSlideChange:function(e){if(this.flickity){var t=this.cache.mainSlider.querySelector('.product-main-slide[data-index="'+this.settings.currentSlideIndex+'"]'),i=this.settings.imageSetName?this.cache.mainSlider.querySelectorAll(".flickity-slider .product-main-slide")[e]:this.cache.mainSlider.querySelector('.product-main-slide[data-index="'+e+'"]');t.setAttribute("tabindex","-1"),i.setAttribute("tabindex",0),this.stopMediaOnSlide(t),this.prepMediaOnSlide(i),this.settings.currentSlideIndex=e}},stopMediaOnSlide(t){var i=t.querySelector(s);if(i){var n=this._getVideoType(i),o=this._getVideoDivId(i);if("youtube"===n){if(e[o].videoPlayer)return void e[o].videoPlayer.stopVideo()}else if("mp4"===n)return void this.stopMp4Video(o)}var a=t.querySelector(this.selectors.media);a&&a.dispatchEvent(new CustomEvent("mediaHidden",{bubbles:!0,cancelable:!0}))},prepMediaOnSlide(t){var i=t.querySelector(s);if(i){this.flickity.reposition();var n=this._getVideoType(i),o=this._getVideoDivId(i);
13if("youtube"===n){if(e[o].videoPlayer&&"sound"!==e[o].options.style)return void e[o].videoPlayer.playVideo()}else"mp4"===n&&this.playMp4Video(o)}var a=t.querySelector(this.selectors.media);a&&(a.dispatchEvent(new CustomEvent("mediaVisible",{bubbles:!0,cancelable:!0})),t.querySelector(".shopify-model-viewer-ui__button").setAttribute("tabindex",0),t.querySelector(".product-single__close-media").setAttribute("tabindex",0))},_slideIndex:function(e){return e.getAttribute("data-index")},openModalProduct:function(){var e=!1;if(this.settings.modalInit)e=!0;else{this.blocksHolder=this.container.querySelector(u);var t=this.blocksHolder.dataset.url;fetch(t).then((function(e){return e.text()})).then(function(e){var t=(new DOMParser).parseFromString(e,"text/html").querySelector(h);t.querySelectorAll("[id]").forEach((e=>{var i=e.getAttribute("id");e.setAttribute("id",i+"-modal");var n=t.querySelector(`[for="${i}"]`);n&&n.setAttribute("for",i+"-modal");var o=t.querySelector(`[aria-controls="${i}"]`);o&&o.setAttribute("aria-controls",i+"-modal")}));var i=t.querySelector(this.selectors.form).getAttribute("id");t.querySelectorAll("[form]").forEach((e=>{e.setAttribute("form",i)})),this.blocksHolder.innerHTML="",this.blocksHolder.append(t),this.blocksHolder.classList.add("product-form-holder--loaded"),this.cacheElements(),this.formSetup(),this.updateModalProductInventory(),Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),theme.collapsibles.init(this.container),document.dispatchEvent(new CustomEvent("quickview:loaded",{detail:{productId:this.sectionId}}))}.bind(this)),this.productSetup(),this.videoSetup(),this.settings.imageSetName?this.variants?this.initProductSlider():document.addEventListener("quickview:loaded",function(e){e.detail.productId===this.sectionId&&this.initProductSlider()}.bind(this)):this.initProductSlider(),this.customMediaListners(),this.addIdToRecentlyViewed(),this.settings.modalInit=!0}AOS.refreshHard(),document.dispatchEvent(new CustomEvent("quickview:open",{detail:{initialized:e,productId:this.sectionId}}))},updateModalProductInventory:function(){window.inventories=window.inventories||{},this.container.querySelectorAll(".js-product-inventory-data").forEach((e=>{var t=e.dataset.productId;window.inventories[t]={},e.querySelectorAll(".js-variant-inventory-data").forEach((e=>{window.inventories[t][e.dataset.id]={quantity:e.dataset.quantity,policy:e.dataset.policy,incoming:e.dataset.incoming,next_incoming_date:e.dataset.date}}))}))},closeModalProduct:function(){this.stopVideos()},initModelViewerLibraries:function(){var e=this.container.querySelectorAll(this.selectors.media);e.length<1||theme.ProductMedia.init(e,this.sectionId)},initShopifyXrLaunch:function(){document.addEventListener("shopify_xr_launch",function(){this.container.querySelector(this.selectors.productMediaWrapper+":not(."+self.classes.hidden+")").dispatchEvent(new CustomEvent("xrLaunch",{bubbles:!0,cancelable:!0}))}.bind(this))},customMediaListners:function(){document.querySelectorAll(this.selectors.closeMedia).forEach((e=>{e.addEventListener("click",function(){var e=this.cache.mainSlider.querySelector(c).querySelector(this.selectors.media);e&&e.dispatchEvent(new CustomEvent("mediaHidden",{bubbles:!0,cancelable:!0}))}.bind(this))}));var e=this.container.querySelectorAll("model-viewer");e.length&&e.forEach((e=>{e.addEventListener("shopify_model_viewer_ui_toggle_play",function(e){this.mediaLoaded(e)}.bind(this)),e.addEventListener("shopify_model_viewer_ui_toggle_pause",function(e){this.mediaUnloaded(e)}.bind(this))}))},mediaLoaded:function(e){this.container.querySelectorAll(this.selectors.closeMedia).forEach((e=>{e.classList.remove(o)})),this.flickity&&this.flickity.setDraggable(!1)},mediaUnloaded:function(e){this.container.querySelectorAll(this.selectors.closeMedia).forEach((e=>{e.classList.add(o)})),this.flickity&&this.flickity.setDraggable(!0)},onUnload:function(){theme.ProductMedia.removeSectionModels(this.sectionId),this.flickity&&"function"==typeof this.flickity.destroy&&this.flickity.destroy()}}),m}(),theme.RecentlyViewed=function(){var e=!1;function t(e){e&&(this.container=e,this.sectionId=this.container.getAttribute("data-section-id"),this.namespace=".recently-viewed"+this.sectionId,this.gridItemWidth=this.container.getAttribute("data-grid-item-class"),this.rowOf=this.container.getAttribute("data-row-of"),theme.initWhenVisible({element:this.container,callback:this.init.bind(this),threshold:600}))}return t.prototype=Object.assign({},t.prototype,{init:function(){if(!e)if(e=!0,0!==Object.keys(theme.recentlyViewed.recent).length||theme.recentlyViewed.recent.constructor!==Object){this.outputContainer=document.getElementById("RecentlyViewed-"+this.sectionId),this.handle=this.container.getAttribute("data-product-handle");var t=[];Object.keys(theme.recentlyViewed.recent).forEach(function(e){"undefined"!==e&&t.push(this.getProductInfo(e))}.bind(this)),Promise.all(t).then(function(e){this.setupOutput(e),this.captureProductDetails(e)}.bind(this))}else this.container.classList.add("hide")},getProductInfo:function(e){return new Promise((function(t,i){theme.recentlyViewed.productInfo.hasOwnProperty(e)?t(theme.recentlyViewed.productInfo[e]):fetch("/products/"+e+".js").then((function(e){return e.text()})).then((function(e){t(e)}))}))},setupOutput:function(e){var t=[],i=this.container.getAttribute("data-recent-count");if(Object.keys(e).forEach(function(i){if(e[i]){var n=JSON.parse(e[i]);if(n.handle!==this.handle&&void 0!==n.handle){n.url=theme.recentlyViewed.recent[n.handle]?theme.recentlyViewed.recent[n.handle].url:n.url,n.image_responsive_url=theme.recentlyViewed.recent[n.handle].featuredImage,n.image_aspect_ratio=theme.recentlyViewed.recent[n.handle].aspectRatio;var o=n.variants[0];if(o&&o.unit_price){var s="";o.unit_price_measurement&&(1!=o.unit_price_measurement.reference_value&&(s+=o.unit_price_measurement.reference_value+" "),s+=o.unit_price_measurement.reference_unit),n.unit_price=theme.Currency.formatMoney(o.unit_price),""!=s&&(n.unit_price+="/"+s)}t.unshift(n)}}}.bind(this)),0!==t.length){var n=theme.buildProductGridItem(t.slice(0,i),this.gridItemWidth,this.rowOf);this.outputContainer.innerHTML=n,AOS&&AOS.refreshHard()}else this.container.classList.add("hide")},captureProductDetails:function(e){for(var t=0;t<e.length;t++){var i=e[t];theme.recentlyViewed.productInfo[i.handle]=i}theme.config.hasSessionStorage&&sessionStorage.setItem("recent-products",JSON.stringify(theme.recentlyViewed.productInfo))},onUnload:function(){e=!1}}),t}(),theme.Testimonials=function(){var e={adaptiveHeight:!0,avoidReflow:!0,pageDots:!0,prevNextButtons:!1};function t(e){this.container=e,this.timeout;var t=e.getAttribute("data-section-id");this.slideshow=e.querySelector("#Testimonials-"+t),this.namespace=".testimonial-"+t,this.slideshow&&theme.initWhenVisible({element:this.container,callback:this.init.bind(this),threshold:600})}return t.prototype=Object.assign({},t.prototype,{init:function(){this.slideshow.dataset.count<=3&&(e.wrapAround=!1),this.flickity=new theme.Slideshow(this.slideshow,e),this.slideshow.dataset.count>2&&(this.timeout=setTimeout(function(){this.flickity.goToSlide(1)}.bind(this),1e3))},onUnload:function(){this.flickity&&"function"==typeof this.flickity.destroy&&this.flickity.destroy()},onDeselect:function(){this.flickity&&"function"==typeof this.flickity.play&&this.flickity.play()},onBlockSelect:function(e){var t=this.slideshow.querySelector(".testimonials-slide--"+e.detail.blockId),i=parseInt(t.dataset.index);clearTimeout(this.timeout),this.flickity&&"function"==typeof this.flickity.pause&&(this.flickity.goToSlide(i),this.flickity.pause())},onBlockDeselect:function(){this.flickity&&"function"==typeof this.flickity.play&&this.flickity.play()}}),t}(),theme.isStorageSupported=function(e){if(window.self!==window.top)return!1;var t,i="test";"session"===e&&(t=window.sessionStorage),"local"===e&&(t=window.localStorage);try{return t.setItem(i,"1"),t.removeItem(i),!0}catch(e){return!1}},theme.reinitProductGridItem=function(e){AOS&&AOS.refreshHard(),theme.initQu
13ickShop(),window.SPR&&(SPR.initDomEls(),SPR.loadBadges()),theme.collapsibles.init()},theme.config.hasSessionStorage=theme.isStorageSupported("session"),theme.config.hasLocalStorage=theme.isStorageSupported("local"),AOS.init({easing:"ease-out-quad",once:!0,offset:60,disableMutationObserver:!0}),theme.config.hasLocalStorage&&(theme.recentlyViewed.localStorage=window.localStorage.getItem("theme-recent"),theme.recentlyViewed.localStorage&&(theme.recentlyViewed.recent=JSON.parse(theme.recentlyViewed.localStorage))),theme.recentlyViewed.productInfo=theme.config.hasSessionStorage&&sessionStorage["recent-products"]?JSON.parse(sessionStorage["recent-products"]):{},theme.config.bpSmall=matchMedia(theme.config.mediaQuerySmall).matches,matchMedia(theme.config.mediaQuerySmall).addListener((function(e){e.matches?(theme.config.bpSmall=!0,document.dispatchEvent(new CustomEvent("matchSmall"))):(theme.config.bpSmall=!1,document.dispatchEvent(new CustomEvent("unmatchSmall")))})),theme.initGlobals=function(){theme.collapsibles.init(),theme.videoModal()},l=function(){if(theme.sections=new theme.Sections,theme.sections.register("slideshow-section",theme.SlideshowSection),theme.sections.register("header",theme.HeaderSection),theme.sections.register("product",theme.Product),theme.sections.register("blog",theme.Blog),theme.sections.register("password-header",theme.PasswordHeader),theme.sections.register("photoswipe",theme.Photoswipe),theme.sections.register("product-recommendations",theme.Recommendations),theme.sections.register("background-image",theme.BackgroundImage),theme.sections.register("testimonials",theme.Testimonials),theme.sections.register("video-section",theme.VideoSection),theme.sections.register("map",theme.Maps),theme.sections.register("footer-section",theme.FooterSection),theme.sections.register("store-availability",theme.StoreAvailability),theme.sections.register("recently-viewed",theme.RecentlyViewed),theme.sections.register("newsletter-popup",theme.NewsletterPopup),theme.sections.register("collection-header",theme.CollectionHeader),theme.sections.register("collection-grid",theme.Collection),theme.initGlobals(),theme.initQuickShop(),theme.rteInit(),document.body.classList.contains("template-cart")){var e=document.getElementById("CartPageForm");e&&new theme.CartForm(e)}theme.settings.predictiveSearch&&theme.predictiveSearch.init(),theme.settings.isCustomerTemplate&&theme.customerTemplates(),document.dispatchEvent(new CustomEvent("page:loaded"))},"loading"!=document.readyState?l():document.addEventListener("DOMContentLoaded",l)}();
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.