(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,703123,e=>{"use strict";let t=(0,e.i(751931).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(694914);var t=e.i(297647),i=e.i(241722),r=e.i(477716),l=e.i(475566),o=e.i(352194),a=e.i(671525),s=e.i(901351),n=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),g=e.i(703123),m=e.i(404893),h=e.i(367810),b=e.i(251392);function p({onLoad:e,prompt:p=!0,isUserLoggedIn:f}){let v=(0,o.useTranslations)("GoogleLogin"),x=(0,l.useSetAtom)(m.googleLoginInitilizedAtom),{loginWithGoogle:A,error:y,clearError:w}=function(){let e=(0,o.useTranslations)("GoogleLogin"),[t,i]=(0,r.useState)(null),m=(0,l.useSetAtom)(n.userHasLoggedInBeforeAtom),h=(0,l.useAtomValue)(g.gsiEmailStatesAtom),{updateEmailSubscriptions:b}=(0,u.useEmailPreferences)(),{refresh:p}=(0,a.usePageNavigation)(),{syncPreferencesFromUpsx:f}=(0,c.usePreferences)(),{authSuccess:v,authRedirect:x}=(0,d.useUserLogin)();return{loginWithGoogle:(0,r.useCallback)(async t=>{let{credential:r}=t;i(null);try{let e=await s.upsxClient.auth.loginWithGoogle({google_id_token:r}),t=e?.isFirstLogin;await v({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:l,marketing:o,alwaysSubscribe:a}=h||{};return(t||a)&&await b({newsletter:i,weekly:l,marketing:o}).catch(e=>{console.error("Failed to update email subscriptions",e)}),x(),!0}catch(t){console.error("Failed to login with Google",t);try{let r=t?.data,l=r?.messageCode;if(!l)throw Error("No Error Message");switch(l){case 1e3:case 1026:case 1033:i({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:i({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){i({header:e("somethingWentWrong")})}return!1}},[m,f,p,v,x,b,h]),error:t,clearError:(0,r.useCallback)(()=>{i(null)},[])}}(),S=(0,b.useRefMemo)(A);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{S.current?.(e)}}),x(!0)),e?.(),!f&&p&&t?.prompt()},id:"google-gsi-script"}),(0,t.jsx)(h.Dialog,{open:!!y,onOpenChange:e=>!e&&w(),children:(0,t.jsx)(h.BasicDialog,{showCloseButton:!1,title:y?.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:y?.body||""}}),primaryAction:{label:v("cancel")}})})]})}e.s(["GoogleAuthScript",()=>p],874905)},590238,e=>{"use strict";var t=e.i(537989),i=e.i(827049),r=e.i(695203),l=e.i(604323),o=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,o.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[i.pageLocaleAtom,e.pageLocale],[r.deviceClassAtom,e.deviceClass],[l.metricsArticleDataAtom,e.metricsArticleData]]),null)])},855602,e=>{"use strict";var t=e.i(297647),i=e.i(477716),r=e.i(947118),l=e.i(737801),o=e.i(333350);e.s(["ModuleAnalytics",0,({moduleId:e,modulePosition:a,variant:s="frontend",children:n})=>{let c,u,d,g=(0,i.useRef)(null),[m,h]=(0,i.useState)(!1),b=(0,i.useRef)(null),p=(c="module-viewed",u=(0,r.useIsInitialized)(),d=(0,l.useEventAttributes)(),(0,i.useCallback)(({moduleId:e,modulePosition:t})=>{if(!u)return void console.warn("MParticle is not initialized");let i={module_id:e,module_position:t,...d};try{window.mParticle?.logEvent?.(c,window.mParticle?.EventType?.Other,i),console.debug(`MParticle: Event "${c}" tracked`,i)}catch(e){console.error(`MParticle: Event "${c}" failed`,e)}},[d,u]));return"admin"===s?(0,t.jsx)(t.Fragment,{children:n}):((0,i.useEffect)(()=>{if(m||!o.default||!g.current)return;let t=g.current,i=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&t.intersectionRatio>=1?b.current||(b.current=setTimeout(()=>{p({moduleId:e,modulePosition:a}),h(!0),b.current=null},2e3)):b.current&&(clearTimeout(b.current),b.current=null)})},{threshold:1});i.observe(t);let r=t.getBoundingClientRect(),l=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return r.top>=0&&r.left>=0&&r.bottom{p({moduleId:e,modulePosition:a}),h(!0),b.current=null},2e3)),()=>{b.current&&clearTimeout(b.current),i.disconnect()}},[m,e,a,p]),(0,t.jsx)("div",{ref:g,className:"hide-empty","data-module-id":e,children:n}))}],855602)},622958,e=>{"use strict";var t=e.i(297647),i=e.i(274432),r=e.i(632137),l=e.i(352194);let o=()=>{let e=(0,l.useTranslations)("Header");return(0,t.jsx)("div",{className:(0,r.cn)("m-4 md:hidden"),children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{style:{boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 0 32px 0 rgba(0, 0, 0, 0.12)"},className:(0,r.cn)("box-border flex h-12 w-full items-center rounded-3xl border-2 border-[#3A61CC00] bg-white! pl-9.5 text-gray-900 outline-0! transition-all hover:border-blue-500 focus-visible:border-blue-500 focus-visible:text-gray-400"),type:"button",onClick:()=>{document?.querySelector?.(".twcSearchTrigger")?.click?.()},children:e("searchPlaceholderText")}),(0,t.jsx)(i.Search,{className:"absolute top-1/2 left-4 flex size-4 -translate-y-1/2 transform items-center text-gray-900"})]})})};e.s(["FakeSearchBar",0,o,"default",0,o])},321044,e=>{"use strict";var t=e.i(297647),i=e.i(477716),r=e.i(475566),l=e.i(663333),o=e.i(41385),a=e.i(959194),s=e.i(890972),n=e.i(622958);function c({locale:e,pageType:c}){let u=(0,r.useAtomValue)(l.deviceClassAtom),d=(0,r.useAtomValue)(o.mobileWebSubnavVariantAtom),g=(0,a.getPartner)(),{links:m,basePath:h}=(0,i.useMemo)(()=>{let t=[{label:"Ski",slug:"explore/ski"},{label:"Surf",slug:"explore/surf"},{label:"Bike",slug:"explore/bike"},{label:"Home & Garden",slug:"explore/home-garden"}];return"variant-b"===d&&(t=[{label:"Top Stories",slug:"/"},...t]),{links:t,basePath:"en-US"===e?"":`/${e}`}},[d,e]);return"mobile"!==u||"control"===d||"samsung"===g?null:(0,t.jsxs)(t.Fragment,{children:["explore"===c&&(0,t.jsx)(n.default,{}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(s.SubnavigationUI,{links:m,basePath:h,bleed:!0})})]})}e.s(["MobileWebSubnavExperiment",()=>c])},711899,e=>{e.v(t=>Promise.all(["static/chunks/8198254d842f31ab.js"].map(t=>e.l(t))).then(()=>t(171714)))},137688,e=>{e.v(t=>Promise.all(["static/chunks/775f6992a5490e4c.js"].map(t=>e.l(t))).then(()=>t(72990)))}]);