}, {}];
window.modules[“1181”] = [function(require,module,exports){“use strict”;module.exports=((e,t)=>{if(“string”!=typeof e||”string”!=typeof t)throw new TypeError(“Expected the arguments to be of type `string`”);if(“”===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]});
}, {}];
window.modules[“1182”] = [function(require,module,exports){“use strict”;function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||”&”,t=t||”=”;var o={};if(“string”!=typeof r||0===r.length)return o;var a=/+/g;r=r.split(e);var s=1e3;n&&”number”==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;y
}).call(this)}).call(this,require(18),”/services/universal/agora.js”)}, {“9″:9,”18″:18,”20″:20,”35″:35,”56″:56,”66″:66,”67″:67,”103″:103,”149″:149,”223″:223,”1335”:1335}];
window.modules[“1337”] = [function(require,module,exports){“use strict”;const _map=require(66),_mapValues=require(218),_reduce=require(106),_assign=require(153),_get=require(9),_pickBy=require(154),_find=require(59),affiliateFields=[“siteShortKey”,”pageUri”,”productId”,”utmMedium”,”utmSource”,”sessionCount”,”format”,”utmCampaign”,”referrer”,”deviceAbbreviation”,”zone”],affiliateSettings={amazon:{domains:[“amazon.com”,”amazon.co.uk”],subtagKey:”ascsubtag”,maxLength:99,delimiter:”standard”,encode:!1},narrativ:{domains:[“shop-links.co/”],subtagKey:”u1″,maxLength:99,delimiter:”standard”,encode:!0},rakuten:{domains:[“click.linksynergy.com/deeplink”,”linksynergy.walmart.com/deeplink”],subtagKey:”u1″,maxLength:72,delimiter:”standard”,encode:!1},shareasale:{domains:[“shareasale.com”],subtagKey:”afftrack”,maxLength:99,delimiter:”standard”,encode:!1},skimlinks:{domains:[“go.redirectingat.com”],subtagKey:”xcust”,maxLength:50,delimiter:”alt”,encode:!1},impact:{domains:[],subtagKey:”subId2″,maxLength:99,delimiter:”standard”,encode:!1},avantlink:{domains:[“avantlink.com”],subtagKey:”ctc”,maxLength:64,delimiter:”alt”,encode:!1},cj:{domains:[“tkqlhce.com”,”jdoqocy.com”,”dpbolvw.net”,”anrdoezrs.net”,”kqzyfj.com”],subtagKey:”sid”,maxLength:64,delimiter:”alt”,encode:!1,joinBy:”/”,assignBy:”/”,positioned:!0,position:”after”,positionKey:”type/dlg/”},partnerize:{domains:[“prf.hn”],subtagKey:”pubref”,maxLength:100,delimiter:”alt”,encode:!1,joinBy:”/”,assignBy:”:”,positioned:!0,position:”before”,positionKey:”destination”},pepperjam:{domains:[“gopjn.com”,”pntrac.com”,”pjtra.com”,”pjatr.com”,”pntrs.com”,”pntra.com”],subtagKey:”sid”,maxLength:100,delimiter:”alt”,encode:!1},awin:{domains:[“awin1.com”],subtagKey:”pref1″,maxLength:100,delimiter:”alt”,encode:!1,positioned:!0,position:”before”,positionKey:”ued”}},subtagDictionary={siteShortKey:””,pageUri:”p”,productId:”i”,zone:”z”,deviceAbbreviation:”d”,utmSource:”s”,utmMedium:”m”,utmCampaign:”c”,sessionCount:”u”,referrer:”r”,format:”t”},delimiters={standard:[“[“,”]”],alt:[“__”,”_”]};function parseValueFromSubtag(e,t,i){const a=t[0]+e+t[1],s=i.split(a)[1]||””;return s?s.split(t[0])[0]:null}function parseSubtag(e,t=delimiters.standard){return _pickBy(_mapValues(subtagDictionary,i=>parseValueFromSubtag(i,t,e)))}function generateSubtag(e,t,i=delimiters.standard,a=!1){const s=(e=>t=>`${e[0]}${t}${e[1]}`)(i);let n=_reduce(affiliateFields,(t,i)=>{const a=s(subtagDictionary[i]),n=e[i];return t+(n?a+n:””)},””);return a&&(n=encodeURIComponent(n)),n}function applySubtagMaxlength(e,t){var i=t-3*(e.split(“,”).length-1+e.split(“|”).length-1);return e.substr(0,i)}function getSubtagData({getters:e,fields:t=[],visitState:i,locals:a,productLink:s}){let n={};return t.forEach(t=>{n[t]=e[t]&&e[t]({visitState:i,locals:a,productLink:s})}),n}function parseQuery(e=””){return e.split(“&”).reduce((e,t)=>{const i=t.split(“=”)[0],a=t.split(“=”)[1];return void 0!==a&&(e[i]=a),e},{})}function processSubtagPosition({url:e,positionKey:t,subtagKey:i,position:a=”after”,subtagString:s,joinBy:n,assignBy:o}={}){const[r,l]=e.split(t),u=`${i}${o}${s}`,g=[];if(“after”===a){if(!l)return e;const[a,s=””]=l.split(`${i}${o}`),d=s.split(n).slice(1).join(n);g.push(`${r}${t}`,u),a&&g.push(a),d&&g.push(d)}if(“before”===a){const[e,a=””]=r.split(`${i}${o}`),s=a.split(n).slice(1).join(n);g.push(e),s&&g.push(s),g.push(u,`${t}${l}`)}return g.reduce((e,t)=>{return e.slice(-1)===n&&(e=e.slice(0,-1)),e.length?[e,t].join(n):t},””)}function processSubtag({getters:e,affiliate:t,url:i,visitState:a={},locals:s}){const n=affiliateFields,o=_get(affiliateSettings[t],”subtagKey”),r=_get(affiliateSettings[t],”maxLength”),l=_get(affiliateSettings[t],”encode”),u=_get(affiliateSettings[t],”delimiter”),g=_get(affiliateSettings[t],”positioned”,!1),d=_get(affiliateSettings[t],”position”),c=_get(affiliateSettings[t],”positionKey”),p=_get(affiliateSettings[t],”assignBy”,”=”),m=_get(affiliateSettings[t],”joinBy”,”&”),f=delimiters[u];let b,y,S=i.indexOf(“?”)>=0?i.split(“?”).pop():””,h=parseQuery(S),_=getSubtagData({getters:e,fields:n,visitState:a,locals:s,productLink:i});return o&&(y=h[o]||””,y=applySubtagMaxlength(b=generateSubtag(_=_assign(parseSubtag(y,f),_pickBy(_)),t,f,l),r),h[o]=y,S=_map(h,(e,t)=>`${t}=${e}`).join(“&”),i=g?processSubtagPosition({url:i,positionKey:c,subtagKey:o,position:d,subtagString:y,joinBy:m,assignBy:p}):i.split(“?”)[0]+`?${S}`),i}function getAffiliate(e){const t=Object.keys(affiliateSettings);return _find(t,t=>_find(affiliateSettings[t].domains,t=>e.includes(t.toLowerCase())))||””}function createSubtagProcessor(e){return({url:t,visitState:i,locals:a,affiliate:s})=>(s=getAffiliate(t)||s)?processSubtag({getters:e,url:t,affiliate:s,visitState:i,locals:a}):””}module.exports.generateSubtag=generateSubtag,module.exports.getAffiliate=getAffiliate,module.exports.createSubtagProcessor=createSubtagProcessor,module.exports.processSubtag=processSubtag;
}, {“9″:9,”59″:59,”66″:66,”106″:106,”153″:153,”154″:154,”218”:218}];
window.modules[“article-nav.client”] = [function(require,module,exports){“use strict”;const dom=require(4),_throttle=require(53),$visibility=require(5),$popup=require(68),$gtm=require(3),{reportSocial:reportSocial}=require(69),auth0=require(7);module.exports=(t=>{let e=dom.find(“.page-header”),i=dom.find(“.article-content”),r=dom.find(t,”.deepscroll-headline”),o=dom.find(t,”.deepscroll-rubric”),s=dom.find(t,”.deepscroll-rubric-sponsored”),l=dom.find(“.article .article-header .rubric”),n=dom.find(“#deepscroll_center_divider”),a=dom.find(“.clay-paragraph”),d=dom.find(t,”.logo”),c=dom.find(t,”.dyn-cut-logo”),p=dom.find(t,”.article-nav-top”),u=dom.find(t,”.article-nav-deepscroll”),m=dom.find(‘link[rel=”canonical”]’),f=m&&m.getAttribute(“href”),g=dom.find(‘meta[property=”og:image”]’)?dom.find(‘meta[property=”og:image”]’).getAttribute(“content”):””,h=dom.find(‘meta[property=”og:title”]’)?dom.find(‘meta[property=”og:title”]’).getAttribute(“content”):””,y=dom.find(t,”.share-link.facebook”),w=dom.find(t,”.share-link.twitter”),v=dom.find(t,”.share-link.pinterest”),b=t.classList.contains(“header-simple”),x=window.getComputedStyle(d,null).getPropertyValue(“–targetFlexBasis”),L=window.getComputedStyle(d,null).getPropertyValue(“–verticalStart”)||0,C=window.getComputedStyle(d,null).getPropertyValue(“–verticalEnd”)||0,$=!1,_=55;function k(){_=parseInt(window.getComputedStyle(d,null).getPropertyValue(“–stickyTop”))||_,C=$visibility.getViewportWidth()>=1180?window.getComputedStyle(d,null).getPropertyValue(“–verticalEndDesktop”)||C:window.getComputedStyle(d,null).getPropertyValue(“–verticalEnd”)||C}function S(){$=!1,P()}function P(){let{top:r}=t.getBoundingClientRect(),o=window.getComputedStyle(d,null).getPropertyValue(“–baseFlexBasis”),s=o-x,l=(_-e.getBoundingClientRect().top)/_,n=Math.max(0,Math.min(1,l)),m=L-C-2,f=Math.round(L-(m*n+2)),g=Math.ceil(o-s*n);if(lt?e.classList.add(“header-after-scroll”):e.classList.remove(“header-after-scroll”),p.style.transform=`translateY(${C}px)`,u.style.transform=`translateY(${C}px)`,void(d.style.flexBasis=x+”px”)}window.scrollY>r?t.classList.add(“after-scroll”):t.classList.remove(“after-scroll”),window.scrollY>r?e.classList.add(“header-after-scroll”):e.classList.remove(“header-after-scroll”),p.style.transform=`translateY(${f}px)`,u.style.transform=`translateY(${f}px)`,d.style.flexBasis=g+”px”,c&&(c.style.flexBasis=g+”px”),$visibility.getViewportWidth()>=1180&&i&&function(){const t=a?$visibility.getPageOffset(a).top-70:0,e=$visibility.getPageOffset(i).top,r=Math.max(e,t);return Math.max(window.scrollY,document.body.scrollTop)>=r}()?t.classList.add(“deep-scroll”):t.classList.remove(“deep-scroll”)}function V(t){var e=t.currentTarget,i=e.getAttribute(“href”),r=e.getAttribute(“data-handle”),o=$popup.getPopupClass(e.classList),s=$visibility.isBelowPrimaryContent(e)?”bottom”:”top”;$gtm.reportNow({event:”social-share-widget”,clickLocation:s,socialNetwork:o}),reportSocial(o),$visibility.getViewportWidth()>=768&&o&&(t.preventDefault(),$popup.popWindow(o,r,i))}!function(){const e=_throttle(P,30);if(k(),dom.findAll(t,”.share-link”).forEach(t=>t.addEventListener(“click”,V)),y&&(y.href=”http://www.facebook.com/sharer/sharer.php?u=”+f+”?utm_source=fb&utm_medium=s3&utm_campaign=sharebutton-t”),w&&(w.href=”https://twitter.com/share?text=”+encodeURIComponent(h)+”&url=”+f+”?utm_source=tw&utm_medium=s3&utm_campaign=sharebutton-t&via=”+w.getAttribute(“data-handle”)),v&&(v.href=”http://pinterest.com/pin/create/button/?url=”+f+”?utm_source=pin&utm_medium=s3&utm_campaign=sharebutton-t&description=”+encodeURIComponent(h)+”&media=”+g),b)return;auth0.on(“init”,()=>{auth0.isSubscriber()&&t.classList.add(“subscribed”)}),window.addEventListener(“scroll”,e),window.addEventListener(“resize”,S),window.addEventListener(“resize”,k),l?l.classList.contains(“rubric-sponsor-story”)&&s?(o.classList.remove(“visible”),s.classList.add(“visible”),s.textContent=l.text||l.textContent):(o.textContent=l.text||l.textContent,o.href=l.href||”#”):(n.style.display=”none”,o.style.display=”none”);S(),r.textContent=h}()});
}, {“3″:3,”4″:4,”5″:5,”7″:7,”53″:53,”68″:68,”69”:69}];
window.modules[“nav-search-button.client”] = [function(require,module,exports){“use strict”;const dom=require(4),$gtm=require(3),{reportSearch:reportSearch}=require(69),openClass=”open”,closeClass=”closed”;module.exports=(e=>{const s=e,t=dom.find(e,”.nav-search-button-trigger”),n=dom.find(e,”.nav-search-form”),o=dom.find(e,”.search-input”);function i(){const e=dom.find(“body”);s.classList.toggle(closeClass),s.classList.toggle(openClass),e.classList.toggle(“disabled”),e.classList.toggle(“search-active”)}function c(){i(),s.classList.contains(openClass)&&o.focus()}function a(e){!s.contains(e.target)&&s.classList.contains(openClass)&&i()}function r(e){27===e.keyCode&&s.classList.contains(openClass)&&i()}function d(e){e.preventDefault(),$gtm.reportCustomEvent({category:”search”,label:”on=”+window.location.href,action:o.value}),reportSearch((o.value||””).split(” “),()=>n.submit())}!function(e,s,t){s&&s.addEventListener(“click”,c);t&&t.addEventListener(“submit”,d);e.addEventListener(“click”,a),document.addEventListener(“keydown”,r),e.addEventListener(“touchend”,a),n.addEventListener(“submit”,d)}(dom.find(“body”),t,dom.find(e,”.nav-search-form submit”))});
}, {“3″:3,”4″:4,”69”:69}];
window.modules[“nav-dropdown-button.client”] = [function(require,module,exports){“use strict”;const dom=require(4),visibility=require(5),{reportSearch:reportSearch}=require(69);function getNextSiblings(e){const t=[];let i=e;for(;i=i.nextElementSibling;)t.push(i);return t}function getMainChildren(e,t){let i=[],n=e.firstChild;for(;n=n.nextElementSibling;)n.contains(t)?n.isSameNode(t)||(i=i.concat(getMainChildren(n,t))):i.push(n);return i}function isMobile(){return visibility.getViewportWidth(){let t;const i=e.querySelector(“.nav-dropdown-button-trigger”),n=dom.find(“body”),o=dom.find(“.top”),l=dom.find(“.confetti-list”),s=dom.find(“.nav-dropdown-button_nymag-homepage”),r=dom.find(“header.page-header”)||o,c=dom.find(‘[data-editable=”main”]’),a=dom.closest(e,”.page-header”),d=a?a.querySelectorAll(“.confetti-image.blue”):””,g=a?a.querySelectorAll(“.confetti-image.green”):””,u=a?a.querySelectorAll(“.confetti-image.orange”):””,f=a?a.querySelectorAll(“.confetti-image.orange2″):””,m=a?a.querySelectorAll(“.confetti-image.pink”):””,p=a?a.querySelectorAll(“.confetti-image.purple”):””,h=a?a.querySelectorAll(“.confetti-image.yellow”):””,y=e.querySelectorAll(“.dropdown-nav-search-form”);function b(e){let t=e.currentTarget,i=t.querySelector(“.nav-search-input”),n=i?i.value.split(” “):[];e.preventDefault(),reportSearch(n,()=>t.submit())}i.addEventListener(“click”,()=>{initializeHeight(e),v()});for(let e=0,t=y.length;e(function(e){e.classList.remove(“c-right”,”c-rightdown”,”c-left”,”c-leftdown”)})(e))},500)}()):(i.setAttribute(“aria-expanded”,”true”),t=window.scrollY),e.classList.toggle(“closed”),e.classList.toggle(“open”),n.classList.toggle(“disabled”),a&&e.isSameNode(s)?function(){if(o.contains(e)){const e=getMainChildren(o,s);S(e),w(o)}if(c.contains(e)){const e=getMainChildren(c,s);o.classList.toggle(“hidden-component”),w(c),S(e)}e.classList.toggle(“open-mobile”)}():a&&!y&&r&&(w(r),function(){const i=e.classList.contains(“open”)?0:t;window.scrollTo({top:i})}())}function w(e){S(getNextSiblings(e))}function S(e){e.forEach(e=>{e.classList.toggle(“hidden-component”)})}n.addEventListener(“click”,t=>{!e.contains(t.target)&&e.classList.contains(“open”)&&v()}),document.addEventListener(“keydown”,t=>{27===t.keyCode&&e.classList.contains(“open”)&&v()})});
}, {“4″:4,”5″:5,”69”:69}];
window.modules[“follow.client”] = [function(require,module,exports){“use strict”;const _find=require(59),$popup=require(68);DS.controller(“follow”,[function(){function e(e){this.el=e,this.handle=e.getAttribute(“data-handle”)}return e.prototype={events:{click:”openFollow”},openFollow:function(e){var t,n,a=$popup.position,o=$popup.params,l={},r={w:780,h:500},s=new a(r.w,r.h),c=this.el.classList;l.handle=this.handle,r.left=s.left,r.top=s.top,n=_find([{className:”facebook”,url:”https://facebook.com/{handle}”,network:”Facebook”},{className:”pinterest”,url:”http://www.pinterest.com/{handle}”,network:”Pinterest”},{className:”instagram”,url:”https://www.instagram.com/{handle}”,network:”Instagram”},{className:”rss”,url:”http://feeds.feedburner.com/{handle}”,network:”RSS”},{className:”twitter”,url:”https://twitter.com/intent/follow?screen_name={handle}&tw_p=followbutton&variant=2.0″,network:”Twitter”},{className:”snapchat”,url:”https://www.snapchat.com/discover/{handle}”,network:”Snapchat”}],function(e){return c.contains(e.className)}),l.url=n.url.replace(“{handle}”,l.handle),l.network=n.network,l.name=”Follow “+l.handle+” on “+l.network,t=new o(l,r),window.open(t.address,t.name,t.features),e.preventDefault()}},e}]);
}, {“59″:59,”68”:68}];
window.modules[“comments-link.client”] = [function(require,module,exports){“use strict”;const dom=require(4),_get=require(9),_isFinite=require(125),ajax=require(124);DS.controller(“comments-link”,[function(){var t,e=”http://”+document.documentElement.getAttribute(“data-uri”)+”.html”;function n(n){var o;(this.el=n,this.coral_talk_root=n.getAttribute(“data-coral-talk”),this.commentsCount=dom.find(n,”.comments-link-count”),this.commentsText=dom.find(n,”.comments-link-text”),this.isNavVariation=n.classList.contains(“comments-link_article-nav”),this.cutoffCnt=n.getAttribute(“data-cutoffCnt”)||1e3,t=`${this.coral_talk_root}/api/v1/graph/ql`,this.shouldRenderCommentStream())&&(o=this.onCommentCountFetched.bind(this),ajax.sendReceiveJson({method:”GET”,url:t+’?query={asset(url:”‘+e+'”){totalCommentCount}}’,dataType:”json”},function(t,e){var n=_get(e,”data.asset.totalCommentCount”,0);return t?o(t):_isFinite(n)?void o(null,n):o(“Unexpected Coral-Talk response”)}))}return n.prototype.onCommentCountFetched=function(t,e){if(t)return console.warn(t);e>0&&(this.isNavVariation&&e1?”s”:””),this.el.classList.remove(“no-comments”))},n.prototype.shouldRenderCommentStream=function(){return-1!==e.indexOf(“@published”)},n}]);
}, {“4″:4,”9″:9,”124″:124,”125”:125}];
window.modules[“head-gtm.client”] = [function(require,module,exports){“use strict”;const{getCLS:getCLS,getFID:getFID,getLCP:getLCP}=require(157),isProduction=require(8)();function reportWebVitals(e){isProduction||console.log(“reportWebVitals: %O”,e);const t=”string”==typeof e.name?e.name.toUpperCase():e.name;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:”analyticsEvent”,event_action:t,event_category:”Web Vitals”,event_label:e.id,event_value:e.delta,eventAction:t,eventCategory:”Web Vitals”,eventLabel:e.id,eventNonInt:!0,eventValue:e.delta,nonInteraction:!0,transport:”beacon”})}getCLS(e=>{e.delta=Math.round(1e3*e.delta),reportWebVitals(e)}),getFID(e=>{e.delta=Math.round(e.delta),reportWebVitals(e)}),getLCP(e=>{e.delta=Math.round(e.delta),reportWebVitals(e)});
}, {“8″:8,”157”:157}];
window.modules[“concert-ads.client”] = [function(require,module,exports){“use strict”;const customMappings={“crime-assault”:”Power”,”career money productivity”:”Power”,”feminism-politics-identity”:”Power”,”culture-media”:”Culture”,celebrity:”Culture”,living:”Style”,fashion:”Style”,shopping:”Style”,weddings:”Style”,beauty:”Style”,animals:”Self”,”learning creativity”:”Self”,”relationships-friends family”:”Self”,”mental health personality social behavior”:”Self”,”learning creativity”:”Self”,”health-wellness”:”Self”,parenting:”Self”,”relationships-sex dating marriage”:”Self”},striptags=require(70);function installConcertAds(){const e=new URLSearchParams(window.location.search).get(“concert_config_url”),t=e||window.concertConfigUrl;window._nymPermutive||console.warn(“ConcertAds initializing without Permutive”),window.concertAds=createConcertAds(),window.concertAds.loadRemoteConfig(t).then(function(){window.concertAds.install()})}function createConcertAds(){const e=getAuthStatus();let t=getData(“title”),n=window.location.href,i=getData(“section”),o=””,a=getData(“type”),r=getData(“vertical”);t&&(t=striptags(htmlDecode(t)).split(” “)),n=n.slice(n.lastIndexOf(“/”)+1);const l={kw:getKeywords(),network:r,page_type:a,entry_group:i,keywords:t,pn:n};return”Homepage”===a?o=”homepage”:”Section Page”===a&&(o=(o=window.location.pathname).replace(///g,””)),i&&-1===i.indexOf(” “)&&(o=i),customMappings[i]&&(o=customMappings[i]),window.location.hostname.match(/.aws./i)&&(l.clay_sandbox_env=r),new window.ConcertAds({cmd:[],slots:[],dfpVariables:l,slugPath:”/”+o.replace(/—|–/g,”-“),loggedIn:”unauthenticated”!==e,paywallActive:getPaywallStatus(e)})}function getKeywords(){try{const e=window._nymPermutive.article.keywords;return e&&e.length>0&&e.some(Boolean)?e:(document.querySelector(‘meta[name=”keywords”]’)||document.querySelector(‘meta[property=”article:tag”]’)).getAttribute(“content”).split(“,”).map(function(e){return e.trim()})}catch(e){return}}function getData(e){if(window._nymPermutive){if(e in window._nymPermutive)return window._nymPermutive[e];if(window._nymPermutive.article&&e in window._nymPermutive.article)return window._nymPermutive.article[e];if(window._nymPermutive.user&&e in window._nymPermutive.user)return window._nymPermutive.user[e]}}function htmlDecode(e){var t=document.createElement(“div”);return t.innerHTML=e,0===t.childNodes.length?””:t.childNodes[0].nodeValue}function getAuthStatus(){const e=JSON.parse(localStorage.getItem(“auth0:profile”)),t=e?e[“http://nymag.com/app_metadata”]:null;return t?t.has_subscription?”entitled”:”unentitled”:”unauthenticated”}function getPaywallStatus(e){const t=getData(“totalCount”)||0;return Boolean(t>=3&&”entitled”!==e)}window.ConcertAds?installConcertAds():window.addEventListener(“concertAdsReady”,installConcertAds);
}, {“70”:70}];
window.modules[“latest-news.client”] = [function(require,module,exports){“use strict”;const dom=require(4),lazyLoad=require(111);function lazyLoadImage(a){const o=dom.find(a,”img[data-src]”),d=dom.findAll(a,”source[data-srcset]”),e=dom.closest(a,”.result”);if(o&&e){new lazyLoad.LazyLoader(e,o,d).init()}}function handleLazyLoad(a){(dom.findAll(a,”.result”)||[]).forEach(lazyLoadImage)}module.exports=(a=>{handleLazyLoad(a)});
}, {“4″:4,”111”:111}];
window.modules[“choreographer.client”] = [function(require,module,exports){“use strict”;const cookie=require(57),_get=require(9),_omit=require(89),{insertSpeedBumpComponents:insertSpeedBumpComponents}=require(94),{insertNewsletterSpeedBumpComponents:insertNewsletterSpeedBumpComponents}=require(93),{generateGrowl:generateGrowl}=require(92),gtm=require(3),{getLocalStorage:getLocalStorage,setLocalStorage:setLocalStorage}=require(37),{reportPaywall:reportPaywall}=require(69),moment=require(42),{getClientHistory:getClientHistory,updateClientHistoryWithPageData:updateClientHistoryWithPageData}=require(95),auth0=require(7),{Scenario:Scenario}=require(90),cidReadyEvent=”nymcid-set”,cidKey=”nymcid”,isProduction=require(8)(),logger=require(88).Logger(()=>getLocalStorage(“show_choreographer_logs”)),{Verdon:Verdon}=require(91),TEST_COHORT_FLAG=”optimizeCohort”;function displayDebug(e=””){if(“entitlement”!==e.split(“#”).pop())return;const t=_get(window,”dataLayer[0].userDetails”,{}),o=_get(window,”dataLayer[0].pageDetails.featureTypes”,””),n=o.includes(“magazine”)?”magazine”:””,r=o.includes(“feature”)?”featured”:””,i=”Value of Article: “+(n||r||”article”),a=_get(JSON.parse(localStorage.getItem(“auth0:profile”)),”http://nymag.com/app_metadata”),l=”Authentication Status: “+(a?”authenticated”:”unauthenticated”),s=”Entitlement Status: “+(!!a&&a.has_subscription?”entitled”:”unentitled”),c=Object.keys(_omit(t,”newYorkMediaUserID”)).map(e=>`${e}: ${t[e]}`),d=document.body,g=document.createElement(“div”),u=document.createElement(“ul”);[i,l,s,…c].map(e=>{const t=document.createElement(“li”);return t.classList.add(“debug-item”),t.appendChild(document.createTextNode(e)),t}).forEach(e=>{u.appendChild(e)}),u.classList.add(“data-bullets”),g.classList.add(“debug-choreographer”),g.classList.add(“display-debug-data”),g.appendChild(u),d.appendChild(g)}function initializeChoreographer(e){const t=e.getAttribute(“data-site-slug”),o=pageShouldCountAsView(t),n=auth0.isSubscriber();return t?getClientId(cidKey,8e3).then(e=>(logger.h1(“Choreographer initialized”),logger.log(`clientId: ${e}`),logger.log(`page counts as a view: ${o}`),window.nymViewsResponse||(o?updateClientHistoryWithPageData(e,t):getClientHistory(e)))).then(r=>{if(logger.group(),logger.h2(“Client history”),logger.table(r),logger.groupEnd(),isNCR())return;const{scenarios:i,touts:a,testCohort:l=””}=readJSONFromScript(e.querySelector(“script”));if(!(l===(document.body.dataset[TEST_COHORT_FLAG]||””)))return;const s=i.map(e=>Scenario(Object.assign({},e,{history:r,siteSlug:t,isSubscriber:n}))).filter(e=>(logger.group(),logger.h2(“Evaluating scenarios”),logger.log(e),logger.groupEnd(),e.shouldShow)).reduce((e,{action:t,min:o,count:n})=>{const r=a.find(({value:e})=>e===t);return r?(e[r.type]=r,e[r.type].viewCount=n-o,e):e},{});logger.group(),logger.h2(“Active Touts”),logger.log(s),logger.groupEnd(),executeTouts(e,o,s,r)}).catch(console.error):console.error(“siteSlug not found.”)}function documentIncludesComponent(e){return document.querySelector(`[data-uri*=”/${e}/”]`)}function pageShouldCountAsView(e){const t=”strategist”===e,o=[“product”,”product-grid”].find(e=>documentIncludesComponent(e));return t||!o}function executeTouts(e,t,o={},n){const{global:r}=n,i={featureArticleCount:r.Feature||0,magazineArticleCount:r.Magazine||0,standardArticleCount:r.Article||0,totalArticleCount:r.total||0},a=window.concertAds,l=window.ConcertAds;if(o[“speed-bump”]&&(_get(a,”adsBlocked”,!0)?insertSpeedBumpComponents(findTemplate(e,”speed-bump”),o[“speed-bump”],i):a.lifecycle.listenAndPlayback(l.events.slotsInserted,()=>{insertSpeedBumpComponents(findTemplate(e,”speed-bump”),o[“speed-bump”],i)})),o[“newsletter-speed-bump”]&&(_get(a,”adsBlocked”,!0)?insertNewsletterSpeedBumpComponents(findTemplate(e,”newsletter-speed-bump”),o[“newsletter-speed-bump”],i):a.lifecycle.listenAndPlayback(l.events.slotsInserted,()=>{insertNewsletterSpeedBumpComponents(findTemplate(e,”newsletter-speed-bump”),o[“newsletter-speed-bump”],i)})),o[“branded-growl”]&&brandedTakeoverTime(o[“branded-growl”])&&t)return logger.log(“should show branded growl”),void growlManager(findTemplate(e,”branded-growl”),{baseTrackingData:i,body:o[“branded-growl”].brandedGrowlBody,contentClass:”branded-content”,cta:o[“branded-growl”].brandedGrowlCTA,imageUrl:o[“branded-growl”].imageUrl,link:o[“branded-growl”].brandedGrowlLink,name:o[“branded-growl”].name,scrollDepth:o[“branded-growl”].brandedGrowlScrollDepth,title:o[“branded-growl”].brandedGrowlTitle,toutType:”branded growl”},”#branded-growl”);if(t&&o[“content-cliff”])contentCliff(findTemplate(e,”content-cliff”),o[“content-cliff”],o[“content-cliff”].viewsLeft,n);else{if(t&&o[“cliff-takeover”])return/coronavirus news|pivot|paywall exclude/i.test(window._nymGtmPage.tags)?void(isProduction&&logger.log(“Content cliff no-op due to excluded tag match: “,window._nymGtmPage.tags)):void cliffTakeover(findTemplate(e,”paywall-reader-interface”),i,o[“cliff-takeover”]);if(o[“growl-newletter”]||!o[“promo-growl”])if(o[“baby-growl”])babyGrowl(findTemplate(e,”paywall-reader-interface”),i,o[“baby-growl”]);else{if(!o[“warning-growl-2”])return o[“warning-growl”]&&shouldWarn()?(setContentCliffWarningDisplayed(),logger.log(“should show warning”),void growlManager(findTemplate(e,”warning-growl”),{contentClass:”warning-content”,title:o[“warning-growl”].warningGrowlTitle,name:o[“warning-growl”].name,scrollDepth:o[“warning-growl”].warningGrowlScrollDepth,cta:o[“warning-growl”].warningGrowlCTA,body:o[“warning-growl”].warningGrowlBody,link:o[“warning-growl”].warningGrowlLink,baseTrackingData:i,toutType:”warning growl”},”#warning-growl”)):void 0;warningGrowl(findTemplate(e,”paywall-reader-interface”),i,o[“warning-growl-2″])}else growlManager(findTemplate(e,”growl-message”),{contentClass:”promo-content”,title:void 0,name:o[“promo-growl”].name,scrollDepth:o[“promo-growl”].promoGrowlScrollDepth,cta:o[“promo-growl”].promoGrowlCTA,body:o[“promo-growl”].promoGrowlMessage,link:o[“promo-growl”].promoGrowlLink,baseTrackingData:i,toutType:”promo growl”},”#growl-message”)}}function shouldWarn(){return!contentCliffWarningDisplayed()}function getContentCliffWarningDisplayedKey(){const e=new Date,t=e.getMonth();return`content-cliff-warning-displayed-${e.getFullYear()}-${t}`}function contentCliffWarningDisplayed(){const e=getContentCliffWarningDisplayedKey();return”true”===getLocalStorage(e)}function setContentCliffWarningDisplayed(){const e=getContentCliffWarningDisplayedKey();return setLocalStorage(e,”true”)}function growlManager(e,{contentClass:t,scrollDepth:o,name:n,title:r,body:i,cta:a,link:l,baseTrackingData:s,toutType:c,imageUrl:d=null},g=””){const u=function(){const e=`n n `;return document.createRange().createContextualFragment(e)}(),p={creative:i,id:c,name:n,position:”growl”};u.querySelector(“a”).addEventListener(“click”,()=>promotionReport(“Click”,s,p)),generateGrowl(e,g,{content:u,scrollDepth:o,onShow:()=>promotionReport(“View”,s,p)})}function contentCliff(e,t,o,n){const{first_visit:r,global:i}=n,a={totalArticleCount:i.total||0,standardArticleCount:i.Article||0,featureArticleCount:i.Feature||0,magazineArticleCount:i.Magazine||0},{contentCliffBody:l}=t,s=document.importNode(e,!0).querySelector(“.content-cliff”),c=document.querySelector(“.article-content > .clay-paragraph”),d={creative:l,id:”content cliff”,name:”Content Cliff”,position:”in-article”};s&&(c.insertAdjacentHTML(“afterend”,s.outerHTML),require(“content-cliff.client”)(document.querySelector(“.content-cliff”),{contentCliffOptions:t,viewsLeft:o,firstVisit:Number(r),onShow:()=>promotionReport(“View”,a,d),onClickCliff:()=>promotionReport(“Click”,a,d)}))}function verdonFosseToutSetter(e,t,o,n,r){const i=new Verdon({container:”.paywall-reader-interface”,url:”https://fosse.nymag.com/fosse/v1.6.1/index.html”}),a=e.type,l={email:auth0.getEmail(),isAuthenticated:auth0.isAuthenticated(),isSubscriber:auth0.isSubscriber()};n.classList.add(a),i.once(“frame:ready”,()=>{i.sendMessage(“tout:show”,{readerState:l,toutType:a,toutData:e}),r&&i.sendMessage(“frame:height”)}),i.on(“tout:visible”,()=>{promotionReport(“View”,t,o)}),i.on(“tout:sign-in”,()=>{auth0.showLogin(window.location.href)}),i.on(“tout:log-out”,()=>{auth0.logout()}),i.on(“tout:dismiss”,()=>{n.classList.add(“dismiss”),i.sendMessage(“tout:hide”,{toutType:a,toutData:e})}),i.on(“tout:subscribe”,()=>{e.ctaLink=replaceQueryParams(e.ctaLink),promotionReport(“Click”,t,o),window.open(e.ctaLink,”_blank”)}),i.on(“frame:height”,e=>{n.style.height=`${e.payload.currentHeight+10}px`}),i.on(“tout:view-account”,()=>{window.location.href=”https://subs.nymag.com/account”})}function promotionReport(e,t,o){const{creative:n,id:r,name:i,position:a}=o;t.event=`eec.promotion${e}`,t.ecommerce={promoView:{promotions:[{creative:n.trim(),id:r,name:i,position:a}]}},gtm.reportNow(t),reportPaywall({creative:n.trim(),eventType:e,id:r,name:i,position:a})}function babyGrowl(e,t,o){const n=document.importNode(e,!0).querySelector(“.paywall-reader-interface”),r={creative:o.babygrowlDescription,id:”baby growl”,name:”baby growl”,position:”growl”};document.body.appendChild(n),o.ctaLink=o.babygrowlCtaLink,o.ctaText=o.babygrowlMessage,o.headline=o.babygrowlDescription,verdonFosseToutSetter(o,t,r,n)}function cliffTakeover(e,t,o){const{cliffTakeoverCTA:n,cliffTakeoverCtaLink:r,cliffTakeoverDescription:i,cliffTakeoverImage:a,cliffTakeoverPromo:l,cliffTakeoverStatus:s,type:c}=o,d=document.importNode(e,!0).querySelector(“.paywall-reader-interface”),g=document.querySelectorAll(“.clay-paragraph”),u={creative:l,id:”content cliff”,name:”Content Cliff”,position:”growl”},p={cta:n,ctaLink:r,description:i,image:a,promo:l,status:s,type:c};document.body.appendChild(d),g.forEach((e,t)=>{0!==t&&e.remove()}),verdonFosseToutSetter(p,t,u,d,!0),document.querySelector(“html”).style.overflowY=”hidden”,document.body.style.position=”fixed”}function warningGrowl(e,t,o){const{type:n,warningGrowl2CTA:r,warningGrowl2CtaLink:i,warningGrowl2Description:a,warningGrowl2Image:l,warningGrowl2Promo:s,warningGrowl2Status:c}=o,d=document.importNode(e,!0).querySelector(“.paywall-reader-interface”),g={creative:s,id:”warning growl”,name:”Warning Growl”,position:”growl”},u={cta:r,ctaLink:i,description:a,image:l,promo:s,status:c,type:n};document.body.appendChild(d),verdonFosseToutSetter(u,t,g,d,!0)}function getClientId(e=””,t=8e3){let o=cookie.get(e);return o?Promise.resolve(o):new Promise((o,n)=>{const r=setTimeout(()=>{n(`could not find key: ${e} on cookie after ${t}ms`)},t);window.addEventListener(cidReadyEvent,()=>{clearTimeout(r),o(cookie.get(e))})})}function readJSONFromScript(e){try{return JSON.parse(e.innerHTML)}catch(e){return{touts:[],scenarios:[]}}}function findTemplate(e,t=””){const o=e&&e.querySelector(`[data-template-id=”${t}”]`);return o&&o.content}function isNCR(){return/[?&]source=ncr/.test(location.search)}function brandedTakeoverTime(e){const{startTime:t,endTime:o,startDate:n,endDate:r}=e,i=n.concat(” “,t),a=r.concat(” “,o),l=moment(i),s=moment(a);return moment().isBetween(l,s)}function optimizeDebugger(){return new Promise(e=>{const t=window.location.search||””;if(t){const o=new URLSearchParams(t),n=o.get(“optimize-attribute-name”)||””,r=o.get(“optimize-attribute-value”)||””,i=o.get(“optimize-delay”)||0,a=o.get(“optimize-cookie”)||!1;setTimeout(()=>{a&&(document.cookie=randomNymcid()),document.body.setAttribute(`data-${n}`,r),e()},i)}else e()})}function randomNymcid(){return`nymcid=${(()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^16*crypto.getRandomValues(new Uint8Array(1))[0]>>e/4).toString(16)[0]))()}`}function replaceQueryParams(e){const t=window.location.search||””;if(t){const o=new URLSearchParams(t);if(e.includes(“?”)){const t=e.split(“?”),n=new URLSearchParams(t[1]);for(let e of o.entries())n.set(e[0],e[1]);e=`${t[0]}?${n.toString()}`}else e=`${e}?${o.toString()}`}return e}module.exports=(e=>new Promise(e=>{auth0.on(“init”,()=>{e()})}).then(()=>optimizeDebugger()).then(()=>{displayDebug(window.location.href),initializeChoreographer(e)}));
}, {“3″:3,”7″:7,”8″:8,”9″:9,”37″:37,”42″:42,”57″:57,”69″:69,”88″:88,”89″:89,”90″:90,”91″:91,”92″:92,”93″:93,”94″:94,”95″:95,”content-cliff.client”:”content-cliff.client”}];
window.modules[“growl.client”] = [function(require,module,exports){“use strict”;require(155);const _some=require(78),dom=require(4),localStorageKeyRoot=”slideout-“,{getLocalStorage:getLocalStorage,setLocalStorage:setLocalStorage}=require(37);module.exports=((e,t)=>{const{content:o,onShow:s,scrollDepth:r=50,dismissable:i=!1}=t,n=Number(r||e.getAttribute(“data-display-at-page-scroll-percentage”)),a=dom.find(e,”.modal”),l=”slideout-“+(t.id||e.getAttribute(“id”)),c=getLocalStorage(l);function d(){a.classList.add(“hidden”)}function g(){setLocalStorage(l,!0),d()}i&&c?e.remove():(o&&e.querySelector(“[data-content]”).appendChild(o),n&&function(e=50){const t=new IntersectionObserver(e=>{_some(e,”isIntersecting”)&&(a.style.top=”inherit”,a.classList.remove(“hidden”,”initial”),”function”==typeof s&&s(),t.unobserve(a))});a.style.top=`${document.querySelector(“body”).scrollHeight/(100/e)}px`,t.observe(a)}(n),e.querySelector(“.dismiss-modal”).addEventListener(“click”,()=>i?g():d()),e.addEventListener(“growl:hide”,d),e.addEventListener(“growl:dismiss”,g))});
}, {“4″:4,”37″:37,”78″:78,”155”:155}];
window.modules[“newsletter-speed-bump.client”] = [function(require,module,exports){“use strict”;const{loadRecaptcha:loadRecaptcha}=require(122),_isEmpty=require(103),_set=require(123),_kebabCase=require(96),gtm=require(3),auth0=require(7),visibility=require(5),COMPONENT_NAME=”newsletter-speed-bump”,EMAIL_VALID_REGEX=/^(?:(?:[^()[]\.,;: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,}))$/,LOCAL_STORAGE_KEY_NAME=”newsletterSpeedBumpSignUpStatus_”,MAX_EMAIL_LENGTH=50;function setClass(e,t){e.classList.add(t)}function getRequestUrl(e){return e.getAttribute(“action”)}function getPageType(e){const t=e?e.getAttribute(“content”):””;return _kebabCase(t)}function getPayloadObject(e,t,r,s){const n={};return _set(n,`vars.source_${t}`,`${COMPONENT_NAME}_${s}`),n.email=r,n.lists={},n.lists[t]=!0,n.recaptcha=e,n.signuppage=`${document.location.href}_${t}`,n[`source_${t}`]=”newsleter_speedbump”,n}module.exports=((e,t)=>{if(!t||!e)return;if(“success”===window.localStorage.getItem(`${LOCAL_STORAGE_KEY_NAME}${t.newsletterSpeedBumpNewsletterId}`))return void e.remove();const{baseTrackingData:r,name:s,newsletterSpeedBumpCtaCopy:n,newsletterSpeedBumpDescription:i,newsletterSpeedBumpHeadline:a,newsletterSpeedBumpNewsletterId:o,newsletterSpeedBumpThankYouMessage:c,RECAPTCHA_PUBLIC_KEY:l}=t,u=auth0.getEmail(),d=e.querySelector(“.description”),p=e.querySelector(“.input.email”),m=e.querySelector(“.error-message”),h=e.querySelector(“.form”),E=e.querySelector(“.form-container”),y=e.querySelector(“.form-recaptcha-container”),g=e.querySelector(“.headline”),v=e.querySelector(“.container”),S=e.querySelector(“.input.newsletterId”),_=e.querySelector(“.recaptcha-wrapper”),L=e.querySelector(“.input.submit”),w=e.querySelector(“.text-container”),q=new visibility.Visible(e,{shownThreshold:.5});u&&(p.removeAttribute(“required”),e.classList.add(“signed-in”)),d.innerHTML=i,g.innerHTML=a,S.value=o,L.value=n,q.on(“shown”,function(){if(visibility.isElementNotHidden(e)){const e=r;e.event=”eec.promotionView”,e.ecommerce={promoView:{promotions:[{creative:`${a} | ${i}`,id:”newsletter speed bump”,name:s,position:”in-article”}]}},gtm.reportNow(e),q.destroy()}}),p.addEventListener(“focus”,()=>{_.classList.remove(“hidden”)}),h.addEventListener(“submit”,t=>{t.preventDefault();const s=new XMLHttpRequest,n=u||e.querySelector(“.input.email”).value,i=getPageType(document.querySelector(‘meta[name=”type”]’));u||!(n.length>=50)&&EMAIL_VALID_REGEX.test(n)?loadRecaptcha(l,”newsletterSubmit”,!0).then(a=>{s.open(“POST”,getRequestUrl(h),!0),s.setRequestHeader(“Content-Type”,”application/json;charset=UTF-8″),s.addEventListener(“load”,s=>{const a=s.currentTarget||s.target;if(a.status>=200&&a.statussetClass(e,”success”)),[d,E,m,_].forEach(e=>setClass(e,”hidden”)),g.innerHTML=c.replace(“{{email}}”,n),m.innerHTML=””;const s=JSON.parse(a.response),l=_isEmpty(s.sailthruIds)?””:Object.values(s.sailthruIds)[0],u=r;u.event=”eec.purchase”,u.ecommerce={purchase:{actionField:{id:l,revenue:”0.00″},products:[{category:”newsletter signup”,name:S.value,quantity:1,variant:`${COMPONENT_NAME} – ${i}`}]}},gtm.reportNow(u),setTimeout(()=>{e.classList.add(“hidden”)},5e3),t.preventDefault()}else m.innerHTML=”*An error has occurred. Please try again.”}),s.addEventListener(“error”,()=>{m.classList.remove(“hidden”),m.innerHTML=”*An error has occurred. Please try again.”}),s.send(JSON.stringify(getPayloadObject(a,o,n,i))),t.preventDefault()}):m.innerHTML=”*Please enter a valid email”})});
}, {“3″:3,”5″:5,”7″:7,”96″:96,”103″:103,”122″:122,”123”:123}];
window.modules[“speed-bump.client”] = [function(require,module,exports){“use strict”;const gtm=require(3),visibility=require(5);module.exports=((e,i)=>{if(!i||!e)return;const{name:o,speedbumpDescription:r,speedbumpMessage:t,speedbumpLink:n,baseTrackingData:s}=i,c=new visibility.Visible(e,{shownThreshold:.5});e.querySelector(“.description”).innerHTML=r,e.querySelector(“.promo-link”).innerHTML=t,e.querySelector(“.promo-link”).href=n,e.classList.remove(“collapsed”),c.on(“shown”,function(){if(visibility.isElementNotHidden(e)){let e=s;e.event=”eec.promotionView”,e.ecommerce={promoView:{promotions:[{name:o,creative:r,id:”speed bump”,position:”in-article”}]}},gtm.reportNow(e),c.destroy()}}),e.querySelector(“.promo-link”).addEventListener(“click”,function(){let e=s;e.event=”eec.promotionClick”,e.ecommerce={promoClick:{promotions:[{name:o,creative:r,id:”speed bump”,position:”in-article”}]}},gtm.reportNow(e)})});
}, {“3″:3,”5”:5}];
window.modules[“content-cliff.client”] = [function(require,module,exports){“use strict”;const auth0=require(7),isProduction=require(8)(),logger=require(88).Logger(()=>!isProduction);module.exports=((t,e)=>{if(!e)return;logger.group(),logger.h2(“Content Cliff”);const{contentCliffOptions:o,firstVisit:n,onShow:r,onClickCliff:i}=e,c=300,l=Number(document.querySelector(“[data-components-count]”).getAttribute(“data-components-count”)),u=3,s=[“taboola”],a=”#content-cliff”,f=t,d=function(){let t=0;return document.querySelectorAll(“[data-word-count]”).forEach(function(e){t+=Number(e.getAttribute(“data-word-count”)||0,10)||0}),t}(),g=function(t,e){function o(t){return Math.round(t.getTime()/1e3/60)}const n=o(t),r=o(e);return n-r}(new Date,new Date(n)){},show:()=>{r(),function(){(p=function(t=””){return document.querySelectorAll(`${t} ~ *`)}(a)).forEach(t=>t.remove()),function(){const{contentCliffStatus:e,contentCliffPromo:n,contentCliffCTA:r,contentCliffURL:c}=o,l=t.querySelector(“[data-content-cliff-status]”),u=t.querySelector(“[data-content-cliff-promo]”),s=t.querySelector(“[data-content-cliff-cta]”);s&&s.setAttribute(“href”,c),s&&s.insertAdjacentHTML(“afterbegin”,r),l&&l.insertAdjacentHTML(“afterbegin”,e),u&&u.insertAdjacentHTML(“afterbegin”,n),s&&s.addEventListener(“click”,i)}(),f.classList.remove(“collapsed”),e=s,e.forEach(t=>{const e=document.querySelector(`[data-uri*=”/${t}/”]`);e&&e.remove()}),m.addEventListener(“click”,()=>auth0.showLogin());var e}()}}[function(){if(dl)return logger.log(`article word count ${d} was too short for the cliff`),logger.log(`article components count is smaller than ${u} and not eligible for the cliff`),”noop”;if(g&&isProduction)return”noop”;g&&logger.log(`First session check was ${g}! Showing the cliff anyway: isProduction => ${isProduction}`);if(/coronavirus news|pivot|paywall exclude/i.test(window._nymGtmPage.tags))return isProduction&&logger.log(“Content cliff no-op due to excluded tag match: “,window._nymGtmPage.tags),”noop”;return”show”}()],m=t.querySelector(“.content-cliff-login”);let p=[];return logger.log(`should noop in production due to 30-minute first-session window: ${g}`),logger.groupEnd(),auth0.on(“login”,()=>{f.classList.add(“collapsed”),(p=Array.prototype.slice.call(p,0).reverse()).forEach(t=>f.insertAdjacentElement(“afterend”,t)),p=[]}),”function”==typeof h?h():void 0});
}, {“7″:7,”8″:8,”88”:88}];
window.modules[“coral-talk.client”] = [function(require,module,exports){“use strict”;const dom=require(4),store=require(131),visibility=require(5),auth0=require(7),TALK_AUTH=”talk:auth_token”;let coralEmbed,hasEmbedScriptLoaded=!1,hasCoralTalkRendered=!1;function renderComments(e){if(hasEmbedScriptLoaded&&!hasCoralTalkRendered){const t={talk:`${e.CORAL_TALK_HOST}`,auth_token:getAuthToken(),asset_url:e.TALK_ASSET_URL};hasCoralTalkRendered=!0,coralEmbed=window.Coral.Talk.render(e.commentStreamContainer,t)}}function getAuthToken(e){var t=e&&e[“http://nymag.com/coral_talk”]||auth0.getTalkJwt(),i=store.get(TALK_AUTH);return t?i&&t==i?i:(store.set(TALK_AUTH,t),t):(i&&store.remove(TALK_AUTH),null)}function coralLogin(){coralEmbed.login(getAuthToken())}function embedScript(e,t){let i=document.createElement(“script”);i.type=”text/javascript”,i.async=!0,i.src=e,i.addEventListener(“load”,()=>{hasEmbedScriptLoaded=!0,renderComments(t)}),document.getElementsByTagName(“head”)[0].appendChild(i)}function initVerificationMessage(){auth0.isAuthenticated()&&auth0.refresh();let e=document.querySelector(“.coral-talk-container”);auth0.isAuthenticated()&&!auth0.isEmailVerified()&&(e.insertAdjacentHTML(“beforebegin”,’n
n Please verify your account to enable commenting. Didn’t receive a verification email? Re-send email now.n
‘),document.querySelector(“.activation-link”).addEventListener(“click”,sendVerificationEmail))}function sendVerificationEmail(){let e=document.querySelector(“.coral-talk-verify-address”);return fetch(`https://${window.location.host}/_user/verification-email?user_id=${auth0.getUserID()}`,{method:”GET”,headers:{“Content-Type”:”application/json”}}).then(e=>e).then(t=>{t&&200==t.status?e.innerHTML=”Verification email was sent successfully”:e.innerHTML=`${t.statusText}`}).catch(e=>console.log(e))}function attemptScriptEmbedding(e,t){initVerificationMessage(),hasEmbedScriptLoaded?renderComments(t):embedScript(t.EMBED_URL,t)}function addVisibilityListener(e,t){new visibility.Visible(e,{preloadThreshold:750}).on(“preload”,()=>attemptScriptEmbedding(e,t))}function removeSignInButton(e){e&&e.parentNode&&dom.removeElement(e)}function init(e){const t=e.getAttribute(“data-coral-talk-host”),i=`${t}/static/embed.js`,n=`http://${document.documentElement.getAttribute(“data-uri”)}.html`,a=”true”===e.getAttribute(“data-maintenance”),o=-1!==n.indexOf(“@published”),r=e.querySelector(“.coral-talk-container”),s=e.querySelector(“.coral-talk-btn-signin”),c={CORAL_TALK_HOST:t,EMBED_URL:i,commentStreamContainer:r,signInButton:s,TALK_ASSET_URL:n};!a&&o&&(auth0.on(“init”,()=>{addVisibilityListener(e,c),s.addEventListener(“click”,()=>auth0.showLogin()),auth0.isAuthenticated()&&removeSignInButton(s)}),auth0.on(“login”,t=>{removeSignInButton(s),getAuthToken(t),visibility.isElementInViewport(e)&&attemptScriptEmbedding(c),hasCoralTalkRendered&&coralLogin()}),auth0.on(“logout”,()=>{store.remove(TALK_AUTH)}))}module.exports=init;
}, {“4″:4,”5″:5,”7″:7,”131”:131}];
window.modules[“ad.client”] = [function(require,module,exports){“use strict”;const _forEach=require(56),_max=require(58),_find=require(59),_includes=require(60),$visibility=require(5),dom=require(4),MAX_MOBILE_RE=/[[0-9]{1,3}-(768|600)/,MAX_TABLET_RE=/[0-9]{3}-(1024|1180)/,DESKTOP_RE=/(1024|1180)-plus/,AD_NAME_SELECTOR='[data-name^=”/4088/”], [data-name^=”/172968584/”]’;var flaggedComponentsOnPage=function(){var e,t=document.querySelector(“.article-content”),n=[];return t&&_forEach([‘.article-sidebar[data-width=”large”]’],function(a){e=t.querySelectorAll(a),_forEach(e,function(e){n.push(e)})}),n}();function getElementsVerticalOverlap(e,t){var n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return!(n.top>a.bottom||n.righta.right)?a.bottom-n.top:0}function getElementsOverlapAmount(e,t){var n,a=[];return _forEach(t,function(t){n=getElementsVerticalOverlap(e,t),a.push(n)}),_max(a)}function getNYMagAdChannel(e){var t=””;switch(e){case”company information”:t=”company”;break;case”new york guides & things to do”:t=”to-do”;break;case”other”:t=e;break;case”sponsored guides”:t=”s-guides”;break;case”urbanist”:t=”urbanist”;break;default:t=””}return t}function appendSectionToDfpAds(){var e,t,n,a=document.querySelector(“meta[property=’og:site_name’]”),o=document.querySelector(“article[data-content-channel]”),i=document.querySelectorAll(AD_NAME_SELECTOR);a&&(e=a.content),o&&(t=o.getAttribute(“data-content-channel”).toLowerCase()),t&&”New York Magazine”===e&&(n=getNYMagAdChannel(t)),n&&appendToAdd(i,n)}function appendPageTypeToDfpAds(){let e=document.querySelector(“.body > div”)||{},t=document.querySelector(“body”)||{},n=e&&e.classList,a=n&&n.length?[…n]:[],o=_find(a,e=>e.includes(“feature”)),i=document.querySelectorAll(AD_NAME_SELECTOR);n&&(o?appendPageNumberPositionToDfpAds(i,”Feature”):n.contains(“lede-gallery-content”)?appendPageNumberPositionToDfpAds(i,”Image_Gallery”):t.classList.contains(“one-column-layout”)?appendPageNumberPositionToDfpAds(i,”One_Column_Article”):n.contains(“article-content”)&&appendPageNumberPositionToDfpAds(i,”Standard_Article”))}function appendPageNumberPositionToDfpAds(e,t){const n=[“528×379″,”1100×200″,”1×1”];let a=e||[],o=dom.find(“.ad-splash”),i=dom.find(“section.wrapper”),r=dom.find(“.secondary”),d=dom.find(“.bottom”),s=dom.find(“.primary”),c={IA:{xsMobile:{normal:1,grid:1},mobile:{normal:1,grid:1},tablet:{normal:1,grid:1},desktop:{normal:1,grid:1}},BA:{xsMobile:{normal:1,grid:1},mobile:{normal:1,grid:1},tablet:{normal:1,grid:1},desktop:{normal:1,grid:1}}};a.forEach(e=>{let a,l=””,u=e.dataset.sizes,m=e.classList.value,p=_find(n,e=>u.includes(e)),g=e.parentElement.classList.contains(“image-gallery-mobile-grid-ad”);if(u&&!p||e.setAttribute(“data-name”,e.getAttribute(“data-name”)+”/”+t),i&&u&&!p){let n,u;if(o&&o.contains(e)?l=”LB”:i&&i.contains(e)?l=”IA”:(r&&r.contains(e)||d&&d.contains(e)||s&&s.contains(e))&&(l=”BA”),c[l]){if(!(u=checkForAdViewport(m)))return;g?(n=c[l][u].grid,c[l][u].grid++):(n=c[l][u].normal,c[l][u].normal++),a=n{e.setAttribute(“data-name”,e.getAttribute(“data-name”)+”/”+t)})}function injectGoogleScripts(){var e=document.createElement(“script”),t=document.createElement(“script”),n=document.createDocumentFragment();e.src=”//www.googletagservices.com/tag/js/gpt.js”,e.async=”async”,t.src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”,t.async=”async”,n.appendChild(e),n.appendChild(t),document.getElementsByTagName(“body”)[0].appendChild(n)}appendSectionToDfpAds(),appendPageTypeToDfpAds(),injectGoogleScripts(),DS.controller(“ad”,[“adService”,function(e){return function(t){var n,a,o,i=t.getAttribute(“data-offload”),r=new $visibility.Visible(t,{preloadThreshold:i?window.innerHeight/4:200}),d=!1;function s(){window.innerWidth>=1180&&t.parentElement.classList.contains(“ad-repeat”)&&flaggedComponentsOnPage.length&&(a=getElementsOverlapAmount(t,flaggedComponentsOnPage),o=parseInt(t.parentElement.getAttribute(“data-gap”),10),t.style.marginTop=o+30+a+”px”)}function c(){s(),e.refresh(n)}function l(){e.remove(n),d||(d=!0,r.on(“shown”,c))}document.querySelector(‘script[data-name=”concert-ads”]’)||(n=e.create(t),r.preload&&$visibility.isElementNotHidden(t)?(e.addToPageLoadQueue(n),i&&r.on(“hidden”,l)):(r.on(“preload”,function(){!n.slot&&$visibility.isElementNotHidden(t)&&(s(),e.load(n))}),i&&r.on(“hidden”,l)),this.adData=n)}}]);
}, {“4″:4,”5″:5,”56″:56,”58″:58,”59″:59,”60”:60}];
window.modules[“sticky-list.client”] = [function(require,module,exports){“use strict”;const dom=require(4),$gtm=require(3),_get=require(9),stickyContainer=require(“sticky-container.client”);DS.controller(“sticky-list”,[“$window”,function(t){var e=require(233),i=40;function s(s){let n,r=function(t){let s=t[0],n=0,r=e.height(this.contentArea),h=this.contentArea.offsetHeight;if(this.containers&&this.containers.length){if(s.target.offsetHeight){let t=this.breakouts.findIndex(t=>(function(t,e){return t!==document.body&&t.contains(e)})(t,s.target.parentElement));if(t>-1&&this.breakouts[t]){let e=this.breakouts[t].offsetHeight+i;this.containers[t].style.marginBottom=`${e}px`}}if(h!==this.currentHeigh){const t=e.rect(this.rightRail,this.contentArea);this.currentHeight=h,this.rightRail.style.height=r-t.top-a(this.rightRail)+”px”,this.breakouts.forEach((s,r)=>{let a=e.rect(s,this.contentArea),h=e.intersection(a,t);if(h){let e,s=h.top-t.top-n;n+=s+h.height+i,this.containers[r].style.height=`${s}px`,this.containers[r].style.minHeight=`${s}px`,e=this.breakouts[r].offsetHeight+i,this.containers[r].style.marginBottom=`${e}px`}})}}}.bind(this);t.innerWidth{let n=_get(e,”dataset.name”,””),r=n.slice(-1)||”1″,a=[“Image_Gallery”,”Standard_Article”,”Feature”,”One_Column_Article”].find(t=>n.includes(t))||””;this.rightRail.parentElement.classList.contains(“tertiary”)&&a&&(e.dataset.name=parseInt(i,10)+se===t)||0;return i.slice(s+1).reduce((t,e)=>t+(e.offsetHeight||0),0)||0}return s.prototype={setPins:function(){const t=e.rect(this.rightRail,this.contentArea),i=e.height(this.contentArea),s=i-t.top-a(this.rightRail);let n,h,o,l;if(this.populatePinsList(),s1&&t.classList.add(“multi-children”),l=0;l{const t=Array.from(e.children);let o,a,i=0;for(;i{handleLazyLoad(a)});
}, {“4″:4,”111”:111}];
window.modules[“article.client”] = [function(require,module,exports){“use strict”;const $visibility=require(5),$gtm=require(3),ImageZoom=require(72),$sentry=require(73);DS.controller(“article”,[function(){var e=40;function t(t){const i=document.querySelector(“.wrapper > .tertiary”),n=t.querySelector(“.lede-image-wrapper.full-bleed”),r=t.querySelector(“.attribution.full-bleed”),o=t.querySelector(“.article-header”),l=o?o.querySelector(“img”):null,c=function(){let t=o.getBoundingClientRect().height;n&&(t=n.getBoundingClientRect().height+25,r&&(t+=r.getBoundingClientRect().height)),i.style.paddingTop=t+e+”px”};i&&o&&(window.innerWidtht(e)),$sentry.initializeIDListeners()}}]);
}, {“3″:3,”5″:5,”72″:72,”73”:73}];
window.modules[“tags.client”] = [function(require,module,exports){“use strict”;const _forEach=require(56);DS.controller(“tags”,[function(){function e(e){this.el=e}return e.prototype={events:{“a.more click”:”showAll”},showAll:function(e){var t=e.target,o=this.el.querySelectorAll(“li.hidden”);_forEach(o,function(e){e.classList.remove(“hidden”)}),t.parentNode.removeChild(t),e.preventDefault()}},e}]);
}, {“56”:56}];
window.modules[“video.client”] = [function(require,module,exports){“use strict”;const $visibility=require(5),thirdParty=require(110);function replaceRight(i,e,n){var t=i.lastIndexOf(e);return-1===t?i:i.substring(0,t)+n+i.substring(t+e.length)}DS.controller(“video”,[function(){var i=.05,e=document.querySelectorAll(“.video-component”).length>=3;function n(i){var e=i.innerHTML;e=replaceRight(e=e.replace(“x3c!–“,””),”–x3e”,””),i.innerHTML=e}return thirdParty.includeScript(“https://www.youtube.com/iframe_api”),function(t){e?function(e){var t=new $visibility.Visible(e,{shownThreshold:i});t.on(“shown”,n.bind(this,e)),t.on(“hidden”,function(i){i.style.height=i.clientHeight+”px”,i.innerHTML=”x3c!–“+i.innerHTML+”–x3e”}.bind(this,e))}(t):n(t)}}]);
}, {“5″:5,”110”:110}];
window.modules[“memo-pixel.client”] = [function(require,module,exports){“use strict”;(()=>{var e=document.createElement(“script”);e.async=!0,e.type=”text/javascript”,e.src=document.location.protocol+”//d16xpr36wrmcmk.cloudfront.net/js/memo.js”,(document.getElementsByTagName(“head”)[0]||document.getElementsByTagName(“body”)[0]).appendChild(e)})(),module.exports=(()=>{});
}, {}];
window.modules[“affiliate-links.client”] = [function(require,module,exports){“use strict”;const dom=require(4),_includes=require(60),_startsWith=require(64),globalClick=require(63),visit=require(62),productSubtags=require(65);var excludedHostnames,skimlinksBaseUrl,skimlinksId,visitState,productUrl,ignoreDataAttribute=”data-affiliate-links-ignore”,article=window.document.querySelector(“article”),isSponsored=article&&”Sponsor Story”===article.getAttribute(“data-type”);function setExcludedHostnames(t){excludedHostnames=(t.getAttribute(“data-excluded-hostnames”)||””).toLowerCase().split(“,”)}function isSkimLink(t){return!!(skimlinksId=t.getAttribute(“data-skimlinks”))}function isExcluded(t){return _includes(excludedHostnames,t)||_startsWith(t,”www.”)&&_includes(excludedHostnames,t.slice(4))||isSponsored}function isUrlProtocol(t){return 0!==t.indexOf(“mailto:”)&&0!==t.indexOf(“javascript:”)}function getTargetHostname(t){return(t.hostname||t.host||t.href||””).toLowerCase()}function convertSkimlinkUrl(t){return(skimlinksBaseUrl=skimlinksBaseUrl||skimlinksId?”//go.redirectingat.com/?xs=1&id=”+skimlinksId+”&sref=”+encodeURIComponent(window.location.href)+”&url=”:void 0)&&skimlinksBaseUrl+encodeURIComponent(t)}function hasIgnoreAttribute(t){return”true”===t.getAttribute(ignoreDataAttribute)}function convertSkimlink(t){var e,i,r,s=dom.closest(t.target,”a”),n=s&&s.href;n&&n.length&&!t.defaultPrevented&&(i=getTargetHostname(s),!isUrlProtocol(n)||isExcluded(i)||hasIgnoreAttribute(s)||productSubtags.getAffiliate(n)||(e=convertSkimlinkUrl(n))&&(productUrl=n,r=s&&s.getAttribute(“data-track-id”),s.href=productSubtags.ensureSubtag({url:e,productId:r,visitState:visitState,anchorEl:s})))}function revertSkimLink(t){var e=dom.closest(t.target,”a”),i=e&&e.href||””;i.includes(skimlinksBaseUrl)&&i&&i.length&&productUrl&&(e.href=productUrl)}module.exports=(t=>{const e=isSkimLink(t);visit.onceReady(function(t){visitState=t}),e&&(setExcludedHostnames(t),globalClick.addHandler(convertSkimlink,revertSkimLink))});
}, {“4″:4,”60″:60,”62″:62,”63″:63,”64″:64,”65”:65}];
window.modules[“gtm.client”] = [function(require,module,exports){“use strict”;const $gtm=require(3);DS.controller(“gtm”,[function(){return function(t){$gtm.init(t.getAttribute(“data-container-id”),t.getAttribute(“data-site-slug”))}}]);
}, {“3”:3}];
window.modules[“international-banner-callout.client”] = [function(require,module,exports){“use strict”;const visit=require(62);module.exports=(t=>{var e;const i=t.querySelector(“.banner-trigger”),s=window.localStorage,a=”international-banner-callout”,n=t.getAttribute(“data-location”),r=t.getAttribute(“data-policy”);visit.onceReady(function(){!function(){try{e=JSON.parse(s.getItem(a))||{}}catch(t){e={}}}(),e.dismissed||”GB”!==n&&”true”!==r||t.classList.add(“show”)}),t.addEventListener(“click”,n=>{(n.target.matches(“a”)||n.target.matches(“span.banner-link”))&&(e.dismissed=Date.now().toString(),function(){try{s.setItem(a,JSON.stringify(e))}catch(t){}}(),function(){t.classList.contains(“show”)?i.setAttribute(“aria-expanded”,”false”):i.setAttribute(“aria-expanded”,”true”);t.classList.remove(“show”)}())})});
}, {“62”:62}];
window.modules[“global-nav.client”] = [function(require,module,exports){“use strict”;const dom=require(4),auth0=require(7),signInButton=dom.find(“.user-signin”),signOutButton=dom.find(“.user-signout”),globalNav=dom.find(‘[class^=”global-nav”]’),body=dom.find(“body”),dropdownItems=dom.findAll(“.dropdown-wrap”),gtm=require(3),pageUri=require(151).getPageUri();function closeDropdowns(e){let n=globalNav.querySelectorAll(“.dropdown.open”);dropdownItems.forEach(function(t){let o=t.querySelector(“.dropdown”);!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove(“open”)})}function gtmSendReport(e,n,t){let o={eventCategory:”ecommerce”,eventAction:”componentClick”,brand:e,dimension23:”global-nav”,list:pageUri,pageZone:”header”,variant:”nav-link”};”global-nav-link”===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function init(e){auth0.on(“init”,()=>{signInButton.addEventListener(“click”,function(e){e.preventDefault(),auth0.showLogin()}),signOutButton.addEventListener(“click”,function(e){e.preventDefault(),auth0.logout(),gtmSendReport(“Sign Out”,e.target,”user-info-link”)}),auth0.isAuthenticated()&&e.classList.add(“signed-in”),auth0.isSubscriber()&&e.classList.add(“subscribed”),e.querySelectorAll(“.user-link”).forEach(e=>{e.classList.add(“active”)})}),auth0.on(“login”,()=>{e.classList.add(“signed-in”),auth0.isSubscriber()&&e.classList.add(“subscribed”)}),auth0.on(“logout”,()=>{e.classList.remove(“signed-in”),e.classList.remove(“subscribed”)})}dropdownItems.forEach(function(e){e.addEventListener(“click”,function(){e.querySelector(“.dropdown”).classList.toggle(“open”)})}),body.addEventListener(“click”,closeDropdowns),document.addEventListener(“keydown”,closeDropdowns),globalNav.addEventListener(“click”,function(e){let n=e.target;n.classList.contains(“global-nav-track”)&>mSendReport(n.text,n,”global-nav-link”)}),module.exports=init;
}, {“3″:3,”4″:4,”7″:7,”151”:151}];
window.modules[“aaa-module-mounting.legacy”] = [function(require,module,exports){“use strict”;const eventify=require(179),_pickBy=require(154),_each=require(315),fingerprintjs2=require(314),DS=require(313);function registerGlobals(){window.DS=DS,window.Eventify=eventify,window.Fingerprint2=fingerprintjs2,DS.value(“Eventify”,eventify),DS.value(“Fingerprint2”,fingerprintjs2),DS.value(“$document”,window.document),DS.value(“$window”,window)}function mountDollarSliceComponents(){DS.service(“components”,[“$document”,”$module”,function(e,n){var r=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),o=Object.keys(r);function t(e){return r=>{try{n.get(e,r)}catch(e){logMountError(r,e)}}}_each(o,n=>{var r=e.querySelectorAll(‘[data-uri*=”/_components/’+n+’/”]’),o=e.querySelectorAll(‘[data-uri$=”/_components/’+n+'”]’);_each(r,t(n)),_each(o,t(n))}),this.components=o}]),DS.get(“components”)}function logMountError(e,n){const r=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error(“Error attaching controller to “+r,n)}registerGlobals(),document.addEventListener(“DOMContentLoaded”,()=>{mountDollarSliceComponents()});
}, {“154″:154,”179″:179,”313″:313,”314″:314,”315”:315}];
window.modules[“ads.legacy”] = [function(require,module,exports){“use strict”;const _map=require(66),_forEach=require(56),_isString=require(198),_intersectionWith=require(316),_isEqual=require(204),_each=require(315),_debounce=require(114),_sortBy=require(137),page=require(151),visit=require(62);DS.service(“adService”,[“Eventify”,”$cid”,”$document”,”$window”,function(e,t,a,i){var o,n,s,r,d,c,l,u,g,p,m={},h=this,f=[],b=visit.getQueryParamsObject([“utm_campaign”]),w=document.querySelector(‘script[data-type=”ad-a9″]’);document.querySelector(‘script[data-name=”concert-ads”]’)||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],c=i.googletag,w&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()}),l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log(“MESSAGE: Timeout for A9 load exceeded, aborting”))},500)),u=document.createElement(“script”),g=document.createDocumentFragment(),p=document.getElementsByTagName(“head”)[0],u.src=”https://z.moatads.com/voxprebidheader841653991752/moatheader.js”,g.appendChild(u),p.insertBefore(g,p.firstChild),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?c.defineSlot(o.name,o.sizes,o.id).addService(c.pubads()):c.defineOutOfPageSlot(o.name,o.id).addService(c.pubads())).setTargeting(“adid”,o.id),b.hasOwnProperty(“utm_campaign”)&&t.setTargeting(“utmcamp”,b.utm_campaign),a=h.getAdCount(o.label),t.setTargeting(“label”,o.label+”_”+o.site+”-“+a),c.display(o.id),c.pubads().addEventListener(“slotOnload”,function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),(n=v(o))?window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){c.cmd.push(function(){window.apstag.setDisplayBids(),c.pubads().refresh([t],{changeCorrelator:!1})})}):c.pubads().refresh([t],{changeCorrelator:!1}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute(“data-name”),r=e.getAttribute(“data-sizes”),d=e.getAttribute(“data-label”),c=e.getAttribute(“data-site”);n=e.id,r&&r.length?(r=r.split(“,”),a=[],_map(r,function(e){e=e.split(“x”),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add(“oop”),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},m[n]=this},r=function(e){c.cmd.push(function(){var t=o(e);m[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=v(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){c.cmd.push(function(){window.apstag.setDisplayBids(),c.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},c.cmd.push(function(){var e,t,o,n=page.getMeta(“article:tag”),s=page.getMeta(“author”),r=i.location.href,d=(e=a.head.querySelector(“.head-gtm”),t=a.body.querySelector(“.gtm”),e&&”top”===e.getAttribute(“data-gtm”)?”gtmtop”:t&&”bottom”===t.getAttribute(“data-gtm”)?”gtmbottom”:””);o=[],_forEach([n,s,d],function(e){_forEach(e.split(“,”),function(e){(e=e.trim().toLowerCase().replace(/s/g,”-“).replace(/’|’/g,””)).length&&o.push(e)})}),c.pubads().setTargeting(“kw”,o),c.pubads().setTargeting(“entry_group”,o),r=r.slice(r.lastIndexOf(“/”)+1),c.pubads().setTargeting(“pn”,r),c.companionAds().setRefreshUnfilledSlots(!0),c.pubads().enableAsyncRendering(),c.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=””},this.getAdCount=function(e){var t,a=0,i=Object.keys(m);return _each(i,function(i){(t=m[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return m[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,”homepageTakeover/TopLeaderboard”:1},t=_sortBy(f,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),f=[]},10),this.addToPageLoadQueue=function(e){f.push(e),d()});function v(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}}]);
}, {“56″:56,”62″:62,”66″:66,”114″:114,”137″:137,”151″:151,”198″:198,”204″:204,”315″:315,”316”:316}];
window.modules[“cid.legacy”] = [function(require,module,exports){“use strict”;DS.service(“$cid”,function(){var r=Math.floor(100*Math.random());return function(){return”cid-“+ ++r}});
}, {}];
window.modules[“facebook.legacy”] = [function(require,module,exports){“use strict”;DS.service(“facebook”,[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==”function”&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(“Cannot find module ‘”+o+”‘”);throw f.code=”MODULE_NOT_FOUND”,f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==”function”&&require;for(var o=0;o typeof key === ‘string’ && key.match(/.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for “${name}” on “${elementTag}”`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === ‘string’ && key.match(/.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === ‘function’) {
const name = key.replace(‘.client’, ”),
instancesSelector = `[data-uri*=”_components/${name}/”]`,
defaultSelector = `[data-uri$=”_components${name}”]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
} // Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the “ value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = ”;
} // note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]