ByE.J. Dickson,
senior writer at the Cut covering culture.Formerly a senior writer at Rolling Stone, she's also cohosted two podcasts: 'Don’t Let This Flop,' which was featured on Esquire's Best Podcasts List of 2022; and 'Podcats,' which was featured on 'This American Life.'
Photo-Illustration: by The Cut; Photos: Universal Pictures, STANLEY
On November 22, former theater-camp mean girls and millennial gays will have something else to fight over when tickets are finally available for the long-awaited Wicked movie. Starring Cynthia Erivo and Ariana Grande, Universal Pictures’ adaptation of the Broadway megamusical will either be the cinematic event of the holiday season or a bloated CGI monstrosity, depending on how you felt about the trailer. But one thing Wickeddefinitely won’t be is a global earnings loss, if Universal’s brand-and-marketing team has anything to say about it.
Over the past few months, the company has released a truly dizzying amount of Wicked-branded merch, including dolls, eye-shadow palettes, Barbies, Squishmallows, and fuzzy pink-and-green slippers that, when viewed from a distance, make the wearer look as if they have a tropical foot disease. Even Stanley is getting in on the collab game, announcing earlier this week that it would be releasing a line of Wicked-branded tumblers.
Did anyone ask for this? It’s unclear. But for those who have wasted many an hour on the Broadway World forum, arguing over whether Eden Espinosa has a better high belt than Shoshana Bean, it’s a dream come true.
Below, we’ve rounded up some of the most gravity-defying Wicked-themed items, rated by aaahhhAAAHHHahhhAHHHs (the iconic Elphaba battle-cry riff, for the uninitiated).
This Voluspa set includes two candles: an Elphaba-themed green candle called Bewitching Banyan Forest and a pink-themed Glinda candle called Perfectly Pink Yuzu. (“Pink goes good with green” is a line from the musical and a symbol of Glinda and Elphaba’s unlikely friendship; it is also, for the purpose of Universal’s global-marketing team, an incredibly useful tool for selling eye-shadow palettes.) At $98, the candle duo is on the pricier side, but I could see some clueless dad buying this for his teenage daughter as a way of trying to reconnect after the divorce. (Don’t bother: She’s still mad at you.)
I’m not sure where to start with this one. It’s not remotely on brand for the whimsical, steampunk-inspired aesthetic of the world of Oz; it looks like it was designed for the type of teenage praise-group member who finds Hollister too flamboyant. There’s also a clearly Taylor Swift–inspired faded tee that reads “Defy Gravity” for $29.99, as well as the above button-down Aerie x Wicked Seersucker Shirt ($49.95) that looks like something your dad would wear while ordering pie. The Real Soft Crew Socks ($9.95) are literally just black socks that have the word Wicked inscribed on them. The whole thing screams “cash grab,” and not a particularly cute one at that.
This sweatshirt available at Wal-Mart is … fine. It’s a little dull. Personally, I would spend ten times as much on a sweatshirt featuring Tina Fey’s “authenticity is dangerous and expensive” speech to Bowen Yang from that episode of Las Culturistas. But at $12.99, it’s the perfect price point for a birthday gift for a classmate your kid doesn’t like.
I’ll be honest: I love these dolls. I love the adorable little social-media rollout Erivo and Grande did where they pretended to see them for the first time and made a big deal oohing and aahing over them. I love that the Elphaba doll has braids and baby hairs and cute freckles, and I love that the Glinda doll has Grande’s arched eyebrows, which make her look like she’s constantly on the verge of yelling at a reporter for asking about Ethan Slater. If I were a 9-year-old girl, I would beg my mom to get both of them, and then I would force her to watch me make them perform “For Good” over and over, and she’d applaud politely and refrain from telling me that I don’t have the range for either role, thus perpetuating my delusion that I can high belt and beginning the vicious cycle of alto trauma anew. The limited-edition Elphaba (in Shiz University attire) and Madame Morrible dolls ($80) are also incredibly cool. It brings me a sense of zenlike calm to think about all the Wicked dolls living together on a shelf together in a Hell’s Kitchen studio apartment, getting their hair lovingly brushed by a 55-year-old part-time rehearsal accompanist.
This collab with Wet Brush (available on Ulta) comes in three different themes: Glinda (complete with Glinda’s trademark butterfly clips!), Elphaba (complete with Elphaba’s trademark ribbon!), and the more generic Emerald City theme (complete with Boq’s trademark … scrunchy?). At first, I thought this was incredibly silly, and then I started fantasizing about sitting in front of the mirror using the pink brocade brush and the bobby pins, and I was so entranced by this vision that I started clapping my hands and giggling.
There are many things about this Forever 21 garment that I find baffling — the shapelessness, the Susie Greene–esque bedazzling, the fact that it’s a sports team jersey when Elphaba is famously averse to organized group activities. But, mostly, it’s the formatting that I consider problematic. Is there anyone who works for Forever 21 who has seen a sporting event or stepped foot inside a Modell’s? The last name goes on the back of the jersey, not the front. And according to the website, you’re supposed to style it with a trench and kitten heels?
As seen on Kim Kardashian’s Instagram Stories, these Bombas calf socks are allegedly “so comfy, you’ll feel like you’re floating over Oz,” per the product description on the website. Let’s assume this is true. Why do they come in lavender? How does lavender factor into the palette of the Wicked universe at large? Just stick with pink and green and call it a day. It’s like writing 3,000 words on a 500-word assignment. No need for this type of showboating.
Available exclusively at Bloomingdale’s, AQUA has partnered with Wicked’s costume designer Paul Tazewell to launch a line of Oz-inspired holidaywear. Judging by garments such as this embellished column dress, this assignment was interpreted broadly. This looks less like something Nessarose would wear and more like something Nomi from Showgirls would buy when she hit her 40s. But it’s a really cute dress! I’d also buy this swirl jacquard corset top ($68) and this embellished twist maxi dress ($168) if I (a) had fewer qualms about my body and (b) got invited to a holiday party that was not at an elementary-school classroom or a toddler gym.
A replica of Glinda and Elphaba’s dorm at Shiz University, this LEGO set is perfect for re-creating the exact moment on set when Erivo, via a loose-lipped production assistant, found out about Grande’s relationship with the SpongeBob guy. For that specific purpose, at $69.99, it’s worth every penny.
You may be asking yourself: Where is the merch for the legions of queer and hetero-flexible men who can tell you, without Googling, what Elphaba’s vocal range is? (It’s a G3 to an F#5, though anyone reading this probably already knows that.) This Aldo collab includes a range of sweet-looking bejeweled loafers, suede smoking slippers, and black-and-emerald sneakers for the teenage boy who thinks he’s a Fiyero but is actually a Boq sun, Doctor Dillamond rising. There’s also a line of handbags, accessories, and heels for the ladies, including these pale-pink stilettos and gold-charm-encrusted black platform sandals (both $160), though they look less whimsical and more like something an out-of-town prom date would wear before stealing everyone’s iPhone chargers.
Funko Pop has released a line of Wicked-inspired vinyl figures, including Elphaba (above), Glinda (available in her trademark bubble gown and in the nightgown Grande wears in the film), Fiyero, and Madame Morrible. In a veritable ouroboros of cross-brand collaboration, the collectibles brand is also partnering with Loungefly to sell Wicked-themed backpacks, keychains, and a pretty cute journal ($30) inspired by Glinda’s Shiz University uniform, which I absolutely would have purchased semi-ironically when I was 14 and scrawled Dead Kennedys lyrics all over the pages.
Come on: Did you really think Grande’s team wasn’t going to take advantage of a cross-promotional opportunity by releasing a Wicked-themed capsule collection via her makeup line, r.e.m. beauty? The limited-edition collection includes not only Elphaba- and Glinda-inspired sets ($60), but also glow drops ($34), a lip oil $20), under-eye masks ($26), and an Ozdust palette featuring such shades as Normal Is Overrated (a very normal-looking taupe), Thrillifying! (a muted rose), and Positively Green (which can best be described as 1950s-era-Kermit hued). Embellished with whimsical hot-air balloons, butterflies, and flying monkeys, the packaging is beautiful, but the real question for me is: How does it compare to the Garfield-themed eye-shadow palette I impulse-bought off TikTok Shop, including such shades as Lasagna, Donut, Please, and I Hate Mondays?
For customers whose love for mezzo-sopranos is exceeded only by their passion for urinating 28 times a day, Stanley is introducing a themed collab with Wicked on October 13. The cups come in two colors — sparkly pink and green — and feature a flying monkey above the logo.The r/StanleyCups sub-Reddit is absolutely losing its shit over these cups, for reasons that are frankly lost on me (unless you are a long-distance runner or an actual camel, I don’t see how it could possibly be medically necessary to drink that many fluids in a day). But far be it from me to deprive some poor high-school-theater girl on vocal rest the opportunity to smugly sip hot tea from a Wicked-branded Stanley while the rest of the cast rehearses “Mamma Mia.”
This checkerboard bubblegum-pink-and-green satchel from Cambridge Satchel is functional and cute, but will it go with any of your outfits? Unless you work at a Limited Too in Munchkinland, probably not.
Regal Movies Glinda and Elphaba Tumbler, Popcorn Bucket, and Tin (available November 22)
If a movie comes out during the holiday season and it doesn’t have an accompanying popcorn-bucket launch, did it ever truly come out in theaters at all? (And if you don’t want a popcorn bucket, the theater is also selling plush pillows.)
If you get my husband drunk enough, he will regale you with a lengthy diatribe about what a missed opportunity it was for him not to have invested in Crocs stock during the pandemic. I don’t know enough about the stock market to tell you whether or not he’s right. All I know is, this is the fugliest effing shoe I have ever seen.
This was the point where I threw my hands up in the air and said, “Okay. Okay! Fine. I’ll play your little game. I’ll see the movie. I’ll buy the dolls. I’ll emotionally invest in Bowen Yang and Ariana Grande’s BFF-ship. I’ll even pretend I don’t find Jeff Goldblum creepy in the trailer. Just don’t make me eat the pink-and-green macaroni and cheese. Please. Anything but that.” (I will, probably, eat it.)
Rating: 40 out of 10 ahhhhAHHHHHHahhhhhs. What can I say? Much like the Great Value brand design team that used an Arial font for the product label, I have given up.
This multi-styling tool that allows you to “curl, volumize, smooth, and dry your hair without heat damage to style with a touch of magic” (per the website) is both cool-looking and functional. It also comes with a simple black styling bag, and I appreciate that the manufacturers resisted the urge to bedazzle it, put little Munchkin faces on it, or have Stephen Schwartz gently bless it with a kiss, as is the case with many of these other collabs.
Following its successfulBarbie-themed collab, the Shay Mitchell–owned luggage brand Beís announced it will launch a line of Wicked-inspired roller luggage (ranging from $268 to $378), backpacks ($148), tote bags ($158), and a toiletry kit ($68). Fans are particularly excited for the launch of the company’s trademark Weekender bag ($168), which will be available in deep emerald and bubblegum pink.
I am not the target audience for this luggage line. The concept of spending more than $300 on a piece of luggage when I could just as easily schlep around my wardrobe in a Glad bag is anathema to me. That said, something has changed within me, and I am absolutely obsessed with the emerald finish on the Elphaba Weekender bag. So, if anyone from Beís is reading this — or, alternatively, a prospective sugar daddy who is okay with no physical contact whatsoever — feel free to email me.
Starbucks just announced its “thrillifying” Wicked collab, which includes 16 cups, including a Glinda-themed “Prism Cold Cup with Wand Straw Topper (24 oz.) & Keychain” ($34.95 for the cup, $17.95 for the keychain), and the checkered cold cup up above. Listen, I am asking the Wicked merchandising team respectfully: When is this onslaught going to end? Because at a certain point, I’m starting to think that the answer to that question is “my death.”
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();
// ]]