PageSourceSearch

https://100thieves.com/cdn/shop/t/725/assets/theme.js?v=66304961815781530981787088055

js 100thieves.com collected 2026-10-03 23:12:33 UTC 59,359 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 s=0,r=e.options.length;s<r;s++){var i=e.options[s];if(t==i.value||t==i.innerHTML)return e.selectedIndex=s}},Shopify.addListener=function(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent("on"+t,s)},Shopify.postLink=function(e,t){var s,r=(t=t||{}).method||"post",i=t.parameters||{},a=document.createElement("form");for(s in a.setAttribute("method",r),a.setAttribute("action",e),i){var n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",s),n.setAttribute("value",i[s]),a.appendChild(n)}document.body.appendChild(a),a.submit(),document.body.removeChild(a)},Shopify.CountryProvinceSelector=function(e,t,s){this.countryEl=document.getElementById(e),this.provinceEl=document.getElementById(t),this.provinceContainer=document.getElementById(s.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=(r=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces"),s=JSON.parse(t);if(this.clearOptions(this.provinceEl),s&&0==s.length)this.provinceContainer.style.display="none";else{for(var r,i=0;i<s.length;i++)(r=document.createElement("option")).value=s[i][0],r.innerHTML=s[i][1],this.provinceEl.appendChild(r);this.provinceContainer.style.display=""}},clearOptions:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},setOptions:function(e,t){var s=0;for(t.length;s<t.length;s++){var r=document.createElement("option");r.value=t[s],r.innerHTML=t[s],e.appendChild(r)}}},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)"},money:{format:`${window.currency.symbol||"$"}{{amount}}`,currencySymbols:{USD:"$",CAD:"$",EUR:"€",CRC:"₡",GBP:"£",ILS:"₪",INR:"₹",JPY:"¥",KRW:"₩",NGN:"₦",PHP:"₱",PLN:"zł",PYG:"₲",THB:"฿",UAH:"₴",VND:"₫"}},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 s=theme.utils.a11y.getFocusableElements(t),r=s[0],i=s[s.length-1];theme.utils.a11y.removeTrapFocus(),theme.utils.a11y._trapFocusHandlers.focusin=e=>{e.target!==t&&e.target!==i&&e.target!==r||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(),r.focus()),e.target===t||e.target===r)&&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 s=getComputedStyle(e);["transition-duration","-moz-transition-duration","-webkit-transition-duration","-o-transition-duration"].forEach(e
1=>t=t||parseFloat(s.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 s="",a=/\{\{\s*(\w+)\s*\}\}/,n=t||theme.config.money.format;function r(e,t,s,r){if(t=theme.utils.defaultTo(t,2),s=theme.utils.defaultTo(s,","),r=theme.utils.defaultTo(r,"."),isNaN(e)||null==e)return 0;t=(e=(e/100).toFixed(t)).split("."),e=t[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+s);let i=t[1]?r+t[1]:"";return e+(i="no_trailing_zeros"==n.match(a)[1]&&".00"==i?"":i)}switch(n.match(a)[1]){case"amount":s=r(e,2);break;case"amount_no_decimals":s=r(e,0);break;case"amount_with_space_separator":s=r(e,2," ",".");break;case"amount_no_decimals_with_comma_separator":s=r(e,0,",",".");break;case"amount_no_decimals_with_space_separator":s=r(e,0," ");break;case"no_trailing_zeros":s=r(e,2)}return n.replace(a,s)},serializeForm:e=>{var t={},s=new FormData(e);for(const i of s.keys()){var r=/(?:^(properties\[))(.*?)(?:\]$)/;r.test(i)?(t.properties=t.properties||{},t.properties[r.exec(i)[2]]=s.get(i)):t[i]=s.get(i)}return JSON.stringify(t)},debounce(t,s){let r;return(...e)=>{clearTimeout(r),r=setTimeout(()=>t.apply(this,e),s)}},getSiblings(e,t){var s,r=[];let i;for(s of i=t?e.parentNode.querySelectorAll(":scope > "+t):e.parentNode.children)s!==e&&r.push(s);return r},refreshElements(e,s,t){t.forEach(t=>{e.forEach(e=>{const a=s.querySelectorAll(e);t.querySelectorAll(e).forEach((e,t)=>{var s,r,i;a[t]?null!=e.getAttribute("js-accordion-item")?(s=e.querySelector("[js-accordion-header]").getAttribute("aria-expanded"),r=e.querySelector("[js-accordion-content]").getAttribute("aria-hidden"),(i=a[t]).querySelector("[js-accordion-header]").setAttribute("aria-expanded",s),i.querySelector("[js-accordion-content]").setAttribute("aria-hidden",r),e.innerHTML=i.innerHTML):e.innerHTML=a[t].innerHTML:e.remove()})})})},handleize(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")},getCookie(e){for(var t=e+"=",s=decodeURIComponent(document.cookie).split(";"),r=0;r<s.length;r++){for(var i=s[r];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""},setCookie(e,t,s){var r=new Date,s=(r.setTime(r.getTime()+24*s*60*60*1e3),"expires="+r.toUTCString());document.cookie=e+"="+t+";"+s+";path=/"},toggle(t,e=[]){e.forEach(e=>{t.classList.toggle(e)})}};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:s=[],bodyOpenClasses:r=[],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(s),bodyOpenClasses:["js-focusable-widget-open",`js-${e}-open`,this.getAttribute("body-open-class")].concat(r)},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")),s=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||s.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._tabID=this.getAttribute("data-id"),this._elements={tabs:this.querySelectorAll(`[js-tab-${this._tabID}]`),tabList:this.querySelectorAll(`[js-tab-list-${this._tabID}]`),tabPanel:this.querySelectorAll("[js-tab-panel]")},this._tabEventListener(),this._tabListListener()}_tabEventListener=()=>{var e=this._elements["tabs"];e.forEach(e=>{e.addEventListener("click",this._showTabPanel),"horizontal"===this.dataset.orientation?e.addEventListener("keydown",this._tabKeydownHorizontal):e.addEventListener("keydown",this._tabKeydownVertical)})};_tabKeydownVertical=e=>{var t,s=this._elements["tabs"],r=e.currentTarget;let i=!1;switch(e.key){case"ArrowUp":(r===s[0]?(s[s.length-1].click(),s[s.length-1]):(s[(t=Array.from(s).indexOf(r))-1].click(),s[t-1])).focus(),i=!0;break;case"ArrowDown":(r===s[s.length-1]?(s[0].click(),s[0]):(s[(t=Array.from(s).indexOf(r))+1].click(),s[t+1])).focus(),i=!0;break;case"Home":s[0].click(),s[0].focus(),i=!0;break;case"End":s[s.length-1].click(),s[s.length-1].focus(),i=!0}i&&(e.stopPropagation(),e.preventDefault())};_tabKeydownHorizontal=e=>{var t,s=this._elements["tabs"],r=e.currentTarget;let i=!1;switch(e.key){case"ArrowLeft":(r===s[0]?(s[s.length-1].click(),s[s.length-1]):(s[(t=Array.from(s).indexOf(r))-1].click(),s[t-1])).focus(),i=!0;break;case"ArrowRight":(r===s[s.length-1]?(s[0].click(),s[0]):(s[(t=Array.from(s).indexOf(r))+1].click(),s[t+1])).focus(),i=!0;break;case"Home":s[0].click(),s[0].focus(),i=!0;break;case"End":s[s.length-1].click(),s[s.length-1].focus(),i=!0}i&&(e.stopPropagation(),e.preventDefault())};_showTabPanel=e=>{var t=this._elements["tabs"];for(let e=0;e<t.length;e++)t[e].setAttribute("aria-selected","false");e.currentTarget.setAttribute("aria-selected","true");var e=e.currentTarget.getAttribute("aria-controls"),s=document.querySelectorAll(`[role=tabpanel][js-tab-panel-${this._tabID}]`);for(let e=0;e<s.length;e++)s[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 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 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 s;t<0||(this.loading.item=e-1,s=await theme.CartAPI.change({line:e,quantity:t}),this.cart=s||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,s){t=document.querySelector(t);this._Ajaxcart.component(e,{template:t.innerHTML,...s}),t.remove()}_Components={mixins(){return{methods:{formatMoney(e){return theme.utils.formatMoney(e)},truncateString(e,t,s="..."){return e.length<t?e:e.substring(0,t)+s},arrayIntoBooleanObject(e,s){return e.reduce((e,t)=>({...e,[s?t[s]: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(s,e){return!e||!s||e&&!e.items||s&&!s.items?this.refreshUpsell():void(e.items.some((e,t)=>e&&s&&s.items&&s.items[t]&&s.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,s,r=0;var i=[];for(let e=0;e<this.cart.items.length&&!(r>this.limit);e++)t=this.cart.items[e],(s=t&&t.properties&&t._upsellHandle?t.properties._upsellHandle:s)&&!this.handlesInCart[s]&&(i.push(s),r++);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 s=this.product.variants[e];if(s.available){t=s;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 r in i){var s="option"+r;t=t&&i[r]===e[s]}t&&(a=e)}),a}}}},SkeletonItem(){return{}}}}class Carousel extends HTMLElement{constructor(){super(),this.selectors={carousel:"[js-carousel]"},this.options={loop:!0,slidesPerView:"auto",grabCursor:!0,centeredSlides:!1,navigation:!1,pagination:!1}}connectedCallback(){var e=this.dataset.options?JSON.parse(this.dataset.options):{};this.options=Object.assign(this.options,e),this._initCarousel(),this.dataset.controller&&this._linkCarousels(this.dataset.controller)}_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)}_linkCarousels(e){e=document.querySelector("#"+e).parentElement.carousel;this.carousel.thumbs.swiper=e,this.carousel.thumbs.init()}}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._checkAvailableOptions=!this.hasAttribute("data-disable-option-binding"),this._optionSelectors=[...this.querySelectorAll(this._selectors.singleOptionSelector)],this._checkAvailableOptions&&(this._availableValues={},this._lastSelectedOption=null,this._option1Values=this._option2Values=null),this.dataset.product&&(e=document.getElementById(this.dataset.product))&&(this._product=JSON.parse(e.innerHTML)),this._product&&(this._currentVariant=this._getVariantFromOptions(),this._checkAvailableOptions)&&this._setupOptionsAvailability(this._product),(this._product||this._handle)&&this._setupListeners()}set product(e){this._product=e,this.disconnectedCallback(),this.connectedCallback()}_setupListeners(){this._optionSelectors.forEach(e=>e.addEventListener("change",this._handleOptionChange))}_getVariantFromOptions(){if(this._product){const s=this._getCurrentOptions();var e=this._product["variants"];return e.find(t=>s.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"),s={};return("radio"!==t&&"checkbox"!==t||!!e.checked)&&(s.value=e.value,s.index=e.dataset.index,s)}).filter(e=>e)}_setupOptionsAvailability(e){this._option1Values=new Set,this._option2Values=new Set,e.variants.forEac
4h(e=>{var{option1:e,option2:t}=e;e&&this._option1Values.add(e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")),t&&this._option2Values.add(t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,""))}),this._option1Values=[...this._option1Values],this._option2Values=[...this._option2Values],this._optionSelectors.forEach(e=>{null==this._lastSelectedOption&&e.checked&&(this._lastSelectedOption={key:e.dataset.index,value:e.value})}),this._availableValues=this._getAvailableValues(this._product,this._lastSelectedOption),this._refreshValuesUI(this._availableValues)}_handleOptionChange=t=>{this._product?this._updateVariant(t):this._fetchProduct(this._handle).then(e=>{this._product=e,this._checkAvailableOptions&&this._setupOptionsAvailability(this._product),this._updateVariant(t)}).catch(e=>console.log(e))};_updateVariant(e){this._lastSelectedOption={key:e.target.dataset.index,value:e.target.value};var t,s,e=this._getVariantFromOptions();this.dispatchEvent(new CustomEvent(this._events.change,{detail:{variant:e,priceChange:this._hasPriceChanged(e)},bubbles:!0})),this._checkAvailableOptions&&(t=this._getAvailableValues(this._product,this._lastSelectedOption),s=this._getDifference(this._availableValues,t),this._refreshValuesUI(s),this._availableValues=t),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)}_getAvailableValues(s,r){if(r){const i={};var e=["option1","option2"],t={option1:this._option1Values,option2:this._option2Values};const a=e.find(e=>e!==r.key);return t[a].forEach(t=>{var e=s.variants.findIndex(e=>e[r.key].toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")===r.value&&e[a].toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")===t&&e.available);i[t]=0<=e}),i}return s.variants.reduce((e,t)=>{var{option1:t,option2:s}=t;return t&&(e[t]=!0),s&&(e[s]=!0),e},{})}_refreshValuesUI(e){for(const s in e){var t=this.querySelector(`[value="${s}"]`);t&&(t.disabled=!e[s])}}_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}))}}_getDifference(e,t){var s={};if(e||t){if(!e)return t;if(!t)return e;for(const r in t)t[r]!==e[r]&&(s[r]=t[r])}return s}disconnectedCallback(){this._optionSelectors.forEach(e=>e.removeEventListener("change",this._handleOptionChange))}}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
4w Event("change",{bubbles:!0}),this.querySelectorAll("button").forEach(e=>e.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(e){e.preventDefault();var t=this.input.value;"plus"===e.target.name?this.input.stepUp():this.input.stepDown(),t!==this.input.value&&this.input.dispatchEvent(this.changeEvent)}}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      }
28
29      .loading-spinner {
30        display: flex;
31        justify-content: center;
32        align-items: center;
33        position: absolute;
34        width: var(--width, 20px);
35        height: var(--height, 20px);
36        color: var(--color, black);
37        z-index: 2;
38        animation: loading-spinner 1s linear infinite;
39      }
40
41      .loading-spinner svg{
42        fill: currentColor;
43        width: 100%;
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-predictive-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]",filterLabel:"[js-filter-label]",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._filterLabels=this.querySelectorAll(this._selectors.filterLabel),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),this._filterLabels.forEac
62h(e=>{e.addEventListener("click",this._clickLabel)})}_clickLabel=e=>{e.stopPropagation(),e.stopImmediatePropagation()};_renderComponent(e){var e=e.querySelector(this._selectors.container),t=document.querySelectorAll(this._selectors.container);theme.utils.refreshElements([this._selectors.filter],e,t)}_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 s=window.location.pathname+"?"+e;var r=e=>e.url===s,r=this._cache.some(r)?this._markupFromCache(r):await this._markupFromFetch(s);document.dispatchEvent(new CustomEvent("filter:change",{detail:{parsedHTML:r}})),this._renderComponent(r),this.querySelectorAll("s-accordion").forEach(e=>{e.connectedCallback()}),t&&history.pushState({searchParams:e},"",""+window.location.pathname+(e&&"?".concat(e))),this._loader.removeAttribute("loading",""),this.connectedCallback()}_markupFromCache(e){e=this._cache.find(e).html;return(new DOMParser).parseFromString(e,"text/html")}_markupFromFetch(s){let r=this._cache;return fetch(s).then(e=>e.text()).then(e=>{var t=(new DOMParser).parseFromString(e,"text/html");return r=[...r,{html:e,url:s}],t})}}FilterSort.searchParamsInitial=window.location.search.slice(1),FilterSort.searchParamsPrev=window.location.search.slice(1);class ActiveFilters extends HTMLElement{constructor(){super(),this._selectors={remove:"[js-remove]",clearAll:"[js-clear-all]"},this._refresh=["[js-active-filter]"]}connectedCallback(){document.addEventListener("filter:change",this._handleFilterChange),this._setListeners()}_setListeners(){var e=this.querySelector(this._selectors.clearAll);e&&e.addEventListener("click",this._triggerClearAll),this.querySelectorAll(this._selectors.remove).forEach(e=>e.addEventListener("click",this._handleRemove))}_handleRemove=e=>{e.preventDefault();var{name:e,value:t}=e.currentTarget.dataset,e=document.querySelector(`filter-sort [name="${e}"][value="${t}"]`);e&&e.click()};_handleFilterChange=e=>{e=e.detail.parsedHTML,e=e.querySelector("active-filters");this.innerHTML=e.innerHTML,this._setListeners()};_triggerClearAll=e=>{e.preventDefault(),e.stopImmediatePropagation(),document.dispatchEvent(new CustomEvent("filter:clearAll"))}}class PriceRange extends HTMLElement{constructor(){super(),this.querySelectorAll("input").forEach(e=>e.addEventListener("change",this.onRangeChange.bind(this))),this.setMinAndMaxValues()}onRangeChange(e){this.adjustToValidValues(e.currentTarget),this.setMinAndMaxValues()}setMinAndMaxValues(){var e=this.querySelectorAll("input"),t=e[0],e=e[1];e.value&&t.setAttribute("max",e.value),t.value&&e.setAttribute("min",t.value),""===t.value&&e.setAttribute("min",0),""===e.value&&t.setAttribute("max",e.getAttribute("max"))}adjustToValidValues(e){var t=Number(e.value),s=Number(e.getAttribute("min")),r=Number(e.getAttribute("max"));t<s&&(e.value=s),r<t&&(e.value=r)}}class HorizontalDrag extends HTMLElement{constructor(){super(),this._selectors={draggable:"[js-draggable]",links:"[js-nav-link]"}}connectedCallback(){this._initClickAndDrag()}_initClickAndDrag(){const t=this.querySelector(this._selectors.draggable),s=this.querySelectorAll(this._selectors.links),r=e=>{e.preventDefault(),e.stopImmediatePropagation()};let i=!1;var a=!1;let n,o;t.addEventListener("mousedown",e=>{i=!0,t.classList.add("active"),n=e.pageX-t.offsetLeft,o=t.scrollLeft}),t.addEventListener("mouseleave",()=>{i=!1,t.classList.remove("active")}),t.addEventListener("mouseup",e=>{if(i=!1,a)for(let e=0;e<s.length;e++)s[e].addEventListener("click",r);else for(let e=0;e<s.length;e++)s[e].removeEventListener("click",r);t.classList.remove("active"),a=!1}),t.addEventListener("mousemove",e=>{i&&(a=!0,e.preventDefault(),e=e.pageX-t.offsetLeft-n,t.scrollLeft=o-e)}),s.ondragstart=function(){console.log("Drag start")}}}class HotSpot extends HTMLElement{constructor(){super(),this._selectors={hotSpotBtn:"[js-hot-sp
62ot-btn]",hotSpotContent:"[js-hot-spot-content]",closeBtn:"[js-close-btn]"}}connectedCallback(){this.hotSpotBtn=this.querySelector(this._selectors.hotSpotBtn),this.hotSpotContent=this.querySelector(this._selectors.hotSpotContent),this.closeBtn=this.querySelector(this._selectors.closeBtn),this._setListeners()}_setListeners(){var e;this.hotSpotBtn&&this.hotSpotContent&&((e=window.matchMedia("(min-width: 1024px)")).addEventListener("change",e=>{e.matches?(this.hotSpotBtn.removeEventListener("click",this._toggleHotSpotContent),this.hotSpotBtn.addEventListener("mouseenter",this._toggleHotSpotContent),this.hotSpotContent.addEventListener("mouseenter",this._toggleHotSpotContent),this.hotSpotBtn.addEventListener("mouseleave",this._toggleHotSpotContent),this.hotSpotContent.addEventListener("mouseleave",this._toggleHotSpotContent)):this.hotSpotBtn.addEventListener("click",this._toggleHotSpotContent)}),e.matches)&&(this.hotSpotBtn.removeEventListener("click",this._toggleHotSpotContent),this.hotSpotBtn.addEventListener("mouseenter",this._toggleHotSpotContent),this.hotSpotBtn.addEventListener("mouseleave",this._toggleHotSpotContent),this.hotSpotContent.addEventListener("mouseenter",this._toggleHotSpotContent),this.hotSpotContent.addEventListener("mouseleave",this._toggleHotSpotContent))}_toggleHotSpotContent=()=>{this.hotSpotContent.classList.toggle("hidden"),this.hotSpotBtn.classList.toggle("hotspot-btn-white")}}class HoverTabs extends HTMLElement{constructor(){super()}connectedCallback(){this._elements={tabs:this.querySelectorAll("[js-tab]"),tabList:this.querySelectorAll("[js-tab-list]"),tabPanel:this.querySelectorAll("[js-tab-panel]"),modalTriggers:this.querySelectorAll("[js-modal-trigger]")},this._tabEventListener(),this._tabListListener(),this._modalEventListener(),this._setContainerHeight()}_tabEventListener=()=>{var e=this._elements["tabs"];e.forEach(e=>e.addEventListener("mouseover",this._showTabPanel))};_modalEventListener=()=>{var e=this._elements["modalTriggers"];e.length<1||e.forEach(e=>{e.addEventListener("click",this._openModal.bind(this))})};_showTabPanel=e=>{var t=this._elements["tabs"];for(let e=0;e<t.length;e++)t[e].setAttribute("aria-selected","false");e.currentTarget.setAttribute("aria-selected","true");var e=e.currentTarget.getAttribute("aria-controls"),s=document.querySelectorAll("[role=tabpanel]");for(let e=0;e<s.length;e++)s[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())};_setContainerHeight=()=>{var e=document.querySelectorAll("[role=tabpanel]"),t=0,s=0;e.forEach(e=>{e.offsetHeight>t&&(t=e.offsetHeight+5),e.offsetWidth>s&&(s=e.offsetWidth),e.style.setProperty("--panel-height",t+"px"),e.style.setProperty("--panel-width",s+"px")})};_openModal=e=>{e.preventDefault(),e.stopImmediatePropagation();e=e.currentTarget.getAttribute("data-target");document.querySelector(`[js-modal][data-target="${e}"]`).open()}}!function(){var r;window.__esportsCalendarDropdownInit||(window.__esportsCalendarDropdownInit=!0,r="details.esports-schedule__add[open]",document.addEventListener("click",function(e){var t,s=e.target.closest(".esports-schedule__add-item");s?(s=s.closest("details.esports-schedule__add"))&&s.removeAttribute("open"):(t=e.target,document.querySelectorAll(r).forEach(function(e){t&&e.contains(t)||e.removeAttribute("open")}))}),document.addEventListener("keydown",function(e){"Escape"===e.key&&document.querySelectorAll(r).forEach(function(e){e.removeAttribute("open");e=e.querySelector("summary");e&&e.focus()})}))}(),customElements.define("s-drawer",Drawer),customElements.define("s-modal",Modal),customElements.define("s-accordion",Accordion),customElements.define("s-tabs",Tabs),customElements.define("s-ajaxcart",AjaxCart),customElements.define("s-carousel",Carousel),customElements.define("product-options",ProductOptions),customElements.define("quantity-input",QuantityInput),customElements.define("loading-spinner",LoadingSpinner),customElements.define("predictive-search",PredictiveSearch),customElements.define("filter-sort",FilterSort),customElements.define("active-filters",ActiveFilters),customElements.define("price-range",PriceRange),customElements.define("horizontal-drag",HorizontalDrag),customElements.define("s-hotspot",HotSpot),customElements.define("hover-tabs",HoverTabs);class CollectionGrid extends HTMLElement{constructor(){super(),this._selectors={container:"s-collection-grid",productGrid:"[js-products-grid]",toggleGrid:"[js-toggle-grid]",filterSort:"[js-filter-sort]"},this._refresh=["[js-products-grid]"],this._cache=[]}connectedCallback(){this._setListeners()}_setListeners(){document.addEventListener("filter:change",this._handleFilterChange)}_handleFilterChange=e=>{var e=e.detail["parsedHTML"],e=e.querySelector(`[data-id="${this.dataset.id}"]`),t=document.querySelectorAll(this._selectors.container);theme.utils.refreshElements(this._refresh,e,t)}}class ProductMain extends HTMLElement{constructor(){super(),this._selectors={relatedVariants:"[js-related-variants]",zoomTriggers:"[js-zoom-trigger]",imageZoomModal:"[js-product-image-zoom-modal]",customizerText:"[js-customizer-text]",customizerInput:"[js-customizer-input]",customizerError:"[js-customizer-error]",swatchLink:"[js-color-swatch-link]"}}connectedCallback(){this._initRelatedVariants(),this._initImageZoom(),this._initCustomizer()}async _initRelatedVariants(){if(this.relatedVariantsContainer=this.querySelectorAll(this._selectors.relatedVariants),!(this.relatedVariantsContainer.length<1)){const s=this.relatedVariantsContainer[0].getAttribute("data-handle");var e=this.relatedVariantsContainer[0].getAttribute("data-tag"),e=await this._getRelatedVariantsJSON(`/collections/all/${e}/?view=json`);let t="";
620!=e.length&&(e.forEach(e=>{t=e.handle==s?`${t}<div class="related-product__active" aria-current="true" aria-label="${e.color}"><img src="${e.swatch}" alt="${e.title}"/></div>`:`${t}<a href="${e.url}" class="related-product__link" aria-label="${e.color}" js-color-swatch-link><img src="${e.swatch}" alt="${e.title}"></a>`}),this.relatedVariantsContainer.forEach(e=>{e.innerHTML=t,e.classList.remove("hidden")}),this.querySelectorAll(this._selectors.swatchLink).forEach(e=>{e.addEventListener("click",this._renderProductLink)}))}}_getRelatedVariantsJSON(e){return fetch(e).then(e=>e.text()).then(e=>{e=(new DOMParser).parseFromString(e,"text/html").querySelector("[js-collection-json]");return JSON.parse(e.innerHTML)})}_initImageZoom=()=>{this.zoomTriggers=this.querySelectorAll(this._selectors.zoomTriggers),this.zoomTriggers.length<1||(this.imageZoomModal=this.querySelector(this._selectors.imageZoomModal),this.zoomTriggers.forEach(e=>{e.addEventListener("click",this._openImageZoomModal.bind(this))}))};_initCustomizer(){var e=this.querySelector(this._selectors.customizerInput),t=this.querySelector(this._selectors.customizerText);t&&e.addEventListener("keyup",function(e){e=e.currentTarget;t.innerHTML=e.value})}_openImageZoomModal=e=>{e.preventDefault(),e.stopImmediatePropagation();e=e.currentTarget.getAttribute("data-index"),e=this.imageZoomModal.querySelector(`[data-target="${e}"]`);this.imageZoomModal.open(),e.scrollIntoView()};_renderProductLink=e=>{e.preventDefault();const s=e.currentTarget.href;fetch(""+s).then(e=>e.text()).then(e=>{var e=(new DOMParser).parseFromString(e,"text/html"),t=document.querySelector("s-product"),e=e.querySelector("s-product");t.innerHTML=e.innerHTML,this.connectedCallback(),"product"==this.dataset.template&&window.history.pushState({},"",s)}).catch(e=>{console.error(e)})}}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)}}class StayOnTop extends HTMLElement{constructor(){super()}connectedCallback(){window.scrollTo(0,0)}}class Header extends HTMLElement{constructor(){super(),this._selectors={header:"[js-header]",parentLink:"[js-parent-link]",logo:"[js-logo]",logoIcon:"[js-logo-icon]",cartButton:"[js-cart-button]"}}connectedCallback(){this.header=this.querySelector(this._selectors.header),this._setVariables(),this.logoIcon=this.querySelector(this._selectors.logoIcon),this.cartButton=this.querySelector(this._selectors.cartButton),this.parentLinks=this.querySelectorAll(this._selectors.parentLink),("/"==window.location.pathname||window.location.pathname.includes("blogs")||window.location.pathname.includes("collections")||window.location.pathname.includes("pages")&&window.location.pathname.includes("pages")&&!window.location.pathname.includes("100t-membership")&&!window.location.pathname.includes("100club")&&!window.location.pathname.includes("alterego-lisa"))&&document.addEventListener("scroll",this._headerBackground),document.addEventListener("click",function(e){e.target.closest(this._selectors.cartButton)&&this._toggleCart(e)}.bind(this)),this.parentLinks.forEach(e=>{e.addEventListener("click",this._setActive)})}_setVariables(){document.documentElement.style.setProperty("--header-height",this.header.clientHeight+"px")}_headerBackground=()=>{var e=document.querySelector('[class*="slideshow"]');e&&"/"==window.location.pathname?window.scrollY>e.clientHeight?(this.header.style.backgroundColor="white",this.header.style.color="black",this.logoIcon.classList.remove("logo-white"),this.logoIcon.classList.add("logo-black")):(this.header.style.backgroundColor="",this.header.style.color="white",this.logoIcon.classList.add("logo-white"),this.logoIcon.classList.remove("logo-black")):147<window.scrollY?this.header.style.backgroundColor="white":this.header.style.backgroundColor=""};_toggleCart=e=>{e.stopImmediatePropagation(),e.preventDefault(),theme.utils.toggle(document.body,["mini-cart-is-active"])};_setActive=e=>
62{this.parentLinks.forEach(e=>{e.classList.remove("active")}),e.currentTarget.classList.add("active")}}class Owners extends HTMLElement{constructor(){super(),this._selectors={ownerName:"[js-owner-names]"}}connectedCallback(){this.ownerNames=this.querySelectorAll(this._selectors.ownerName),console.log("this.ownerNames",this.ownerNames),this.ownerNames.forEach(e=>e.addEventListener("mouseover",this._handleOwnerHover.bind(this)))}_handleOwnerHover(e){this.ownerNames.forEach(e=>e.classList.remove("selected")),e.currentTarget.classList.add("selected")}}class SectionSlideshow extends HTMLElement{constructor(){super(),this._selectors={heroCarousel:"hh-slideshow",slideshowTrack:"[js-slideshow-track]",collectionContainers:"[js-collection-container]",collectionSection:"[js-collection-section]"},this._onActiveSlide=e=>{null!=e.detail?.slideIndex&&this._syncCollection(e.detail.slideIndex)}}connectedCallback(){this.heroCarousel=this.querySelector(this._selectors.heroCarousel),this.collectionContainers=this.querySelectorAll(this._selectors.collectionContainers),this.collectionSection=this.querySelector(this._selectors.collectionSection),this.addEventListener("slideshow:active-slide",this._onActiveSlide),this._init()}_init(){var e;this.collectionSection&&this.collectionContainers.length&&(e=this.querySelectorAll(this._selectors.slideshowTrack+" [js-slide]"),(e=Array.from(e).find(e=>"false"===e.getAttribute("aria-hidden")))?(e=parseInt(e.getAttribute("slide-index"),10),this._syncCollection(e)):this._syncCollection(0))}_syncCollection(t){var e;this.collectionContainers.length&&(this.collectionContainers.forEach(e=>{e.style.setProperty("visibility","hidden"),e.style.setProperty("display","none")}),e=Array.from(this.collectionContainers).find(e=>{return parseInt(e.getAttribute("data-index"),10)===t}))&&(e.style.setProperty("visibility","visible"),e.style.setProperty("display","block"))}disconnectedCallback(){this.removeEventListener("slideshow:active-slide",this._onActiveSlide)}}class BlogGrid extends HTMLElement{constructor(){super(),this._selectors={articleGrid:"[js-article-grid]",loadMoreBtn:"[js-load-more-btn]",pageLoading:"[js-pagination-loading]"}}connectedCallback(){this.articleGrid=this.querySelector(this._selectors.articleGrid),this.loadMoreBtn=this.querySelector(this._selectors.loadMoreBtn),this.pageLoading=this.querySelector(this._selectors.pageLoading),this._setListeners()}_setListeners(){this.loadMoreBtn?.addEventListener("click",this._loadNextPage)}_getArticles=e=>{return fetch(e).then(e=>e.text()).then(e=>{return(new DOMParser).parseFromString(e,"text/html")})};_loadNextPage=()=>{(async()=>{this.loadMoreBtn.setAttribute("disabled","");var e=this.loadMoreBtn.dataset.url,e=await this._getArticles(e),t=e.querySelector(this._selectors.articleGrid).innerHTML,e=e.querySelector(this._selectors.loadMoreBtn);this.articleGrid.insertAdjacentHTML("beforeend",t),e?(this.loadMoreBtn.setAttribute("data-url",e.dataset.url),this.loadMoreBtn.blur()):this.loadMoreBtn.remove(),this.loadMoreBtn?.removeAttribute("disabled")})()}}customElements.define("s-collection-grid",CollectionGrid),customElements.define("s-section-slideshow",SectionSlideshow),customElements.define("s-product",ProductMain),customElements.define("product-recommendations",ProductRecommendations),customElements.define("s-header",Header),customElements.define("stay-on-top",StayOnTop),customElements.define("s-owners",Owners),customElements.define("s-blog-grid",BlogGrid);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.