1"use strict";(self.webpackChunknyp_membership=self.webpackChunknyp_membership||[]).push([[6790],{2566:function(e,s,t){var r=t(2001),n=t.n(r),o=t(935),a=t.n(o)()(n());a.push([e.id,".forgot-password-resend{margin-bottom:1.25rem;width:100%}","",{version:3,sources:["webpack://./src/components/forms/forgotPassword/index.scss"],names:[],mappings:"AAEA,wBACE,qBAAA,CACA,UAAA",sourcesContent:["@import 'gtf-shared-assets/scss/util';\n\n.forgot-password-resend {\n margin-bottom: rem(20px);\n width: 100%;\n}\n"],sourceRoot:""}]),s.A=a},3269:function(e,s,t){t.d(s,{F:function(){return P}});var r=t(1085),n=t(4041),o=t(824),a=t(3657),i=t(7309),d=t(3373),l=t.n(d),c=t(7093),m=t(3486),p=t(316),u=t(7682),h=t(8188),f=t(2591),y=t.n(f),b=t(1740),w=t.n(b),g=t(8128),_=t.n(g),v=t(855),x=t.n(v),j=t(3051),A=t.n(j),N=t(3656),E=t.n(N),k=t(2566),S={};S.styleTagTransform=E(),S.setAttributes=x(),S.insert=_().bind(null,"head"),S.domAPI=w(),S.insertStyleElement=A(),y()(k.A,S),k.A&&k.A.locals&&k.A.locals;var C=function(e,s,t,r){return new(t||(t=Promise))(function(n,o){function a(e){try{d(r.next(e))}catch(e){o(e)}}function i(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var s;e.done?n(e.value):(s=e.value,s instanceof t?s:new t(function(e){e(s)})).then(a,i)}d((r=r.apply(e,s||[])).next())})};const P=()=>{const[e,s]=(0,n.useState)(!1),[t,d]=(0,n.useState)(!1),[f,y]=(0,n.useState)(!1),[b,w]=(0,n.useState)(!1);(0,n.useEffect)(()=>{const e=new MutationObserver(e=>{e.forEach(({attributeName:e})=>{if("class"===e){const e=document.body.classList.contains("membership-modal-open");w(e)}})});return e.observe(document.body,{attributes:!0}),()=>e.disconnect()},[]);const{register:g,handleSubmit:_,setError:v,clearErrors:x,watch:j,formState:{errors:A}}=(0,o.mN)(),N=j("email"),E=e?(0,i.__)("Loading...","nypost"):(0,i.__)("Submit","nypost"),k=()=>{v("email",{type:"zephr",message:m.y.resettingPassword()})},S=(0,n.useRef)(A);S.current=A,(0,n.useEffect)(()=>{var e,s;N&&"zephr"===(null===(s=null===(e=S.current)||void 0===e?void 0:e.email)||void 0===s?void 0:s.type)&&x()},[N,x]);const P=()=>C(void 0,void 0,void 0,function*(){s(!0),yield(0,c.w2)(t),s(!1),y(!0)});if(t){let s=(0,i.__)("Resend Email","nypost");return e?s=(0,i.__)("Loading...","nypost"):f&&(s=(0,i.__)("Email Resent","nypost")),(0,r.jsx)("div",{className:l()("form-wrapper",{"form-wrapper--border-top":!b}),children:(0,r.jsxs)("div",{className:l()({"wrapper wrapper--border-top wrapper--thin":b}),children:[(0,r.jsx)("h1",{className:"form-wrapper__heading headline headline--single",children:(0,i.__)("Check Your Email","nypost")}),(0,r.jsx)("p",{className:"body t-left",children:(0,i.__)("We've sent a Reset Password link to your email. Click on it to set a new password. If it's not in your inbox, check your spam folder.","nypost")}),(0,r.jsx)("button",{type:"button",className:l()({"button button--solid forgot-password-resend":!0,disabled:e}),"data-testid":"forgot-password-resend",disabled:e,onClick:P,children:s}),(0,r.jsx)("p",{className:"form-text form-text--forgot-return m-bottom-double",children:(0,r.jsx)(a.N_,{to:"/account/login",children:(0,i.__)("Return to Log In","nypost")})})]})})}return(0,r.jsx)("div",{className:l()("form-wrapper",{"form-wrapper--border-top":!b}),children:(0,r.jsxs)("div",{className:l()({"wrapper wrapper--border-top wrapper--thin":b}),children:[(0,r.jsx)("h1",{className:"form-wrapper__heading headline headline--single",children:(0,i.__)("Reset Your Password","nypost")}),(0,r.jsx)("p",{className:"body t-left",dangerouslySetInnerHTML:{__html:(0,i.nv)((0,i.__)("Enter the email address associated with your %s account. We'll send you a link to change your password.","nypost"),`<strong>${h.yy}</strong>`)}}),(0,r.jsxs)("form",{onSubmit:_(e=>C(void 0,void 0,void 0,function*(){s(!0);const t=yield(0,c.w2)(e.email);if(s(!1),!t)return void k();const{status:r="failed"}=t;"failed"!==r?"success"!==r?k():d(e.email):v("email",{type:"zephr",message:m.y.unknownError()})})),children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"screen-reader-text",children:(0,i.__)("Email","nypost")}),(0,r.jsx)("input",Object.assign({className:l()({"input-error":null==A?void 0:A.email}),id:"email",placeholder:(0,i.__)("Email Address","nypost")},g("email",{setValueAs:e=>p.S.plainText(e),required:m.y.validEmail(),pattern:{value:h.Xw,message:m.y.validEmail()}}),{required:!0,type:"email"}))]}),(0,r.jsx)(u.dF,{errors:A}),(0,r.jsx)("div",{children:(0,r.jsx)("input",{className:l()({disabled:e}),"data-testid":"forgot-password-submit",disabled:e,type:"submit",value:E})})]}),(0,r.jsx)("p",{className:"form-text form-text--forgot-return m-bottom-double",children:(0,r.jsx)(a.N_,{to:"/account/login",children:(0,i.__)("Return to Log In","nypost")})})]})})}},6790:function(e,s,t){t.r(s),t.d(s,{ForgotPasswordPage:function(){return l}});var r=t(1085),n=(t(4041),t(7309)),o=t(4685),a=t(8188),i=t(7351),d=t(3269);const l=()=>((0,i.QD)("membership-minimal-header"),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.mg,{children:(0,r.jsx)("title",{children:(0,n.nv)((0,n.__)("Forgot Password - %s","nypost"),a.yy)})}),(0,r.jsx)(d.F,{})]}))}}]);
2//# sourceMappingURL=6790.32a40864af13880599a7.bundle.min.js.map
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.