(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,846413,e=>{e.q("/_next/static/immutable/media/fairway-forecast.4403ofxko6q9l.jpg")},499050,e=>{e.q("/_next/static/immutable/media/garden-report.0qit7ec9-8qpo.jpg")},448829,e=>{e.q("/_next/static/immutable/media/morning-brief.009jm5zcmf005.jpg")},583231,e=>{e.q("/_next/static/immutable/media/on-your-radar.0kk6fu-l-n49t.jpg")},877095,e=>{e.q("/_next/static/immutable/media/ski-snow-report.2ijxo3rz9cd6f.jpg")},467394,e=>{e.q("/_next/static/immutable/media/tailgate-report.2uu317ah6k_1-.jpg")},331252,e=>{e.q("/_next/static/immutable/media/travel-emails.2e0ktjl2yt0ao.jpg")},404916,e=>{e.q("/_next/static/immutable/media/weekly-brief.1_jfglkwx2tik.jpg")},145473,e=>{"use strict";var t=e.i(902875),i=e.i(247865),o=e.i(533760),a=e.i(546446),r=e.i(581014),n=e.i(901351),l=e.i(422825),s=e.i(837879),u=e.i(725296),c=e.i(394481),d=e.i(576816),g=e.i(539353),m=e.i(553329),p=e.i(695881),f=e.i(143851),b=e.i(703123),v=e.i(61284);let h=(0,p.createLogger)("useGoogleLogin");var y=e.i(404893),_=e.i(62544),w=e.i(792461);e.s(["GoogleAuthScriptClient",0,function({onLoad:e,prompt:p=!0,isUserLoggedIn:k,redirectToCheckoutOnSignup:x,oneTapOnly:j=!1}){let C=(0,r.useTranslations)("GoogleLogin"),P=(0,a.useSetAtom)(y.googleLoginInitilizedAtom),{loginWithGoogle:A,error:E,clearError:O}=function(e=!1){let t=(0,r.useTranslations)("GoogleLogin"),[o,p]=(0,i.useState)(null),y=(0,a.useAtomValue)(b.gsiEmailStatesAtom),{updateEmailSubscriptions:_}=(0,l.useEmailPreferences)({skipStatus:!0}),{authSuccess:w,authRedirect:k}=(0,f.useUserLogin)(),x=(0,s.useSubscriptionsEnabled)(),j=(0,a.useAtomValue)(c.privacyRegimeAtom)??u.default.EXEMPT,C=x&&u.US_REGIMES.includes(j)&&j!==u.default.USA_CCPA,{newsletter:P,weekly:A}=y,E=C||y.onYourRadar,O=C||y.marketing,S=(0,d.useSignupComplete)({formVariant:"account page google",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),T=(0,g.useSignupComplete)({formVariant:"account page google",loginMethod:"Google",marketingOptedIn:!0===O}),G=(0,i.useCallback)(async t=>{let i=await n.upsxClient.auth.loginWithGoogle({google_id_token:t}),o=!!i.isFirstLogin;if(await w({email:i.email,userID:i.userID,type:o?"signup":"login"},!1,{skipSignupCompleteEvent:o}),!o)return k(),!0;let{error:a}=await (0,m.tryCatch)(S());return a&&h.warn("Failed to track signup-complete for Google signup",a),T(),await _({newsletter:P,weekly:A,onYourRadar:E,marketing:O}).catch(e=>{h.error("Failed to update email subscriptions",e)}),e&&x?k(v.PROMO_CHECKOUT_URL):k(),!0},[w,k,S,T,_,P,A,E,O,e,x]);return{loginWithGoogle:(0,i.useCallback)(async({credential:e})=>{p(null);let{data:i,error:o}=await (0,m.tryCatch)(G(e));if(i)return!0;h.error("Failed to login with Google",o);let{messageCode:a}=o?.data??{};switch(a){case 1e3:case 1026:case 1033:p({header:t("emailAlreadyUsedGoogleHeader"),body:t.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:p({header:t("emailAlreadyRegisteredGoogleHeader"),body:t("emailAlreadyRegisteredGoogleBody")});break;default:p({header:t("somethingWentWrong")})}return!1},[G,t]),error:o,clearError:(0,i.useCallback)(()=>p(null),[])}}(x),S=(0,w.useRefMemo)(A),T=(0,i.useRef)(null);E&&(T.current=E);let G=T.current;return(0,t.jsxs)(t.Fragment,{children:[!(j&&k)&&(0,t.jsx)(o.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)}}),P(!0)),e?.(),!k&&p&&t?.prompt()},id:"google-gsi-script",strategy:j?"lazyOnload":"afterInteractive"}),G&&(0,t.jsx)(_.Dialog,{open:!!E,onOpenChange:e=>!e&&O(),children:(0,t.jsx)(_.BasicDialog,{showCloseButton:!1,title:G.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:G.body||""}}),primaryAction:{label:C("cancel"),onClick:O}})})]})}],145473)},576816,703123,e=>{"use strict";var t=e.i(247865),i=e.i(293163),o=e.i(947118),a=e.i(737801);e.s(["useSignupComplete",0,(e={})=>{let r=(0,o.useIsInitialized)(),n=(0,a.useEventAttributes)(),[l,s]=(0,t.useState)(!1),u=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let t={...n,formVariant:e.formVariant,sensitiveDataAuthorization:e.sensitiveDataAuthorization,deviceTimeZone:e.deviceTimeZone,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0===t.formVariant&&delete t.formVariant,void 0===t.sensitiveDataAuthorization&&delete t.sensitiveDataAuthorization,void 0===t.deviceTimeZone&&delete t.deviceTimeZone,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,t},[n,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,i.areObjectValuesDefined)(c)&&!l&&s(!0)},[c,l]),(0,t.useCallback)(async()=>{if((r||window.mParticle?.isInitialized?.())&&l&&!u.current)try{window.mParticle?.logEvent?.("signup-complete",window.mParticle?.EventType?.Other,c),u.current=!0,console.debug(`MParticle: Event "signup-complete" tracked - ${c.pageId}`)}catch(e){console.error('MParticle: Event "signup-complete" failed',e)}},[r,c,l])}],576816);let r=(0,e.i(981030).atom)({});e.s(["gsiEmailStatesAtom",0,r],703123)},853686,e=>{"use strict";var t=e.i(902875),i=e.i(333350),o=e.i(283366);let a=["cw12138"],r=["cw12648","cw13694","cw14216"];function n({flagKey:e,requireReachableFold:t=!0}){let a=i.default?function(e,t){let i=function(e){try{let t=window.localStorage.getItem(`amp-exp-$default_instance-${"client-a74nh7wdmymfO9eOcl5awe1cgB30BDRV".slice(-6)}`);if(!t)return;let i=JSON.parse(t);if(!l(i))return;let o=i[e];if(!l(o)||!o.expKey||!o.key&&!o.value)return;return o}catch{return}}(e);if(i&&(!t||function(e){let t=window.__HeliosConfig?.slotsConfig;if(!t)return!1;let i=!1,o=!1;for(let r of Object.values(t)){let t=r?.modules?.refresh?.bidMode;if("atf"!==t&&"btf"!==t)continue;i=!0;let n=l(e)?e[t]:void 0;if(void 0!==n){var a;l(n)&&"number"==typeof(a=n.interval)&&Number.isFinite(a)&&a>=1e4&&a(0,t.jsx)(n,{flagKey:e},e)),r.map(e=>(0,t.jsx)(n,{flagKey:e,requireReachableFold:!1},e))]})}],853686)},404893,e=>{"use strict";let t=(0,e.i(981030).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},61284,e=>{"use strict";e.s(["PROMO_CHECKOUT_URL",0,"/subscribe/checkout?products=e251f39b-afd7-4ad9-9c87-5e2a8ed63fbb&promoCode=5OFF&tpcc=mktg-5OFF-reg"])}]);