(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,920654,e=>{"use strict";var t=e.i(546446),r=e.i(725287),o=e.i(499239);e.s(["useCart",0,function(){let e=(0,r.useSearchParams)().get("products"),[n,a]=(0,t.useAtom)(o.cartProductIdAtom);return{productId:e||n,setProductId:a}}])},171176,e=>{"use strict";var t=e.i(902875),r=e.i(247865),o=e.i(990420),n=e.i(732520),a=e.i(924689),i=e.i(581014),s=e.i(695881),l=e.i(553329),c=e.i(790010),u=e.i(226843),d=e.i(61284),m=e.i(13635),p=e.i(963630),g=e.i(576816),f=e.i(782847),h=e.i(617145),w=e.i(477728),v=e.i(111643),b=e.i(206458),y=e.i(539353),x=e.i(269767),C=e.i(825440),P=e.i(677988),k=e.i(681488),E=e.i(877957),S=e.i(368847),I=e.i(240058),j=e.i(837879),M=e.i(609958),A=e.i(723356),N=e.i(558802),T=e.i(422825),L=e.i(918462),R=e.i(725287),F=e.i(528600),O=e.i(526824),V=e.i(725296),U=e.i(394481),D=e.i(703123),z=e.i(546446),W=e.i(499239),_=e.i(920654);let G=(0,s.createLogger)("SignupForm"),H={signupPage:{startAbandon:"signup",complete:"account page"},checkout:{startAbandon:"checkout",complete:"subscription page"}};e.s(["default",0,({signupBtnText:e,redirectToCheckoutOnSignup:s=!1,analyticsSurface:J="checkout",showLastName:B=!1,hideConfirmPassword:Y=!1})=>{let K=H[J],q=(0,i.useTranslations)("UserAuth"),{signup:$,authRedirect:Z}=(0,c.useUserSignup)(),{updateEmailSubscriptions:X}=(0,T.useEmailPreferences)({skipStatus:!0}),[Q,ee]=(0,r.useState)(!1),[et,er]=(0,r.useState)(null),[eo,en]=(0,r.useState)(!1),{user:ea}=(0,F.useUser)(),ei=(0,j.useSubscriptionsEnabled)(),es=(0,z.useAtomValue)(U.privacyRegimeAtom)??V.default.EXEMPT,el=(0,R.useParams)()?.locale||"",ec=ea?.isUserLoggedIn||!1,{legalLinks:eu}=(0,L.useFooterLinks)(es,el,ec),{productId:ed}=(0,_.useCart)(),em=(0,z.useAtomValue)(W.eventChainIdAtom),ep=(0,z.useSetAtom)(D.gsiEmailStatesAtom),{setUserLastName:eg}=(0,O.useUserLastName)(),ef=(0,r.useMemo)(()=>a.z.object({firstName:a.z.string().min(1,{error:q("firstNameRequired")}),lastName:a.z.string(),email:a.z.email({message:q("invalidEmailError")}),password:a.z.string().min(8,{message:q("passwordMinLength")}).regex(/\d/,{message:q("passwordDigitRequired")}).regex(/[^A-Za-z0-9\s]/,{message:q("passwordSpecialChar")}),confirmPassword:Y?a.z.string():a.z.string().min(1,{message:q("confirmPasswordRequired")}),newsletterEmails:a.z.boolean().optional(),weeklyEmails:a.z.boolean().optional(),marketingEmails:a.z.boolean().optional(),onYourRadarEmails:a.z.boolean().optional()}).refine(e=>Y||e.password===e.confirmPassword,{message:q("passwordsMustMatch"),path:["confirmPassword"]}).refine(e=>!B||e.lastName.trim().length>0,{message:q("lastNameRequired"),path:["lastName"]}),[q,B,Y]),eh=(0,o.useForm)({resolver:(0,n.zodResolver)(ef),defaultValues:{firstName:"",lastName:"",email:"",password:"",confirmPassword:""}}),[ew,ev,eb,ey]=eh.watch(["newsletterEmails","weeklyEmails","onYourRadarEmails","marketingEmails"]);(0,r.useEffect)(()=>ep({newsletter:ew,weekly:ev,onYourRadar:eb,marketing:ey}),[ep,ew,ev,eb,ey]);let ex=(0,h.usePurchaseSourceAttributes)(),eC=(0,m.useSignupStart)({formVariant:K.startAbandon,sourcePage:ex.sourcePage,sourceModule:ex.sourceModule??null,sourceElement:ex.sourceElement??null}),eP=(0,v.useSignupStart)({formVariant:K.startAbandon,url:"/subscribe/checkout/signup",sourcePage:ex.sourcePage,sourceModule:ex.sourceModule??null,sourceElement:ex.sourceElement??null});(0,r.useEffect)(()=>{eC(),eP()},[eC,eP]),(0,p.useSignupAbandon)({formVariant:K.startAbandon,sourcePage:ex.sourcePage,sourceModule:ex.sourceModule??null,sourceElement:ex.sourceElement??null}),(0,b.useSignupAbandon)({formVariant:K.startAbandon,url:"/subscribe/checkout/signup",sourcePage:ex.sourcePage,sourceModule:ex.sourceModule??null,sourceElement:ex.sourceElement??null,sourceUpsellPlacement:ex.sourceUpsellPlacement,disabled:eo});let ek=(0,f.usePurchaseStart)({step:1,url:"/subscribe/checkout/signup",accountCreated:!1,accountLogin:!1,completed:!1,eventChainId:em||"",premiumProductId:ed}),eE=(0,w.usePurchaseStart)({step:1,url:"/subscribe/checkout/signup",accountCreated:!1,accountLogin:!1,completed:!1,eventChainId:em||"",premiumProductId:ed});(0,r.useEffect)(()=>{ek(),eE()},[ek,eE]);let eS=(0,g.useSignupComplete)({formVariant:K.complete,sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),eI=(0,y.useSignupComplete)({formVariant:K.complete,url:"/subscribe/checkout/signup",newsletterOptedIn:ew??!1,marketingOptedIn:ey??!1,sourcePage:ex.sourcePage,sourceModule:ex.sourceModule??null,sourceElement:ex.sourceElement??null}),ej=(0,r.useMemo)(()=>eu.find(e=>"termsOfUse"===e.titleTranslationKey),[eu]),eM=(0,r.useMemo)(()=>eu.find(e=>"privacyPolicy"===e.titleTranslationKey),[eu]),eA=async e=>{let{success:t,error:r}=await $({firstName:e.firstName,email:e.email,password:e.password},!1,{skipSignupCompleteEvent:!0});if(!t){er((0,u.getErrorCodeMessage)(r.messageCode)),ee(!1);return}(en(!0),B&&e.lastName&&eg(e.email,e.lastName),await eS(),eI(),await X({newsletter:e.newsletterEmails,weekly:e.weeklyEmails,onYourRadar:e.onYourRadarEmails,marketing:e.marketingEmails}).catch(e=>{G.error("Failed to update email subscriptions",e)}),ei&&s)?Z(d.PROMO_CHECKOUT_URL):Z()},eN=async e=>{ee(!0),er(null);let{error:t}=await (0,l.tryCatch)(eA(e));t&&(er(q("signupGenericError")),G.error("Signup error:",t),ee(!1))},eT=(0,t.jsx)(x.FormField,{control:eh.control,name:"firstName",render:({field:e})=>(0,t.jsx)(x.FormItem,{children:(0,t.jsx)(x.FormControl,{children:(0,t.jsx)(C.Input,{...e,label:q("firstName"),icon:A.Person})})})}),eL=(0,t.jsx)(x.FormField,{control:eh.control,name:"password",render:({field:e})=>(0,t.jsx)(x.FormItem,{children:(0,t.jsx)(x.FormControl,{children:(0,t.jsx)(P.PasswordInput,{...e,label:q("password"),icon:N.Locked})})})});return(0,t.jsxs)("div",{className:"@container",children:[et&&(0,t.jsx)(S.Text,{color:"error",className:"mb-4",children:et}),(0,t.jsx)(x.Form,{...eh,children:(0,t.jsxs)("form",{onSubmit:eh.handleSubmit(eN),children:[B?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-0 @lg:grid-cols-2 @lg:gap-8",children:[eT,(0,t.jsx)(x.FormField,{control:eh.control,name:"lastName",render:({field:e})=>(0,t.jsx)(x.FormItem,{children:(0,t.jsx)(x.FormControl,{children:(0,t.jsx)(C.Input,{...e,label:q("lastName"),icon:A.Person})})})})]}):eT,(0,t.jsx)(x.FormField,{control:eh.control,name:"email",render:({field:e})=>(0,t.jsx)(x.FormItem,{children:(0,t.jsx)(x.FormControl,{children:(0,t.jsx)(C.Input,{...e,label:q("email"),icon:M.Email})})})}),Y?eL:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-0 @lg:grid-cols-2 @lg:gap-8",children:[eL,(0,t.jsx)(x.FormField,{control:eh.control,name:"confirmPassword",render:({field:e})=>(0,t.jsx)(x.FormItem,{children:(0,t.jsx)(x.FormControl,{children:(0,t.jsx)(P.PasswordInput,{...e,label:q("confirmPassword"),icon:N.Locked})})})})]}),ei&&(0,t.jsxs)("div",{className:"px-6",children:[(0,t.jsx)(x.FormField,{control:eh.control,name:"newsletterEmails",render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(k.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Morning Brief:"})," ","Your local forecast, plus weather insights, stunning photos and our meteorologists’ top picks. All in one place, every morning."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})}),(0,t.jsx)(x.FormField,{control:eh.control,name:"weeklyEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(k.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Weekly Brief:"})," ","Prefer a weekly summary? Get personalized weather information and analysis from our experts. Stay informed and prepared."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})}),(0,t.jsx)(x.FormField,{control:eh.control,name:"onYourRadarEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(k.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"On Your Radar:"})," a weekly newsletter that highlights new products, tools, and features you need to know about."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})}),(0,t.jsx)(x.FormField,{control:eh.control,name:"marketingEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(k.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Offers & Promotions:"})," ","Stop paying full price – our curated offers deliver hand-picked discounts and product reviews across everything from outdoor gear to home essentials, so you never miss out on the sales."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})})]}),(0,t.jsx)(S.Text,{className:"my-4 py-2.5 text-[13px] font-normal",children:q.rich("agreeTermsContinue",{termsOfUse:e=>(0,t.jsx)(I.default,{href:ej?.url||"",className:"text-blue-600 underline",children:e}),privacyPolicy:e=>(0,t.jsx)(I.default,{href:eM?.url||"",className:"text-blue-600 underline",children:e})})}),(0,t.jsx)(E.Button,{type:"submit",loading:Q,disabled:Q,className:"bg-brand-300 h-12 w-full leading-[1.5] font-bold",children:e||q("signup")})]})})]})}])},243083,e=>{"use strict";var t=e.i(247865),r=e.i(546446),o=e.i(128541),n=e.i(542675),a=e.i(777638);e.s(["usePurchaseSourceAttributes",0,()=>{let e=(0,r.useAtomValue)(o.purchaseSourceAttributionAtom),i=(0,n.parseTpcc)((0,a.getTpcc)()),s=e?.sourcePage??i.sourcePage,l=e?.sourceModule??i.sourceModule,c=e?.sourceElement??i.sourceElement,u=e?.sourceUpsellPlacement??i.sourceUpsellPlacement;return(0,t.useMemo)(()=>({...s&&{sourcePage:s},...l&&{sourceModule:l},...c&&{sourceElement:c},...u&&{sourceUpsellPlacement:u}}),[s,l,c,u])}])},477728,111643,206458,653747,681488,526824,e=>{"use strict";var t=e.i(247865),r=e.i(546446),o=e.i(540768),n=e.i(682142),a=e.i(782937),i=e.i(695881),s=e.i(333350),l=e.i(64412),c=e.i(950771),u=e.i(537989),d=e.i(695203),m=e.i(673915),p=e.i(158662),g=e.i(243083),f=e.i(358273),h=e.i(777638),w=e.i(727365),v=e.i(896363),b=e.i(924776),y=e.i(605781);let x=(0,i.createLogger)("usePurchaseStart"),C=["SUN","MON","TUE","WED","THU","FRI","SAT"],P=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),k=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),E=["appVersion","premiumProductId","physicalState"];e.s(["usePurchaseStart",0,e=>{let i=(0,r.useAtomValue)(u.pageIdAtom),S=(0,r.useAtomValue)(c.pageLocaleAtom),I=(0,r.useAtomValue)(d.deviceClassAtom),{location:j,isLoading:M}=(0,l.useLocation)(),A=(0,r.useAtomValue)(m.fromStringAtom),N=(0,r.useAtomValue)(p.experimentJoinListAtom),T=(0,g.usePurchaseSourceAttributes)(),L=(0,b.useIsHightouchReady)(),R=(0,t.useRef)(!1),{step:F,url:O,accountCreated:V,accountLogin:U,completed:D,eventChainId:z,premiumProductId:W}=e,_=(0,t.useMemo)(()=>{if(!s.default)return null;let e=(0,n.getCICookie)(),t=e?.["TWC-GeoIP-Country"]??(0,o.getCookie)("twc-location-country"),r=e?.["TWC-GeoIP-Region"]??(0,o.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,o.getCookie)("twc-privacy"),c=window.DprSdk?.getGdprConsentOptInsString()??"",u=window.navigator?.globalPrivacyControl??!1,d=c?.includes("functional-technology")??!1,m=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,p=navigator?.cookieEnabled??!1,g=(0,o.getCookie)("partner")||"",b=(0,a.getPartnerByPattern)(g)??g,y=(0,f.getMetricsSession)(),x=y?.sessionId||"",E=y?.sessionStartTime||0,M=new Date,L=M.getHours(),R=C[M.getDay()]??"",_=-M.getTimezoneOffset()/60,G=document.referrer,H=(0,w.normalizeWlocType)(j?.type),J=j?.featureSource??null;return{step:String(F),accountCreated:V??!1,accountLogin:U??!1,completed:D??!1,eventChainID:z,premiumProductId:W??null,url:O??"",pageId:i,schemaVersion:"nextgen",sessionId:x,sessionStartTime:E,locale:S,partner:b,deviceClass:I,wlocCity:j?.city??void 0,wlocCountry:j?.countryCode??null,wlocState:j?.adminDistrictCode??void 0,wlocDMA:j?.dmaCd??void 0,wlocId:j?.placeId??null,wlocFeatureSource:null!=J&&k.has(J)?J:void 0,wlocTags:j?.tags?.length?(0,v.parseArrayToString)(j.tags):null,wlocType:null!==H&&P.has(H)?H:void 0,wlocFeatureId:j?.featureId??null,dayOfWeek:R,regime:l??"",cookiesEnabled:p,gpcSignalOptOut:u,functionalTechnologies:d,geographicallyRelevantAds:m,priv:c,referrer:G,fromString:A,deviceTimeZone:_,hourOfDay:L,physicalCountry:t??"",physicalState:r??"",sourcePage:T.sourcePage,sourceModule:T.sourceModule??null,sourceUpsellPlacement:T.sourceUpsellPlacement??null,campaign:(0,h.getCampaign)(),tpcc:(0,h.getTpcc)(),linkReferral:(0,h.getLinkReferral)(),experimentJoinList:N,weatherMode:"normal",appVersion:"292b8a53c066c9d4a278830c85aa0c17db4ab2e9".slice(0,10)}},[F,V,U,D,z,W,O,i,S,I,j,A,N,T]),G=L&&null!==_&&!M&&E.every(e=>void 0!==_[e]);return(0,t.useCallback)(()=>{_&&G&&!R.current&&((0,y.trackPurchaseStart)(_),R.current=!0,x.info(`Hightouch: Event "purchase-start" tracked - step ${F}`))},[_,G,F])}],477728);let S=(0,i.createLogger)("useSignupStart"),I=["SUN","MON","TUE","WED","THU","FRI","SAT"],j=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),M=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),A=["appVersion","cookiesEnabled","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","regime","sessionId","sessionStartTime","url","wlocCity","wlocCountry","wlocDMA","wlocState"];e.s(["useSignupStart",0,(e={})=>{let i=(0,r.useAtomValue)(u.pageIdAtom),m=(0,r.useAtomValue)(c.pageLocaleAtom),g=(0,r.useAtomValue)(d.deviceClassAtom),{location:x,isLoading:C}=(0,l.useLocation)(),P=(0,r.useAtomValue)(p.experimentJoinListAtom),k=(0,b.useIsHightouchReady)(),E=(0,t.useRef)(!1),{formVariant:N,url:T,sourcePage:L,sourceModule:R,sourceElement:F,sourcePosition:O}=e,V=(0,t.useMemo)(()=>{if(!s.default)return null;let e=(0,n.getCICookie)(),t=e?.["TWC-GeoIP-Country"]??(0,o.getCookie)("twc-location-country"),r=e?.["TWC-GeoIP-Region"]??(0,o.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,o.getCookie)("twc-privacy"),c=window.DprSdk?.getGdprConsentOptInsString()??"",u=window.DprSdk?.getCcpaSaleOptInString()??"",d=window.navigator?.globalPrivacyControl??!1,p=c?.includes("functional-technology")??!1,b=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,y=navigator?.cookieEnabled??!1,C=(0,o.getCookie)("partner")||"",k=(0,a.getPartnerByPattern)(C)??C,E=(0,f.getMetricsSession)(),S=E?.sessionId||"",A=E?.sessionStartTime||0,V=new Date,U=V.getHours(),D=I[V.getDay()]??"",z=-V.getTimezoneOffset()/60,W=document.referrer,_=(0,w.normalizeWlocType)(x?.type),G=x?.featureSource??null;return{formVariant:N,url:T??"",sourcePage:L??null,sourceModule:R??null,sourceElement:F??null,sourcePosition:O??null,pageId:i??"",locale:m,deviceClass:g,sessionId:S,sessionStartTime:A,partner:k,wlocCity:x?.city??null,wlocCountry:x?.countryCode??null,wlocState:x?.adminDistrictCode??null,wlocDMA:x?.dmaCd??null,wlocId:x?.placeId??null,wlocFeatureSource:null!=G&&M.has(G)?G:void 0,wlocTags:x?.tags?.length?(0,v.parseArrayToString)(x.tags):null,wlocType:null!==_&&j.has(_)?_:void 0,wlocFeatureId:x?.featureId??null,dayOfWeek:D,regime:l??"",cookiesEnabled:y,gpcSignalOptOut:d,functionalTechnologies:p,geographicallyRelevantAds:b,priv:c,privProducts:u,referrer:W,deviceTimeZone:z,hourOfDay:U,physicalCountry:t??"",physicalState:r??"",campaign:(0,h.getCampaign)()??void 0,tpcc:(0,h.getTpcc)(),linkReferral:(0,h.getLinkReferral)(),experimentJoinList:P,weatherMode:"normal",appVersion:"292b8a53c066c9d4a278830c85aa0c17db4ab2e9".slice(0,10)}},[N,T,L,R,F,O,i,m,g,x,P]),U=k&&null!==V&&!C&&A.every(e=>void 0!==V[e]);return(0,t.useCallback)(()=>{V&&U&&!E.current&&((0,y.trackSignupStart)(V),E.current=!0,S.info('Hightouch: Event "signup-start" tracked'))},[V,U])}],111643);let N=(0,i.createLogger)("useSignupAbandon"),T=["SUN","MON","TUE","WED","THU","FRI","SAT"],L=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),R=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),F=["appVersion","cookiesEnabled","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","regime","sessionId","sessionStartTime","url","wlocCity","wlocCountry","wlocDMA","wlocState"];e.s(["useSignupAbandon",0,(e={})=>{let i=(0,r.useAtomValue)(u.pageIdAtom),m=(0,r.useAtomValue)(c.pageLocaleAtom),g=(0,r.useAtomValue)(d.deviceClassAtom),{location:x}=(0,l.useLocation)(),C=(0,r.useAtomValue)(p.experimentJoinListAtom),P=(0,b.useIsHightouchReady)(),{formVariant:k,url:E,sourcePage:S,sourceModule:I,sourceElement:j,sourcePosition:M,sourceUpsellPlacement:A,disabled:O=!1}=e,V=(0,t.useMemo)(()=>{if(!s.default)return null;let e=(0,n.getCICookie)(),t=e?.["TWC-GeoIP-Country"]??(0,o.getCookie)("twc-location-country"),r=e?.["TWC-GeoIP-Region"]??(0,o.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,o.getCookie)("twc-privacy"),c=window.DprSdk?.getGdprConsentOptInsString()??"",u=window.DprSdk?.getCcpaSaleOptInString()??"",d=window.navigator?.globalPrivacyControl??!1,p=c?.includes("functional-technology")??!1,b=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,y=navigator?.cookieEnabled??!1,P=(0,o.getCookie)("partner")||"",N=(0,a.getPartnerByPattern)(P)??P,F=(0,f.getMetricsSession)(),O=F?.sessionId||"",V=F?.sessionStartTime||0,U=new Date,D=U.getHours(),z=T[U.getDay()]??"",W=-U.getTimezoneOffset()/60,_=document.referrer,G=(0,w.normalizeWlocType)(x?.type),H=x?.featureSource??null;return{formVariant:k,url:E??"",sourcePage:S??null,sourceModule:I??null,sourceElement:j??null,sourcePosition:M??null,pageId:i??"",locale:m??null,deviceClass:g,sessionId:O,sessionStartTime:V,partner:N,wlocCity:x?.city??null,wlocCountry:x?.countryCode??null,wlocState:x?.adminDistrictCode??null,wlocDMA:x?.dmaCd??null,wlocId:x?.placeId??null,wlocFeatureSource:null!=H&&R.has(H)?H:void 0,wlocTags:x?.tags?.length?(0,v.parseArrayToString)(x.tags):null,wlocType:null!==G&&L.has(G)?G:void 0,wlocFeatureId:x?.featureId??null,dayOfWeek:z,regime:l??"",cookiesEnabled:y,gpcSignalOptOut:d,functionalTechnologies:p,geographicallyRelevantAds:b,priv:c,privProducts:u,referrer:_,deviceTimeZone:W,hourOfDay:D,physicalCountry:t??"",physicalState:r??"",sourceUpsellPlacement:A,campaign:(0,h.getCampaign)()??void 0,tpcc:(0,h.getTpcc)(),linkReferral:(0,h.getLinkReferral)(),experimentJoinList:C,weatherMode:"normal",appVersion:"292b8a53c066c9d4a278830c85aa0c17db4ab2e9".slice(0,10)}},[k,E,S,I,j,M,i,m,g,x,C,A]),U=P&&null!==V&&F.every(e=>void 0!==V[e]),D=(0,t.useRef)(V),z=(0,t.useRef)(U),W=(0,t.useRef)(O);(0,t.useEffect)(()=>{D.current=V},[V]),(0,t.useEffect)(()=>{z.current=U},[U]),(0,t.useEffect)(()=>{W.current=O},[O]),(0,t.useEffect)(()=>{let e=()=>{D.current&&z.current&&!W.current&&((0,y.trackSignupAbandon)(D.current),N.info('Hightouch: Event "signup-abandon" tracked'))};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[])}],206458);var O=e.i(902875),V=e.i(144977),U=e.i(156207),D=e.i(291967),z=e.i(534643),W=e.i(337755),_=e.i(853233),G=e.i(127864),H=e=>{var r;let o,n,{present:a,children:i}=e,s=function(e){var r,o;let[n,a]=t.useState(),i=t.useRef(null),s=t.useRef(e),l=t.useRef("none"),[c,u]=(r=e?"mounted":"unmounted",o={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>o[e][t]??e,r));return t.useEffect(()=>{let e=J(i.current);l.current="mounted"===c?e:"none"},[c]),(0,G.useLayoutEffect)(()=>{let t=i.current,r=s.current;if(r!==e){let o=l.current,n=J(t);e?u("MOUNT"):"none"===n||t?.display==="none"?u("UNMOUNT"):r&&o!==n?u("ANIMATION_OUT"):u("UNMOUNT"),s.current=e}},[e,u]),(0,G.useLayoutEffect)(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let o=J(i.current).includes(CSS.escape(r.animationName));if(r.target===n&&o&&(u("ANIMATION_END"),!s.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},o=e=>{e.target===n&&(l.current=J(i.current))};return n.addEventListener("animationstart",o),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",o),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback(e=>{i.current=e?getComputedStyle(e):null,a(e)},[])}}(a),l="function"==typeof i?i({present:s.isPresent}):t.Children.only(i),c=(0,V.useComposedRefs)(s.ref,(r=l,(n=(o=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?r.ref:(n=(o=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?r.props.ref:r.props.ref||r.ref));return"function"==typeof i||s.isPresent?t.cloneElement(l,{ref:c}):null};function J(e){return e?.animationName||"none"}H.displayName="Presence",e.s(["Presence",0,H],653747);var B=e.i(556872),Y="Checkbox",[K,q]=(0,U.createContextScope)(Y),[$,Z]=K(Y);function X(e){let{__scopeCheckbox:r,checked:o,children:n,defaultChecked:a,disabled:i,form:s,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:m}=e,[p,g]=(0,z.useControllableState)({prop:o,defaultProp:a??!1,onChange:c,caller:Y}),[f,h]=t.useState(null),[w,v]=t.useState(null),b=t.useRef(!1),y=!f||!!s||!!f.closest("form"),x={checked:p,disabled:i,setChecked:g,control:f,setControl:h,name:l,form:s,value:d,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:!ei(a)&&a,isFormControl:y,bubbleInput:w,setBubbleInput:v};return(0,O.jsx)($,{scope:r,...x,children:"function"==typeof m?m(x):n})}var Q="CheckboxTrigger",ee=t.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:o,...n},a)=>{let{control:i,value:s,disabled:l,checked:c,required:u,setControl:d,setChecked:m,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:f}=Z(Q,e),h=(0,V.useComposedRefs)(a,d),w=t.useRef(c);return t.useEffect(()=>{let e=i?.form;if(e){let t=()=>m(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,m]),(0,O.jsx)(B.Primitive.button,{type:"button",role:"checkbox","aria-checked":ei(c)?"mixed":c,"aria-required":u,"data-state":es(c),"data-disabled":l?"":void 0,disabled:l,value:s,...n,ref:h,onKeyDown:(0,D.composeEventHandlers)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,D.composeEventHandlers)(o,e=>{m(e=>!!ei(e)||!e),f&&g&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})});ee.displayName=Q;var et=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,O.jsx)(X,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:o,form:u,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ee,{...d,ref:t,__scopeCheckbox:r}),e&&(0,O.jsx)(ea,{__scopeCheckbox:r})]})})});et.displayName=Y;var er="CheckboxIndicator",eo=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=Z(er,r);return(0,O.jsx)(H,{present:o||ei(a.checked)||!0===a.checked,children:(0,O.jsx)(B.Primitive.span,{"data-state":es(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});eo.displayName=er;var en="CheckboxBubbleInput",ea=t.forwardRef(({__scopeCheckbox:e,...r},o)=>{let{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:l,disabled:c,name:u,value:d,form:m,bubbleInput:p,setBubbleInput:g}=Z(en,e),f=(0,V.useComposedRefs)(o,g),h=(0,W.usePrevious)(i),w=(0,_.useSize)(n);t.useEffect(()=>{if(!p)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!a.current;if(h!==i&&e){let r=new Event("click",{bubbles:t});p.indeterminate=ei(i),e.call(p,!ei(i)&&i),p.dispatchEvent(r)}},[p,h,i,a]);let v=t.useRef(!ei(i)&&i);return(0,O.jsx)(B.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:l,disabled:c,name:u,value:d,form:m,...r,tabIndex:-1,ref:f,style:{...r.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function ei(e){return"indeterminate"===e}function es(e){return ei(e)?"indeterminate":e?"checked":"unchecked"}ea.displayName=en;var el=e.i(632137),ec=e.i(269767),eu=e.i(747961);let ed=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...n},a)=>(0,O.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":t,"aria-describedby":o,...n,children:[r?(0,O.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,O.jsx)("title",{id:t,children:"Checkbox Checked"}):e?(0,O.jsx)("title",{id:t,children:e}):null,(0,O.jsx)("path",{fill:"currentColor",d:"M13 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM7 9.173 5.295 7.5l-.795.771L7 10.75l.348-.346.005-.003L11.1 6.688l.005-.01.395-.389-.796-.789z"})]})),em=t.default.forwardRef((e,t)=>(0,O.jsx)(eu.BaseIcon,{ref:t,icon:ed,...e}));em.displayName="CheckboxCheckedFilled";let ep=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...n},a)=>(0,O.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":t,"aria-describedby":o,...n,children:[r?(0,O.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,O.jsx)("title",{id:t,children:"Checkbox Indeterminate"}):e?(0,O.jsx)("title",{id:t,children:e}):null,(0,O.jsxs)("g",{fill:"currentColor",children:[(0,O.jsx)("path",{d:"M11 8a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1"}),(0,O.jsx)("path",{d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})]})),eg=t.default.forwardRef((e,t)=>(0,O.jsx)(eu.BaseIcon,{ref:t,icon:ep,...e}));eg.displayName="CheckboxIndeterminate";let ef=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...n},a)=>(0,O.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":t,"aria-describedby":o,...n,children:[r?(0,O.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,O.jsx)("title",{id:t,children:"Checkbox"}):e?(0,O.jsx)("title",{id:t,children:e}):null,(0,O.jsx)("path",{fill:"currentColor",d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})),eh=t.default.forwardRef((e,t)=>(0,O.jsx)(eu.BaseIcon,{ref:t,icon:ef,...e}));function ew({className:e,checked:r,defaultChecked:o,onCheckedChange:n,...a}){let[i,s]=(0,t.useState)(void 0!==r?r:o||!1);(0,t.useEffect)(()=>{void 0!==r&&s(r)},[r]);let l="indeterminate"===i?eg:i?em:eh;return(0,O.jsx)(et,{"data-slot":"checkbox",className:(0,el.cn)("peer disabled:cursor-not-allowed disabled:opacity-50",e),...a,checked:i,onCheckedChange:e=>{void 0===r&&s(e),n?.(e)},children:(0,O.jsx)(eo,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",forceMount:!0,children:(0,O.jsx)(l,{className:"size-6"})})})}eh.displayName="Checkbox",e.s(["Checkbox",0,({id:e,label:t,wrapperClassName:r,labelClassName:o,leftPos:n,...a})=>(0,O.jsxs)(ec.FormItem,{id:e,className:(0,el.cn)("flex w-full gap-3",n?"flex-row-reverse justify-end":"flex-row justify-between",r),children:[(0,O.jsx)("div",{className:"pt-0.5",children:(0,O.jsx)(ec.FormLabel,{className:(0,el.cn)(o),children:t})}),(0,O.jsx)("div",{children:(0,O.jsx)(ec.FormControl,{children:(0,O.jsx)(ew,{...a})})})]})],681488);var ev=e.i(528600);let eb=(0,e.i(284007).atomWithStorage)("upsxLastNames",{},void 0,{getOnInit:!0}),ey=e=>btoa(e.trim().toLowerCase());e.s(["useUserLastName",0,()=>{let{userProfile:e}=(0,ev.useUser)(),{email:o}=e||{},n=(0,r.useSetAtom)(eb),a=(0,r.useAtomValue)(eb),i=(0,t.useCallback)((e,t)=>{n(r=>({...r,[ey(e)]:t}))},[]);return{userLastName:a[ey(o||"")]||void 0,setUserLastName:i}}],526824)},617145,542675,e=>{"use strict";var t=e.i(247865),r=e.i(546446),o=e.i(128541);let n={sourcePage:null,sourceModule:null,sourceElement:null,sourceUpsellPlacement:null};function a(e){if(!e||"string"!=typeof e)return n;let t=e.split("-");if("mktg"!==t[0])return n;let r=t[1]||null,o=t[2]||null,a=t[3]||null,i=o&&o.toLowerCase().includes("upsell")?o:null;return{sourcePage:r,sourceModule:o,sourceElement:a,sourceUpsellPlacement:i}}e.s(["parseTpcc",0,a],542675);var i=e.i(959194);e.s(["usePurchaseSourceAttributes",0,()=>{let e=(0,r.useAtomValue)(o.purchaseSourceAttributionAtom),n=a((0,i.getTpcc)()),s=e?.sourcePage??n.sourcePage,l=e?.sourceModule??n.sourceModule,c=e?.sourceElement??n.sourceElement,u=e?.sourceUpsellPlacement??n.sourceUpsellPlacement;return(0,t.useMemo)(()=>({...s&&{sourcePage:s},...l&&{sourceModule:l},...c&&{sourceElement:c},...u&&{sourceUpsellPlacement:u}}),[s,l,c,u])}],617145)},782847,e=>{"use strict";var t=e.i(247865),r=e.i(959194),o=e.i(947118),n=e.i(737801),a=e.i(617145);e.s(["usePurchaseStart",0,e=>{let i=(0,o.useIsInitialized)(),s=(0,n.useEventAttributes)(),l=(0,a.usePurchaseSourceAttributes)(),[c,u]=(0,t.useState)(!1),d=(0,t.useRef)(!1),m=(0,t.useMemo)(()=>{let t={...s,...l,url:e.url??s.url,step:e.step,accountCreated:e.accountCreated??!1,accountLogin:e.accountLogin??!1,completed:e.completed??!1,eventChainId:e.eventChainId,premiumProductId:e.premiumProductId??void 0,weatherMode:e.weatherMode??"normal",experimentJoinList:e.experimentJoinList??s.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0===t.premiumProductId&&delete t.premiumProductId,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[s,l,e.step,e.url,e.accountCreated,e.accountLogin,e.completed,e.eventChainId,e.premiumProductId,e.weatherMode,e.experimentJoinList,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,r.areObjectValuesDefined)(m)&&!c&&u(!0)},[m,c]),(0,t.useCallback)(async()=>{if(i&&c&&!d.current)try{window.mParticle?.logEvent?.("purchase-start",window.mParticle?.EventType?.Other,m),d.current=!0,console.debug(`MParticle: Event "purchase-start" tracked - ${m.pageId}`)}catch(e){console.error('MParticle: Event "purchase-start" failed',e)}},[i,m,c])}])},13635,963630,e=>{"use strict";var t=e.i(247865),r=e.i(959194),o=e.i(947118),n=e.i(737801);e.s(["useSignupStart",0,(e={})=>{let a=(0,o.useIsInitialized)(),i=(0,n.useEventAttributes)(),[s,l]=(0,t.useState)(!1),c=(0,t.useRef)(!1),u=(0,t.useMemo)(()=>{let t={...i,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0===t.formVariant&&delete t.formVariant,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,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[i,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.experimentJoinList,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,r.areObjectValuesDefined)(u)&&!s&&l(!0)},[u,s]),(0,t.useCallback)(async()=>{if(a&&s&&!c.current)try{window.mParticle?.logEvent?.("signup-start",window.mParticle?.EventType?.Other,u),c.current=!0,console.debug(`MParticle: Event "signup-start" tracked - ${u.pageId}`)}catch(e){console.error('MParticle: Event "signup-start" failed',e)}},[a,u,s])}],13635),e.s(["useSignupAbandon",0,(e={})=>{let r=(0,n.useEventAttributes)(),o=(0,t.useMemo)(()=>{let t={...r,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0!==e.tpcc&&(t.tpcc=e.tpcc),void 0!==e.linkReferral&&(t.linkReferral=e.linkReferral),void 0===t.formVariant&&delete t.formVariant,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,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[r,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.url,e.tpcc,e.linkReferral,e.experimentJoinList,e.mParticleGranted]);(0,t.useEffect)(()=>{let e=()=>{if(window.mParticle?.isInitialized?.())try{window.mParticle?.logEvent?.("signup-abandon",window.mParticle?.EventType?.Other,o),console.debug(`MParticle: Event "signup-abandon" tracked - ${o.pageId}`)}catch(e){console.error('MParticle: Event "signup-abandon" failed',e)}};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[o])}],963630)}]);