1import CartStore from"./cart-store.js";import CartDrawer from"./cart-drawer.js";import CartModal from"./cart-notification-modal.js";import CartToast from"./cart-toast.js";function getCartBehavior(){const settings=window.__AGENCY_CART?.settings||{};return window.innerWidth<768?settings.cartBehaviorMobile:settings.cartBehaviorDesktop}function interceptCartLinks(){document.addEventListener("click",event=>{const link=event.target.closest('a[href*="/cart"]');if(link&&link.href)try{const url=new URL(link.href);if(url.pathname==="/cart"||url.pathname.endsWith("/cart"))return event.preventDefault(),event.stopPropagation(),document.dispatchEvent(new CustomEvent("cart:open")),!1}catch{if(link.href.includes("/cart")&&!link.href.includes("/cart/add"))return event.preventDefault(),event.stopPropagation(),document.dispatchEvent(new CustomEvent("cart:open")),!1}},!0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",interceptCartLinks):interceptCartLinks();function installCartLineExpandToggle(){window.__AGENCY_CART=window.__AGENCY_CART||{},window.__AGENCY_CART.toggleCartLineExpand=function(event,key){if(!event||key==null||event.target.closest("a"))return;const expandBtn=event.target.closest("[data-cart-line-expand]");if(event.target.closest("button")&&!expandBtn||event.target.closest("input"))return;const s=window.Alpine?.store?.("cart");if(!s)return;const next=String(key),cur=s.expandedLineKey==null?"":String(s.expandedLineKey);s.expandedLineKey=cur===next?null:key}}function registerCartModule(){Alpine.store("cart",CartStore),installCartLineExpandToggle(),Alpine.data("cartDrawer",CartDrawer),Alpine.data("cartModal",CartModal),Alpine.data("cartToast",CartToast),document.addEventListener("cart:item:added",async event=>{const store=Alpine.store("cart");if(store)switch(await store.refreshCart(),getCartBehavior()){case"modal":document.dispatchEvent(new CustomEvent("cart:modal:open",{detail:event.detail}));break;case"alert":window.dispatchEvent(new CustomEvent("cart:notification",{detail:{message:"Item added to cart!"}}));break;case"redirect":window.location.href="/cart";break;default:document.dispatchEvent(new CustomEvent("cart:open"));break}})}document.addEventListener("alpine:init",registerCartModule),window.Alpine&®isterCartModule(); 2//# sourceMappingURL=/cdn/shop/t/2/assets/theme.js.map?v=106655113242579640461782579453
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.