Big Little Lies Was a Heartfelt, Cathartic, and Unexpectedly Hopeful Show
ByMatt Zoller Seitz,
critic, filmmaker, and staff writer for Vulture and New York
Nicole Kidman in Big Little Lies.
Photo: HBO
Big Little Lies, which ended last night, was set among the sort of people who have swimming pools built on the edges of cliffs. But the longer the drama went on, the more incidental the lush trappings seemed. By the finale, the stakes were as simple as could be: The show’s leading women — Laura Dern’s Renata, Reese Witherspoon’s Madeline, Nicole Kidman’s Celeste, and Shailene Woodley’s Jane — surrounded a raging abuser (Alexander Skarsgård’s Perry), engaged him in primordial combat, and took him down with a last-minute assist from Zoë Kravitz’s Bonnie, who sized up the threat by watching Celeste and Perry’s body language during Trivia Night (quite a name for a momentous evening).
This was the grand climax the show had been building toward. It resonated so deeply that it rendered moot any complaints I might have had about the execution of certain scenes or subplots here or in the rest of the season. As written by series creator David E. Kelley and directed by Jean-Marc Vallée (who helmed the whole season, as is increasingly the fashion), it was such a heartfelt, confident capper that I’ve now watched it twice: the first time to finish out the story, the second to appreciate its design. Every moment and fleeting detail — even the seemingly out-of-nowhere ones — were carefully prepared for in earlier episodes, down to the black-leather ensemble that we first glimpsed Perry wearing during flashbacks in the pilot: a variation on the outfit Elvis Presley wore during his 1968 “comeback” special, which showed people who’d written him off that he was still the King. (Perry wanted to be Elvis ’68, but learned too late that he was really Elvis ’77.)
The Trivia Night sequence captured the feeling of being at an outwardly cheesy but enjoyable party that’s complicated by public eruptions of private psychodrama (such as Adam Scott’s Ed singing “The Wonder of You,” in a circa-1996, alternative-rock voice, to express his love for Madeline). In its geographical and logistical precision, the sequence was as impressive as one of those grand set pieces on Deadwood that turned the town into an amphitheater. It was darkly funny, cathartic, and unexpectedly hopeful, like Big Little Lies itself.
The show started out by threatening to become a glossier, more art-house-pretentious answer to ABC’s Desperate Housewives, with a scrambled-up structure that sometimes interfered with the momentum of otherwise nicely shaped story lines. The regular cutaways to the police interviews grew tiresome, and even in the second half, which was stronger than the first, there were obnoxious moments when the series would cut to different subplots, rather than letting a strong scene build and crest. At the same time, though, there was real beauty in its cutaways to rolling, crashing waves, which complemented the loose, handheld camerawork, the silent-with-music montages, and the many unnerving moments when the dialogue dropped out.
The boldest thing about Big Little Lies, though, is the way it centers on women’s experiences as wives and mothers and depicts their internecine fights with each other as a distraction from a larger, ongoing conflict with men — some of whom truly love them. A show populated by one-percenters who live in mansions by the sea would seem an unlikely venue for a smash-the-patriarchy narrative, but damned if Big Little Lies didn’t deliver one.
In the spirit of the show, let’s start at the end and work back. The scene on the terrace was a swing-for-the-fences set piece, gathering all of Big Little Lies’ ambitions and affectations into a few intense minutes. The lines of allegiance were drawn by gender; this violent, controlling, self-flattering man was a threat of a kind the women knew and recognized. In a last-minute reveal — contrived, but successfully sold through the actresses’ silent reactions — we learned that Perry was Jane’s rapist as well.
Then came Perry’s lunge, then a cutaway to a montage envisioning bits of the legal aftermath, then a return to the battle royale, which ended with Bonnie charging into the fray and shoving Perry down a flight of stairs. In an interview with Vulture, Skarsgård compared the scene to nature-documentary footage of wolves going after a bear, and the tight, almost abstracted camerawork, intercut with shots of waves dashing themselves against rocks, confirmed that we were witnessing a primordial event. (Like much of the series, the editing here was 1960s-European-art-house to a fault; TV editing traffics in metaphor so rarely that I found this elating.)
Big Little Lies didn’t go into much detail about what, exactly, followed the killing, but the implication seems to be that the women all got their stories straight, stonewalled the police, and sold Perry’s death as a ghastly accident. The series concluded with images of women and their children enjoying a day at the beach, scored to Ituana’s cover of “You Can’t Always Get What You Want” — a disappointingly on-the-nose choice for a show with an otherwise terrific soundtrack, though the sound of a woman singing lyrics associated with one of rock’s most macho bands dovetailed nicely with the finale’s images of resistance and empowerment.
I haven’t read Liane Moriarty’s source novel, but I’m told it explains that Bonnie had an instant protective reaction to seeing Perry manhandle Celeste on Trivia Night because she was the child of a domestic abuser. Deleting that information unfortunately reduced the complexity of one of the only major characters played by an actress of color. (Merrin Dungey’s detective didn’t have much to do, either; she was defined mainly by her thousand-yard stare and clinking Zippo lighter.) I can see how this might have been a Sophie’s Choice situation for David Kelley: Filling in Bonnie’s backstory would have made it easy to predict who would die at the end of the series (and who would kill them), and that would have been debilitating for a show that tells its tale in a kaleidoscopic, not-always-linear way, teasing out the whodunit aspects as a pretext to root around in more mundane but rewarding areas of life experience. At the same time, this decision also had a secondary effect that elevated the series: It cemented the notion that — underneath the scandals, gossip, dark secrets, and affairs — Big Little Lies is about the mechanics of tribal loyalty, specifically loyalty that breaks along the line of gender identity.
Like everyone reading this, each character on the show inhabits multiple tribes, with identities and purposes that overlap and sometimes conflict: There’s a tribe of parents whose children are enrolled at the same school; there’s a more compact (in Jane’s case, two-person) tribe called the family. We also get glimpses of starter tribes on elementary-school playgrounds, and of a tribe of school administrators (seen mainly in after-the-fact police interrogations). Then there are class-based tribes: the rich, represented by most of the characters; the middle class, represented by the police and the school’s staff, and the lower middle class, represented by Jane and Tom. But the two most important tribes on the series are men and women. This is the one that proved most important in the finale, which saw a group of women with different backgrounds and varying levels of civility toward each other put aside their differences to kill a man who had raped one of their group and was abusing another.
Some worried that the show would make a spectacle out of women being petty to each other: series creator Kelley, the mind behind Ally McBeal and The Practice, is a notorious fan of catfights. But while Big Little Lies derived a lot of comic mileage from Madeline and Jane’s feud with Renata — as well as from Madeline and Renata’s control-freak behavior with their spouses, kids, and colleagues — the show grew more insistently feminist as it went on, mainly because of the way Celeste’s story took center stage. This subplot was rich enough to merit a show of its own. The interplay between Celeste and the couples therapist Dr. Reisman (Robin Weigert) was the most harrowing depiction of the psychological impact of domestic violence seen on American TV since 1985’s The Burning Bed.
Therapists will appreciate the doctor’s unpeeling of Celeste’s layers of self-delusion. She keeps insisting that she and Perry are both violent, that their brutal sex expresses a volcanic attraction that can’t be contained in a “normal” partnership. In reality, Celeste’s violence is a defensive, adaptive reaction to the Stockholm syndrome she experiences as the wife of a man who treats her as a trophy, a breeder, and a salve for his insecurity, and who hears the word “no” as a challenge. Some may blanch at the way Dr. Reisman violates the therapist’s doctrine of nonintervention by flat-out telling Celeste that she and her kids are in danger and she needs to plot her escape. Celeste isn’t wrong when she tells Dr. Reisman it’s unethical to push major decisions on one half of a couple when the other half isn’t there. But this type of situation is a gray area for the profession: The need to keep things confidential and encourage patients to arrive at their own epiphanies, at their own pace, is important in a typical session, but not when a patient seems likely to commit or endure violence.
Kelley and Kidman prevent this subplot from turning into “Heroic Therapist to the Rescue” by giving us understated milestone moments which imply that Celeste is figuring out what Reisman already knows. Celeste’s decision to attend therapy when Perry is out of town is a red flag that would tell any therapist that “this relationship has reached a crisis point,” but it’s worth pointing out that Reisman didn’t encourage Celeste to come alone; she made that decision herself. Reisman starts acting in a more interventionist manner during this session because Celeste’s presence seems to invite it. The coiled directness of Weigert’s performance in the final two therapy scenes made me wonder if Dr. Reisman had been here before, either as a therapist or as victim; maybe things ended badly last time, and that’s why she’s moving decisively with Celeste. But I also love that this is just a possibility, and I might be reading too much into the performance; a lesser show would have had Dr. Reisman explain herself.
The blocking of all the therapy scenes is superb, the last two especially. Notice the wide shot of Celeste sitting in her usual spot on a suddenly spacious couch, which signals that she’s finally gotten a chance to make a breakthrough because Perry’s not there to distort her thoughts. Notice, too, that the next time Celeste shows up without Perry, she sits in Perry’s spot. This tells the audience that Celeste is in charge of the household now. Perhaps that’s the unconscious reason Celeste sat in Perry’s spot in the first place — as a means of asserting herself — but here, too, the show declines to spell that out. Big Little Lies can be ham-fisted when it’s having the characters (particularly the Greek chorus of school employees) frame a moment with a smart-ass one-liner. But when it decides to do the same thing visually, it’s so subtle that you may not see a frame at all.
I’ve said elsewhere that if you strung all of the show’s therapy scenes together and released them as a feature film, they might win Kidman another Oscar (and perhaps snag a supporting nomination for Weigert) — but I hope the awards talk these performances are sure to generate won’t diminish the sincerity and craft that radiates from all of the therapy scenes. Cable drama is forever straining after importance, but once in a while you encounter a subplot that truly is important, and this is one of them. Any woman who has been in a situation like this, any therapist who has treated a patient in Celeste’s predicament, and any child who has witnessed domestic violence up close will recognize themselves in the story, regardless of their cultural background or social class, and will appreciate the intelligence and care with which Kelley, Vallée, and the actors have charted Celeste’s path from victimization to empowerment.
Celeste’s story is so substantial, in fact, that sometimes its weight made the other stories seem comparatively weightless (except for Jane’s PTSD, which was equally grave, though presented in a more puzzle-box way). But the battle on the terrace equalized all the women’s subplots, making Celeste’s journey seem of a piece with a larger narrative about women navigating a treacherous world designed and controlled by men. The threat of male aggression kept bubbling up out of the series’ whirlpool of moments: not just Perry’s fits of rage and Waspy entitlement (Perry might as well be the Silicon Valley representative for Mr. Robot’s EvilCorp), but also in sinister revelations (such as Celeste’s discovery that her son was abusing Renata’s daughter, triggering her decision to leave Perry). There was even a sense of menace in throwaway gestures. Think of Renata’s husband Gordon (Jeffrey Nordling) casually pulling up a chair before confronting Jane and Madeline in the restaurant, something a middle-aged executive wouldn’t do when confronting two men. Or the moment at the Trivia Night party when Gordon dismisses Joseph Cross’s Tom, the waiter who threw him out: Gordon points his finger like a pistol and pretends to blow Tom away, a gesture of annihilation that mirrors his earlier threat to drive the restaurant out of existence.
The scene on the terrace depicts a group of women reacting against this sort of oppression, recognizing kinship based on gender and shared life experience, and rallying to eliminate a threat — to all of the women gathered there, to women generally, and to their children, who (like Celeste’s son) can absorb a toxic patriarch’s behavior through osmosis. (As Celeste tells Perry in the car, he doesn’t know for a fact that the boys never saw them fighting, and they’ve definitely heard them.) The story converges toward a point of affirmation, in which women side with other women; the killing of Perry is merely a spectacular by-product. It’s significant that the beat-down was preceded by Renata’s apology to Jane — it’s here that the hive-mind starts to form. “It takes a really big person to apologize like that,” Madeline tells Renata, her onetime enemy. “You’re a really big person.”
This is a really big show, despite its self-deprecating title. I like it so much that I don’t care what’s wrong with it, although my asides here might indicate otherwise. Even though the story is obsessively plot-driven, at times oppressively so, the direction, editing, camerawork, music, and performances bring it closer to being an example of what I call a “vibe” show: a visceral experience that you enjoy mainly because of how it makes you feel. It’s at its best in scenes where the dialogue drops out, the soundtrack fills up with ambient noise or music, and you have to grasp the meaning of a moment by watching the characters exist. This seven-episode run feels so complete that I hope HBO will resist the temptation to capitalize on its success and order a second season. That said, I wouldn’t mind a spinoff about Celeste and her kids starting over, or a new season of In Treatment starring Robin Weigert.
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();
// ]]