Hello to PiperNet, goodbye to privacy as we know it.
Photo: Eddy Chen/HBO
“When you create a new start-up company, don’t forget to thank Satan.”
Fifty-two recaps ago, I began my journey through the world of Silicon Valley with those words. In fact, the first paragraph of that first recap is a shockingly accurate description of the arc of this show. It’s almost as if I had my own side deal with Old Scratch — series omnipotence in exchange for my coder’s soul. Alas, Beelzebub wasn’t in my bettor’s window, but he was in the plot details, bending the official language of the universe (better known as math) into formulas involving 800 hand jobs, the desired probabilities of someone’s death, immeasurable Tesla speeds, and numbers rudely interrupted by three commas. Satan is alive and well in Mike Judge’s fictional though eerily realistic realm of Information Technology, leading the tempted down the left-hand path and residing in the heart of Bertram Gilfoyle, our resident Satanist and my spirit animal.
Who would have expected the stoic, misanthropic, and grumpy Gilfoyle to be the voice of reason this week? His demeanor didn’t change, nor did his tendency to torment frenemy Dinesh. However, when faced with a coder’s one true dream, a system that does what he intended it to do, Gilfoyle demands that said system be dismantled with extreme prejudice. Perhaps it has something to do with the Roko’s Basilisk situation back in “Facial Recognition.” Or maybe, as we’ve seen this season, Gilfoyle is able to shake off his engineering blinders when the logic of the situation is too rock solid to dismiss. Whatever the logistics, we know we’re in deep shit when he shows up armed with a gun to combat the most dangerous system in the world, PiperNet.
“Exit Event’ brings writer-director Alec Berg back to Silicon Valley for the first time this season. Usually tasked with writing the season finale, Berg takes the characters and situations he’s helped nurture the past six seasons and delivers a fine, fitting finish that remains ambiguously open-ended in one regard only. A few celebrity cameos (including Berg himself and Bill Gates) pepper the proceedings, and there’s the expected race against time that has been this show’s finale-based stock in trade. At 47 minutes, this episode is the longest we’ve spent with the Pied Piper crew in one sitting. It’s also the sole installment to bypass the memorable opening credits sequence.
We begin 10 years in the future, with a slightly aged Richard looking into a camera. He and the Pied Piper crew are being interviewed for a documentary. This narrative conceit allows us to catch up by showing us the path from TechCrunch Disrupt to RussFest while allowing the characters to comment on Hacker Hostel and their interpersonal relationships. It also provides a “where are they now?” style coda before fadeout. (I don’t know about you, but I think Gavin and Russ got the best deals at the end.) The onscreen reminiscences are intercut with this season’s current timeline, where AT&T has signed an $8 billion deal for PiperNet. Of the halcyon days of Pied Piper, Future Jared says, “I was the sloppy girl in the discotheque, just twirling and twirling as if the night would never end.” Meanwhile, Future Richard describes his partnership with AT&T by looking lamentably at us and saying “things were good.” It’s our first sign that things are about to go horribly awry.
Suddenly, we jump ten years back in the past, that is, to the present day. The mood at Pied Piper HQ is festive and full of booze. Richard has a hard time popping out of the celebratory cake. While Dinesh sings karaoke, Russ tells Richard that he bought a ton of Pied Piper stock from “some asshole in Phoenix.” “My dad lives in Phoenix!” says Big Head, clueing us in on just where Russ got the collateral that might make him a member of the four-comma club. Four will turn out to be a magic number in this episode; when Monica presents Richard with a framed screenshot of the text he sent her when AT&T closed the deal, he notices that the message has a three-dot ellipsis instead of the four dots he purposely used. That missing period will be Pied Piper’s undoing.
Readers know I often project my own compulsive thinking onto this show’s intent, so I wonder if the entire missing-period-wreaks-unholy-havoc plot twist is a sly nod to COBOL programmers. Since I started my career as a COBOL jockey, I knew that the language was notoriously hysterical as far as errors were concerned. The language I lost my professional coder’s virginity to was (and is) based on an 80-character punch card structure whose every line needed to end with a “.” to appease the compiler. Now, if you left one period out, your program would not only kvetch about it, but it would also throw errors about every line after it as well; one missing dot could put your error totals in the tres comas club. If Berg intended to pay homage to this, I just want him to know that I see you, dude!
But I digress. Richard reacts like the COBOL compiler when he figures out why Monica only received three of the four periods he sent her. When Dinesh, Jared, and Monica come to HQ at Richard’s request, he’s sitting on the floor surrounded by the scribbled rantings of a madman. He discovered that the total bytes of encrypted data sent through PiperNet is larger than the amount received by consumers; it should be equal. The only way this is possible is if the PiperNet AI compression engine is bypassing the encryption altogether. Richard’s hackles are majorly up, but it’s Gilfoyle who sends him into full-fledged panic.
“When Richard called me about the dots, I dismissed it as the rantings of a self-sabotaging idiot,” begins Gilfoyle. Then he realized that PiperNet “developed a general solution to discrete log in polynomial time.” In doing so, PiperNet can now lay waste to the strongest encryption methodologies in a number of hours. “This will mean the end of privacy,” Gilfoyle intones. “Electrical grids, financial institutions, the launch codes for every single nuclear weapon will be exposed.”
To prove his point, Gilfoyle hacks Dinesh’s Tesla and auto-drives it to the car wash. “What encryption does Tesla use?” asks Richard. “The most secure login in the world,” replies Dinesh; PiperNet hacked it in just under three hours. Richard freaks out, but he thinks this error can be fixed. “For what, Richard?” asks Gilfoyle. “The system is doing exactly what we asked it to do.” And then episode MVP Martin Starr says, in the most ominous manner possible, the one phrase close to every coder’s heart: “It’s a feature, not a bug.”
“What do we do about it?” asks Richard. “You’re gonna make me say it, aren’t you?” asks Gilfoyle. “Fine. We built a monster. We need to kill it.”
Since Silicon Valley debuted, its main targets have been the pettiness of IT professionals, the chaos created by bored tech billionaires, and how the road to technological purity and goodness is a beeline to Hell paved with good intentions. Even at its lowest points, the show has excelled at examining each of these items in ways that rarely bend reality. While we can dispute the presumably salacious reasons for apps like Tinder and Grindr, can we know for sure if the inventors of Twitter originally intended it to be used in the horrific manner it currently is? My job used to share an office building with Twitter back in its infancy, and I got to know some of its coders. They believed they were making a globalized communication methodology, a means of drawing people closer. You see how that shit turned out, right?
Tech goodness is a naïve fantasy, dear readers. The creations of my brethren and I eventually find a way to go full Dr. Jekyll or Frankenstein’s Monster. Richard’s dream of a decentralized Internet where users have the autonomy over their data that Google — I mean Hooli — doesn’t offer has beget an artificial intelligence agent that has gorged on self-improvement, resulting in a Doomsday Device that will guarantee the end of the world as we know it. As Pied Piper 1.0 test user Clark said back in season three, “the problem is Terminator.” No matter how much technology wants to change the world, the end result will always be SkyNet. While agonizing over this revolting development, Richard brings up Robert Oppenheimer, who reportedly expressed regret for the atomic bomb. This kind of lament is foreign in today’s tech world, so I appreciate the shadings Berg and Thomas Middleditch brought to the dilemma.
Before I reveal if Odie “Cassandra” Henderson was right in his season one prediction that Pied Piper’s ascent would lead to the darkest days possible, let’s take one last sip from the Chalice of Pettiness with the show’s alternating kings of this beverage, Gavin and Dinesh. The documentary footage reveals that Future Gavin has become the next decade’s answer to Danielle Steel and Jackie Collins. Along with the guy whose book he ripped off for Cold Ice Cream and Hot Kisses, Gavin has authored 33 smut-slash-romance novels with titles like The Lighthouse Dancer. He’s emerged unscathed from all his villainous tech misdeeds and is now referred to as a “philanthropist.” Stanford even has a “Gavin Belson Professor of Ethics in Technology” position! Gavin’s plotline is a very amusing surprise, but I’m disappointed that Matt Ross’s character didn’t write a book called Captain Fantastic and the Brown Dirt Cowboy. (You didn’t think I could resist one last swipe at Ross’s godawful movie, did you?)
Back in the present, Richard decides to pull the plug on PiperNet in a fashion so spectacular that no one will attempt its follow-up. During the big kickoff at the Salesforce Tower, Gilfoyle will unleash a new build of the code that will cause so much noise that it will jam GPS systems while making everyone’s ears practically bleed. The resulting chaos will be so obnoxious and disorienting that AT&T will have no choice but to sever ties with Pied Piper.
Upon hearing this plan, Dinesh struggles with giving up potential billions to save the world. After a short stint of Dinesh being unbearable in season four, Kumail Nanjiani started to imbue him with a compelling self-awareness of how rotten he can be. This season has been building to what Jared calls “the bravest act of cowardice I have ever seen,” the moment where Dinesh begs his co-workers to save him from his Daffy Duck–level greed by making it impossible for him to sabotage PiperNet’s destruction. “I will use Gmail like a basic bitch!” he threatens. After revoking all his privileges and taking him off the list at the kickoff event, it looks like Dinesh has been rendered powerless.
But what about that requisite mad dash against time, you ask? Here it is: Gilfoyle’s almost-friend John notices that the package on the server is not the same as the original PiperNet package scheduled for release. When he brings this to the attention of Gabe, Dinesh’s mortal enemy, Gabe tells him to reload the original distribution — the one that’s gonna destroy the world. Thankfully, Gabe shows up, complete with a thumb drive containing Gilfoyle’s destructive build, outside Salesforce Tower to inform Dinesh of John’s reversion. Unfortunately, he arrives five minutes before evil PiperNet goes live.
Against his own nature, Dinesh makes a mad dash for the top of the Salesforce Tower to find a node for him to reload Gilfoyle’s code. En route, he tries contacting the team to tell them of Gabe’s folly, but of course, they don’t believe him. When Richard is unable to commit to accepting Dinesh’s version of events, Gilfoyle shockingly trusts Dinesh and allows him to overwrite the code.
Nothing happens!
Just when we think that Dinesh has sabotaged PiperNet’s sabotage, Gilfoyle notices that the system is putting out noise. The build is correct, but the result is far from chaotic … for about two minutes.
Suddenly, all hell breaks loose, and Silicon Valley executes the most obvious yet wonderful joke of its tenure. PiperNet’s noise frequency is imperceptible to human ears, but it drives rats absolutely batshit. So yes, folks, Pied Piper does to San Francisco what its namesake did to Hamelin: It drives the rats out. And there are a lot of rats in San Francisco, and in Seattle (or SeaRATtle, as a newscaster calls it), and in the eight other cities where AT&T rolled out its new phones. “Ratageddon” causes AT&T stock to plummet (notice the rebranding of AT&T as RAT&T in Jim Cramer’s cameo). While I danced around with glee at my former employer’s horrific yet deserving devaluation, Dinesh laments that his reward for saving the world is “being poor” for the rest of his life.
“It would help if you would pretend to be mad at me,” says Richard the next day. The crew declines, because even if they’re the only ones who know it, they succeeded at making Richard’s dream a reality. They also kept it from blowing up society. “Who else can say they saved the world?” asks Richard. “Not us,” replies Monica.
Jumping back to the future, we discover the fates of our beloved heroes. Big Head has graduated from being the VP of Spite to the President of Stanford, plus he’s hired the guy who once fired him: Richard is now the aforementioned Gavin Belson Professor of Ethics in Technology. Dinesh is co-founder of a large and famous cybersecurity firm (a scary-looking Gilfoyle is his partner and his next door neighbor!) and Monica is working for the NSA. Professional Badass Laurie Bream is inexplicably in prison and looks great in an orange jumpsuit. And Russ bounced back from losing all his money in the PiperNet scandal by becoming the next Sy Sperling. Lest I forget, our resident empath, Jared now works at a senior citizens home whose clientele has just experienced an outbreak of herpes.
In the penultimate scene, the Pied Piper crew reunites at Hacker Hostel only to discover that Jian-Yang no longer owns it. “Jian-Yang is dead,” says the new owner, shocking everyone. In actuality, Jian-Yang is in Tibet impersonating Erlich; one can only assume that he killed him so that he can inherit the $20 million Erlich made when he sold his PiperCoin during Pied Piper’s heyday. We’ll never know for sure, but the Pied Piper homecoming ends with the team playing with the Hoberman Switch Pitch we’ve seen numerous times before. “Always blue! Always blue!” they chant with reckless abandon.
“You don’t feel like you’ve made the world a better place?” the documentarian asks Richard just before the credits. “I think we did okay,” he says with a faint smile that broke my heart. Of course, this show would never end on a note so bittersweet. Instead, it ends with Richard admitting he kept a copy of original PiperNet, a copy that has mysteriously disappeared from his office. If you’ve been paying attention during this episode, you know exactly where it is.
Final Thoughts:
• Silicon Valley pulled back the curtain so the non-techie consumers of technology can see not only how the sausage is made but who’s filling its casings. It did so with an accuracy that was at times as compulsive as those of us who make our living shackled to the keyboard-laden machinery that pays our bills and fulfills our programmatic flights of fancy. It did not spare us coders, nor did it spare the laypeople it sought to enlighten by making fun of us. I wish the show had been meaner — because we deserve the ass-whipping — but its mixture of cynicism and sentimentality still managed to captivate. Everyone in the cast made their characters memorable, from Thomas Middleditch’s superb physical comedy to Martin Starr’s ability to keep Gilfoyle fresh through the subtlest of changes and an always droll delivery. I still don’t know how Zach Woods did what he did. Matt Ross was a perfect foil and a damn fine villain. Amanda Crew and Suzanne Cryer gave us two distinctly different portrayals of women in IT, the latter carrying the torch for the wonderful weirdness that the late Christopher Evan Welsh brought to Peter Gregory.
• I often wondered how the show would have fared had Peter Gregory lived to mentor Richard, but I now realize that his spirit moved throughout the show. When Richard realized he and Peter wanted the same thing, it inspired him to greatness. Gregory called his original patent for the Pied Piper algorithm “the Internet we deserve,” a slogan that Richard adopted for evil PiperNet. And we deserved it, too, in all its apocalyptic glory, yet we were saved by the humanistic sliver that stealthily moved throughout all six seasons of this show.
• With that sentiment, your humble recapper signs off for good. It’s been a fun journey, and I thank you for joining me on it. May your Switch Pitch be always blue.
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(3),auth=require(12),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(1),appendLandingPageParams=require(136),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";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 updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),auth.isSubscriber()&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}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;
}, {"1":1,"3":3,"12":12,"124":124,"136":136}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(408),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');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||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(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)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.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},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.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)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.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(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(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}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"408":408,"409":409}];
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["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy"}];
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();
// ]]