!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;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]:[]).some(function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return W.has(e.substr(0,5))}(e)})}function M(){var e=document.cookie.match(/wp_geo=(.*?)(;|$)/),t=Array.isArray(e)?e[1]:"",n=t.split("|"),r={country_code:"",state:"",DMA:"",ZIP:""};return t&&(r.country_code=n[0]||"",r.state=n[1]||"",r.DMA=n[2]||"",r.ZIP=n[3]||""),r}var F=function(){var e=N("wp_geo");if(!e)return!1;var t=e.split("|");return"EEA"===(t[t.length-1]||"")};function U(){var e,t,n,r=x((t=M(),n=(null==t?void 0:null===(e=t.ZIP)||void 0===e?void 0:e.split("-"))||[],"US"===t.country_code?n.filter(function(e){return e}):[])),o=M().country_code,a=F();return r&&"US"===o?"L":o&&"US"!==o&&"CA"!==o&&!a?"I":a?"E":"CA"===o?"C":"N"}var W=new Set(["20001","20002","20003","20004","20005","20006","20007","20008","20009","20010","20011","20012","20015","20016","20017","20018","20019","20020","20024","20032","20036","20037","20105","20106","20109","20110","20111","20112","20115","20117","20119","20120","20121","20124","20129","20132","20135","20136","20137","20141","20143","20144","20147","20148","20151","20152","20155","20158","20164","20165","20166","20169","20170","20171","20175","20176","20180","20181","20184","20186","20187","20190","20191","20194","20197","20198","20373","20601","20602","20603","20606","20607","20608","20609","20610","20611","20612","20613","20615","20616","20617","20618","20619","20620","20621","20622","20623","20624","20625","20626","20627","20628","20629","20630","20632","20634","20635","20636","20637","20639","20640","20643","20645","20646","20650","20653","20656","20657","20658","20659","20660","20661","20662","20664","20667","20670","20674","20675","20676","20677","20678","20680","20682","20684","20685","20686","20687","20688","20689","20690","20692","20693","20695","20701","20705","20706","20707","20708","20710","20711","20712","20714","20715","20716","20720","20721","20722","20723","20724","20732","20733","20735","20736","20737","20740","20742","20743","20744","20745","20746","20747","20748","20751","20754","20755","20758","20759","20762","20763","20764","20769","20770","20772","20774","20776","20777","20778","20779","20781","20782","20783","20784","20785","20794","20814","20815","20816","20817","20818","20832","20833","20837","20841","20842","20850","20851","20852","20853","20854","20855","20860","20861","20866","20868","20871","20872","20874","20876","20877","20878","20879","20882","20886","20895","20896","20901","20902","20903","20904","20905","20906","20910","20912","21012","21029","21032","21035","21036","21037","21042","21043","21044","21045","21046","21048","21054","21075","21076","21108","21113","21114","21140","21144","21146","21157","21158","21163","21401","21402","21403","21405","21601","21613","21619","21623","21629","21631","21632","21638","21643","21655","21658","21662","21663","21666","21671","21701","21702","21703","21704","21710","21713","21716","21717","21718","21719","21727","21737","21738","21740","21742","21743","21746","21754","21755","21757","21758","21762","21765","21767","21769","21770","21771","21773","21774","21777","21781","21783","21784","21787","21788","21793","21794","21795","21797","21798","21801","21802","21803","21804","21811","21842","21851","21853","21863","22003","22015","22021","22024","22026","22027","22030","22031","22032","22033","22039","22041","22042","22043","22044","22046","22060","22066","22079","22101","22102","22110","22111","22124","22134","22150","22151","22152","22153","22172","22180","22181","22182","22191","22192","22193","22201","22202","22203","22204","22205","22206","22207","22209","22211","22213","22301","22302","22303","22304","22305","22306","22307","22308","22309","22310","22311","22312","22314","22315","22405","22406","22407","22408","22432","22435","22441","22442","22443","22448","22469","22473","22480","22482","22485","22488","22507","22508","22511","22520","22524","22539","22542","22554","22556","22560","22572","22576","22578","22579","22601","22602","22603","22604","22611","22620","22624","22625","22626","22627","22630","22637","22641","22644","22645","22650","22654","22655","22656","22657","22660","22663","22664","22701","22712","22713","22716","22724","22727","22728","22734","22736","22740","22742","22747","22801","22802","22810","22812","22815","22821","22824","22827","22830","22831","22834","22835","22842","22844","22846","22849","22850","22851","22853","22901","22902","22903","22904","22911","22923","22932","22936","22937","22939","22940","22942","22946","22947","22949","22958","22959","22960","22963","22968","22973","22974","22980","22989","23093","23168","23185","23186","23188","23336","24073","24401","24402","24477","24482","24486","24590"]),k=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};var B=function(){var e=V(),t=document.createElement("a");return t.href=e,t.pathname||""};function V(){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 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 H(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 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 q(e,t){var n,r,o;return{label:"o1",browserUserAgentHit:navigator.userAgent,promoCode:"o1",acqEntranceType:X(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.actionCodes),geoMarket:U(),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 K=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({},q(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},q(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({},q(n,r)),t),o),i=encodeURIComponent(V()),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()}}},$="wp_nl";function J(e){return{softwall:"sw","softwall-nl":"sw","softwall-subscribe":"sw",regwall:"rw","paywall-purchase":"pw","paywall-default":"pw"}[e]}function Z(){return"undefined"!=typeof window?JSON.parse(localStorage.getItem($)||"{}"):{}}function Q(e){localStorage.setItem($,JSON.stringify(e))}function ee(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=Z(),i=J(o);if(t){var l=Date.now()+60*n*60*1e3;a[i]=l,Q(a)}else if(e){var c=Date.now()+60*r*60*1e3;a[e]=c,Q(a)}}function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=Z(),n=(t[e]||0)+1;t[e]=n,Q(t)}var ne=function(){return"1"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")},re=function(){return"2"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")};function oe(){var e=N("wp_devicetype");return re(e)?"tablet":ne(e)?"mobile":"desktop"}var ae=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",").map(function(e){return e.trim()}).includes(oe())};function ie(e){var t=ae(e.EXCLUDING_PLATFORMS),n=!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"softwall",n=Z(),r=J(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=Z()[e]||0;return n>=t&&0!==n||-1===n}(e.PAYWALL_TEMPLATE_ID,e.MAX_SNOOZE);return{isExcluded:t,shouldCloseWall:!/\/wall-builder\//.test(location.href)&&(t||!(null!=e&&e.SHOW_ALWAYS)&&n)&&!window.pendingIframeResize}}var le=function(){var e=Object(r.useContext)(a).setSizes,t=function(){requestAnimationFrame(function(){e&&e({isSmall:g(),isMedium:v(),isLarge:L(),isExtraLarge:_()})})};return Object(r.useEffect)(function(){return"undefined"!=typeof window&&(e&&e({isExtraLarge:_()}),window.addEventListener("resize",t,!1)),function(){"undefined"!=typeof window&&window.removeEventListener("resize",t,!1)}},[]),null},ce={NODE_ENV:"production",SERVICE_URL:"https://subscribe.washingtonpost.com",WALL_CONFIG:{SOFTWALL_V2_RIGHT_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PQBESXDB4FENRB4SO7L7VNSLQE.png",ACQ_BASE_URL:"https://subscribe.washingtonpost.com",HAS_PROMO_LABEL:"none",SUBSCRIPTION_LOCATION:"ONSITE_SOFTWALL_EXPANDED",MIN_SUBSCRIPTION_LOCATION:"ONSITE_SOFTWALL_COLLAPSED",SOFTWALL_V2_EXPANDED_BODY_STYLE:"left",SOFTWALL_V2_CTA_BUTTON_HEX_COLOR_OVERRIDE:"",SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Stay informed with unlimited access to The Washington Post.",MIN_ON_LOAD:!0,SOFTWALL_V2_MIN_CTA_PROMO_CODE:"o_wb",SOFTWALL_V2_CTA_LINK:"",PROMO_LABEL_HAS_LOGO:!1,SOFTWALL_V2_BACKGROUND_COLOR:"Pale blue",GTM_LOADER:"gtm",PROMO_LABEL_PRIMARY_COLOR:"Offblack",PROMO_LABEL_SECONDARY:"2 DAYS ONLY",PROMO_LABEL_SECONDARY_COLOR:"Offblack",EEA:{SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Support journalism you can trust.",SOFTWALL_V2_SUPPORTING_TEXT:"Great journalism is essential. It’s also expensive to produce and we couldn’t do it without the support of people like you. Subscribe today.",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_EXPANDED_HEADER:"Our subscribers make our work possible.",SOFTWALL_V2_RIGHT_IMAGE_URL:"",SOFTWALL_V2_BACKGROUND_COLOR:"White",SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for €50 €20',DEFAULT_LINK_COLOR:"gray-dark",SUBSCRIPTION_EXPERIENCE:"DEFAULT-EEA-2021",SUBSCRIPTION_PRICING:"s_v",EXPAND_ON_SCROLL:!0,DEFAULT_FONT_COLOR:"offblack"},CLOSE_BUTTON_EXPIRATION_HOUR:48,SOFTWALL_V2_EXPANDED_HEADER:"Stay informed with unlimited access to The Washington Post.",DEPLOYMENT_TOKEN:1644944896213,SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for $40',DEFAULT_FONT_COLOR:"offblack",REGION:"US",WALL_CONFIG_ID:"0852caca-1661-410e-bb59-1e21767f0284",EXCLUDING_PLATFORMS:"mobile",AU:{SOFTWALL_V2_RIGHT_IMAGE_URL:"",SOFTWALL_V2_EXPANDED_HEADER:"Our subscribers make our work possible.",SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for A$70 A$40',DEFAULT_FONT_COLOR:"offblack",SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Support journalism you can trust.",SOFTWALL_V2_SUPPORTING_TEXT:"Great journalism is essential. It’s also expensive to produce and we couldn’t do it without the support of people like you. Subscribe today.",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_BACKGROUND_COLOR:"White",SOFTWALL_V2_CLICK_TRIGGER:"You can cancel anytime.",DEFAULT_LINK_COLOR:"gray-dark",SUBSCRIPTION_EXPERIENCE:"DEFAULT-AU-2021",SUBSCRIPTION_PRICING:"s_v",EXPAND_ON_SCROLL:!0},SHOW_ALWAYS:!1,SOFTWALL_V2_CLICK_TRIGGER:"You can cancel anytime.",DEFAULT_LINK_COLOR:"gray-dark",SOFTWALL_V2_CTA_PROMO_CODE:"o_wb",AUTO_COLLAPSED:!1,AUTO_COLLAPSED_SECOND:5,REGION_LIST:["AU","CA","GB","EEA","INTL"],SCREEN_STATE:"Default",SOFTWALL_V2_CTA_BUTTON_COLOR:"Blue",SHOW_CLOSE_ON_EXPAND:!1,TEMPLATE_ID:"softwall-subscribe",SOFTWALL_V2_CTA_BUTTON_STYLE:"Button",SOFTWALL_V2_SUPPORTING_TEXT:"24/7 coverage from 1000+ journalists. Subscriber-exclusive events. Unmatched political and international news.",SOFTWALL_V2_MOBILE_IMAGE_URL:"https://arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/PQBESXDB4FENRB4SO7L7VNSLQE.png",PROMO_LABEL_PRIMARY:"LIMITED TIME OFFER",ASSET_BASE_URL:"https://www.washingtonpost.com/subscribe",NOTE:"",INCLUDE_LOGGING:!0,PRICING_STRATEGY:"Annual",GB:{SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Support journalism you can trust.",SOFTWALL_V2_SUPPORTING_TEXT:"Great journalism is essential. It’s also expensive to produce and we couldn’t do it without the support of people like you. Subscribe today.",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_RIGHT_IMAGE_URL:"",SOFTWALL_V2_EXPANDED_HEADER:"Our subscribers make our work possible.",SOFTWALL_V2_BACKGROUND_COLOR:"White",SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for £50 £20',DEFAULT_LINK_COLOR:"gray-dark",SUBSCRIPTION_EXPERIENCE:"DEFAULT-UK-2021",SUBSCRIPTION_PRICING:"s_v",EXPAND_ON_SCROLL:!0,DEFAULT_FONT_COLOR:"offblack"},EXPAND_ON_SCROLL:!1,CA:{SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Support journalism you can trust.",SOFTWALL_V2_SUPPORTING_TEXT:"Great journalism is essential. It’s also expensive to produce and we couldn’t do it without the support of people like you. Subscribe today.",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_RIGHT_IMAGE_URL:"",SOFTWALL_V2_EXPANDED_HEADER:"Our subscribers make our work possible.",SOFTWALL_V2_BACKGROUND_COLOR:"White",SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for CA$80 CA$39',DEFAULT_LINK_COLOR:"gray-dark",SUBSCRIPTION_EXPERIENCE:"DEFAULT-CA-2021",SUBSCRIPTION_PRICING:"s_v",EXPAND_ON_SCROLL:!0,DEFAULT_FONT_COLOR:"offblack"},SOFTWALL_V2_COLLAPSED_HEADER_MOBILE:"Support journalism.",SUBMIT_EXPIRATION_HOUR:720,SHOW_CLOSE_ON_MIN:!0,SOFTWALL_TYPE:"Default",EXPANDABLE:!0,COLLAPSE_ON_SCROLL:!1,SOFTWALL_V2_LEFT_IMAGE_URL:"http://placehold.jp/400x400.png",SUBSCRIPTION_EXPERIENCE:"DEFAULT-US-202201",SUBSCRIPTION_PRICING:"s_v",INTL:{SOFTWALL_V2_COLLAPSED_HEADER_DESKTOP:"Support journalism you can trust.",SOFTWALL_V2_SUPPORTING_TEXT:"Great journalism is essential. It’s also expensive to produce and we couldn’t do it without the support of people like you. Subscribe today.",SOFTWALL_V2_MOBILE_IMAGE_URL:"",SOFTWALL_V2_RIGHT_IMAGE_URL:"",SOFTWALL_V2_EXPANDED_HEADER:"Our subscribers make our work possible.",SOFTWALL_V2_BACKGROUND_COLOR:"White",SOFTWALL_V2_CTA_BUTTON_TEXT:'Get one year for $60 USD $29 USD',DEFAULT_LINK_COLOR:"gray-dark",SUBSCRIPTION_EXPERIENCE:"DEFAULT-INTL-2021",SUBSCRIPTION_PRICING:"s_v",EXPAND_ON_SCROLL:!0,DEFAULT_FONT_COLOR:"offblack"},PAYWALL_TEMPLATE_ID:"softwall-us-8490852caca"},VERSION:"2.18.3"};function se(e){var t=e.wallState,n=e.children;return o.a.createElement(a.Provider,{value:t},n,o.a.createElement(le,null),o.a.createElement("span",{id:"wall-templates-version",style:{display:"none"}},ce.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())))))}}};function Le(){return(Le=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 Ke=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,O=void 0!==p&&p,b=e.contentId,y=void 0===b?"":b,m=e.buttonStyle,g=void 0===m?"Button":m,v=e.innerHTML,L=void 0===v?"Subscribe":v,_=e.isLoading,E=void 0!==_&&_,w=qe(e,Ge),h=ve(y),S=h.onChange,T=h.isContentEditable,P=Object(r.useContext)(a).wallConfig,C=null==P?void 0:P.DEFAULT_FONT_COLOR,j="",I="Link"===g||"Arrow"===g;j=I||"White"!==i&&"Black"!==i&&"WaPo blue"!==i?I?l()({"subs-theme":"White"!==i&&"WaPo blue"!==i&&"Black"!==i},"".concat([A[i]]," bold")):"btn subs-theme bg-".concat(A[i]):"btn btn-".concat(A[i]),L=E?" ".concat(L):L;var R=t||o.a.createElement("span",{dangerouslySetInnerHTML:{__html:L},id:y,contentEditable:!!y&&T}),D=Xe({role:"button",href:c,style:Xe(Xe({whiteSpace:I?"normal":"nowrap",boxSizing:"border-box",borderRadius:d?"31px":0},u),{},{borderColor:"White"!==i?"unset":void 0,padding:I?"":null==u?void 0:u.padding,border:"white"===C?"unset":"initial"}),onBlur:S,onClick:function(e){y&&!T||!y?f&&f(e):T&&e.preventDefault()},className:l()(s,"ma-0 pointer",{dib:!I},j),children:o.a.createElement(o.a.Fragment,null,R,"Arrow"===g?o.a.createElement(Ve,{angle:0,size:16,color:(null==u?void 0:u.color)||i,style:{marginLeft:"5px",verticalAlign:"middle"}}):null)},w),N="".concat(y,"_CTA_WRAPPER");if(c||T&&y||I){var x="_self";return c&&O&&!parent.location.href.includes("wall-builder")&&(x="_top"),o.a.createElement("a",He({id:N},D,{target:x}))}return o.a.createElement("button",He({id:N},D))};var $e=function(e){var t=e.color,n=e.acquisitionURL,i=e.buttonStyle,l=e.hexOverride,c=e.buttonText,s=e.sendMessages,u=void 0!==s&&s,f=Object(r.useContext)(a),d=f.isSmall,p=f.wallConfig;return d&&"Button"===i&&(i="Link"),o.a.createElement(Ke,{contentId:"SOFTWALL_V2_CTA_BUTTON_TEXT",color:t,buttonStyle:i,href:n,rounded:!0,sendMessages:u,className:"dib",style:{padding:d||"Button"!==i?"":"7px 32px",backgroundColor:"Button"===i?l:void 0,color:"Button"!==i?l:void 0,borderColor:l,marginLeft:d?"0px":void 0,marginRight:d?"16px":void 0},onClick:function(){ee("",!0,p.CLOSE_BUTTON_EXPIRATION_HOUR)},innerHTML:c})};function Je(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 Ze(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 Ze(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 Ze(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);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=Lt(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 wt(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 ht(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 ht(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 ht(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||o?(window.postMessage("CloseRegwall","*"),c(!1)):a&&s&&!o?c(!1):s&&!n?(c(!0),window.addEventListener("message",f,!1),!(e=document.getElementById("slug_fixedBottom"))||e&&e.offsetHeight<=0?(c(!1),u()):e&&e.offsetHeight>0&&setTimeout(function(){e=document.getElementById("slug_fixedBottom");var t=window.googletag||{};Array.isArray(t.cmd)&&0===t.cmd.length&&(!e||e.childElementCount<=0)&&(c(!1),u())},2e3)):c(!1),function(){u()}},[]),l};function At(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 Tt(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 Tt(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 Tt(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=At(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=N("wp_country");Rt.includes(o)?o="EEA":Rt.includes(o)||Dt.includes(o)||(o="INTL"),e=xt(xt({},e),e[o])}return e}(f,n.currentRegion),parent.location.href.includes("wall-builder")||(n.wallConfig=f),Object.keys(s).length&&(n.wallConfig=Wt(Wt({},f),s),f=n.wallConfig);var d=Et(null===(t=f)||void 0===t?void 0:t.EXPERIMENT_ID,"softwall",u,l),p=d.isOptimize,O=d.isExperimentComplete,b=f.LISTEN_FOR_ADS,y=!!b&&vt(),m=f,g=m.MIN_ON_LOAD,v=m.PRICING_STRATEGY,L=m.GA_ACTION,_=m.GA_CATEGORY,E=m.GA_LABEL,w=m.ITID,h=m.SOFTWALL_V2_CTA_PROMO_CODE,S=m.SUBSCRIPTION_PRICING,A=m.SUBSCRIPTION_EXPERIENCE,T=m.SUBSCRIPTION_LOCATION,P=m.SOFTWALL_V2_CTA_LINK,C=m.MIN_SUBSCRIPTION_LOCATION,j=m.PAYWALL_TEMPLATE_ID,I=m.SOFTWALL_V2_BACKGROUND_COLOR,R=m.EXPANDABLE,x=m.SCREEN_STATE,M=Bt(Object(r.useState)(!1),2),F=M[0],U=M[1],W=Bt(Object(r.useState)(!!g),2),G=W[0],H=W[1],z=Bt(Object(r.useState)(!1),2),X=z[0],Y=z[1],q=Bt(Object(r.useState)(""),2),$=q[0],J=q[1],Z=Bt(Object(r.useState)(""),2),Q=Z[0],ee=Z[1],te=Bt(Object(r.useState)(!1),2),ne=te[0],re=te[1];Object(r.useEffect)(function(){l&&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(l&&parent){var e="Default";g&&X?e="Expanded":g||X||!G||(e="Collapsed"),parent.location.href.includes("wall-builder")&&parent.postMessage({newScreenState:e},"*")}},[X]);var oe="Annual"===v||void 0===v?void 0:"wall_standard",ae=function(e,t){if("undefined"!=typeof window){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t||location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))}return""}("promoCode",P),le={label:E||h,promoCode:"Custom Link"===f.SOFTWALL_TYPE?ae:h,arcId:null==i?void 0:i._id,event:L||"acquisition-softwall-subscribe",category:_||"acquisition",action:L||"acquisition-softwall-subscribe"};"Default"===f.SOFTWALL_TYPE&&(le=Wt(Wt({},le),{subscription_pricing:S,subscription_location:C,subscription_experience:A,acqEntranceType:oe}));var ue=K(n,le),fe=ue.addEventWithArticleData,de=ue.addMarketingEvent,pe=ue.addGAParamsToURL,Oe=ie(f),be=Oe.isExcluded,ye=Oe.shouldCloseWall,me=St({shouldCloseWall:ye,isExcluded:be,hideSoftwallDueToAds:y,isWallListeningForAds:b});Object(r.useEffect)(function(){l&&parent&&!parent.location.href.includes("wall-builder")&&ye&&parent.postMessage(JSON.stringify({wall:!0,wallType:"softwall",wallAction:"close"}),"*")},[ye]),Object(r.useEffect)(function(){ye||y||fe()},[h,S,A]),Object(r.useEffect)(function(){var e=function(e,t){var n=decodeURIComponent(N("wp_wv")),r={},o=!0,a=!!n;if(a){var i=n.split("t_")[1],l=B();r.promoCode="(not set)",r.acqEntranceType="(not set)",r.label=i,"undefined"!=typeof window&&window.SubsJSInterface&&window.SubsJSInterface.showPaywall?function(t,n){var r=e,a="android-classic"===n;if(a&&(r=JSON.stringify(e)),window.SubsJSInterface.showPaywall.length>1||a)try{window.SubsJSInterface.showPaywall(t,r)}catch(n){if(console.error("SubsJSInterface with one two failed"),3===e.action)try{window.SubsJSInterface.showPaywall(t)}catch(e){console.error("SubsJSInterface with one arg failed"),o=!1}}else if(3===e.action)try{window.SubsJSInterface.showPaywall(t)}catch(e){console.error("SubsJSInterface with one arg failed"),o=!1}}(l,i):o=!1,r.action="acquisition-appwebview-".concat(t,o?"redirect":"-backup-deadend")}else o=!1;return{webViewGAData:r,isWebView:a,isSubJSInterfaceCalled:o}}(a,"softwall").isWebView;if(re(e),!/w\.washingtonpost\.com/.test(location.origin)&&"test"!==ce.NODE_ENV||!ye&&!e)if(P)ge();else{var t={prod:"https://subscribe.washingtonpost.com/acquisition?",sandbox:"https://subs-stage.washingtonpost.com/acquisition?",dev:"https://subscribe.digitalink.com/acquisition?"}[k()];J(pe(t,{subscription_location:T})),ee(pe(t,{subscription_location:C}))}},[f]);var ge=function(){var e=P||"";try{var t=new URL(e);if(w&&(t.searchParams.delete("itid"),t.searchParams.append("itid",w)),t){t.searchParams.append("next_url",V()),t.searchParams.append("arcId",(null==i?void 0:i._id)||"");var n=X?T||"":C||"";t.searchParams.append("s_l",n),t.searchParams.append("e",A||"")}e=t.toString()}catch(e){}J(e),ee(e)};Object(r.useEffect)(function(){G&&Y(!g&&"Collapsed"!==x||"Expanded"===x)},[R,x,g,G]),Object(r.useEffect)(function(){ye||y||de("softwall")},[]);var ve=It(f,!!R,me,l),Le=ve.collapseOnScroll,_e=ve.expandOnScroll,Ee=ve.activateAutoCollapse;Object(r.useEffect)(function(){var e=ye||y;(!X&&_e&&!e||X&&Le&&!e)&&we()},[_e,Le]);var we=function(){Y(!X),U(!0);var e=Ee?"auto-minimize":"minimize";Ee?e="collapse-auto":Le&&(e="collapse-scroll");var t=_e?"expand-scroll":"expand";"Custom Link"===f.SOFTWALL_TYPE?(ge(),fe({event:"".concat(le.event,"-").concat(X?e:t),category:le.category,action:"".concat(le.action,"-").concat(X?e:t)})):"Default"===f.SOFTWALL_TYPE&&fe({event:"".concat(le.event,"-").concat(X?e:t),category:le.category,action:"".concat(le.action,"-").concat(X?e:t),subscription_location:X?C:T})},he={wallConfig:f,GAEventData:le,handleExpand:we,isExpanded:X,sendMessages:l};return ye&&("production"===ce.NODE_ENV||"test"===ce.NODE_ENV)&&!/washpost.arcpublishing.com/.test(location.origin)||!n.isShowing&&"test"!==ce.NODE_ENV||ne||me||y?null:o.a.createElement(se,e,o.a.createElement(D,{id:j,backgroundColor:I||"White",triggerResize:X?0:1,sendMessages:l,style:p&&!O?{height:0}:{},templateId:f.TEMPLATE_ID},g&&0==R?null:o.a.createElement(mt,Ft({},he,{CTAURL:$,onImageLoad:H,sendMessages:l})),G?o.a.createElement(nt,Ft({},he,{hasExpanded:F,CTAURL:Q,sendMessages:l})):null))});Gt.displayName="SoftwallSubscribe";t.default=Gt}])); //# sourceURL=browsertools://www.washingtonpost.com/subscribe/remote-component1644944900622.js