PageSourceSearch

https://whitestripesstore.com/cdn/shop/t/25/assets/theme.js?v=162181555627565173771770738588

js whitestripesstore.com collected 2026-10-04 22:07:54 UTC 42,195 bytes, 62 lines download raw bytes

1window.theme=window.theme||{},void 0===window.Shopify&&(window.Shopify={}),Shopify.bind=function(e,t){return function(){return e.apply(t,arguments)}},Shopify.setSelectorByValue=function(e,t){for(var r=0,s=e.options.length;r<s;r++){var i=e.options[r];if(t==i.value||t==i.innerHTML)return e.selectedIndex=r}},Shopify.addListener=function(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r)},Shopify.postLink=function(e,t){var r,s=(t=t||{}).method||"post",i=t.parameters||{},a=document.createElement("form");for(r in a.setAttribute("method",s),a.setAttribute("action",e),i){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",r),n.setAttribute("value",i[r]),a.appendChild(n)}document.body.appendChild(a),a.submit(),document.body.removeChild(a)},Shopify.CountryProvinceSelector=function(e,t,r){this.countryEl=document.getElementById(e),this.provinceEl=document.getElementById(t),this.provinceContainer=document.getElementById(r.hideElement||t),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var e=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,e),this.countryHandler()},initProvince:function(){var e=this.provinceEl.getAttribute("data-default");e&&0<this.provinceEl.options.length&&Shopify.setSelectorByValue(this.provinceEl,e)},countryHandler:function(e){var t=(s=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces"),r=JSON.parse(t);if(this.clearOptions(this.provinceEl),r&&0==r.length)this.provinceContainer.style.display="none";else{for(var s,i=0;i<r.length;i++)(s=document.createElement("option")).value=r[i][0],s.innerHTML=r[i][1],this.provinceEl.appendChild(s);this.provinceContainer.style.display=""}},clearOptions:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},setOptions:function(e,t){var r=0;for(t.length;r<t.length;r++){var s=document.createElement("option");s.value=t[r],s.innerHTML=t[r],e.appendChild(s)}}},theme.config={mediaQueries:{landscapeAll:"screen and (orientation: landscape)",landscape:"screen and (orientation: landscape), screen and (min-width: 48rem)",belowTablet:"screen and (max-width: 47.99rem)",tablet:"screen and (min-width: 48rem)",belowLaptop:"screen and (max-width: 63.99rem)",laptop:"screen and (min-width: 64rem)",belowDesktop:"screen and (max-width: 64rem)",desktop:"screen and (min-width: 64.01rem)",belowWidescreen:"screen and (max-width: 79.99rem)",widescreen:"screen and (min-width: 80rem)",belowExtrawide:"screen and (max-width: 89.99rem)",extrawide:"screen and (min-width: 90rem)"},upsellLimit:6},theme.utils={a11y:{getFocusableElements(e){return Array.from(e.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))},_trapFocusHandlers:{},trapFocus(t,e=t){var r=theme.utils.a11y.getFocusableElements(t),s=r[0],i=r[r.length-1];theme.utils.a11y.removeTrapFocus(),theme.utils.a11y._trapFocusHandlers.focusin=e=>{e.target!==t&&e.target!==i&&e.target!==s||document.addEventListener("keydown",theme.utils.a11y._trapFocusHandlers.keydown)},theme.utils.a11y._trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",theme.utils.a11y._trapFocusHandlers.keydown)},theme.utils.a11y._trapFocusHandlers.keydown=function(e){"TAB"===e.code.toUpperCase()&&(e.target!==i||e.shiftKey||(e.preventDefault(),s.focus()),e.target===t||e.target===s)&&e.shiftKey&&(e.preventDefault(),i.focus())},document.addEventListener("focusout",theme.utils.a11y._trapFocusHandlers.focusout),document.addEventListener("focusin",theme.utils.a11y._trapFocusHandlers.focusin),e.focus()},removeTrapFocus(e=null){document.removeEventListener("focusin",theme.utils.a11y._trapFocusHandlers.focusin),document.removeEventListener("focusout",theme.utils.a11y._trapFocusHandlers.focusout),document.removeEventListener("keydown",theme.utils.a11y._trapFocusHandlers.keydown),e&&e.focus()}},prepareTransition(e){e.addEventListener("transitionend",()=>{e.classList.remove("is-transitioning")});let t=0;const r=getComputedStyle(e);["transition-duration","-moz-transition-duration","-webkit-transition-duration","-o-transition-duration"].forEach(e
1=>t=t||parseFloat(r.getPropertyValue(e))),0!=t&&(e.classList.add("is-transitioning"),e.offsetWidth)},defaultTo:function(e,t){return null==e||e!=e?t:e},formatMoney(e,t){"string"==typeof e&&(e=e.replace(".",""));var r="",s=/\{\{\s*(\w+)\s*\}\}/,t=t||window.currency.format;function i(e,t,r,s){return t=theme.utils.defaultTo(t,2),r=theme.utils.defaultTo(r,","),s=theme.utils.defaultTo(s,"."),isNaN(e)||null==e?0:(t=(e=(e/100).toFixed(t)).split("."))[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r)+(t[1]?s+t[1]:"")}switch(t.match(s)[1]){case"amount":r=i(e,2);break;case"amount_no_decimals":r=i(e,0);break;case"amount_with_space_separator":r=i(e,2," ",".");break;case"amount_no_decimals_with_comma_separator":r=i(e,0,",",".");break;case"amount_no_decimals_with_space_separator":r=i(e,0," ")}return t.replace(s,r)},serializeForm:e=>{var t={},r=new FormData(e);for(const i of r.keys()){var s=/(?:^(properties\[))(.*?)(?:\]$)/;s.test(i)?(t.properties=t.properties||{},t.properties[s.exec(i)[2]]=r.get(i)):t[i]=r.get(i)}return JSON.stringify(t)},debounce(t,r){let s;return(...e)=>{clearTimeout(s),s=setTimeout(()=>t.apply(this,e),r)}},getSiblings(e,t){var r,s=[];let i;for(r of i=t?e.parentNode.querySelectorAll(":scope > "+t):e.parentNode.children)r!==e&&s.push(r);return s},refreshElements(e,t,s){e.forEach(e=>{const r=t.querySelectorAll(e);s.querySelectorAll(e).forEach((e,t)=>{r[t]?(e.innerHTML=r[t].innerHTML,e.classList.remove("hidden")):e.classList.add("hidden")})})},handleize(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")}};class CartAPI{static async get(){CartAPI._trigger(CartAPI._events.fetch.before);try{var e=await(await fetch("/cart.js")).json();return CartAPI._trigger(CartAPI._events.fetch.complete,{cart:e}),e}catch(e){CartAPI._trigger(CartAPI._events.fetch.error,{error:e}),CartAPI._onError(e)}}static async add(t){CartAPI._trigger(CartAPI._events.add.before);try{let e=await fetch("/cart/add.js",{method:"POST",body:JSON.stringify(t),...CartAPI._fetchConfig});if((e=await e.json()).status)throw e;return CartAPI._trigger(CartAPI._events.add.complete,{item:e}),e}catch(e){CartAPI._trigger(CartAPI._events.add.error,{error:e}),CartAPI._onError(e)}}static async addFromForm(t){if(t&&t instanceof HTMLElement){CartAPI._trigger(CartAPI._events.add.before);try{let e=await fetch("/cart/add.js",{method:"POST",body:new FormData(t),headers:{Accept:"application/javascript","X-Requested-With":"XMLHttpRequest"}});if((e=await e.json()).status)throw e;return CartAPI._trigger(CartAPI._events.add.complete,{item:e}),e}catch(e){return CartAPI._trigger(CartAPI._events.add.error,{error:e}),CartAPI._onError(e),e}}else console.error("Invalid form in CartAPI call")}static async change(t){CartAPI._trigger(CartAPI._events.update.before);try{let e=await fetch("/cart/change.js",{method:"POST",body:JSON.stringify(t),...CartAPI._fetchConfig});if((e=await e.json()).status)throw e;return CartAPI._trigger(CartAPI._events.update.complete,{cart:e}),e}catch(e){CartAPI._trigger(CartAPI._events.update.error,{error:e}),CartAPI._onError(e)}}static async update(t){CartAPI._trigger(CartAPI._events.update.before);try{let e=await fetch("/cart/update.js",{method:"POST",body:JSON.stringify(t),...CartAPI._fetchConfig});if((e=await e.json()).status)throw e;return CartAPI._trigger(CartAPI._events.update.complete,{cart:e}),e}catch(e){CartAPI._trigger(CartAPI._events.update.error,{error:e}),CartAPI._onError(e)}}static async clear(){CartAPI._trigger(CartAPI._events.update.before);try{let e=await fetch("/cart/clear.js",{method:"POST",...CartAPI._fetchConfig});if((e=await e.json()).status)throw data;return CartAPI._trigger(CartAPI._events.update.complete,{cart:e}),e}catch(e){CartAPI._trigger(CartAPI._events.update.error,{error:e}),CartAPI._onError(e)}}static _onError(e){console.error(`CartApi Error: 
2        status: ${e.status}
3        message: ${e.message}
4        description: `+e.description)}static _trigger(e,t={}){document.dispatchEvent(new CustomEvent(e,{detail:t}))}}CartAPI._fetchConfig={credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/javascript"}},CartAPI._events={update:{before:"cart:update:before",complete:"cart:update:complete",error:"cart:update:error"},fetch:{before:"cart:fetch:before",complete:"cart:fetch:complete",error:"cart:fetch:error"},add:{before:"cart:add:before",complete:"cart:add:complete",error:"cart:add:error"}};class FocusableWidget extends HTMLElement{constructor(e={}){if(super(),!e.name)throw new Error(`Focusable Widget(${e.name}) must have a name`);if(!this.id)throw new Error(e.name+" must have an id");if(!e.background)throw new Error(`Focusable Widget(${e.name}) must have a background`);this._clientConfig=e,this._init(e)}open=()=>
4{if(!this._isOpen)return this._closeFocusableWidgets(),this.toggle()};close=()=>{if(this._isOpen)return this.toggle()};toggle=()=>(theme.utils.prepareTransition(this),this._toggleClasses(),this._toggleAccessibilityAttributes(),this._isOpen?(theme.utils.a11y.removeTrapFocus(this),this._unbindEvents(),this._dispatchEvents(this._events.close,["close"])):(theme.utils.a11y.trapFocus(this),this._bindEvents(),this._dispatchEvents(this._events.open,["open"])),this._isOpen=!this._isOpen,this);reinitWidget=()=>{this._init(this._clientConfig)};get isOpen(){return this._isOpen}_init({name:e,background:t,widgetOpenClasses:r=[],bodyOpenClasses:s=[],attributes:i={}}){this._name=e,this._isOpen=!1,this._selectors={background:t,open:this.getAttribute("open"),close:this.getAttribute("close")},this._nodes={background:document.querySelector(this._selectors.background)},this._events={open:["focusable-widget:open",e+":open",this.id+":open"],close:["focusable-widget:close",e+":close",this.id+":close"]},this._config={open:document.querySelectorAll(this._selectors.open),close:document.querySelectorAll(this._selectors.close),attributes:{"data-focusable-widget":"true","aria-hidden":"true",tabindex:0,...i},widgetOpenClasses:["open",this.getAttribute("open-class")].concat(r),bodyOpenClasses:["js-focusable-widget-open",`js-${e}-open`,this.getAttribute("body-open-class")].concat(s)},this._validateConfig(),this._addAccessibilityAttributes(),this._setupListeners()}_validateConfig(){if(this._config.open&&this._config.open.length||console.warn(`WARN: ${this._name}: no open triggers found. Check your ${this._name} 'open' attribute, or add a trigger (if needed)`),!this._config.close||!this._config.close.length)throw new Error(`${this._name}: invalid close trigger selector, no elements found. Check your ${this._name} 'close' attribute`)}_setupListeners(){this._config.open.forEach(e=>e.addEventListener("click",this._open.bind(this))),this._config.close.forEach(e=>e.addEventListener("click",this._close.bind(this))),this.addEventListener("click",e=>e.stopPropagation())}_open(e){e&&(e.preventDefault(),e.stopPropagation()),this.open()}_close=e=>{e&&(e.preventDefault(),e.stopPropagation()),this.close()};_closeFocusableWidgets(){document.querySelectorAll("[data-focusable-widget].open").forEach(e=>e.close())}_dispatchEvents(e,t){e.forEach(e=>document.dispatchEvent(new CustomEvent(e))),t&&t.length&&t.forEach(e=>this.dispatchEvent(new CustomEvent(e)))}_bindEvents(){document.addEventListener("keyup",this._onKeyUp),this._nodes.background.addEventListener("click",this._close),this._nodes.background.addEventListener("touchmove",this._onTouchMove)}_unbindEvents(){document.removeEventListener("keyup",this._onKeyUp),this._nodes.background.removeEventListener("click",this._close),this._nodes.background.removeEventListener("touchmove",this._onTouchMove)}_toggleClasses(){this._isOpen?(this._config.bodyOpenClasses.forEach(e=>{e&&document.body.classList.remove(e)}),this._config.widgetOpenClasses.forEach(e=>{e&&this.classList.remove(e)})):(this._config.bodyOpenClasses.forEach(e=>{e&&document.body.classList.add(e)}),this._config.widgetOpenClasses.forEach(e=>{e&&this.classList.add(e)}))}_toggleAccessibilityAttributes(){this._isOpen?(this.setAttribute("aria-hidden","true"),this.setAttribute("tabindex","-1"),this._config.open.forEach(e=>e.setAttribute("aria-expanded","false")),this._config.close.forEach(e=>e.setAttribute("aria-expanded","false"))):(this.setAttribute("aria-hidden","false"),this.setAttribute("tabindex","0"),this._config.open.forEach(e=>e.setAttribute("aria-expanded","true")),this._config.close.forEach(e=>e.setAttribute("aria-expanded","true")))}_addAccessibilityAttributes(){var e=e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",this.id)};for(const t in this._config.attributes)this.setAttribute(t,this._config.attributes[t]);this._config.open.forEach(e),this._config.close.forEach(e)}_onKeyUp=e=>{"ESCAPE"===e.code.toUpperCase()&&this.close()};_onTouchMove=()=>!1}theme.CartAPI=window.CartAPI=CartAPI,theme.AjaxCart=document.querySelector("s-ajaxcart");class Drawer extends FocusableWidget{constructor(){super({name:"drawer",background:".drawer-background"});var e=this.getAttribute("position");if(!e)throw new Error("drawer must have position attribute");this._position=e,this._config.bodyOpenClasses.push(`js-drawer-${e}-open`),this._clientConfig.bodyOpenClasses=[`js-drawer-${e}-open`]}get position(){return this._position}}class Modal extends FocusableWidget{constructor(){super({name:"modal",background:".modal
4-background",bodyOpenClasses:"js-modal-open"})}}class Accordion extends HTMLElement{constructor(){super(),this._selectors={accordion:"[js-accordion]",accordionItem:"[js-accordion-item]",accordionHeader:"[js-accordion-header]",accordionContent:"[js-accordion-content]"}}connectedCallback(){this.buttons=this.querySelectorAll(this._selectors.accordionHeader),this.buttons.forEach(e=>{e.addEventListener("click",this._toggleContent)}),this.content=this.querySelectorAll(this._selectors.accordionContent)}_toggleContent=e=>{e.stopImmediatePropagation();var e=e.currentTarget,t=this.querySelector("#"+e.getAttribute("aria-controls")),r=theme.utils.getSiblings(e.parentElement,this._selectors.accordionItem);"false"==e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded",!0),theme.utils.prepareTransition(t),this._expandSection(t),this.dataset.manualCollapse||r.forEach(e=>{var t=e.querySelector(this._selectors.accordionHeader),e=e.querySelector("#"+t.getAttribute("aria-controls"));"true"==t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded",!1),this._collapseSection(e))})):(e.setAttribute("aria-expanded",!1),this._collapseSection(t))};_collapseSection(e){e.setAttribute("aria-hidden",!0)}_expandSection(e){e.setAttribute("aria-hidden",!1)}}class Tabs extends HTMLElement{constructor(){super()}connectedCallback(){this._elements={tabs:this.querySelectorAll("[js-tab]"),tabList:this.querySelectorAll("[js-tab-list]"),tabPanel:this.querySelectorAll("[js-tab-panel]")},this._tabEventListener(),this._tabListListener()}_tabEventListener=()=>{var e=this._elements["tabs"];e.forEach(e=>e.addEventListener("click",this._showTabPanel))};_showTabPanel=e=>{var t=this._elements["tabs"];for(let e=0;e<t.length;e++)t[e].setAttribute("aria-selected","false");e.target.setAttribute("aria-selected","true");var e=e.target.getAttribute("aria-controls"),r=document.querySelectorAll("[role=tabpanel]");for(let e=0;e<r.length;e++)r[e].setAttribute("aria-hidden","true");document.getElementById(e).setAttribute("aria-hidden","false")};_tabListListener=()=>{var e=this._elements["tabList"];e.forEach(e=>e.addEventListener("keydown",this._tabListKeydown))};_tabListKeydown=e=>{37==e.keyCode&&($("[aria-selected=true]").prev().click().focus(),e.preventDefault()),38==e.keyCode&&($("[aria-selected=true]").prev().click().focus(),e.preventDefault()),39==e.keyCode&&($("[aria-selected=true]").next().click().focus(),e.preventDefault()),40==e.keyCode&&($("[aria-selected=true]").next().click().focus(),e.preventDefault())}}class Carousel extends HTMLElement{constructor(){super(),this.selectors={carousel:"[js-carousel]"},this.options={loop:!0,slidesPerView:"auto",grabCursor:!0,centeredSlides:!1,navigation:!1,pagination:{el:".swiper-pagination",type:"bullets",clickable:"true"},longSwipes:!1,watchSlidesProgress:!0,cssMode:!0}}connectedCallback(){var e=this.dataset.options?JSON.parse(this.dataset.options):{};this.options=Object.assign(this.options,e),this._initCarousel()}_initCarousel(){let e="#"+this.querySelector(this.selectors.carousel).id;void 0!==this.dataset.init?enquire.register(theme.config.mediaQueries[this.dataset.init],{match:function(){this.carousel=new Swiper(e,this.options)}.bind(this),unmatch:function(){this.carousel.el.classList.contains("swiper-initialized")&&this.carousel.destroy(!0,!0)}.bind(this)}):this.carousel=new Swiper(e,this.options)}}class SiteHeader extends HTMLElement{constructor(){super(),this._selectors={header:"#shopify-section-header"}}connectedCallback(){this.header=document.querySelector(this._selectors.header),this._setVariables(),this._watchWindowResize()}_watchWindowResize=e=>{window.addEventListener("resize",this._setVariables)};_setVariables=e=>{document.documentElement.style.setProperty("--header-height",this.header.clientHeight+"px")}}class AjaxCart extends HTMLElement{constructor(){super(),this._Ajaxcart,this._selectors={drawer:"[js-cart-drawer]",upsellData:"#AjaxCartUpsellData[js-upsell-data]",counter:"[js-cart-counter]"},this._internalEvents={fetch:"ajaxcart:fetch",open:"ajaxcart:open",close:"ajaxcart:close",refreshUpsell:"ajaxcart:upsell:refresh"},this._config={shippingThreshold:"true"===this.dataset.shippingThreshold},this._drawer=document.querySelector(this._selectors.drawer),this._initAjaxCart()}fetch(e=!0){this.dispatchEvent(new CustomEvent(this._internalEvents.fetch,{detail:{openDrawer:e}}))}open(e=!0){this.dispatchEvent(new CustomEvent(this._internalEvents.open,{detail:{fetch:e}}))}close(){this.dispatchEvent(new CustomEvent(this._internalEvents.close))}refreshUpsell(){this.dispatchEvent(new CustomEvent(this._internalEvents.refreshUpsell))}_initAjaxCart(){var e=new URLSearchParams(window.location.search).get("viewcart");this._Ajaxcart=Vue.createApp(this._ajaxCartApp()),this._registerComponents(),this._Ajaxcart.mount("#AjaxCartTemplate"),this.classList.remove("hidden"),this._drawer.reinitWidget(),"true"===e&&this.open()}_ajaxCartApp(){const e=this;return{delimiters:["${","}"],data(){return{drawer:e._drawer,shippingThreshold:e._config.shippingThreshold,cart:null,error:!1,counter:document.querySelector(e._selectors.counter),cartHeight:!1,loading:{cart:!1,item:!1}}},computed:{handlesInCart(){return console.log(this.cart.items),this.cart.items.reduce((e,t)=>
4({...e,[t.handle]:!0}),{})}},watch:{cart(){this.cartHeight||this.$nextTick(this.updateCartHeight)}},updated(){this.counter&&(this.cart||(this.counter.innerHTML=0),this.counter.innerHTML=this.cart.item_count)},mounted(){var e=document.querySelector("s-ajaxcart");window.addEventListener("resize",this.updateCartHeight),e.addEventListener("ajaxcart:fetch",this.onFetch),e.addEventListener("ajaxcart:open",this.onOpen),e.addEventListener("ajaxcart:close",this.onClose),document.addEventListener("CartDrawer:open",async()=>{this.cart||(this.cart=await this.fetchCart())}),document.addEventListener("CartDrawer:close",()=>{this.error&&(this.error=!1)}),document.addEventListener("cart:add:complete",this.onCartAddComplete),document.addEventListener("cart:update:complete",this.onCartUpdateComplete),document.addEventListener("cart:update:error",this.onCartError),document.addEventListener("cart:add:error",this.onCartError)},methods:{async fetchCart(){this.loading.cart=!0;var e=await theme.CartAPI.get();return this.loading.cart=!1,e},async updateItemQuantity({line:e,quantity:t}){var r;t<0||(this.loading.item=e-1,r=await theme.CartAPI.change({line:e,quantity:t}),this.cart=r||await this.fetchCart(),0<t&&this.cart.items[e-1]&&this.cart.items[e-1].quantity<t&&(this.error="You have the max quantity of this item in cart."),this.loading.item=!1)},async removeItem(e){this.loading.item=e-1,await this.updateItemQuantity({line:e,quantity:0}),this.loading.item=!1},async addToCart({variantId:e,quantity:t}){this.loading.cart=!0;e=await theme.CartAPI.add({id:e,quantity:t});return this.loading.cart=!1,e},onCartUpdateComplete({detail:e}){e=e.cart;e?(this.cart=e,this.drawer.isOpen||this.drawer.open()):this.fetchCart().then(e=>{this.cart=e,this.drawer.isOpen||this.drawer.open()}).catch(e=>console.log(e))},onCartAddComplete(){this.fetchCart().then(e=>{this.cart=e,this.drawer.isOpen||this.drawer.open()}).catch(e=>console.log(e))},onFetch({detail:e}){const{openDrawer:t=!1}=e;this.fetchCart().then(e=>{this.cart=e,t&&this.drawer.open()}).catch(e=>console.log(e))},onOpen({detail:e}){var{fetch:e=!0}=e;e?this.fetchCart().then(e=>{this.cart=e,this.drawer.open()}).catch(e=>console.log(e)):this.drawer.open()},onClose(){this.drawer.close()},onCartError({detail:e}){e=e.error;e&&("unprocessable_entity"===e.status?this.error=e.message:this.error="We apologize, an error occured when updating your cart.")},formatMoney(e){return theme.utils.formatMoney(e)},updateCartHeight(){var e,t=this.$refs.cartHeader.clientHeight;this.$refs.cartFooter&&(e=this.$refs.cartFooter.clientHeight,744<=window.innerWidth?this.cartHeight=`calc(100vh - ${t/16}rem - ${e/16}rem - env(safe-area-inset-bottom))`:this.cartHeight=`calc(100vh - ${t/16}rem - ${e/16}rem ${this.$refs.subtotalContainer?`- ${this.$refs.subtotalContainer.clientHeight/16}rem`:""} - env(safe-area-inset-bottom))`)}}}}_registerComponents(){var e=document.querySelector(this._selectors.upsellData),t=document.querySelector("#AjaxCartShippingThreshold").dataset.threshold;this._registerComponent("line-item","#AjaxCartLineItem",this._Components.LineItem()),this._registerComponent("shipping-threshold","#AjaxCartShippingThreshold",this._Components.ShippingThreshold(t)),this._registerComponent("upsell-products","#AjaxCartUpsell",this._Components.UpsellProducts(e?JSON.parse(e.innerHTML):[])),this._registerComponent("upsell-product","#AjaxCartUpsellProduct",this._Components.UpsellProduct()),this._registerComponent("skeleton-item","#AjaxCartSkeletonItem",this._Components.SkeletonItem())}_registerComponent(e,t,r){t=document.querySelector(t);this._Ajaxcart.component(e,{template:t.innerHTML,...r}),t.remove()}_Components={mixins(){return{methods:{formatMoney(e){return theme.utils.formatMoney(e)},truncateString(e,t,r="..."){return e.length<t?e:e.substring(0,t)+r},arrayIntoBooleanObject(e,r){return e.reduce((e,t)=>({...e,[r?t[r]:t]:!0}),{})}}}},LineItem(){return{delimiters:["${","}"],mixins:[this.mixins()],props:["item","line","loading"],emits:["removeItem","updateItemQuantity"]}},ShippingThreshold(e){return{delimiters:["${","}"],mixins:[this.mixins()],props:["cart"],data(){return{threshold:e}},computed:{amountForFreeShipping(){if(this.cart)return this.threshold-this.cart.total_price},progress(){if(this.cart)return this.cart.total_price/this.threshold*100},unlocked(){return this.amountForFreeShipping<=0}}}},UpsellProducts(e=[]){return{delimiters:["${","}"],mixins:[this.mixins()],props:["cart","handlesInCart"],emits:["addToCart"],data(){return{products:[],defaultProducts:[],taggedProducts:{},limit:theme.config.upsellLimit,upsellTags:theme.upsellTags||[],fetching:!1,currentSlide:0}},computed:{tagsInCart(){if(this.cart&&this.cart.items){let t=[];
4return this.cart.items.forEach(e=>{e&&e.properties&&e.properties._upsellTag&&t.push(e.properties._upsellTag)}),this.arrayIntoBooleanObject(t)}},handlesInUpsell(){return this.getHandles(this.products)}},created(){this.processParsedProducts(e)},mounted(){document.querySelector("s-ajaxcart").addEventListener("ajaxcart:upsell:refresh",this.refreshUpsell),this.refreshUpsell()},watch:{cart(r,e){return!e||!r||e&&!e.items||r&&!r.items?this.refreshUpsell():void(e.items.some((e,t)=>e&&r&&r.items&&r.items[t]&&r.items[t].handle!==e.handle)&&this.refreshUpsell())}},updated(){setTimeout(()=>this.initSlider(),1)},methods:{initSlider(){var e=document.querySelector("[js-upsell-slider]");this.slider&&this.slider.destroy(!0,!0),e&&(this.slider=new Swiper(e,{slidesPerView:"auto",grabCursor:!0,centeredSlides:!1,autoHeight:!0}),this.slider.on("slideChange",e=>{this.currentSlide=e}),this.products.length)&&this.slider.slideTo(this.currentSlide)},async refreshUpsell(){if(this.cart&&this.cart.items)try{this.removeUpsellProductsInCart(),await this.fetchUpsell(),this.products.length<this.limit&&(this.fillUpsellWithTaggedProducts(),this.fillUpsellWithDefaults())}catch(e){console.log(e)}},async fetchUpsell(){this.products=(await this.fetchUpsellHandles(this.getUpsellHandles())).filter(e=>e.available)},processParsedProducts(e){e&&e.forEach(e=>{e.product&&e.tag&&e.product.available&&(e.product.options=e.product_options,"__DEFAULT__"===e.tag?this.defaultProducts.push(e.product):this.taggedProducts[e.tag]?this.taggedProducts[e.tag].push(e.product):this.taggedProducts[e.tag]=[e.product])})},fillUpsellWithTaggedProducts(){for(let e=0;e<this.upsellTags.length&&!(this.products.length>=this.limit);e++){var t=this.upsellTags[e];this.tagsInCart[t]&&this.taggedProducts[t]&&this.taggedProducts[t].forEach(e=>{this.products.length>=this.limit||this.addToUpsellIfNotRedundant(e)})}},fillUpsellWithDefaults(){for(let e=0;e<this.defaultProducts.length&&!(this.products.length>=this.limit);e++){var t=this.defaultProducts[e];this.handlesInUpsell[t.handle]||this.addToUpsellIfNotRedundant(t)}},async fetchUpsellHandles(e){if(!e&&!e.length)return Promise.resolve([]);let t=[];this.fetching=!0;try{t=await Promise.all(e.map(e=>fetch(`/products/${e}.js`))).then(e=>Promise.all(e.map(e=>e.json())))}catch(e){console.error(e)}finally{return this.fetching=!1,t}},getUpsellHandles(){if(this.cart&&this.cart.items){let t,r,s=0;var i=[];for(let e=0;e<this.cart.items.length&&!(s>this.limit);e++)t=this.cart.items[e],(r=t&&t.properties&&t._upsellHandle?t.properties._upsellHandle:r)&&!this.handlesInCart[r]&&(i.push(r),s++);return[...new Set(i)]}},removeUpsellProductsInCart(){let e=this.products.length;for(var t;e--;)t=this.products[e].handle,this.handlesInCart[t]&&this.products.splice(e,1)},addToUpsellIfNotRedundant(e){e&&e.handle&&(this.handlesInUpsell[e.handle]||this.handlesInCart[e.handle]||(this.products.push(e),this.handlesInUpsell[e.handle]=!0))},getHandles(e){return Array.isArray(e)?this.arrayIntoBooleanObject(e,"handle"):{}},changeSlide(e){this.currentSlide=e}}}},UpsellProduct(){return{delimiters:["${","}"],mixins:[this.mixins()],props:["product"],data(){return{selectedVariant:this.getFirstAvailableVariant(),options:{1:null,2:null,3:null}}},mounted(){this.options[1]=this.selectedVariant.option1,this.options[2]=this.selectedVariant.option2,this.options[3]=this.selectedVariant.option3},methods:{addToCart(){this.selectedVariant&&theme.CartAPI.add({id:this.selectedVariant.id,quantity:1,upsell:{tags:this.product.tags,handle:null}})},getFirstAvailableVariant(){if(!this.product)return null;let t;for(let e=0;e<this.product.variants.length;e++){var r=this.product.variants[e];if(r.available){t=r;break}}return t},onOptionChange(){this.selectedVariant=this.getVariantFromOptions(this.options)},getVariantFromOptions(i){let a=!1;
4return this.product.variants.forEach(e=>{let t=!0;for(const s in i){var r="option"+s;t=t&&i[s]===e[r]}t&&(a=e)}),a}}}},SkeletonItem(){return{}}}}class ProductOptions extends HTMLElement{constructor(){super(),this._selectors={singleOptionSelector:"[js-product-option-selector]"},this._events={change:"variant:change",fetchBefore:"variant:fetch:before",fetchAfter:"variant:fetch:after",fetchError:"variant:fetch:error"}}connectedCallback(){var e;this._handle=this.dataset.productHandle,this._masterSelect=document.getElementById(this.dataset.masterSelectId),this._optionSelectors=[...this.querySelectorAll(this._selectors.singleOptionSelector)],this.dataset.product&&(e=document.getElementById(this.dataset.product))&&(this._product=JSON.parse(e.innerHTML)),this._product&&(this._currentVariant=this._getVariantFromOptions()),(this._product||this._handle)&&this._setupListeners()}_setupListeners(){this._optionSelectors.forEach(e=>e.addEventListener("change",this._handleOptionChange))}_getVariantFromOptions(){if(this._product){const r=this._getCurrentOptions();var e=this._product["variants"];return e.find(t=>r.every(e=>e.value===t[e.index].toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")))}}_getCurrentOptions(){return this._optionSelectors.map(e=>{var t=e.getAttribute("type"),r={};return("radio"!==t&&"checkbox"!==t||!!e.checked)&&(r.value=e.value,r.index=e.dataset.index,r)}).filter(e=>e)}_handleOptionChange=t=>{this._product?this._updateVariant(t):this._fetchProduct(this._handle).then(e=>{this._product=e,this._updateVariant(t)}).catch(e=>console.log(e))};_updateVariant(e){this._lastSelectedOption={key:e.target.dataset.index,value:e.target.value};e=this._getVariantFromOptions();this.dispatchEvent(new CustomEvent(this._events.change,{detail:{variant:e,priceChange:this._hasPriceChanged(e)},bubbles:!0})),this.hasAttribute("data-enable-history-state")&&this._updateHistoryState(e),this._masterSelect&&this._updateMasterSelect(e),this._currentVariant=e}_hasPriceChanged(e){return!(!e||!this._currentVariant||e.price===this._currentVariant.price&&e.compare_at_price===this._currentVariant.compare_at_price)}_updateHistoryState(e){history.replaceState&&e&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+e.id,window.history.replaceState({path:e},"",e))}_updateMasterSelect(e){e&&(this._masterSelect.value=e.id)}async _fetchProduct(e){this.dispatchEvent(new CustomEvent(this._events.fetchBefore,{bubbles:!0}));try{var t=await(await fetch(`/products/${e}.js`)).json();return this.dispatchEvent(new CustomEvent(this._events.fetchAfter,{bubbles:!0})),t}catch(e){this.dispatchEvent(new CustomEvent(this._events.fetchError,{details:{error:e},bubbles:!0}))}}}class LoadingSpinner extends HTMLElement{constructor(){super();var e=document.createElement("template");e.innerHTML=`
5    <style>
6      :host {
7        display: none;
8        position: absolute;        
9        top: 0; right: 0; bottom: 0; left: 0;
10        width: 100%;
11        height: 100%;
12        justify-content: center;
13        align-items: center;
14      }
15
16      :host([loading]) {
17        display: flex;
18      }
19
20      .background {
21        position: absolute;        
22        top: 0; right: 0; bottom: 0; left: 0;
23        width: 100%;
24        height: 100%;
25        background: var(--background, 'transparent');
26        z-index: 1;
27        opacity: var(--bg-opacity, 1);
28      }
29
30      .loading-spinner {
31        display: flex;
32        justify-content: center;
33        align-items: center;
34        position: absolute;
35        width: var(--width, 20px);
36        height: var(--height, 20px);
37        color: var(--color, black);
38        z-index: 2;
39        animation: loading-spinner 1s linear infinite;
40      }
41
42      .loading-spinner svg{
43        fill: currentColor;
44      }
45
46      @keyframes loading-spinner {
47        0% {
48          transform: rotate(0deg);
49        }
50        100% {
51          transform: rotate(360deg);
52        }
53      }
54    </style>
55
56    <div class="background"></div>
57    <div class="loading-spinner">
58      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 145 145">
59        <path d="M72.5,145C32.6,145,.07,112.54,0,72.64H5c.07,37.14,30.35,67.36,67.5,67.36s67.5-30.28,67.5-67.5S109.72,5,72.5,5V0c39.98,0,72.5,32.52,72.5,72.5s-32.52,72.5-72.5,72.5Z" />
60      </svg>
61    </div>
62    `,this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(e.content.cloneNode(!0))}}class PredictiveSearch extends HTMLElement{constructor(){super(),this.input=this.querySelector('input[type="search"]'),this.predictiveSearchResults=this.querySelector("[js-
62predictive-search]"),this.input.addEventListener("input",theme.utils.debounce(e=>{this.onChange(e)},300).bind(this))}onChange(){var e=this.input.value.trim();e.length?this.getSearchResults(e):this.close()}getSearchResults(e){fetch(routes.predictive_search_url+`?q=${e}&resources[type]=product,collection,article,page&resources[limit]=4&section_id=predictive-search`).then(e=>{if(e.ok)return e.text();throw e=new Error(e.status),this.close(),e}).then(e=>{e=(new DOMParser).parseFromString(e,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;this.predictiveSearchResults.innerHTML=e,this.open()}).catch(e=>{throw this.close(),e})}open(){this.predictiveSearchResults.style.display="block"}close(){this.predictiveSearchResults.style.display="none"}}class FilterSort extends HTMLElement{constructor(){super(),this._selectors={container:"filter-sort",form:"[js-filter-form]",filter:"[js-filter]",clearAll:"[js-clear-all]",loader:"loading-spinner"},this._events={change:"filter:change"},this._cache=[],this._debouncedOnSubmit=theme.utils.debounce(e=>{this._onSubmitHandler(e)},500)}connectedCallback(){this._form=this.querySelector(this._selectors.form),this._clearAll=this.querySelector(this._selectors.clearAll),this._loader=this.querySelector(this._selectors.loader),this._setListeners()}_setListeners(){window.addEventListener("popstate",this._onHistoryChange),this._form.addEventListener("input",this._debouncedOnSubmit),this._clearAll.addEventListener("click",this._onClearAllHandler),document.addEventListener("filter:clearAll",this._onClearAllHandler)}_renderComponent(e){e=e.querySelector(this._selectors.container);theme.utils.refreshElements([this._selectors.filter],e,this)}_onSubmitHandler=e=>{e.preventDefault();e=new FormData(this._form),e=new URLSearchParams(e).toString();this._propagateChange(e)};_onClearAllHandler=e=>{e.preventDefault();this._propagateChange("")};_onHistoryChange=e=>{e=e.state?e.state.searchParams:FilterSort.searchParamsInitial;e!==FilterSort.searchParamsPrev&&(this._propagateChange(e,!1),this._onSubmitHandlerEvent=null)};async _propagateChange(e,t=!0){this._loader.setAttribute("loading","");const r=window.location.pathname+"?"+e;var s=e=>e.url===r,s=this._cache.some(s)?this._markupFromCache(s):await this._markupFromFetch(r);document.dispatchEvent(new CustomEvent("filter:change",{detail:{parsedHTML:s}})),this._renderComponent(s),this.querySelectorAll("s-accordion").forEach(e=>{e.connectedCallback()}),t&&history.pushState({searchParams:e},"",""+window.location.pathname+(e&&"?".concat(e))),this._loader.removeAttribute("loading","")}_markupFromCache(e){e=this._cache.find(e).html;return(new DOMParser).parseFromString(e,"text/html")}_markupFromFetch(r){let s=this._cache;return fetch(r).then(e=>e.text()).then(e=>{var t=(new DOMParser).parseFromString(e,"text/html");return s=[...s,{html:e,url:r}],t})}}FilterSort.searchParamsInitial=window.location.search.slice(1),FilterSort.searchParamsPrev=window.location.search.slice(1),customElements.define("s-drawer",Drawer),customElements.define("s-modal",Modal),customElements.define("s-accordion",Accordion),customElements.define("s-tabs",Tabs),customElements.define("s-carousel",Carousel),customElements.define("s-header",SiteHeader),customElements.define("s-ajaxcart",AjaxCart),customElements.define("product-options",ProductOptions),customElements.define("loading-spinner",LoadingSpinner),customElements.define("predictive-search",PredictiveSearch),customElements.define("filter-sort",FilterSort);class CollectionGrid extends HTMLElement{constructor(){super(),this._selectors={productGrid:"[js-products-grid]",toggleGrid:"[js-toggle-grid]",filterSort:"[js-filter-sort]"},this._refresh=["[js-products-grid]","[js-pagination]"],this._cache=[]}connectedCallback(){this._setListeners()}_setListeners(){document.addEventListener("filter:change",this._handleFilterChange)}_handleFilterChange=e=>{e=e.detail.parsedHTML,e=e.querySelector(`[data-id="${this.dataset.id}"]`);theme.utils.refreshElements(this._refresh,e,this)}}class ProductMain extends HTMLElement{constructor(){super(),this._selectors={addToCart:"[js-add-to-cart]",error:"[js-error-message]",form:"[js-product-form]",loader:"loading-spinner",price:"[js-
62price]",badge:"[js-product-badge]"},this._strings={addToCartError:"We're sorry, there has been an error while adding to cart."}}connectedCallback(){this.buttons=this.querySelectorAll(this._selectors.addToCart),this.priceContainer=this.querySelector(this._selectors.price),this.productBadge=this.querySelector(this._selectors.badge),this.addEventListener("variant:change",this._handleVariantChange),this._initProductForm()}_initProductForm(){const t=this.querySelector(this._selectors.form);t&&t.addEventListener("submit",e=>{e.preventDefault(),this._disableButtons(),theme.CartAPI.addFromForm(t).then(e=>{if(this._hideError(),this._enableButtons(),e&&e.status&&"number"==typeof e.status&&300<=e.status)throw e}).catch(e=>{console.log(e);e=e.description||e.message||this._strings.addToCartError;this._showError(e)})})}_handleVariantChange=e=>{var{variant:e,priceChange:t}=e.detail;this._updateAddToCartState(e),e&&t&&this._updatePrice(e),this._updateBadge(e)};_updateAddToCartState(e){var t=this.querySelectorAll(this._selectors.addToCart);e?e.available?t.forEach(e=>{e.textContent="Add To Cart",e.removeAttribute("disabled")}):t.forEach(e=>{e.textContent="Sold out",e.setAttribute("disabled","")}):t.forEach(e=>{e.textContent="Unavailable",e.setAttribute("disabled","")})}_updatePrice(e){let t="";t=e.compare_at_price?`<span class="product-price__price text-color1">${theme.utils.formatMoney(e.price,window.currency.format)}</span><s class="product-price__price--original text-gray">${theme.utils.formatMoney(e.compare_at_price,window.currency.format)}</s>`:`<span class="product-price__price text-gray">${theme.utils.formatMoney(e.price,window.currency.format)}</span>`,this.priceContainer.innerHTML=t}_updateBadge(e){e.available?e.compare_at_price?(this.productBadge.innerHTML="On Sale",this.productBadge.classList.remove("hidden")):this.productBadge.classList.add("hidden"):(this.productBadge.innerHTML="Sold Out",this.productBadge.classList.remove("hidden"))}_disableButtons(){this.buttons.forEach(e=>{e.setAttribute("disabled","");e=e.querySelector(this._selectors.loader);e&&e.setAttribute("loading","")})}_enableButtons(){this.buttons.forEach(e=>{e.removeAttribute("disabled");e=e.querySelector(this._selectors.loader);e&&e.removeAttribute("loading")})}_showError(e){var t=this.querySelector(this._selectors.error);t&&(t.textContent=e,t.classList.remove("hidden"),t.classList.add("block"))}_hideError(){var e=this.querySelector(this._selectors.error);e&&(e.textContent="",e.classList.remove("block"),e.classList.add("hidden"))}}class ProductRecommendations extends HTMLElement{constructor(){super();new IntersectionObserver(((e,t)=>{e[0].isIntersecting&&(t.unobserve(this),fetch(this.dataset.url).then(e=>e.text()).then(e=>{var t=document.createElement("div"),e=(t.innerHTML=e,t.querySelector("product-recommendations"));e&&e.innerHTML.trim().length&&(this.innerHTML=e.innerHTML)}).catch(e=>{console.error(e)}))}).bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("s-collection-grid",CollectionGrid),customElements.define("s-product",ProductMain),customElements.define("product-recommendations",ProductRecommendations);class Account extends HTMLElement{constructor(){super(),this._selectors={addressCountrySelect:"[js-country-select]",editAddressModal:"[js-edit-address-modal]",editAddressOpen:"[js-edit-address]",editAddressForm:"[js-edit-address-form]",deleteAddressButton:"[js-delete-address]",ordersContainer:"[js-orders]",ordersPagination:"[js-next-page]",order:"[js-order]"}}connectedCallback(){this.countrySelects=this.querySelectorAll(this._selectors.addressCountrySelect),this.editAddressModal=this.querySelector(this._selectors.editAddressModal),this.openEditAddress=this.querySelectorAll(this._selectors.editAddressOpen),this.editAddressForms=this.querySelectorAll(this._selectors.editAddressForm),this.deleteAddressButtons=this.querySelectorAll(this._selectors.deleteAddressButton),this.ordersContainer=this.querySelector(this._selectors.ordersContainer),this.ordersPagination=this.querySelector(this._selectors.ordersPagination),this._setupCountries(),this._setupEventListeners()}_setupCountries(){Shopify&&Shopify.CountryProvinceSelector&&(new Shopify.CountryProvinceSelector("AddressCountryNew","AddressProvinceNew",{hideElement:"AddressProvinceContainerNew"}
62),this.countrySelects.forEach(e=>{e=e.dataset.formId;new Shopify.CountryProvinceSelector("AddressCountry_"+e,"AddressProvince_"+e,{hideElement:"AddressProvinceContainer_"+e})}))}_setupEventListeners(){this.ordersPagination&&this.ordersPagination.addEventListener("click",this._addOrders),this.openEditAddress.forEach(e=>{e.addEventListener("click",this._handleOpenEditAddress)}),this.deleteAddressButtons.forEach(e=>{e.addEventListener("click",this._handleDeleteAddress)}),this.editAddressModal.addEventListener("close",this._handleCloseEditAddress)}_addOrders=async()=>{var e=this.ordersPagination.dataset.url,e=await this._getOrders(e),t=e.querySelector(this._selectors.ordersContainer).innerHTML,e=e.querySelector(this._selectors.ordersPagination);this.ordersContainer.insertAdjacentHTML("beforeend",t),e?this.ordersPagination.dataset.url=e.dataset.url:this.ordersPagination.remove(),this.ordersContainer.connectedCallback()};_getOrders(e){return fetch(e).then(e=>e.text()).then(e=>{return(new DOMParser).parseFromString(e,"text/html")})}_handleOpenEditAddress=e=>{e.stopPropagation();e=e.currentTarget.dataset.form,e=document.querySelector("#address_form_"+e);e.classList.remove("hidden"),this.editAddressModal.open(),e.querySelector('[name="address[first_name]"]').focus()};_handleDeleteAddress=e=>{e=e.currentTarget.dataset.target;confirm("Are you sure you want to delete this address?")&&Shopify.postLink(e,{parameters:{_method:"delete"}})};_handleCloseEditAddress=e=>{this.editAddressForms.forEach(e=>{e.classList.add("hidden")})}}customElements.define("s-account",Account);

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.