PageSourceSearch

https://dz.diesel.com/on/demandware.static/Sites-DieselWW-Site/-/e…/js/component-ResetPassword.chunks.js

js diesel.com collected 2026-09-24 08:40:39 UTC 4,502 bytes, 1 lines download raw bytes

1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[106,5645],{6583:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const o=s(8563).N,a=s(14863).ZP,n=s(38302).default;class r extends n{constructor(e){super(e),this.form=e,this.formData={},this.url=new URL(this.action(),window.location.origin),this.isSubmitting=!1,this.setup()}setup(){this.form.addEventListener("submit",(e=>{e.preventDefault(),this.submitHandler()})),[...this.form.querySelectorAll('[type="submit"]')].forEach((e=>{e.addEventListener("click",(e=>{this.isSubmitting=!0}))})),this.form.addEventListener("invalid",(e=>{this.isSubmitting&&(this.focusOnInvalidInput(),this.isSubmitting=!1)}),!0)}focusOnInvalidInput(e){if((e=e||this.form.querySelector("input:invalid, textarea:invalid, select:invalid"))&&document.activeElement!==e){e.focus({preventScroll:!0});let t=e.getBoundingClientRect(),s=window.scrollY+t.top-window.innerHeight/3;window.scrollTo({top:s,behavior:"auto"})}console.log("Focus on first invalid input:",e)}loadRecaptchaScript(e){const t=document.querySelector("#recaptcha-script");if(!t)return void(document.querySelector('script[src*="recaptcha"]')&&(this.recaptchaScriptLoaded=!0));const s=()=>{t.getAttribute("src")||(t.setAttribute("src",t.dataset.src),t.async=!0,t.onload=()=>{document.dispatchEvent(new CustomEvent("recaptcha-loaded"))},this.recaptchaScriptLoaded=!0)};e?s():this.recaptchaFocusBound||(this.form.addEventListener("mouseenter",s,{once:!0}),this.form.addEventListener("focusin",s,{once:!0}),this.form.addEventListener("click",s,{once:!0}),this.recaptchaFocusBound=!0)}getRecaptchaToken(e){const t=this.element.querySelector('input[name="googleRecaptchaClientSide"]'),s=this.element.querySelector('input[name="googleRecaptchaToken"]');if(!t)return;const o=()=>{window.grecaptcha.ready((()=>{this.performRecaptchaCall=async()=>window.grecaptcha.execute(t.value,{action:e}).then((e=>(s.value=e,e)))}))};window.grecaptcha?o():(document.addEventListener("recaptcha-loaded",(()=>{console.log("Lazy loading recaptcha."),o()}),{once:!0}),this.loadRecaptchaScript(!1))}action(){return this.form.getAttribute("action")}method(){return this.form.getAttribute("method")}async submitHandler(){this.isSubmitting=!0,this.url=new URL(this.action(),window.location.origin);const e=new CustomEvent("beforeSubmit",{bubbles:!0,cancelable:!0,composed:!1});this.form.dispatchEvent(e),this.performRecaptchaCall&&await this.performRecaptchaCall(),this.formData=o(this.form);const t={method:this.method()};if("get"===this.method().toLowerCase()){const e={},t=new FormData(this.form);for(const s of t.keys())e[s]=t.get(s);this.url.search=new URLSearchParams(e).toString()}else t.body=new FormData(this.form);a("".concat(this.url),t).then((e=>{const t=e.headers.get("content-type");if(!t)throw new TypeError("No content type defined in response/header");return t.includes("application/json")?e.json():t.includes("text/html")?e.text():void 0})).then((e=>{const s=new CustomEvent("data",{detail:{body:t.body,data:e},bubbles:!0,cancelable:!0,composed:!1});this.form.dispatchEvent(s)})).catch((e=>{console.error(e);const t=new CustomEvent("error",{detail:{data:e},bubbles:!0,cancelable:!0,composed:!1});this.form.dispatchEvent(t)}))}}},55120:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var o=s(12737);const a=s(6583).default;class n extends a{constructor(e){super(e),this.form.addEventListener("beforeSubmit",(e=>{o.Z.emit("body:loading")})),this.form.addEventListener("data",(e=>{e.detail.data.success&&this.showSuccess(e.target.parentElement),o.Z.emit("body:loaded"),this.getRecaptchaToken("resetPassword")})),this.getRecaptchaToken("resetPassword")}showSuccess(e){e.classList.contains("login-form")?(document.querySelector(".password-recovery-panel .header-panel__password-recovery").classList.add("d-none"),document.querySelector(".password-recovery-panel .header-panel__password-recovery--success").classList.remove("d-none")):e.classList.contains("header-panel__password-recovery")&&(document.querySelector(".transfer-social-account-panel .header-panel__password-recovery").classList.add("d-none"),document.querySelector(".transfer-social-account-panel .header-panel__password-recovery--success").classList.remove("d-none"))}}},8563:(e,t,s)=>{"use strict";function o(e){const t={};
1return[...new FormData(e).entries()].forEach((e=>{if(t[e[0]]){let s;"string"==typeof t[e[0]]?s=[t[e[0]],e[1]]:Array.isArray(t[e[0]])&&(s=t[e[0]].push(e[1])),t[e[0]]=s}else t[e[0]]=e[1]})),t}s.d(t,{N:()=>o})}}]);

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.