1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="c9f3cdf5-e0fb-1dd2-b2d1-85f99040ade1")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,231035,744392,278005,e=>{"use strict";var t=e.i(478902),a=e.i(197649);e.i(224217);var i=e.i(954555),r=e.i(90394),s=e.i(478225),n=e.i(180144),o=e.i(17469),l=e.i(865935),u="huf3u52 wcojt3a";e.s(["button",0,"huf3u5m","checkoutResultContainer",0,"huf3u50","checkoutResultDescription",0,u,"checkoutResultTitle",0,"huf3u51 wcojt37","customSupportEmail",0,"huf3u5k","divider",0,"huf3u5i","emailAddressText",0,"huf3u5f","emailConfirmationText",0,"huf3u5e","firstScreenBottomContainer",0,"huf3u5h","manageNewslettersLink",0,"huf3u5l","newsletterCard",0,"huf3u55","newsletterCardDesc",0,"huf3u58","newsletterCardImage",0,"huf3u56","newsletterCardTitle",0,"huf3u57","newsletterCards",0,"huf3u53","newsletterCardsSingle",0,"huf3u54","podcastSpinner",0,"huf3u5c","podcastWidget",0,"huf3u59","returnButton",0,"huf3u5j","useThisEmailText",0,"huf3u5g"],744392),e.i(807738);var d=e.i(738886),c=e.i(970060),h=e.i(184503);e.s(["default",0,({onClick:e})=>{let f=(0,l.useCategoryList)(),m=(0,o.useSuggestedCategories)({followCategories:[],categoryResourceList:f}),g=m.some(e=>e.free);return(0,t.jsx)("div",{className:h.default,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:c.sharedStyles.login.heading,children:"Follow your interests"}),(0,t.jsx)("p",{className:u,children:"Customize your Verge homepage and get email notifications by following topics and authors throughout the site."}),(0,t.jsx)("ul",{className:"nq4q1d0",children:m.map((e,o)=>(0,t.jsx)("li",{className:"nq4q1d1",children:(0,t.jsx)(i.default,{resourceId:e.id,name:e.title.toLowerCase(),overrideText:e.title.toLowerCase(),type:"category",gaComponentName:"subscription_flow",className:"nq4q1d2",followingClassName:"nq4q1d3",isOnboarding:!0,CheckIcon:(0,t.jsx)(s.default,{layout:"checkoutOnBoarding"}),PlusIcon:(0,t.jsx)(n.default,{layout:"checkoutOnBoarding"}),RightIcon:e.free&&(0,t.jsx)("span",{className:(0,a.default)(r.freeIcon,"nq4q1d7"),children:"*"})})},e.id||o))}),g&&(0,t.jsx)("span",{className:(0,a.default)(r.freeDisclaimer,"nq4q1d6"),children:"* Free to read"}),(0,t.jsx)(d.default,{onClick:e,displayType:"account",text:"Continue Reading",fullWidth:!0,className:"nq4q1d5"}),(0,t.jsx)("a",{href:"/account/newsletters",target:"_blank",className:"nq4q1d4",children:"Manage email preferences"})]})})}],278005),e.s([],231035)},90394,e=>{"use strict";e.s(["button",0,"pkbs206","container",0,"pkbs200","description",0,"pkbs201","followItem",0,"pkbs204","followItemActive",0,"pkbs205","followItemContainer",0,"pkbs203","followList",0,"pkbs202","freeDisclaimer",0,"pkbs208","freeIcon",0,"pkbs207","signInCTA",0,"pkbs209","signInCTALink",0,"pkbs20a"])},17469,e=>{"use strict";var t=e.i(389959);let a=[{slug:"ai-artificial-intelligence",free:!1},{slug:"apple",free:!1},{slug:"apps",free:!1},{slug:"business",free:!1},{slug:"features",free:!1},{slug:"film",free:!1},{slug:"gadgets",free:!1},{slug:"games",free:!1},{slug:"good-deals",free:!0},{slug:"google",free:!1},{slug:"microsoft",free:!1},{slug:"news",free:!1},{slug:"policy",free:!1},{slug:"reviews",free:!1},{slug:"science",free:!1},{slug:"smart-home",free:!1},{slug:"streaming-wars",free:!1},{slug:"transportation",free:!1},{slug:"tv",free:!1}];e.s(["useSuggestedCategories",0,({followCategories:e,categoryResourceList:i})=>(0,t.useMemo)(()=>{let t=(({followedCategoryIds:e,categoryResourceList:t})=>{let i=new Map(t.map(e=>[e.slug,e]));return a.flatMap(({slug:t,free:a})=>{let r=i.get(t);return!r||e.has(r.id)?[]:[{id:r.id,type:"category",name:r.title,path:r.path,free:a}]})})({followedCategoryIds:new Set(e?.map(e=>e.id)||[]),categoryResourceList:i??[]}),r=new Map(i?.map(e=>[e.id,e])??[]);return t.flatMap(e=>{let t=r.get(e.id);return t?[{...t,free:e.free}]:[]})},[e,i])],17469)},291200,e=>{"use strict";var t=e.i(478902);e.i(231035);var a=e.i(278005),i=e.i(315),r=e.i(394903),s=e.i(128052);e.i(340783);var n=e.i(315585),o=e.i(389959);e.i(968425),e.i(178557),e.i(825474);var l=e.i(85582);e.i(718514);var u=e.i(597406);e.i(528597);var d=e.i(283869);let c=({CustomScreenComponent:e,customHeading:a})=>{let i=(0,n.useRouter)(),{user:r,userLoading:s}=(0,u.useAuth)(),[c,h]=(0,o.useState)(!s);(0,o.useEffect)(()=>{s||c||h(!0),c||s||!r||(window.location.href="/account/profile")},[s,r,c]);let f=i.query.returnPath&&"string"==typeof i.query.returnPath?i.query.returnPath:"";return(0,t.jsx)(l.default,{seoTitle:"Login",noindex:!0,children:(0,t.jsx)(d.default,{redirectPath:f,shouldRedirect:!0,customHeading:a,CustomScreenComponent:e})})},h=(0,s.default)(({categoryList:e})=>(0,t.jsx)(r.default,{categoryList:e,children:(0,t.jsx)(i.FollowsProvider,{children:(0,t.jsx)(c,{CustomScreenComponent:a.default})})}));e.s(["__N_SSP",0,!0,"default",0,h],291200)},479091,(e,t,a)=>{let i="/auth/login";(window.__NEXT_P=window.__NEXT_P||[]).push([i,()=>e.r(291200)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([i])})},838460,(e,t,a)=>{t.exports=function(e,t,a,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(a=e[++r]);++r<s;)a=t(a,e[r],r,e);return a}},390568,(e,t,a)=>{t.exports=function(e){return function(t){return null==e?void 0:e[t]}}},291996,(e,t,a)=>{t.exports=function(e,t,a){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(a=a>r?r:a)<0&&(a+=r),r=t>a?0:a-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}},8755,(e,t,a)=>{var i=e.r(291996);t.exports=function(e,t,a){var r=e.length;return a=void 0===a?r:a,!t&&a>=r?e:i(e,t,a)}},364927,(e,t,a)=>{var i=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(e){return i.test(e)}},256779,(e,t,a)=>{t.exports=function(e){return e.split("")}},19728,(e,t,a)=>{var i="\\ud800-\\udfff",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",s="\\ud83c[\\udffb-\\udfff]",n="[^"+i+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+s+")?",d="[\\ufe0e\\ufe0f]?",c="(?:\\u200d(?:"+[n,o,l].join("|")+")"+d+u+")*",h=RegExp(s+"(?="+s+")|"+("(?:"+[n+r+"?",r,o,l,"["+i+"]"].join("|"))+")"+(d+u+c),"g");t.exports=function(e){return e.match(h)||[]}},136144,(e,t,a)=>{var i=e.r(256779),r=e.r(364927),s=e.r(19728);t.exports=function(e){return r(e)?s(e):i(e)}},504442,(e,t,a)=>{var i=e.r(8755),r=e.r(364927),s=e.r(136144),n=e.r(213296);t.exports=function(e){return function(t){var a=r(t=n(t))?s(t):void 0,o=a?a[0]:t.charAt(0),l=a?i(a,1).join(""):t.slice(1);return o[e]()+l}}},676145,(e,t,a)=>{t.exports=e.r(504442)("toUpperCase")},472299,(e,t,a)=>{t.exports=e.r(390568)({Ã:"A",Ã:"A",Ã:"A",Ã:"A",Ã:"A",à :"A",à :"a",á:"a",â:"a",ã:"a",ä:"a",Ã¥:"a",Ã:"C",ç:"c",Ã:"D",ð:"d",Ã:"E",Ã:"E",Ã:"E",Ã:"E",è:"e",é:"e",ê:"e",ë:"e",Ã:"I",Ã:"I",Ã:"I",Ã:"I",ì:"i",Ã:"i",î:"i",ï:"i",Ã:"N",ñ:"n",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",Ã:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ã:"U",Ã:"U",Ã:"U",Ã:"U",ù:"u",ú:"u",û:"u",ü:"u",Ã:"Y",ý:"y",ÿ:"y",Ã:"Ae",æ:"ae",Ã:"Th",þ:"th",Ã:"ss",Ä:"A",Ä:"A",Ä:"A",Ä:"a",Ä:"a",Ä :"a",Ä:"C",Ä:"C",Ä:"C",Ä:"C",Ä:"c",Ä:"c",Ä:"c",Ä:"c",Ä:"D",Ä:"D",Ä:"d",Ä:"d",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"E",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"e",Ä:"G",Ä:"G",Ä :"G",Ä¢:"G",Ä:"g",Ä:"g",Ä¡:"g",Ä£:"g",Ĥ:"H",Ħ:"H",Ä¥:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Ä®:"I",İ:"I",Ä©:"i",Ä«:"i",Ä:"i",į:"i",ı:"i",Ä´:"J",ĵ:"j",Ķ:"K",Ä·:"k",ĸ:"k",Ĺ:"L",Ä»:"L",Ľ:"L",Ä¿:"L",Å:"L",ĺ:"l",ļ:"l",ľ:"l",Å:"l",Å:"l",Å:"N",Å :"N",Å:"N",Å:"N",Å:"n",Å:"n",Å:"n",Å:"n",Å:"O",Å:"O",Å:"O",Å:"o",Å:"o",Å:"o",Å:"R",Å:"R",Å:"R",Å:"r",Å:"r",Å:"r",Å:"S",Å:"S",Å:"S",Å :"S",Å:"s",Å:"s",Å:"s",Å¡:"s",Å¢:"T",Ť:"T",Ŧ:"T",Å£:"t",Å¥:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Å®:"U",Ű:"U",Ų:"U",Å©:"u",Å«:"u",Å:"u",ů:"u",ű:"u",ų:"u",Å´:"W",ŵ:"w",Ŷ:"Y",Å·:"y",Ÿ:"Y",Ź:"Z",Å»:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Å:"Oe",Å:"oe",Å:"'n",Å¿:"s"})},121596,(e,t,a)=>{var i=e.r(472299),r=e.r(213296),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
27f]/g,n=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(e){return(e=r(e))&&e.replace(s,i).replace(n,"")}},131888,(e,t,a)=>{var i=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(e){return e.match(i)||[]}},114039,(e,t,a)=>{var i=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(e){return i.test(e)}},291697,(e,t,a)=>{var i="\\ud800-\\udfff",r="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="['â]",u="["+o+"]",d="["+s+"]",c="[^"+i+o+"\\d+"+r+s+n+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+n+"]",g="(?:"+d+"|"+c+")",p="(?:"+m+"|"+c+")",x="(?:"+l+"(?:d|ll|m|re|s|t|ve))?",w="(?:"+l+"(?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",j="[\\ufe0e\\ufe0f]?",v="(?:\\u200d(?:"+["[^"+i+"]",h,f].join("|")+")"+j+y+")*",b="(?:"+["["+r+"]",h,f].join("|")+")"+(j+y+v),S=RegExp([m+"?"+d+"+"+x+"(?="+[u,m,"$"].join("|")+")",p+"+"+w+"(?="+[u,m+g,"$"].join("|")+")",m+"?"+g+"+"+x,m+"+"+w,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",b].join("|"),"g");t.exports=function(e){return e.match(S)||[]}},192724,(e,t,a)=>{var i=e.r(131888),r=e.r(114039),s=e.r(213296),n=e.r(291697);t.exports=function(e,t,a){return(e=s(e),void 0===(t=a?void 0:t))?r(e)?n(e):i(e):e.match(t)||[]}},283819,(e,t,a)=>{var i=e.r(838460),r=e.r(121596),s=e.r(192724),n=RegExp("['â]","g");t.exports=function(e){return function(t){return i(s(r(t).replace(n,"")),e,"")}}},103567,(e,t,a)=>{var i=e.r(283819),r=e.r(676145);t.exports=i(function(e,t,a){return e+(a?" ":"")+r(t)})},394903,e=>{"use strict";var t=e.i(478902),a=e.i(865935);e.s(["default",0,({authorList:e,categoryList:i,children:r})=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.default.Provider,{value:{authorList:e,categoryList:i},children:r})})])},283869,3404,814356,e=>{"use strict";var t=e.i(478902),a=e.i(197649),i=e.i(389959),r=e.i(103567),s="_1h1y5p00",n="_1h1y5p01",o="_1h1y5p02",l="_1h1y5p05",u="_1h1y5p06",d="_1h1y5p07",c="_1h1y5p08",h="_1h1y5p09",f="_1h1y5p0a",m="_1h1y5p0b",g="_1h1y5p0c",p="_1h1y5p0d",x="_1h1y5p0e",w="_1h1y5p0f",y="_1h1y5p0g _1h1y5p02",j="_1h1y5p0h",v="_1h1y5p0i",b="_1h1y5p0j";e.s(["brandCustomStepContainer",0,j,"buttonLink",0,n,"currentEmail",0,c,"divider",0,w,"emailContainer",0,d,"embeddedLoginContainer",0,v,"embeddedSpinner",0,b,"errors",0,l,"forgotContainer",0,s,"information",0,p,"migratedUserMessage",0,y,"resetPasswordInfo",0,o,"separator",0,h,"signupOrigin",0,u,"socialButton",0,m,"socialButtonReducedHeight",0,g,"socialLogins",0,f,"socialPrompt",0,x],3404),e.i(807738);var S=e.i(738886);e.i(423961);var C=e.i(872674),N=e.i(970060),k=e.i(608439);let T=({onCommentingNameSubmit:e,loading:a})=>{let[s,n]=(0,i.useState)(""),{userProfileConfig:o}=(0,k.useConfigContext)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h1",{className:N.sharedStyles.login.heading,children:["Create your ",o.commentingNameLabel]}),(0,t.jsx)("div",{className:N.sharedStyles.login.formInfo,children:(0,t.jsx)("span",{children:"This will be your identity across the SB Nation network."})}),(0,t.jsxs)("form",{className:N.sharedStyles.login.form,onSubmit:t=>{t.preventDefault(),e(s)},children:[(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:N.sharedStyles.login.inputGroup,children:(0,t.jsx)(C.default,{type:"text",name:"commentingName",label:`${(0,r.default)(o.commentingNameLabel)}:`,value:s,required:!0,maxLength:255,onChange:e=>n(e.target.value)})})}),(0,t.jsx)("div",{className:l}),(0,t.jsx)(S.default,{disabled:a,type:"submit",text:"Submit",displayType:"account",fullWidth:!0})]})]})},E=({onNotYou:e,email:a})=>(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:d,children:[(0,t.jsx)("div",{className:c,children:a}),(0,t.jsx)("div",{className:h}),(0,t.jsx)("a",{className:n,href:"/auth/login",onClick:t=>{t.preventDefault(),e()},children:"Edit"})]})}),A=({showGoogle:e=!0,showFacebook:i=!0,showApple:r=!0,reducedHeight:s=!1,onSocialLogin:n})=>(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:f,children:[e&&(0,t.jsx)(S.default,{className:(0,a.default)(m,s&&g),displayType:"auth",fullWidth:!0,text:"Sign in with Google",onClick:()=>void n("Google"),role:"button",iconLeft:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",fill:"none",children:[(0,t.jsxs)("g",{clipPath:"url(#a)",children:[(0,t.jsx)("path",{fill:"#EA4335",d:"M6.5 2.375c.885 0 1.677.305 2.302.9l1.713-1.712C9.475.595 8.117 0 6.5 0a5.997 5.997 0 0 0-5.36 3.305l1.995 1.547c.472-1.422 1.8-2.477 3.365-2.477Z"}),(0,t.jsx)("path",{fill:"#4285F4",d:"M12.245 6.138c0-.393-.037-.773-.095-1.138H6.5v2.255h3.235A2.789 2.789 0 0 1 8.54 9.05l1.933 1.5c1.127-1.045 1.772-2.59 1.772-4.413Z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M3.132 7.148a3.575 3.575 0 0 1 0-2.295L1.137 3.305A5.978 5.978 0 0 0 .5 6c0 .97.23 1.885.64 2.695l1.992-1.547Z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M6.5 12c1.62 0 2.982-.533 3.973-1.453l-1.933-1.5c-.538.363-1.23.576-2.04.576-1.565 0-2.893-1.055-3.368-2.478L1.137 8.693A6.001 6.001 0 0 0 6.5 12Z"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"a",children:(0,t.jsx)("path",{fill:"#fff",d:"M.5 0h12v12H.5z"})})})]})}),i&&(0,t.jsx)(S.default,{className:(0,a.default)(m,s&&g),displayType:"auth",fullWidth:!0,text:"Sign in with Facebook",onClick:()=>void n("Facebook"),role:"button",iconLeft:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",fill:"none",children:(0,t.jsx)("path",{fill:"#0064E0",d:"M12.5 6.022C12.5 2.696 9.814 0 6.5 0s-6 2.696-6 6.022a6.02 6.02 0 0 0 4.55 5.845V7.862H3.813v-1.84H5.05V5.23c0-2.05.924-3 2.93-3 .38 0 1.036.075 1.304.15v1.668a7.686 7.686 0 0 0-.693-.022c-.984 0-1.364.374-1.364 1.346v.651h1.96l-.336 1.84H7.227V12A6.015 6.015 0 0 0 12.5 6.022Z"})})}),r&&(0,t.jsx)(S.default,{className:(0,a.default)(m,s&&g),displayType:"auth",fullWidth:!0,text:"Sign in with Apple",onClick:()=>void n("Apple"),role:"button",iconLeft:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",fill:"none",children:(0,t.jsx)("path",{fill:"#000",d:"M10.896 9.352c-.182.419-.396.805-.645 1.16-.34.483-.617.818-.831 1.004-.332.305-.688.461-1.068.47-.274 0-.603-.077-.987-.235-.385-.157-.739-.235-1.062-.235-.34 0-.703.078-1.092.235-.39.158-.704.24-.944.248-.365.015-.73-.145-1.093-.483-.231-.202-.521-.549-.869-1.04a7.194 7.194 0 0 1-.919-1.826A6.686 6.686 0 0 1 1 6.474c0-.804.174-1.498.522-2.079A3.061 3.061 0 0 1 2.615 3.29a2.94 2.94 0 0 1 1.477-.417c.29 0 .67.09 1.143.266.471.176.774.266.907.266.099 0 .435-.105 1.005-.314.539-.194.994-.274 1.366-.242 1.01.081 1.768.479 2.273 1.196-.903.547-1.35 1.313-1.341 2.296.008.766.286 1.403.832 1.91.247.234.523.415.83.544a8.948 8.948 0 0 1-.211.557ZM8.581.24c0 .6-.22 1.16-.657 1.68-.527.616-1.165.972-1.857.916a1.87 1.87 0 0 1-.014-.228c0-.576.251-1.192.696-1.696a2.68 2.68 0 0 1 .849-.637c.342-.167.665-.26.97-.275.009.08.013.16.013.24Z"})})})]})});var I=e.i(591370),P=e.i(315585);let _=()=>{let e=(0,P.useRouter)(),[t,a]=(0,i.useState)();return(0,i.useEffect)(()=>
2{if(!e.isReady)return;let{returnPath:t}=e.query;if(t&&"string"==typeof t)try{let e=decodeURIComponent(t).match(/returnTo=([^&]+)/);a(e?.at(1))}catch(e){(0,I.captureException)(e,{tags:{context:"identity"},extra:{message:"Error parsing returnTo URL"}})}},[e.isReady,e.query]),t},L=()=>{requestAnimationFrame(()=>{window.scrollTo({top:-1})})};e.s(["scrollToTop",0,L],814356);var q=e.i(210982),F=e.i(597406),R=e.i(647676),U=e.i(152929),O=e.i(875150),M=e.i(761953),W=e.i(582507);let D=({onSignupSubmit:e,onNotYou:a,loading:r,email:s,title:n})=>{let[o,u]=(0,i.useState)(""),[d,c]=(0,i.useState)(!1),{communityShortName:h}=(0,k.useConfigContext)().communityConfig,{productName:f}=(0,k.useConfigContext)().membershipConfig;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:N.sharedStyles.login.heading,children:n}),(0,t.jsx)("div",{className:N.sharedStyles.login.formInfo,children:(0,t.jsxs)("span",{children:["To finish setting up your ",h," account",f&&(0,t.jsxs)(t.Fragment,{children:[" and manage your ",f.toLowerCase()," details"]}),", create a password."]})}),(0,t.jsx)(E,{onNotYou:()=>{u(""),a()},email:s}),(0,t.jsxs)("form",{className:N.sharedStyles.login.form,onSubmit:t=>{t.preventDefault(),e(o)},children:[(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:N.sharedStyles.login.inputGroup,children:(0,t.jsx)(C.default,{type:"password",name:"password",label:"Password:",autoComplete:"new-password",required:!0,maxLength:255,onChange:e=>{var t;u(t=e.target.value),c(!(t.length<12))}})})}),(0,t.jsx)("div",{className:N.sharedStyles.login.emailRequirements,children:"⢠At least 12 characters in length"}),(0,t.jsx)("div",{className:l}),(0,t.jsx)(S.default,{disabled:!d||r,type:"submit",text:"Create account",displayType:"account",fullWidth:!0})]})]})},H=({email:e,onEmailSubmit:i,emailError:r,onChange:s,disableSubmit:n=!1,heading:o,hideHeading:l=!1,embedded:u=!1})=>{let d=(0,q.useAnalytics)(),c=(0,t.jsxs)(t.Fragment,{children:["Sign in or",(0,t.jsx)("br",{}),"create an account"]});return(0,t.jsxs)(t.Fragment,{children:[!l&&(0,t.jsx)("h1",{className:(0,a.default)(N.sharedStyles.login.heading,u&&N.sharedStyles.login.headingEmbedded),children:o||c}),(0,t.jsxs)("form",{className:(0,a.default)(N.sharedStyles.login.form,N.sharedStyles.login.formEmbedded),onSubmit:e=>{e.preventDefault(),i(),d?.emit({event:"authentication",authentication:{action:"continue with email"}})},children:[(0,t.jsx)("div",{className:(0,a.default)(N.sharedStyles.login.formInfo,N.sharedStyles.login.finePrint,u&&N.sharedStyles.login.finePrintEmbedded),children:(0,t.jsxs)("span",{children:["This email will be used to sign into Vox Media sites. By submitting your email, you agree to our"," ",(0,t.jsx)("a",{href:"https://www.voxmedia.com/legal/terms-of-use",children:"Terms"})," and"," ",(0,t.jsx)("a",{href:"https://www.voxmedia.com/legal/privacy-notice",children:"Privacy Policy"})," ","to receive email correspondence from us."]})}),(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:N.sharedStyles.login.inputGroup,children:[(0,t.jsx)(C.default,{name:"email",label:"Email:",type:"email",id:"login-username",value:e,required:!0,maxLength:255,autoComplete:"username","aria-invalid":!!r,"aria-describedby":"emailHint",onChange:e=>{s(e.target.value)},inputClassName:(0,a.default)(r&&N.sharedStyles.form.errorField)}),r&&(0,t.jsx)("p",{id:"emailHint",className:N.sharedStyles.form.error,children:r})]})}),(0,t.jsx)(S.default,{type:"submit",text:"Continue with email",displayType:"account",fullWidth:!0,disabled:n})]})]})};var Z=e.i(67655);let B=({onPasswordSubmit:e,onNotYou:a,email:r,signupOrigin:l,passwordError:d})=>{var c;let[h,f]=(0,i.useState)(""),[m,g]=(0,i.useState)(!1),[p,x]=(0,i.useState)(!1),{communityConfig:w}=(0,k.useConfigContext)(),y=(0,q.useAnalytics)(),j=_(),v=(0,Z.getDomainApex)(w.communityDomain),b=()=>(0,t.jsxs)("span",{children:["a ",(0,t.jsx)("em",{children:"New York"})," website or app"]}),T={"eater-app":"the Eater app","sbnation-app":"the SB Nation app","theverge-app":"The Verge app","nymag-app":b(),"nymag.com":b()},A=((c=l)||(c="nymag.com"),T[c]??c),P=async()=>
2{if(!p&&!m)try{g(!0),await fetch("/api/auth/firebase-send-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"reset_password",email:r,returnUrl:j})}),x(!0),y?.emit({event:"authentication",authentication:{action:"forgot password"}})}catch(e){(0,I.captureException)(e,{extra:{message:"could not send forgot password email"}})}finally{g(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:N.sharedStyles.login.heading,children:"Welcome back!"}),(0,t.jsx)(E,{onNotYou:()=>{f(""),a()},email:r}),(0,t.jsxs)("form",{className:N.sharedStyles.login.form,onSubmit:t=>{t.preventDefault(),e(h)},children:[A!==v&&(0,t.jsxs)("div",{className:N.sharedStyles.login.formInfo,children:["You can log in with the account you created on"," ",(0,t.jsx)("span",{className:u,children:A})]}),(0,t.jsxs)("div",{className:N.sharedStyles.login.inputGroup,children:[(0,t.jsx)(C.default,{type:"password",name:"password",label:"Password:",id:"login-password","aria-invalid":!!d,"aria-describedby":"passwordHint",autoComplete:"current-password",required:!0,maxLength:255,onChange:e=>f(e.target.value),inputClassName:d&&N.sharedStyles.form.errorField}),d&&(0,t.jsx)("p",{id:"passwordHint",className:N.sharedStyles.form.error,children:d})]}),(0,t.jsx)("div",{className:s,children:p?(0,t.jsx)("div",{role:"alert",className:o,children:"We've sent an email with instructions for setting a new password. Sign in with your new password above."}):(0,t.jsx)("a",{className:n,href:"/auth/forgot-password",onClick:e=>{e.preventDefault(),P()},children:"Forgot Password?"})}),(0,t.jsx)(S.default,{className:N.sharedStyles.login.formButton,type:"submit",text:"Sign in",displayType:"account",fullWidth:!0})]})]})};e.s(["default",0,({shouldRedirect:e,redirectPath:r,loginStep:s="email",customHeading:n,hideHeading:o,CustomScreenComponent:l,embedded:u=!1,regwallContext:d,onLoginStepChange:c})=>{let[h,f]=(0,i.useState)(s),[m,g]=(0,i.useState)(""),[S,C]=(0,i.useState)([]),[I,P]=(0,i.useState)(""),[Z,z]=(0,i.useState)(""),[G,Y]=(0,i.useState)(""),[V,J]=(0,i.useState)(null),[$,K]=(0,i.useState)(null),[X,Q]=(0,i.useState)(!1),[ee,et]=(0,i.useState)(""),[ea,ei]=(0,i.useState)(""),[er,es]=(0,i.useState)(!1),{userProfileConfig:en,membershipConfig:eo}=(0,k.useConfigContext)(),{setUser:el}=(0,F.useAuth)(),eu=(0,q.useAnalytics)(),ed=_(),[ec,eh]=(0,i.useState)(!1),ef=!!eo.requireSignupCaptcha,{CaptchaScript:em,fetchCaptchaToken:eg}=(0,R.useCaptcha)("ACCOUNT_CREATE"),ep=async e=>{if(!ef)return{};let t=await eg()??void 0;return e?.required&&!t?{error:"Invalid reCaptcha, please refresh the page and try again."}:{token:t}};(0,i.useEffect)(()=>{let e=async()=>{let e=await fetch("/api/auth/csrf");e.ok&&J((await e.json()).csrfToken)};if(window.opener)try{window.opener.origin}catch{window.opener=null}e()},[]),(0,i.useEffect)(()=>{if(!u||window.parent===window)return;let e=new ResizeObserver(()=>{let e=document.body.scrollHeight;window.parent.postMessage({type:"duet:auth:height",height:e,currentStep:h},window.location.origin)});return e.observe(document.body),()=>{e.disconnect()}},[u,h,X]),(0,i.useEffect)(()=>{u||L()},[h,u]),(0,i.useEffect)(()=>{c?.(h)},[h,c]);let ex=e=>{u&&window.parent!==window&&window.parent.postMessage({type:"duet:auth:signup_initiated",method:e},window.location.origin)},ew=({method:e,isNewUser:t,authId:a})=>{u&&window.parent!==window&&window.parent.postMessage({type:"duet:auth:success",method:e,isNewUser:t,authId:a},window.location.origin)},ey=t=>{e?window.location.href=(()=>{let{pathname:e="/"}=document.referrer?new URL(document.referrer):{};return r||e})():el(t)},ej=async e=>{if($){try{await (0,W.linkWithCredential)(e.user,$)}catch{}K(null)}},ev=async()=>{P(""),es(!0);let e=await fetch("/api/auth/firebase-check-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:m,missingProvidersReturnUrl:ed})});if(!e.ok)return void Y(400===e.status?"Invalid email address":"Unknown error");let{exists:t,providerIds:a=[],signupOrigin:i,isPendingMigratedFacebookUser:r}=await e.json();ex("email"),z(i),C(a),t?a.length>0?a.includes("password")?eS("password"):eS("social-only"):ei("Your account needs a password. Please check your email for a link to create one."):(eh(r??!1),r?eS("social-only"):eS("signup")),es(!1)},eb=()=>{eS("email")},eS=e=>{Q(!1),P(""),et(""),f(e)},eC=async(e,t)=>{let a;Q(!0);let{token:i,error:r}=await ep({required:!0});if(r){Q(!1),P(r);return}try{a=await (0,U.authCreateUserWithEmailAndPassword)(e,t)}catch(e){if(e instanceof O.FirebaseError){let{code:t}=(0,U.getFirebaseError)(e);P((0,U.getError)(t)),Q(!1)}return}let s=await a.user.getIdToken(),n=a.user.refreshToken,{user:o,errorMessage:u}=await eT({idToken:s,refreshToken:n,isNewUser:!0,captchaToken:i});if(!o){Q(!1),P(u??"We were unable to create your account. Please try again.");return}ew({method:"email",isNewUser:!0,authId:o.uid}),!o.commentingName&&en.requireCommentingName?eS("add-commenting-name"):l?
2(el(o),eS("brand-custom-step")):ey(o)},eN=async(e,t)=>{let a;Q(!0);try{a=await (0,U.authSignInWithEmailAndPassword)(e,t)}catch(e){Q(!1),e instanceof O.FirebaseError&&P((0,U.getError)(e.code));return}let{token:i}=await ep(),r=await a.user.getIdToken(),s=a.user.refreshToken,{user:n,errorMessage:o}=await eT({idToken:r,refreshToken:s,captchaToken:i});if(!n){Q(!1),P(o??"We were unable to log you in. Please try again.");return}eu?.emit({event:"authentication",authentication:{action:"sign in email"}}),ew({method:"email",isNewUser:!1,authId:n.uid}),await ej(a),!n.commentingName&&en.requireCommentingName?eS("add-commenting-name"):ey(n)},ek=async e=>{let t,a;ex(e),Q(!0);try{t=await (0,U.authSignInWithPopup)(e),a=(0,M.getAdditionalUserInfo)(t)}catch(e){if(Q(!1),e instanceof O.FirebaseError)if("auth/account-exists-with-different-credential"===e.code){let t=(0,U.getCredentialsFromError)(e);K(t);let a=t?U.socialProviderNames[t.providerId]:"a new method";et(`An account already exists with that email address. 3 Please sign in with your existing account and we will attempt to 4 link your ${a} account if you have a verified email.`)}else if("auth/internal-error"===e.code){let t=(0,U.getFirebaseError)(e);"unverified-email"===t.code?et(t.message):"missing-email"===t.code?P("Could not log in with Facebook, no email address was available."):"blocked-ip"===t.code?P((0,U.getError)(t.code)):P(e.message)}else P((0,U.getError)(e.code));else e instanceof Error&&P(e.message);return}let i=!!a?.isNewUser,{token:r,error:s}=await ep({required:i});if(s){Q(!1),P(s);return}let n=await t.user.getIdToken(),o=t.user.refreshToken,{user:l,errorMessage:u}=await eT({idToken:n,refreshToken:o,isNewUser:i,captchaToken:r});if(!l){Q(!1),P(u??"We were unable to log you in. Please try again.");return}eu?.emit({event:"authentication",authentication:{action:`sign in with ${e}`}}),ew({method:e,isNewUser:i,authId:l.uid}),await ej(t),!l.commentingName&&en.requireCommentingName?eS("add-commenting-name"):ey(l)},eT=async e=>{let{idToken:t,refreshToken:a,isNewUser:i=!1,captchaToken:r}=e,s=await fetch("/api/auth/firebase-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:t,refreshToken:a,csrfToken:V,isNewUser:i,captchaToken:r,regwallContext:i?d:void 0,returnUrl:ed})});if(s.ok){let e=await s.json();return{user:e.data?.user??e.user??null}}let n=await s.json().catch(()=>null);return{user:null,errorMessage:n?.message}},eE=async e=>{Q(!0);let t=await fetch("/api/account/update-commenting-name",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({commentingName:e})}),a=await t.json();t.ok?ey(a.data?.user??a.user??null):(Q(!1),P(a.message??a.error??"We were unable to add your commenting name. Please try again."))};return(0,t.jsxs)(t.Fragment,{children:[ef&&(0,t.jsx)(em,{}),X?(0,t.jsx)("div",{className:(0,a.default)(N.sharedStyles.membership.spinner,u&&b)}):(0,t.jsx)("div",{className:(0,a.default)("brand-custom-step"===h?j:N.sharedStyles.login.loginContainer,N.sharedStyles.contentCard.contentCardContainer,u&&v),children:(0,t.jsxs)("div",{className:N.sharedStyles.login.loginContent,children:["email"===h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{email:m,emailError:G,onChange:e=>{g(e),Y(""),ei("")},onEmailSubmit:()=>void ev(),disableSubmit:er||!!ea,heading:n,hideHeading:o,embedded:u}),ea&&(0,t.jsx)("p",{className:y,children:ea}),(0,t.jsx)("div",{className:w,children:"or"}),(0,t.jsx)(A,{reducedHeight:u,onSocialLogin:e=>void ek(e)})]}),"password"===h&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(B,{email:m,signupOrigin:Z,onPasswordSubmit:e=>void eN(m,e),onNotYou:eb,passwordError:I})}),"social-only"===h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:N.sharedStyles.login.heading,children:"Welcome back!"}),(0,t.jsx)(E,{onNotYou:eb,email:m}),(0,t.jsx)("p",{className:x,children:"Use social to sign in: "}),(0,t.jsx)(A,{onSocialLogin:e=>void ek(e),showGoogle:S.includes("google.com"),showFacebook:S.includes("facebook.com")||ec,showApple:S.includes("apple.com")})]}),"signup"===h&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(D,{title:"Create an account",email:m,loading:X,onSignupSubmit:e=>void eC(m,e),onNotYou:eb})}),"brand-custom-step"===h&&l&&(0,t.jsx)(l,{onClick:()=>ey(null)}),"add-commenting-name"===h&&(0,t.jsx)(T,{loading:X,onCommentingNameSubmit:e=>void eE(e)}),ee&&(0,t.jsx)("div",{className:p,children:ee}),(0,t.jsx)("div",{className:N.sharedStyles.login.errorContainer,children:I&&"password"!==h&&(0,t.jsx)("p",{className:N.sharedStyles.form.error,children:I})})]})})]})}],283869)},528597,e=>{"use strict";e.i(283869),e.s([])}]); 5
6//# debugId=c9f3cdf5-e0fb-1dd2-b2d1-85f99040ade1 7//# sourceMappingURL=2eptp-9n9ze76.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.