1"use strict";(self.webpackChunkp0777_f352a597_9bc6_42b1_865e_ac8f5ac2d52d=self.webpackChunkp0777_f352a597_9bc6_42b1_865e_ac8f5ac2d52d||[]).push([[94],{75780:function(e,a,s){s.r(a),s.d(a,{default:function(){return ae}});var r=s(73687),t=s(52513),o=s(28835),i=s(86326),l=s(52994),d=s(57268),n=s(61795),u=s(57604),c=s(65408),m=s(20141),g=s(31309),f=s(6082),v=s(55814),p=s(22018),y=s(69977),h=s(53549),w=s(86329);const b=()=>null;var Y=(0,i.memo)(b),x=s(97553);const F=(0,x.YK)({usernameField:{id:"loyalty.login.field.login-id-label",defaultMessage:"Email"},passwordField:{id:"loyalty.login.field.password-label",defaultMessage:"Password"},submit:{id:"loyalty.login.field.submit-label",defaultMessage:"Log in"},forgotUsername:{id:"loyalty.login.field.forgot-username-label",defaultMessage:"I forgot my username"},forgotPassword:{id:"loyalty.login.field.forgot-password-label",defaultMessage:"I forgot my password"},activateAccount:{id:"loyalty.signup.activate-account-label",defaultMessage:"Activate my account"},genericError:{id:"loyalty.login.generic-error-message",defaultMessage:"Could not log in, check your email and password and retry"}}),k=(0,x.YK)({required:{id:"loyalty.login.error.field-required-label",defaultMessage:"This field is required"},email:{id:"loyalty.login.error.invalid-email-label",defaultMessage:"This field must be a valid email"},matchPassword:{id:"loyalty.signup.error.match-password-label",defaultMessage:"Passwords must match."},badPassword:{id:"loyalty.signup.error.bad-password-label",defaultMessage:"Password must meet requirements."},badPasswordWithDetails:{id:"loyalty.cypher-message.code-84-with-details",defaultMessage:"Your password is not strong enough. It must contain at least 8 characters, 1 lowercase letter, 1 uppercase letter, 1 number, and 1 special character."}});var A=F;const S=e=>{let{type:a}=e;const{formatMessage:s}=(0,w.A)();let r;switch(a){case"email":r=s(k.email);break;case"badPasswordWithDetails":r=s(k.badPasswordWithDetails);break;default:r=s(k.required)}return i.createElement("span",{role:"alert"},r)};var M=i.memo(S);const P="insertFromPaste",C=e=>{let{error:a,errors:s,isValid:r,loading:t,message:o,onSubmit:i,setFieldTouched:l,setShowActivation:d,setShowForgotPassword:n,setValue:u,stackedForm:c,touched:g,values:f,widgetId:b,captchaProps:x}=e;const F=(0,v.A)(),{formatMessage:k}=(0,w.A)();return(0,m.Y)(h.A,{onSubmit:async e=>{e.preventDefault(),await i()}},(0,m.Y)(Y,{stackedForm:c}),(0,m.Y)(m.xA,{columns:c?"1fr":(0,y.no)({xs:"1fr",sm:"1fr 1fr"})},(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${b}-loyalty-username`},`${k(A.usernameField)} *`),(0,m.Y)(m.pd,{id:`${b}-loyalty-username`,name:"username",type:"text","aria-required":!0,value:f.username,onChange:e=>{var a;u("username",e.target.value,(null==e||null===(a=e.nativeEvent)||void 0===a?void 0:a.inputType)!==P)},onBlur:()=>{l("username")},"aria-autocomplete":"both"}),g.username&&s.username&&(0,m.Y)(M,{type:s.username})),(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${b}-loyalty-password`},`${k(A.passwordField)} *`),(0,m.Y)(m.pd,{id:`${b}-loyalty-password`,name:"password",type:"password","aria-required":!0,value:f.password,onChange:e=>{var a;u("password",e.target.value,(null==e||null===(a=e.nativeEvent)||void 0===a?void 0:a.inputType)!==P)},onBlur:()=>{l("password")},"aria-autocomplete":"both"}),g.password&&s.password&&(0,m.Y)(M,{type:s.password}))),(0,m.Y)(m.xA,{columns:"1fr",sx:{justifyItems:"center",marginTop:8}},(0,m.Y)("div",{sx:{display:c?void 0:"flex",alignItems:"center",justifyContent:"center",width:c?"100%":void 0}},(0,m.Y)("div",{sx:{width:c?"100%":void 0}},(0,m.Y)(m.$n,{variant:"buttons.secondary",disabled:!r||t||"verified"!==x.captchaVerificationState,type:"submit",sx:{width:c?"100%":void 0}},"verified"===x.captchaVerificationState?k(A.submit):k(x.captchaMessages[x.captchaVerificationState]))),(t||a||o)&&(0,m.Y)("div",{sx:{marginLeft:c?void 0:3,marginTop:c?3:void 0,textAlign:c?"center":void 0}},t&&(0,m.Y)("div",null,(0,m.Y)(m.y$,{size:32,color:"currentColor"})),a&&(0,m.Y)("div",{sx:{fontWeight:"bold"}},a),o&&(0,m.Y)("div",{sx:{fontWeight:"bold"}},o))),(0,m.Y)("div",{role:"button",tabIndex:0,sx:{cursor:"pointer",textDecoration:"underline"},onClick:n},k(A.forgotPassword)),F.includeActivation&&(0,m.Y)("div",{role:"button",tabIndex:0,sx:{cursor:"pointer",textDecoration:"underline"},onClick:d},k(A.activateAccount))),"Turnstile"===x.captchaProvider?(0,m.Y)(p.A,{id:b,onVerificationStateChange:x.setCaptchaVerificationState}):null)};var q=(0,i.memo)(C),V=s(35255),E=s(46144),I=s(75674);var $=(0,x.YK)({usernameField:{id:"loyalty.forgot-password.field.email-label",defaultMessage:"Email"},submit:{id:"loyalty.forgot-password.field.submit-label",defaultMessage:"Reset password"},goBack:{id:"loyalty.forgot-password.field.go-back-label",defaultMessage:"Go back to login"},success:{id:"loyalty.forgot-password.success-title",defaultMessage:"Check your inbox and follow the reset password steps"},genericError:{id:"loyalty.forgot-password.generic-error-message",defaultMessage:"Error sending reset password email"},tooManyRequests:{id:"loyalty.forgot-password.too-many-requests-error-message",defaultMessage:"Error - Too many requests"}});const T=e=>{let{errors:a,handleGoBack:s,loading:r,isValid:t,onSubmit:o,setFieldTouched:i,setValue:l,stackedForm:d,touched:n,values:u,widgetId:c}=e;const{formatMessage:g}=(0,w.A)();return(0,m.Y)(h.A,{onSubmit:async e=>{e.preventDefault(),null!=a&&a.email||await o()}},(0,m.Y)(m.xA,{columns:(0,y.no)({xs:"1fr"})},(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${c}-loyalty-email`},`${g($.usernameField)} *`),(0,m.Y)(m.pd,{id:`${c}-loyalty-email`,name:"email",type:"text","aria-required":!0,value:u.email,onChange:e=>{l("email",e.target.value)},onBlur:()=>{i("email")},"aria-autocomplete":"both"}),n.email&&a.email&&(0,m.Y)(M,{type:a.email})),(0,m.Y)("div",null,(0,m.Y)("div",{sx:{display:d?void 0:"flex",alignItems:"center",justifyContent:"center",width:d?"100%":void 0}},(0,m.Y)("div",{sx:{width:d?"100%":void 0}},(0,m.Y)(m.$n,{variant:"buttons.secondary",disabled:!t||r,type:"submit",sx:{width:d?"100%":void 0}},g($.submit))),r&&(0,m.Y)("div",{sx:{marginLeft:d?void 0:3,marginTop:d?3:void 0,textAlign:d?"center":void 0}},(0,m.Y)("div",null,(0,m.Y)(m.y$,{size:32,color:"currentColor"}))))),(0,m.Y)("div",{role:"button",sx:{cursor:"pointer",textAlign:"center",textDecoration:"underline"},onClick:()=>{s()}},g($.goBack))))};var B=(0,i.memo)(T);const G=e=>{let{widgetId:a,loyaltySettings:s,handleGoBack:r,email:t,stackedForm:o}=e;const{0:l,1:d}=(0,i.useState)(!1),{formatMessage:u}=(0,w.A)(),{getCypherMessage:c}=(0,f.A)(),g=(0,V.A)(),{values:v,setValue:p,setFieldTouched:y,errors:h,touched:b,isValid:Y}=(0,n.A)({initialValues:{email:t||""},validationSchema:n.h.object({email:n.h.string().email().required("required")})});return(0,m.Y)(B,{errors:h,handleGoBack:r,loading:l,isValid:Y,onSubmit:async()=>{d(!0),(0,I.sY)(s,v.email,g).then((e=>{"peachCode"in e?0===e.peachCode?r(u($.success)):r(c({response:e,fallback:$.genericError})):"status"in e&&e.status===E.eQ?r(u($.tooManyRequests)):r(u($.genericError))})).catch((()=>{r(u($.genericError))}))},setFieldTouched:y,setValue:p,stackedForm:o,touched:b,values:v,widgetId:a})};var L=(0,i.memo)(G);var D=(0,x.YK)({usernameField:{id:"loyalty.forgot-username.field.email-label",defaultMessage:"Email"},submit:{id:"loyalty.forgot-username.field.submit-label",defaultMessage:"Send me my username"},goBack:{id:"loyalty.forgot-username.field.go-back-label",defaultMessage:"Go back to login"},success:{id:"loyalty.forgot-username.success-title",defaultMessage:"Check your inbox for your username reminder"},genericError:{id:"loyalty.forgot-username.generic-error-message",defaultMessage:"Error sending username reminder email"}});const _=e=>{let{widgetId:a,loyaltySettings:s,handleGoBack:r,email:t,stackedForm:o}=e;const{0:l,1:d}=(0,i.useState)(!1),{formatMessage:u}=(0,w.A)(),{getCypherMessage:c}=(0,f.A)(),{values:g,setValue:v,setFieldTouched:p,errors:b,touched:Y,isValid:x}=(0,n.A)({initialValues:{email:t||""},validationSchema:n.h.object({email:n.h.string().email().required("required")})});return(0,m.Y)(h.A,{onSubmit:async e=>{e.preventDefault(),null!=b&&b.email||await(async()=>{d(!0),(0,I.hG)(s,g.email).then((e=>{0===e.peachCode?r(u(D.success)):r(c({response:e,fallback:D.genericError}))})).catch((()=>{r(u(D.genericError))}))})()}},(0,m.Y)(m.xA,{columns:(0,y.no)({xs:"1fr"})},(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${a}-loyalty-email`},`${u(D.usernameField)} *`),(0,m.Y)(m.pd,{id:`${a}-loyalty-email`,name:"email",type:"text","aria-required":!0,value:g.email,onChange:e=>{v("email",e.target.value)},onBlur:()=>{p("email")},"aria-autocomplete":"both"}),Y.email&&b.email&&(0,m.Y)(M,{type:b.email})),(0,m.Y)("div",null,(0,m.Y)("div",{sx:{display:o?void 0:"flex",alignItems:"center",justifyContent:"center",width:o?"100%":void 0}},(0,m.Y)("div",{sx:{width:o?"100%":void 0}},(0,m.Y)(m.$n,{variant:"buttons.secondary",disabled:!x||l,type:"submit",sx:{width:o?"100%":void 0}},u(D.submit))),l&&(0,m.Y)("div",{sx:{marginLeft:o?void 0:3,marginTop:o?3:void 0,textAlign:o?"center":void 0}},(0,m.Y)("div",null,(0,m.Y)(m.y$,{size:32,color:"currentColor"}))))),(0,m.Y)("div",{role:"button",sx:{cursor:"pointer",textAlign:"center",textDecoration:"underline"},onClick:()=>{r()}},u(D.goBack))))};var U=(0,i.memo)(_),j=s(49945),K=s(57406),O=s(81518);const R=()=>null;var W=(0,i.memo)(R);var J=(0,x.YK)({passwordField:{id:"loyalty.reset-password.field.password-label",defaultMessage:"Password"},confirmPasswordField:{id:"loyalty.reset-password.field.confirm-password-label",defaultMessage:"Confirm Password"},submit:{id:"loyalty.reset-password.field.submit-label",defaultMessage:"Reset Password"},goBack:{id:"loyalty.reset-password.field.go-back-label",defaultMessage:"Go back to login"},success:{id:"loyalty.reset-password.success-title",defaultMessage:"Your password has been reset"},genericError:{id:"loyalty.reset-password.generic-error-message",defaultMessage:"Error resetting password"}});const z=e=>{var a,s,r;let{errors:t,handleGoBack:o,loading:l,isValid:d,onSubmit:n,setFieldTouched:u,setValue:c,stackedForm:g,touched:f,values:v,widgetId:p,message:b}=e;const{formatMessage:Y}=(0,w.A)(),x=(0,O.K)(v.provider),F=null==x||null===(a=x.featureFlags)||void 0===a||null===(s=a.widgets)||void 0===s||null===(r=s.LOGIN_FORM)||void 0===r?void 0:r.extra,k=(0,K.U)(null==F?void 0:F.confirmPasswordField);return(0,m.Y)(h.A,{onSubmit:async e=>{e.preventDefault(),null!=t&&t.password||null!=t&&t.confirmPassword||await n()}},(0,m.Y)(m.xA,{columns:(0,y.no)({xs:"1fr"})},(0,m.Y)(m.xA,{columns:(0,y.no)({xs:"1fr",sm:"1fr 1fr"})},(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${p}-password`},`${Y(J.passwordField)} *`),(0,m.Y)(i.Suspense,null,(0,m.Y)(m.pd,{id:`${p}-password`,type:"password",name:"password","aria-required":!0,value:v.password,onChange:e=>{c("password",e.target.value)},onBlur:()=>{u("password")}})),f.password&&t.password&&(0,m.Y)(M,{type:t.password})),k?(0,m.Y)("div",null,(0,m.Y)(m.JU,{htmlFor:`${p}-confirm-password`},`${Y(J.confirmPasswordField)} *`),(0,m.Y)(i.Suspense,null,(0,m.Y)(m.pd,{id:`${p}-confirm-password`,type:"password",name:"confirmPassword","aria-required":!0,value:v.confirmPassword,onChange:e=>{c("confirmPassword",e.target.value)},onBlur:()=>{u("confirmPassword")}})),f.confirmPassword&&t.confirmPassword&&(0,m.Y)(M,{type:t.confirmPassword})):(0,m.Y)("div",null)),(0,m.Y)(W,null),(0,m.Y)("div",null,(0,m.Y)(m.s
1o,{sx:{display:g?void 0:"flex",alignItems:"center",justifyContent:"center",width:g?"100%":void 0}},(0,m.Y)("div",{sx:{width:g?"100%":void 0}},(0,m.Y)(m.$n,{variant:"buttons.secondary",disabled:!d||l,type:"submit",sx:{width:g?"100%":void 0}},Y(J.submit))),(l||b)&&(0,m.Y)("div",{sx:{marginLeft:g?void 0:3,marginTop:g?3:void 0,textAlign:g?"center":void 0}},(0,m.Y)("div",null,l&&(0,m.Y)(m.y$,{size:32,color:"currentColor"}),b&&(0,m.Y)("div",{sx:{fontWeight:"bold"}},b))))),(0,m.Y)("div",{role:"button",sx:{cursor:"pointer",textAlign:"center",textDecoration:"underline"},onClick:()=>{o()}},Y(J.goBack))))};var N=(0,i.memo)(z),Q=n.h.object({password:n.h.string().required("required").when("provider",{is:e=>{var a,s,r,t;const o=(0,O.K)(e);return(0,K.U)(null==o||null===(a=o.featureFlags)||void 0===a||null===(s=a.widgets)||void 0===s||null===(r=s.SIGNUP)||void 0===r||null===(t=r.extra)||void 0===t?void 0:t.detailedPasswordStrengthError)},then:n.h.string().required("required").test({test:I.Cx,message:"badPasswordWithDetails"})}),confirmPassword:n.h.string().required("required").test({test:(e,a)=>a.parent.password===e,message:"matchPassword"}),provider:n.h.mixed()});const H=e=>{var a,s,r;let{widgetId:t,loyaltySettings:o,handleGoBack:d,stackedForm:u}=e;const{0:c,1:g}=(0,i.useState)(!1),{0:p,1:y}=(0,i.useState)(),{formatMessage:h}=(0,w.A)(),b=(0,v.A)(),{getCypherMessage:Y}=(0,f.A)(),x=(0,O.K)(b.provider),F=null==x||null===(a=x.featureFlags)||void 0===a||null===(s=a.widgets)||void 0===s||null===(r=s.LOGIN_FORM)||void 0===r?void 0:r.extra,k=(0,K.U)(null==F?void 0:F.confirmPasswordField),{values:A,setValue:S,setFieldTouched:M,errors:P,touched:C,isValid:q}=(0,n.A)({initialValues:{password:"",confirmPassword:"",provider:b.provider},validationSchema:n.h.object({password:Q.fields.password,confirmPassword:n.h.string().when({is:()=>k,then:Q.fields.confirmPassword}),provider:Q.fields.provider})});return(0,m.Y)(N,{errors:P,handleGoBack:d,loading:c,isValid:q,onSubmit:async()=>{g(!0),y(void 0),(0,I.xw)(o,A.password).then((e=>{if(g(!1),0===(null==e?void 0:e.peachCode)){const e=new URL(location.href);e.searchParams.delete(l.tt),history.replaceState({},"",e),d(h(J.success))}else y(Y({response:e,fallback:J.genericError}))})).catch((()=>{g(!1),y(h(J.genericError))}))},setFieldTouched:M,setValue:S,stackedForm:u,touched:C,values:A,widgetId:t,message:p})};var X=(0,i.memo)(H);const Z=i.lazy((()=>s.e(503).then(s.bind(s,38935)))),ee=e=>{var a;let{widgetId:s,stackedForm:p,nestedForm:y,onSuccess:h}=e;const w=(0,u.A)(),{loginLoyaltyMember:b,loginError:Y,setLoginError:x}=(0,i.useContext)(g.eL),{hasFeatureFlag:F}=(0,d.u)(),k=F("website-generator-loyalty-preferred-cinema-field"),S=(0,v.A)(),{0:M,1:P}=(0,i.useState)(!1),{0:C,1:V}=(0,i.useState)(!1),{0:E,1:I}=(0,i.useState)(null!==(a=w.showForgotPassword)&&void 0!==a&&a),{0:$,1:T}=(0,i.useState)(!1),{0:B,1:G}=(0,i.useState)(!1),{0:D,1:_}=(0,i.useState)(void 0),K=(0,t.A)(),[O,R]=(0,c.vO)(),{getCaptchaToken:W,...J}=(0,o.e)(),{dataLayerTrack:z,memberLogin:N}=(0,r.A)(),{getCypherMessage:Q}=(0,f.A)();(0,i.useEffect)((()=>{var e;T(null===(e=window.location.search)||void 0===e?void 0:e.includes(`${l.tt}=`))}),[]),(0,i.useEffect)((()=>{(C||E)&&x(null)}),[C,E]),(0,i.useEffect)((()=>()=>{x(null)}),[]);const{values:H,setValue:ee,setFieldTouched:ae,setFieldsTouched:se,resetValues:re,errors:te,touched:oe,isValid:ie}=(0,n.A)({initialValues:{username:"",password:""},validationSchema:n.h.object({username:n.h.string().required("required"),password:n.h.string().required("required")})});if(C)return(0,m.Y)(U,{email:H.username,widgetId:s,loyaltySettings:S,handleGoBack:e=>{V(!1),_(e)},stackedForm:p});if(E)return(0,m.Y)(L,{email:H.username,widgetId:s,loyaltySettings:S,handleGoBack:e=>{I(!1),_(e)},stackedForm:p});if($)return(0,m.Y)(X,{widgetId:s,loyaltySettings:S,handleGoBack:e=>{T(!1),_(e)},stackedForm:p});return B?(0,m.Y)(i.Suspense,null,(0,m.Y)(Z,{widgetId:s,handleGoBack:()=>{G(!1)}})):(0,m.Y)(q,{error:Y,errors:te,isValid:ie,loading:M,message:D,onSubmit:async e=>{P(!0),x(null);const a=await W(s,"LOYALTY_LOGIN");b(e||H,a).then((e=>{if(P(!1),0===(null==e?void 0:e.peachCode)){re();const a=e.memberDetails||void 0;(e=>{if(!e)return;const a=K.find((a=>a.id===e));a&&!O&&R(a.id)})((0,j.q)(a,k)),z(N,{member:a}),null==h||h(e)}else x(Q({response:e,fallback:A.genericError}))})).catch((e=>{P(!1),x(Q({response:e,fallback:A.genericError}))}))},setFieldTouched:e=>{ae(e)},setFieldsTouched:se,setShowActivation:()=>{G(!0)},setShowForgotPassword:()=>{I(!0)},setValue:(e,a,s)=>{ee(e,a,s)},stackedForm:p,nestedForm:y,touched:oe,values:H,widgetId:s,captchaProps:J})};var ae=(0,i.memo)(ee)}}]);
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.