When did you realize your brain had been permanently broken by the election? My moment came last weekend, when I saw Robert Eggers’s Nosferatu and couldn’t stop thinking of it as the story of local business leaders colluding with an Eastern European despot — all while trying to control a woman’s body! If I can’t get my mind off current events even in a movie where acclaimed character actor Simon McBurney bites the head off a pigeon, what hope is there for any other Oscar contender?
Like it or not, we’re in for yet another awards season operating in the shadow of Donald Trump. (Wasn’t it good to have a break? We used it to get mad at Maestro. Those were the days.) Inevitably, films that were conceived, written, and shot years in the past will now be read by many awards voters as allegories for the new political landscape. Which Oscar campaigns can take advantage of the vibe shift, the way contenders like Moonlight and Three Billboards did the first time around? Some titles are better positioned than others, but I think all of them deserve a chance to make their case. So, as a bit of free advice to all the awards strategists out there, here’s how the top-15 Best Picture hopefuls can craft a winning message out of a demoralizing defeat.
The Slam Dunks
The Brutalist: America is a land of broken promises, symbolized by a businessman who hides his moral rot by constructing an oversize monument to his own ego.
Nickel Boys: Or maybe America is a segregated justice system enforced by violence, and the only real victory is keeping your head down and surviving.
Sing Sing: Or perhaps America is a prison — but at least it’s one where we can look out for one another, and in community find some manner of redemption.
Pretty Easy
Emilia Pérez: Prominent trans critics have taken issue with the musical’s Pollyannish view of transition, in which “changing the body changes society, changing society changes the soul.” However, for that same reason, not-particularly-online Academy voters could easily see a vote for Emilia Pérez as a vote defending a vulnerable minority scapegoated by the incoming president.
Anora: The bad guys are Russian oligarchs who disrespect our nation’s civil institutions, to say nothing of the way they treat our proud service workers.
Wicked: More of an all-purpose “creeping totalitarianism” narrative, unfortunately as applicable today as it was back in the Bush administration. Luckily, it’s vague enough that you don’t have to think too hard about which oppressed group is being compared to animals.
Gladiator II: Should an empire be led by a guiding ideal, or is it merely a vessel for the strong to strike down the weak? Bonus points for having a character literally say, “The people are tired of the madness of tyranny.”
Blitz: More an “anti-Tory” movie, but still: The entire mission of Steve McQueen’s film is to rebuke the lily-white, idealized vision of WWII heroism sold in right-wing media.
The Piano Lesson: Take away the ghost stuff and focus on the fact that Malcolm Washington’s adaptation of the August Wilson play celebrates and uplifts Black women, the one demographic that pointedly did not swing to the right this year.
The Substance: Sorry, J.D. Vance: The real purpose of the “postmenopausal female” is to turn into Monstro Elisasue.
Slightly Different Vibe, But Still Workable
Conclave: Since it’s literally about an election, Conclave is almost too close to the events of last week to benefit from the comparison. It’s too painful! Team Conclave might be better served by not pushing it and letting viewers draw the obvious conclusions.
A Real Pain: You wouldn’t call a film about a Holocaust tour “election counterprogramming,” but I could see this little dramedy becoming this season’s Arrival. It’s an anti-Trump movie in tone rather than content: an earnest and contemplative break from the noise.
September 5: A film about American journalists covering the Munich hostage crisis probably would have had a better narrative under the “democracy dies in darkness” ethos of the first Trump term. Everyone hates us now! But maybe Paramount can play that to its advantage and get viewers yearning for the good old days of Peter Jennings.
Probably Not Happening
A Complete Unknown: Maybe Bob Dylan can tweet some unflattering anecdote about Trump?
Dune: Part Two: They shoulda kept the Harkonnens’ weird hair.
Oscar Futures: This Is the Weirdest Episode of Emily in Paris I’ve Ever Seen
Every week between now and January 17, when the nominations for the Academy Awards are announced, Vulture will consult its crystal ball to determine the changing fortunes in this year’s Oscar race. In our “Oscar Futures” column, we’ll let you in on insider gossip, parse brand-new developments, and track industry buzz to figure out who’s up, who’s down, and who’s currently leading the race for a coveted Oscar nomination.
Best Picture
Up
Emilia Pérez
Now that Jacques Audiard’s musical has joined its similarly named compatriot on Netflix home screens, the film is living up to its polarizing reputation. In The Independent, Clarisse Loughrey dings Audiard for treating the trans experience “as a metaphor, an opportunity to explore his own thoughts on rebirth and second chances,” while Time’s Stephanie Zacharek sees it as the perfect postelection balm. “Very rarely does the right movie arrive at precisely the right time,” she writes, calling the musical “a radical act of the imagination with kindness in its heart.” What everyone can agree on is that Emilia Pérez feels like no other movie this year. Despite the predictable social-media backlash, I suspect Academy voters will get onboard.
Even
Gladiator II
As the blockbuster sequel’s embargo lifted this week, critics hailed Ridley Scott’s film as “watchable,”“a likable diversion,” and “overly beholden to the original.” The first Gladiator triumphed as a throwback to the sword-and-sandals epics of Hollywood’s golden age; if the follow-up is to succeed without critics, it will have to mine the same masculine nostalgia as Top Gun: Maverick. Next weekend, Gladiator II squares up against the still-embargoed Wicked, which looks on track to surpass it in both box-office tracking and critical enthusiasm. Is there room for both tentpoles in the Best Picture tent?
Current Predix
Anora, The Brutalist, Conclave, Dune: Part Two, Emilia Pérez, Nickel Boys, A Real Pain, September 5, Sing Sing, Wicked
Best Director
Up
Jacques Audiard, Emilia Pérez
Whatever you think about Emilia Pérez, it undoubtedly bears the authorial stamp of its director, the 72-year-old Frenchman behind A Prophet and Rust and Bone. The people who love this film really love it, a quality you can chalk up to Audiard’s utter uninhibition. He “throws so much at you,” Manohla Dargis says, “that you don’t dare blink, almost.” That should appeal to a branch that loves razzle-dazzle maximalism almost as much as they love an international auteur.
Up
Payal Kapadia, All We Imagine As Light
India’s decision not to submit Kapadia’s Cannes prizewinner sparked a fresh round of debate around reforming the International Film category. (Personally, I find it strange that the Academy allows overseas governments to decide what Academy members can and cannot nominate.) Janus isn’t giving up hope, opening Light in New York and L.A. this weekend, and taking Kapadia on a meet-and-greet tour of the U.S. in the hopes of cracking this category. It’s not as impossible a dream as it might have appeared even five years ago, since titles like RRR and Anatomy of a Fall have found favor with voters despite being snubbed by their countries. But those splashy efforts didn’t have trouble making noise; Kapadia’s film, a delicate drama about nurses in Mumbai, could have it harder.
Current Predix
Jacques Audiard, Emilia Pérez; Sean Baker, Anora; Edward Berger, Conclave; Brady Corbet, The Brutalist; Denis Villeneuve, Dune: Part Two
Best Actor
Down
Paul Mescal, Gladiator II
The original Gladiator made Russell Crowe a Best Actor winner. In his first big studio movie, Mescal may be in for a tougher battle. “The Irish actor, a usually intriguing presence, doesn’t hold the screen here so much as he vanishes into its tumult,” our own Alison Willmore says. It doesn’t help that Mescal’s character is sidelined for much of the second half, sequestered in the Coliseum as the plot’s political machinations ramp up outside.
Up
Jesse Eisenberg, A Real Pain
Listen, I didn’t expect Eisenberg to stick around in my Best Actor predictions for this long, either. But until Timothée Chalamet unveils his Bob Dylan voice in a few weeks, the multi-hyphenate’s got the fifth spot in this wide-open race almost by default.
Current Predix
Adrien Brody, The Brutalist; Daniel Craig, Queer; Colman Domingo, Sing Sing; Jesse Eisenberg, A Real Pain; Ralph Fiennes, Conclave
Best Actress
Up
Karla Sofia Gascón, Emilia Peréz
Alongside Mikey Madison, Gascón is this season’s other major discovery. Playing the title character pre- and post-transition, the telenovelaveteran is earning raves that outpace her film’s.“It’s Gascón whose bottomless charisma carries the movie, even over some of its rockier tonal transitions,” says Dana Stevens. “She keeps finding newer and deeper ways to be Emilia Pérez, a character (and a movie) that’s all about the never-finished project of learning to become yourself.” While she’s up against a lot of heavy hitters in this race, including a slew of past winners, Gascón’s powerhouse performance feels like one of Best Actress’s few sure things.
Up
Amy Adams, Nightbitch
I caught up with Marielle Heller’s film this week, and largely agree with my colleague Joe Reid, who calls it the kind of “flawed but interesting” project Adams should be taking on at this point in her career, even if it doesn’t get her any closer to that long-awaited Oscar. Eschewing the advice of W.C. Fields, she spends most of her scenes acting opposite a toddler, throwing herself into the role of a mother who dreams she’s becoming a dog. But this is 45 minutes of movie in a 90-minute frame.
Current Predix
Karla Sofía Gascón, Emilia Pérez; Marianne Jean-Baptiste, Hard Truths; Angelina Jolie, Maria; Nicole Kidman, Babygirl; Mikey Madison, Anora
Best Supporting Actor
Up
Denzel Washington, Gladiator II
Like a merciful Roman emperor, critics are giving Washington’s Gladiator performance a big thumbs-up. “Washington radiates a showman’s delight, relishing his character’s deviousness,” says Tim Grierson. As he made the promotional rounds this week, the two-time Oscar winner also started musing about retiring from acting onscreen, which I can’t help seeing as a veiled message to the Academy: I won’t be around forever, so don’t take me for granted.
Down
Édgar Ramírez, Emilia Pérez
As the only major male cast member of Emilia Pérez, the Venezuelan actor was left out at Cannes, where his four female co-stars shared the Best Actress prize. That seems likely to repeat during awards season: Though his character plays a pivotal role in the musical’s final stretch, Ramírez isn’t given many notes to play besides “hot and dangerous.”
Current Predix
Kieran Culkin, A Real Pain; Clarence Maclin, Sing Sing; Guy Pearce, The Brutalist; Stanley Tucci, Conclave; Denzel Washington, Gladiator II
Best Supporting Actress
Up
Zoe Saldaña, Emilia Pérez
Emilia Pérez letsSaldaña put her Center Stage training to good use: She kicks the film off with a spirited musical number, then gets another showstopping sequence that plays as if Bob Fosse had choreographed a Britney Spears VMAs performance. “Saldaña delivers thought in action, passionate energy suggesting untapped power and purpose,” Richard Brody notes in an otherwise negative review. As the film’s audience surrogate, a burned-out lawyer rediscovering her idealism, you can argue that she belongs in Best Actress. (Indeed, voters might decide to slot her there no matter how Netflix campaigns.) As long as she’s here, Saldaña’sforceful performance feels like the one to beat.
Up
Selena Gomez, Emilia Pérez
With Gascón and Saldaña looking locked, the true test of Emilia Pérez’sstrength will be whether Gomez, who has the Sally Field part in this twisted Mrs. Doubtfire, can manage a coattail nomination. “Gomez fully commits to the bit of this woman who is being gaslit into insanity,” says Lindsay Bahr. “But she and the film crescendo into absurdity, with little in the way of relief or catharsis.” Though Gomez’s Emmy-nominated turn in Only Murders in the Building should earn her credit from voters who might have otherwise written her off, I don’t think she’ll be helped by another pop star, Wicked’s Ariana Grande, steadily gaining momentum in this race.
Current Predix
Danielle Deadwyler, The Piano Lesson; Ariana Grande, Wicked; Felicity Jones, The Brutalist; Saoirse Ronan, Blitz; Zoe Saldaña, Emilia Pérez
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();
// ]]