1import{d as debounce}from"./debounce-CFN_LA0O.js";import{C as Cart}from"./cart-D33A22VA.js";import{P as PubSub}from"./pubsub-CoPYzvVm.js";import{N as Notyf}from"./notyf-DIw0RvBj.js";import"./uniq-BDEfcc0N.js";class CartItem extends HTMLElement{#unsubscriber;#lineItemIndex=this.dataset.lineItemIndex;#loadingOverlay=this.querySelector(".loading-overlay");connectedCallback(){this.#unsubscriber=PubSub.subscribe("quantity:change",({line,quantity})=>this.#handleQuantityChange(line,quantity))}disconnectedCallback(){this.#unsubscriber()}#handleQuantityChange=debounce(async(line,quantity)=>{if(line===this.#lineItemIndex){this.#handleLoading(!0);try{await Cart.change({line:this.#lineItemIndex,quantity})}catch(error){Notyf.error(error.message)}finally{this.#handleLoading(!1)}}},300);#handleLoading(loading){this.#loadingOverlay.ariaHidden=!loading}}customElements.define("line-item",CartItem); 2//# sourceMappingURL=/cdn/shop/t/137/assets/line-item.js.map?v=176305541399707041361790337781
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.