(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1641],{10291:function(e,n,t){"use strict";t.d(n,{m:function(){return E}});var i,o,r=t(95235),l=t(2784),a=t(660),u=t(18412),c=t(41857),d=t(58406),s=t(28316),m=t(3176),g=t(52322),v=l.forwardRef(function(e,n){var t,i,o,r;return"undefined"!=typeof document&&document.body?s.createPortal((i=e.onVerify,o=e.siteKey,r=e.size,(0,g.jsx)(m.Z,{ref:n,size:r,onChange:i,sitekey:o})),null!==(t=e.containerRef)&&void 0!==t&&t.current?e.containerRef.current:document.body):null}),p=t(72370),f=((i=f||{}).LIST_ATTACK_STRATEGY_RECAPTCHA_VISIBLE="VISIBLE-RECAPTCHA",i.LIST_ATTACK_STRATEGY_RECAPTCHA_INVISIBLE="INVISIBLE-RECAPTCHA",i.LIST_ATTACK_STRATEGY_HCAPTCHA="HCAPTCHA",i.LIST_ATTACK_STRATEGY_TURNSTILE="TURNSTILE",i),T=(o={},(0,r.Z)(o,f.LIST_ATTACK_STRATEGY_RECAPTCHA_VISIBLE,p.QZ.RECAPTCHA_BYPASS_TYPE_VISIBLE),(0,r.Z)(o,f.LIST_ATTACK_STRATEGY_RECAPTCHA_INVISIBLE,p.QZ.RECAPTCHA_BYPASS_TYPE_INVISIBLE),(0,r.Z)(o,f.LIST_ATTACK_STRATEGY_HCAPTCHA,p.QZ.HCAPTCHA_BYPASS_TYPE),(0,r.Z)(o,f.LIST_ATTACK_STRATEGY_TURNSTILE,p.QZ.TURNSTILE_BYPASS_TYPE),o),E=function(e){var n=(0,d.Mu)(),t=(0,c.ND)(),i=l.useRef(null),o=l.useRef(null),r=l.useRef(),s=t.enableRecaptchaNet,m=t.invisibleReCaptchaSharedSiteKey,E=l.useCallback(function(e){e&&r.current&&r.current(e)},[]);return l.useEffect(function(){s&&(window.recaptchaOptions={useRecaptchaNet:!0})},[]),l.useEffect(function(){var n={count:0,maxRetries:5,interval:200};e.onLoad&&function t(){if(null!==(o=e.containerRef)&&void 0!==o&&o.current)try{var i,o,r,l=new MutationObserver(function(n){n.forEach(function(n){if("childList"===n.type){var t,i;(null===(t=e.containerRef)||void 0===t||null===(t=t.current)||void 0===t?void 0:t.querySelector("iframe"))&&(null===(i=e.onLoad)||void 0===i||i.call(e),l.disconnect())}})});return l.observe(e.containerRef.current,{childList:!0,subtree:!0}),function(){return l.disconnect()}}catch(n){null===(r=e.onError)||void 0===r||r.call(e,n)}else n.count').concat(S.pt6Text,""):"",A=S.pt8Text&&S.additionalLink2?'').concat(S.pt8Text,""):"",w=(0,B.vsprintf)('%s %s %s %s %s %s %s %s',[x("text.pt1"),x("link.terms"),x("text.pt2"),x("text.pt3"),x("link.privacy"),x("text.pt4"),x("text.pt5"),b,x("text.pt7"),A]);return(0,ex.jsxs)(em,{children:[v&&(0,ex.jsx)(es,{children:(0,ex.jsx)(eu,eb(eb({},e.picture),{},{fetchPriority:"high"}))}),e.status===eL.UNSUBMITTED?(0,ex.jsxs)(eh,{children:[(0,ex.jsxs)(ec,{children:[(0,ex.jsx)(ew,{children:(0,ex.jsx)("img",{src:e.theme.logo.logoUri,alt:"brand_logo"})}),(0,ex.jsx)(el,{children:e.modalTitle}),(0,ex.jsx)(ed,{children:f})]}),(0,ex.jsxs)(_.Fragment,{children:[(0,ex.jsxs)(X.F,{csrf:i,onSubmit:function(e){o.submit(function(n){return E(e,n)})},"data-testid":"form-guest-checkout",fields:[{fieldName:"emailAddress",renderField:function(n,t){return(0,ex.jsx)(q.x,{bindref:n,disableSpacing:!0,children:(0,ex.jsx)(Q.I,{triggeredByEmailEngagementModal:!0,label:e.i18nText.inputLabel,required:!0,type:"email",autocomplete:"email",onFocus:y})},t)}}],children:[o.captcha,(0,ex.jsx)(ef,{type:"submit",emphasis:null===(n=e.theme.widget.emailEngagementModal)||void 0===n||null===(n=n.submitButton)||void 0===n?void 0:n.emphasis,"data-testid":"button-submit-newletter-signup",children:e.i18nText.submitButton})]}),g?(0,ex.jsx)(eT,{content:w}):(0,ex.jsx)(eE,{emphasis:"low",renderedAs:"a",href:"/".concat(e.i18nText.privacyPolicyLink),children:e.i18nText.privacyPolicyText})]})]}):e.status===eL.SUCCESSFUL?(0,ex.jsx)(eh,{children:(0,ex.jsxs)(ey,{children:[(0,ex.jsx)(e_,{viewBox:"0 0 14 14"}),(0,ex.jsx)(eg,{children:e.i18nText.successTitle}),(0,ex.jsx)(ev,{children:e.i18nText.successText}),(0,ex.jsx)(ep,{onClick:function(){e.closeHandler(),j.continueButtonHandler()},"data-testid":"continue-button-newsletter",children:e.i18nText.continueButton})]})}):(0,ex.jsx)(eh,{children:(0,ex.jsxs)(ey,{children:[(0,ex.jsx)(eg,{children:e.i18nText.errorTitle}),(0,ex.jsx)(ev,{children:e.i18nText.errorText}),(0,ex.jsx)(ep,{emphasis:"low",onClick:function(){e.statusHandler(eL.UNSUBMITTED)},"data-testid":"retry-button-newsletter",children:e.i18nText.tryAgainButton})]})})]})};function ek(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function eR(e){for(var n=1;n0){var e=setTimeout(function(){c(!0)},d);return function(){return clearTimeout(e)}}c(!0)}},[d]),_.useEffect(function(){switch(o){case eL.SUCCESSFUL:w.set("emailEngagementCookie","newsletter-accepted",{expires:365});break;case eL.REJECTED:w.set("emailEngagementCookie","newsletter-rejected",{expires:365});break;case eL.FAILURE:w.set("emailEngagementCookie","newsletter-failure",{expires:365})}},[o]);var s={picture:e.picture,modalTitle:e.emailReEngagementTitleText||"",bulletText:[e.emailReEngagementBulletText1||"",e.emailReEngagementBulletText2||"",e.emailReEngagementBulletText3||""],status:o,open:u,statusHandler:function(e){return r(e)},closeHandler:function(){return c(!1)}};return(0,ex.jsx)(eP,function(e){for(var n=1;n