There is something vague and unseeing in the gaze young women cast at older ones.Those figures paddling across the slough of middle age, headed toward the glowing shores of the golden years — the ones no longer desirable but, inconveniently, not yet dead — are out there, on the horizon, but they’re a little … fuzzy. In Miranda July’s 2006 short story “Something That Needs Nothing,” an older woman hires two artsy younger women for sex. They’re 19 or 20, but the woman’s “age was hard to determine from our vantage point, a point in our lives when we could not bring older bodies into focus.”“Young people especially had trouble making distinctions between ages over 40,” thinks the unnamed narrator of July’s new novel, the gutsy, funny, wise, chaotic, dirty, panic-inducing All Fours. When that narrator can bring herself to look at women a couple decades deeper into the muck, something worse than uncertainty gets stirred up — it’s outright loathing. “Sometimes my hatred of older women almost knocked me over, it came on so abruptly,” she admits. “These ‘free spirits’ who thought they could just invent the value of things.”
In a good romantic comedy, hate is only the prelude to love. All Fours tracks the narrator’s romantic and sexual obsessions, though the object of hate and love is herself, as she reckons with her aging body and mortality. She has just turned 45. If a life is something you throw into the air, she thinks, she’s reached the top; now all that remains is the fall.
The particulars of her life and work strongly, provocatively, resemble July’s. “I won’t get into the tedious specifics of what I do,” the narrator says, “but picture a woman who had success in several mediums at a young age and has continued very steadily, always circling her central concerns in a sort of ecstatic fugue state with the confidence that comes from knowing there is no other path — her whole life will be this single conversation with God.” July, a 50-year-old filmmaker, fiction writer, and performance artist, lives in Los Angeles, where she co-parents her child with her soon-to-be ex-husband, the filmmaker Mike Mills. Her investigation of the body, desire, loneliness, and the failure to connect used to be maligned as twee — as if having an unusual mind were a weakness — yet time has vindicated her careful, compassionate documentation of the anxiety of life in the early digital era. From dark and lacerating short stories like 2007’s “Roy Spivey” and 2017’s “The Metal Bowl,” to the astute, creepily resonant film 2011’s The Future and her wacky, yet deeply moving, debut novel, 2015’s The First Bad Man, July is a fabulist of mortality. Her characters feel the dread of making the choices that define one’s time on earth and suffer the consequences for taking — and missing — their chances.
Early in All Fours, the narrator sets out alone on a road trip to New York from L.A., where she lives with her music-producer husband, Harris, and their child, Sam. She’s more of a Parker than a Driver (these are Harris’s terms; Drivers can “maintain awareness and engagement even when life is boring,” while Parkers like applause and are good in an emergency), so she’s slightly nervous about the trip. She winds up redecorating a motel room half an hour from home and staying there for three weeks, having an emotionally fevered affair with a hot 31-year-old aspiring hip-hop dancer named Davey. Like a modern-day Wakefield, the title character of the Nathaniel Hawthorne story who told his wife he was going on a brief journey and spent the next 20 years hiding around the corner, July’s narrator burrows into a new life just out of sight of the old one. But unlike the absurd Wakefield, who for no discernible reason risks “losing his place forever” and becoming “the Outcast of the Universe,” July’s narrator discovers her true self. On the way, she confronts perimenopause, lesbian desire, the dramas of being a minor celebrity, the tedium of motherhood, birth trauma, and one very interesting thing you can do with a tampon.
One of the pleasures of All Fours is surprise. (I don’t want to ruin it, but again: that tampon!) Another is July’s ability to take familiar, everyday experiences and return them strange and new and precisely voiced. When I arrived at a passage about the sadness of seeing the OB/GYN after you are done bearing children, I thought for a moment that July had been reading my texts. What she had to say, though, was far more unexpected. She doesn’t sink into melancholy but indulges in animated speculation, venturing into the weirder territories of the mind.
I watched the pregnant woman committedly read her magazine, snug as a bug in a rug, the very center of the universe. To the degree she saw us older women, she pitied us. She was in the midst of something very exciting, very right, and after this phase there would be a baby, and it was unclear what would happen to her after that but probably more good stuff! Better and better! And the woman in her seventies, well, nobody except the doctor knew — or could even conceive of — what was going on between her legs, though I tried and saw gray labia, long and loose, ball sacks emptied of their balls. How did it feel to still be dragging your pussy into this same office, decades after all the reproductive fanfare? She was scrolling on her phone, seemingly unbothered or unaware that she had nothing to look forward to, cunt-wise.
At this doctor’s visit that the narrator learns she is officially perimenopausal. She isn’t so bothered by the idea of menopause until she realizes that one of its symptoms is “reduced libido.” She can’t lose her sex drive; she just found it! She becomes fixated on having sex with Davey before she stops having sex altogether. Perhaps fixated isn’t the right word. She’s consumed. “I wanted to have sex with him before I died, because after I died I’d have to go on living another 45 years.”
For readers of a certain age, these passages, which capture a romantic longing that is adolescent in its intensity, will provoke self-examination. In one sense, the narrator’s crisis is universal. You only live once — how should you live? Have you made the right calls? Is there time to make different ones? What do you want so much that you’re willing to give everything else up to have it? Yet if the narrator is a delightfully warped Everywoman, she’s also a famous person with time and money to spare, an artistic genius whose self has always been her material. There’s something seductive and fascinating about watching someone shape their life like a project. It’s also alienating and a little bit weightless. All Fours unfolds in a vacuum where history, politics, and economics don’t exist; the only constraints are desire and will. There’s no sense in this book that a life is something to muddle through, with pockets of happiness and unhappiness along the way, or that a life might be best lived in service to something other than the self. A life in this book is something to be curated, designed, and maximized.
Aging makes the narrator keenly observant of the body, and the body is what powers the book: how they smell and feel, the texture of skin and flesh, what it’s like to dance. Early on, she’s a “mind-rooted” fucker: she describes having sex with Harris as involving so much internal fantasy that it’s like having a screen “clamped over her face.” Eventually, she becomes less thinking and more feeling. Back in “Something That Needs Nothing,” July didn’t describe the sex with the middle-aged woman; it appears only as a series of disconnected flashes: “I see she is standing before us in a slip and it is not really clean and I die. I see that Pip is taking off her shoes and I die. I see that I am squeezing a nipple and I die.” In All Fours, the specificity of observations about the body is staggering.The novelexcavates every sensation, every intriguing fold of flesh.In its attentiveness is an ecstatic liberation.At the book’s turning point, the narrator touches an older woman’s skin — it’s getting thinner, “like a banana’s” — and expects it to feel “gross”; instead, “it felt incredible, velvety warm water.Well, knock me over with a feather, I thought. Who knew.”
Why is aging so scary? For some, the deterioration of the body is innately disturbing. Getting older is the first time that the narrator of All Fours has had to confront dissatisfaction with her body. She’s pretty and thin and has, a woman in her 20s observes, “great skin.” But when she uses her phone to film herself shaking her naked butt, she’s surprised by what she sees. “I recorded from a different angle, but it didn’t help. Something had happened back there; there was no way to know exactly when. It was like when you can’t find your purse and then realize it’s been stolen.” Her butt, which she recalls as round, is long; it looks like a pair of “fat arms.” Also, there’s a “tushy” on her abdomen, below the navel. One of the pleasures of being in a long relationship is allowing a certain amount of acceptance of the powers of gravity and time. But she’s trying to seduce a younger man, so with grim determination, she commits to lifting weights, imagining “the body I wanted to present to him … as if he and I were one person and my body was for our enjoyment.” It’s a dissociated logic, and it doesn’t last. She discovers that exercise does wonders for the anxious mind: “In the last few minutes of the session, my body began to give out and my mind just stopped.”
For others, aging is frightening because of where it ends. As Gertrude Steinput it, “Any one coming to be an old enough one comes to be a dead one.” But the narrator of All Fours is not overly preoccupied with death. She already met it, or nearly, when Sam was born.Two months before her due date, she had a fetal-maternal hemorrhage,in which the baby’s blood drains into the mother’s body. Usually, this complication leads to a stillbirth; Sam, born “paper-white,” spent 17 days in the NICU, intubated and receiving transfusions. For those days, the narrator imagined and talked to two babies, one struggling to live and one already dead: “I did not play favorites because regardless of the outcome I knew I would always have two babies.” Sometimes when she hears noises reminiscent of the hospital — the dings of a cash register or the pings of metal carts — she experiences flashbacks. “It was always a relief when a flashback came over me. I hadn’t forgotten; I was still a good mother.”
There’s also a birth complication in The First Bad Man. In the novel, the mother winds up giving the baby to her girlfriend, the book’s narrator, who raises the child. The mother’s hemorrhage and the baby’s time in the NICU contribute to the sense that the preciousness of life is bound up in its arbitrariness.In All Fours, the emphasis is on how to live with and after the body’s senseless malfunctioning. The circumstances of Sam’s birth and the ongoing nature of the flashbacks help us understand why the narrator stayed so long in an unsatisfying marriage — she and Harris have a trauma bond.(They also provide some context for the narrator being cut off from her body during sex and otherwise.) She welcomes the NICU flashbacks, comparing them to menstrual periods: “Involuntary, not easy, but still a relief, to be unexpectedly pulled into something so primeval, almost cozy in its leveling pain.”
Deterioration is bad, death is inevitable, though disappearance is what All Fours really fears. July memorably explored the agony of invisibility in “The Metal Bowl,” in which a woman gets depressed when she realizes that she’s too old to be recognized for the amateur pornographic video she posted online when she was young:“How do you mourn that kind of loss? It just pulls your whole life down.” In All Fours, the narrator is constantly aware of whether and how she is perceived by others. Early in the novel, she attends a house party, where she, in a tight skirt and sheer top, dances in the living room. “All my limbs were in motion, making shapes that felt brand new.” She can’t tell if her friends are “impressed” or “embarrassed” for her. “The host’s father looked me up and down and winked — he was in his 80s. Was that how old a person had to be to think I was hot these days?” The answer is “no.” Though she assumes she’s unseeable or indiscernible like a regular middle-aged wraith, she isn’t; Davey is a fan who loves her work and recognized her right away. The lesson she learns about aging is that, actually, she isn’t too old. The younger guy wanted her all along.
Davey is not just any aspiring hip-hop dancer; his boogie is divine. When he “takes flight,” the narrator releases her inhibitions. All Fours is the culmination of decades of July’s writing and thinking about physical movement and its power to bring people together. In The First Bad Man, the narrator and her girlfriend physically fight and wrestle rather than talk about their feelings. In the short story “Making Love in 2003,” a character’s dance moves are “so powerful” that they summon a dark glowing shape from the universe: “I’m not saying I asked for it, only that there are moments when we are sending signals not just to the boys in the room but to all of creation.” In All Fours, dance — for those who speak its language — is a blissful space free of shame. It gets around the failures of language and the isolation of consciousness and dissolves the pain of wanting into joy. The narrator’s usual rate of epiphanies — several to a page — increases significantly when she watches Davey dance or dances with him. And yet it’s hard to entirely accept the narrator’s idea that dance is superior to language or buy into all of her raptures. A novel is written in words, after all; “wordless communication” is what plants do. More interesting than the celebration of dance is how July writes about sexual role-playing, which allows her characters to be themselves and someone else at the same time.
July’s novel is hot and weird and captivating and one of the most entertaining, deranged, and moving depictions of lust and romantic mania I’ve ever read. It speaks frankly about women’s bodies; she’s a master of sentences. In the end, however, it exudes the off-putting assurance of a convert and steers into the lane of self-help. As the narrator’s marriage evolves, the book falls apart. Her despair and obsession — the stuff of great literature — gets diffused into open and honest conversation, scheduling, and lessons learned. Everyone is very mature. This modern solution to the marriage problem may be a good thing in real life, but it just can’t pack the classic novelistic wallop of love and death. To some extent, this is a matter of sensibility. Mine — like July’s used to be — is tragic. I don’t think we can solve our lives, or optimize them like an app, and I don’t want art that claims to resolve anxiety with instruction or empowerment. All Fours ends on a note of personal growth with the narrator’s shimmering, unironic declaration that she can overcome the age-old conundrum of not having what you want and not wanting what you have. “I could always be how I was in the room,” she decides. “Imperfect, ungendered, game, unashamed.” It sounds just a little too much like having it all.
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();
// ]]