1(()=>{class CartUpdate extends HTMLElement{constructor(){super(),this.input=this.querySelector("textarea"),this.handleInputChange=this.handleInputChange.bind(this)}connectedCallback(){window.wetheme.webcomponentRegistry.register({key:"component-cart-update"}),this.input&&this.input.addEventListener("change",this.handleInputChange)}handleInputChange(e){const name=e.target.name,value=e.target.value,bodyObj=this.fetchBody(name,value);bodyObj&&fetch(window.routes.cart_update_url,{...this.fetchConfig(),body:JSON.stringify(bodyObj),keepalive:!0})}fetchBody(name,value){if(name==="note")return{note:value};const match=name.match(/^attributes\[(\w+)\]$/);return match?{attributes:{[match[1]]:value}}:null}fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}}customElements.define("cart-update",CartUpdate)})(); 2//# sourceMappingURL=/cdn/shop/t/100/assets/component-cart-update.js.map?v=38903525079000161031790014856
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.