1(function(){if(window.ThemeFormLoading)return;function isSubmitControl(element){return element instanceof HTMLButtonElement&&element.type==="submit"||element instanceof HTMLInputElement&&["submit","image"].includes(element.type)}function getSubmitControls(form){return Array.from(form.elements).filter(element=>element instanceof Element&&isSubmitControl(element))}function usesManualMode(form){const manualModeHost=form.closest("[data-form-loading-mode]");return manualModeHost instanceof HTMLElement&&manualModeHost.dataset.formLoadingMode==="manual"}function start(form){if(!(form instanceof HTMLFormElement)||form.dataset.formLoading==="true")return!1;form.dataset.formLoading="true",form.setAttribute("aria-busy","true");for(const control of getSubmitControls(form))control.dataset.formLoadingWasDisabled=control.disabled?"true":"false",control.dataset.formLoading="true",control.style.setProperty("--form-loading-spinner-color",window.getComputedStyle(control).color),control.disabled=!0;return!0}function stop(form){if(form instanceof HTMLFormElement){delete form.dataset.formLoading,form.removeAttribute("aria-busy");for(const control of getSubmitControls(form)){const wasDisabled=control.dataset.formLoadingWasDisabled==="true";control.disabled=wasDisabled,delete control.dataset.formLoading,delete control.dataset.formLoadingWasDisabled,control.style.removeProperty("--form-loading-spinner-color")}}}function reset(){document.querySelectorAll('form[data-form-loading="true"]').forEach(form=>{form instanceof HTMLFormElement&&stop(form)})}const nativeSubmit=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){usesManualMode(this)||start(this),nativeSubmit.call(this)},document.addEventListener("submit",event=>{const form=event.target;event.defaultPrevented||form instanceof HTMLFormElement&&!usesManualMode(form)&&start(form)}),window.addEventListener("pageshow",reset),window.ThemeFormLoading={start,stop,reset,submit(form){if(form instanceof HTMLFormElement){if(typeof form.requestSubmit=="function"){form.requestSubmit();return}typeof form.reportValidity=="function"&&!form.reportValidity()||(start(form),nativeSubmit.call(form))}}}})(); 2//# sourceMappingURL=/cdn/shop/t/11/assets/form-submission-loading.js.map?v=57678200847219865231788191370
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.