!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=3)}([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;t0&&void 0!==arguments[0]?arguments[0]:[];return e.includes("100")||e.includes("110")||e.includes("120")?"wall_retargeting":"wall_standard"}function y(){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 w(e,t){var n,r,o;return{label:"o1",browserUserAgentHit:navigator.userAgent,promoCode:"o1",acqEntranceType:h(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.actionCodes),geoMarket:d(),acqTemplate:"",acqEntrancePage:b(),arcId:t||"",contentTags:y(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 E=n(2),_=n.n(E);function L(e){var t=e.children;return _.a.createPortal(t,document.body)}var I=o.a.createContext({}),P="wp_nl";function A(e){return{softwall:"sw","softwall-nl":"sw","softwall-subscribe":"sw",regwall:"rw","paywall-purchase":"pw","paywall-default":"pw"}[e]}function j(){return"undefined"!=typeof window?JSON.parse(localStorage.getItem(P)||"{}"):{}}function S(e){localStorage.setItem(P,JSON.stringify(e))}function T(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=j(),i=A(o);if(t){var l=Date.now()+60*n*60*1e3;a[i]=l,S(a)}else if(e){var c=Date.now()+60*r*60*1e3;a[e]=c,S(a)}}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=j(),n=(t[e]||0)+1;t[e]=n,S(t)}function R(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 x(e){for(var t=1;t$/,"").trim())))))}}};function W(){return(W=Object.assign||function(e){for(var t=1;te.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}var le=function(e){var t=e.children,n=e.color,a=void 0===n?"WaPo blue":n,l=e.href,c=e.className,s=e.style,u=e.onClick,f=e.rounded,d=e.sendMessages,p=void 0!==d&&d,b=e.contentId,O=void 0===b?"":b,m=e.buttonStyle,g=void 0===m?"Button":m,v=e.innerHTML,h=void 0===v?"Subscribe":v,y=e.isLoading,w=void 0!==y&&y,E=ie(e,te),_=G(O),L=_.onChange,P=_.isContentEditable,A=Object(r.useContext)(I).wallConfig,j=null==A?void 0:A.DEFAULT_FONT_COLOR,S="",T="Link"===g||"Arrow"===g||"Text"===g,C="Text"===g;S=T||"White"!==a&&"Black"!==a&&"WaPo blue"!==a?T?i()({"subs-theme":"White"!==a&&"WaPo blue"!==a&&"Black"!==a},"".concat([B[a]]," bold")):"btn subs-theme bg-".concat(B[a]):"btn btn-".concat(B[a]),h=w?" ".concat(h):h;var R=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:h},id:O,contentEditable:!!O&&P}),x=oe({role:"button",href:l,style:oe(oe({whiteSpace:T?"normal":"nowrap",boxSizing:"border-box",borderRadius:f?"31px":0},s),{},{borderColor:"White"!==a?"unset":void 0,padding:T?"":null==s?void 0:s.padding,border:"white"===j?"unset":"initial"}),onBlur:L,onClick:function(e){O&&!P||!O?u&&u(e):P&&e.preventDefault()},className:i()(c,"ma-0",{pointer:!C},{dib:!T},S),children:o.a.createElement(o.a.Fragment,null,R,"Arrow"===g?o.a.createElement(ee,{angle:0,size:16,color:(null==s?void 0:s.color)||a,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},E),N="".concat(O,"_CTA_WRAPPER");if(l||P&&O||T&&!C){var M="_self";return l&&p&&!parent.location.href.includes("wall-builder")&&(M="_top"),o.a.createElement("a",ne({id:N},x,{target:M}))}return C?o.a.createElement("div",ne({id:N},x)):o.a.createElement("button",ne({id:N},x))},ce=["children","innerHTML","contentId","sendMessages"];function se(){return(se=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 pe=function(e){var t=e.children,n=e.innerHTML,r=e.contentId,a=e.sendMessages,i=void 0!==a&&a,l=de(e,ce),c=G(r),s=c.onChange,u=c.isContentEditable,f=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"usw_paywall",t=arguments.length>1?arguments[1]:void 0,n=encodeURIComponent(O()),r=n||"https://washingtonpost.com",o=new URL("https://www.washingtonpost.com/subscribe/".concat("sandbox"===p()?"stage/":"","signin/"));return o.searchParams.append("next_url",r),o.searchParams.append("tid",e||""),t&&o.searchParams.append("case","fms"),o.toString()}function me(e){return function(e){if(Array.isArray(e))return ge(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 ge(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 ge(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 ge(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);nFREE trial.',TEMPLATE_ID:"paywall-default",AUTO_DISMISS_SECOND:"15",PROMO_LABEL_PRIMARY:"SPECIAL OFFER",ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",DESCRIPTION:"",NOTE:"",CTA_BUTTON_TEXT:"Start free trial",INCLUDE_LOGGING:!0,PRICING_STRATEGY:"Annual",TEXT_ALIGNMENT:"center",GB:{},CA:{},HEADER_COLOR:"Offblack",PAYWALL_V2_HEADER_COLOR:"Offblack",PAYWALL_V2_SECONDARY_SUPPORTING_TEXT:"Then just $22 for a full year. With the largest political reporting team in The Post’s history, count on us for the most comprehensive coverage.",PAYWALL_V2_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PAAZVREHQFDDXPW7GZG32TTGTM.png",PAYWALL_V2_CTA_BUTTON_COLOR:"Blue",IMAGE_LOCATION:"right",PAYWALL_V2_BACKGROUND_COLOR:"White",CLICK_TRIGGER:"",SIGN_IN_DESCRIPTION:"",PRIMARY_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/CI6TYRJZW5D2HIWUUTNZMVKSIQ.png",MOBILE_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/CI6TYRJZW5D2HIWUUTNZMVKSIQ.png",SUBSCRIPTION_EXPERIENCE:"EVERGREEN_202203_FREE",SUBSCRIPTION_PRICING:"s_v",PAYWALL_V2_HEADER:'Kick off election season with 2 weeks FREE',PAYWALL_V2_SIGN_IN:"Sign in",INTL:{}},VERSION:"3.3.0"};function Fe(e){var t=l("wp_geo").split("|"),n=t[0],r=t[t.length-1];return e.includes(n)||(n=r),n}function qe(e){var t,n,r,a=e.wallState,i=e.children,l="default";!parent.location.href.includes("wall-builder")&&(null==a?void 0:null===(t=a.wallConfig)||void 0===t?void 0:null===(n=t.REGION_LIST)||void 0===n?void 0:n.length)>0&&(l=Fe(null==a?void 0:null===(r=a.wallConfig)||void 0===r?void 0:r.REGION_LIST).toLowerCase());return o.a.createElement(I.Provider,{value:a},i,o.a.createElement(Ye,null),o.a.createElement("span",{id:"wall-templates-version","data-qa":"region-".concat(l),style:{display:"none"}},Ve.VERSION))}function Xe(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"inject",a="";if(null!=r&&null!==(e=r.data)&&void 0!==e&&e.wallMeterType)a=r.data.wallMeterType;else{if(2!==(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.articleWeight))return n;a="double"}var i=n.split("_");switch(o){case"inject":i.splice(1,0,a);break;case"prefix":i.splice(0,0,a);break;case"suffix":i.splice(i.length,0,a)}return i.join("_")}function Ke(){var e;return null!==(e=Object(r.useContext)(I).wallConfig)&&void 0!==e&&e.INCLUDE_LOGGING?o.a.createElement("img",{src:"".concat({prod:"https://www.washingtonpost.com/subscribe",sandbox:"https://subs-stage.washingtonpost.com",dev:"https://subscribe.digitalink.com"}[p()],"/static/paywall-log.png"),alt:"paywall-log",height:"0",width:"0"}):null}function Ze(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 $e(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 $e(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 $e(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]:[],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=Ze(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 Qe(){return(Qe=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"")},st=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};function ut(){var e=l("wp_devicetype");return st(e)?"tablet":ct(e)?"mobile":"desktop"}var ft=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes(ut())};function dt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ft(e.EXCLUDING_PLATFORMS),r=!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"softwall",n=j(),r=A(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=j()[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}}function pt(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 bt(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],o=mt(Object(r.useState)(!1),2),a=o[0],i=o[1],l=mt(Object(r.useState)(!1),2),c=l[0],s=l[1],u=mt(Object(r.useState)([]),2),f=u[0],d=u[1],p=mt(Object(r.useState)(null),2),b=p[0],O=p[1],m=n&&parent&&!parent.location.href.includes("wall-builder"),g=m?parent:window,v=function e(t){var n;if(t.lineItemId)O(t.lineItemId),n=t.lineItemId;else{var r=t.slot;if(r&&r.getResponseInformation){var o=(r.getResponseInformation()||{}).sourceAgnosticLineItemId;O(o),n=o}}n&&(g.googletag.pubads().removeEventListener("slotRenderEnded",e),g.googletag.pubads().removeEventListener("impressionViewable",e))};return Object(r.useEffect)(function(){var n=ut(),r=(t||"").indexOf(n)>-1;if(!/wall-builder/.test(g.location.href)&&r&&e&&"undefined"!=typeof window){var o=g.wpMetaData||{},a=g.googletag||{};Array.isArray(a.cmd)&&0===a.cmd.length?s(!0):(o.adTrackerId||(g.googletag=g.googletag||{cmd:[]},g.googletag.cmd.push(function(){g.googletag.pubads().addEventListener("slotRenderEnded",v)}),g.googletag.cmd.push(function(){g.googletag.pubads().addEventListener("impressionViewable",v)})),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(g=m?parent:window,(o=g.wpMetaData||{}).adTrackerId||b){var t=o.adTrackerId||b,n=vt.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=vt.indexOf(b||0)<0&&f.indexOf(b)>-1;i(e),s(!0)}},[b,f,c]),{hideWallDueToAds:a,isSponsorAdChecked:c}};function yt(){return(yt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var o,a=Fe(null===(o=e)||void 0===o?void 0:o.REGION_LIST);e=bt(bt({},e),e[a])}return e}(x,n.currentRegion),parent.location.href.includes("wall-builder")||(n.wallConfig=x),Object.keys(y).length&&(n.wallConfig=Et(Et({},x),y),x=n.wallConfig);var N=Je(null===(t=x)||void 0===t?void 0:t.EXPERIMENT_ID,"paywall",E,v),D=N.isOptimize,k=N.isExperimentComplete,U=Lt(Object(r.useState)(!1),2),G=U[0],W=U[1],B=x,z=B.PAYWALL_CTA_PROMO_CODE,Y=B.SUBSCRIPTION_PRICING,F=B.SUBSCRIPTION_LOCATION,q=B.SUBSCRIPTION_EXPERIENCE,X=B.PRICING_STRATEGY,K=B.PAYWALL_TEMPLATE_ID,Z=B.PRIMARY_IMAGE_URL,$=B.MOBILE_IMAGE_URL,J=B.PRIMARY_IMAGE_LOCATION,Q=void 0===J?"left":J,ee=B.PRIMARY_IMAGE_MAX_WIDTH,te=B.PRIMARY_IMAGE_MAX_HEIGHT,ne=B.BACKGROUND_COLOR,re=B.TEXT_ALIGNMENT,oe=B.DESCRIPTION,ae=B.SIGN_IN_DESCRIPTION,ie=B.SIGN_IN,ce=B.HEADER_COLOR,se=B.HEADER,ue=B.SUPPORTING_TEXT,fe=B.CTA_BUTTON_COLOR,de=B.CTA_BUTTON_TEXT,pe=B.PROMO_LABEL_HAS_LOGO,me=B.PROMO_LABEL_PRIMARY_COLOR,ge=B.PROMO_LABEL_SECONDARY_COLOR,ve=B.HAS_PROMO_LABEL,he=B.MODAL_DISPLAY,ye=void 0===he||he,we=B.DEFAULT_FONT_COLOR,Ee=void 0===we?"offblack":we,_e=B.DEFAULT_LINK_COLOR,Le=void 0===_e?"gray-dark":_e,Ie=B.HAS_SIGNIN_LINK,Pe=B.AUTO_DISMISS,Ae=B.AUTO_DISMISS_SECOND,je=B.SECONDARY_SUPPORTING_TEXT,Se=B.CLICK_TRIGGER,Ce=B.CLOSE_BUTTON_EXPIRATION_HOUR,Re=B.TEMPLATE_ID,xe=B.CTA_LINK,Ne=B.LISTEN_FOR_ADS,Me=B.LISTEN_FOR_ADS_PLATFORMS,ke=ht(!ye&&Ne,Me,v),Ue=ke.hideWallDueToAds,We=ke.isSponsorAdChecked,He=Object(r.useMemo)(function(){return dt(x,Ue)},[We]).shouldCloseWall&&!ye,Be=s?$:Z,Ye=function(e,t){var n=e.pwapiResponse,r=e.arcId,o=function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)};return{GAData:g(g({},w(n,r)),t),addEvent:o,addEventWithArticleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(g(g(g({userAgentHit:window.navigator.userAgent,userAgentSession:window.navigator.userAgent},w(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=g(g(g({},w(n,r)),t),o),i=encodeURIComponent(O()),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()}}}(n,Et(Et({},function(e,t){var n=Xe(e,t);return{label:f()?"RPW5:".concat(n=n||"o1_eu"):"C"===d()?"RPW5:".concat(n=n||"o1_ca"):"RPW5:".concat(n),promoCode:n}}(z,b)),{},{category:"acquisition",action:"acquisition-".concat(S),arcId:m?m._id:u})),Ze=Ye.addEventWithArticleData,$e=Ye.addMarketingEvent,Qe=Ye.GAData,et=Ye.addGAParamsToURL;Qe.acqEntranceType="Monthly"===X||void 0===X?"wall_standard":void 0,Qe.subscription_pricing=Y,Qe.subscription_location=ye?Xe(F,b,"suffix").toUpperCase():F,Qe.subscription_experience=q;var tt=Object(r.useMemo)(function(){return et({prod:"https://subscribe.washingtonpost.com/acquisition?",sandbox:"https://subs-stage.washingtonpost.com/acquisition?",dev:"https://subscribe.digitalink.com/acquisition?"}[p()],Qe)},[z,Qe]),nt=Object(r.useMemo)(function(){if(xe)try{return(nt=new URL(xe))&&(nt.searchParams.set("s_l",Qe.subscription_location),nt.searchParams.set("e",q),nt.searchParams.set("p",Y),nt.searchParams.set("next_url",O()),nt.searchParams.get("ga_label")&&nt.searchParams.set("ga_label",Qe.subscription_location)),nt.toString()}catch(e){}},[xe]);Object(r.useEffect)(function(){We&&!He&&Ze(Et(Et({},Qe),{},{event:"acquisition-".concat(S)}))},[We]);var rt=Object(r.useRef)(!0);if(Object(r.useEffect)(function(){var e;ye||6!==(null==b?void 0:b.action)||(v&&parent&&!parent.location.href.includes("wall-builder")?parent:window).postMessage("CloseRegwall","*");We&&!He&&(I(!0),!ye&&Pe&&Ae&&"number"==typeof(e=parseFloat(Ae||"3.5"))&&setTimeout(function(){rt.current&&(T("",!0,Ce,void 0,Re),R&&R(!1),v&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({wall:!0,wallType:S,wallAction:"close"}),"*"),Ze({event:"acquisition-".concat(S,"-dismiss-auto"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss-auto")}))},1e3*e),function(){if("undefined"!=typeof window){var e=RegExp("^[A-Za-z0-9-.]+$"),t=l("wapo_login_id")&&l("wapo_secure_login_id")?l("wapo_login_id"):"",n=l("wp_crtid"),r=t?"&id=".concat(t):"",o=n?"&cartaId=".concat(n):"";if(r&&e.test(t)||o&&e.test(n)){var a=-1!=window.location.hostname.indexOf("washingtonpost.com")?"https://login.washingtonpost.com/identity/campaign/paywallHitEngagement?campaignId=1":"https://idstg.digitalink.com/identity/campaign/paywallHitEngagement?campaignId=1";fetch(a+r+o,{method:"POST"})}}}(),W(!!c()),l("wp_wv")||He||setTimeout(function(){$e()},0))},[We]),Object(r.useEffect)(function(){v&&parent&&!parent.location.href.includes("wall-builder")&&parent.postMessage(JSON.stringify({background:"transparent",element:"#wallIframe",height:"calc(100% - 60px)",scrollAllowed:!ye,top:"60px",wall:!0,wallAction:"open",wallType:S}),"*")},[]),Object(r.useEffect)(function(){!v||!parent||parent.location.href.includes("wall-builder")||n.isShowing&&!He||parent.postMessage(JSON.stringify({wall:!0,wallType:S,wallAction:"close"}),"*")},[n.isShowing,He]),!We||!ye&&!/\/wall-builder\//.test(location.href)&&(!n.isShowing&&"test"!==Ve.NODE_ENV||He))return rt.current=!We&&rt.current,null;var at={},it=!n.isPortrait&&"undefined"!=typeof window&&window.matchMedia("(max-height: 420px)").matches;D&&!k?at.display="none":ye||(at.display=it?"":"flex",at.justifyContent="center",at.alignItems="center",at.maxHeight="calc(100% - 110px)");var ct="left"===Q||"right"===Q;return o.a.createElement(qe,e,o.a.createElement(M,{id:K||"",style:at,className:i()("paywall-overlay transition-all duration-400 ease-in",{"pr-sm pl-sm":s&&!ye,"o-0":!L&&!ye||Be&&!ye&&!A}),isDismissible:!ye,isBackgroundScrollable:!ye,trackingEvent:function(){return Ze({event:"acquisition-".concat(S,"-dismiss"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss")})},isOnClickActivated:L&&!ye&&Be&&A||L&&!ye&&!Be},o.a.createElement(Ge,{imageURL:Be,imageLocation:Q,maxImageHeight:te,maxImageWidth:ee,backgroundColor:ne,isModal:ye,onImageLoad:function(e){return j(e)}},ye?null:o.a.createElement(o.a.Fragment,null,o.a.createElement(lt,{onClick:function(){return Ze({event:"acquisition-".concat(S,"-dismiss"),category:"acquisition",action:"acquisition-".concat(S,"-dismiss")})}})),o.a.createElement("div",{className:i()({"flex items-center":ct})},o.a.createElement(ze,{alignment:re,desktopWidth:"auto",className:i()({"pr-xl pl-xl":!s,"mb-xxl":ye,"mb-lg":!ye}),style:ye?{}:{minWidth:!s&&ct?"450px":""}},Ie?o.a.createElement("div",Te(n,{defaultClass:"mt-sm ".concat(Le," center"),smallClass:"font-xxxs mb-md",largeClass:i()({"mb-xxl":"top"!==Q||!Z,"mb-lg":"top"===Q&&Z}),mediumClass:i()({"mb-xxl":"top"!==Q||!Z,"mb-lg":"top"===Q&&Z})}),o.a.createElement(H,{contentId:"DESCRIPTION",innerHTML:oe,className:" light font--subhead ".concat(Le)})," ",o.a.createElement("span",Te(n,{largeClass:G?"db":"dib",mediumClass:G?"db":"dib",smallClass:"db"}),o.a.createElement(H,{contentId:"SIGN_IN_DESCRIPTION",innerHTML:ae||"",className:" light font--subhead ".concat(Le)})," ",o.a.createElement(be,{contentId:"SIGN_IN",innerHTML:G?"Find your subscription":ie||"",destURL:Oe("usw_paywall",G),className:"".concat(Le," underline"),sendMessages:v}))):o.a.createElement("div",{className:"pt-sm"}),("top"===Q||s&&"center"!==Q)&&Be&&o.a.createElement(De,{imageURL:Be,maxImageWidth:"400",maxImageHeight:"150",location:"top",className:"mw-100 ml-auto mr-auto db ".concat(s?"-mb-sm":""),onImageLoad:function(e){return j(e)}}),ve?o.a.createElement(ot,{primaryContentId:"PROMO_LABEL_PRIMARY",secondaryContentId:"PROMO_LABEL_SECONDARY",hasLogo:pe,primaryColor:me,secondaryColor:ge,wallConfig:x,style:{top:"top"===Q&&Z?"-11px":void 0}}):null,o.a.createElement(V,yt({color:"white"===Ee?"White":ce},Te(n,{defaultClass:"mt-sm pl-sm pr-sm center",largeClass:"font-lg",smallClass:ye?"":"font-md",defaultStyle:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}),{contentId:"HEADER",innerHTML:se})),o.a.createElement(H,{contentId:"SUPPORTING_TEXT",className:i()("".concat("white"===Ee?Ee:"gray-darkest"," font-xs db pl-sm pr-sm"),{"mt-md":!s&&ye,"mt-sm":s&&ye,"mt-xs":"center"===Q,"mb-md":"center"===Q,"font-xxs":s&&!ye}),innerHTML:ue}),"center"===Q&&Be&&o.a.createElement(De,{imageURL:Be,maxImageWidth:s?"300":"400",maxImageHeight:"110",location:"top",className:"mw-100 ml-auto mr-auto db",onImageLoad:function(e){return j(e)}}),o.a.createElement(H,{contentId:"SECONDARY_SUPPORTING_TEXT",className:"".concat("white"===Ee?Ee:"gray-darkest"," font-xxs db pl-sm pr-sm mt-sm"),innerHTML:je}),o.a.createElement(le,{contentId:"CTA_BUTTON_TEXT",className:i()("btn-md",{"mt-lg":ye,"mt-sm":!ye}),style:{minWidth:"225px",borderRadius:"31px"},color:fe||"WaPo blue",href:xe?nt:tt,innerHTML:de,rounded:!0,sendMessages:v,onClick:function(){ye||(T("",!0,Ce,void 0,Re),x.MAX_SNOOZE&&C(K||""))}}),o.a.createElement(H,{contentId:"CLICK_TRIGGER",className:i()("".concat("white"===Ee?Ee:"gray-dark"," font-xxxxs db pt-xs")),innerHTML:Se}))),o.a.createElement(Ke,null))))});t.default=Pt}])); //# sourceURL=browsertools://www.washingtonpost.com/subscribe/remote-component1650387270559.js