1if(!customElements.get('cart-note')){class CartNote extends HTMLElement{constructor(){super();this.disclosure=this.closest('details');if(this.disclosure&&this.disclosure.matches('.cart-note-disclosure')){this.cartNoteToggle=this.disclosure.querySelector('.js-show-note')} 2this.fetchRequestOpts={method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'}};this.init()} 3init(){this.debouncedHandleNoteChange=debounce(this.handleNoteChange.bind(this),300);this.addEventListener('input',this.debouncedHandleNoteChange)} 4handleNoteChange(evt){if(this.cartNoteToggle){const label=evt.target.value?theme.strings.editCartNote:theme.strings.addCartNote;if(this.cartNoteToggle.textContent!==label)this.cartNoteToggle.textContent=label} 5this.fetchRequestOpts.body=JSON.stringify({note:evt.target.value});fetch(theme.routes.cartUpdate,this.fetchRequestOpts)}} 6customElements.define('cart-note',CartNote)}
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.