PageSourceSearch

https://taimkitchen.com/cdn/shop/t/73/assets/js-index.js?v=43325321665624896261753989713

js taimkitchen.com collected 2026-10-06 13:41:07 UTC 28,950 bytes, 8 lines download raw bytes

1const initReplaceContentForMobile=(target,originalContent,newContent)=>{function mobileContent(){target.innerText=newContent}isMobile&&mobileContent(),window.addEventListener("resize",function(){isMobile?mobileContent():target.innerText=originalContent})},initComboBox=()=>{"use strict";const SelectActions={Close:0,CloseSelect:1,First:2,Last:3,Next:4,Open:5,PageDown:6,PageUp:7,Previous:8,Select:9,Type:10};function filterOptions(options=[],filter,exclude=[]){return options.filter(option=>option.toLowerCase().indexOf(filter.toLowerCase())===0&&exclude.indexOf(option)<0)}function getActionFromKey(event,menuOpen){const{key,altKey,ctrlKey,metaKey}=event;if(!menuOpen&&["ArrowDown","ArrowUp","Enter"," "].includes(key))return SelectActions.Open;if(key==="Home")return SelectActions.First;if(key==="End")return SelectActions.Last;if(key==="Backspace"||key==="Clear"||key.length===1&&key!==" "&&!altKey&&!ctrlKey&&!metaKey)return SelectActions.Type;if(menuOpen){if(key==="ArrowUp"&&altKey)return SelectActions.CloseSelect;if(key==="ArrowDown"&&!altKey)return SelectActions.Next;if(key==="ArrowUp")return SelectActions.Previous;if(key==="PageUp")return SelectActions.PageUp;if(key==="PageDown")return SelectActions.PageDown;
1if(key==="Escape")return SelectActions.Close;if(key==="Enter"||key===" ")return SelectActions.CloseSelect}}function getIndexByLetter(options,filter,startIndex=0){const orderedOptions=[...options.slice(startIndex),...options.slice(0,startIndex)],firstMatch=filterOptions(orderedOptions,filter)[0],allSameLetter=array=>array.every(letter=>letter===array[0]);if(firstMatch)return options.indexOf(firstMatch);if(allSameLetter(filter.split(""))){const matches=filterOptions(orderedOptions,filter[0]);return options.indexOf(matches[0])}else return-1}function getUpdatedIndex(currentIndex,maxIndex,action){switch(action){case SelectActions.First:return 0;case SelectActions.Last:return maxIndex;case SelectActions.Previous:return Math.max(0,currentIndex-1);case SelectActions.Next:return Math.min(maxIndex,currentIndex+1);case SelectActions.PageUp:return Math.max(0,currentIndex-10);case SelectActions.PageDown:return Math.min(maxIndex,currentIndex+10);default:return currentIndex}}function isElementInView(element){var bounding=element.getBoundingClientRect();return bounding.top>=0&&bounding.left>=0&&bounding.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&bounding.right<=(window.innerWidth||document.documentElement.clientWidth)}function isScrollable(element){return element&&element.clientHeight<element.scrollHeight}function isMobileOrTablet(){const userAgent=navigator.userAgent.toLowerCase();return/iPhone|Android/i.test(navigator.userAgent)||/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent)}function maintainScrollVisibility(activeElement,scrollParent){const{offsetHeight,offsetTop}=activeElement,{offsetHeight:parentOffsetHeight,scrollTop}=scrollParent,isAbove=offsetTop<scrollTop,isBelow=offsetTop+offsetHeight>scrollTop+parentOffsetHeight;isAbove?scrollParent.scrollTo(0,offsetTop):isBelow&&scrollParent.scrollTo(0,offsetTop-parentOffsetHeight+offsetHeight)}const Select=function(el,options=[]){this.el=el,this.selector=this.el.querySelector("select"),this.comboBox=el.querySelector(".combobox"),this.comboEl=document.createElement("div"),this.listboxEl=document.createElement("div"),this.comboEl.setAttribute("aria-controls",`${this.el.id}-listbox`),this.comboEl.setAttribute("aria-expanded",!1),this.comboEl.setAttribute("aria-haspopup","listbox"),this.comboEl.setAttribute("aria-labelledby",`${this.el.id}-label`),this.comboEl.setAttribute("role","combobox"),this.comboEl.setAttribute("tabindex",0),this.comboEl.id=`${this.el.id}-input`,this.comboEl.classList.add("combobox-input"),this.comboBox.prepend(this.comboEl),this.listboxEl.setAttribute("aria-labelledby",`${this.el.id}-label`),this.listboxEl.setAttribute("role","listbox"),this.listboxEl.setAttribute("tabindex","-1"),this.listboxEl.id=`${this.el.id}-listbox`,this.listboxEl.classList.add("combobox-menu"),this.comboBox.prepend(this.listboxEl),this.idBase=this.comboEl.id||"combo",this.options=options,this.activeIndex=0,this.open=!1,this.searchString="",this.searchTimeout=null,el&&this.comboEl&&this.listboxEl&&(this.init(),this.el.querySelector("label").setAttribute("for",`${this.el.id}-select`),this.selector.id=`${this.el.id}-select`,this.selector.addEventListener("change",event=>{event.stopPropagation(),this.onOptionClick(this.selector.selectedIndex)}),isMobileOrTablet()?this.listboxEl.setAttribute("aria-hidden",!0):this.el.classList.add("is-select-hidden"))};Select.prototype.init=function(){this.comboEl.innerHTML=this.options[0],this.comboEl.addEventListener("blur",this.onComboBlur.bind(this)),this.comboEl.addEventListener("click",this.onComboClick.bind(this)),this.comboEl.addEventListener("keydown",this.onComboKeyDown.bind(this)),this.options.map((option,index)=>{const optionEl=this.createOption(option,index);this.listboxEl.appendChild(optionEl)})},Select.prototype.createOption=function(optionText,index){const optionEl=document.createElement("div");return optionEl.setAttribute("role","option"),optionEl.id=`${this.idBase}-${index}`,optionEl.className=index===0?"combobox-option is-option-current":"combobox-option",optionEl.setAttribute("aria-selected",`${index===0}`),optionEl.innerText=optionText,optionEl.addEventListener("click",event=>{event.stopPropagation(),this.onOptionClick(index)}),optionEl.addEventListener("mousedown",this.onOptionMouseDown.bind(this)),optionEl}
1,Select.prototype.getSearchString=function(char){return typeof this.searchTimeout=="number"&&window.clearTimeout(this.searchTimeout),this.searchTimeout=window.setTimeout(()=>{this.searchString=""},500),this.searchString+=char,this.searchString},Select.prototype.onComboBlur=function(){if(this.ignoreBlur){this.ignoreBlur=!1;return}this.open&&(this.selectOption(this.activeIndex),this.updateMenuState(!1,!1))},Select.prototype.onComboClick=function(){this.updateMenuState(!this.open,!1)},Select.prototype.onComboKeyDown=function(event){const{key}=event,max=this.options.length-1,action=getActionFromKey(event,this.open);switch(action){case SelectActions.Last:case SelectActions.First:this.updateMenuState(!0);case SelectActions.Next:case SelectActions.Previous:case SelectActions.PageUp:case SelectActions.PageDown:return event.preventDefault(),this.onOptionChange(getUpdatedIndex(this.activeIndex,max,action));case SelectActions.CloseSelect:event.preventDefault(),this.selectOption(this.activeIndex);case SelectActions.Close:return event.preventDefault(),this.updateMenuState(!1);case SelectActions.Type:return this.onComboType(key);case SelectActions.Open:return event.preventDefault(),this.updateMenuState(!0)}},Select.prototype.onComboType=function(letter){this.updateMenuState(!0);const searchString=this.getSearchString(letter),searchIndex=getIndexByLetter(this.options,searchString,this.activeIndex+1);searchIndex>=0?this.onOptionChange(searchIndex):(window.clearTimeout(this.searchTimeout),this.searchString="")},Select.prototype.onOptionChange=function(index){this.activeIndex=index,this.comboEl.setAttribute("aria-activedescendant",`${this.idBase}-${index}`);const options=this.el.querySelectorAll("[role=option]");[...options].forEach(optionEl=>{optionEl.classList.remove("is-option-current")}),options[index].classList.add("is-option-current"),isScrollable(this.listboxEl)&&maintainScrollVisibility(options[index],this.listboxEl),isElementInView(options[index])||options[index].scrollIntoView({behavior:"smooth",block:"nearest"})},Select.prototype.onOptionClick=function(index){this.onOptionChange(index),this.selectOption(index),this.updateMenuState(!1)},Select.prototype.onOptionMouseDown=function(){this.ignoreBlur=!0},Select.prototype.selectOption=function(index){this.activeIndex=index;const selected=this.options[index];this.comboEl.innerHTML=selected;const options=this.el.querySelectorAll("[role=option]");[...options].forEach(optionEl=>{optionEl.setAttribute("aria-selected","false")}),options[index].setAttribute("aria-selected","true"),this.selector.value=this.selector.querySelectorAll("option")[index].value},Select.prototype.updateMenuState=function(open,callFocus=!0){if(this.open===open)return;this.open=open,this.comboEl.setAttribute("aria-expanded",`${open}`),open?this.el.classList.add("is-open"):this.el.classList.remove("is-open");const activeID=open?`${this.idBase}-${this.activeIndex}`:"";this.comboEl.setAttribute("aria-activedescendant",activeID),activeID===""&&!isElementInView(this.comboEl)&&this.comboEl.scrollIntoView({behavior:"smooth",block:"nearest"}),callFocus&&this.comboEl.focus()},document.querySelectorAll(".combobox-selector").forEach(el=>{let options=[];el.querySelectorAll("option").forEach(option=>{options.push(option.innerText)}),new Select(el,options)})},initAccordions=()=>{const accordionItems=document.querySelectorAll(".accordion"),closeAccordions=targetCompAccordion=>{accordionItems.forEach(accordionItem=>{accordionItem.querySelectorAll(".comp-accordion").forEach(compAccordion=>{targetCompAccordion!=compAccordion&&(slide("up",compAccordion.querySelector(".accordion-content")),compAccordion.classList.remove("is-expanded"),compAccordion.setAttribute("aria-expanded",!1),compAccordion.querySelector(".accordion-content").setAttribute("aria-hidden",!0))})})},navListDotColor=id=>{const lists=document.querySelectorAll(".panel-bottom .list-item");lists&&lists.forEach(list=>{list.dataset.id.includes(id)?list.classList.toggle("is-active"):list.classList.remove("is-active")})},alignAccordion=targetCompAccordion=>{isMobile||isTablet?seamless.scrollIntoView(targetCompAccordion.querySelector(".anchor"),{behavior:"smooth",block:"start",inline:"nearest"}):seamless.scrollBy(window,{behavior:"smooth",top:targetCompAccordion.querySelector(".anchor").getBoundingClientRect().top,left
1:0})},toggleAccordion=(targetCompAccordion,isAnyAccordionActive)=>{const accordionContent=targetCompAccordion.querySelector(".accordion-content"),timeOut=isAnyAccordionActive==!1?0:isMobile||isTablet?310:400;targetCompAccordion.classList.toggle("is-expanded"),slide("toggle",accordionContent),targetCompAccordion.querySelector(".anchor")&&setTimeout(()=>{alignAccordion(targetCompAccordion)},timeOut),targetCompAccordion.classList.contains("is-expanded")?(targetCompAccordion.setAttribute("aria-expanded",!0),accordionContent.setAttribute("aria-hidden",!1)):(targetCompAccordion.setAttribute("aria-expanded",!1),accordionContent.setAttribute("aria-hidden",!0))};on("body","click",".panel-bottom .list-item",e=>{const listItem=e.target.closest(".list-item"),targetID=listItem.dataset.id,targetCompAccordion=document.querySelector(`#${targetID}`).closest(".comp-accordion");listItem.classList.toggle("is-active"),getSiblings(listItem).forEach(item=>{item.classList.remove("is-active")}),closeAccordions(targetCompAccordion),toggleAccordion(targetCompAccordion)}),on("body","click",".js-toggle-accordion",e=>{const targetCompAccordion=e.target.closest(".comp-accordion"),id=targetCompAccordion.querySelector(".anchor")?targetCompAccordion.querySelector(".anchor").id:"",isAnyAccordionActive=!!document.querySelector(".accordion-content.is-active");closeAccordions(targetCompAccordion),toggleAccordion(targetCompAccordion,isAnyAccordionActive),id&&navListDotColor(id)}),window.addEventListener("resize",()=>{const targetContent=document.querySelector(".accordion-content.is-active")?document.querySelector(".accordion-content.is-active"):"";if(targetContent){let target=targetContent.querySelector(".dashed-line").nextElementSibling,compTargetHeight=window.getComputedStyle(target).getPropertyValue("height");console.log(compTargetHeight),targetContent.style.height=compTargetHeight}})},initFlickitySlider=()=>{const flickitySlider=document.querySelectorAll("[data-flickity-slider]"),flickitySliderTrigger=()=>{flickitySlider.forEach(el=>{let flickity=new Flickity(el,JSON.parse(el.dataset.flickitySlider.replace(/'/g,'"').trim())),childrenWidth=Object.values(el.querySelector(".flickity-slider").childNodes).reduce((total,i2)=>i2.offsetWidth?total+i2.offsetWidth+parseInt(window.getComputedStyle(i2).marginLeft)+parseInt(window.getComputedStyle(i2).marginRight):total,0);if(el.getBoundingClientRect().width>=childrenWidth||el.dataset.flickityBreakpoint&&window.innerWidth>parseInt(el.dataset.flickityBreakpoint))flickity.destroy(),el.classList.add("flickity-disabled"),setTimeout(()=>{el.querySelectorAll('[style*="left:"]').forEach(item=>{item.style.setProperty("left","unset")})},100);else if(flickity.on("dragStart",()=>
1flickity.slider.childNodes.forEach(slide2=>slide2.style.pointerEvents="none")),flickity.on("dragEnd",()=>flickity.slider.childNodes.forEach(slide2=>slide2.style.pointerEvents="all")),el.classList.contains("flickity-child-is-equal-height")){let maxHeight=[];el.querySelector(".flickity-slider").childNodes.forEach(item=>{maxHeight.push(item.offsetHeight)}),el.querySelector(".flickity-slider").childNodes.forEach(item=>{item.style.height=`${Math.max.apply(Math,maxHeight)}px`})}})},initialWidth=window.innerWidth;flickitySliderTrigger();var touchingCarousel=!1,touchStartCoords;document.body.addEventListener("touchstart",function(e){if(e.target.closest(".flickity-slider"))touchingCarousel=!0;else{touchingCarousel=!1;return}touchStartCoords={x:e.touches[0].pageX,y:e.touches[0].pageY}}),document.body.addEventListener("touchmove",function(e){if(touchingCarousel&&e.cancelable){var moveVector={x:e.touches[0].pageX-touchStartCoords.x,y:e.touches[0].pageY-touchStartCoords.y};Math.abs(moveVector.x)>7&&e.preventDefault()}},{passive:!1})},initMarquee=()=>{document.querySelectorAll(".marquee").forEach(marquee=>{setTimeout(()=>{const marqueeContent=marquee.querySelectorAll(".marquee-content"),maruqeeBlockWidth=marqueeContent[0].clientWidth,factor=Math.ceil(innerWidth/maruqeeBlockWidth),marqueeHtml=marqueeContent[0].innerHTML;marqueeContent.forEach(block=>{if(isFinite(factor))for(i=0;i<factor;i++)block.insertAdjacentHTML("beforeend",marqueeHtml)})},1)})},initFields=()=>{document.querySelectorAll(".field").forEach(item=>{let input=item.querySelector(`input[type="text"],
2			input[type="email"],
3			input[type="tel"],
4			input[type="url"],
5			input[type="password"],
6			input[type="file"],
7			textarea`),determineHasValue=()=>{input.value?item.classList.add("has-value"):item.classList.remove("has-value")};input&&(determineHasValue(),input.addEventListener("change",determineHasValue),input.addEventListener("blur",determineHasValue))})},initArrows=()=>{const arrowRights=document.querySelectorAll(".svg-arrow-right"),arrowLefts=document.querySelectorAll(".svg-arrow-left");function mobileArrows(){arrowRights.forEach(arrowRight=>{arrowRight.innerHTML='<svg class="svg-arrow-right" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 18"><path d="M1.25 9h22M15.55 17.25v0a15.58 15.58 0 0 1 7.498-8.15l.202-.1-.202-.1A15.58 15.58 0 0 1 15.55.75v0" stroke="#3E2B2E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'}),arrowLefts.forEach(arrowLeft=>{arrowLeft.innerHTML='<svg class="svg-arrow-left" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 18"><path d="M23.25 9h-22M8.95.75v0A15.58 15.58 0 0 1 1.452 8.9L1.25 9l.202.1a15.58 15.58 0 0 1 7.498 8.15v0" stroke="#3E2B2E" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'})}isMobile&&mobileArrows(),window.addEventListener("resize",function(){isMobile?mobileArrows():(arrowRights.forEach(arrowRight=>{arrowRight.innerHTML='<svg class="svg-arrow-right" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 32"><path d="M1 16h40M27 1l1.176 2.94A20 20 0 0 0 37.8 14.4L41 16l-3.199 1.6a20 20 0 0 0-9.625 10.46L27 31" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'}),arrowLefts.forEach(arrowLeft=>{arrowLeft.innerHTML='<svg class="svg-arrow-left" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 32"><path d="M41 16H1M15 31l-1.176-2.94A20 20 0 0 0 4.2 17.6L1 16l3.199-1.6a20 20 0 0 0 9.625-10.46L15 1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'}))})},initPopUpMessage=()=>{const messageId="vs-taim-popup-message",globalMessage=document.querySelector(".global-message"),elementTarget=document.querySelector(".js-popup-target"),timeNow=new Date().getTime(),timeId="vs-taim-popup-message-setup-time",timeSetup=localStorage.getItem(timeId);if(globalMessage){let popupScroll2=function(){hasLocalStorage&&localStorage.getItem(messageId)!=="closed"&&window.scrollY>elementTarget.offsetTop+elementTarget.offsetHeight*.7&&root.classList.add("popup-is-active")};var popupScroll=popupScroll2;timeSetup===null?localStorage.setItem(timeId,timeNow):timeNow-timeSetup>2592e5&&(localStorage.removeItem(messageId),localStorage.setItem(timeId,timeNow)),window.addEventListener("scroll",popupScroll2),on("body","click",".global-message .js-popup-close",e=>{root.classList.remove("popup-is-active"),localStorage.setItem(messageId,"closed")})}},initEmailCapture=()=>{const serialize=form=>{let serialized="";for(i=0;i<form.elements.length;i++){let field=form.elements[i];!field.name||field.disabled||field.type==="file"||field.type==="reset"||field.type==="submit"||field.type==="button"||(field.type!=="checkbox"&&field.type!=="radio"||field.checked)&&(serialized+="&"+encodeURIComponent(field.name)+"="+encodeURIComponent(field.value))}return serialized};window.displayMailChimpStatus=function(data){if(console.log("\u{1F680} ~ file: js-index.js ~ initEmailCapture ~ data",data),!data.result||!data.msg||!mcStatus)return;const mcMessage=data.msg.split("-")[1]?data.msg.split("-")[1]:data.msg;if(mcStatus.innerHTML=mcMessage,data.result==="error"){mcStatus.classList.remove("success-message"),mcStatus.classList.add("error-message");return}mcStatus.classList.remove("error-message"),mcStatus.classList.add("success-message")};const submitMailChimpForm=form=>{let url=form.getAttribute("action");url=url.replace("/post?u=","/post-json?u="),url+=serialize(form)+"&c=displayMailChimpStatus";const ref=window.document.getElementsByTagName("script")[0],script=window.document.createElement("script");script.src=url,window.mcStatus=form.querySelector(".mc-status"),ref.parentNode.insertBefore(script,ref),script.onload=function(){this.remove()}};document.addEventListener("submit",e=>
7{e.target.classList.contains("validate")&&(e.preventDefault(),submitMailChimpForm(e.target))})},initPageTransition=()=>{document.querySelectorAll("a[href]").forEach(item=>{item.href.startsWith("#")||item.href.split("#")[1]&&item.href.split("#")[0]==window.location.href.split("#")[0]?item.setAttribute("data-page-transition","scroll"):(item.href.includes(siteUrl)||item.href.startsWith("/"))&&item.target!="_blank"&&!item.href.includes("mailto:")?item.setAttribute("data-page-transition","internal"):(item.rel="noopener",item.target=item.target||"_blank")}),document.querySelectorAll("[data-page-transition]").forEach(item=>{item.addEventListener("click",e=>{let target=e.target.hasAttribute("data-page-transition")?e.target:e.target.closest("[data-page-transition]");target.blur(),target.dataset.pageTransition=="internal"&&!root.classList.contains("key-is-down")?(e.preventDefault(),root.classList.remove("header-is-sticky","menu-is-active","mobile-menu-is-active","minicart-is-active"),root.classList.add("is_leaving"),setTimeout(()=>{location.href=target.href},400)):target.dataset.pageTransition=="scroll"&&(e.preventDefault(),seamless.elementScrollIntoView(document.querySelector(`#${target.href.split("#")[1]}`),{behavior:"smooth"}))})}),window.addEventListener("keydown",()=>{root.classList.add("key-is-down")}),window.addEventListener("keyup",()=>{root.classList.remove("key-is-down")})},initPageAnimation=()=>{document.querySelectorAll("[data-animate]").forEach(item=>{new IntersectionObserver(el=>{el[0].isIntersecting===!0&&!el[0].target.classList.contains("is-animated")&&el[0].target.classList.add("is-animated")},{root:null,threshold:[.4]}).observe(item)})},initContentLayout=()=>{reframe('.content-layout iframe[src*="vimeo.com"], .content-layout iframe[src*="youtube.com"]',"video-reframe");let contentLayout=document.querySelector(".content-layout");contentLayout&&[].forEach.call(contentLayout.getElementsByTagName("img"),function(img){let p=img.closest("p");p&&p.parentElement&&(p.parentElement.insertBefore(img,p),p.parentElement.removeChild(p))})}
7,initCart=()=>{const minicartClose=()=>{root.classList.remove("minicart-is-active"),history.pushState(null,null," "),scrollEnable()},minicartOpen=()=>{root.classList.add("minicart-is-active"),history.pushState(null,null,"#cart"),scrollDisable()};on("body","click",".minicart-open",e=>{root.classList.contains("minicart-is-active")?minicartClose():minicartOpen()}),on("body","click",".minicart-close",e=>{minicartClose()}),document.addEventListener("keydown",e=>{e.key=="Escape"&&minicartClose()}),location.hash=="#cart"&&minicartOpen(),this.reloadCartData=()=>{fetch("/cart.js").then(response=>response.json()).then(data=>{document.querySelectorAll(".cart-total-price").forEach(item=>{item.innerText=`$${parseFloat(data.total_price/100).toFixed(2)}`}),document.querySelectorAll(".cart-total-items").forEach(item=>{item.innerText=data.item_count}),data.item_count>0?root.classList.add("cart-has-items"):root.classList.remove("cart-has-items")}).catch(error=>{console.error("Error:",error)})},this.reloadCartItems=()=>{reloadCartData(),fetch("/cart").then(response=>response.text()).then(data=>{var parser=new DOMParser,dataHtml=parser.parseFromString(data,"text/html");document.querySelectorAll(".cart-items-wrapper").forEach(item=>{item.innerHTML=dataHtml.querySelector(".cart-items-wrapper").innerHTML})}).catch(error=>{console.error("Error:",error)})},this.addItem=(variantId,quantity,updateCartTotal=!0,updateCartItems=!0,minicartOpenDelay=400)=>{fetch("/cart/add.js",{method:"POST",body:JSON.stringify({id:variantId,quantity}),headers:{"Content-Type":"application/json","X-Requested-With":"xmlhttprequest"},credentials:"same-origin"}).then(response=>{response.json()}).then(data=>{updateCartTotal&&reloadCartData(),updateCartItems&&reloadCartItems(),minicartOpenDelay&&setTimeout(()=>{minicartOpen()},minicartOpenDelay)}).catch(error=>{console.error("Error:",error)})},this.changeItemQuantity=(line,quantity,updateCartTotal=!0,updateCartItems=!1,minicartOpenDelay=400)=>{fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({line,quantity})}).then(response=>{response.json()}).then(()=>{updateCartTotal&&reloadCartData(),updateCartItems&&reloadCartItems(),minicartOpenDelay&&setTimeout(()=>{minicartOpen()},minicartOpenDelay)}).catch(error=>{console.error("Error:",error)})},on("body","click","[data-quantity-trigger]",e=>{let target=e.target.closest("[data-quantity-trigger]"),item=e.target.closest(".cart-item");item&&(item.querySelectorAll('[name="quantity"]').forEach(item2=>{item2.value=target.closest(".item-quantity").querySelector('[name="quantity"]').value}),changeItemQuantity(item.dataset.itemLine,item.querySelector('[name="quantity"]').value,!0,!1,!1))}),on("body","click",".item-remove-trigger",e=>{let item=e.target.closest(".cart-item");item&&(item.remove(),changeItemQuantity(item.dataset.itemLine,0,!0,!0,!1))}),on("body","click","[data-cart-add-id]",e=>{let target=e.target.closest("[data-cart-add-id]");addItem(target.dataset.cartAddId,target.dataset.cartAddQuantity?target.dataset.cartAddQuantity:1)}),on("body","submit",'form[action="/cart/add"]',e=>{e.preventDefault();let form=e.target;addItem(form.querySelector('[name="id"]').value,form.querySelector('[name="quantity"]').value)})},initBlogIndex=()=>{document.querySelector(".blog-pagination-next")&&new InfiniteScroll(".blog-load-more",{path:".blog-pagination-next",append:".blog-post",button:".blog-load-more-trigger",scrollThreshold:!1,history:!1}).on("last",(body,path)=>{let loadMoreTrigger=document.querySelector(".blog-load-more-trigger");loadMoreTrigger.style.display="block",loadMoreTrigger.disabled=!0,loadMoreTrigger.innerHTML="You\u2019ve reached the end"})},initAccount=()=>{const gateWrapper=document.querySelector(".account-gate-wrapper"),gateContent=document.querySelector(".account-gate"),resetPasswordTrigger=document.querySelector(".reset-password-trigger"),resetPasswordCancel=document.querySelector(".reset-password-cancel");gateWrapper&&(resetPasswordTrigger.addEventListener("click",event=>{event.preventDefault(),history.pushState(null,null,"#recover"),root.classList.add("reset-password-active"),gateWrapper.style.height=document.querySelector(".account-reset").offsetHeight,document.querySelector("#account-recover-email").focus()}),resetPasswordCancel&&resetPasswordCancel.addEventListener("click",event=>{event.preventDefault(),history.pushState(null,null," "),root.classList.remove("reset-password-active"),gateWrapper.style.height=gateContent.offsetHeight}),location.hash=="#recover"&&resetPasswordTrigger.click(),gateWrapper.style.height=gateContent.offsetHeight)},initFrontpage=()=>{const tabPill=document.querySelector(".tab-pill");on("body","click",".tab",e=>{const tab=e.target.closest(".tab"),direction=tab.dataset.direction;tabPill.classList.remove("left","right"),tabPill.classList.add(direction),tab.classList.add("active"),getSiblings(tab).forEach(el=>{el.classList.remove("active")});const tab2content=document.querySelector(".tab-2-content"),tabContents=document.querySelector(".tab-contents");direction=="right"?(tab2content.classList.remove("hidden"),tab2content.setAttribute("aria-hidden",!1),tabContents.classList.add("js-tab-2-active"),tabContents.setAttribute("aria-hidden",!0)):(tab2content.classList.add("hidden"),tab2content.setAttribute("aria-hidden",!0),tabContents.classList.remove("js-tab-2-active"),tabContents.setAttribute("aria-hidden",!1))});const flickityPrev=document.querySelector(".frontpage-about .flickity-button.previous"),flickityNext=d
7ocument.querySelector(".frontpage-about .flickity-button.next");on("body","click",".frontpage-about .content-block.is-selected .btn-prev-next .prev",e=>{flickityPrev&&flickityPrev.click()}),on("body","click",".frontpage-about .content-block.is-selected .btn-prev-next .next",e=>{flickityNext&&flickityNext.click()});const targetParagraph=document.querySelector(".global-loyalty .text .paragraph"),targetParagraphText=document.querySelector(".global-loyalty .text .paragraph").innerText,paragraph_mobile=document.querySelector(".global-loyalty .paragraph_mobile")?document.querySelector(".global-loyalty .paragraph_mobile").value:"",targetCtaLabel=document.querySelector(".global-loyalty .text .btn"),targetCtaLabelText=document.querySelector(".global-loyalty .text .btn").innerText,cta_label_mobile=document.querySelector(".global-loyalty .cta_label_mobile")?document.querySelector(".global-loyalty .cta_label_mobile").value:"";paragraph_mobile&&initReplaceContentForMobile(targetParagraph,targetParagraphText,paragraph_mobile),cta_label_mobile&&initReplaceContentForMobile(targetCtaLabel,targetCtaLabelText,cta_label_mobile)},initStockist=()=>{function initSidePanel(){document.querySelector(".stockist-search-field").placeholder="Enter Address or zip";const stockistPanelForm=document.querySelector(".stockist-search-form"),shopifyPanel=document.querySelector(".stockist-side-panel-top").cloneNode(!0);stockistPanelForm.before(shopifyPanel)}function initMap(){document.querySelector(".stockist-map").classList.add("js-slide-in")}function initMobileStockist(){const stockist=document.querySelector("#stockist-widget");isMobile||isTablet?stockist.classList.add("mobile-view"):stockist.classList.remove("mobile-view")}window.addEventListener("resize",function(){initMobileStockist()}),window.addEventListener("load",function(){setTimeout(()=>{initSidePanel(),initMap(),initMobileStockist()},1e3)})};switch(initComboBox(),initAccordions(),initFlickitySlider(),initMarquee(),initFields(),initPageTransition(),initPageAnimation(),initContentLayout(),initArrows(),initPopUpMessage(),initEmailCapture(),root.id){case"template-frontpage":initFrontpage();break;case"template-page-store-locator":initStockist();break;case"template-page-gifting":document.querySelectorAll(".content-block").forEach(block=>{const target=block.querySelector(".comp-img-text .btn"),originalContent=target.innerText,newContent=block.querySelector(".cta_label_mobile")?block.querySelector(".cta_label_mobile").value:"";newContent&&initReplaceContentForMobile(target,originalContent,newContent)});break;case"template-blog-index":initBlogIndex();break;case"template-account":initAccount();break}setTimeout(()=>{document.querySelectorAll(".avoid-style-flash").forEach(el=>{el.style.visibility="visible"})},400);
8//# sourceMappingURL=/cdn/shop/t/73/assets/js-index.js.map?v=43325321665624896261753989713

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.