1class UpdatePassword extends HTMLElement{constructor(){super(),this._loading=!1,this.apiBaseUrl=window.theme.internalApp.baseUrl,this.button=this.querySelector("button"),this.popup=document.querySelector("#updatePassword"),this.loaderIcon=this.querySelector(".display_loader"),this.button.addEventListener("click",e=>{e.preventDefault(),!this.loading&&this.sendCode()})}get loading(){return this._loading}set loading(active){this._loading=active,this.loaderIcon&&(active?this.loaderIcon.style.display="flex":this.loaderIcon.style.display="none")}async sendCode(){try{if(this.loading=!0,!(await fetch(`${this.apiBaseUrl}/auth/forgot-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:this.email})})).ok)throw new Error("Please try submitting again.");localStorage.setItem("customer_email",this.email),window.location.href="/pages/reset-password?step=code"}catch(error){console.error(error)}finally{this.loading=!1}}hide(){this.popup.close()}}customElements.get("update-password")||customElements.define("update-password",UpdatePassword); 2//# sourceMappingURL=/cdn/shop/t/37/assets/component-update-password.js.map?v=128244894678631634291734011113
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.