(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,226843,13635,963630,576816,e=>{"use strict";let r={1027:'This email address is already registered with an account. Please click "Log In" below to sign in.',11001:'Your password cannot contain the character combination "". Please try another password.',1198:"Too many failed login attempts. Please try again later.",938:e=>e?"Email or password is invalid. Please try again":"Email not found. Try another email",936:"This email address is already registered with an account. Please log in.",1134:(e,r)=>e&&r?r:r||"Must contain at least one lowercase, uppercase, special character, and a digit",1122:"Unfortunately, you've exceeded the daily limit for requests to reset your password. For security purposes, we ask that you try again later.",967:"The password you entered isn't working. Please try again, or click Forgot Password to select a new password.",1015:"Sorry, but that password is too similar to your previous one. Please try a different password.",1187:"Sorry, this password reset link has expired. To get a new reset link, please click Forgot Password.",1185:"Sorry, but it looks like the password reset link isn't working. To get a new reset link, please click Forgot Password.",1186:"Sorry, this password reset link has already been used. To get a new reset link, please click Forgot Password.",966:"Email or password is invalid. Please try again.",975:"Your password reset link has expired. Please request a new link",974:"Your password reset link has expired. Please request a new link",1038:"Email Address is invalid, Try another email."};e.s(["getErrorCodeMessage",0,function(e,t,n){let o=e&&r[e];return("function"==typeof o?o(t,n):o)||"Sorry, it looks we're having temporary problems. Please try again later."}],226843);var t=e.i(592121),n=e.i(959194),o=e.i(947118),i=e.i(737801);e.s(["useSignupStart",0,(e={})=>{let r=(0,o.useIsInitialized)(),s=(0,i.useEventAttributes)(),[a,l]=(0,t.useState)(!1),u=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let r={...s,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===r.formVariant&&delete r.formVariant,void 0===r.sourcePage&&delete r.sourcePage,void 0===r.sourceModule&&delete r.sourceModule,void 0===r.sourceElement&&delete r.sourceElement,void 0===r.sourcePosition&&delete r.sourcePosition,void 0===r.experimentJoinList&&delete r.experimentJoinList,r},[s,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.experimentJoinList,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,n.areObjectValuesDefined)(c)&&!a&&l(!0)},[c,a]),(0,t.useCallback)(async()=>{if(r&&a&&!u.current)try{window.mParticle?.logEvent?.("signup-start",window.mParticle?.EventType?.Other,c),u.current=!0,console.debug(`MParticle: Event "signup-start" tracked - ${c.pageId}`)}catch(e){console.error('MParticle: Event "signup-start" failed',e)}},[r,c,a])}],13635),e.s(["useSignupAbandon",0,(e={})=>{let r=(0,i.useEventAttributes)(),n=(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,n),console.debug(`MParticle: Event "signup-abandon" tracked - ${n.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)}},[n])}],963630),e.s(["useSignupComplete",0,(e={})=>{let r=(0,o.useIsInitialized)(),s=(0,i.useEventAttributes)(),[a,l]=(0,t.useState)(!1),u=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let r={...s,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&&(r.url=e.url),void 0===r.formVariant&&delete r.formVariant,void 0===r.sensitiveDataAuthorization&&delete r.sensitiveDataAuthorization,void 0===r.deviceTimeZone&&delete r.deviceTimeZone,void 0===r.sourcePage&&delete r.sourcePage,void 0===r.sourceModule&&delete r.sourceModule,void 0===r.sourceElement&&delete r.sourceElement,void 0===r.sourcePosition&&delete r.sourcePosition,r},[s,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,n.areObjectValuesDefined)(c)&&!a&&l(!0)},[c,a]),(0,t.useCallback)(async()=>{if(r&&a&&!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,a])}],576816)},617145,e=>{"use strict";var r=e.i(592121),t=e.i(546446),n=e.i(491045);let o={sourcePage:null,sourceModule:null,sourceElement:null,sourceUpsellPlacement:null};var i=e.i(959194);e.s(["usePurchaseSourceAttributes",0,()=>{let e=(0,t.useAtomValue)(n.purchaseSourceAttributionAtom),s=function(e){if(!e||"string"!=typeof e)return o;let r=e.split("-");if("mktg"!==r[0])return o;let t=r[1]||null,n=r[2]||null,i=r[3]||null,s=n&&n.toLowerCase().includes("upsell")?n:null;return{sourcePage:t,sourceModule:n,sourceElement:i,sourceUpsellPlacement:s}}((0,i.getTpcc)()),a=e?.sourcePage??s.sourcePage,l=e?.sourceModule??s.sourceModule,u=e?.sourceElement??s.sourceElement,c=e?.sourceUpsellPlacement??s.sourceUpsellPlacement;return(0,r.useMemo)(()=>({...a&&{sourcePage:a},...l&&{sourceModule:l},...u&&{sourceElement:u},...c&&{sourceUpsellPlacement:c}}),[a,l,u,c])}],617145)},782847,144977,156207,291967,127864,534643,653747,556872,681488,723356,e=>{"use strict";var r=e.i(592121),t=e.i(959194),n=e.i(947118),o=e.i(737801),i=e.i(617145);e.s(["usePurchaseStart",0,e=>{let s=(0,n.useIsInitialized)(),a=(0,o.useEventAttributes)(),l=(0,i.usePurchaseSourceAttributes)(),[u,c]=(0,r.useState)(!1),d=(0,r.useRef)(!1),m=(0,r.useMemo)(()=>{let r={...a,...l,url:e.url??a.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??void 0,mParticleGranted:e.mParticleGranted??!0};return void 0===r.premiumProductId&&delete r.premiumProductId,void 0===r.experimentJoinList&&delete r.experimentJoinList,r},[a,l,e.step,e.url,e.accountCreated,e.accountLogin,e.completed,e.eventChainId,e.premiumProductId,e.weatherMode,e.experimentJoinList,e.mParticleGranted]);return(0,r.useEffect)(()=>{(0,t.areObjectValuesDefined)(m)&&!u&&c(!0)},[m,u]),(0,r.useCallback)(async()=>{if(s&&u&&!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)}},[s,m,u])}],782847);var s=e.i(699173);function a(e,r){if("function"==typeof e)return e(r);null!=e&&(e.current=r)}function l(...e){return r.useCallback(function(...e){return r=>{let t=!1,n=e.map(e=>{let n=a(e,r);return t||"function"!=typeof n||(t=!0),n});if(t)return()=>{for(let r=0;r{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return o.scopeName=e,[function(t,o){let i=r.createContext(o),a=n.length;n=[...n,o];let l=t=>{let{scope:n,children:o,...l}=t,u=n?.[e]?.[a]||i,c=r.useMemo(()=>l,Object.values(l));return(0,s.jsx)(u.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(n,s){let l=s?.[e]?.[a]||i,u=r.useContext(l);if(u)return u;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((r,{useScope:t,scopeName:n})=>{let o=t(e)[`__scope${n}`];return{...r,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(o,...t)]}function c(e,r,{checkForDefaultPrevented:t=!0}={}){return function(n){if(e?.(n),!1===t||!n.defaultPrevented)return r?.(n)}}e.s(["useComposedRefs",0,l],144977),e.s(["createContext",0,function(e,t){let n=r.createContext(t),o=e=>{let{children:t,...o}=e,i=r.useMemo(()=>o,Object.values(o));return(0,s.jsx)(n.Provider,{value:i,children:t})};return o.displayName=e+"Provider",[o,function(o){let i=r.useContext(n);if(i)return i;if(void 0!==t)return t;throw Error(`\`${o}\` must be used within \`${e}\``)}]},"createContextScope",0,u],156207),"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",0,c],291967);var d=globalThis?.document?r.useLayoutEffect:()=>{};e.s(["useLayoutEffect",0,d],127864),r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var m=r[" useInsertionEffect ".trim().toString()]||d;function f({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){let[i,s,a]=function({defaultProp:e,onChange:t}){let[n,o]=r.useState(e),i=r.useRef(n),s=r.useRef(t);return m(()=>{s.current=t},[t]),r.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,o,s]}({defaultProp:t,onChange:n}),l=void 0!==e,u=l?e:i;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==l){let r=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}return[u,r.useCallback(r=>{if(l){let t="function"==typeof r?r(e):r;t!==e&&a.current?.(t)}else s(r)},[l,e,s,a])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",0,f],534643);var p=e=>{var t;let n,o,{present:i,children:s}=e,a=function(e){var t,n;let[o,i]=r.useState(),s=r.useRef(null),a=r.useRef(e),l=r.useRef("none"),[u,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,r)=>n[e][r]??e,t));return r.useEffect(()=>{let e=h(s.current);l.current="mounted"===u?e:"none"},[u]),d(()=>{let r=s.current,t=a.current;if(t!==e){let n=l.current,o=h(r);e?c("MOUNT"):"none"===o||r?.display==="none"?c("UNMOUNT"):t&&n!==o?c("ANIMATION_OUT"):c("UNMOUNT"),a.current=e}},[e,c]),d(()=>{if(o){let e,r=o.ownerDocument.defaultView??window,t=t=>{let n=h(s.current).includes(CSS.escape(t.animationName));if(t.target===o&&n&&(c("ANIMATION_END"),!a.current)){let t=o.style.animationFillMode;o.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=t)})}},n=e=>{e.target===o&&(l.current=h(s.current))};return o.addEventListener("animationstart",n),o.addEventListener("animationcancel",t),o.addEventListener("animationend",t),()=>{r.clearTimeout(e),o.removeEventListener("animationstart",n),o.removeEventListener("animationcancel",t),o.removeEventListener("animationend",t)}}c("ANIMATION_END")},[o,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:r.useCallback(e=>{s.current=e?getComputedStyle(e):null,i(e)},[])}}(i),u="function"==typeof s?s({present:a.isPresent}):r.Children.only(s),c=l(a.ref,(t=u,(o=(n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.ref:(o=(n=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof s||a.isPresent?r.cloneElement(u,{ref:c}):null};function h(e){return e?.animationName||"none"}p.displayName="Presence",e.s(["Presence",0,p],653747);var g=e.i(798973),v=e.i(982538),w=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,v.createSlot)(`Primitive.${t}`),o=r.forwardRef((e,r)=>{let{asChild:o,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(o?n:t,{...i,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});e.s(["Primitive",0,w,"dispatchDiscreteCustomEvent",0,function(e,r){e&&g.flushSync(()=>e.dispatchEvent(r))}],556872);var x="Checkbox",[b,P]=u(x),[y,E]=b(x);function k(e){let{__scopeCheckbox:t,checked:n,children:o,defaultChecked:i,disabled:a,form:l,name:u,onCheckedChange:c,required:d,value:m="on",internal_do_not_use_render:p}=e,[h,g]=f({prop:n,defaultProp:i??!1,onChange:c,caller:x}),[v,w]=r.useState(null),[b,P]=r.useState(null),E=r.useRef(!1),k=!v||!!l||!!v.closest("form"),j={checked:h,disabled:a,setChecked:g,control:v,setControl:w,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:E,required:d,defaultChecked:!T(i)&&i,isFormControl:k,bubbleInput:b,setBubbleInput:P};return(0,s.jsx)(y,{scope:t,...j,children:"function"==typeof p?p(j):o})}var j="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},i)=>{let{control:a,value:u,disabled:d,checked:m,required:f,setControl:p,setChecked:h,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:x}=E(j,e),b=l(i,p),P=r.useRef(m);return r.useEffect(()=>{let e=a?.form;if(e){let r=()=>h(P.current);return e.addEventListener("reset",r),()=>e.removeEventListener("reset",r)}},[a,h]),(0,s.jsx)(w.button,{type:"button",role:"checkbox","aria-checked":T(m)?"mixed":m,"aria-required":f,"data-state":A(m),"data-disabled":d?"":void 0,disabled:d,value:u,...o,ref:b,onKeyDown:c(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:c(n,e=>{h(e=>!!T(e)||!e),x&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});C.displayName=j;var M=r.forwardRef((e,r)=>{let{__scopeCheckbox:t,name:n,checked:o,defaultChecked:i,required:a,disabled:l,value:u,onCheckedChange:c,form:d,...m}=e;return(0,s.jsx)(k,{__scopeCheckbox:t,checked:o,defaultChecked:i,disabled:l,required:a,onCheckedChange:c,name:n,form:d,value:u,internal_do_not_use_render:({isFormControl:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{...m,ref:r,__scopeCheckbox:t}),e&&(0,s.jsx)(R,{__scopeCheckbox:t})]})})});M.displayName=x;var N="CheckboxIndicator",S=r.forwardRef((e,r)=>{let{__scopeCheckbox:t,forceMount:n,...o}=e,i=E(N,t);return(0,s.jsx)(p,{present:n||T(i.checked)||!0===i.checked,children:(0,s.jsx)(w.span,{"data-state":A(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:r,style:{pointerEvents:"none",...e.style}})})});S.displayName=N;var I="CheckboxBubbleInput",R=r.forwardRef(({__scopeCheckbox:e,...t},n)=>{let o,{control:i,hasConsumerStoppedPropagationRef:a,checked:u,defaultChecked:c,required:m,disabled:f,name:p,value:h,form:g,bubbleInput:v,setBubbleInput:x}=E(I,e),b=l(n,x),P=(o=r.useRef({value:u,previous:u}),r.useMemo(()=>(o.current.value!==u&&(o.current.previous=o.current.value,o.current.value=u),o.current.previous),[u])),y=function(e){let[t,n]=r.useState(void 0);return d(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(r=>{let t,o;if(!Array.isArray(r)||!r.length)return;let i=r[0];if("borderBoxSize"in i){let e=i.borderBoxSize,r=Array.isArray(e)?e[0]:e;t=r.inlineSize,o=r.blockSize}else t=e.offsetWidth,o=e.offsetHeight;n({width:t,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}n(void 0)},[e]),t}(i);r.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,r=!a.current;if(P!==u&&e){let t=new Event("click",{bubbles:r});v.indeterminate=T(u),e.call(v,!T(u)&&u),v.dispatchEvent(t)}},[v,P,u,a]);let k=r.useRef(!T(u)&&u);return(0,s.jsx)(w.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??k.current,required:m,disabled:f,name:p,value:h,form:g,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function T(e){return"indeterminate"===e}function A(e){return T(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=I;var F=e.i(632137),L=e.i(269767),O=e.i(747961);let V=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:n,...o},i)=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:i,"aria-labelledby":r,"aria-describedby":n,...o,children:[t?(0,s.jsx)("desc",{id:n,children:t}):null,void 0===e?(0,s.jsx)("title",{id:r,children:"Checkbox Checked"}):e?(0,s.jsx)("title",{id:r,children:e}):null,(0,s.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"})]})),z=r.default.forwardRef((e,r)=>(0,s.jsx)(O.BaseIcon,{ref:r,icon:V,...e}));z.displayName="CheckboxCheckedFilled";let U=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:n,...o},i)=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:i,"aria-labelledby":r,"aria-describedby":n,...o,children:[t?(0,s.jsx)("desc",{id:n,children:t}):null,void 0===e?(0,s.jsx)("title",{id:r,children:"Checkbox Indeterminate"}):e?(0,s.jsx)("title",{id:r,children:e}):null,(0,s.jsxs)("g",{fill:"currentColor",children:[(0,s.jsx)("path",{d:"M11 8a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1"}),(0,s.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"})]})]})),D=r.default.forwardRef((e,r)=>(0,s.jsx)(O.BaseIcon,{ref:r,icon:U,...e}));D.displayName="CheckboxIndeterminate";let _=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:n,...o},i)=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:i,"aria-labelledby":r,"aria-describedby":n,...o,children:[t?(0,s.jsx)("desc",{id:n,children:t}):null,void 0===e?(0,s.jsx)("title",{id:r,children:"Checkbox"}):e?(0,s.jsx)("title",{id:r,children:e}):null,(0,s.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"})]})),B=r.default.forwardRef((e,r)=>(0,s.jsx)(O.BaseIcon,{ref:r,icon:_,...e}));function $({className:e,checked:t,defaultChecked:n,onCheckedChange:o,...i}){let[a,l]=(0,r.useState)(void 0!==t?t:n||!1);(0,r.useEffect)(()=>{void 0!==t&&l(t)},[t]);let u="indeterminate"===a?D:a?z:B;return(0,s.jsx)(M,{"data-slot":"checkbox",className:(0,F.cn)("peer disabled:cursor-not-allowed disabled:opacity-50",e),...i,checked:a,onCheckedChange:e=>{void 0===t&&l(e),o?.(e)},children:(0,s.jsx)(S,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",forceMount:!0,children:(0,s.jsx)(u,{className:"size-6"})})})}B.displayName="Checkbox",e.s(["Checkbox",0,({id:e,label:r,wrapperClassName:t,labelClassName:n,leftPos:o,...i})=>(0,s.jsxs)(L.FormItem,{id:e,className:(0,F.cn)("flex w-full gap-3",o?"flex-row-reverse justify-end":"flex-row justify-between",t),children:[(0,s.jsx)("div",{className:"pt-0.5",children:(0,s.jsx)(L.FormLabel,{className:(0,F.cn)(n),children:r})}),(0,s.jsx)("div",{children:(0,s.jsx)(L.FormControl,{children:(0,s.jsx)($,{...i})})})]})],681488);let J=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:n,...o},i)=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:i,"aria-labelledby":r,"aria-describedby":n,...o,children:[t?(0,s.jsx)("desc",{id:n,children:t}):null,void 0===e?(0,s.jsx)("title",{id:r,children:"Person"}):e?(0,s.jsx)("title",{id:r,children:e}):null,(0,s.jsx)("g",{fill:"currentColor",children:(0,s.jsx)("path",{d:"M8.936 15H7.07a.92.92 0 0 1-.66-.283.98.98 0 0 1-.274-.683v-3.379a.92.92 0 0 1-.66-.283.98.98 0 0 1-.273-.682V6.793c0-.384.148-.752.41-1.024.263-.272.619-.424.99-.424h2.8c.371 0 .727.152.99.424s.41.64.41 1.024V9.69a.98.98 0 0 1-.273.682.92.92 0 0 1-.66.283v3.38a.98.98 0 0 1-.274.682.92.92 0 0 1-.66.283M6.603 6.31a.43.43 0 0 0-.339.132.46.46 0 0 0-.128.351V9.69h.934v4.345h1.866V9.69h.934V6.793a.47.47 0 0 0-.128-.35.44.44 0 0 0-.339-.133zM8.003 4.862c-.37 0-.73-.113-1.037-.325a1.9 1.9 0 0 1-.687-.867 2 2 0 0 1-.107-1.116c.072-.374.25-.718.511-.988s.594-.454.956-.529a1.8 1.8 0 0 1 1.078.11c.342.146.633.394.838.711.205.318.315.691.315 1.073 0 .512-.197 1.003-.547 1.365s-.825.566-1.32.566m0-2.896a.9.9 0 0 0-.518.162.96.96 0 0 0-.344.434 1 1 0 0 0 .202 1.052c.13.135.297.227.478.264a.9.9 0 0 0 .54-.055.94.94 0 0 0 .418-.356.99.99 0 0 0-.116-1.219.92.92 0 0 0-.66-.282"})})]})),G=r.default.forwardRef((e,r)=>(0,s.jsx)(O.BaseIcon,{ref:r,icon:J,...e}));G.displayName="Person",e.s(["Person",0,G],723356)},920654,e=>{"use strict";var r=e.i(546446),t=e.i(961123),n=e.i(499239);e.s(["useCart",0,function(){let e=(0,t.useSearchParams)().get("products"),[o,i]=(0,r.useAtom)(n.cartProductIdAtom);return{productId:e||o,setProductId:i}}])},264268,e=>{"use strict";var r=e.i(699173),t=e.i(592121),n=e.i(990420),o=e.i(666021),i=e.i(924689),s=e.i(683903),a=e.i(695881),l=e.i(553329),u=e.i(790010),c=e.i(226843),d=e.i(61284),m=e.i(13635),f=e.i(963630),p=e.i(576816),h=e.i(782847),g=e.i(617145),v=e.i(269767),w=e.i(825440),x=e.i(677988),b=e.i(681488),P=e.i(877957),y=e.i(368847),E=e.i(240058),k=e.i(837879),j=e.i(609958),C=e.i(723356),M=e.i(558802),N=e.i(422825),S=e.i(918462),I=e.i(961123),R=e.i(528600),T=e.i(725296),A=e.i(394481),F=e.i(703123),L=e.i(546446),O=e.i(499239),V=e.i(920654);let z=(0,a.createLogger)("SignupForm");e.s(["default",0,({signupBtnText:e,redirectToCheckoutOnSignup:a=!1})=>{let U=(0,s.useTranslations)("UserAuth"),{signup:D,authRedirect:_}=(0,u.useUserSignup)(),{updateEmailSubscriptions:B}=(0,N.useEmailPreferences)({skipStatus:!0}),[$,J]=(0,t.useState)(!1),[G,Y]=(0,t.useState)(null),{user:H}=(0,R.useUser)(),Z=(0,k.useSubscriptionsEnabled)(),q=(0,L.useAtomValue)(A.privacyRegimeAtom)??T.default.EXEMPT,W=(0,I.useParams)()?.locale||"",K=H?.isUserLoggedIn||!1,{legalLinks:X}=(0,S.useFooterLinks)(q,W,K),{productId:Q}=(0,V.useCart)(),ee=(0,L.useAtomValue)(O.eventChainIdAtom),er=(0,L.useSetAtom)(F.gsiEmailStatesAtom),et=(0,t.useMemo)(()=>i.z.object({firstName:i.z.string().min(1,{error:U("firstNameRequired")}),email:i.z.email({message:U("invalidEmailError")}),password:i.z.string().min(8,{message:U("passwordMinLength")}).regex(/\d/,{message:U("passwordDigitRequired")}).regex(/[^A-Za-z0-9\s]/,{message:U("passwordSpecialChar")}),confirmPassword:i.z.string().min(1,{message:U("confirmPasswordRequired")}),newsletterEmails:i.z.boolean().optional(),weeklyEmails:i.z.boolean().optional(),marketingEmails:i.z.boolean().optional(),onYourRadarEmails:i.z.boolean().optional()}).refine(e=>e.password===e.confirmPassword,{message:U("passwordsMustMatch"),path:["confirmPassword"]}),[U]),en=(0,n.useForm)({resolver:(0,o.zodResolver)(et),defaultValues:{firstName:"",email:"",password:"",confirmPassword:""}}),[eo,ei,es,ea]=en.watch(["newsletterEmails","weeklyEmails","onYourRadarEmails","marketingEmails"]);(0,t.useEffect)(()=>er({newsletter:eo,weekly:ei,onYourRadar:es,marketing:ea}),[er,eo,ei,es,ea]);let el=(0,g.usePurchaseSourceAttributes)(),eu=(0,m.useSignupStart)({formVariant:"checkout",sourcePage:el.sourcePage,sourceModule:el.sourceModule??null,sourceElement:el.sourceElement??null});(0,t.useEffect)(()=>{eu()},[eu]),(0,f.useSignupAbandon)({formVariant:"checkout",sourcePage:el.sourcePage,sourceModule:el.sourceModule??null,sourceElement:el.sourceElement??null});let ec=(0,h.usePurchaseStart)({step:1,url:"/subscribe/checkout/signup",accountCreated:!1,accountLogin:!1,completed:!1,eventChainId:ee||"",premiumProductId:Q});(0,t.useEffect)(()=>{ec()},[ec]);let ed=(0,p.useSignupComplete)({formVariant:"subscription page",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),em=(0,t.useMemo)(()=>X.find(e=>"termsOfUse"===e.titleTranslationKey),[X]),ef=(0,t.useMemo)(()=>X.find(e=>"privacyPolicy"===e.titleTranslationKey),[X]),ep=async e=>{let{success:r,error:t}=await D({firstName:e.firstName,email:e.email,password:e.password},!1);if(!r){Y((0,c.getErrorCodeMessage)(t.messageCode)),J(!1);return}(await ed(),await B({newsletter:e.newsletterEmails,weekly:e.weeklyEmails,onYourRadar:e.onYourRadarEmails,marketing:e.marketingEmails}).catch(e=>{z.error("Failed to update email subscriptions",e)}),Z&&a)?_(d.PROMO_CHECKOUT_URL):_()},eh=async e=>{J(!0),Y(null);let{error:r}=await (0,l.tryCatch)(ep(e));r&&(Y(U("signupGenericError")),z.error("Signup error:",r),J(!1))};return(0,r.jsxs)("div",{className:"@container",children:[G&&(0,r.jsx)(y.Text,{color:"error",className:"mb-4",children:G}),(0,r.jsx)(v.Form,{...en,children:(0,r.jsxs)("form",{onSubmit:en.handleSubmit(eh),children:[(0,r.jsx)(v.FormField,{control:en.control,name:"firstName",render:({field:e})=>(0,r.jsx)(v.FormItem,{children:(0,r.jsx)(v.FormControl,{children:(0,r.jsx)(w.Input,{...e,label:U("firstName"),icon:C.Person})})})}),(0,r.jsx)(v.FormField,{control:en.control,name:"email",render:({field:e})=>(0,r.jsx)(v.FormItem,{children:(0,r.jsx)(v.FormControl,{children:(0,r.jsx)(w.Input,{...e,label:U("email"),icon:j.Email})})})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-0 @lg:grid-cols-2 @lg:gap-8",children:[(0,r.jsx)(v.FormField,{control:en.control,name:"password",render:({field:e})=>(0,r.jsx)(v.FormItem,{children:(0,r.jsx)(v.FormControl,{children:(0,r.jsx)(x.PasswordInput,{...e,label:U("password"),icon:M.Locked})})})}),(0,r.jsx)(v.FormField,{control:en.control,name:"confirmPassword",render:({field:e})=>(0,r.jsx)(v.FormItem,{children:(0,r.jsx)(v.FormControl,{children:(0,r.jsx)(x.PasswordInput,{...e,label:U("confirmPassword"),icon:M.Locked})})})})]}),Z&&(0,r.jsxs)("div",{className:"px-6",children:[(0,r.jsx)(v.FormField,{control:en.control,name:"newsletterEmails",render:({field:{value:e,onChange:t,...n}})=>(0,r.jsx)(b.Checkbox,{...n,checked:e,onCheckedChange:t,label:(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(v.FormField,{control:en.control,name:"weeklyEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...n}})=>(0,r.jsx)(b.Checkbox,{...n,checked:e,onCheckedChange:t,label:(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(v.FormField,{control:en.control,name:"onYourRadarEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...n}})=>(0,r.jsx)(b.Checkbox,{...n,checked:e,onCheckedChange:t,label:(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(v.FormField,{control:en.control,name:"marketingEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...n}})=>(0,r.jsx)(b.Checkbox,{...n,checked:e,onCheckedChange:t,label:(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(y.Text,{className:"my-4 py-2.5 text-[13px] font-normal",children:U.rich("agreeTermsContinue",{termsOfUse:e=>(0,r.jsx)(E.default,{href:em?.url||"",className:"text-blue-600 underline",children:e}),privacyPolicy:e=>(0,r.jsx)(E.default,{href:ef?.url||"",className:"text-blue-600 underline",children:e})})}),(0,r.jsx)(P.Button,{type:"submit",loading:$,disabled:$,className:"bg-brand-300 h-12 w-full leading-[1.5] font-bold",children:e||U("signup")})]})})]})}])}]);