PageSourceSearch

https://silveroak.com/cdn/shop/t/124/assets/component-cart-quantit…?v=46968683091440879881790686159

js silveroak.com collected 2026-10-03 19:09:45 UTC 1,764 bytes, 2 lines download raw bytes

1import{Component}from"@theme/component";import{QuantitySelectorUpdateEvent}from"@theme/events";class CartQuantitySelectorComponent extends Component{increaseQuantity(event){event.target instanceof HTMLElement&&(event.preventDefault(),this.refs.quantityInput.stepUp(),this.#onQuantityChange())}decreaseQuantity(event){event.target instanceof HTMLElement&&(event.preventDefault(),this.refs.quantityInput.stepDown(),this.#onQuantityChange())}selectInputValue(event){const{quantityInput}=this.refs;!(event.target instanceof HTMLInputElement)||document.activeElement!==quantityInput||quantityInput.select()}setQuantity(event){event.target instanceof HTMLElement&&(event.preventDefault(),event.target instanceof HTMLInputElement&&(this.refs.quantityInput.value=event.target.value),this.#onQuantityChange())}#onQuantityChange(){const{quantityInput}=this.refs;this.#checkQuantityRules();const newValue=parseInt(quantityInput.value);quantityInput.dispatchEvent(new QuantitySelectorUpdateEvent(newValue,Number(quantityInput.dataset.cartLine)))}#checkQuantityRules=()=>{const{quantityInput}=this.refs,newValue=Number(quantityInput.value),min=Number(quantityInput.min),max=Number(quantityInput.max);quantityInput.min&&newValue<min&&(quantityInput.value=String(min)),quantityInput.max&&newValue>max&&(quantityInput.value=String(max))};get quantityInput(){if(!this.refs.quantityInput)throw new Error('Missing <input ref="quantityInput" /> inside <cart-quantity-selector-component />');return this.refs.quantityInput}}customElements.get("cart-quantity-selector-component")||customElements.define("cart-quantity-selector-component",CartQuantitySelectorComponent);
2//# sourceMappingURL=/cdn/shop/t/124/assets/component-cart-quantity-selector.js.map?v=46968683091440879881790686159

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.