1var __defProp=Object.defineProperty,__name=(target,value)=>__defProp(target,"name",{value,configurable:!0}),supported=typeof window>"u"?!0:"onscrollend"in window;if(!supported){let observe=function(proto,method,handler){const native=proto[method];proto[method]=function(){const args=Array.prototype.slice.apply(arguments,[0]);native.apply(this,args),args.unshift(native),handler.apply(this,args)}},onAddListener=function(originalFn,type,handler,options){if(type!="scroll"&&type!="scrollend")return;const scrollport=this;let data=observed.get(scrollport);if(data===void 0){let timeout=0;data={scrollListener:__name(evt=>{clearTimeout(timeout),timeout=setTimeout(()=>{pointers.size?setTimeout(data.scrollListener,180):(scrollport&&scrollport.dispatchEvent(scrollendEvent),timeout=0)},180)},"scrollListener"),listeners:0},originalFn.apply(scrollport,["scroll",data.scrollListener]),observed.set(scrollport,data)}data.listeners++},onRemoveListener=function(originalFn,type,handler){if(type!="scroll"&&type!="scrollend")return;const scrollport=this,data=observed.get(scrollport);data!==void 0&&(data[type]--,!(--data.listeners>0)&&(originalFn.apply(scrollport,["scroll",data.scrollListener]),observed.delete(scrollport)))};observe2=observe,onAddListener2=onAddListener,onRemoveListener2=onRemoveListener,__name(observe,"observe"),__name(onAddListener,"onAddListener"),__name(onRemoveListener,"onRemoveListener");const scrollendEvent=new Event("scrollend"),pointers=new Set;document.addEventListener("touchstart",e=>{for(const touch of e.changedTouches)pointers.add(touch.identifier)},{passive:!0}),document.addEventListener("touchend",e=>{for(const touch of e.changedTouches)pointers.delete(touch.identifier)},{passive:!0}),document.addEventListener("touchcancel",e=>{for(const touch of e.changedTouches)pointers.delete(touch.identifier)},{passive:!0});const observed=new WeakMap;observe(Element.prototype,"addEventListener",onAddListener),observe(window,"addEventListener",onAddListener),observe(document,"addEventListener",onAddListener),observe(Element.prototype,"removeEventListener",onRemoveListener),observe(window,"removeEventListener",onRemoveListener),observe(document,"removeEventListener",onRemoveListener)}var observe2,onAddListener2,onRemoveListener2,initSearch=__name(()=>{const query=new URL(window.location.href).searchParams.get("q")??"";window.Alpine.store("search",{query});const searchStore=window.Alpine.store("search");Alpine.effect(()=>{const url=new URL(window.location.href);url.searchParams.set("q",searchStore.query),searchStore.query||url.searchParams.delete("q"),barba.history.add(url.toString(),"barba","replace")}),window.Alpine.magic("search",()=>searchStore)},"initSearch"),initAccessibility=__name(()=>{document.querySelectorAll('[role="button"], [role="link"], [data-icon-handle]').forEach(element=>{element.onkeydown=event=>{element.role!=="link"&&element.role!=="button"||(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.stopPropagation(),element.dispatchEvent(new Event("click")))}})},"initAccessibility"),initCart=__name(()=>{window.Alpine.store("cart",{history:[structuredClone(window._cart_data)],state:{...window._cart_data,items:window._cart_data?.items.map((item,index)=>({...item,index}))??[]},upsell_products:[],gift_products:[],loading:!1,gwp_enabled:!1,gwp_loading:!1,isChanging:!1,debounce_updates:[]});const cart=window.Alpine.store("cart");window.Alpine.magic("cart",()=>cart),window._stores.cart=cart,window._cart_data=cart.state;const get=__name(async(productAdded=!1)=>{const data=await fetch("/cart/update.js",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({sections:"data_cart_json"})}).then(res=>res.json()).catch(e=>(_stores.toast.addToast({type:"error",target:"cart",title:"Cart Error",content:e.statusMessage}),cart.isChanging=!1,window._stores.cart.state));if("status"in data)return _stores.toast.addToast({type:"error",target:"cart",title:data.message,content:data.description}),cart.isChanging=!1,window._stores.cart.state;const item_components=utils.JSONParse(data.sections?.data_cart_json?.replace('<div id="shopify-section-data_cart_json" class="shopify-section">',"")?.replace(/<\/div>[\s\n]*$/gi,"")??"[]"),newCartData={...data,items:data?.items.map((item,index)=>({...item,index,item_components:item_components[index]}))??[],item_count:data.items?.filter(item=>!item?.properties?._p_id_link)?.reduce((acc,item)=>acc+=item.quantity,0)};return cart.history.unshift(structuredClone(newCartData)),cart.state=newCartData,cart.history.length>5&&cart.history.pop(),cart.isChanging=!1,productAdded&&document.dispatchEvent(new CustomEvent("productAddedToCart",{detail:newCartData})),newCartData},"get"),add=__name(async cartItems=>{cart.isChanging=!0;const data=await fetch("/cart/add.js",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(cartItems)}).then(res=>res.json()).catch(async e=>(_stores.toast.addToast({type:"error",target:"cart",title:"Cart Error",content:e.statusMessage}),{...await get(),cart_error:!0}));return"status"in data?(_stores.toast.addToast({type:"error",target:"cart",title:data.message,content:data.description}),{...await get(),cart_error:!0}):await get(!0)},"add");let gwpAutoAddQueue=[],gwpAutoAddFlushScheduled=!1,gwpAutoAddFlushing=!1;const flushGwpAutoAddQueue=__name(async()=>
1{if(gwpAutoAddFlushing)return;gwpAutoAddFlushing=!0,gwpAutoAddFlushScheduled=!1;const addItems=gwpAutoAddQueue.flatMap(({items})=>items);gwpAutoAddQueue=[],cart.loading=!0,cart.gwp_loading=!0;try{addItems.length&&await add({items:addItems})}finally{cart.loading=!1,gwpAutoAddFlushing=!1,gwpAutoAddQueue.length?scheduleGwpAutoAddFlush():cart.gwp_loading=!1}},"flushGwpAutoAddQueue"),scheduleGwpAutoAddFlush=__name(()=>{gwpAutoAddFlushScheduled||gwpAutoAddFlushing||(gwpAutoAddFlushScheduled=!0,window.setTimeout(flushGwpAutoAddQueue,50))},"scheduleGwpAutoAddFlush"),queueGwpAutoAdd=__name((block_id,items)=>{const existingIndex=gwpAutoAddQueue.findIndex(entry=>entry.block_id===block_id);existingIndex>=0?gwpAutoAddQueue[existingIndex]={block_id,items}:gwpAutoAddQueue.push({block_id,items}),cart.gwp_loading=!0,scheduleGwpAutoAddFlush()},"queueGwpAutoAdd"),update=__name(async updates=>{cart.isChanging=!0;const data=await fetch("/cart/update.js",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({...updates,sections:"data_cart_json"})}).then(res=>res.json()).catch(async e=>(_stores.toast.addToast({type:"error",target:"cart",title:"Cart Error",content:e.statusMessage}),await get()));if("status"in data)return _stores.toast.addToast({type:"error",target:"cart",title:data.message,content:data.description}),await get();const item_components=utils.JSONParse(data.sections?.data_cart_json?.replace('<div id="shopify-section-data_cart_json" class="shopify-section">',"")?.replace(/<\/div>[\s\n]*$/gi,"")??"[]"),newCartData={...data,items:data?.items.map((item,index)=>({...item,index,item_components:item_components[index]}))??[],item_count:data.items?.filter(item=>!item?.properties?._p_id_link)?.reduce((acc,item)=>acc+=item.quantity,0),total_price:data.items.reduce((acc,item)=>acc+=item.price*item.quantity,0)};return cart.history.unshift(structuredClone(newCartData)),cart.state=newCartData,cart.history.length>5&&cart.history.pop(),cart.isChanging=!1,newCartData},"update"),change=__name(async cartItem=>{cart.isChanging=!0;const data=await fetch("/cart/change.js",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({...cartItem,sections:"data_cart_json"})}).then(res=>res.json()).catch(async e=>(_stores.toast.addToast({type:"error",target:"cart",title:"Cart Error",content:e.statusMessage}),await get()));if("status"in data)return _stores.toast.addToast({type:"error",target:"cart",title:data.message,content:data.description}),await get();const item_components=utils.JSONParse(data.sections?.data_cart_json?.replace('<div id="shopify-section-data_cart_json" class="shopify-section">',"")?.replace(/<\/div>[\s\n]*$/gi,"")??"[]"),{items_added,items_removed,...cart_data}=data,newCartData={...cart_data,items:cart_data?.items.map((item,index)=>({...item,index,item_components:item_components[index]}))??[],item_count:data.items?.filter(item=>!item?.properties?._p_id_link)?.reduce((acc,item)=>acc+=item.quantity,0)};return cart.history.unshift(structuredClone(newCartData)),cart.state=newCartData,cart.history.length>5&&cart.history.pop(),cart.isChanging=!1,newCartData},"change"),clear=__name(async()=>{const data=await fetch("/cart/clear.js",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(res=>res.json()).catch(async e=>(_stores.toast.addToast({type:"error",target:"cart",title:"Cart Error",content:e.statusMessage}),await get()));if("status"in data)return _stores.toast.addToast({type:"error",target:"cart",title:data.message,content:data.description}),await get();const newCartData={...data,items:[],item_count:0};return cart.history.unshift(structuredClone(newCartData)),cart.state=newCartData,cart.history.length>5&&cart.history.pop(),cart.isChanging=!1,newCartData},"clear"),showConditionally=__name(show_conditionally=>{if(!show_conditionally)return!0;switch(show_conditionally){case"always":return!0;case"cart_empty":return!cart.state.item_count;case"items_added":return!!cart.state.item_count}},"showConditionally"),updateLineItemQuantity=__name((quantity,index)=>{!cart.state.items[index]||cart.state.items[index]?.quantity===quantity||cart.state.items.length!==_stores.cart?.history[0].items.length||(cart.gwp_enabled&&cart.state.items[index].quantity>
1quantity&&(cart.gwp_loading=!0),cart.state.items[index].quantity=Math.max(0,quantity),cart.state.item_count=cart.state.items?.filter(item=>!item?.properties?._p_id_link)?.reduce((acc,item)=>acc+=item.quantity,0),cart.state.total_price=cart.state.items.reduce((acc,item)=>acc+=item.price*item.quantity,0),cart.debounce_updates=cart.state.items.map(item=>item.quantity))},"updateLineItemQuantity"),renderDynamicProductCards=__name(async($el,target_product,primary_source,secondary_source,product_class,limit,hide_if_empty,content_slider)=>{const fallback_products=utils.JSONParse($el.getAttribute("data-fallback-products"));content_slider?.handleResize(),setTimeout(()=>{content_slider?.handleResize()},50);const lineItemProducts=await Promise.all(cart.state.items?.map(item=>_product.getHydratedProductData(item.handle,item.product_id))),products=[],complementary_products=[],related_products=[];switch(target_product){case"ai":{const expensive=[...cart.state.items].sort((a,b)=>b.final_price-a.final_price).slice(0,3);[...cart.state.items.slice(0,2).sort((a,b)=>b.final_price-a.final_price),...expensive].forEach((line,parentIndex)=>{const product=lineItemProducts.find(p=>p.handle===line.handle);product?.complementary_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||complementary_products.push(item)}),product?.related_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||related_products.push(item)})});break}case"most_expensive":{[...cart.state.items].sort((a,b)=>b.final_price-a.final_price)?.forEach((line,parentIndex)=>{const product=lineItemProducts.find(p=>p.handle===line.handle);product?.complementary_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||complementary_products.push(item)}),product?.related_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||related_products.push(item)})});break}case"least_expensive":{[...cart.state.items].sort((a,b)=>a.final_price-b.final_price)?.forEach((line,parentIndex)=>{const product=lineItemProducts.find(p=>p.handle===line.handle);product?.complementary_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||complementary_products.push(item)}),product?.related_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||related_products.push(item)})});break}case"recently_added":{cart.state.items?.forEach((line,parentIndex)=>{const product=lineItemProducts.find(p=>p.handle===line.handle);product?.complementary_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||complementary_products.push(item)}),product?.related_products?.forEach((item,i)=>{i>=2||i>=1&&parentIndex>=2||related_products.push(item)})});break}}switch(primary_source){case"complementary":{complementary_products?.forEach(prod=>{products.push(prod)});break}case"related":{related_products?.forEach(prod=>{products.push(prod)});break}case"recently_viewed":{(await Promise.all((window?._recent_products??[])?.map(([handle,product_id])=>_product.getHydratedProductData(handle,product_id)))).forEach(prod=>{products.push(prod)});break}case"manual":{fallback_products.forEach(prod=>{products.push(prod)});break}}switch(secondary_source){case"complementary":{complementary_products?.forEach(prod=>{products.push(prod)});break}case"related":{related_products?.forEach(prod=>{products.push(prod)});break}case"recently_viewed":{(await Promise.all((window?._recent_products??[]).map(([handle,product_id])=>_product.getHydratedProductData(handle,product_id)))).forEach(prod=>{products.push(prod)});break}case"manual":{fallback_products.forEach(prod=>{products.push(prod)});break}}const controlProducts=products?.filter(prod=>!cart.state.items.some(item=>item.product_id===prod.id))?.filter((a,i,arr)=>arr.findIndex(b=>b.id===a.id)===i)??[];switch(hide_if_empty){case"none":break;case"section":$el.closest(".shopify-section")?.classList.toggle("!hidden",controlProducts?.length===0);break;case"container":$el.closest(`[data-style-id]:not([data-style-id="${$el.getAttribute("data-style-id")}"])`)?.classList.toggle("!hidden",controlProducts?.length===0);break;case"block":$el?.classList.toggle("!hidden",controlProducts?.length===0);break}const renderProducts=controlProducts?.filter((prod,index)=>prod.handle!==$el.children?.[index]?.getAttribute("data-product-handle"));cart.upsell_products=controlProducts,renderProducts.length&&($el.innerHTML="",controlProducts.slice(0,limit).forEach((prod,i,arr)=>
1{const node=document.querySelector(`[data-product-card='${product_class}']`)?.cloneNode(!0);if(node){const div=document.createElement("div");div.setAttribute("data-product-handle",prod.handle),div.setAttribute("class","shrink-0 max-w-full w-full h-full"),node?.removeAttribute("data-product-card"),node?.setAttribute("data-product-handle",prod.handle),node?.setAttribute("data-product-id",`${prod.id}`),node.querySelectorAll("[data-loop-item], [data-x-if], style").forEach(el=>{el.remove()}),div.appendChild(node),$el.appendChild(div)}}))},"renderDynamicProductCards"),renderGiftProducts=__name(async($el,{target_type,target,receives_quantity,allow_duplicates,product_card_class,hide_if_empty,handleResize,block_id,auto_remove_from_cart,auto_add_to_cart})=>{(cart.loading||cart.isChanging||Object.keys(cart.debounce_updates)?.length)&&await new Promise((resolve,reject)=>{const start=performance.now(),isBusy=__name(()=>cart.loading||cart.isChanging||Object.keys(cart.debounce_updates||{}).length>0,"isBusy"),check=__name(()=>{const now=performance.now();if(!isBusy()){clearInterval(tid),resolve(!0),cart.gwp_loading=!1;return}now-start>=5e3&&(clearInterval(tid),cart.gwp_loading=!1,cart.loading=!1,reject(new Error("Timed out waiting for cart to become idle")))},"check"),tid=setInterval(check,32);check()});const products=utils.JSONParse($el.getAttribute("data-gift-products"));handleResize(),setTimeout(()=>{handleResize()},50);const received_quantity=cart?.state?.items?.reduce((acc,lineItem)=>lineItem?.properties?._gift_with_purchase===`${block_id}`?acc+=lineItem.quantity:acc,0),qualifying=cart?.state?.items?.reduce((acc,lineItem)=>lineItem?.properties?._gift_with_purchase?acc:acc+(target_type==="item_count"?lineItem.quantity:lineItem.final_line_price),0),controlProducts=qualifying>=target&&received_quantity<receives_quantity?products?.filter(prod=>allow_duplicates||!cart.state.items.some(item=>item.product_id===prod.id&&!item.properties?._gift_with_purchase))?.filter((a,i,arr)=>arr.findIndex(b=>b.id===a.id)===i):[];if(auto_remove_from_cart&&qualifying<target){if(cart.loading=!0,cart.gwp_loading=!0,cart?.state?.items?.filter(lineItem=>lineItem.quantity&&lineItem.properties._gift_with_purchase===`${block_id}`)?.length){const updates=cart.state.items.map(item=>item.properties?._gift_with_purchase===`${block_id}`?0:item.quantity);await update({updates}),cart.loading=!1,cart.gwp_loading=!1}cart.gift_products[block_id]=[],cart.loading=!1,cart.gwp_loading=!1;return}if(auto_add_to_cart&&controlProducts?.length&&controlProducts?.length===1){const force_remove=JSON.parse(sessionStorage.getItem("force_remove"));if(force_remove&&force_remove.includes(controlProducts[0].id)){cart.gift_products[block_id]=[],cart.loading=!1,cart.gwp_loading=!1;return}const getControlItems=__name(()=>{let addedQuantity=cart?.state?.items?.reduce((acc,lineItem)=>lineItem?.properties?._gift_with_purchase===`${block_id}`?acc+=lineItem.quantity:acc,0);return controlProducts.map(p=>p.variants.find(v=>v.available)).map(variant=>{if(!allow_duplicates&&cart.state.items.some(item=>item.variant_id===variant.id)||addedQuantity>=receives_quantity)return null;const properties={_gift_with_purchase:`${block_id}`,_Removable:!0,_autoadded:!0,_Gifted:!0};let addQuantity=1;return allow_duplicates?(addQuantity=Math.min(variant?.inventory_management==="shopify"&&variant?.inventory_policy==="deny"?variant?.inventory_quantity:9999,receives_quantity-addedQuantity),addedQuantity+=addQuantity):addedQuantity+=1,{id:variant.id,quantity:addQuantity,properties:{...properties}}}).filter(Boolean)},"getControlItems");if(!getControlItems()?.length){cart.gift_products[block_id]=[],cart.loading=!1,cart.gwp_loading=!1;return}const addItems=getControlItems();addItems?.length&&queueGwpAutoAdd(block_id,addItems),cart.gift_products[block_id]=[];return}switch(hide_if_empty){case"none":break;case"section":$el.closest(".shopify-section")?.classList.toggle("!hidden",controlProducts?.length===0);break;case"container":$el.closest(`[data-style-id]:not([data-style-id="${$el.getAttribute("data-style-id")}"])`)?.classList.toggle("!hidden",controlProducts?.length===0);break;case"block":$el?.classList.toggle("!hidden",controlProducts?.length===0);break}const renderProducts=controlProducts?.filter((prod,index)=>prod.handle!==$el.children?.[index]?.getAttribute("data-product-handle"));if(cart.gift_products[block_id]=controlProducts,!renderProducts.length){cart.loading=!1;return}
1$el.innerHTML="",controlProducts.forEach((prod,i,arr)=>{const node=document.querySelector(`[data-product-card='${product_card_class}']`)?.cloneNode(!0);if(node){const div=document.createElement("div");div.setAttribute("data-product-handle",prod.handle),div.setAttribute("class","shrink-0 max-w-full w-full h-full"),node?.removeAttribute("data-product-card"),node?.setAttribute("data-product-handle",prod.handle),node?.setAttribute("data-product-id",`${prod.id}`),node.setAttribute("data-gift-with-purchase",`${block_id}`),node.querySelectorAll("[data-loop-item], [data-x-if], style").forEach(el=>{el.remove()}),div.appendChild(node),$el.appendChild(div)}})},"renderGiftProducts"),getDynamicTextWithFormattedPrice=__name(content=>content?.replace(/\[([^\]]*)\]/gi,(...matches)=>matches?.[1]?.split(".").reduce((acc,selector)=>!selector||acc[0]===void 0||acc[0]===null?/price$/gi.test(acc[1])&&typeof acc[0]=="number"?[utils.formatMoney(acc[0]),selector]:acc:acc[0]&&selector in acc[0]?/price$/gi.test(selector)&&typeof acc[0][selector]=="number"?[utils.formatMoney(acc[0][selector]),selector]:[acc[0][selector],selector]:["",""],[{cart:cart.state},""])[0])??"","getDynamicTextWithFormattedPrice"),debounceCartUpdates=window.Alpine.debounce(async()=>{const b=cart.history[0]?.items.map(item=>item.quantity);!utils.deepEqual(b,cart.debounce_updates)&&cart.debounce_updates.length&&(cart.loading=!0,await update({updates:cart.debounce_updates}),cart.debounce_updates=[],cart.loading=!1)},650);return window.Alpine.effect(()=>{cart.state.item_count=cart.state.items?.filter(item=>!item?.properties?._p_id_link)?.reduce((acc,item)=>acc+=item.quantity,0),window._cart_data=cart.state,cart.state.item_count===0&&sessionStorage.setItem("force_remove","[]")}),window.Alpine.effect(()=>{cart.state.original_pre_selling_plan_total_price=cart.state.items?.reduce((acc,item)=>(acc+=item.quantity*(item?.selling_plan_allocation?.compare_at_price??item?.original_price),acc),0),cart.state.selling_plan_discount_applications=cart.state?.items?.reduce((acc,item)=>{if(!item?.selling_plan_allocation?.selling_plan?.name)return acc;const index=acc.findIndex(selling_plan=>selling_plan.name===item?.selling_plan_allocation?.selling_plan?.name);return index!==-1?(acc[index].value+=(item?.selling_plan_allocation?.compare_at_price-item?.selling_plan_allocation?.price)*item?.quantity,acc):(acc.push({name:item?.selling_plan_allocation?.selling_plan?.name,value:(item?.selling_plan_allocation?.compare_at_price-item?.selling_plan_allocation?.price)*item?.quantity}),acc)},[])}),window.Alpine.effect(()=>{cart.debounce_updates.length&&debounceCartUpdates()}),document.addEventListener("productAddedToCart",async event=>{const updatedCart=cart.state;if(typeof window._learnq<"u"){const cartData={total_price:updatedCart.total_price/100,$value:updatedCart.total_price/100,total_discount:updatedCart.total_discount,original_total_price:updatedCart.original_total_price/100,items:updatedCart.items};window._learnq.push(["track","Added to Cart",cartData])}}),window._cart={add,get,update,change,clear,showConditionally,updateLineItemQuantity,renderDynamicProductCards,getDynamicTextWithFormattedPrice,renderGiftProducts},{add,get,update,change,clear,showConditionally,updateLineItemQuantity,renderDynamicProductCards,getDynamicTextWithFormattedPrice,renderGiftProducts}},"initCart"),initMediaGallery=__name(()=>{window.Alpine.store("mediaGallery",{show:!1,media:_products[Object.keys(_products)[0]]?.media??[],index:0,scrollIndex:0,showGallery({media=[],index=0}){this.media=media,this.show=!0,this.index=index,this.scrollIndex=index}});const mediaGalleryStore=window.Alpine.store("mediaGallery");Alpine.effect(()=>{!mediaGalleryStore.show&&mediaGalleryStore.media.length&&(mediaGalleryStore.media=[])}),window.Alpine.magic("mediaGallery",()=>mediaGalleryStore),window._stores.mediaGallery=mediaGalleryStore},"initMediaGallery"),initModals=__name(()=>{const modalsContainer=document.querySelector("[data-dynamic-modals]");window.Alpine.store("modal",{id:"",loaded:!!modalsContainer?.children.length||window.modalsLoaded,setId(value){this.id=value}});const modalStore=window.Alpine.store("modal");window.Alpine.magic("modal",()=>modalStore),window._stores.modal=modalStore;const handleKeydown=__name(e=>{e.key==="Escape"&&modalStore.setId("")},"handleKeydown");window.Alpine.effect(()=>{const blockScroll=modalStore?.id&&!/^megamenu--/gi.test(modalStore?.id)&&modalStore?.id!=="search"&&modalStore?.id!=="account_menu";document.body.classList.toggle("!overflow-hidden",blockScroll),document.documentElement.classList.toggle("!overflow-hidden",blockScroll),modalStore?.id&&document.addEventListener("keydown",handleKeydown),modalStore?.id||document.removeEventListener("keydown",handleKeydown)});const TRIGGER_SELECTOR='[href*="#modal--"], [href*="#popup--"], [href*="#drawer--"], [href*="#megamenu--"]',getHandle=__name(link=>link.href?.replace(/.*?#/gi,"")?.split("?")?.[0]??"","getHandle");document.addEventListener("click",e=>{const link=e.target?.closest(TRIGGER_SELECTOR);if(!link)return;e.preventDefault(),e.stopPropagation();const handle=getHandle(link);modalStore.setId(modalStore.id===handle?"":handle)},!0),document.addEventListener("keydown",e=>{const link=e.target?.closest(TRIGGER_SELECTOR);if(!link)return;const handle=getHandle(link);if(modalStore.id===handle&&(e.key===" "||e.key==="Enter"||e.key==="ArrowUp")){modalStore.setId("");return}(e.key===" "||e.key==="Enter"||e.key==="ArrowDown")&&modalStore.setId(handle)})},"initModals"),initCollapsible=__name(($el,container,defaultOpen=!1)=>{const state=window.Alpine.reactive({open_accordion:defaultOpen,opening:!1,closing:!1,timeout:null,themeEditorControl:!1}),toggleOpen=__name((forceOpen=!1,forceClose=!1)=>
1{if(!state.themeEditorControl){if(clearTimeout(state.timeout),(!state.open_accordion||forceOpen)&&!forceClose){state.opening=!0,state.closing=!1,state.open_accordion=!0,$el.open=!0,container.style.maxHeight=`${Math.max(container.scrollHeight+15,15)}px`,container.style.paddingTop="",container.style.paddingBottom="",requestAnimationFrame(()=>{state.opening&&!state.closing&&(container.style.maxHeight=`${Math.max(container.scrollHeight+15,15)}px`)}),state.timeout=setTimeout(()=>{state.opening=!1,container.style.maxHeight=`${Math.max(container.scrollHeight,99999)}px`},210);return}if((state.open_accordion||forceClose)&&!forceOpen){container.style.maxHeight==="99999px"&&(container.classList.add("!transition-none"),container.style.maxHeight=`${Math.max(container.scrollHeight+15,15)}px`),Alpine.nextTick(()=>{container.classList.remove("!transition-none"),container.style.paddingTop="0px",container.style.paddingBottom="0px",container.style.maxHeight="0px",state.opening=!1,state.closing=!0}),state.timeout=setTimeout(()=>{state.closing&&!state.opening&&(state.closing=!1,state.open_accordion=!1)},210);return}}},"toggleOpen");if(window.Shopify.designMode){const editor=Alpine.store("editor");Alpine.effect(()=>{const styleId=`${editor.select_section_id}--${editor.select_block_id}`;$el.getAttribute("data-style-id")===styleId||$el.parentElement.getAttribute("data-style-id")===styleId||$el.querySelector(`[data-style-id="${styleId}"]`)?(toggleOpen(!0),state.themeEditorControl=!0):state.themeEditorControl&&(state.themeEditorControl=!1,toggleOpen(!1,!0))})}return{collapsible:state,toggleOpen}},"initCollapsible"),getTransformedComputedStyle=__name(element=>{const style=getComputedStyle(element);return{...style,paddingLeft:parseFloat(style.paddingLeft?.replace("auto","0")),paddingRight:parseFloat(style.paddingRight?.replace("auto","0")),paddingTop:parseFloat(style.paddingTop?.replace("auto","0")),paddingBottom:parseFloat(style.paddingBottom?.replace("auto","0")),scrollPaddingLeft:parseFloat(style.scrollPaddingLeft?.replace("auto","0")),scrollPaddingRight:parseFloat(style.scrollPaddingRight?.replace("auto","0")),scrollPaddingTop:parseFloat(style.scrollPaddingTop?.replace("auto","0")),scrollPaddingBottom:parseFloat(style.scrollPaddingBottom?.replace("auto","0")),columnGap:parseFloat(style.columnGap?.replace("auto","0")),rowGap:parseFloat(style.rowGap?.replace("auto","0"))}},"getTransformedComputedStyle"),initContentSlider=__name(($el,container,speed=200,infiniteScroll=!1,autoRotate=0,enable_mouse_dragging=!1)=>{container||(container=$el.querySelector('[x-ref="scrollContainer"]')||$el.firstElementChild);const isHorizontal=__name(()=>getComputedStyle(container).overflowY==="hidden"||getComputedStyle(container).gridAutoFlow==="column"||container.scrollWidth>container?.clientWidth,"isHorizontal"),isScrollable=__name(()=>container.scrollWidth>container.clientWidth||container.scrollHeight>container.clientHeight,"isScrollable"),isDesktop=__name(()=>window.matchMedia("(min-width: 768px)").matches,"isDesktop"),shouldInfinite=__name(()=>{if(typeof infiniteScroll=="boolean")return infiniteScroll;switch(infiniteScroll){case"all":return!0;case"off":return!1;case"desktop":return isDesktop();case"mobile":return!isDesktop();default:return!1}},"shouldInfinite"),updateSliderHeightFromVisible=__name(()=>{container.style.setProperty("--slider-height","0px"),container.offsetHeight;const trackRect=container.getBoundingClientRect(),all=Array.from(container.children),maxH=(state.infinite?all.filter(el=>el.hasAttribute("data-original-node")):all).filter(el=>{const r=el.getBoundingClientRect();return r.right>trackRect.left&&r.left<trackRect.right&&r.height>0&&getComputedStyle(el).display!=="none"}).reduce((m,el)=>Math.max(m,el.getBoundingClientRect().height),0),finalH=Math.max(maxH,1);container.style.setProperty("--slider-height",`${finalH}px`)},"updateSliderHeightFromVisible"),random_id=utils.shortUUID(),containerStyles=getTransformedComputedStyle(container),horizontal=isHorizontal();let breakPoints=[],children=[...container.children].filter(el=>el.tagName!=="STYLE"&&el.tagName!=="TEMPLATE").toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order),size=children.length;const getChildSnapAlign=__name((child,horizontal2)=>{const rawSnapAlign=getComputedStyle(child).scrollSnapAlign?.trim();if(!rawSnapAlign||rawSnapAlign==="none")return"start";const[blockAlign,inlineAlign]=rawSnapAlign.split(/\s+/),axisAlign=horizontal2&&inlineAlign||blockAlign;return axisAlign==="center"||axisAlign==="end"?axisAlign:"start"}
1,"getChildSnapAlign"),getSnapPositionForChild=__name((child,horizontal2)=>{const containerStyles2=getTransformedComputedStyle(container),clientSpace=container?.[horizontal2?"clientWidth":"clientHeight"],scrollSpace=container?.[horizontal2?"scrollWidth":"scrollHeight"],maxScroll=Math.max(0,scrollSpace-clientSpace),childStart=child?.[horizontal2?"offsetLeft":"offsetTop"],childSize=child?.[horizontal2?"offsetWidth":"offsetHeight"],scrollPaddingStart=horizontal2?containerStyles2.scrollPaddingLeft:containerStyles2.scrollPaddingTop,scrollPaddingEnd=horizontal2?containerStyles2.scrollPaddingRight:containerStyles2.scrollPaddingBottom,childAlign=getChildSnapAlign(child,horizontal2);let targetScroll=childStart-scrollPaddingStart;return childAlign==="center"&&(targetScroll=childStart+childSize/2-(clientSpace+scrollPaddingStart-scrollPaddingEnd)/2),childAlign==="end"&&(targetScroll=childStart+childSize-clientSpace+scrollPaddingEnd),Math.max(0,Math.min(maxScroll,targetScroll))},"getSnapPositionForChild"),usesCenteredSnap=__name((elements,horizontal2)=>elements.some(child=>getChildSnapAlign(child,horizontal2)==="center"),"usesCenteredSnap"),calculateSlideCount=__name((padding=state.horizontal?state.paddingX:state.paddingY,gap=state.gap,scrollSpace=container[state.horizontal?"scrollWidth":"scrollHeight"],clientSpace=container?.[state.horizontal?"clientWidth":"clientHeight"])=>{const horizontal2=isHorizontal(),containerStyles2=getTransformedComputedStyle(container);if(scrollSpace<=clientSpace)return breakPoints=[0],1;breakPoints=[];const snapToSlide=container.classList?.contains("snap-to-slide");let targetElements=[...container.children].slice(0,Math.ceil(container.children?.length/+(getComputedStyle(container).getPropertyValue(horizontal2?"grid-template-rows":"grid-template-columns").split(" ").length??1)))?.filter(child=>getComputedStyle(child).display!=="none"&&(getComputedStyle(child).scrollSnapAlign!=="none"||snapToSlide));if(targetElements=targetElements?.toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order),snapToSlide){const gap2=horizontal2?containerStyles2.columnGap:containerStyles2.rowGap,paddingStart=horizontal2?containerStyles2.paddingLeft:containerStyles2.paddingTop,newTargetElements=[];targetElements.forEach(el=>{el.style.scrollSnapAlign=""});for(let i=0;i<Math.ceil((scrollSpace-padding-(targetElements.length-1)*gap2)/(clientSpace-padding));i++){const targetEl=targetElements.find(el=>el[horizontal2?"offsetLeft":"offsetTop"]-paddingStart>=i*(clientSpace-padding)+gap2*i);targetEl&&(targetEl.style.scrollSnapAlign="start",newTargetElements.push(targetEl))}targetElements=newTargetElements}if(!Math.ceil((scrollSpace-padding)/(clientSpace-padding))||Math.ceil(Math.round((scrollSpace-padding)/(clientSpace-padding)*100)/100)===1/0)return 0;const breakPointIndex=[...new Array(Math.ceil(Math.round((scrollSpace-padding)/(clientSpace-padding)*100)/100))].reduce((acc,_,index)=>(breakPoints[index]=(clientSpace-padding)*index+index*gap,!acc&&(clientSpace-padding)*index+index*gap>=scrollSpace-padding?(breakPoints[index]=(clientSpace-padding)*index+(index-1)*gap,index):acc),0);if(targetElements.length){if(usesCenteredSnap(targetElements,horizontal2))return breakPoints=targetElements.map(el=>getSnapPositionForChild(el,horizontal2)),breakPoints.length||1;const scrollPaddingStart=horizontal2?containerStyles2.scrollPaddingLeft:containerStyles2.scrollPaddingTop,paddingEnd=horizontal2?containerStyles2.paddingRight:containerStyles2.paddingBottom,maxScroll=scrollSpace-clientSpace,lastElement=targetElements[targetElements.length-1];if(lastElement[horizontal2?"offsetLeft":"offsetTop"]+lastElement[horizontal2?"offsetWidth":"offsetHeight"]<=clientSpace&&maxScroll<=paddingEnd+10)return 1;if(!snapToSlide){const visibleArea=clientSpace-paddingEnd;let elementsFullyVisible=0;for(const el of targetElements){const elStart=el[horizontal2?"offsetLeft":"offsetTop"]-scrollPaddingStart,elEnd=elStart+el[horizontal2?"offsetWidth":"offsetHeight"],visiblePortion=Math.min(elEnd,visibleArea)-Math.max(elStart,0),elSize=el[horizontal2?"offsetWidth":"offsetHeight"];elStart>=0&&visiblePortion>=elSize*.8&&elementsFullyVisible++}const elementsOutside=targetElements.length-elementsFullyVisible;return elementsOutside>0?elementsOutside+1:1}return targetElements.length}return breakPointIndex||Math.ceil(Math.round((scrollSpace-padding)/(clientSpace-padding)*100)/100)},"calculateSlideCount"),state=window.Alpine.reactive({random_id,autoRotate,container,rotateInterval:null,rotatePause:!1,justify:containerStyles.justifyContent,current_index:0,infinite:!1,paddingX:containerStyles.paddingLeft+containerStyles.paddingRight,paddingY:containerStyles.paddingTop+containerStyles.paddingBottom,gap:(horizontal?containerStyles.columnGap:containerStyles.rowGap)||0,slide_count:calculateSlideCount(containerStyles[horizontal?"paddingLeft":"paddingTop"]+containerStyles[horizontal?"paddingRight":"paddingBottom"],horizontal?containerStyles.columnGap:containerStyles.rowGap||0,container?.[horizontal?"scrollWidth":"scrollHeight"],container?.[horizontal?"clientWidth":"clientHeight"]),block_scroll_events:!1,horizontal}),markCenteredChild=__name(children2=>
1{const horizontal2=isHorizontal(),centerX=container?.[horizontal2?"scrollLeft":"scrollTop"]+container?.[horizontal2?"clientWidth":"clientHeight"]/2;let closest=null,minDist=1/0;children2.forEach(child=>{const center=child?.[horizontal2?"offsetLeft":"offsetTop"]+child?.[horizontal2?"clientWidth":"clientHeight"]/2,dist=Math.abs(center-centerX);dist<minDist&&(minDist=dist,closest=child)}),children2.forEach(child=>{child.classList.toggle("centered",child===closest)})},"markCenteredChild"),initInfiniteScroll=__name((index=0,force=!1)=>{children=[...container.children].filter(el=>el.tagName!=="STYLE"&&el.tagName!=="TEMPLATE").toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order);const containerStyles2=getTransformedComputedStyle(container);if(size=children.filter(el=>el.hasAttribute("data-original-node"))?.length||children.length,!shouldInfinite()&&state.infinite&&([...container.children].forEach(el=>{el.hasAttribute("data-original-node")?el.style.order="":el.remove()}),state.infinite=!1,children=[...container.children].filter(el=>el.tagName!=="STYLE"&&el.tagName!=="TEMPLATE").toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order)),shouldInfinite()&&(!state.infinite||force)){const visibleSpace=container.getBoundingClientRect()?.[horizontal?"width":"height"],gapSize=containerStyles2?.[horizontal?"columnGap":"rowGap"]||0,totalContentSpace=[...container.children].filter(el=>el.tagName!=="STYLE"&&el.tagName!=="TEMPLATE").reduce((sum,child,index2)=>sum+child.getBoundingClientRect()?.[horizontal?"width":"height"]+(index2===0?0:gapSize),0);if(totalContentSpace>visibleSpace){state.infinite=!0;const leftClones=2*size;if(children=[...new Array(size*5)].map((_,idx)=>{const order_index=idx-leftClones,wrappedIdx=(order_index%size+size)%size,original=children[wrappedIdx];if(order_index>=0&&order_index<size)return original.style.order=`${order_index}`,original.setAttribute("data-original-node","true"),original;const newChild=original.cloneNode(!0);return newChild.style.order=`${order_index}`,newChild.removeAttribute("data-original-node"),newChild.querySelectorAll("[x-defer-active]").forEach(el=>el.removeAttribute("x-defer-active")),newChild.removeAttribute("x-defer-active"),container.append(newChild),newChild})?.sort((a,b)=>+a.style.order-+b.style.order),container[horizontal?"scrollWidth":"scrollHeight"]<totalContentSpace)requestAnimationFrame(()=>{const scrollPadding=getTransformedComputedStyle(container)[horizontal?"scrollPaddingLeft":"scrollPaddingTop"];container[horizontal?"scrollLeft":"scrollTop"]=children[leftClones+index]?.[horizontal?"offsetLeft":"offsetTop"]-scrollPadding,children.forEach(child=>{child.classList.toggle("scroll-active",+getComputedStyle(child).order==0)})});else{const scrollPadding=containerStyles2[horizontal?"scrollPaddingLeft":"scrollPaddingTop"];container[horizontal?"scrollLeft":"scrollTop"]=children[leftClones+index]?.[horizontal?"offsetLeft":"offsetTop"]-scrollPadding}}children.forEach(child=>{child.classList.toggle("scroll-active",+getComputedStyle(child).order==0)}),markCenteredChild(children)}children.forEach((child,index2)=>child.setAttribute("data-index",`${index2}`))},"initInfiniteScroll");initInfiniteScroll();const handleInfiniteScroll=__name(()=>{if(state.block_scroll_events||!state.infinite)return;const containerStyles2=getTransformedComputedStyle(container);container.parentElement.style.setProperty("--slider-height",`${container.offsetHeight}px`),container.parentElement.style.setProperty("--slider-width",`${container?.clientWidth-containerStyles2.paddingLeft-containerStyles2.paddingRight}px`),children=[...children];const scrollKey=state.horizontal?"scrollLeft":"scrollTop",currentScroll=container[scrollKey],targetIndex=children.reduce((best,child,index)=>{const snapPos=getSnapPositionForChild(child,state.horizontal),distance=Math.abs(snapPos-currentScroll);return distance<best.distance?{index,distance}:best},{index:-1,distance:1/0}).index;if(targetIndex===-1)return;const offsetKey=state.horizontal?"offsetLeft":"offsetTop",target=children[targetIndex],targetOffsetBefore=target[offsetKey];state.block_scroll_events=!0,children=[...children].map((child,index)=>{const targetOrder=index-targetIndex;return child.style.order=targetOrder>=-2*size&&targetOrder<3*size?`${targetOrder}`:targetOrder<-2*size?`${targetOrder+size*5}`:`${targetOrder-size*5}`,child})?.sort((a,b)=>+a.style.order-+b.style.order),container[scrollKey]=currentScroll+(target[offsetKey]-targetOffsetBefore),Alpine.nextTick(()=>{state.block_scroll_events=!1;const children2=[...container.children].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none");if(state.infinite&&children2?.length){const targetIndex2=children2?.findIndex(child=>+child.style.order==0);state.current_index=targetIndex2%size,children2.forEach((child,index)=>{child.classList.toggle("scroll-active",index===targetIndex2)})}})},"handleInfiniteScroll");let lastSliderHeight=-1,lastSliderWidth=-1;const updateScrollState=__name(()=>{if(state.block_scroll_events)return;if(state.infinite){const sliderHeight=container.offsetHeight,sliderWidth=container?.clientWidth-state.paddingX;
1(sliderHeight!==lastSliderHeight||sliderWidth!==lastSliderWidth)&&(lastSliderHeight=sliderHeight,lastSliderWidth=sliderWidth,container.parentElement.style.setProperty("--slider-height",`${sliderHeight}px`),container.parentElement.style.setProperty("--slider-width",`${sliderWidth}px`))}const currentIndex=breakPoints.findIndex(num=>container[state.horizontal?"scrollLeft":"scrollTop"]>=num-20&&container[state.horizontal?"scrollLeft":"scrollTop"]<=num+20),closest=breakPoints.reduce((acc,num)=>Math.abs(num-container[state.horizontal?"scrollLeft":"scrollTop"])<Math.abs(acc-container[state.horizontal?"scrollLeft":"scrollTop"])?num:acc,0),closestIndex=breakPoints.findIndex(num=>closest===num),sortedActiveChildren=[...container.children].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none")?.toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order);if(state.infinite&&sortedActiveChildren?.length){const targetIndex=sortedActiveChildren?.findIndex(child=>+child.style.order==0);sortedActiveChildren.forEach((child,index)=>{child.classList.toggle("scroll-active",index===targetIndex)}),markCenteredChild(sortedActiveChildren);return}if(sortedActiveChildren?.length){if(usesCenteredSnap(sortedActiveChildren,state.horizontal)){const scrollPosition=container[state.horizontal?"scrollLeft":"scrollTop"],snapPositions=sortedActiveChildren.map(child=>getSnapPositionForChild(child,state.horizontal));breakPoints=[...snapPositions];const targetIndex2=snapPositions.reduce((closestIndex2,position,index)=>{const closestDistance=Math.abs(snapPositions[closestIndex2]-scrollPosition);return Math.abs(position-scrollPosition)<closestDistance?index:closestIndex2},0);state.current_index=targetIndex2,sortedActiveChildren.forEach((child,index)=>{child.classList.toggle("scroll-active",index===state.current_index)}),markCenteredChild(sortedActiveChildren);return}if(container?.[state.horizontal?"clientWidth":"clientHeight"]+container[state.horizontal?"scrollLeft":"scrollTop"]+10>=container[state.horizontal?"scrollWidth":"scrollHeight"]){state.current_index=state.slide_count-1,markCenteredChild(sortedActiveChildren);return}const style=window.getComputedStyle(container),paddingStart=state.horizontal?parseFloat(style.paddingLeft)||0:parseFloat(style.paddingTop)||0,triggerPos=container[state.horizontal?"scrollLeft":"scrollTop"]+paddingStart+10,targetIndex=sortedActiveChildren.findIndex(child=>{const start=child[state.horizontal?"offsetLeft":"offsetTop"],end=start+child[state.horizontal?"clientWidth":"clientHeight"];return start<=triggerPos&&end>triggerPos});state.current_index=targetIndex===-1?state.current_index:targetIndex,sortedActiveChildren.forEach((child,index)=>{child.classList.toggle("scroll-active",index===state.current_index)}),markCenteredChild(sortedActiveChildren);return}state.current_index=currentIndex!==-1?currentIndex:closestIndex!==-1?closestIndex:state.current_index,markCenteredChild(sortedActiveChildren)},"updateScrollState");let scrollFrame=0;const handleScroll=__name(()=>{scrollFrame||(scrollFrame=requestAnimationFrame(()=>{scrollFrame=0,updateScrollState()}))},"handleScroll"),handleResize=__name(()=>{const{paddingLeft,paddingRight,paddingTop,paddingBottom,rowGap,columnGap}=getTransformedComputedStyle(container);state.paddingX=paddingLeft+paddingRight,state.paddingY=paddingTop+paddingBottom,state.horizontal=isHorizontal(),state.gap=(state.horizontal?columnGap:rowGap)||0,state.slide_count=calculateSlideCount(),initInfiniteScroll(state.current_index),container.classList.toggle("cursor-grab",enable_mouse_dragging&&!state.infinite&&isScrollable()),state.justify==="center"&&(container.classList.toggle("!justify-start",container[state.horizontal?"scrollWidth":"scrollHeight"]>container?.[state.horizontal?"clientWidth":"clientHeight"]),updateScrollState()),requestAnimationFrame(()=>{requestAnimationFrame(updateSliderHeightFromVisible)})},"handleResize");let lastResizeWidth=-1,lastResizeHeight=-1,resizeTimeout=0;const handleWindowResize=__name(()=>{clearTimeout(resizeTimeout),resizeTimeout=window.setTimeout(()=>{const width=container.clientWidth,height=container.clientHeight;width===lastResizeWidth&&height===lastResizeHeight||(lastResizeWidth=width,lastResizeHeight=height,handleResize())},150)},"handleWindowResize"),scrollToIndex=__name((index,scrollDuration=speed,force=!1)=>
1{if(!force&&index===state.current_index)return;state.infinite||(index=Math.max(0,Math.min(Math.max(0,state.slide_count-1),index))),container.classList.remove("snap-both","snap-x","snap-y");const containerStyles2=getTransformedComputedStyle(container);state.block_scroll_events=!0;const sortedActiveChildren=[...container.children].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none")?.toSorted((a,b)=>+getComputedStyle(a).order-+getComputedStyle(b).order);if(sortedActiveChildren?.length){const currentIndex=sortedActiveChildren.findIndex(child=>child.classList.contains("scroll-active"));state.infinite&¤tIndex&&(index=currentIndex-state.current_index+index);const target=sortedActiveChildren[index],centeredSnap=!!target&&!state.infinite&&getChildSnapAlign(target,state.horizontal)==="center",targetX=state.horizontal&¢eredSnap?getSnapPositionForChild(target,!0):(target?.offsetLeft??0)-containerStyles2.scrollPaddingLeft,targetY=!state.horizontal&¢eredSnap?getSnapPositionForChild(target,!1):(target?.offsetTop??0)-containerStyles2.scrollPaddingTop;sortedActiveChildren.forEach((child,i)=>{child.classList.toggle("scroll-active",i===index)}),utils.scrollToXY(scrollDuration,targetX,targetY,container,()=>{container.classList.add(state.horizontal?"snap-x":"snap-y"),state.block_scroll_events=!1,updateScrollState(),state.infinite&&handleInfiniteScroll()});return}utils.scrollToXY(scrollDuration,(container?.clientWidth-state.paddingX)*index+index*state.gap,(container?.clientHeight-state.paddingY)*index+index*state.gap,container,()=>{container.classList.add(state.horizontal?"snap-x":"snap-y"),state.block_scroll_events=!1,updateScrollState()})},"scrollToIndex");return state.justify==="center"&&(container.classList.toggle("!justify-start",container[state.horizontal?"scrollWidth":"scrollHeight"]>container?.[state.horizontal?"clientWidth":"clientHeight"]),state.paddingX=containerStyles.paddingLeft+containerStyles.paddingRight,state.paddingY=containerStyles.paddingTop+containerStyles.paddingBottom,state.horizontal=isHorizontal(),state.gap=(state.horizontal?containerStyles.columnGap:containerStyles.rowGap)||0,state.slide_count=calculateSlideCount(),updateScrollState()),autoRotate&&Alpine.effect(()=>{autoRotate&&(!state.rotateInterval&&!state.rotatePause&&(state.rotateInterval=setInterval(()=>{if(state.infinite){const target=[...container.children].find(child=>+getComputedStyle(child).order==1);if(target){container.classList.remove("snap-both","snap-x","snap-y");const containerStyles2=getTransformedComputedStyle(container);state.block_scroll_events=!0,utils.scrollToXY(speed,(target?.offsetLeft??0)-containerStyles2.scrollPaddingLeft,(target?.offsetTop??0)-containerStyles2.scrollPaddingTop,container,()=>{container.classList.add(state.horizontal?"snap-x":"snap-y"),state.block_scroll_events=!1,updateScrollState(),state.infinite&&handleInfiniteScroll()});return}}scrollToIndex(state.current_index+1>=state.slide_count?0:state.current_index+1)},autoRotate*1e3)),state.rotateInterval&&state.rotatePause&&(clearInterval(state.rotateInterval),state.rotateInterval=null))}),container.classList.add(state.horizontal?"snap-x":"snap-y"),enable_mouse_dragging&&__name(container2=>{let isDragging=!1,dragged=!1,startX,startY,scrollLeft,scrollTop;container2.classList.toggle("cursor-grab",enable_mouse_dragging&&!state.infinite&&isScrollable());const deactivateCursor=__name(()=>{container2.classList.remove("cursor-grab")},"deactivateCursor"),addDraggingCursor=__name(()=>{document.body.classList.add("dragging")},"addDraggingCursor"),removeDraggingCursor=__name(()=>{document.body.classList.remove("dragging")},"removeDraggingCursor"),smoothSnapToClosestChild=__name(()=>{const children2=Array.from(container2.children);if(!children2.length)return;const horizontal2=container2.scrollWidth>container2.clientWidth,style=getComputedStyle(container2),padStart=horizontal2?parseFloat(style.paddingLeft)||0:parseFloat(style.paddingTop)||0,scrollPos=horizontal2?container2.scrollLeft:container2.scrollTop,snapStart=__name(el=>(horizontal2?el.offsetLeft:el.offsetTop)-padStart,"snapStart");let closest=null,minDist=1/0;for(const child of children2){const start=snapStart(child),dist=Math.abs(start-scrollPos);dist<minDist&&(minDist=dist,closest=child)}
1if(!closest)return;const targetPos=snapStart(closest);container2.scrollTo({[horizontal2?"left":"top"]:targetPos,behavior:"smooth"}),setTimeout(()=>{container2.style.scrollSnapType=""},400)},"smoothSnapToClosestChild"),onMouseDown=__name(e=>{state.infinite||document.body.classList.contains("dragging")||isScrollable()&&(isDragging=!0,dragged=!1,startX=e.pageX-container2.offsetLeft,startY=e.pageY-container2.offsetTop,scrollLeft=container2.scrollLeft,scrollTop=container2.scrollTop,addDraggingCursor(),container2.style.scrollSnapType="none",e.preventDefault())},"onMouseDown"),onMouseMove=__name(e=>{if(!isDragging)return;dragged=!0;const x=e.pageX-container2.offsetLeft,y=e.pageY-container2.offsetTop,walkX=(x-startX)*1.5,walkY=(y-startY)*2;container2.scrollLeft=scrollLeft-walkX,container2.scrollTop=scrollTop-walkY},"onMouseMove"),onMouseUp=__name(()=>{isDragging&&(isDragging=!1,removeDraggingCursor(),dragged?smoothSnapToClosestChild():container2.style.scrollSnapType="")},"onMouseUp"),onClickCapture=__name(e=>{dragged&&(e.stopPropagation(),e.preventDefault(),dragged=!1)},"onClickCapture");container2.addEventListener("mousedown",onMouseDown),window.addEventListener("mousemove",onMouseMove,!0),window.addEventListener("mouseup",onMouseUp,!0),container2.addEventListener("click",onClickCapture,!0),new ResizeObserver(()=>{isScrollable()?container2.classList.toggle("cursor-grab",enable_mouse_dragging&&!state.infinite&&isScrollable()):deactivateCursor()}).observe(container2),new MutationObserver(()=>{isScrollable()?container2.classList.toggle("cursor-grab",enable_mouse_dragging&&!state.infinite&&isScrollable()):deactivateCursor()}).observe(container2,{childList:!0,subtree:!0})},"enableDragScroll")(container),Alpine.nextTick(()=>{handleResize(),updateScrollState(),handleInfiniteScroll()}),new ResizeObserver(()=>{handleResize(),updateScrollState(),handleInfiniteScroll()}).observe(container),{content_slider:{container,state,handleInfiniteScroll,handleScroll,handleResize,handleWindowResize,scrollToIndex,calculateSlideCount,initInfiniteScroll}}},"initContentSlider"),JSONParse=__name((object,origin="")=>{if(object===void 0)return null;try{return JSON.parse(object)}catch{return null}},"JSONParse"),getImageSrcSet=__name((src,maxWidth)=>src?src.includes("?")?[48,96,256,384,460,640,960,1200,1440,1920,3840].map((number,index,arr)=>maxWidth&&arr[index-1]>maxWidth?null:`${src}&width=${number} ${number}w`)?.filter(d=>!!d).join(","):[48,96,256,384,460,640,960,1200,1440,1920,3840].map((number,index,arr)=>maxWidth&&arr[index-1]>maxWidth?null:`${src}?width=${number} ${number}w`)?.filter(d=>!!d).join(","):"","getImageSrcSet"),getReviewStarGradients=__name((rating,position)=>`url(#star-rating-${rating<position-1?0:rating<position&&rating>position-1?Math.floor((rating-(position-1))*100/25)*25:100})`,"getReviewStarGradients"),pushSearchParams=__name(({update={},remove=[],title})=>{const url=new URL(window.location.href);Object.entries(update).forEach(([key,value])=>{url.searchParams.set(key,`${value}`)}),remove.forEach(key=>{url.searchParams.delete(key)}),window.history.pushState(null,null,url)},"pushSearchParams"),replaceSearchParams=__name(({update={},remove=[],title})=>{const url=new URL(window.location.href);Object.entries(update).forEach(([key,value])=>{url.searchParams.set(key,`${value}`)}),remove.forEach(key=>{url.searchParams.delete(key)}),window.history.replaceState(null,null,url)},"replaceSearchParams"),getSiblingUrl=__name(handle=>{const url=new URL(window.location.href);return url.pathname=/\/collections\/[^/]\/products\//gi.test(url.pathname)?url.pathname.replace(/\/products\/[^?]*/gi,`/products/${handle}`):`/products/${handle}`,url.searchParams.delete("variant"),url.searchParams.delete("selling_plan"),url.toString()},"getSiblingUrl"),pushUrlTarget=__name(id=>{const url=new URL(window.location.href);url.hash=id,window.history.replaceState(null,null,url)},"pushUrlTarget"),checkDomain=__name(function(url){return url&&url?.indexOf("//")===0&&(url=location.protocol+url),url.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},"checkDomain"),isExternalURL=__name(function(url){return!url||typeof url!="string"?!1:(url?.indexOf(":")>-1||url?.indexOf("//")>-1)&&checkDomain(location.href)!==checkDomain(url)},"isExternalURL"),transpileRichtextMetafield=__name(schema=>{function convertSchemaToHtml(schema2){let html="";return!Array.isArray(schema2)&&schema2.type==="root"&&(html+=convertSchemaToHtml(schema2.children)),Array.isArray(schema2)&&schema2?.forEach(el=>{switch(el.type){case"paragraph":html+=buildParagraph(el);break;case"heading":html+=buildHeading(el);break;case"list":html+=buildList(el);break;case"list-item":html+=buildListItem(el);break;case"link":html+=buildLink(el);break;case"text":html+=buildText(el);break;default:break}}),html}__name(convertSchemaToHtml,"convertSchemaToHtml");function buildParagraph(el){return el?.children?`<p>${convertSchemaToHtml(el?.children)}</p>`:""}__name(buildParagraph,"buildParagraph");function buildHeading(el){return el?.children?`<h${el?.level}>${convertSchemaToHtml(el?.children)}</h${el?.level}>`:""}__name(buildHeading,"buildHeading");function buildList(el){return el?.children?el?.listType==="ordered"?`<ol>${convertSchemaToHtml(el?.children)}</ol>`:`<ul>${convertSchemaToHtml(el?.children)}</ul>`:""}__name(buildList,"buildList");function buildListItem(el){return el?.children?`<li>${convertSchemaToHtml(el?.children)}</li>`:""}__name(buildListItem,"buildListItem");function buildLink(el){return`<a href="${el?.url}" title="${el?.title}" target="${el?.target}">
1${convertSchemaToHtml(el?.children)}</a>`}__name(buildLink,"buildLink");function buildText(el){return el?.bold?`<strong>${el?.value}</strong>`:el?.italic?`<em>${el?.value}</em>`:el?.value}return __name(buildText,"buildText"),convertSchemaToHtml(schema)},"transpileRichtextMetafield"),clsx=__name((...props)=>{let i=0,tmp,str="";const len=props.length;for(;i<len;i++)(tmp=props[i])&&typeof tmp=="string"&&(str+=(str&&" ")+tmp);return str},"clsx"),shortUUID=__name(()=>{let firstPart=Math.random()*46656|0,secondPart=Math.random()*46656|0;return firstPart=`000${firstPart.toString(36)}`.slice(-3),secondPart=`000${secondPart.toString(36)}`.slice(-3),firstPart+secondPart},"shortUUID"),isEmail=__name(str=>str?/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(str):!1,"isEmail"),formatMoney=__name((cents,money_format,no_rounding=!0)=>{if(!cents&¢s!==0)return"";function n(t,e){return t===void 0?e:t}__name(n,"n");function o(t,e,o2,i2){if(e=n(e,2),o2=n(o2,","),i2=n(i2,"."),isNaN(t)||t===null)return 0;const r2=(t=(t/100).toFixed(e)).split(".");return r2[0].replace(/(\\d)(?=(\\d\\d\\d)+(?!\\d))/g,`$1${o2}`)+(r2[1]?i2+r2[1]:"")}__name(o,"o"),typeof cents=="string"&&(cents=cents.replace(".",""));let i="";const r=/{{\s*(\w+)\s*}}/,a=money_format||window.money_format||"${{amount}}";switch(a.match(r)[1]){case"amount":i=o(cents,2);break;case"amount_no_decimals":{if(no_rounding&&+cents%100>0){i=o(cents,2);break}i=o(cents,0);break}case"amount_with_comma_separator":i=o(cents,2,".",",");break;case"amount_with_space_separator":i=o(cents,2," ",",");break;case"amount_with_period_and_space_separator":i=o(cents,2," ",".");break;case"amount_no_decimals_with_comma_separator":i=o(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":i=o(cents,0," ");break;case"amount_with_apostrophe_separator":i=o(cents,2,"'",".")}return a.replace(r,i)},"formatMoney");window.formatMoney=formatMoney;var roundToIndex=__name(function(x,index=0){const power=Math.pow(10,-index);return Math.round(x*power)/power},"roundToIndex"),easeInOutQuad=__name(({currentTime,start,change,duration})=>{let newCurrentTime=currentTime;return newCurrentTime/=duration/2,newCurrentTime<1?change/2*newCurrentTime*newCurrentTime+start:(newCurrentTime-=1,-change/2*(newCurrentTime*(newCurrentTime-2)-1)+start)},"easeInOutQuad"),scrollToY=__name((duration,to,container=window,callback=()=>{})=>{const start=container instanceof HTMLElement?container.scrollTop:container.scrollY,change=to-start,startDate=new Date().getTime(),animateScroll=__name(()=>{const currentTime=new Date().getTime()-startDate;container.scrollTo(0,easeInOutQuad({currentTime,start,change,duration})),currentTime<duration?requestAnimationFrame(animateScroll):(container.scrollTo(0,to),callback())},"animateScroll");animateScroll()},"scrollToY"),scrollToX=__name((duration,to,container=window,callback=()=>{})=>{const start=container instanceof HTMLElement?container.scrollLeft:container.scrollX,change=to-start,startDate=new Date().getTime(),animateScroll=__name(()=>{const currentTime=new Date().getTime()-startDate;container.scrollTo(easeInOutQuad({currentTime,start,change,duration}),0),currentTime<duration?requestAnimationFrame(animateScroll):(container.scrollTo(to,0),callback())},"animateScroll");animateScroll()},"scrollToX"),scrollToXY=__name((duration,x,y,container=window,callback=()=>{})=>{const startX=container instanceof HTMLElement?container.scrollLeft:container.scrollX,startY=container instanceof HTMLElement?container.scrollTop:container.scrollY,changeX=x-startX,changeY=y-startY,startDate=Date.now(),animateScroll=__name(()=>{const currentTime=Date.now()-startDate;container.scrollTo(easeInOutQuad({currentTime,start:startX,change:changeX,duration}),easeInOutQuad({currentTime,start:startY,change:changeY,duration})),currentTime<duration?requestAnimationFrame(animateScroll):(container.scrollTo(x,y),callback())},"animateScroll");animateScroll()},"scrollToXY"),isElementScrollable=__name(element=>{if(!element)return!1;const{overflowX,overflowY}=getComputedStyle(element),isScrollableX=element.scrollWidth>element.clientWidth&&overflowX!=="visible",isScrollableY=element.scrollHeight>element.clientHeight&&overflowY!=="visible";return isScrollableX||isScrollableY},"isElementScrollable");function getElementPosition(element){const box=element.getBoundingClientRect(),body=document.body,docEl=document.documentElement,scrollTop=window.pageYOffset||docEl.scrollTop||body.scrollTop,scrollLeft=window.pageXOffset||docEl.scrollLeft||body.scrollLeft,clientTop=docEl.clientTop||body.clientTop||0,clientLeft=docEl.clientLeft||body.clientLeft||0,top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;
1return{top:Math.round(top),left:Math.round(left)}}__name(getElementPosition,"getElementPosition");var getElementOffset=__name(el=>{const rect=el.getBoundingClientRect(),scrollLeft=window.pageXOffset||document.documentElement.scrollLeft,scrollTop=window.pageYOffset||document.documentElement.scrollTop;return{top:rect.top+scrollTop,left:rect.left+scrollLeft}},"getElementOffset");function delay(ms){return new Promise(resolve=>setTimeout(resolve,ms))}__name(delay,"delay");var debounce=__name((callback,wait=1)=>{let timeoutId=null;return(...args)=>{window.clearTimeout(timeoutId),timeoutId=window.setTimeout(()=>{callback(...args)},wait)}},"debounce"),findAllScrollableParents=__name(element=>{const scrollableParents=[];let parent=element.parentElement;for(;parent;){const overflowY=window.getComputedStyle(parent).getPropertyValue("overflow-y");(overflowY==="auto"||overflowY==="scroll")&&scrollableParents.push(parent),parent=parent.parentElement}return document.scrollingElement&&scrollableParents.push(document.scrollingElement),scrollableParents.push(window),scrollableParents},"findAllScrollableParents"),handlelize=__name(str=>(str=str.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/([^\w]+|\s+)/g,"-").replace(/--+/g,"-").replace(/(^-+|-+$)/g,"").toLowerCase(),str),"handlelize"),serializeForm=__name(formElement=>{const obj={},formData=new FormData(formElement);for(const key of formData.keys())obj[key]=formData.get(key);return obj},"serializeForm"),deepEqual=__name((a,b)=>{if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;let length,i,keys;if(Array.isArray(a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!deepEqual(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys=Object.keys(a),length=keys.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return!1;for(i=length;i--!==0;){const key=keys[i];if(!deepEqual(a[key],b[key]))return!1}return!0}return a!==a&&b!==b},"deepEqual");window.clsx=clsx;var isVisible=__name((elem,isParent=!1)=>{if(!(elem instanceof Element))return!1;const style=getComputedStyle(elem);return style.display==="none"||!isParent&&style.pointerEvents==="none"||style.visibility!=="visible"||+style.opacity<.1||elem.offsetWidth+elem.offsetHeight+elem.getBoundingClientRect().height+elem.getBoundingClientRect().width===0?!1:elem.parentElement?isVisible(elem.parentElement,!0):!0},"isVisible"),isInViewport=__name(element=>{const{y}=element.getBoundingClientRect();return!(y>window.innerHeight||y<0)},"isInViewport"),getBracketInputDynamicText=__name((content,object={})=>{let returnValue="";return returnValue=content?.replace(/\[([^\]]*)\]/gi,(...matches)=>{if(!matches[1])return"";if(/^icon\./gi.test(matches[1]))return matches[0];let result=matches?.[1]?.split(".")?.reduce((acc,selector,index,arr)=>!selector||acc[0]===void 0||acc[0]===null?/price$/gi.test(acc[1])&&typeof acc[0]=="number"?[utils2.formatMoney(acc[0]),selector]:/_at$/gi.test(acc[1])&&Date.parse(acc[0])?[new Date(acc[0]).toLocaleDateString(),selector]:typeof acc[0]=="string"&&acc[0].includes("\xAE")?[acc[0].replace(/®/gi,'<sup style="font-size: 0.7em;">\xAE</sup>'),selector]:Array.isArray(acc[0])&&acc[0].every(val=>typeof val=="string"||typeof val=="number")?[acc[0].join(", "),selector]:acc:acc[0]&&typeof acc[0]=="object"&&selector in acc[0]?/price$/gi.test(selector)&&typeof acc[0][selector]=="number"?[utils2.formatMoney(acc[0][selector]),selector]:/_at$/gi.test(selector)&&Date.parse(acc[0][selector])?arr[index+1]?[window.dayjs(acc[0][selector])?.format(arr[index+1]),selector]:[new Date(acc[0][selector]).toLocaleDateString(),selector]:typeof acc[0][selector]=="string"&&acc[0][selector].includes("\xAE")?[acc[0][selector].replace(/®/gi,'<sup style="font-size: 0.7em;">\xAE</sup>'),selector]:index===arr.length-1&&Array.isArray(acc[0][selector])&&acc[0][selector].every(val=>typeof val=="string"||typeof val=="number")?[acc[0][selector].join(", "),selector]:[acc[0][selector],selector]:selector&&typeof acc[0]=="string"?acc:["",""],[object,""])?.[0]??"";return typeof result=="string"&&result?.includes("Default Title")&&(result=result?.replace("Default Title","")),result})??"",returnValue},"getBracketInputDynamicText"),getBracketInputDynamicValue=__name((content,object={})=>{let returnValue=null;return!content||typeof content!="string"?null:(content?.replace(/\[([^\]]*)\]/gi,(...matches)=>matches[1]?(returnValue=matches?.[1]?.split(".")?.reduce((acc,selector)=>!selector||acc[0]===void 0||acc[0]===null?/price$/gi.test(acc[1])&&typeof acc[0]=="number"?[utils2.formatMoney(acc[0]),selector]:/_at$/gi.test(acc[1])&&Date.parse(acc[0])?[new Date(acc[0]).toLocaleDateString(),selector]:typeof acc[0]=="string"&&acc[0].includes("\xAE")?[acc[0].replace(/®/gi,'<sup style="font-size: 0.7em;">\xAE</sup>'),selector]:acc:acc[0]&&selector in acc[0]?/price$/gi.test(selector)&&typeof acc[0][selector]=="number"?[utils2.formatMoney(acc[0][selector]),selector]:/_at$/gi.test(selector)&&Date.parse(acc[0][selector])?[new Date(acc[0][selector]).toLocaleDateString(),selector]:typeof acc[0][selector]=="string"&&acc[0][selector].includes("\xAE")?[acc[0][selector].replace(/®/gi,'<sup style="font-size: 0.7em;">\xAE</sup>'),selector]:[acc[0][selector],selector]:["",""],[object,""])?.[0],""):returnValue),returnValue??"")},"getBracketInputDynamicValue");function unescape(htmlStr){return htmlStr=htmlStr.replace(/</g,"<"),htmlStr=htmlStr.replace(/>/g,">"),htmlStr=htmlStr.replace(/"/g,'"'),htmlStr=htmlStr.replace(/'/g,"'"),htmlStr=htmlStr.replace(/&/g,"&"),htmlStr}__name(unescape,"unescape");function setUniformHeightById(id){const elements=document.querySelectorAll(`[data-style-id="${id}"]`);if(elements.length===0)return;let maxHeight=0;
1elements.forEach(element=>{element.style.height="auto";const elementHeight=element.offsetHeight;elementHeight>maxHeight&&(maxHeight=elementHeight)}),elements.forEach(element=>{element.style.height=`${maxHeight}px`})}__name(setUniformHeightById,"setUniformHeightById");var setCookie=__name((cookieName,cookieValue,cookieMinutes=1440)=>{if(typeof window>"u"||typeof document>"u")return!1;const d=new Date;d.setTime(d.getTime()+cookieMinutes*60*1e3);const expires=d.toUTCString();return document.cookie=`${cookieName}=${cookieValue};expires=${expires};path=/;SameSite=Strict;`,!0},"setCookie"),getCookie=__name(cookieName=>{if(typeof window>"u"||typeof document>"u")return!1;const name=`${cookieName}=`,cookieArray=document.cookie.split(";");for(let i=0;i<cookieArray.length;i++){let cookie=cookieArray[i];for(;cookie.charAt(0)===" ";)cookie=cookie.substring(1);if(cookie.indexOf(name)===0)return cookie.substring(name.length,cookie.length)}return!1},"getCookie"),checkCookie=__name(cookieName=>typeof window>"u"||typeof document>"u"?!1:!!cookieName&&document.cookie.includes(`${cookieName}=`),"checkCookie"),removeCookie=__name(cookieName=>{setCookie(cookieName,"",-1)},"removeCookie"),focusSelectorString=`:not(.placeholder) a[href]:not(:where([disabled],[tabindex="-1"])), 2 :not(.placeholder) button:not(:where([disabled],[tabindex="-1"])), 3 :not(.placeholder) textarea:not(:where([disabled],[tabindex="-1"])), 4 :not(.placeholder) input[type="text"]:not(:where([disabled],[tabindex="-1"])), 5 :not(.placeholder) input[type="radio"]:not(:where([disabled],[tabindex="-1"])), 6 :not(.placeholder) input[type="checkbox"]:not(:where([disabled],[tabindex="-1"])), 7 :not(.placeholder) select:not(:where([disabled],[tabindex="-1"])), 8 :not(.placeholder, [tabindex="-1"]) [tabindex]:not(:where([disabled],[tabindex="-1"])`,calculateHeaderHeight=__name(()=>{document.body.style.setProperty("--header-height-offset",`${utils2.roundToIndex(document.querySelector("[data-navigation-bar]")?.getBoundingClientRect().bottom,-2)}px`)},"calculateHeaderHeight"),initYouTube=__name(async()=>{!window.YT&&!window._youtube_initialized&&(window._youtube_initialized=!0,await new Promise(resolve=>{if(!window.onYouTubeIframeAPIReady){window.onYouTubeIframeAPIReady=()=>{resolve(!0),document.dispatchEvent(new CustomEvent("youtube-loaded"))};const tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api",document.head.appendChild(tag)}}))},"initYouTube"),simulateAnchorTag=__name($el=>{if(!$el)return;const modalStore=window.Alpine.store("modal");$el.addEventListener("click",e=>{e.target.closest("a")||!$el.getAttribute("data-href")||(e.preventDefault(),e.stopPropagation(),e.button===1||e.ctrlKey||e.metaKey?window.open($el.getAttribute("data-href"),"_blank","noopener,noreferrer"):e.shiftKey?window.open($el.getAttribute("data-href"),"_blank"):(barba.go($el.getAttribute("data-href")),modalStore.setId("")))}),$el.addEventListener("mousedown",e=>{e.target.closest("a")||!$el.getAttribute("data-href")||(e.button===1||e.ctrlKey||e.metaKey)&&(window.open($el.getAttribute("data-href"),"_blank","noopener,noreferrer"),e.preventDefault())}),$el.addEventListener("keydown",e=>{$el.getAttribute("data-href")&&e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),barba.go($el.getAttribute("data-href")),modalStore.setId(""))})},"simulateAnchorTag"),preloadImage=__name(src=>src?new Promise((resolve,reject)=>{const img=new Image;img.src=src,img.onload=()=>resolve(img),img.onerror=reject}):!0,"preloadImage"),utils2={initCollapsible,initContentSlider,initYouTube,simulateAnchorTag,clsx,getImageSrcSet,JSONParse,getSiblingUrl,calculateHeaderHeight,unescape,preloadImage,setCookie,getCookie,checkCookie,removeCookie,isVisible,isInViewport,getReviewStarGradients,transpileRichtextMetafield,handlelize,delay,debounce,scrollToY,scrollToX,scrollToXY,isElementScrollable,checkDomain,isExternalURL,getElementPosition,getBracketInputDynamicText,getBracketInputDynamicValue,deepEqual,getElementOffset,shortUUID,serializeForm,roundToIndex,formatMoney,findAllScrollableParents,isEmail,pushSearchParams,replaceSearchParams,pushUrlTarget,setUniformHeightById,focusSelectorStr
8ing},utils_default=utils2,startTime=Date.now(),initialized=!1,firstRender=!0,initPageTransitions=__name(()=>{if(initialized)return;const rootContainer=document.querySelector("[data-content-root]"),scrollToTarget=__name(()=>{if(window.location.hash){const target=document?.querySelector(window.location.hash);if(!target)return;if(utils.isElementScrollable(target.parentElement)&&utils.isVisible(target.parentElement)&&utils.isInViewport(target)){target.parentElement.scrollWidth>target.parentElement.offsetWidth&&utils.scrollToXY(260,target.offsetLeft,target.parentElement?.scrollTop,target.parentElement),target.parentElement.scrollHeight>target.parentElement.offsetHeight&&utils.scrollToXY(260,target.parentElement?.scrollLeft,target.offsetTop,target.parentElement);return}const targetPosition=utils.getElementPosition(target)?.top-Math.max(0,document.querySelector(".header-sections-container")?.getBoundingClientRect()?.bottom??0);utils.scrollToY(260+Math.abs(Math.round((window.scrollY-targetPosition)/15)),targetPosition)}},"scrollToTarget");window.Alpine.store("router",{pathname:rootContainer.getAttribute("data-pathname"),template:rootContainer.getAttribute("data-template"),hash:window.location.hash,setValue(key,value){this[key]=value}});const routerStore=window.Alpine.store("router");window.Alpine.magic("router",()=>routerStore),window._stores.router=routerStore,window.Alpine.effect(()=>{}),(window.design_mode||!window.page_transitions_enabled)&&(barba.go=href=>{typeof href=="string"&&window.location.href!==href&&(window.location.href=href)},barba.prefetch=()=>{}),barba.use(barbaPrefetch,{root:document.body,timeout:4e3,limit:0}),document.addEventListener("barba:prefetch:fulfilled",async e=>{typeof idbKeyval<"u"&&!window.design_mode&&requestIdleCallback(async()=>{const url=e.detail.url?.replace(/(\/collections\/[^/]*\/)/gi,"/"),fetchResults=await barba.cache.get(url).request.then(res=>({data:res})),div=document.createElement("div");div.innerHTML=fetchResults?.data?.html,div.querySelectorAll("[data-product-data]")?.forEach(async scriptElement=>{const product=utils.JSONParse(scriptElement.innerHTML);if(product?.handle){const dbKey=`_${window.Shopify.theme.id}-product--${product.handle}`;_products[product.handle]={recommendations_loaded_at:0,related_products:[],complementary_products:[],...await idbKeyval?.get(dbKey)||{},..._products[product.handle]??{},...product,updated_at:Date.now()},await idbKeyval.set(dbKey,_products[product.handle])}}),await idbKeyval.set(`barba-prefetch---${startTime}-//-${url}`,fetchResults)},{timeout:3e3})}),typeof idbKeyval<"u"&&window.theme_settings&&!window.design_mode&&idbKeyval.keys().then(async res=>{res.forEach(async key=>{const[timestamp,cacheKey]=key.replace("barba-prefetch---","").split("-//-");cacheKey&&+timestamp>Date.now()-1e3*60*10?barba.cache.set(cacheKey,idbKeyval.get(key).then(res2=>res2.data),"prefetch"):cacheKey&&+timestamp>0&&idbKeyval.del(key)}),await delay(100),barba.timeout=window.origin.includes("127.0.0.1")?3e4:4e3}).catch(async err=>{await delay(100),barba.timeout=window.origin.includes("127.0.0.1")?3e4:4e3});const transitionOverlay=document.querySelector("[data-transition-overlay]");barba.init({prefetchIgnore:["/challenge","/gift_cards","/search","/account","/account/:any","/customer_identity","/customer_identity/:any","/apps","/apps/:any","/cart",...window.page_transitions_ignore??[]].filter(Boolean),cacheIgnore:["/challenge","/gift_cards","/search","/account","/account/:any","/customer_identity","/customer_identity/:any","/apps","/apps/:any","/cart",...window.page_transitions_ignore??[]].filter(Boolean),debug:!1,cacheFirstPage:!0,timeout:window.origin.includes("127.0.0.1")?3e4:4e3,transitions:[{name:"opacity-transition",leave:__name(data=>{transitionOverlay.classList.add("active","out-active")},"leave"),enter:__name(data=>{const handleTransitionend=__name(()=>{transitionOverlay.classList.remove("out-active"),transitionOverlay.removeEventListener("transitionend",handleTransitionend)},"handleTransitionend");transitionOverlay.classList.remove("active"),transitionOverlay.addEventListener("transitionend",handleTransitionend),window.scrollTo({top:0,behavior:"instant"})},"enter")}],views:[{beforeLeave:__name(data=>{window._stores?.modal?.setId("")},"beforeLeave"),namespace:"tmp",afterLeave(data){routerStore.setValue("pathname",window.location.pathname),data?.next?.container&&routerStore.setValue("template",data?.next?.container?.getAttribute("data-template"))},afterEnter:__name(data=>{data?.current?.container?.remove(),window._stores.quickView.show=!1,window._stores?.modal?.setId("");const productDataContainer=data.next.container?.querySelector("[data-product-data-init]");if(productDataContainer){const newScriptTag=document.createElement("script");newScriptTag.innerHTML=productDataContainer.innerText,newScriptTag.setAttribute("data-product-data-init",""),document.head.appendChild(newScriptTag)}data?.next?.container&&!firstRender&&utils.delay(60).then(()=>{scrollToTarget(),requestIdleCallback(()=>{const html=document.createElement("html");
8html.innerHTML=data.next?.html,html.querySelectorAll(".shopify-block.shopify-app-block").forEach(element=>{const currentElement=document.getElementById(element.id);currentElement.parentNode.replaceChild(element,currentElement)});const contentScripts=html.querySelectorAll("[data-content-root] script[src]");html.querySelectorAll(":not([data-content-root]) script[src]").forEach(scriptElement=>{if(!(document.head.querySelector(`script[src*="${scriptElement.src.split("?")[0]?.split("/").at(-1)}"]`)||[...contentScripts].includes(scriptElement))){const newScriptTag=document.createElement("script");scriptElement.getAttributeNames().forEach(name=>{newScriptTag.setAttribute(name,scriptElement.getAttribute(name))}),document.head.appendChild(newScriptTag)}}),document.querySelectorAll("[data-content-root] script:not(script[src],[data-product-data],[type='application/json'])").forEach(scriptElement=>{const newScriptTag=document.createElement("script");newScriptTag.innerHTML=scriptElement.innerHTML,scriptElement.getAttributeNames().forEach(name=>{newScriptTag.setAttribute(name,scriptElement.getAttribute(name))}),scriptElement.parentNode.replaceChild(newScriptTag,scriptElement)}),document.querySelectorAll("[data-content-root] script[src]").forEach(scriptElement=>{const newScriptTag=document.createElement("script");scriptElement.getAttributeNames().forEach(name=>{newScriptTag.setAttribute(name,scriptElement.getAttribute(name))}),scriptElement.parentNode.replaceChild(newScriptTag,scriptElement)})},{timeout:300})}),firstRender||requestIdleCallback(()=>{document.dispatchEvent(new Event("DOMContentLoaded")),window.dispatchEvent(new Event("DOMContentLoaded")),document.dispatchEvent(new CustomEvent("pageFullyLoaded",{})),Shopify?.PaymentButton?.init()}),firstRender=!1},"afterEnter")}]}),barba.timeout=1,initialized=!0},"initPageTransitions"),initPagination=__name(()=>{},"initPagination"),_pagination={init:__name((paginationContainer,container)=>({paginateToUrl:__name(async url=>{if(container)try{container?.querySelectorAll("[class^=product-card--], [class^=collection-card--], [class^=article-card--], [class^=blog-card--], [class^=page-card--]")?.forEach(card=>{card?.classList?.add("button-loading-transparent")});const html=await fetch(url).then(res=>res.text()),newDocument=new DOMParser().parseFromString(html,"text/html"),newContent=newDocument.querySelector(`[data-next-url][x-ref="${container?.getAttribute("x-ref")}"]`),newPagination=newDocument.querySelector('[data-pagination][x-ref="pagination"]');newContent&&(container.innerHTML=newContent.innerHTML),newPagination&&(paginationContainer.innerHTML=newPagination.innerHTML),window.scrollTo({top:container?.getBoundingClientRect().y+window.scrollY-260,behavior:"smooth"}),barba.history.add(url.toString(),"barba","replace")}catch(error){console.error("Error loading new page:",error)}},"paginateToUrl")}),"init")};window._pagination=_pagination;var _product2={hydrateProduct:__name(async product=>{if(!product?.handle&&!product?.id)return null;if((_products[product.handle]?.recommendations_loaded_at??0)>Date.now()-1e3*60*30)return _products[product.handle];const dbKey=`_${window.Shopify.theme.id}-product--${product.handle}`,data=await idbKeyval.get(dbKey);if(_products[product.handle]={recommendations_loaded_at:0,related_products:[],complementary_products:[],...data||{},...product,updated_at:Date.now()},!data||(data.recommendations_loaded_at??0)<Date.now()-1e3*60*30){const[related_products,complementary_products]=await Promise.all([fetch(`/recommendations/products?product_id=${product.id}&limit=10§ion_id=data_product_json&intent=related`).then(res=>res.text()).then(text=>{const html=document.createElement("div");return html.innerHTML=text,utils.JSONParse(html.querySelector("[data-product-recommendations]")?.innerHTML??"[]")}),fetch(`/recommendations/products?product_id=${product.id}&limit=10§ion_id=data_product_json&intent=complementary`).then(res=>res.text()).then(text=>{const html=document.createElement("div");return html.innerHTML=text,utils.JSONParse(html.querySelector("[data-product-recommendations]")?.innerHTML??"[]")})]);_products[product.handle]={..._products[product.handle],related_products,complementary_products,recommendations_loaded_at:Date.now(),updated_at:Date.now()},requestIdleCallback(async()=>{await idbKeyval.set(dbKey,_products[product.handle]),[...related_products??[],...complementary_products??[]].filter((a,i,arr)=>arr.findIndex(b=>a.handle===b.handle)===i).map(async product2=>{const dbKey2=`_${window.Shopify.theme.id}-product--${product2.handle}`;_products[product2.handle]={recommendations_loaded_at:0,related_products:[],complementary_products:[],...await idbKeyval?.get(dbKey2)||{},...product2,updated_at:Date.now()},idbKeyval?.set(dbKey2,_products[product2.handle])})},{timeout:5e3})}return _products[product.handle]},"hydrateProduct"),getHtmlProduct:__name(handle=>
8{const product=JSONParse(document.querySelector(`[data-product-data="${handle}"]`)?.innerHTML);return product?(_products[handle]={recommendations_loaded_at:0,complementary_products:[],related_products:[],..._products[handle]??{},...product,updated_at:Date.now()},_product2.saveProduct(handle),_products[handle]):null},"getHtmlProduct"),getCachedProduct:__name(async handle=>{const dbKey=`_${window.Shopify.theme.id}-product--${handle}`,product=await idbKeyval.get(dbKey);return product&&(product.updated_at??0)>Date.now()-1e3*60*30?(_products[handle]={..._products[handle]??{},...product},_products[handle]):null},"getCachedProduct"),getFetchProduct:__name(async(handle,productId)=>{if(!productId)return null;try{const product=await fetch(`/recommendations/products?product_id=${productId}&limit=10§ion_id=data_product_json&intent=related&with_product_data=true`).then(res=>res.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const product2=utils.JSONParse(html.querySelector("[data-product-data]")?.innerHTML??"{}");return product2.related_products=utils.JSONParse(html.querySelector("[data-product-recommendations]")?.innerHTML??"[]"),requestIdleCallback(async()=>{[...product2.related_products??[]].filter((a,i,arr)=>arr.findIndex(b=>a.handle===b.handle)===i).map(async product3=>{const dbKey=`_${window.Shopify.theme.id}-product--${product3.handle}`;_products[product3.handle]={recommendations_loaded_at:0,related_products:[],complementary_products:[],...await idbKeyval?.get(dbKey)||{},...product3,updated_at:Date.now()},idbKeyval?.set(dbKey,_products[product3.handle])})},{timeout:5e3}),product2.recommendations_loaded_at=Date.now(),product2});return product?(_products[handle]={recommendations_loaded_at:0,complementary_products:[],related_products:[],..._products[handle]??{},...product,updated_at:Date.now()},_products[handle]):null}catch{return null}},"getFetchProduct"),saveProduct:__name((handle,dataOverride=void 0)=>{if(_products[handle]={..._products[handle]??{},...dataOverride??{}},_products[handle]){const dbKey=`_${window.Shopify.theme.id}-product--${handle}`;return requestIdleCallback(async()=>{await idbKeyval.set(dbKey,_products[handle])},{timeout:5e3}),_products[handle]}return null},"saveProduct"),getHydratedProductData:__name(async(handle,productId)=>((!_products[handle]||(_products[handle]?.recommendations_loaded_at??0)<Date.now()-1e3*60*30)&&_product2.getHtmlProduct(handle),(!_products[handle]||(_products[handle]?.recommendations_loaded_at??0)<Date.now()-1e3*60*30)&&await _product2.getCachedProduct(handle),(!_products[handle]||(_products[handle]?.recommendations_loaded_at??0)<Date.now()-1e3*60*30)&&(productId&&await _product2.getFetchProduct(handle,productId),productId||await _product2.getFetchProduct(handle,productId)),!_products[handle]||(_products[handle]?.recommendations_loaded_at??0)<Date.now()-1e3*60*30?null:(_product2.saveProduct(handle),_products[handle])),"getHydratedProductData"),getProductData:__name(async(handle,productId)=>(_products[handle]||_product2.getHtmlProduct(handle),_products[handle]||await _product2.getCachedProduct(handle),_products[handle]||await _product2.getFetchProduct(handle,productId),_products[handle]?(_product2.saveProduct(handle),_products[handle]):null),"getProductData"),lastOptions:{}};window._product=_product2;var initProductData=__name(()=>{},"initProductData"),initProductDrawer=__name(()=>{window.Alpine.store("productDrawer",{show:!1,product:_products[Object.keys(_products)[0]],showProductDrawer({product=_products[Object.keys(_products)[0]]}){this.product=product,this.show=!0}});const productDrawerStore=window.Alpine.store("productDrawer");window.Alpine.magic("productDrawer",()=>productDrawerStore),window._stores.productDrawer=productDrawerStore},"initProductDrawer"),initQuickView=__name(()=>{window.Alpine.store("quickView",{show:!1,loading:!1,handle:"",dynamic_popups:[],container:document.querySelector("[data-quick-view-container]"),show_all_container:document.querySelector("[data-quick-view-show-more]"),loading_container:document.querySelector("[data-quick-view-loading]"),async renderQuickView(
8handle,$data,bundleButton,variantId){const container=this.container;if(this.handle=handle,this.show=!0,this.loading_container.classList.remove("opacity-0","pointer-events-none"),!handle||!container)return;const cacheKey=`${window.location.origin}/products/${handle}`;let cache=barba.cache.get(cacheKey);if(!cache?.request){const key=(await idbKeyval.keys()).find(key2=>key2.includes(cacheKey));key&&(cache=barba.cache.set(cacheKey,idbKeyval?.get(key)?.then(res=>res?.data),"prefetch"))}if(!cache?.request){const data=fetch(cacheKey,{cache:"force-cache"}).then(res=>res.text()).then(html2=>({html:html2,url:{hash:void 0,href:cacheKey,path:`/products/${handle}`}}));cache=barba.cache.set(cacheKey,data,"prefetch"),document.dispatchEvent(new CustomEvent("barba:prefetch:fulfilled",{detail:{url:cacheKey}}))}let request=await cache?.request,html=request?.html;if(!html){const data=fetch(cacheKey,{cache:"force-cache"}).then(res=>res.text()).then(html2=>({html:html2,url:{hash:void 0,href:cacheKey,path:`/products/${handle}`}}));cache=barba.cache.set(cacheKey,data,"prefetch"),request=await cache?.request,html=request?.html,document.dispatchEvent(new CustomEvent("barba:prefetch:fulfilled",{detail:{url:cacheKey}}))}const div=document.createElement("div");div.innerHTML=html;
8const productData=div.querySelector(`[data-product-data="${handle}"]`);div.querySelectorAll("[data-popup]").forEach(popup=>{document.body.appendChild(popup),this.dynamic_popups.push(popup)});const section=div.querySelector('[data-content-root] [data-section-type="product"]');section.querySelector('[x-ref="content"]').classList.add("max-h-full","overflow-y-auto"),section.setAttribute("data-quick-view","true"),this.loading_container.classList.add("opacity-0","pointer-events-none"),container.innerHTML=productData.outerHTML+section?.outerHTML;const stateElement=container.querySelector('[data-section-type="product"]');$data&&bundleButton&&stateElement&&(stateElement.querySelectorAll('[data-block-type="quantity_selector"], [data-block-type="complementary_products"]').forEach(el=>{el.remove()}),stateElement.querySelectorAll('[data-block-type="add_to_cart_button"]').forEach(element=>{const clonedBundleButton=bundleButton.cloneNode(!0);element.innerHTML="",element.appendChild(clonedBundleButton)}),Alpine.nextTick(()=>{stateElement._x_dataStack?.forEach(proxyState=>{proxyState?.card&&proxyState?.bundle&&proxyState?.state&&(proxyState.card=proxyState.state,proxyState.bundle=$data.bundle)})})),variantId&&Alpine.nextTick(()=>{stateElement._x_dataStack?.forEach(proxyState=>{proxyState?.state&&proxyState.setSelectedVariant&&proxyState.setSelectedVariant(+variantId)})}),this.show_all_container.innerHTML=`<button type="button" class="text-black" @click="$quickView.show = false; barba.go('${window.location.origin}/products/${handle}')">Show full details</a>`}});const quickViewStore=window.Alpine.store("quickView"),handleKeydown=__name(e=>{e.key==="Escape"&&(quickViewStore.show=!1)},"handleKeydown");window.Alpine.effect(()=>{document.body.classList.toggle("!overflow-hidden",quickViewStore.show),quickViewStore.show&&document.addEventListener("keydown",handleKeydown),quickViewStore.show||(document.removeEventListener("keydown",handleKeydown),quickViewStore.dynamic_popups?.forEach(element=>{element.remove()}),quickViewStore.dynamic_popups=[])}),window.Alpine.magic("quickView",()=>quickViewStore),window._stores.quickView=quickViewStore},"initQuickView"),initScrollBar=__name(()=>{},"initScrollBar"),_scrollbar={init:__name((bar,thumb,container,scroll_speed=150)=>{const findScrollContainer=__name(element=>element?.parentElement?.querySelector('[x-ref="scrollContainer"]')||findScrollContainer(element.parentElement),"findScrollContainer");bar&&!container&&(container=findScrollContainer(bar));const state=window.Alpine.reactive({currentPage:Math.max(1,Math.min([...container?.children??[]].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none").length,[...container?.children??[]].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none").findIndex(child=>{const center=container?.clientWidth/2+container?.scrollLeft,start=container?.scrollLeft+ +getComputedStyle(container).scrollPaddingLeft.replace("px","").replace("auto","0");return container?.children.length>Math.round(container?.scrollWidth/container?.clientWidth*100)/100?child.offsetLeft-5<=start&&child.offsetLeft+child.clientWidth>start:child.offsetLeft<center&&child.offsetLeft+child.clientWidth>center})+1)),pages:[...container?.children??[]].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none").length,width:container?.clientWidth/container?.scrollWidth*100,left:container?.scrollLeft/container?.scrollWidth*bar.clientWidth/bar.clientWidth,manual_scroll:!1,no_next_page:container?.scrollLeft+container?.clientWidth+25>=container?.scrollWidth}),calculatePosition=__name(()=>{const children=[...container?.children??[]].filter(el=>el.tagName!=="STYLE");state.currentPage=Math.max(1,Math.min(children?.filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none").length-1,children?.filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none").findIndex((child,i,arr)=>{const center=container?.clientWidth/2+container?.scrollLeft,start=container?.scrollLeft+ +getComputedStyle(container).scrollPaddingLeft.replace("px","").replace("auto","0");return arr.length>Math.round(container?.scrollWidth/container?.clientWidth*100)/100?child.offsetLeft-5<=start&&child.offsetLeft+child.clientWidth>start:child.offsetLeft<center&&child.offsetLeft+child.clientWidth>center})+1)),container?.scrollLeft+container?.clientWidth+10>=container?.scrollWidth&&container?.scrollWidth-state.currentPage*container?.clientWidth>20&&(state.currentPage+=1),state.pages=children?.filter(child=>getComputedStyle(child).display!=="none").length,state.width=container?.clientWidth/container?.scrollWidth,state.left=container?.scrollLeft/container?.scrollWidth*bar.clientWidth/bar.clientWidth,state.no_next_page=state.currentPage===state.pages||container?.scrollLeft+container?.clientWidth+25>=container?.scrollWidth},"calculatePosition"),handleScrollBarClick=__name((e,content_slider)=>{const percentage=(e.clientX-bar.getBoundingClientRect().left)/bar.clientWidth-state.width/2*bar.clientWidth/bar.clientWidth;content_slider?.state&&(content_slider.state.block_scroll_events=!0),container?.scrollTo({left:percentage*container?.scrollWidth,behavior:"instant"}),content_slider?.state&&(content_slider.state.block_scroll_events=!1),calculatePosition()},"handleScrollBarClick"),handleScrollThumbPointerDown=__name((e,content_slider)=>{if(!container)return;container.style.scrollSnapType="none";const startX=e.clientX,startLeft=state.left*bar.clientWidth;document.body.classList.add("[&_*]:!cursor-grabbing"),thumb.classList.add("active"),content_slider?.state&&(content_slider.state.block_scroll_events=!0);const handleDocumentPointerMove=__name(e2=>{const percentage=Math.max(0,Math.min(1,(startLeft+e2.clientX-startX)/bar.clientWidth));container?.scrollTo({left:percentage*container?.scrollWidth,behavior:"instant"}),calculatePosition()},"handleDocumentPointerMove"),handleDocumentPointerUp=__name(e2=>{removeEventListeners()},"handleDocumentPointerUp"),removeEventListeners=__name(()=>{document.body.classList.remove("[&_*]:!cursor-grabbing"),thumb.classList.remove("active"),container.style.scrollSnapType="",document.removeEventListener("pointermove",handleDocumentPointerMove),document.removeEventListener("pointerup",handleDocumentPointerUp),content_slider?.state&&(content_slider.state.block_scroll_events=!1)},"removeEventListeners");document.addEventListener("pointermove",handleDocumentPointerMove),document.addEventListener("pointerup",handleDocumentPointerUp)},"handleScrollThumbPointerDown"),handlePrevClick=__name((e,content_slider)=>{if(!container)return;container.style.scrollSnapType="none",content_slider?.state&&(content_slider.state.block_scroll_events=!0);const activeChildren=[...container?.children??[]].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none"&&child.tagName!=="STYLE"),index=Math.max(0,state.currentPage-2<0?activeChildren?.length-1:state.currentPage-2);
8activeChildren.forEach((child,i)=>{child.classList.toggle("scroll-active",i===index)}),utils.scrollToX(scroll_speed,(activeChildren[index]?.offsetLeft??0)-+getComputedStyle(container).scrollPaddingLeft.replace("px","").replace("auto","0"),container,()=>{container.style.scrollSnapType="",calculatePosition(),content_slider?.state&&(content_slider.state.block_scroll_events=!1)})},"handlePrevClick"),handleNextClick=__name((e,content_slider)=>{if(!container)return;container.style.scrollSnapType="none",content_slider?.state&&(content_slider.state.block_scroll_events=!0);const activeChildren=[...container?.children??[]].filter(child=>getComputedStyle(child).display!=="none"&&getComputedStyle(child).scrollSnapAlign!=="none"&&child.tagName!=="STYLE"),index=Math.min(activeChildren.length-1,state.currentPage===activeChildren?.length?0:state.currentPage);activeChildren.forEach((child,i)=>{child.classList.toggle("scroll-active",i===index)}),utils.scrollToX(scroll_speed,(activeChildren[index]?.offsetLeft??0)-+getComputedStyle(container).scrollPaddingLeft.replace("px","").replace("auto","0"),container,()=>{container.style.scrollSnapType="",calculatePosition(),content_slider?.state&&(content_slider.state.block_scroll_events=!1)})},"handleNextClick");let rafPending=!1;const schedule=__name(()=>{rafPending||(rafPending=!0,requestAnimationFrame(()=>{rafPending=!1,calculatePosition()}))},"schedule");return container?.addEventListener("scroll",schedule,{passive:!0}),new MutationObserver(schedule).observe(container,{childList:!0,subtree:!1}),new ResizeObserver(schedule).observe(container,{box:"content-box"}),calculatePosition(),{handleScrollBarClick,handleScrollThumbPointerDown,handlePrevClick,handleNextClick,scrollbar:state,containerRef:container}},"init")};window._scrollbar=_scrollbar;var initSmoothScroll=__name(()=>{const scrollToElementByTargetId=__name(id=>{let target=document.getElementById(id);if(!target)return;if(utils.isElementScrollable(target.parentElement)&&utils.isVisible(target.parentElement)&&utils.isInViewport(target)){target.parentElement.scrollWidth>target.parentElement.offsetWidth&&utils.scrollToXY(260,target.offsetLeft,target.parentElement?.scrollTop,target.parentElement),target.parentElement.scrollHeight>target.parentElement.offsetHeight&&utils.scrollToXY(260,target.parentElement?.scrollLeft,target.offsetTop,target.parentElement);return}target.hasAttribute("data-tab-id")&&(target=target.closest(".shopify-section"));const targetPosition=utils.getElementPosition(target)?.top-Math.max(0,document.querySelector(".header-sections-container")?.getBoundingClientRect()?.bottom??0);utils.scrollToY(260+Math.min(Math.abs(Math.round((window.scrollY-targetPosition)/15)),500),targetPosition)},"scrollToElementByTargetId");document.addEventListener("click",e=>{const link=e.target?.closest('[href*="#"]:not([href*="#modal--"]):not([href*="#popup--"]):not([href*="#drawer--"]):not(use)');if(!link||typeof link.href!="string"||utils.isExternalURL(link.href))return;const id=link.href.split("#")?.at(1)?.split(/[?&]/)?.at(0);!id||!document.getElementById(id)||scrollToElementByTargetId(id)}),window.location.hash&&scrollToElementByTargetId(window.location.hash.replace(/#/gi,""))},"initSmoothScroll"),initToast=__name(()=>{window.Alpine.store("toast",{toasts:[],paused:!1,interval:null,addToast:__name(function({type="plain",target="generic",timestamp=Date.now(),title,content,icon,hide=0}){const defaultIcon={plain:"bolt",warning:"warning-triangle",error:"error-circle",info:"info-circle",success:"check-circle"}[type];this.toasts.push({type,target,timestamp,title,content,icon:icon||defaultIcon,hide}),this.toasts=this.toasts.filter((a,i,arr)=>arr.findIndex(b=>a.title===b.title&&a.content===b.content)===i)},"addToast"),removeAllToasts:__name(function(){this.toasts=[]},"removeAllToasts"),pauseRemoval:__name(function(){this.paused=!0,clearInterval(this.interval),this.interval=null},"pauseRemoval"),continueRemoval:__name(function(){this.paused=!1},"continueRemoval")});const toastStore=window.Alpine.store("toast");window.Alpine.magic("toast",()=>toastStore),window.Alpine.effect(()=>{toastStore.toasts.length&&!toastStore.interval&&!toastStore.paused&&(toastStore.interval=setInterval(()=>{const checkTimestamp=Date.now()-3e3;toastStore.toasts=toastStore.toasts.map(toast=>({...toast,hide:toast.timestamp<checkTimestamp?Date.now():0})),toastStore.toasts.every(toast=>toast.hide&&toast.hide>500)&&(toastStore.toasts=[])},500)),toastStore.interval&&!toastStore.toasts.length&&(clearInterval(toastStore.interval),toastStore.interval=null)}),window._stores.toast=toastStore},"initToast"),initTooltip=__name(()=>{const container=document.querySelector("[data-tooltip-container]");window.Alpine.store("tooltip",{tooltips:new Map,async addTooltip(element,content,position="top"){const currentTooltip=this.tooltips.get(element);if(!currentTooltip){const parents=utils.findAllScrollableParents(element),tooltipElement=document.createElement("div");tooltipElement.innerHTML=content;
8const handleUpdateCoordinates=__name(()=>{const{top,left,right,width,height,bottom}=element.getBoundingClientRect();tooltipElement.classList.add("active"),position==="top"&&(tooltipElement.style.top=`${top}px`,tooltipElement.style.left=`${left+width/2}px`),position==="bottom"&&(tooltipElement.style.top=`${bottom}px`,tooltipElement.style.left=`${left+width/2}px`),position==="left"&&(tooltipElement.style.top=`${top+height/2}px`,tooltipElement.style.left=`${left}px`),position==="right"&&(tooltipElement.style.top=`${top+height/2}px`,tooltipElement.style.left=`${right}px`)},"handleUpdateCoordinates");this.tooltips.set(element,{tooltip:tooltipElement,timeout:null,handleUpdateCoordinates,scrollParents:parents}),container.appendChild(tooltipElement),tooltipElement.classList.add("tooltip",`tooltip--${position}`),await utils.delay(1),handleUpdateCoordinates(),parents.forEach(parent=>{parent.addEventListener("scroll",handleUpdateCoordinates)})}currentTooltip&&(clearTimeout(currentTooltip.timeout),currentTooltip.timeout=null)},async removeTooltip(element){const currentTooltip=this.tooltips.get(element);if(currentTooltip){const tooltip=currentTooltip.tooltip;currentTooltip.timeout=setTimeout(async()=>{tooltip.classList.remove("active"),this.tooltips.delete(element),tooltip.ontransitionend=event=>{tooltip.remove()}},50)}}});const tooltipStore=window.Alpine.store("tooltip");window.Alpine.magic("tooltip",()=>tooltipStore),window._stores.tooltip=tooltipStore},"initTooltip");window.utils=utils_default,document.dispatchEvent(new CustomEvent("theme:utils:loaded")),(()=>{window.onerror=function(...args){return args?.[0]==="Script error."},window.onunhandledrejection=function(event){console.warn("\u{1F6A8} Unhandled Promise Rejection:",event.reason)};const origConsoleWarn=console.warn;window.console.warn=function(...args){if(args?.[0]?.includes("Alpine Expression Error")){const[message,...rest]=args;console.error(`%cAlpine JS Error:%c 9 10${message?.replaceAll(` 11 12`,` 13`)} 14`,"color: red; font-size: 17px; font-weight: 600;","font-weight: 600; font-size: 14px;",...rest);return}return origConsoleWarn.apply(this,args)}})();var initTheme=__name(()=>{!window.location.origin.includes("127.0.0.1")&&Shopify.theme.role==="main"&&(console.log("%cHEY YOU! I see you peeking into the code. This Theme is custom built by Platter.com. This site is powered Alpine.JS, Tailwind CSS & TypeScript integrated into Shopify using our proprietary development tools. https://www.platter.co/","background: rgb(0,0,0);color: #fafafa;font-size: 24px;font-weight: bold;padding: 16px 10px;text-align: center;text-shadow: 2px 2px 0 rgba(45, 45, 45);"),console.log("%cWe are constantly looking for talented developers. If you have Shopify theme development experience under your belt and are keen to explore an exciting tech stack in a fast paced environment. Contact us at [email protected]","background: rgb(0,0,0);color: #fafafa;font-size: 24px;font-weight: bold;padding: 16px 10px;text-align: center;text-shadow: 2px 2px 0 rgba(45, 45, 45);")),window.Alpine.store("editor",{load_section_id:"",unload_section_id:"",select_section_id:"",reorder_section_id:"",select_block_id:"",inspector:!1,setValue(key,value){this[key]=value}});const editor=window.Alpine.store("editor");window.Alpine.magic("editor",()=>editor),initModals(),initAccessibility(),initQuickView(),initProductDrawer(),initCart(),initProductData(),initScrollBar(),initTooltip(),initToast(),initSearch(),initMediaGallery(),initSmoothScroll(),initPageTransitions(),initPagination(),window.design_mode&&document.dispatchEvent(new CustomEvent("theme:editor:init")),document.dispatchEvent(new CustomEvent("theme:init"))},"initTheme");document.addEventListener("alpine:init",initTheme);export{initTheme}; 15//# sourceMappingURL=/cdn/shop/t/125/assets/theme.js.map?v=22221808547651317421790196745
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.