PageSourceSearch

https://www.thestacksystem.com/cdn/shop/t/60/assets/product-inventory.js?v=136240794456623710211778037100

js thestacksystem.com collected 2026-10-01 14:34:50 UTC 1,833 bytes, 2 lines download raw bytes

1if(!customElements.get("product-inventory")){class ProductInventory extends HTMLElement{constructor(){super(),window.initLazyScript(this,this.initLazySection.bind(this))}initLazySection(){this.threshold=parseInt(this.dataset.threshold,10),this.productInventory=this.querySelector(".product-inventory"),this.inventoryNotice=this.querySelector(".product-inventory__status"),this.closest(".js-product").addEventListener("on:variant:change",this.handleVariantChange.bind(this))}getVariantInventory(){const dataEl=this.querySelector('[type="application/json"]');return JSON.parse(dataEl.textContent)}handleVariantChange(evt){const inventory=this.getVariantInventory();this.updateInventory(evt.detail.variant?inventory.find(v=>v.id===evt.detail.variant.id):null)}updateInventory(inventory){if(!inventory){this.productInventory.hidden=!0;return}const count=inventory.inventory_quantity,showCount=this.dataset.showInventoryCount==="always"||this.dataset.showInventoryCount==="low"&&count<=this.threshold;let notice=null;showCount?count<=this.threshold?notice=this.dataset.textXLeftLow.replace("[QTY]",count):notice=this.dataset.textXLeftOk.replace("[QTY]",count):count<=this.threshold?notice=this.dataset.textLow:notice=this.dataset.textOk,this.productInventory.classList.toggle("product-inventory--low",count<=this.threshold),this.productInventory.classList.toggle("product-inventory--ok",count>this.threshold),this.querySelector(".product-inventory__icon-low").toggleAttribute("hidden",count>this.threshold),this.querySelector(".product-inventory__icon-ok").toggleAttribute("hidden",count<=this.threshold),this.inventoryNotice.innerText=notice,this.productInventory.hidden=!1}}customElements.define("product-inventory",ProductInventory)}
2//# sourceMappingURL=/cdn/shop/t/60/assets/product-inventory.js.map?v=136240794456623710211778037100

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.