!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)||m(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 b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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=f},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),d={consentCountry:"",tos:""},f=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"}},m=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}},b=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},h=function(){return!!a.getCookie("wapo_actmgmt")},y=function(e){var t;if(m()&&(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=b("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=b("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&&!f()&&function(e){if(m()){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 f()||y(e),n})},O=function(){var e,t=(m()&&(e=h()?JSON.parse(localStorage.getItem("wapo_identity")):{}),e?e.privacySetting||d:{});return 0===Object.keys(t).length&&h()&&f()?v().then(function(e){var t;return(null==e||null===(t=e.userState)||void 0===t?void 0:t.privacySetting)||d}):Promise.resolve(t)},E=function(e){return Object.keys(e).reduce(function(t,n){return t[n.toLowerCase()]=e[n],t},{})},w=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,d="db gray-dark relative flex pt-xxs pb-xxs items-start ".concat(r),f=i?"16px":"18px",p=l?"not-allowed":"";return u.default.createElement("label",{htmlFor:o,className:d,"data-sc-v":"4.39.0","data-sc-c":"toscheckbox"},u.default.createElement("span",{className:"relative mr-xs",style:{height:f,width:f},"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:f,width:f},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:f,width:f},"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"},"*"))},T={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,d=e.userConfigReady,f=o.useState(!1),p=r._slicedToArray(f,2),m=p[0],h=p[1],y=o.useState({isChecked:!1}),g=r._slicedToArray(y,2),v=g[0],O=g[1],S=o.useState({isChecked:!1}),_=r._slicedToArray(S,2),C=_[0],I=_[1],A=(t=a.getCookie("wp_geo")||"")&&t.split("|")[0]?t.split("|")[0].toLowerCase():null,j=function(e){var t=null==e?void 0:e.tosConfig,o=null==e?void 0:e.tosMapObj;t||(t=T.tosConfig,o=T.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,d=e.s3MapObj,f=t._||{},p=r._objectSpread2(r._objectSpread2({},null==f?void 0:f.tos._),null==f?void 0:f.tos[s]),m=r._objectSpread2(r._objectSpread2({},null==f?void 0:f.marketingConsent._),null==f?void 0:f.marketingConsent[s]),b={},h={},y=Object.keys(t).find(function(e){return e.toLowerCase().indexOf(n)>-1});if(y){var g,v,O,S,_=E(a),T=r._objectSpread2(r._objectSpread2({},_._),_[y]),C=E(l),I=r._objectSpread2(r._objectSpread2({},C._),C[y]);b=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(g=t[y])||void 0===g?void 0:g.tos._),null===(v=t[y])||void 0===v?void 0:v.tos[s]),T),h=r._objectSpread2(r._objectSpread2(r._objectSpread2({},null===(O=t[y])||void 0===O?void 0:O.marketingConsent._),null===(S=t[y])||void 0===S?void 0:S.marketingConsent[s]),I)}var A=!u&&(!c||b.prechecked);return b=r._objectSpread2(r._objectSpread2(r._objectSpread2({},p),b),{},{isChecked:!!A}),h=r._objectSpread2(r._objectSpread2(r._objectSpread2({},m),h),{},{isChecked:!!h.prechecked}),d&&(b.text=w(b.text,d),h.text=w(h.text,d)),{tos:b,mc:h}}({s3Config:t,country:A,propTosConfig:n,propMcConfig:i,isToSNeeded:l,type:c,overrideTosHidden:u,s3MapObj:o}),s=a.tos,d=a.mc;O(s),I(d),h(!0)};return o.useEffect(function(){var e;d&&(s||n||i?(e=b("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){j(e)}).catch(function(e){console.error(e),j(T)}):h(!0))},[d,s,l]),{tosConfig:v,mcConfig:C,ready:m,country:A,updateConfigValue:function(e,t){"tos"===e?O(t):"mc"===e&&I(t)}}},I=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,d=void 0===s?"":s,p=e.checkboxLabelClass,m=void 0===p?"":p,E=e.tosConfig,w=e.mcConfig,T=e.onChange,I=void 0===T?function(){console.error("onChange function missing"),g("logFailure",{message:"onChange function missing"})}:T,A=e.tosConfigReady,j=void 0===A?function(){}:A,R=e.overrideTosHidden,P=void 0!==R&&R,L=e.labelSizeSm,N=void 0===L||L,x=e.disabled,k=void 0!==x&&x,D=o.useState({}),M=r._slicedToArray(D,2),U=M[0],G=M[1];o.useEffect(function(){var e,t,n;(e=P,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){G(e)})},[P]);var B=U.tos,H=void 0===B?{}:B,z=U.marketingConsent,F=void 0===z?{}:z,W=U.isConfigNeeded,q=U.isToSNeeded,X=U.isMcNeeded,Y=U.userConfigReady,V=C({propTosConfig:E,propMcConfig:w,isToSNeeded:q,type:l,isConfigNeeded:W,overrideTosHidden:P,userConfigReady:Y}),J=V.tosConfig,$=V.mcConfig,K=V.ready,Q=V.country,Z=V.updateConfigValue;o.useEffect(function(){K&&((J.required||$.required)&&W||I(!0),j())},[K]),o.useEffect(function(){J.required&&$.required?I(J.isChecked&&$.isChecked):J.required?I(J.isChecked):$.required&&I($.isChecked)},[J.isChecked,$.isChecked]);o.useEffect(function(){n&&function(){var e=H.consent,t=H.consentCountry,n=F.consent,r=F.consentCountry,o=$.isChecked?0:1,a=$.implicit?-1:o,l=Q,s=J.isChecked||!q||J.implicit?"Y":"N";10==n?(a=a<0?1:a,l=Q):(void 0!==n&&!X||n>-1&&a<0||n==a)&&(a=n,l=r),function(e,t){t&&(e.email=t);var n=b("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&&h()){var n=JSON.parse(localStorage.getItem("wapo_identity"));n&&n.signedIn?f()||y(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||q||P?Q:t},marketingConsent:{consent:"".concat(a),consentCountry:l}}},c)}()},[n]);var ee=N?"font-xxxxs":"font-xxxs",te=u.default.createElement(_,{htmlText:J.text,isRequired:J.required,id:"tosCheckbox",checkboxLabelClass:J.implicit?"".concat(ee," ").concat(m," pt-xxs pb-xxs gray-dark"):ee}),ne=u.default.createElement(_,{htmlText:$.text,isRequired:$.required,id:"mcCheckbox",checkboxLabelClass:$.implicit?"gray-dark ".concat(ee," ").concat(m):ee}),re=q||P;return u.default.createElement("div",{className:"db mt-xs mb-xs ".concat(d),"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 Z("tos",r._objectSpread2(r._objectSpread2({},J),{},{isChecked:!J.isChecked}))},isChecked:J.isChecked,checkboxLabelClass:m,isRequired:J.required,id:"tosCheckbox",labelSizeSm:N,disabled:k},te),re&&J.text&&J.implicit&&te,X&&$.text&&!$.implicit&&u.default.createElement(S,{htmlText:$.text,onChange:function(){return Z("mc",r._objectSpread2(r._objectSpread2({},$),{},{isChecked:!$.isChecked}))},isChecked:$.isChecked,checkboxLabelClass:m,isRequired:$.required,id:"mcCheckbox",labelSizeSm:N,disabled:k},ne),X&&$.text&&$.implicit&&ne)};I.defaultProps={labelSizeSm:!0},t.TermsOfService=I},function(e,t){e.exports=require("react-dom")},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);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);nRead every story for free through April 18.
",REGISTRATION_SUCCESS_SUPPORTING_TEXT_RIGHT:"for a link to set a password.",PAYWALL_TEMPLATE_ID:"regwall-850841b2688",EXISTING_ACCOUNT_SUPPORTING_TEXT_LEFT:"Check your email at",PROMO_LABEL_HAS_LOGO:!1,GTM_LOADER:"gtm",PROMO_LABEL_PRIMARY_COLOR:"Offblack",CTA_BUTTON_COLOR:"Black",PROMO_LABEL_SECONDARY:"ENDS APRIL 18",PROMO_LABEL_SECONDARY_COLOR:"Offblack",REGISTRATION_SUCCESS_HEADER:"You're all set to start reading",MAX_SNOOZE:0,TRIAL_TYPE:"time",SPONSOR_TEXT:"Sponsored by",SIGN_IN:'Sign in',DEPLOYMENT_TOKEN:1649434563333,PROMO_ID:"65932",start_method:"REGWALL",EXISTING_ACCOUNT_HEADER:"It looks like you already have an account",LOGO_URL:"",REGISTRATION_SUCCESS_SUPPORTING_TEXT_LEFT:"Check your email at",DEFAULT_FONT_COLOR:"offblack",BACKGROUND_COLOR:"Pale green",WALL_CONFIG_ID:"841b2688-65fa-4aff-a0bb-7147086eca7e",HAS_EXISTING_EMAIL:!0,SUPPORTING_TEXT_COLOR:"Offblack",DEFAULT_LINK_COLOR:"gray-dark",HAS_SECONDARY_CTA:!1,NL_SKIP_WELCOME_EMAIL:!0,HAS_SPONSOR_LABEL:!1,REGWALL_PRIMARY_CTA_PROMO_CODE:"",ENTERPRISE_CLIENT_ID:"",SCREEN_STATE:"Default",HEADER:'
Just for you...
An exclusive free trial. 
No credit card required.
',REGISTRATION_SUCCESS_CTA_BUTTON_COLOR:"Blue",PRIMARY_CTA_BUTTON_COLOR:"Blue",REGWALL_SECONDARY_CTA_PROMO_CODE:"",NEWSLETTER_ID:"",SECONDARY_CTA_TEXT:'Or, subscribe and get one month for $1',TEMPLATE_ID:"regwall",HAS_OR:!0,start_location:"ONSITE_REGWALL_SOFT",PROMO_LABEL_PRIMARY:"FREE ACCESS",ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",NOTE:"",IFRAME_ONBOARDING:!0,CTA_BUTTON_TEXT:'Sign up',INCLUDE_LOGGING:!0,PRICING_STRATEGY:"Monthly",HEADER_COLOR:"Offblack",SECONDARY_CTA_SUBSCRIPTION_PRICING:"",REGWALL_TID:"wa_hardregwall_t",FREE_TRIAL_SUBS_TYPE:"All-Access Digital subscription",HAS_CONFIRMATION_EMAIL:!0,NEWSLETTER_NAME:"Select One",PAGE_RELOAD_AFTER_SIGN_UP:!0,HAS_SUCCESS_CTA:!0,SIGN_IN_DESCRIPTION:"Already have an account?",SUBSCRIPTION_EXPERIENCE:"TAX_SEASON_OPEN_DAYS",SUBSCRIPTION_PRICING:"opendays_taxdays_hrw_14d_t_2022_trial",HAS_EXISTING_CTA:!0,REGISTRATION_SUCCESS_CTA_BUTTON_TEXT:"Got it",EXCLUDING_PLATFORMS:"mobile",LISTEN_FOR_ADS_PLATFORMS:"tablet,desktop",LISTEN_FOR_ADS:!1},VERSION:"3.2.6"};function D(e){if("undefined"!=typeof window)for(var t=document.cookie.split(/[\;\=]/),n=0;n0&&(c=M(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(x,null),o.a.createElement("span",{id:"wall-templates-version","data-qa":"region-".concat(c),style:{display:"none"}},k.VERSION))}function G(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 B(e){for(var t=1;t$/,"").trim())))))}}},re=["children","color","href","className","style","onClick","rounded","sendMessages","contentId","buttonStyle","innerHTML","isLoading"];function oe(){return(oe=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 se=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,d=e.onClick,f=e.rounded,p=e.sendMessages,m=void 0!==p&&p,b=e.contentId,h=void 0===b?"":b,y=e.buttonStyle,g=void 0===y?"Button":y,v=e.innerHTML,O=void 0===v?"Subscribe":v,E=e.isLoading,w=void 0!==E&&E,S=ce(e,re),_=ne(h),T=_.onChange,I=_.isContentEditable,A=Object(r.useContext)(a).wallConfig,j=null==A?void 0:A.DEFAULT_FONT_COLOR,R="",P="Link"===g||"Arrow"===g;R=P||"White"!==i&&"Black"!==i&&"WaPo blue"!==i?P?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=w?" ".concat(O):O;var L=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:O},id:h,contentEditable:!!h&&I}),N=ie({role:"button",href:c,style:ie(ie({whiteSpace:P?"normal":"nowrap",boxSizing:"border-box",borderRadius:f?"31px":0},u),{},{borderColor:"White"!==i?"unset":void 0,padding:P?"":null==u?void 0:u.padding,border:"white"===j?"unset":"initial"}),onBlur:T,onClick:function(e){h&&!I||!h?d&&d(e):I&&e.preventDefault()},className:l()(s,"ma-0 pointer",{dib:!P},R),children:o.a.createElement(o.a.Fragment,null,L,"Arrow"===g?o.a.createElement(Q,{angle:0,size:16,color:(null==u?void 0:u.color)||i,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},S),x="".concat(h,"_CTA_WRAPPER");if(c||I&&h||P){var k="_self";return c&&m&&!parent.location.href.includes("wall-builder")&&(k="_top"),o.a.createElement("a",oe({id:x},N,{target:k}))}return o.a.createElement("button",oe({id:x},N))};function ue(){return(ue=Object.assign||function(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);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 _e(e){var t=e.id,n=e.label,a=e.style,i=e.value,c=e.onChange,s=e.className,u=e.validators,d=e.inputStyle,f=e.fieldButton,p=e.errorMessage,m=Se(e,he),b=Ee(Object(r.useState)(!1),2),h=b[0],y=b[1],g=Ee(Object(r.useState)([]),2),v=g[0],O=g[1],E=Object(r.useRef)(null),w=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:ve({},a)},o.a.createElement(w,null),o.a.createElement("input",ye({style:ve({transition:"padding 200ms linear 200ms",borderTopRightRadius:0,borderBottomRightRadius:0,border:p||null!=v&&v.length?"solid 1px #d8070e":""},d),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":h||i}),value:i,onChange:function(e){var t;c&&c(e),null==E||null===(t=E.current)||void 0===t||t.setCustomValidity("")},onFocus:function(){return y(!0)},onBlur:function(){y(!1),Array.isArray(u)&&O(u.map(function(e){var t,n=e(i);return null==E||null===(t=E.current)||void 0===t||t.setCustomValidity(n||""),n}).filter(function(e){return e}))},id:t,ref:E},m)),o.a.createElement("label",{htmlFor:t,className:"absolute",style:{transition:"all 200ms ease-in-out 0s",transform:i||h?"scale(0.7) translate3D(25px, -130%, 0)":"translate3D(16px, -50%, 0)",transformOrigin:"top left",top:"50%",color:"#5a5a5a"}},n),f)}var Te=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"},Ce=function(){var e,t=(null===(e=window)||void 0===e?void 0:e.location.href)||"",n="prod";return/(sandbox\.|\.preview\.now\.washingtonpost\.com|local(host)?\.washingtonpost\.com)/.test(t)?n="sandbox":/localhost/.test(t)&&(n="dev"),n};function Ie(){return{prod:"https://www.washingtonpost.com/subscribe",sandbox:"https://subs-stage.washingtonpost.com",dev:"https://subscribe.digitalink.com"}[Ce()]}var Ae=function(){var e=je(),t=document.createElement("a");return t.href=e,t.pathname||""};function je(){var e,t;return(null===(e=window)||void 0===e?void 0:null===(t=e.wpMetaData)||void 0===t?void 0:t.canonical_url)||"".concat(location.protocol,"//").concat(location.host).concat(location.pathname)}function Re(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 Pe(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);n=0)){Xe.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=Xe.indexOf(e);n>=0&&Xe.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 Ve(){return(Ve=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&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=ct(),i=lt(o);if(t){var l=Date.now()+60*n*60*1e3;a[i]=l,st(a)}else if(e){var c=Date.now()+60*r*60*1e3;a[e]=c,st(a)}}("",!0,s.CLOSE_BUTTON_EXPIRATION_HOUR,void 0,s.TEMPLATE_ID),s.MAX_SNOOZE&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=ct(),n=(t[e]||0)+1;t[e]=n,st(t)}(s.PAYWALL_TEMPLATE_ID||"")),!i&&c&&c(!1)}},o.a.createElement("div",null,o.a.createElement(dt,{size:16,color:s&&"white"===s.DEFAULT_FONT_COLOR&&!i?"#FFFFFF":"#aaa"})))};function pt(){return(pt=Object.assign||function(e){for(var t=1;t for a link to sign in securely, without a password."),className:f}),t.HAS_EXISTING_EMAIL?o.a.createElement("b",null," ",n," "):null,t.HAS_EXISTING_EMAIL?o.a.createElement(de,{contentId:"EXISTING_ACCOUNT_SUPPORTING_TEXT_RIGHT",innerHTML:null==t?void 0:t.EXISTING_ACCOUNT_SUPPORTING_TEXT_RIGHT,className:f}):null),t.HAS_OR?o.a.createElement("div",{style:{color:"white"===f?"#FFFFFF":"#666"}},o.a.createElement(bt,{display:"inline-block",color:"#d5d5d5",width:"120px",margin:"0px 10px 4px 0px"}),"or",o.a.createElement(bt,{display:"inline-block",color:"#d5d5d5",width:"120px",margin:"0px 0px 4px 10px"})):null,t.HAS_EXISTING_CTA?o.a.createElement(se,{type:"submit",color:null==t?void 0:t.CTA_BUTTON_COLOR,className:"btn db din-ns mt-sm mb-sm",rounded:!0,sendMessages:u,style:{padding:"7px 32px"},innerHTML:"Sign in",contentId:"CTA_BUTTON_COLOR",href:xe(t)}):null,o.a.createElement(se,{buttonStyle:"Link",className:l()("underline",f,"db","font-light"),style:{fontSize:"14px"},innerHTML:"Back",onClick:function(){c("Default"),s(6)},sendMessages:u})))};function gt(){return(gt=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.includes("100")||e.includes("110")||e.includes("120")?"wall_retargeting":"wall_standard"}function It(){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 At(e,t){var n,r,o,a,i,l;return{label:"o1",browserUserAgentHit:navigator.userAgent,promoCode:"o1",acqEntranceType:Ct(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.actionCodes),geoMarket:(a=Et().DMA===Ot,i=Et().country_code,l=wt(),a&&"US"===i?"L":i&&"US"!==i&&"CA"!==i&&!l?"I":l?"E":"CA"===i?"C":"N"),acqTemplate:"",acqEntrancePage:Ae(),arcId:t||"",contentTags:It(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 jt={AU:"AUD",CA:"CAD",EEA:"EUR",GB:"GBP",IN:"INR",INTL:"USD",US:"USD"};function Rt(){return(Rt=Object.assign||function(e){for(var t=1;t to continue reading."),className:u})),o.a.createElement(se,{type:"submit",color:null==t?void 0:t.CTA_BUTTON_COLOR,className:"btn db din-ns mt-sm mb-sm",rounded:!0,style:{padding:"7px 32px"},innerHTML:"Sign in",id:"regwall-subscriber-account-cta",href:xe(t),sendMessages:c})))};function Lt(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 Nt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"")},Dt=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};function Mt(){var e=D("wp_devicetype");return Dt(e)?"tablet":kt(e)?"mobile":"desktop"}var Ut=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes(Mt())};function Gt(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 Bt(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 Bt(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 Bt(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=Gt(Object(r.useState)(!1),2),a=o[0],i=o[1],l=Gt(Object(r.useState)(!1),2),c=l[0],s=l[1],u=Gt(Object(r.useState)([]),2),d=u[0],f=u[1],p=Gt(Object(r.useState)(null),2),m=p[0],b=p[1],h=n&&parent&&!parent.location.href.includes("wall-builder"),y=h?parent:window,g=function e(t){var n;if(t.lineItemId)b(t.lineItemId),n=t.lineItemId;else{var r=t.slot;if(r&&r.getResponseInformation){var o=(r.getResponseInformation()||{}).sourceAgnosticLineItemId;b(o),n=o}}n&&(y.googletag.pubads().removeEventListener("slotRenderEnded",e),y.googletag.pubads().removeEventListener("impressionViewable",e))};return Object(r.useEffect)(function(){var n=Mt(),r=(t||"").indexOf(n)>-1;if(!/wall-builder/.test(y.location.href)&&r&&e&&"undefined"!=typeof window){var o=y.wpMetaData||{},a=y.googletag||{};Array.isArray(a.cmd)&&0===a.cmd.length?s(!0):(o.adTrackerId||(y.googletag=y.googletag||{cmd:[]},y.googletag.cmd.push(function(){y.googletag.pubads().addEventListener("slotRenderEnded",g)}),y.googletag.cmd.push(function(){y.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(y=h?parent:window,(o=y.wpMetaData||{}).adTrackerId||m){var t=o.adTrackerId||m,n=Ht.indexOf(t)<0&&e.indexOf(t)>-1;i(n),s(!0)}else f(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&&m&&d.length>0){var e=Ht.indexOf(m||0)<0&&d.indexOf(m)>-1;i(e),s(!0)}},[m,d,c]),{hideWallDueToAds:a,isSponsorAdChecked:c}};function Ft(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 Wt(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 Wt(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 Wt(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",d,!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 Xt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Ut(e.EXCLUDING_PLATFORMS),r=!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"softwall",n=ct(),r=lt(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=ct()[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 Yt=function(){return(Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;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);n0){var o,a=M(null===(o=e)||void 0===o?void 0:o.REGION_LIST);e=Nt(Nt({},e),e[a])}return e}(u,l.currentRegion),parent.location.href.includes("wall-builder")||(l.wallConfig=u);var d,f,p,m=u,b=m.SUBSCRIPTION_PRICING,h=m.SUBSCRIPTION_LOCATION,y=m.SUBSCRIPTION_EXPERIENCE,g=m.PRIMARY_CTA_PROMO_CODE,v=m.SECONDARY_CTA_PROMO_CODE,O=m.SECONDARY_CTA_SUBSCRIPTION_PRICING,E=m.start_location,w=m.start_method,S=m.ENTERPRISE_CLIENT_ID,_=m.TRIAL_TYPE,T=m.MODAL_DISPLAY,C=m.BACKGROUND_COLOR,I=m.LISTEN_FOR_ADS,A=m.LISTEN_FOR_ADS_PLATFORMS,j=zt(!T&&I,A,s),R=j.hideWallDueToAds,P=j.isSponsorAdChecked,L=Object(r.useMemo)(function(){return Xt(u,R)},[P]),x=L.isExcluded,G=L.shouldCloseWall,B=qt({shouldCloseWall:G,isExcluded:x,sendMessages:s}),H=G&&!T,z={label:E,promoCode:g,emailEnrollMethod:w,emailEnrollLocation:E,emailEnrollInitiative:Ae(),arcId:null==c?void 0:c._id,offerCurrencyCode:(d=D("wp_geo").split("|"),f=d[0],p=d[d.length-1],("EEA"===p&&"GB"!==f||"INTL"===p)&&(f=p),jt[f]?jt[f]:"USD"),account_method:w||"",account_location:E||"",account_experience:y||""};(_||S)&&(z=an(an({},z),{subscription_pricing:b,subscription_location:h,subscription_experience:y}));var F=(V=l,J=z,$=V.pwapiResponse,K=V.arcId,Q=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)},{GAData:_t(_t({},At($,K)),J),addEvent:Q,addEventWithArticleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Q(_t(_t(_t({userAgentHit:window.navigator.userAgent,userAgentSession:window.navigator.userAgent},At($,K)),J),e))},addMarketingEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"paywall";Q({event:"acq_marketing_".concat(e),category:"acquisition",action:"acq_marketing"})},addGAParamsToURL:function(e,t){var n=_t(_t(_t({},At($,K)),J),t),r=encodeURIComponent(je()),o={promo:n.promoCode,arcId:n.arcId,acqEntType:n.acqEntranceType,destination:r,next_url:r,p:n.subscription_pricing,s_l:n.subscription_location,e:n.subscription_experience},a=new URL(e);return Object.keys(o).forEach(function(e){o[e]&&a.searchParams.append(e,o[e])}),a.toString()}}),W=F.addEventWithArticleData,q=F.addGAParamsToURL,X=F.addMarketingEvent,Y={subscription_pricing:b,subscription_location:h,subscription_experience:y,promoCode:g};var V,J,$,K,Q;(null!==(t=u)&&void 0!==t&&t.TRIAL_TYPE||null!==(n=u)&&void 0!==n&&n.ENTERPRISE_CLIENT_ID)&&(Y.promoCode=v||Y.promoCode,Y.subscription_pricing=O||Y.subscription_pricing);var Z=q({prod:"https://subscribe.washingtonpost.com/acquisition?",sandbox:"https://subs-stage.washingtonpost.com/acquisition?",dev:"https://subscribe.digitalink.com/acquisition?"}[Ce()],Y),ee=nn(Object(r.useState)(null===(a=u)||void 0===a?void 0:a.SCREEN_STATE),2),te=ee[0],ne=ee[1],re=nn(Object(r.useState)("newemail@gmail.com"),2),oe=re[0],ae=re[1],ie=nn(Object(r.useState)(0),2),le=ie[0],ce=ie[1],se=Object(r.useCallback)(function(){switch(te){case"Existing Account":return o.a.createElement(yt,{wallConfig:u,registeredEmail:oe,addEventWithArticleData:W,setView:ne,setResizeCounter:ce,sendMessages:s});case"Confirmation":return o.a.createElement(vt,{wallConfig:u,registeredEmail:oe,addEventWithArticleData:W,sendMessages:s});case"Subscriber":return o.a.createElement(Pt,{wallConfig:u,registeredEmail:oe,addEventWithArticleData:W,sendMessages:s});case"IframeOnboarding":return o.a.createElement(tn,{wallConfig:u,setView:ne,resizeCounter:le,setResizeCounter:ce});default:return o.a.createElement(mt,{wallConfig:u,setRegisteredEmail:ae,setView:ne,setResizeCounter:ce,acqURL:Z,arcId:null==c?void 0:c._id,addEventWithArticleData:W,sendMessages:s})}},[u,te,oe]);return Object(r.useEffect)(function(){P&&!H&&(W({event:"acquisition-regwall",category:"acquisition",action:"acquisition-regwall"}),setTimeout(function(){X("regwall")},0))},[P]),Object(r.useEffect)(function(){var e;ne(null===(e=u)||void 0===e?void 0:e.SCREEN_STATE),ce(le+1)},[null===(i=u)||void 0===i?void 0:i.SCREEN_STATE]),Object(r.useEffect)(function(){s&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({background:"transparent",bottom:"0px",element:"#wallIframe",scrollAllowed:!1===T,top:"unset",wall:!0,wallAction:"open",wallType:"regwall"}),"*")},[]),Object(r.useLayoutEffect)(function(){P&&!H&&s&&parent&&parent.location.href.includes("wall-builder")&&parent.postMessage({newScreenState:te},"*")},[te,P]),Object(r.useEffect)(function(){!s||!parent||parent.location.href.includes("wall-builder")||l.isShowing&&!H||parent.postMessage(JSON.stringify({wall:!0,wallType:"regwall",wallAction:"close"}),"*")},[l.isShowing,P]),!P||!l.isShowing&&"test"!==k.NODE_ENV||!T&&!/\/wall-builder\//.test(location.href)&&(G||B)?null:o.a.createElement(U,e,o.a.createElement(N,{isModal:!1!==T,id:u.PAYWALL_TEMPLATE_ID,backgroundColor:C&&"IframeOnboarding"!==te?C:"White",triggerResize:le,templateId:u.TEMPLATE_ID,sendMessages:s},se()))}}])); //# sourceURL=browsertools://www.washingtonpost.com/subscribe/remote-component1649434573493.js