PageSourceSearch

https://recklesshusbands.com.au/cdn/shop/t/28/assets/global.bundle.js?v=141691788837746535341787814151

js recklesshusbands.com.au collected 2026-10-10 02:37:13 UTC 59,121 bytes, 14 lines download raw bytes

vendor: 8,319 bytes, line 1
1var _createClass=(function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(function(){if(typeof window>"u")return;var slice=Array.prototype.slice,matches=Element.prototype.matches||Element.prototype.msMatchesSelector,_focusableElementsString=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),InertRoot=(function(){function InertRoot2(rootElement,inertManager2){_classCallCheck(this,InertRoot2),this._inertManager=inertManager2,this._rootElement=rootElement,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return _createClass(InertRoot2,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(inertNode){this._unmanageNode(inertNode.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(startNode){var _this2=this;composedTreeWalk(startNode,function(node2){return _this2._visitNode(node2)});var activeElement=document.activeElement;if(!document.body.contains(startNode)){for(var node=startNode,root=void 0;node;){if(node.nodeType===Node.DOCUMENT_FRAGMENT_NODE){root=node;break}node=node.parentNode}root&&(activeElement=root.activeElement)}startNode.contains(activeElement)&&(activeElement.blur(),activeElement===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(node){if(node.nodeType===Node.ELEMENT_NODE){var element=node;element!==this._rootElement&&element.hasAttribute("inert")&&this._adoptInertRoot(element),(matches.call(element,_focusableElementsString)||element.hasAttribute("tabindex"))&&this._manageNode(element)}}},{key:"_manageNode",value:function(node){var inertNode=this._inertManager.register(node,this);this._managedNodes.add(inertNode)}},{key:"_unmanageNode",value:function(node){var inertNode=this._inertManager.deregister(node,this);inertNode&&this._managedNodes.delete(inertNode)}},{key:"_unmanageSubtree",value:function(startNode){var _this3=this;composedTreeWalk(startNode,function(node){return _this3._unmanageNode(node)})}},{key:"_adoptInertRoot",value:function(node){var inertSubroot=this._inertManager.getInertRoot(node);inertSubroot||(this._inertManager.setInert(node,!0),inertSubroot=this._inertManager.getInertRoot(node)),inertSubroot.managedNodes.forEach(function(savedInertNode){this._manageNode(savedInertNode.node)},this)}},{key:"_onMutation",value:function(records,self){records.forEach(function(record){var target=record.target;if(record.type==="childList")slice.call(record.addedNodes).forEach(function(node){this._makeSubtreeUnfocusable(node)},this),slice.call(record.removedNodes).forEach(function(node){this._unmanageSubtree(node)},this);else if(record.type==="attributes"){if(record.attributeName==="tabindex")this._manageNode(target);else if(target!==this._rootElement&&record.attributeName==="inert"&&target.hasAttribute("inert")){this._adoptInertRoot(target);var inertSubroot=this._inertManager.getInertRoot(target);this._managedNodes.forEach(function(managedNode){target.contains(managedNode.node)&&inertSubroot._manageNode(managedNode.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(ariaHidden){this._savedAriaHidden=ariaHidden},get:function(){return this._savedAriaHidden}}]),InertRoot2})(),InertNode=(function(){function InertNode2(node,inertRoot){_classCallCheck(this,InertNode2),this._node=node,this._overrodeFocusMethod=!1,this._inertRoots=new Set([inertRoot]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return _createClass(InertNode2,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var element=this._node;this._savedTabIndex!==null?element.setAttribute("tabindex",this._savedTabIndex):element.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete element.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var element=this.node;if(matches.call(element,_focusableElementsString)){if(element.tabIndex===-1&&this.hasSavedTabIndex)return;element.hasAttribute("tabindex")&&(this._savedTabIndex=element.tabIndex),element.setAttribute("tabindex","-1"),element.nodeType===Node.ELEMENT_NODE&&(element.focus=function(){},this._overrodeFocusMethod=!0)}else element.hasAttribute("tabindex")&&(this._savedTabIndex=element.tabIndex,element.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(inertRoot){this._throwIfDestroyed(),this._inertRoots.add(inertRoot)}},{key:"removeInertRoot",value:function(inertRoot){this._throwIfDestroyed(),this._inertRoots.delete(inertRoot),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(tabIndex){this._throwIfDestroyed(),this._savedTabIndex=tabIndex},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),InertNode2})(),InertManager=(function(){function InertManager2(document2){if(_classCallCheck(this,InertManager2),!document2)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=document2,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),addInertStyle(document2.head||document2.body||document2.documentElement),document2.readyState==="loading"?document2.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return _createClass(InertManager2,[{key:"setInert",value:function(root,inert){if(inert){if(this._inertRoots.has(root))return;var inertRoot=new InertRoot(root,this);if(root.setAttribute("inert",""),this._inertRoots.set(root,inertRoot),!this._document.body.contains(root))for(var parent=root.parentNode;parent;)parent.nodeType===11&&addInertStyle(parent),parent=parent.parentNode}else{if(!this._inertRoots.has(root))return;var _inertRoot=this._inertRoots.get(root);_inertRoot.destructor(),this._inertRoots.delete(root),root.removeAttribute("inert")}}},{key:"getInertRoot",value:function(element){return this._inertRoots.get(element)}},{key:"register",value:function(node,inertRoot){var inertNode=this._managedNodes.get(node);return inertNode!==void 0?inertNode.addInertRoot(inertRoot):inertNode=new InertNode(node,inertRoot),this._managedNodes.set(node,inertNode),inertNode}},{key:"deregister",value:function(node,inertRoot){var inertNode=this._managedNodes.get(node);return inertNode?(inertNode.removeInertRoot(inertRoot),inertNode.destroyed&&this._managedNodes.delete(node),inertNode):null}},{key:"_onDocumentLoaded",value:function(){var inertElements=slice.call(this._document.querySelectorAll("[inert]"));
1inertElements.forEach(function(inertElement){this.setInert(inertElement,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(records,self){var _this=this;records.forEach(function(record){switch(record.type){case"childList":slice.call(record.addedNodes).forEach(function(node){if(node.nodeType===Node.ELEMENT_NODE){var inertElements=slice.call(node.querySelectorAll("[inert]"));matches.call(node,"[inert]")&&inertElements.unshift(node),inertElements.forEach(function(inertElement){this.setInert(inertElement,!0)},_this)}},_this);break;case"attributes":if(record.attributeName!=="inert")return;var target=record.target,inert=target.hasAttribute("inert");_this.setInert(target,inert);break}},this)}}]),InertManager2})();function composedTreeWalk(node,callback,shadowRootAncestor){if(node.nodeType==Node.ELEMENT_NODE){var element=node;callback&&callback(element);var shadowRoot=element.shadowRoot;if(shadowRoot){composedTreeWalk(shadowRoot,callback,shadowRoot);return}if(element.localName=="content"){for(var content=element,distributedNodes=content.getDistributedNodes?content.getDistributedNodes():[],i=0;i<distributedNodes.length;i++)composedTreeWalk(distributedNodes[i],callback,shadowRootAncestor);return}if(element.localName=="slot"){for(var slot=element,_distributedNodes=slot.assignedNodes?slot.assignedNodes({flatten:!0}):[],_i=0;_i<_distributedNodes.length;_i++)composedTreeWalk(_distributedNodes[_i],callback,shadowRootAncestor);return}}for(var child=node.firstChild;child!=null;)composedTreeWalk(child,callback,shadowRootAncestor),child=child.nextSibling}function addInertStyle(node){if(!node.querySelector("style#inert-style, link#inert-style")){var style=document.createElement("style");style.setAttribute("id","inert-style"),style.textContent=`
2[inert] {
3  pointer-events: none;
4  cursor: default;
5}
6
7[inert], [inert] * {
8  -webkit-user-select: none;
9  -moz-user-select: none;
10  -ms-user-select: none;
11  user-select: none;
12}
13`,node.appendChild(style)}}if(!HTMLElement.prototype.hasOwnProperty("inert")){var inertManager=new InertManager(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(inert){inertManager.setInert(this,inert)}})}})();import{Alpine as Alpine2,AlpinePlugins}from"vendor";function fetched_fragment_default(Alpine3){Alpine3.magic("fetchedFragment",(el,{Alpine:Alpine4,evaluateLater})=>(url,selector,loadingClasses=null,forceFresh=!1)=>{let classNames;return loadingClasses&&(classNames=loadingClasses.split(/\s+/g),el.classList.add(...classNames)),async()=>{const html=await fetchHTMLFragment(url,selector,forceFresh);return Alpine4.$data(el).$nextTick(()=>{classNames&&el.classList.remove(...classNames)}),html}})}function html_if_set_default(Alpine3){Alpine3.directive("html-if-set",(el,{modifiers,expression},{effect,evaluateLater})=>{let evaluate=evaluateLater(expression),useEmpty=modifiers.includes("use-empty");function saveInitialHTML(){el._x_custom_initialHTML=el.innerHTML}function getInitialHTML(){return el._x_custom_initialHTML}effect(()=>{let newHTML;evaluate(value=>{value?(newHTML=value,getInitialHTML()||saveInitialHTML()):useEmpty&&value===""?newHTML=value:getInitialHTML()&&(newHTML=getInitialHTML()),(newHTML||useEmpty&&newHTML==="")&&Alpine3.mutateDom(()=>{el.innerHTML=newHTML,el._x_ignoreSelf=!0,Alpine3.initTree(el),delete el._x_ignoreSelf})})})})}var modals_default={leftDrawer:{open:!1,contents:""},rightDrawer:{open:!1,contents:""},modal:{open:!1,contents:""},popup:{open:!1,contents:""},modals:{},register(name,slotName){this.modals[name]=slotName,this.setUpHide(slotName)},async open(name){if(this.modals[name]){const slotName=this.modals[name];if(this[slotName].contents===name&&this[slotName].open===!0)return;document.body.dispatchEvent(new CustomEvent(`${kebabCase(name)}-will-open`,{bubbles:!0})),document.body.dispatchEvent(new CustomEvent(`${kebabCase(slotName)}-will-open`,{bubbles:!0})),this[slotName].contents=name,this[slotName].open=!0,await Alpine.nextTick(),await Alpine.nextTick();const dispatchOpenEvents=()=>{document.body.dispatchEvent(new CustomEvent(`${kebabCase(name)}-is-open`,{bubbles:!0})),document.body.dispatchEvent(new CustomEvent(`${kebabCase(slotName)}-is-open`,{bubbles:!0}))};try{const slotEl=document.getElementById(`${kebabCase(slotName)}-slot`),transitionEl=slotEl.hasAttribute("x-show")?slotEl:slotEl.closest("[x-show]");await Promise.all(transitionEl.getAnimations().map(animation=>animation.finished)),dispatchOpenEvents()}catch{dispatchOpenEvents()}}},close(nameOrSlotName){let name,slotName;this.modals[nameOrSlotName]?(name=nameOrSlotName,slotName=this.modals[nameOrSlotName]):(name=this[nameOrSlotName].contents,slotName=nameOrSlotName),!(this[slotName].contents!==name||this[slotName].open!==!0)&&(document.body.dispatchEvent(new CustomEvent(`${kebabCase(name)}-will-close`,{bubbles:!0})),document.body.dispatchEvent(new CustomEvent(`${kebabCase(slotName)}-will-close`,{bubbles:!0})),this[slotName].open=!1)},setUpHide(slotName){const slotEl=document.getElementById(`${kebabCase(slotName)}-slot`),transitionEl=slotEl.hasAttribute("x-show")?slotEl:slotEl.closest("[x-show]");transitionEl&&(transitionEl._x_doHide=()=>{Alpine.mutateDom(()=>{transitionEl.style.setProperty("display","none")});const name=Alpine.store("modals")[slotName].contents;Alpine.store("modals")[slotName].contents="",document.body.dispatchEvent(new CustomEvent(`${kebabCase(name)}-is-closed`,{bubbles:!0})),document.body.dispatchEvent(new CustomEvent(`${kebabCase(slotName)}-is-closed`,{bubbles:!0}))})}
13,closeAll(){Object.keys(this.modals).forEach(modal=>{Alpine.store("modals").close(modal)})},isRegistered(name){return!!this.modals[name]},isOpen(name){if(Object.keys(this.modals).includes(name)){const slotName=this.modals[name];if(this[slotName].contents===name&&this[slotName].open)return!0}return!1}},cart_count_default={count:window.theme&&window.theme.cartItemCount||0,init(){window.addEventListener("shapes:cart:afteradditem",e=>{this._setFromFetchedSection(e.detail.response)}),window.addEventListener("shapes:cart:cartqtychange",e=>{this._setFromFetchedSection(e.detail.response)}),window.addEventListener("shapes:cart:update",e=>{this._setFromFetchedSection(e.detail.response)})},_setFromFetchedSection(data){const countSectionHTML=data.sections["cart-item-count"];this.count=parseInt(parseDOMFromString(countSectionHTML).firstElementChild.innerText.trim(),10),window.theme.cartItemCount=this.count},countWithText(){let string=theme.strings.itemCountOther;return this.count===1&&(string=theme.strings.itemCountOne),string.replace("{{ count }}",this.count)}},age_check_default=({mode,dateFormat,minimumAge,redirectURL,enabled})=>({authenticated:!1,mode,dateFormat,minimumAge,redirectURL,month:"",day:"",year:"",date:"",enabled,sectionId:null,storageKey:null,get fullDate(){return`${this.month}/${this.day}/${this.year}`},init(){this.sectionId=getSectionId(this.$root),this.storageKey=`switch-age-check-${this.sectionId}`,window.location.pathname!=="/challenge"&&(initTeleport(this.$root),Shopify.designMode&&Alpine.store("modals").isRegistered("ageCheck")||Alpine.store("modals").register("ageCheck","modal"),Shopify.designMode?(window.theme.designMode.selected===this.sectionId&&(this.enabled===!0?Alpine.store("modals").open("ageCheck"):Alpine.store("modals").close("ageCheck")),document.addEventListener("shopify:section:select",this.onSectionSelect.bind(this)),document.addEventListener("shopify:section:deselect",this.onSectionDeselect.bind(this))):getExpiringStorageItem(this.storageKey)!=="approved"&&Alpine.store("modals").open("ageCheck"),this.redirectURL||(this.redirectURL="https://www.google.com"),this.mode==="dob"&&(this.date=new Date,setTimeout(()=>this.setUpDOB(),100)))},onSectionSelect(e){e.target.contains(this.$root)&&this.enabled&&(Alpine.store("modals").isOpen("ageCheck")||Alpine.store("modals").open("ageCheck"))},onSectionDeselect(e){e.target.contains(this.$root)&&this.$store.modals.close("ageCheck")},approveEntry(){Alpine.store("modals").close("ageCheck"),Shopify.designMode||setExpiringStorageItem(this.storageKey,"approved",daysInMs(30))},denyEntry(){window.location=this.redirectURL},checkInput(name){switch(name){case"day":return parseInt(this.day)>0&&parseInt(this.day)<32;case"month":return parseInt(this.month)>0&&parseInt(this.month)<13;case"year":return parseInt(this.year)<this.date.getFullYear()&&parseInt(this.year)>1900}return!0},checkAge(){const currentDate=Math.round(this.date.getTime()/1e3),enteredDate=Math.round(new Date(`${this.fullDate}`).getTime()/1e3);Math.floor((currentDate-enteredDate)/31536e3)>parseInt(this.minimumAge,10)?this.approveEntry():this.denyEntry()},setUpDOB(){document.getElementById(`dob-form-${this.sectionId}`).addEventListener("input",e=>{const target=e.srcElement||e.target,maxLength=parseInt(target.attributes.maxlength.value,10),targetLength=target.value.length;if(targetLength>=maxLength){if(!this.checkInput(target.getAttribute("name")))return target.value="",!1;let next=target.closest(".input-grid-item");for(;(next=next.nextElementSibling)&&next!=null;){let input=next.querySelector("input");if(input!==null){input.focus();break}}}else if(targetLength===0){let previous=target.closest(".input-grid-item");for(;(previous=previous.previousElementSibling)&&previous!=null;){const input=previous.querySelector("input");if(input!==null){input.focus();break}}}this.checkInput("day")&&this.checkInput("month")&&this.checkInput("year")&&setTimeout(()=>this.checkAge(),500)})},destroy(){document.removeEventListener("shopify:section:select",this.onSectionSelect),document.removeEventListener("shopify:section:deselect",this.onSectionDeselect)}}),cart_items_default=()=>({itemsRoot:null,loading:null,init(){this.itemsRoot=this.$root,window.addEventListener("shapes:cart:afteradditem",this.onCartQuantityChange.bind(this)),window.addEventListener("shapes:cart:cartqtychange",this.onCartQuantityChange.bind(this)),window.addEventListener("shapes:cart:update",this.onCartQuantityChange.bind(this)),document.addEventListener("shapes:cart:lock",()=>{this.loading=!0}),document.addEventListener("shapes:cart:unlock",()=>{this.loading=!1})},onCartQuantityChange(e){Alpine.morph(this.itemsRoot,querySelectorInHTMLString("[data-cart-items]",e.detail.response.sections["cart-items"]).outerHTML),this.$nextTick(()=>{this.itemsRoot.querySelectorAll("input").forEach(inputEl=>{inputEl.value=inputEl.getAttribute("value"),inputEl.dispatchEvent(new Event("input"))})}),this.updateLiveRegion(parseDOMFromString(e.detail.response.sections["cart-live-region"]).firstElementChild.textContent),e.detail.originalTarget&&this.$nextTick(()=>
13{if(!this.itemsRoot.contains(e.detail.originalTarget)){let focusRoot;this.itemsRoot.closest('[role="dialog"]')?focusRoot=this.itemsRoot.closest('[role="dialog"]').parentNode:focusRoot=this.itemsRoot,this.$focus.within(focusRoot).first()}});const itemsRootEl=this.itemsRoot;switch(e.type){case"shapes:cart:afteradditem":document.dispatchEvent(new CustomEvent("theme:product:add",{detail:{cartItemCount:window.theme.cartItemCount,itemsRootEl,lineItemEl:document.querySelector(`[data-line-item-key="${e.detail.response.key}"]`)||null,variantId:e.detail.response.variant_id,key:e.detail.response.key,formEl:document.getElementById(e.detail.sourceId),get cartPromise(){return fetch(window.theme.routes.cart_url,fetchConfigDefaults()).then(res=>res.json()).then(cart=>cart).catch(error=>console.error("Error fetching cart in `theme:product:add`",error))}}}));break;case"shapes:cart:cartqtychange":document.dispatchEvent(new CustomEvent("theme:line-item:change",{detail:{cartItemCount:e.detail.response.item_count,itemsRootEl,lineItemEl:document.querySelector(`[data-line-item-key="${e.detail.key}
13"]`)||null,variantId:e.detail.variantId,key:e.detail.key,quantity:e.detail.quantity,previousQuantity:e.detail.previousQuantity,cart:e.detail.response}}));break;case"shapes:cart:update":document.dispatchEvent(new CustomEvent("theme:cart:update",{detail:{cartItemCount:window.theme.cartItemCount,itemsRootEl,get cartPromise(){return fetch(window.theme.routes.cart_url,fetchConfigDefaults()).then(res=>res.json()).then(cart=>cart).catch(error=>console.error("Error fetching cart in `theme:cart:update`",error))}}}));break}},updateLiveRegion(liveRegionText){if(!liveRegionText)return;const cartStatus=document.getElementById("cart-live-region-text");cartStatus.textContent=liveRegionText,cartStatus.setAttribute("aria-hidden",!1),setTimeout(()=>{cartStatus.setAttribute("aria-hidden",!0)},1e3)}}),cart_item_default=key=>({quantity:null,previousQuantity:null,key,locked:!1,errorMessage:null,init(){document.addEventListener("shapes:cart:lock",()=>{this.locked=!0}),document.addEventListener("shapes:cart:unlock",()=>{this.locked=!1})},async itemQuantityChange(){if(this.locked||this.loading||this.$refs.quantityInput.hasAttribute("data-last-value")&&this.quantity===Number(this.$refs.quantityInput.dataset.lastValue))return;this.locked=!0,this.loading=!0;const request={...fetchConfigDefaults("application/javascript"),body:JSON.stringify({id:this.key,quantity:this.quantity,sections:"cart-items,cart-footer,cart-item-count,cart-live-region",sections_url:window.location.pathname})};try{const data=await(await fetch(theme.routes.cart_change_url,request)).json();data.status?(this.errorMessage=data.message,this.quantity=this.previousQuantity,document.dispatchEvent(new CustomEvent("theme:line-item:error",{detail:{message:this.errorMessage,itemsRootEl:this.itemsRoot,lineItemEl:document.querySelector(`[data-line-item-key="${this.key}"]`)||null,variantId:Number(this.$refs.quantityInput.dataset.variantId),key:this.key,quantity:this.quantity}}))):(this.errorMessage=null,document.body.dispatchEvent(new CustomEvent("shapes:cart:cartqtychange",{bubbles:!0,detail:{response:data,key:this.key,quantity:this.quantity,previousQuantity:this.previousQuantity,variantId:Number(this.$refs.quantityInput.dataset.variantId),originalTarget:this.$refs.quantityControl}})))}catch(e){console.error(e),document.getElementById("cart-errors").textContent=theme.strings.cartError,document.dispatchEvent(new CustomEvent("theme:cart:error:other",{detail:{message:theme.strings.cartError,error:e}}))}finally{this.locked=!1,this.loading=!1}},removeItem(){Array.from(this.$root.querySelectorAll('[x-data="CartItemQuantity"]')).filter(el=>el.offsetParent)[0].dispatchEvent(new CustomEvent("remove"))}}),quantity_default={adjustQuantity(adjustCb){typeof this.previousQuantity<"u"&&(this.previousQuantity=this.quantity);const quantityBeforeAdjustment=this.quantity;adjustCb(),this.dispatchInputEvent(),this.quantity!==quantityBeforeAdjustment&&this.$nextTick(()=>{this.dispatchChangeEvent()})},increment(){this.adjustQuantity(()=>{this.$refs.quantityInput.stepUp()})},decrement(){this.adjustQuantity(()=>{this.$refs.quantityInput.stepDown()})},dispatchInputEvent(){this.$refs.quantityInput.dispatchEvent(new Event("input"))},dispatchChangeEvent(){this.$refs.quantityInput.dispatchEvent(new Event("change"))}},cart_item_quantity_default=()=>({remove(){this.adjustQuantity(()=>{this.$refs.quantityInput.value=0})},...quantity_default}),cart_footer_default=()=>({footerRoot:null,_morphFooter(e){const newFooterSection=querySelectorInHTMLString("[data-cart-footer]",e.detail.response.sections["cart-footer"]);Alpine.morph(this.footerRoot,newFooterSection?newFooterSection.outerHTML:"",{updating(el,toEl,childrenOnly,skip){el.classList&&el.classList.contains("additional-checkout-buttons")&&skip()}})},init(){this.footerRoot=this.$root,window.addEventListener("shapes:cart:afteradditem",e=>{this._morphFooter(e)}),window.addEventListener("shapes:cart:cartqtychange",e=>{this._morphFooter(e)}),window.addEventListener("shapes:cart:update",e=>{this._morphFooter(e)})}}),cart_note_default=()=>({updating:!1,updateNote(){this.updating=!0,fetch(theme.routes.cart_update_url,{method:"POST",body:JSON.stringify({note:this.$el.value}),credentials:"same-origin",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;",Accept:"application/json"}}).then(()=>{this.updating=!1})}}),header_default=count=>({menuOpen:{},searchOpen:!1,headerIsSticky:!1,scrollY:0,navWrapped:!1,headerHeight:0,activeWrappedMenuToggleEl:null,get isStuck(){return this.headerIsSticky&&this.scrollY>this.headerHeight*2},get menuIsActive(){return!Object.keys(this.menuOpen).every(k=>!this.menuOpen[k])},get headerIsActive(){return this.menuIsActive||this.searchOpen},init(){Alpine.store("modals").register("nav","leftDrawer");for(let i=0;i<parseInt(count);i++)this.menuOpen["menu"+i]=!1;document.addEventListener("keyup",this.keyUpListener.bind(this)),document.body.addEventListener("shapes:search:closebutton",this.searchCloseButtonListener.bind(this)),this.$root.hasAttribute("data-sticky-header")&&this.setUpStickyDetection(),this.headerResizeFunctions(),this._debouncedHeaderFunctions=debounce(this.headerResizeFunctions.bind(this),300),window.addEventListener("resize",this._debouncedHeaderFunctions),Shopify.designMode&&document.addEventListener("shopify:section:load",this.sectionLoadListener.bind(this)),this.$watch("menuIsActive",value=>{!value&&this.activeWrappedMenuToggleEl&&(this.activeWrappedMenuToggleEl=null)}),this.$watch("navWrapped",value=>{value&&(this.activeWrappedMenuToggleEl=null)})},headerResizeFunctions(){this.calculateHeaderHeight(),this.calculateNavWrap()},setUpStickyDetection(){const headerContainerEl=this.$root.closest(".shopify-section"),sentinelEl=document.createElement("div");sentinelEl.setAttribute("id","HeaderSentinel"),headerContainerEl.parentNode.insertBefore(sentinelEl,headerContainerEl),new IntersectionObserver(e=>{e.forEach(entry=>{this.headerIsSticky=entry.intersectionRatio<1})},{rootMargin:"-1px 0px 0px 0px",threshold:[1]}).observe(sentinelEl);let timer=null;const checkScrollPosition=e=>{this.scrollY=window.scrollY,timer!==null&&clearTimeout(timer),timer=setTimeout(()=>{this.scrollY=window.scrollY},150)};this._throttledScrollHandler=throttle(checkScrollPosition,150),window.addEventListener("scroll",this._throttledScrollHandler.bind(this),{passive:!0}),this.scrollY=window.scrollY},calculateNavWrap(){const wrappedItems=[];let prevItemRect={},currItemRect={};if(this.$refs.navigation!==void 0){const items=this.$refs.navigation.children;for(let i=0;i<items.length;i++){const currItem=items[i];window.requestAnimationFrame(()=>{currItemRect=currItem.getBoundingClientRect(),prevItemRect&&prevItemRect.top<currItemRect.top&&wrappedItems.push(items[i]),prevItemRect=currItemRect,i===items.length-1&&(wrappedItems.length>0?this.navWrapped=!0:this.navWrapped=!1)})}}},calculateHeaderHeight(){window.requestAnimationFrame(()=>{this.headerHeight=document.getElementById("headerBorderWrap").clientHeight,document.documentElement.style.setProperty("--header-height",`${this.headerHeight}px`)})},toggleMenu(index){this.menuOpen["menu"+index]=!this.menuOpen["menu"+index]},focusOut(event,menu){if(event.relatedTarget){let focusedOnTopLevelButton=!1,dropdownParent=event.relatedTarget.getAttribute("data-dropdown-parent");dropdownParent&&dropdownParent===menu&&(focusedOnTopLevelButton=!0);const focusedOnChild=event.relatedTarget.closest("[data-header-dropdown]");!focusedOnTopLevelButton&&!focusedOnChild&&(this.menuOpen[menu]=!1)}},searchFocusOut(){this.$nextTick(()=>{this.$refs.searchFieldComponent.contains(document.activeElement)||(this.searchOpen=!1)})},closeSearch(){this.searchOpen=!1,this.$refs.search.focus()},openSearch(){this.searchOpen=!0;let input=document.querySelector(".header-search-input");setTimeout(()=>{input.focus()},100)},keyUpListener(event){if(event.key==="Escape")if(this.searchOpen===!1)for(let i=0;i<dropdownCount;i++)this.menuOpen["menu"+i]===!0&&(this.menuOpen["menu"+i]=!1,document.querySelector(`[aria-controls="menu${i}"]`).focus());else document.getElementById("predictiveSearchResults")||document.body.dispatchEvent(new CustomEvent("shapes:search:closebutton"))},searchCloseButtonListener(){this.searchOpen=!1,this.$nextTick(()=>{const searchToggleEl=this.$root.querySelector("[data-open-search]");searchToggleEl&&setTimeout(()=>
13{searchToggleEl.focus()},300)})},sectionLoadListener(event){event.target.querySelector(".site-header")&&this.headerResizeFunctions()},destroy(){document.removeEventListener("keyup",this.keyUpListener),document.body.removeEventListener("shapes:search:closebutton",this.searchCloseButtonListener),window.removeEventListener("resize",this._debouncedHeaderFunctions),window.removeEventListener("scroll",this._throttledScrollHandler),Shopify.designMode&&document.removeEventListener("shopify:section:load",this.sectionLoadListener)}}),predictive_search_default=resources=>({cachedResults:{},loading:!1,resultsOpen:!1,rawQuery:"",results:!1,resultsMarkup:null,resources,get trimmedQuery(){return this.rawQuery.trim()},get queryKey(){return this.trimmedQuery.replace(" ","-").toLowerCase()},init(){this.cachedResults={},document.querySelectorAll("[data-open-search]").forEach(toggle=>{toggle.setAttribute("role","button")}),this.$watch("searchOpen",value=>{value===!0&&this.onOpen()})},close(clearSearchTerm=!0){this.closeResults(clearSearchTerm),this.closePredictiveSearch()},closePredictiveSearch(){document.body.dispatchEvent(new CustomEvent("shapes:search:closebutton"))},closeResults(clearSearchTerm=!1){this.resultsOpen=!1,clearSearchTerm&&(this.rawQuery="");const selected=this.$root.querySelector('[aria-selected="true"]');selected&&selected.setAttribute("aria-selected",!1),this.$refs.input.setAttribute("aria-activedescendant",""),this.$refs.input.setAttribute("aria-expanded",!1),document.documentElement.style.overflowY="auto"},getSearchResults(){this.loading=!0,liveRegion(window.theme.strings.loading),fetch(`${window.theme.routes.predictive_search_url}?q=${encodeURIComponent(this.trimmedQuery)}&${encodeURIComponent("resources[type]")}=${this.resources}&section_id=predictive-search`).then(response=>{if(this.loading=!1,!response.ok){var error=new Error(response.status);throw this.close(!0),error}return response.text()}).then(text=>{this.results=!0;const resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-predictive-search").innerHTML,liveRegionText=new DOMParser().parseFromString(text,"text/html").querySelector("#predictive-search-count").textContent;this.cachedResults[this.queryKey]=resultsMarkup,this.renderSearchResults(resultsMarkup),liveRegion(liveRegionText)}).catch(error=>{throw this.close(!0),error})},onChange(){this.trimmedQuery.length?(this.openResults(),this.getSearchResults()):this.closeResults()},onFocus(){this.trimmedQuery.length&&(this.results===!0?this.openResults():this.getSearchResults())},onFormSubmit(){(!this.trimmedQuery.length||this.$root.querySelector('[aria-selected="true"] a'))&&this.$event.preventDefault()},onKeyup(){switch(this.$event.preventDefault(),this.$event.code){case"ArrowUp":this.switchOption("up");break;case"ArrowDown":this.switchOption("down");break;case"Enter":this.selectOption();break}},onKeydown(){this.$event.code==="Escape"&&this.trimmedQuery.length&&this.$event.preventDefault(),(this.$event.code==="ArrowUp"||this.$event.code==="ArrowDown"||this.$event.code==="Enter"&&this.selectedElement)&&this.$event.preventDefault()},onOpen(){this.trimmedQuery.length&&(this.openResults(),this.$nextTick(()=>{this.cachedResults[this.queryKey]?this.renderSearchResults(this.cachedResults[this.queryKey]):this.getSearchResults()}))},openResults(){this.resultsOpen=!0,this.$refs.input.setAttribute("aria-expanded",!0),document.documentElement.style.overflowY="hidden"},renderSearchResults(resultsMarkup){this.$refs.results.innerHTML=resultsMarkup,this.results=!0,this.openResults()},selectOption(){const selectedProduct=this.$root.querySelector('[aria-selected="true"] a, [aria-selected="true"] button');selectedProduct&&selectedProduct.click()},switchOption(direction){if(!this.resultsOpen)return;const moveUp=direction==="up",selectedElement=this.$root.querySelector('[aria-selected="true"]'),allElements=Array.from(this.$root.querySelectorAll(".predictive-search__option"));let activeElement=this.$root.querySelector(".predictive-search__option");moveUp&&!allElements.length||(!moveUp&&selectedElement?activeElement=allElements[allElements.indexOf(selectedElement)+1]||allElements[0]:moveUp&&(activeElement=allElements[allElements.indexOf(selectedElement)-1]||allElements[allElements.length-1]),activeElement!==selectedElement&&(activeElement.setAttribute("aria-selected",!0),selectedElement&&selectedElement.setAttribute("aria-selected",!1),this.$refs.input.setAttribute("aria-activedescendant",activeElement.id),activeElement.scrollIntoView(!1,{behavior:"smooth"}
13)))}}),video_default=(playback="inline",mode="preview")=>({player:null,enabled:!1,shown:!1,playing:!1,id:"",playback,mode,init(){this.id=this.$root.id,document.body.addEventListener("pauseAllMedia",e=>{this.mode==="autoplay"||e.detail!==null&&e.detail.id===this.$root.id||this.pause()}),this.$watch("enabled",async value=>{await this.$nextTick(),this.shown=value,value===!0&&(this.player=this.$root.querySelector("[\\@play][\\@pause]"),this.player.addEventListener("playing",()=>{this.playing=!0}),this.player.addEventListener("paused",()=>{this.playing=!1}))}),this.$watch("playing",value=>{value===!0&&this.dispatchPauseAllMediaEvent()}),this.productMediaWrapper=this.$root.closest("[data-product-single-media-wrapper]"),this.productMediaWrapper&&this.setUpProductMediaListeners(),this.mode==="autoplay"&&(this.enabled=!0)},dispatchPauseAllMediaEvent(){document.body.dispatchEvent(new CustomEvent("pauseAllMedia",{detail:{id:this.$root.id}}))},play(){this.enabled===!1||this.player===null||this.player.dispatchEvent(new CustomEvent("play"))},pause(){this.enabled===!1||this.player===null||this.player.dispatchEvent(new CustomEvent("pause"))},setUpProductMediaListeners(){this.productMediaWrapper.addEventListener("mediaHidden",()=>{this.pause()}),this.productMediaWrapper.addEventListener("mediaVisible",()=>{})}}),html_video_default=()=>({init(){this.$refs.video.addEventListener("play",()=>{this.$root.dispatchEvent(new CustomEvent("playing",{bubbles:!0}))}),this.$refs.video.addEventListener("pause",()=>{this.$root.dispatchEvent(new CustomEvent("paused",{bubbles:!0}))}),this.$refs.video.autoplay&&this.$nextTick(()=>{this.$refs.video.play()})},play(){this.$refs.video.play()},pause(){this.$refs.video.pause()}}),product_thumbnails_default=()=>({firstVisible:!0,lastVisible:!1,init(){const firstThumbnail=this.$refs.firstThumbnail,lastThumbnail=this.$refs.lastThumbnail,options={root:this.$root.querySelector(".splide__track"),rootMargin:"0px",threshold:1},firstThumbnailObserver=new window.IntersectionObserver(([entry])=>{entry.isIntersecting?this.firstVisible=!0:this.firstVisible=!1},options),lastThumbnailObserver=new window.IntersectionObserver(([entry])=>{entry.isIntersecting?this.lastVisible=!0:this.lastVisible=!1},options);firstThumbnailObserver.observe(firstThumbnail),lastThumbnailObserver.observe(lastThumbnail)}}),filterable_default=()=>({focusId:"",filterData:[],sectionId:null,init(){this.sectionId=getSectionId(this.$root),initTeleport(this.$root),Alpine.store("modals").register("filters","leftDrawer"),Alpine.store("modals").register("sort","rightDrawer"),window.addEventListener("popstate",this.onHistoryChange.bind(this)),this._observeResultsMutations()},filterFormSubmit(e,close){this.focusId=e.target.id,close&&Alpine.store("modals").close(close);let form=e.target.form;e.target.tagName.toLowerCase()==="form"&&(form=e.target);const formData=new FormData(form),searchParams=new URLSearchParams(formData);searchParams.delete("price_range"),this.renderPage(searchParams.toString(),e)},clearAllFilters(e){Alpine.store("modals").close("filters"),this.renderPage(new URL(e.currentTarget.href).searchParams.toString())},renderPage(searchParams,event,updateURLHash=!0){document.getElementById("facets-results").classList.add("opacity-50");const url=`${window.location.pathname}?section_id=${this.sectionId}&${searchParams}`,filterDataUrl=element=>element.url===url;this.filterData.some(filterDataUrl)?this.renderFromCache(filterDataUrl,event):this.renderFromFetch(url,event),updateURLHash&&this.updateURLHash(searchParams)},renderFromFetch(url,event){fetch(url).then(response=>response.text()).then(responseText=>{const html=responseText;this.filterData=[...this.filterData,{html,url}],this.renderMarkup(html)})},renderFromCache(filterDataUrl,event){const html=this.filterData.find(filterDataUrl).html;this.renderMarkup(html)},renderMarkup(html){const parsed=new DOMParser().parseFromString(html,"text/html"),innerHTML=parsed.getElementById("facets-filterable").innerHTML,filterableEl=document.getElementById("facets-filterable");innerHTML!==filterableEl.innerHTML?(filterableEl.closest(".shopify-section").dispatchEvent(new CustomEvent("shapes:section:willmutate",{bubbles:!0})),setTimeout(()=>{filterableEl.querySelectorAll("[x-teleport]").forEach(el=>{el.remove()}),filterableEl.innerHTML=innerHTML,this.$nextTick(()=>{initTeleport(filterableEl)})},300)):document.getElementById("facets-results").classList.remove("opacity-50");const count=parsed.getElementById("facets-results-count").innerHTML;liveRegion(count),document.getElementById(this.focusId)&&setTimeout(()=>{document.getElementById(this.focusId).focus()},50)},updateURLHash(searchParams){history.pushState({searchParams},"",`${window.location.pathname}${searchParams&&"?".concat(searchParams)}`)},onHistoryChange(event){const searchParams=event.state.searchParams||"";this.renderPage(searchParams,null,!1)},_observeResultsMutations(){const containerEl=document.getElementById("facets-filterable"),mutationObserverOptions={childList:!0,attributes:!1,subtree:!1},callback=(mutationList,observer)=>{mutationList.forEach(mutation=>{mutation.type==="childList"&&mutation.target.closest(".shopify-section").dispatchEvent(new CustomEvent("shapes:section:hasmutated",{bubbles:!0}))})};new MutationObserver(callback).observe(containerEl,mutationObserverOptions)}}),quantity_default2=()=>({quantity:null,...quantity_default}),modal_cart_default=({openOnAddToCart})=>({init(){openOnAddToCart===!0&&document.body.addEventListener("shapes:cart:afteradditem",()=>{Alpine.store("modals").open("cart")}),Alpine.store("modals").register("cart","rightDrawer")}}),rte_default=()=>({init(){this.$root.querySelectorAll("table").forEach(tableEl=>{wrap(tableEl).classList.add("table-wrapper")}),this.$root.querySelectorAll('iframe[src*="youtube.com"],iframe[src*="player.vimeo"]').forEach(extVideoEl=>{wrap(extVideoEl).classList.add("video-wrapper")})}}),shape_divider_default=()=>({_debouncedResizeHandler:null,init(){const resizeHandler=e=>{this.$refs["animation-container"].style.display="none",this.$refs["animation-container"].style.animation="none",this.$refs["animation-container"].offsetHeight,this.$refs["animation-container"].style.display="",setTimeout(()=>{this.$refs["animation-container"].style.animation=null},100)};this._debouncedResizeHandler=debounce(resizeHandler,150),window.addEventListener("resize",this._debouncedResizeHandler.bind(this))},destroy(){window.removeEventListener("resize",this._debouncedResizeHandler)}}),free_shipping_bar_default=()=>
13({contentHTML:null,styleString:null,init(){this.updateStyleString(this.$root),window.addEventListener("shapes:cart:afteradditem",this.onCartUpdate.bind(this)),window.addEventListener("shapes:cart:cartqtychange",this.onCartUpdate.bind(this)),window.addEventListener("shapes:cart:update",this.onCartUpdate.bind(this))},async onCartUpdate(){const updatedSection=await freshHTML(getURLWithParams(window.theme.routes.root_url,{section_id:this.$root.id})),updatedRoot=querySelectorInHTMLString('[x-data="FreeShippingBar"]',updatedSection);this.updateStyleString(updatedRoot),this.contentHTML=updatedRoot.querySelector("[data-content]").innerHTML},updateStyleString(el){this.$root.hasAttribute("style")&&(this.styleString=el.style.cssText)}}),offset_gallery_item_default=()=>({tabIndex:-1,init(){new IntersectionObserver(([entry])=>{if(entry.isIntersecting){this.tabIndex=0;return}this.isVisible=-1},{root:null,threshold:0}).observe(this.$root)},focused(){const containerEl=this.$el.closest(".offset-gallery-container");containerEl.scrollTop=0,containerEl.scrollLeft=0}}),tiktok_embed_default=tikTokURL=>({tikTokURL,async init(){try{const data=await(await fetch(`https://www.tiktok.com/oembed?url=${encodeURIComponent(this.tikTokURL)}`)).json(),rootElement=this.$el;if(rootElement){rootElement.innerHTML=data.html;const scripts=rootElement.getElementsByTagName("script");for(let i=0;i<scripts.length;i++){const script=document.createElement("script");scripts[i].src?script.src=scripts[i].src:script.textContent=scripts[i].textContent,document.body.appendChild(script)}}}catch(error){console.error("Error fetching TikTok embed code:",error)}}}),async_script_loader_default=()=>({init(){const scripts=this.$refs.scripts.content.querySelectorAll("script");for(let i=0;i<scripts.length;i++){const script=document.createElement("script");scripts[i].src?script.src=scripts[i].src:script.textContent=scripts[i].textContent,document.body.appendChild(script)}}}),focus_carousel_default=splideID=>({slideIndex:0,isTransitioning:!1,splideID,init(){window.addEventListener("switch:focus-carousel:move",event=>{const{splideID:splideID2}=event.detail;this.splideID===splideID2&&(this.isTransitioning=!0)}),window.addEventListener("switch:focus-carousel:moved",event=>{const{splideID:splideID2,newIndex}=event.detail;this.splideID===splideID2&&(this.isTransitioning=!1,this.slideIndex=newIndex)})}}),ScrollingItemsContainer=class extends HTMLElement{constructor(){super()}connectedCallback(){this.isConnected&&(this.scrollingItemsEl=this.firstElementChild,this.resizeObserver=new ResizeObserver(debounce(entries=>{const entry=entries[0];entry.contentRect.width!==this.lastWidth&&(this.lastWidth=entry.contentRect.width,this.scrollingItemsEl.adjustScrollingItemsSpeed(),this.scrollingItemsEl.makeClones())},150)),this.resizeObserver.observe(this),this.addEventListener("scrolling-items:change",()=>{this.scrollingItemsEl.adjustScrollingItemsSpeed(),this.scrollingItemsEl.makeClones()}),Shopify.designMode&&document.addEventListener("shopify:section:unload",e=>{e.target.contains(this)&&this.resizeObserver.disconnect()}))}disconnectedCallback(){this.resizeObserver.disconnect()}},ScrollingItems=class extends HTMLElement{constructor(){super()}connectedCallback(){this.isConnected&&(this.adjustScrollingItemsSpeed(),this.makeClones())}adjustScrollingItemsSpeed(){document.documentElement.style.setProperty("--global-scrolling-items-speed-multiplier",window.innerWidth/1024)}makeClones(){let i=0;this.querySelector("noscript")&&this.querySelector("noscript").remove();const scrollingItemsSurfaceEl=this.querySelector("scrolling-items-surface"),originalContentEl=this.querySelector("scrolling-items-content");if(!scrollingItemsSurfaceEl||!originalContentEl)return;const originalContentWidth=originalContentEl.getBoundingClientRect().width;if(originalContentWidth===0)return;const totalClonesNeeded=2*Math.ceil(window.innerWidth*2/originalContentWidth/2),addClone=()=>{const clone=originalContentEl.cloneNode(!0);scrollingItemsSurfaceEl.append(clone)};for(;scrollingItemsSurfaceEl.children.length!==totalClonesNeeded;){if(totalClonesNeeded===1/0||Number.isNaN(totalClonesNeeded)||i>1e3){console.error("Shapes: Scrolling items: Something went wrong inside the scrolling items layout function",{originalContentWidth,windowInnerWidth:window.innerWidth,totalExistingClones:scrollingItemsSurfaceEl.children.length,totalClonesNeeded});break}scrollingItemsSurfaceEl.children.length>totalClonesNeeded?scrollingItemsSurfaceEl.removeChild(scrollingItemsSurfaceEl.lastChild):addClone()}this.style.setProperty("--local-scrolling-items-speed-multiplier",this.getBoundingClientRect().width/window.innerWidth)}},moneyFormat="${{amount}}";function formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));let value="";const placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision=2,thousands=",",decimal="."){if(isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);const parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${thousands}`),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break}return formatString.replace(placeholderRegex,value)}function liveRegion2(content,clear){clearTimeout(window.liveRegionTimeout);let region=document.getElementById("screenreader-announce");region.innerHTML=content,window.liveRegionTimeout=setTimeout(()=>{region.innerHTML=""},3e3)}function cartLiveRegion(item){const templateString=theme.strings.update+": [QuantityLabel]: [Quantity], [Regular] [$$] [DiscountedPrice] [$]. [PriceInformation]";function _liveRegionContent(){let liveRegionContent=templateString;liveRegionContent=liveRegionContent.replace("[QuantityLabel]",theme.strings.quantity).replace("[Quantity]",item.quantity);let regularLabel="",regularPrice=formatMoney(item.original_line_price,theme.moneyFormat),discountLabel="",discountPrice="",discountInformation="";return item.original_line_price>item.final_line_price&&(regularLabel=theme.strings.regularTotal,discountLabel=theme.strings.discountedTotal,discountPrice=formatMoney(item.final_line_price,theme.moneyFormat),discountInformation=theme.strings.priceColumn),liveRegionContent=liveRegionContent.replace("[Regular]",regularLabel).replace("[$$]",regularPrice).replace("[DiscountedPrice]",discountLabel).replace("[$]",discountPrice).replace("[PriceInformation]",discountInformation).replace("  .","").trim(),liveRegionContent}liveRegion2(_liveRegionContent(),!0)}function variantLiveRegion(variant){const templateString="[Availability] [Regular] [$$] [Sale] [$]. [UnitPrice] [$$$]";function _getBaseUnit(){return variant.unit_price_measurement.reference_value===1?variant.unit_price_measurement.reference_unit:variant.unit_price_measurement.reference_value+variant.unit_price_measurement.reference_unit}function _liveRegionContent(){let liveRegionContent=templateString;const availability=variant.available?"":theme.strings.soldOut+",";liveRegionContent=liveRegionContent.replace("[Availability]",availability);let regularLabel="",regularPrice=formatMoney(variant.price,theme.moneyFormat),saleLabel="",salePrice="",unitLabel="",unitPrice="";return variant.compare_at_price>variant.price&&(regularLabel=theme.strings.regularPrice,regularPrice=formatMoney(variant.compare_at_price,theme.moneyFormat),saleLabel=theme.strings.sale,salePrice=formatMoney(variant.price,theme.moneyFormat)),variant.unit_price&&(unitLabel=theme.strings.unitPrice,unitPrice=formatMoney(variant.unit_price,theme.moneyFormat)+" "+theme.strings.unitPriceSeparator+" "+_getBaseUnit()),liveRegionContent=liveRegionContent.replace("[Regular]",regularLabel).replace("[$$]",regularPrice).replace("[Sale]",saleLabel).replace("[$]",salePrice).replace("[UnitPrice]",unitLabel).replace("[$$$]",unitPrice).replace("  .","").trim(),liveRegionContent}liveRegion2(_liveRegionContent(),!1)}import{Splide,SplideEventInterface as EventInterface,SplideAutoScroll as AutoScroll}from"vendor";window.Splide=Splide,window.slideshows={};
13var applyInert=function(slides){slides.forEach(slide=>{const slideEl=slide.slide;slideEl.matches(".is-visible")?slideEl.removeAttribute("inert"):slideEl.setAttribute("inert","")})};function SplideProduct(Splide2){const{on,off,bind,unbind}=EventInterface(Splide2);Splide2.root.addEventListener("click",event=>{event.target.classList.contains("splide__pagination__page")&&(Splide2.paginationClicked=!0)});function _goToFirstSlideForMediaWithId(mediaId){const targetSlides=Splide2.Components.Slides.filter(slide=>slide.slide.dataset.mediaId===mediaId.toString());targetSlides.length&&Splide2.go(targetSlides[0].index)}bind(document.body,"shapes:product:variantchange",e=>{if(!e.target.contains(Splide2.root))return;const mediaId=e.detail.variant.featured_media.id;_goToFirstSlideForMediaWithId(mediaId)});function _resizeTrackForSlideAtIndex(index){const targetSlideObject=Splide2.Components.Slides.getAt(index);if(!targetSlideObject)return;const targetSlide=targetSlideObject.slide;let newHeight=targetSlide.querySelector("[data-product-single-media-wrapper]").offsetHeight;if(Splide2.root.hasAttribute("data-two-slides-visible-on-mobile")&&window.matchMedia("(max-width: 989px").matches){const nextSlide=targetSlide.nextElementSibling;if(nextSlide!==null){const nextSlideHeight=nextSlide.querySelector("[data-product-single-media-wrapper]").offsetHeight;newHeight=nextSlideHeight>newHeight?nextSlideHeight:newHeight}}Splide2.root.querySelector(".splide__track").style.maxHeight=newHeight+"px"}const resizeHandler=e=>{_resizeTrackForSlideAtIndex(Splide2.index)},_debouncedResizeHandler=debounce(resizeHandler,150);bind(window,"resize",_debouncedResizeHandler);function handleDestroy(){Splide2.root.querySelectorAll("[inert]").forEach(inertEl=>{inertEl.removeAttribute("inert")}),Splide2.root.querySelectorAll("[aria-hidden]").forEach(ariaHiddenEl=>{ariaHiddenEl.removeAttribute("aria-hidden")}),unbind(document.body,"shapes:product:variantchange")}function handleMountedMoved(){Splide2.options.destroy===!0?handleDestroy():applyInert(Splide2.Components.Slides.get())}function optionsUpdated(options){options.destroy===!0&&handleDestroy()}function handleMounted(){Splide2.root.dataset.firstMedia&&_goToFirstSlideForMediaWithId(Splide2.root.dataset.firstMedia),_resizeTrackForSlideAtIndex(Splide2.index)}function handleMoved(newIndex,oldIndex){applyInert(Splide2.Components.Slides.get());const slides=Splide2.Components.Slides,oldSlide=slides.getAt(oldIndex).slide.querySelector("[data-product-single-media-wrapper]"),newSlide=slides.getAt(newIndex).slide.querySelector("[data-product-single-media-wrapper]");oldSlide&&oldSlide.dispatchEvent(new CustomEvent("mediaHidden")),newSlide&&newSlide.dispatchEvent(new CustomEvent("mediaVisible"))}function handleMove(newIndex){_resizeTrackForSlideAtIndex(newIndex)}return{mount(){on("mounted",handleMounted),on("mounted moved",handleMountedMoved),on("moved",handleMoved),on("move",handleMove),on("destroy",handleDestroy),on("updated",optionsUpdated)}}}var _createSplideInstance=(splideRoot,options,extensions)=>{if(splideRoot.hasAttribute("data-thumbnails")){const thumbsRoot=document.getElementById(splideRoot.getAttribute("data-thumbnails"));window.slideshows[thumbsRoot.id]=new Splide(`#${thumbsRoot.id}`,{direction:"ttb",height:"var(--thumbnails-height)",autoHeight:!0,arrows:!1,pagination:!1,isNavigation:!0,focus:"left",gap:"0.625rem",slideFocus:!1}),window.slideshows[splideRoot.id]=new Splide(`#${splideRoot.id}`,options);const mainSplide=window.slideshows[splideRoot.id],thumbsSplide=window.slideshows[thumbsRoot.id];mainSplide.mount(extensions),document.addEventListener("shapes:product:arrow-change",e=>{e.detail.direction=="prev"?thumbsSplide.go("<"):thumbsSplide.go(">"),thumbsSplide.Components.Slides.getAt(thumbsSplide.index).slide.querySelector(".media-thumbnail").click()}),document.addEventListener("shapes:product:variantchange",e=>{if(!e.target.contains(splideRoot))return;const mediaId=e.detail.variant.featured_media.id,targetSlides=thumbsSplide.Components.Slides.filter(slide=>slide.slide.dataset.mediaId===mediaId.toString());targetSlides.length&&thumbsSplide.go(targetSlides[0].index)}),thumbsSplide.mount()}else window.slideshows[splideRoot.id]=new Splide(`#${splideRoot.id}`,options),window.slideshows[splideRoot.id].on("mounted",e=>{const clones=window.slideshows[splideRoot.id].root.querySelectorAll(".splide__slide--clone");for(let i=0;i<clones.length;
13i++){let elements=clones[i].getElementsByTagName("*");for(let j=0;j<elements.length;j++){let el=elements[j];if(el.hasAttribute("id")&&(el.id=el.getAttribute("id")+"-"+i),el.hasAttribute("for")){let newForAttr=el.getAttribute("for")+"-"+i;el.setAttribute("for",newForAttr)}}}}),splideRoot.dataset.autoRotate==="true"&&_setUpAutoPlay(splideRoot),splideRoot.hasAttribute("data-focus-carousel")&&_setUpFocusCarousel(splideRoot),window.slideshows[splideRoot.id].mount(extensions)};window.destroySlideshow=splideRoot=>{window.slideshows[splideRoot.id]&&(window.slideshows[splideRoot.id].destroy(),delete window.slideshows[splideRoot.id])},window.makeSlideshow=splideRoot=>{if(splideRoot.matches(".splide--thumbnails"))return;if(!splideRoot.id){console.error("Shapes Theme: makeSlideshow requires a unique ID on the slideshow root");return}if(window.slideshows[splideRoot.id])return;const mobileOnly=splideRoot.matches(".splide--mobile");let options={mediaQuery:"min",perPage:1,perMove:1,autoWidth:!0,arrows:!0,pagination:!1,rewind:!0,autoScroll:{autoStart:!1},breakpoints:mobileOnly?{990:{destroy:!0}}:{}};if(splideRoot.querySelector(".slideshow-options")!==null&&(options=JSON.parse(splideRoot.querySelector(".slideshow-options").textContent)),splideRoot.matches(".splide--product")){const productOptions={mediaQuery:"min",type:"slide",perPage:1,perMove:1,autoWidth:!0,pagination:!1,arrows:!0,rewind:!0,drag:splideRoot.dataset.dragDisabled!=="true",autoScroll:{autoStart:!1},breakpoints:{990:{destroy:!0}}};_createSplideInstance(splideRoot,productOptions,{SplideProduct})}else{splideRoot.dataset.autoRotate==="true"&&(options.drag=!1,options.pauseOnHover=!0,options.pauseOnFocus=!0);let extensions={};options.autoScroll&&options.autoScroll.autoStart===!0&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(extensions={AutoScroll}),_createSplideInstance(splideRoot,options,extensions)}},window.discoverNewSlideshows=(container=document)=>{container.querySelectorAll(".splide").forEach(splideRoot=>{makeSlideshow(splideRoot)})},window.destroySlideshowsIn=(container=document)=>{container.querySelectorAll(".splide").forEach(splideRoot=>{destroySlideshow(splideRoot)})},window.switchOnDOMContentLoaded(()=>{discoverNewSlideshows()}),document.addEventListener("shapes:productquickbuy:added",()=>{discoverNewSlideshows()}),document.addEventListener("shapes:productquickbuy:willremove",e=>{e.detail.container&&destroySlideshowsIn(e.detail.container)}),document.addEventListener("shapes:product:mediachange",e=>{const splideInstance=window.slideshows[e.detail.slideshowId];if(!splideInstance)return;const slideIndex=splideInstance.Components.Elements.slides.findIndex(slide=>Number(slide.dataset.mediaId)===e.detail.mediaId);slideIndex>-1&&splideInstance.go(slideIndex)});var _setUpAutoPlay=splideRoot=>{const autoplayControl=splideRoot.querySelector(".splide__toggle"),playText=autoplayControl.dataset.play,pauseText=autoplayControl.dataset.pause;window.slideshows[splideRoot.id].on("autoplay:play",()=>{autoplayControl.setAttribute("aria-label",pauseText)}),window.slideshows[splideRoot.id].on("autoplay:pause",event=>{autoplayControl.setAttribute("aria-label",playText)})},_setUpFocusCarousel=splideRoot=>{const splide=window.slideshows[splideRoot.id],enlargeActiveSlideEnabled=splideRoot.hasAttribute("data-enlarge-active-slide");splide.on("move",newIndex=>{const slides=splide.Components.Slides.get();
13slides.forEach(slide=>{const scaleContainer=slide.slide.querySelector("[data-slide-scale-container]"),highlightText=slide.slide.querySelector("[data-slide-highlight-text]");enlargeActiveSlideEnabled&&(scaleContainer.classList.remove("scale-100"),scaleContainer.classList.add("scale-[0.8]")),highlightText&&(highlightText.classList.add("opacity-0"),highlightText.classList.remove("opacity-100"))}),slides.filter(slide=>slide.index===newIndex).forEach(slide=>{const scaleContainer=slide.slide.querySelector("[data-slide-scale-container]"),highlightText=slide.slide.querySelector("[data-slide-highlight-text]");highlightText&&highlightText.classList.add("opacity-100"),enlargeActiveSlideEnabled&&(scaleContainer.classList.remove("scale-[0.8]"),scaleContainer.classList.add("scale-100"))});const event=new CustomEvent("switch:focus-carousel:move",{detail:{splideID:splideRoot.id,newIndex}});window.dispatchEvent(event)}),splide.on("moved",newIndex=>{const event=new CustomEvent("switch:focus-carousel:moved",{detail:{splideID:splideRoot.id,newIndex}});window.dispatchEvent(event)})};import DataIsland from"data-island";var{intersect,focus,collapse,morph}=AlpinePlugins;Alpine2.plugin(intersect),Alpine2.plugin(focus),Alpine2.plugin(collapse),Alpine2.plugin(morph),Alpine2.plugin(fetched_fragment_default),Alpine2.plugin(html_if_set_default),window.Alpine=Alpine2,window.Spruce=Alpine2,window.liveRegion=liveRegion2,window.variantLiveRegion=variantLiveRegion,window.cartLiveRegion=cartLiveRegion,document.addEventListener("alpine:init",()=>{Alpine2.store("modals",modals_default),Alpine2.store("cart_count",cart_count_default)}),Alpine2.data("AgeCheck",age_check_default),Alpine2.data("FreeShippingBar",free_shipping_bar_default),Alpine2.data("CartItems",cart_items_default),Alpine2.data("CartItem",cart_item_default),Alpine2.data("CartItemQuantity",cart_item_quantity_default),Alpine2.data("CartFooter",cart_footer_default),Alpine2.data("CartNote",cart_note_default),Alpine2.data("Header",header_default),Alpine2.data("PredictiveSearch",predictive_search_default),Alpine2.data("Video",video_default),Alpine2.data("HTMLVideo",html_video_default),Alpine2.data("Filterable",filterable_default),Alpine2.data("ProductThumbnails",product_thumbnails_default),Alpine2.data("Quantity",quantity_default2),Alpine2.data("ModalCart",modal_cart_default),Alpine2.data("RTE",rte_default),Alpine2.data("ShapeDivider",shape_divider_default),Alpine2.data("OffsetGalleryItem",offset_gallery_item_default),Alpine2.data("TikTokEmbed",tiktok_embed_default),Alpine2.data("AsyncScriptLoader",async_script_loader_default),Alpine2.data("FocusCarousel",focus_carousel_default),customElements.get("data-island")||customElements.define("data-island",DataIsland),customElements.get("scrolling-items-container")||customElements.define("scrolling-items-container",ScrollingItemsContainer),customElements.get("scrolling-items")||customElements.define("scrolling-items",ScrollingItems),setTimeout(()=>{Alpine2.start(),document.dispatchEvent(new CustomEvent("switch:alpine:started"))}),console.log("Shapes theme (3.0.2) by SWITCH | Make the switch: https://switchthemes.co");
14//# sourceMappingURL=/cdn/shop/t/28/assets/global.bundle.js.map?v=141691788837746535341787814151

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.