PageSourceSearch

https://flordemariacollection.com/cdn/shop/t/33/assets/product-form.js?v=57471120954053870641686661198

js flordemariacollection.com collected 2026-10-07 03:44:46 UTC 2,142 bytes, 2 lines download raw bytes

1(()=>{if(customElements.get("product-form"))return;class ProductForm extends HTMLElement{constructor(){super(),this.form=this.querySelector("form"),this.submitButton=this.form.querySelector('[name="add"]'),this.cartDrawer=document.querySelector("cart-drawer"),this.productBar=document.querySelector(`#ProductBar-${this.dataset.sectionId}`),this.form.addEventListener("submit",this.onSubmitHandler.bind(this))}onSubmitHandler(event){event.preventDefault();const purchaseOptions=document.querySelector("purchase-options");if(purchaseOptions&&!purchaseOptions.isOneTimePurchase()&&!this.hasAttribute("data-has-selling-plan")){purchaseOptions.showError();return}this.submitButton.classList.add("disabled");const config=fetchConfig("javascript");config.headers["X-Requested-With"]="XMLHttpRequest",delete config.headers["Content-Type"];const formData=new FormData(this.form);formData.append("sections",this.cartDrawer.getSectionsToRender().map(section=>section.section)),formData.append("sections_url",window.location.pathname),config.body=formData,fetch(`${routes.cart_add_url}`,config).then(response=>response.json()).then(response=>{if(response.status){this.handleErrorMessage(response.description);return}this.cartDrawer.renderContents(response)}).catch(error=>{console.error(error)}).finally(()=>{this.submitButton.classList.remove("disabled")})}handleErrorMessage(errorMessage=!1){const errorWrapper=this.querySelector("[data-error-wrapper]");errorWrapper&&(errorWrapper.classList.toggle("hidden",!errorMessage),errorWrapper.textContent=errorMessage||"")}toggleAddButton(disable,text){[this.submitButton,this.productBar?.querySelector('[name="add"]')].forEach(submitButton=>{disable?(submitButton?.setAttribute("disabled","disabled"),text&&submitButton&&(submitButton.textContent=text)):submitButton&&(submitButton.removeAttribute("disabled"),submitButton.textContent=this.hasAttribute("data-has-selling-plan")?window.variantStrings.addSubscriptionToCart:window.variantStrings.addToCart)})}}customElements.define("product-form",ProductForm)})();
2//# sourceMappingURL=/cdn/shop/t/33/assets/product-form.js.map?v=57471120954053870641686661198

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.