1import"@theme/events";import{morph}from"@theme/morph";import{Component}from"@theme/component";import{StandardEvents}from"@shopify/events";class ProductInventory extends Component{connectedCallback(){super.connectedCallback(),this.closest(".shopify-section, dialog")?.addEventListener(StandardEvents.productSelect,this.#handleProductSelect)}disconnectedCallback(){super.disconnectedCallback(),this.closest(".shopify-section, dialog")?.removeEventListener(StandardEvents.productSelect,this.#handleProductSelect)}#handleProductSelect=event=>{!(event.target instanceof Element)||event.target.closest("product-card")||event.promise.then(({detail})=>{if(!detail?.html)return;const{html,newProduct}=detail;if(newProduct)this.dataset.productId=newProduct.id;else if(detail.productId&&detail.productId!==this.dataset.productId)return;const newInventory=html.querySelector("product-inventory");newInventory&&morph(this,newInventory,{childrenOnly:!0})}).catch(error=>{error?.name!=="AbortError"&&console.warn("[product-inventory] Event promise rejected:",error)})}}customElements.get("product-inventory")||customElements.define("product-inventory",ProductInventory); 2//# sourceMappingURL=/cdn/shop/t/16/assets/product-inventory.js.map?v=7173209571153411411787335062
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.