ByMatt Zoller Seitz,
critic, filmmaker, and staff writer for Vulture and New York
James Gandolfini in The Sopranos.Photo: HBO
David Chase’s gangster thriller/soap opera/satire/philosophical statement The Sopranosturns 20 today. To commemorate the occasion — ground zero for so-called “prestige TV,” with an ending that people still fight over — I co-wrote a book about it with my good friend, Rolling Stone TV critic Alan Sepinwall, who used to share the TV beat with me at the Star-Ledger of New Jersey, the paper Tony Soprano routinely picked up from the end of his driveway. The book is called The Sopranos Sessions, and it’s available now.
When word got out that our book contained critical essays on all 86 episodes of the series, fans naturally started asking us for our top-ten lists. Mine is below, and Alan published his here. Please share your picks in the comments, or tweet them to me at @mattzollerseitz. (Obviously, this article contains spoilers, so don’t read it if you’re not already conversant with the series.)
10. “Marco Polo” (Season 5, Episode 8)
The Sopranos often had episodes that felt like little self-contained ensemble stage productions, in which the most important action was confined to a single location. To varying degrees, “Pine Barrens” (the woods), “Mrs. and Mrs. John Sacrimoni Request” (a wedding) and “Soprano Home Movies” (Bobby and Janet’s lake house) all fit the bill, but this gem from actor-writer Michael Imperioli and the late, great John Patterson might be the best of them all. It’s the one where Carmela’s dad Hugh insists that she invite her soon-to-be ex-husband to his birthday party. To Carmela’s surprise as well as Tony’s, they end up falling into old rhythms and spending the night together, setting then on the road to reconciling. The serene pacing of the party sequence recalls classics by Robert Altman and Hal Ashby, where the plotting meticulously built towards a predetermined outcome, but it all seemed to happen organically, even randomly, from one moment to the next, because the characters were so finely drawn and the performances so expertly modulated. The secondary plot in this episode is nearly as compelling: Cousin Tony B. (actor-director Steve Buscemi) takes his two sons to the party, and they’re so bowled-over by the Soprano family’s wealth that they make their father feel inadequate and foolish, emotions that lead to his relapse into criminality and, finally, his death.
9. “Made in America” (Season 6, Episode 21)
The only episode besides the pilot that was both written and directed by Chase, this series finale is remembered mainly for its concluding four minutes, a dreamlike dinner with the Soprano family ending in a strangely timed cut to black that inspired debates about whether Tony lived or died and if that question mattered. That sequence alone — an audacious gambit worthy of the 1960s art films Chase adored as a young film student — would be enough to secure it a spot on any list of the greatest finales. But the rest of the episode is remarkable, too. Packing two hours’ worth of incidents into a drum-tight 60 minutes, it’s a corrosive and often haunting examination of impermanence, memory, karma and dread, focusing on a crime family and a blood family reckoning with the implications of their past decisions while facing a cloudy future. It’s also one of the most unnervingly hilarious episodes, mixing absurd-satirical images worthy of Thomas Pynchon or Joseph Heller (A.J. narrowly escaping an exploding SUV while Bob Dylan’s “It’s Alright, Ma, I’m Only Bleeding” plays on the stereo) and subtle bits of character business that, in classic Sopranos tradition, own up to the frustrations that Chase has built into this script and so many others (the mob lawyer Mink keeps whacking that bottle of ketchup, but nothing ever comes out). Chase’s history of challenging and occasionally teasing the fans reaches a giddy zenith here, with onlookers reacting to Phil Leotardo’s gruesome death by staring in goggle-eyed fascination, then getting sick to their stomachs, and the family’s longtime nemesis, FBI Agent Dwight Harris, reacting with delight because he picked Phil to get whacked next in a Sopranos-themed betting pool.
The most ambitious dream-driven episode of a series that did many, the Matthew Weiner-written “The Test Dream” is built around a nearly 20-minute, uninterrupted sequence set in Tony Soprano’s slumbering mind. It’s comical, intellectual, and crude, filled with violent, eerie, and lurid images and situations that explore the similarities between dreaming and filmmaking. It weaves in and out of reality so deftly that it’s initially hard to figure out where the “real” leaves off and the imagined begins. It ups the ante on past dream sequences (even season two’s “Funhouse”) by having Tony observe events that are close to things that occurred out in the world while he was dreaming. Merging the conscious and subconscious worlds that the show had kept separate, “The Test Dream” feels like a missing link between season two’s “From Where to Eternity” — in which Chris describes a purgatorial world that he saw while clinically dead, and insists it wasn’t a dream — and season six’s “Join the Club” and “Mayham,” which let Tony wander around in that sort of space, being examined, judged, and challenged, minus the comforts that lucid dreaming provides. The episode also has a guest appearance by Annette Bening as herself, cameos by several deceased characters, and a scene where star James Gandolfini rides a horse through a living room so delicately that you’d think he’d been possessed by the ghost of Roy Rogers.
7. “Second Opinion” (Season 3, Episode 7)
Wherein two main characters, Carmela and Uncle Junior, seek second opinions because they aren’t happy with the first ones. Junior is being treated for cancer, and Tony’s convinced he’s settling for substandard treatment because his oncologist is named John Kennedy. But the more important story is about Carmela. She attends a couples therapy session without Tony, who’s mentally checked out of the marriage, and starts to cry when she tells Dr. Melfi that there’s nothing she can do to heal Tony. Melfi, who’s been pushing Carmela to reckon with her husband’s criminality and her complicity in it, sends her to another therapist, Dr. Krakower. He refuses to allow Carmela to avoid responsibility, warning her that she’s subsisting on blood money and can only save her soul if she leaves Tony and takes nothing with her except her kids. It’s a warning to us as well as Carmela: If you allow yourself to be charmed by these murderous bullies, it’s because some part of you wants to be, and you need to come to terms with it.
6. “The Knight in White Satin Armor” (Season 2, Episode 12)
Directed by Sopranos veteran Alan Taylor (who’s helming the forthcoming prequel film The Many Saints of Newark), this will forever be known as the one where Janice shoots Richie, and it’s one of the most influential episodes of any television show ever made. It taught its contemporaries and successors that you could shock viewers not just with what happened, but how and when. Timing had never before been used as such a devastating dramatic weapon. Most people expected that Tony would kill Richie, personally or by proxy, or perhaps that Richie’s impending marriage to Janice would force Tony to accept him into the family despite hating his guts, setting up another ongoing, slow-burn feud. But it wasn’t just the blindsiding effect of Janice doing the deed that stunned viewers; it was the fact that it happened in the penultimate episode of season two, clearing the deck for one of the most divisive of season finales, the dream-driven, cryptic, scatalogical “Funhouse.” Beyond that, Robin Green and Mitchell Burgess’s script is a masterpiece of construction, setting up that big moment so deftly that you don’t realize until you watch it a second time that it was the only correct outcome, and that the show had spent the preceding 11 episodes building to it. Without this episode, you don’t get the mind-bending twists in the pilots of The Shield and Justified, the death of Rocket Romano on ER, and some of the most wrenching episodes of Deadwood, Lost, and Mad Men, to name just a few classics that learned from Chase and co.
5. “Employee of the Month” (Season 3, Episode 4)
Standing up against its own fan base’s power-fantasy identification with Tony and the gang, as well as four decades’ worth of rape/revenge cliches, this episode gives Dr. Melfi an opportunity to use her scariest patient as a blunt instrument to smash the man who sexually assaulted her. Her decision is expressed in one syllable, “No,” followed by the series’ first-ever cut-to-black ending. It’s a denial of an outcome that the audience, Melfi’s son and ex-husband, and maybe Melfi herself (on some level) all craved. Written, like many classic Sopranos episodes, by Green and Burgess, and directed by Patterson, it stays close to Melfi in nearly every scene, and examines the aftermath of her attack in far greater detail than the attack itself (which lasts about 90 seconds). It’s the ultimate Melfi episode, speaking to the good doctor’s rigorous moral code, which bends but never breaks.
4. “Whitecaps” (Season 4, Episode 13)
Another perfect episode by Green, Burgess, and Patterson, co-written by Chase. Carmela throws Tony out of the house after discovering yet another of his affairs, setting the stage for a series of increasingly raw confrontations between the couple that draw on everything from The Honeymooners to Who’s Afraid of Virginia Woolf? It may be the ultimate showcase for James Gandolfini and Edie Falco’s combustible chemistry. And the subplots are strong, too, particular Christopher getting out of rehab, Tony’s escalating tensions with Big Carmine’s New York family, and Tony’s attempt to get the deposit back on the second home he was trying to buy for Carmela, a matter that’s ultimately decided by Dean Martin.
3. “Pine Barrens” (Season 3, Episode 10)
Written by one of the writing staff’s MVPs (and future Boardwalk Empire creator) Terence Winter, and directed by future cast member Steve Buscemi, this is one of the most visually arresting episodes of The Sopranos as well as the funniest and saddest. It’s remembered as the one where Chris and Paulie are hunting in the snowy woods for a Russian gangster they’d tried and failed to kill in order to cover up their own incompetence, but there’s a lot of marvelous housekeeping stuff woven around that, all dealing with Tony’s tendency to shrug off his obligations as a mob boss, husband, father, and boyfriend, and run away before anyone can call him to account. Like other episodes in season three — in particular “Proshai, Livushka,” the one where Livia dies, and “Amour Fou,” the end of Tony and Gloria’s relationship — “Pine Barrens” also intimates that supernatural forces might be afoot in Sopranos-land. But it always stays on the right side of plausible deniability, leaving it up to the viewer to make the case for or against a world beyond the rational.
2. “College” (Season 1, Episode 5)
Written by Chase and James Manos, Jr., and directed by Allen Coulter, this was a medium-altering episode of television. It showed its main character literally dirtying his hands through murder — up till then, Tony had been more of a de-escalator, and somebody who subcontracted the nasty stuff — while touring colleges with his daughter, Meadow. The deft juggling of vendetta and father-daughter slapstick would’ve made the episode stand out regardless, but what makes it an all-time classic is the way it balances the Tony-Meadow story with another two-hander, where Carmela spends a flirtatious but ultimately chaste night with the local priest, Father Phil, and ultimately consummates with him spiritually, through an impromptu confession of her complicity in her husband’s evil. The nerviest creative decision was concentrating on these four main characters and sidelining everyone else, including Chris, who literally phones in his role. It was like a moment in an ensemble play where the stage goes dark and two sets of couples take turns stepping into the spotlight.
1. “University” (Season 3, Episode 6)
The greatest of all Sopranos episodes as well as one of the hardest to watch, this is a level up from its inspiration, “College” (the similar titles cop to the connection). The A-plot is about Tony failing to nurture and protect a naive stripper named Tracee, who’s having an affair with the volatile gangster Ralph, a coked-out bully who ultimately murders her after finding out that she’s pregnant with his child. This horrifying story is juxtaposed with Meadow and her boyfriend Noah breaking up after Meadow’s roommate Caitlin comes between them—not sexually, but by making emotional demands that neither of them are willing or able to meet, and requiring a level of sensitivity to suffering that’s anathema to each of them. Both plotlines are about callousness and dehumanization, illustrating the sickening but very human tendency to decide that other people’s problems have nothing to do with you, then rationalize away the tragic result as a random cosmic dice roll. (In therapy later, Tony decries Tracee’s murder in vague, dissociated terms, changing her gender and calling it a “workplace accident.”) “University” is also an episode that indicts the misogynistic structure of the larger world as well as the insular tribe that is the Mob: Caitlin and Tracee’s stories are mirrors, though the level of physical degradation varies because one young woman is upper-middle class and the other dirt poor. Meadow serves as a rhetorical bridge between all the different moral and philosophical aspects of Terence Winter and Salvatore J. Stabile’s screenplay, variously reminding us of Tracee, Caitlin, Carmela, and Tony. The Kinks song “Living on a Thin Line” comments on the action, appearing three times on the soundtrack and establishing a link between the decay of the Mafia, England, Rome (via Ralphie’s Gladiator fixation), America, and patriarchy itself. The unifying image is the garbage-strewn sewer pipe behind the Bada Bing, reminding us this is a show about waste and wasted potential, and the roles that ideology, greed, and cruelty play in replicating it from one generation and one era to the next.
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();
// ]]