!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t){e.exports=require("react")},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}},t._createSuper=function(e){var t=u();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?p(e):t}(this,n)}},t._defineProperty=i,t._extends=l,t._inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)},t._objectSpread2=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},t._slicedToArray=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},t._toConsumableArray=function(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},t._typeof=o,t._wrapNativeSuper=d},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0);n(5);var a=n(8),i=n(9),l=n(10);var c,s,u=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(o),f={consentCountry:"",tos:""},d=function(){var e="undefined"==typeof window?"":window.location&&window.location.hostname||"";return/(subscribe\.|subscription\.|localhost.digitalink\.)/.test(e)},p={configUrl:{dev:"https://subscribe.digitalink.com",sandbox:"https://subs-stage.washingtonpost.com",prod:"https://www.washingtonpost.com/subscribe"},subsUrl:{dev:"https://subscribe.digitalink.com",sandbox:"https://subs-stage.washingtonpost.com",prod:"https://subscribe.washingtonpost.com"}},b=function(){try{var e=(new Date).toString();window.localStorage.setItem(e,e);var t=window.localStorage.getItem(e)===e;return window.localStorage.removeItem(e),t}catch(e){return!1}},m=function(e){return p[e][(t="undefined"==typeof window?"":window.location&&window.location.hostname||"",n="prod",/(pb-impact\.|subs-stage\.|sandbox\.|.preview.now.washingtonpost.com|localhost.washingtonpost.com)/.test(t)?n="sandbox":/dev\.washpost|localhost|digitalink\.com/.test(t)&&(n="dev"),n)]||p[e].prod;var t,n},y=function(){return!!a.getCookie("wapo_actmgmt")},h=function(e){var t;if(b()&&(t=JSON.parse(localStorage.getItem("wapo_identity"))),t){var n={privacySetting:r._objectSpread2(r._objectSpread2({},t.privacySetting),e)},o=r._objectSpread2(r._objectSpread2({},t),n);localStorage.setItem("wapo_identity",JSON.stringify(o))}},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=m("subsUrl"),o={appName:"SC",locationId:"SC:TermsOfService",message:"no message",state:{}};o=r._objectSpread2(r._objectSpread2({},o),t);var l=a.getCookie("wapo_login_id")||"";return l&&(o.state.wapo_login_id=l),i.JSONFetch("".concat(n,"/logging/").concat(e),{method:"POST",credentials:"include",body:JSON.stringify(o)})},v=function(e){var t=m("subsUrl"),n=null;return i.JSONFetch("".concat(t,"/user/auth-status?_v=").concat((new Date).getTime()),{method:"GET",credentials:"include"}).then(function(e){e&&"SUCCESS"===e.status&&!d()&&function(e){if(b()){var t=localStorage.getItem("wapo_identity");t=t&&JSON.parse(t)||{};var n=Object.assign(t,e),r=Date.now()+864e5;n.e=r,localStorage.setItem("wapo_identity",JSON.stringify(n))}}(e.userState),n=e}).catch(function(e){return console.error(e)}).finally(function(){return d()||h(e),n})},O=function(){var e,t=(b()&&(e=y()?JSON.parse(localStorage.getItem("wapo_identity")):{}),e?e.privacySetting||f:{});return 0===Object.keys(t).length&&y()&&d()?v().then(function(e){var t;return(null==e||null===(t=e.userState)||void 0===t?void 0:t.privacySetting)||f}):Promise.resolve(t)},w=function(e){return Object.keys(e).reduce(function(t,n){return t[n.toLowerCase()]=e[n],t},{})},E=function(e,t){var n=new RegExp(Object.keys(t).join("|"),"gi");return null==e?void 0:e.replace(n,function(e){return t[e]})};l.styleInject("input[type=checkbox].index-module_tos-checkbox__3XQ6z{-webkit-appearance:none;align-self:baseline}input[type=checkbox].index-module_tos-checkbox__3XQ6z:checked{background-color:#000}");var S=function(e){var t=e.onChange,n=e.isChecked,r=e.checkboxLabelClass,o=e.id,a=e.children,i=e.labelSizeSm,l=e.disabled,f="db gray-dark relative flex pt-xxs pb-xxs items-start ".concat(r),d=i?"16px":"18px",p=l?"not-allowed":"";return u.default.createElement("label",{htmlFor:o,className:f,"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},u.default.createElement("span",{className:"relative mr-xs",style:{height:d,width:d},"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},u.default.createElement("input",{id:o,className:"".concat("index-module_tos-checkbox__3XQ6z"," inset-shadow bg-white brad-2 relative outline-none appearance-none ma-0 ").concat(p),type:"checkbox",checked:n,onChange:t,"data-testid":o,style:{height:d,width:d},disabled:l,"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"}),u.default.createElement("svg",{className:"absolute top-50 left-0 -translate-y-50 ".concat(""," ").concat(n?"dib":"dn"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{height:d,width:d},"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},c||(c=u.default.createElement("title",{"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},"Check")),s||(s=u.default.createElement("path",{d:"M10.052 16.245L3.265 9.46l-1.767 1.768 7.778 7.778a1.25 1.25 0 0 0 1.863-.107L23.415 3.413 21.456 1.86 10.052 16.245z",fill:"#fff",fillRule:"nonzero","data-sc-v":"4.39.0","data-sc-c":"toscheckbox"})))),a)},_=function(e){var t=e.htmlText,n=e.checkboxLabelClass,r=e.isRequired,o=e.id;return u.default.createElement("span",{style:{paddingTop:"1px"},className:"db ".concat(n||""),"data-sc-v":"4.39.0","data-sc-c":"toslabel"},u.default.createElement("span",{"data-testid":"".concat(o,"Text"),dangerouslySetInnerHTML:{__html:t},"data-sc-v":"4.39.0","data-sc-c":"toslabel"}),r&&u.default.createElement("span",{className:"red font-xxs",style:{lineHeight:"0"},"data-sc-v":"4.39.0","data-sc-c":"toslabel"},"*"))},j={tosConfig:{_:{tos:{_:{text:"I agree to The Washington Post's {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}}.",required:!0,implicit:!1,prechecked:!1},checkout:{text:null,required:!1,implicit:!0},freeTrial:{text:"By signing up for this free trial, you agree to the {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}}.",implicit:!1}},marketingConsent:{_:{text:null,implicit:!0,prechecked:!1}}},us:{tos:{},marketingConsent:{}},ca:{tos:{},marketingConsent:{_:{text:"The Washington Post may use my email address to provide me occasional special offers via email and through other platforms. I can opt out at any time.",implicit:!1},checkout:{prechecked:!0}}},"gb|at|be|bg|hr|cy|cz|dk|ee|fi|fr|de|gr|hu|ie|it|lv|lt|lu|mt|nl|pl|pt|ro|sk|si|es|se|is|no|ch|li":{tos:{freeTrial:{text:"By signing up for this free trial of our , you agree to the use by us and our {{THIRD_PARTY_PARTNERS}} of cookies and data gathered from your use of our sites, apps and newsletters to customize your experience, perform analytics and deliver personalized advertising on our platforms and across the Internet. You can manage the collection and use of such data here, or if you do not consent to the use of cookies and tracking on our sites and apps for personalized advertising, you may subscribe to our Premium EU Ad-Free subscription. See our {{TERMS_OF_SERVICE}} and {{PRIVACY_POLICY}} for more information about the use of the data and your rights.",implicit:!1}},marketingConsent:{_:{text:"The Washington Post may use my email address to provide me occasional special offers via email and through other platforms. I can opt out at any time.",implicit:!1},checkout:{prechecked:!0}}}},tosMapObj:{"{{TERMS_OF_SERVICE}}":"Terms of Service","{{PRIVACY_POLICY}}":"Privacy Policy","{{THIRD_PARTY_PARTNERS}}":"third-party partners"}},C=function(e){var t,n=e.propTosConfig,i=e.propMcConfig,l=e.isToSNeeded,c=e.type,s=e.isConfigNeeded,u=e.overrideTosHidden,f=e.userConfigReady,d=o.useState(!1),p=r._slicedToArray(d,2),b=p[0],y=p[1],h=o.useState({isChecked:!1}),g=r._slicedToArray(h,2),v=g[0],O=g[1],S=o.useState({isChecked:!1}),_=r._slicedToArray(S,2),C=_[0],P=_[1],A=(t=a.getCookie("wp_geo")||"")&&t.split("|")[0]?t.split("|")[0].toLowerCase():null,T=function(e){var t=null==e?void 0:e.tosConfig,o=null==e?void 0:e.tosMapObj;t||(t=j.tosConfig,o=j.tosMapObj);var a=function(e){var t=e.s3Config,n=e.country,o=e.propTosConfig,a=void 0===o?{}:o,i=e.propMcConfig,l=void 0===i?{}:i,c=e.isToSNeeded,s=e.type,u=e.overrideTosHidden,f=e.s3MapObj,d=t._||{},p=r._objectSpread2(r._objectSpread2({},null==d?void 0:d.tos._),null==d?void 0:d.tos[s]),b=r._objectSpread2(r._objectSpread2({},null==d?void 0:d.marketingConsent._),null==d?void 0:d.marketingConsent[s]),m={},y={},h=Object.keys(t).find(function(e){return e.toLowerCase().indexOf(n)>-1});if(h){var g,v,O,S,_=w(a),j=r._objectSpread2(r._objectSpread2({},_._),_[h]),C=w(l),P=r._objectSpread2(r._objectSpread2({},C._),C[h]);m=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(g=t[h])||void 0===g?void 0:g.tos._),null===(v=t[h])||void 0===v?void 0:v.tos[s]),j),y=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(O=t[h])||void 0===O?void 0:O.marketingConsent._),null===(S=t[h])||void 0===S?void 0:S.marketingConsent[s]),P)}var A=!u&&(!c||m.prechecked);return m=r._objectSpread2(r._objectSpread2(r._objectSpread2({},p),m),{},{isChecked:!!A}),y=r._objectSpread2(r._objectSpread2(r._objectSpread2({},b),y),{},{isChecked:!!y.prechecked}),f&&(m.text=E(m.text,f),y.text=E(y.text,f)),{tos:m,mc:y}}({s3Config:t,country:A,propTosConfig:n,propMcConfig:i,isToSNeeded:l,type:c,overrideTosHidden:u,s3MapObj:o}),s=a.tos,f=a.mc;O(s),P(f),y(!0)};return o.useEffect(function(){var e;f&&(s||n||i?(e=m("configUrl"),Promise.race([fetch("".concat(e,"/static/config/tos/tos.json"),{method:"GET"}),new Promise(function(e,t){return setTimeout(function(){return t(new Error("timeout"))},8e3)})])).then(function(e){return e.json()}).then(function(e){T(e)}).catch(function(e){console.error(e),T(j)}):y(!0))},[f,s,l]),{tosConfig:v,mcConfig:C,ready:b,country:A,updateConfigValue:function(e,t){"tos"===e?O(t):"mc"===e&&P(t)}}},P=function(e){var t=e.isSubmitted,n=void 0!==t&&t,a=e.type,l=void 0===a?"account":a,c=e.email,s=e.className,f=void 0===s?"":s,p=e.checkboxLabelClass,b=void 0===p?"":p,w=e.tosConfig,E=e.mcConfig,j=e.onChange,P=void 0===j?function(){console.error("onChange function missing"),g("logFailure",{message:"onChange function missing"})}:j,A=e.tosConfigReady,T=void 0===A?function(){}:A,L=e.overrideTosHidden,x=void 0!==L&&L,I=e.labelSizeSm,R=void 0===I||I,N=e.disabled,k=void 0!==N&&N,D=o.useState({}),M=r._slicedToArray(D,2),U=M[0],F=M[1];o.useEffect(function(){var e,t,n;(e=x,t=!1,n=!1,O().then(function(r){var o=r.marketingConsent,a=void 0===o?{}:o,i=r.tos,l=void 0===i?{}:i;return t="Y"!==l.consent,void 0!==a.consent&&0==a.consent||(n=!0),{tos:l,marketingConsent:a,isConfigNeeded:e||t||n,isToSNeeded:t,isMcNeeded:n,userConfigReady:!0}})).then(function(e){F(e)})},[x]);var z=U.tos,B=void 0===z?{}:z,W=U.marketingConsent,H=void 0===W?{}:W,q=U.isConfigNeeded,G=U.isToSNeeded,V=U.isMcNeeded,Y=U.userConfigReady,X=C({propTosConfig:w,propMcConfig:E,isToSNeeded:G,type:l,isConfigNeeded:q,overrideTosHidden:x,userConfigReady:Y}),J=X.tosConfig,$=X.mcConfig,K=X.ready,Z=X.country,Q=X.updateConfigValue;o.useEffect(function(){K&&((J.required||$.required)&&q||P(!0),T())},[K]),o.useEffect(function(){J.required&&$.required?P(J.isChecked&&$.isChecked):J.required?P(J.isChecked):$.required&&P($.isChecked)},[J.isChecked,$.isChecked]);o.useEffect(function(){n&&function(){var e=B.consent,t=B.consentCountry,n=H.consent,r=H.consentCountry,o=$.isChecked?0:1,a=$.implicit?-1:o,l=Z,s=J.isChecked||!G||J.implicit?"Y":"N";10==n?(a=a<0?1:a,l=Z):(void 0!==n&&!V||n>-1&&a<0||n==a)&&(a=n,l=r),function(e,t){t&&(e.email=t);var n=m("subsUrl"),r=JSON.stringify(e);i.JSONFetch("".concat(n,"/user/save-identity-preferences"),{method:"POST",credentials:"include",body:r}).then(function(t){if("SUCCESS"===t.status&&y()){var n=JSON.parse(localStorage.getItem("wapo_identity"));n&&n.signedIn?d()||h(e.privacySetting):v(e.privacySetting)}}).catch(function(e){console.error(e),g("logFailure",{message:"SIP failed",locationId:"SC:TermsOfService:api:/user/save-identity-preferences",state:{status:"failure",request:r}})})}({privacySetting:{tos:{consent:"".concat(s),consentCountry:"Y"!==e||G||x?Z:t},marketingConsent:{consent:"".concat(a),consentCountry:l}}},c)}()},[n]);var ee=R?"font-xxxxs":"font-xxxs",te=u.default.createElement(_,{htmlText:J.text,isRequired:J.required,id:"tosCheckbox",checkboxLabelClass:J.implicit?"".concat(ee," ").concat(b," pt-xxs pb-xxs gray-dark"):ee}),ne=u.default.createElement(_,{htmlText:$.text,isRequired:$.required,id:"mcCheckbox",checkboxLabelClass:$.implicit?"gray-dark ".concat(ee," ").concat(b):ee}),re=G||x;return u.default.createElement("div",{className:"db mt-xs mb-xs ".concat(f),"data-sc-v":"4.39.0","data-sc-c":"termsofservice"},re&&J.text&&!J.implicit&&u.default.createElement(S,{htmlText:J.text,onChange:function(){return Q("tos",r._objectSpread2(r._objectSpread2({},J),{},{isChecked:!J.isChecked}))},isChecked:J.isChecked,checkboxLabelClass:b,isRequired:J.required,id:"tosCheckbox",labelSizeSm:R,disabled:k},te),re&&J.text&&J.implicit&&te,V&&$.text&&!$.implicit&&u.default.createElement(S,{htmlText:$.text,onChange:function(){return Q("mc",r._objectSpread2(r._objectSpread2({},$),{},{isChecked:!$.isChecked}))},isChecked:$.isChecked,checkboxLabelClass:b,isRequired:$.required,id:"mcCheckbox",labelSizeSm:R,disabled:k},ne),V&&$.text&&$.implicit&&ne)};P.defaultProps={labelSizeSm:!0},t.TermsOfService=P},function(e,t,n){e.exports=n(6)()},function(e,t,n){"use strict";var r=n(7);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";t.getCookie=function(e){if("undefined"!=typeof window){var t=document.cookie.match("(^|;) ?".concat(e,"=([^;]*)(;|$)"));return t?t[2]:null}},t.setCookie=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];document.cookie="".concat(e,"=").concat(t,";")+(n&&"domain=.".concat(window.origin.split(".").slice(-2).join("."),"; path=/;"))}},function(e,t,n){"use strict";var r=n(2),o=function(e){return new Promise(function(t){return e.json().then(function(n){return t({status:e.status,ok:e.ok,json:n})})})},a=function(e){if(!e.ok)throw e.json||e;return e.json},i={Accept:"application/json","Content-Type":"application/json"};t.JSONFetch=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{method:"GET"},n=t;return n.headers=r._objectSpread2(r._objectSpread2({},t.headers),i),fetch(e,n).then(o).then(a)}},function(e,t,n){"use strict";t.styleInject=function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SoftwallNL",function(){return yn});var r=n(0),o=n.n(r),a=o.a.createContext({}),i=n(1),l=n.n(i);function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[];return e.includes("100")||e.includes("110")||e.includes("120")?"wall_retargeting":"wall_standard"}function V(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.replace(/\/|^wp - /g,"").replace(/,/g,";").trim()}).join(";").toLocaleLowerCase()}function Y(e,t){var n,r,o,a,i,l;return{label:"o1",browserUserAgentHit:navigator.userAgent,promoCode:"o1",acqEntranceType:G(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.actionCodes),geoMarket:(a=D().DMA===k,i=D().country_code,l=M(),a&&"US"===i?"L":i&&"US"!==i&&"CA"!==i&&!l?"I":l?"E":"CA"===i?"C":"N"),acqTemplate:"",acqEntrancePage:z(),arcId:t||"",contentTags:V(null===(r=window)||void 0===r?void 0:null===(o=r.wpMetaData)||void 0===o?void 0:o.ct_tags),actionCode:"".concat(null==e?void 0:e.action)}}var X=function(e,t){var n=e.pwapiResponse,r=e.arcId,o=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)};return{GAData:H(H({},Y(n,r)),t),addEvent:o,addEventWithArticleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(H(H(H({userAgentHit:window.navigator.userAgent,userAgentSession:window.navigator.userAgent},Y(n,r)),t),e))},addMarketingEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"paywall";o({event:"acq_marketing_".concat(e),category:"acquisition",action:"acq_marketing"})},addGAParamsToURL:function(e,o){var a=H(H(H({},Y(n,r)),t),o),i=encodeURIComponent(B()),l={promo:a.promoCode,arcId:a.arcId,acqEntType:a.acqEntranceType,destination:i,next_url:i,p:a.subscription_pricing,s_l:a.subscription_location,e:a.subscription_experience},c=new URL(e);return Object.keys(l).forEach(function(e){l[e]&&c.searchParams.append(e,l[e])}),c.toString()}}},J="wp_nl";function $(e){return{softwall:"sw","softwall-nl":"sw","softwall-subscribe":"sw",regwall:"rw","paywall-purchase":"pw","paywall-default":"pw"}[e]}function K(){return"undefined"!=typeof window?JSON.parse(localStorage.getItem(J)||"{}"):{}}function Z(e){localStorage.setItem(J,JSON.stringify(e))}function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:720,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"softwall",a=K(),i=$(o);if(t){var l=Date.now()+60*n*60*1e3;a[i]=l,Z(a)}else if(e){var c=Date.now()+60*r*60*1e3;a[e]=c,Z(a)}}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=K(),n=(t[e]||0)+1;t[e]=n,Z(t)}var te=function(){return"1"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")},ne=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};function re(){var e=N("wp_devicetype");return ne(e)?"tablet":te(e)?"mobile":"desktop"}var oe=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes(re())};function ae(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=oe(e.EXCLUDING_PLATFORMS),r=!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"softwall",n=K(),r=$(t);if(!n[r]&&!n[e])return!0;var o=Date.now(),a=!n[r]||n[r]0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=K()[e]||0;return n>=t&&0!==n||-1===n}(e.PAYWALL_TEMPLATE_ID,e.MAX_SNOOZE);return{isExcluded:n,shouldCloseWall:!/\/wall-builder\//.test(location.href)&&(t||n||!(null!=e&&e.SHOW_ALWAYS)&&r)&&!window.pendingIframeResize}}var ie=function(){var e=Object(r.useContext)(a).setSizes,t=function(){requestAnimationFrame(function(){e&&e({isSmall:g(),isMedium:v(),isLarge:O(),isExtraLarge:w()})})};return Object(r.useEffect)(function(){return"undefined"!=typeof window&&(e&&e({isExtraLarge:w()}),window.addEventListener("resize",t,!1)),function(){"undefined"!=typeof window&&window.removeEventListener("resize",t,!1)}},[]),null},le={NODE_ENV:"production",SERVICE_URL:"https://subscribe.washingtonpost.com",WALL_CONFIG:{nl_start_location:"URL",ACQ_BASE_URL:"https://subscribe.washingtonpost.com",HAS_PROMO_LABEL:"both",CTA_BUTTON_HEX_COLOR_OVERRIDE:"",AUTO_COLLAPSED_SECOND:0,SCREEN_STATE:"Default",SUPPORTING_TEXT:"You'll receive a succinct overview of the latest developments from Ukraine, updates from our many journalists on the ground, plus smart, big-picture analysis and top reads.",SHOW_CLOSE_ON_EXPAND:!0,EXPANDED_HEADER:"Sign up for our Today’s WorldView newsletter",PAYWALL_TEMPLATE_ID:"softwall-nl-849b3ab0905",NEWSLETTER_ID:"0FDBE7585524F003E050007F01000F39",TEMPLATE_ID:"softwall-nl",nl_start_method:"REGWALL_SOFT",MIN_ON_LOAD:!0,PROMO_LABEL_PRIMARY:"NEWSLETTER",ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",PROMO_LABEL_HAS_LOGO:!0,NOTE:"",GTM_LOADER:"gtm",CTA_BUTTON_TEXT:"Sign Up",PROMO_LABEL_PRIMARY_COLOR:"Offblack",INCLUDE_LOGGING:!0,CTA_BUTTON_COLOR:"Blue",EXPAND_ON_SCROLL:!1,PROMO_LABEL_SECONDARY:"WEEKDAYS",PROMO_LABEL_SECONDARY_COLOR:"Offblack",REGISTRATION_SUCCESS_HEADER:"You're all set!",CLOSE_BUTTON_EXPIRATION_HOUR:48,DEPLOYMENT_TOKEN:1648838010351,COLLAPSED_HEADER:"Get updates and analysis on the war in Ukraine with our newsletter",SUBMIT_EXPIRATION_HOUR:720,SHOW_CLOSE_ON_MIN:!1,CTA_BUTTON_STYLE:"Arrow",DEFAULT_FONT_COLOR:"offblack",BACKGROUND_COLOR:"White",WALL_CONFIG_ID:"b3ab0905-3b41-4c16-b2f5-23dbe508fd30",NEWSLETTER_NAME:"Today's WorldView",PAGE_RELOAD_AFTER_SIGN_UP:!1,EXCLUDING_PLATFORMS:"mobile",SHOW_ALWAYS:!1,PRIMARY_IMAGE_URL:"",COLLAPSE_ON_SCROLL:!1,MOBILE_IMAGE_URL:"http://placehold.jp/100x200.png",DEFAULT_LINK_COLOR:"gray-dark",LISTEN_FOR_ADS:!1,AUTO_COLLAPSED:!1,MAX_SNOOZE:1},VERSION:"3.2.2"};function ce(e){var t=N("wp_geo").split("|"),n=t[0],r=t[t.length-1];return e.includes(n)||(n=r),n}function se(e){var t,n,r,i=e.wallState,l=e.children,c="default";!parent.location.href.includes("wall-builder")&&(null==i?void 0:null===(t=i.wallConfig)||void 0===t?void 0:null===(n=t.REGION_LIST)||void 0===n?void 0:n.length)>0&&(c=ce(null==i?void 0:null===(r=i.wallConfig)||void 0===r?void 0:r.REGION_LIST).toLowerCase());return o.a.createElement(a.Provider,{value:i},l,o.a.createElement(ie,null),o.a.createElement("span",{id:"wall-templates-version","data-qa":"region-".concat(c),style:{display:"none"}},le.VERSION))}function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t$/,"").trim())))))}}},Se=["children","color","href","className","style","onClick","rounded","sendMessages","contentId","buttonStyle","innerHTML","isLoading"];function _e(){return(_e=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Te=function(e){var t=e.children,n=e.color,i=void 0===n?"WaPo blue":n,c=e.href,s=e.className,u=e.style,f=e.onClick,d=e.rounded,p=e.sendMessages,b=void 0!==p&&p,m=e.contentId,y=void 0===m?"":m,h=e.buttonStyle,g=void 0===h?"Button":h,v=e.innerHTML,O=void 0===v?"Subscribe":v,w=e.isLoading,E=void 0!==w&&w,S=Ae(e,Se),_=Ee(y),j=_.onChange,P=_.isContentEditable,A=Object(r.useContext)(a).wallConfig,T=null==A?void 0:A.DEFAULT_FONT_COLOR,L="",x="Link"===g||"Arrow"===g;L=x||"White"!==i&&"Black"!==i&&"WaPo blue"!==i?x?l()({"subs-theme":"White"!==i&&"WaPo blue"!==i&&"Black"!==i},"".concat([C[i]]," bold")):"btn subs-theme bg-".concat(C[i]):"btn btn-".concat(C[i]),O=E?" ".concat(O):O;var I=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:O},id:y,contentEditable:!!y&&P}),R=Ce({role:"button",href:c,style:Ce(Ce({whiteSpace:x?"normal":"nowrap",boxSizing:"border-box",borderRadius:d?"31px":0},u),{},{borderColor:"White"!==i?"unset":void 0,padding:x?"":null==u?void 0:u.padding,border:"white"===T?"unset":"initial"}),onBlur:j,onClick:function(e){y&&!P||!y?f&&f(e):P&&e.preventDefault()},className:l()(s,"ma-0 pointer",{dib:!x},L),children:o.a.createElement(o.a.Fragment,null,I,"Arrow"===g?o.a.createElement(ge,{angle:0,size:16,color:(null==u?void 0:u.color)||i,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},S),N="".concat(y,"_CTA_WRAPPER");if(c||P&&y||x){var k="_self";return c&&b&&!parent.location.href.includes("wall-builder")&&(k="_top"),o.a.createElement("a",_e({id:N},R,{target:k}))}return o.a.createElement("button",_e({id:N},R))};function Le(){return(Le=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)){Ke.push(e);var t=document.createElement("script");t.src=e,t.async=!0;var n=function(){a({loaded:!0,error:!1})},r=function(){var n=Ke.indexOf(e);n>=0&&Ke.splice(n,1),t.remove(),a({loaded:!0,error:!0})};return t.addEventListener("load",n),t.addEventListener("error",r),document.body.appendChild(t),function(){t.removeEventListener("load",n),t.removeEventListener("error",r)}}a({loaded:!0,error:!1})},[e]),n.loaded,n.error),o.a.createElement("div",{id:"recaptcha_wall",className:"grecaptcha"})});function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wt(e){var t=e.id,n=e.label,a=e.style,i=e.value,c=e.onChange,s=e.className,u=e.validators,f=e.inputStyle,d=e.fieldButton,p=e.errorMessage,b=Ot(e,pt),m=gt(Object(r.useState)(!1),2),y=m[0],h=m[1],g=gt(Object(r.useState)([]),2),v=g[0],O=g[1],w=Object(r.useRef)(null),E=function(){return(!!v.length||p)&&o.a.createElement("span",{className:"red absolute",style:{top:"-20px"}},v[0]||p)||null};return o.a.createElement("div",{className:"relative flex",style:yt({},a)},o.a.createElement(E,null),o.a.createElement("input",bt({style:yt({transition:"padding 200ms linear 200ms",borderTopRightRadius:0,borderBottomRightRadius:0,border:p||null!=v&&v.length?"solid 1px #d8070e":""},f),className:l()(s,"pl-sm","pr-sm","font--subhead","font-xxs","h-md","light","brad-2","b","form-input-valid","bg-white","gray-darkest","flex-grow-1","ma-0","border-box",{"pt-sm":y||i}),value:i,onChange:function(e){var t;c&&c(e),null==w||null===(t=w.current)||void 0===t||t.setCustomValidity("")},onFocus:function(){return h(!0)},onBlur:function(){h(!1),Array.isArray(u)&&O(u.map(function(e){var t,n=e(i);return null==w||null===(t=w.current)||void 0===t||t.setCustomValidity(n||""),n}).filter(function(e){return e}))},id:t,ref:w},b)),o.a.createElement("label",{htmlFor:t,className:"absolute",style:{transition:"all 200ms ease-in-out 0s",transform:i||y?"scale(0.7) translate3D(25px, -130%, 0)":"translate3D(16px, -50%, 0)",transformOrigin:"top left",top:"50%",color:"#5a5a5a"}},n),d)}var Et=function(e){if(!(null!=e&&e.trim()&&/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)||!e))return"Invalid email address"};function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=qt(Object(r.useState)(!1),2),i=a[0],l=a[1];var c=!1;function s(r,o){console.info("Opt - NAME/VALUE: ".concat(o,"/").concat(r," - ended? ").concat(c));var a=window.dataLayer&&window.dataLayer.filter(function(e){return e["optimize.".concat(t,".").concat(o,".").concat(r,".complete")]})[0]||!1;if(!c&&e.includes(o)&&(a||"timeout"===r)){if(n(window["".concat(o).concat(r,"_").concat(t,"Cfg")]||{}),l(!0),"timeout"!==r){var i={optExpActive:"".concat(t,"|").concat(o,".").concat(r)};window&&window.dataLayer&&window.dataLayer.push(i)}c=!0,console.info("Opt - NAME/VALUE: ".concat(o,"/").concat(r," complete"))}}var u=Object(r.useCallback)(function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"optimize.wall"})},[t]);return Object(r.useEffect)(function(){if(e.length>0){!function(){window.dataLayer&&window.dataLayer.push(arguments)}("event","optimize.callback",{callback:s});var t=2e3,n=o&&parent&&!parent.location.href.includes("wall-builder");e.forEach(function(e){var r,o=void 0!==(null===(r=window.google_optimize)||void 0===r?void 0:r.get(e));t=o||n?t:0}),u(),setTimeout(function(){e.forEach(function(e){s("timeout",e)})},t)}else l(!0)},[e]),{isOptimize:e.length>0,isExperimentComplete:i}};function Yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&(c(!1),u())};return Object(r.useEffect)(function(){var e;return t&&s?(a.postMessage("CloseRegwall","*"),c(!1)):s&&!n?(c(!0),window.addEventListener("message",f,!1),!(e=a.document.getElementById("slug_fixedBottom"))||e&&e.offsetHeight<=0?(c(!1),u()):e&&e.offsetHeight>0&&setTimeout(function(){e=a.document.getElementById("slug_fixedBottom");var t=a.googletag||{};Array.isArray(t.cmd)&&0===t.cmd.length&&(!e||e.childElementCount<=0)&&(c(!1),u())},2e3)):c(!1),function(){u()}},[t]),l};function $t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2],o=$t(Object(r.useState)(!1),2),a=o[0],i=o[1],l=$t(Object(r.useState)(!1),2),c=l[0],s=l[1],u=$t(Object(r.useState)([]),2),f=u[0],d=u[1],p=$t(Object(r.useState)(null),2),b=p[0],m=p[1],y=n&&parent&&!parent.location.href.includes("wall-builder"),h=y?parent:window,g=function e(t){var n;if(t.lineItemId)m(t.lineItemId),n=t.lineItemId;else{var r=t.slot;if(r&&r.getResponseInformation){var o=(r.getResponseInformation()||{}).sourceAgnosticLineItemId;m(o),n=o}}n&&(h.googletag.pubads().removeEventListener("slotRenderEnded",e),h.googletag.pubads().removeEventListener("impressionViewable",e))};return Object(r.useEffect)(function(){var n=re(),r=(t||"").indexOf(n)>-1;if(!/wall-builder/.test(h.location.href)&&r&&e&&"undefined"!=typeof window){var o=h.wpMetaData||{},a=h.googletag||{};Array.isArray(a.cmd)&&0===a.cmd.length?s(!0):(o.adTrackerId||(h.googletag=h.googletag||{cmd:[]},h.googletag.cmd.push(function(){h.googletag.pubads().addEventListener("slotRenderEnded",g)}),h.googletag.cmd.push(function(){h.googletag.pubads().addEventListener("impressionViewable",g)})),fetch("https://sponsorship-lines.zeustechnology.com/washingtonpost/washingtonpost/lineItems.json").then(function(e){return e.json()}).then(function(e){if(!e||!Array.isArray(e)||e&&0===e.length)s(!0);else if(h=y?parent:window,(o=h.wpMetaData||{}).adTrackerId||b){var t=o.adTrackerId||b,n=Zt.indexOf(t)<0&&e.indexOf(t)>-1;i(n),s(!0)}else d(e)}).catch(function(e){console.error(e,"Failed to retrieve ids from the sponsorship tracker."),s(!0)}))}else s(!0)},[]),Object(r.useEffect)(function(){if(!c&&b&&f.length>0){var e=Zt.indexOf(b||0)<0&&f.indexOf(b)>-1;i(e),s(!0)}},[b,f,c]),{hideWallDueToAds:a,isSponsorAdChecked:c}};function en(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"both",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:70,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=en(Object(r.useState)({scrollUp:!1,scrollDown:!1}),2),s=c[0],u=c[1],f=l&&parent&&!parent.location.href.includes("wall-builder")?parent:window,d=function(){t&&f.cancelAnimationFrame(t),t=f.requestAnimationFrame(function(){var t=f.pageYOffset||f.document.documentElement.scrollTop,r=t>e+a;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var o,a=ce(null===(o=e)||void 0===o?void 0:o.REGION_LIST);e=cn(cn({},e),e[a])}return e}(u,n.currentRegion),parent.location.href.includes("wall-builder")||(n.wallConfig=u),Object.keys(c).length&&(n.wallConfig=dn(dn({},u),c),u=n.wallConfig);var f=Vt(null===(t=u)||void 0===t?void 0:t.EXPERIMENT_ID,"softwall",s,i),d=f.isOptimize,p=f.isExperimentComplete,b=u,m=b.MIN_ON_LOAD,y=b.NEWSLETTER_NAME,h=b.nl_start_method,g=b.nl_start_location,v=b.nl_start_initiative,O=b.PAYWALL_TEMPLATE_ID,w=b.BACKGROUND_COLOR,E=b.SCREEN_STATE,S=b.LISTEN_FOR_ADS,_=b.LISTEN_FOR_ADS_PLATFORMS,j=Qt(S,_,i),C=j.hideWallDueToAds,P=j.isSponsorAdChecked,A=Object(r.useMemo)(function(){return ae(u,C)},[P]),T=A.isExcluded,L=A.shouldCloseWall,x=Jt({shouldCloseWall:L,isExcluded:T,sendMessages:i}),I=bn(Object(r.useState)(!1),2),N=I[0],k=I[1],D=bn(Object(r.useState)("Success"===E),2),M=D[0],U=D[1],F=bn(Object(r.useState)("Success"===E?"test@wapo.com":null),2),B=F[0],W=F[1],H=bn(Object(r.useState)(!m&&"Collapsed"!==E||"Expanded"===E),2),q=H[0],G=H[1],V=bn(Object(r.useState)(0),2),Y=V[0],J=V[1],$={label:(null==y?void 0:y.replace(/ /g,"_").replace(/'/g,"'").toLowerCase())||"softwall",promoCode:"softwall",emailEnrollMethod:h||"REGWALL_SOFT",emailEnrollLocation:g||"URL",emailEnrollInitiative:v||z(),arcId:null==a?void 0:a._id},K=X(n,$),Z=K.addEventWithArticleData,Q=K.addMarketingEvent;Object(r.useEffect)(function(){P&&!L&&Q("softwall")},[P]),Object(r.useEffect)(function(){i&&parent&&!parent.location.href.includes("wall-builder")&&(L||C)&&parent.postMessage(JSON.stringify({wall:!0,wallType:"softwall",wallAction:"close"}),"*")},[L]),Object(r.useEffect)(function(){P&&!L&&Z({event:"acquisition-softwall",category:"acquisition",action:"acquisition-softwall"})},[w,P]),Object(r.useEffect)(function(){i&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({background:"transparent",bottom:"0px",scrollAllowed:!0,wallAction:"open",wallType:"softwall"}),"*")},[]),Object(r.useLayoutEffect)(function(){if(i&&parent){var e="Default";M&&B?e="Success":m&&q?e="Expanded":m||q||(e="Collapsed"),parent.location.href.includes("wall-builder")&&parent.postMessage({newScreenState:e},"*")}},[q]),Object(r.useEffect)(function(){G(!m&&"Collapsed"!==E||"Expanded"===E),J(Y+1),"Success"===E?(B||W("test@wapo.com"),U(!0)):(W(null),U(!1))},[m,E]);var ee=an(u,!0,x,i),te=ee.collapseOnScroll,ne=ee.expandOnScroll,re=ee.activateAutoCollapse;Object(r.useEffect)(function(){P&&(!q&&ne&&!L||q&&te&&!L)&&oe()},[ne,te,P]);var oe=function(){G(!q),k(!0),J(Y+1);var e=re?"auto-minimize":"minimize";re?e="collapse-auto":te&&(e="collapse-scroll");var t=ne?"expand-scroll":"expand";Z({event:"acquisition-softwall-".concat(q?e:t),category:"acquisition",action:"acquisition-softwall-".concat(q?e:t)})},ie={wallConfig:u,GAEventData:$,handleExpand:oe,handleViewChange:function(){J(Y+1)},isExpanded:q,registrationSuccess:M,sendMessages:i};return!P||!/\/wall-builder\//.test(location.href)&&(L||!n.isShowing&&"test"!==le.NODE_ENV||x)?null:o.a.createElement(se,e,o.a.createElement(R,{id:O,backgroundColor:w||"White",triggerResize:Y,sendMessages:i,style:d&&!p?{height:0}:{},templateId:u.TEMPLATE_ID},o.a.createElement(Ht,un({},ie,{registeredEmail:B})),o.a.createElement(Ft,un({},ie,{setRegistrationSuccess:U,setRegisteredEmail:W,setResizeCounter:J,sendMessages:i})),o.a.createElement(Xe,un({},ie,{hasExpanded:N}))))});yn.displayName="SoftwallNL";t.default=yn}])); //# sourceURL=browsertools://www.washingtonpost.com/subscribe/remote-component1648838026392.js