1import{S as h}from"./size-modal-C-HZufv1.js";import{S as f}from"./size-guide.min.js";import{B as g}from"./lib-back-in-stock-Bv7BmQtt.js";import{Q as S}from"./lib-quick-view-modal-BStTSjkv.js";import"./utils-jsNBgr0L.js";class y{constructor(o){this.element=o,this.url=o.dataset.url,this.init()}addToCart(){let o=this.element.querySelectorAll("[data-add-to-cart]"),a=new CustomEvent("ajaxComplete");for(let r of o)r.addEventListener("click",n=>{n.preventDefault();let d=r.dataset.variantId,u=r.dataset.final,i=r.dataset.comparePrice,s=r.dataset.tag||"",l,e,m={},p=r.dataset.giftcard;if(u=="true"){e={...e,"Final Sale":"No returns"};try{i!==""&&(m={_compare_at_price:i})}catch{}}if(s!==""&&(e={...e,_tag:s}),p=="true"&&document.querySelector(".js-giftCardRadio").checked){let c=document.querySelectorAll(".js-giftCardField");document.querySelector(".js-offset"),c==null||c.forEach(t=>{t.name==="properties[Recipient email]"&&(e={...e,"Recipient email":t.value}),t.name==="properties[Recipient name]"&&t.value!==""&&(e={...e,"Recipient name":t.value}),t.name==="properties[Message]"&&t.value!==""&&(e={...e,Message:t.value}),t.name==="properties[Send on]"&&t.value!==""&&(e={...e,"Send on":t.value})}),e={...e,__shopify_send_gift_card_to_recipient:"on"}}l={...e,...m},window.cart.addToCart(d,l,!0,a)})}getData(o){fetch(o).then(a=>a.text()).then(a=>{const r=document.createElement("div");r.innerHTML=a;const n=r.querySelector(".js-recommendations");
1if(n&&n.innerHTML.trim().length){this.element.innerHTML=n.innerHTML,this.addToCart();try{new f(document.querySelector(".js-recommendations")),new h(document.querySelector(".js-recommendations"))}catch{console.log("size error")}try{new g(document.querySelector(".js-recommendations"))}catch{console.log("bis error")}try{new S(document.querySelector(".js-recommendations"))}catch{console.log("quick view error")}}}).catch(a=>{console.error(a)})}setEventHandlers(){this.getData(this.url)}init(){this.setEventHandlers()}}new y(document.querySelector(".js-recommendations"));export{y as R};
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.