PageSourceSearch

https://sentx.ai/assets/AuthForm-CBoyVz8F.js

js sentx.ai collected 2026-10-05 14:27:32 UTC 21,792 bytes, 1 lines download raw bytes

1import{e,f as n,r,h as i,k as t,m as a,n as s,o as l,u as o,j as c,p as d,q as u,L as h,s as m,a as p,d as v,I as x,M as f,F as g,B as _,t as j,v as y,w,x as b,y as S,z as k}from"./index-DYVhUWYh.js";import{s as E}from"./oauthUtils-B-s337yx.js";var C,N={};const L=l(function(){if(C)return N;C=1;var e=N&&N.__createBinding||(Object.create?function(e,n,r,i){void 0===i&&(i=r);var t=Object.getOwnPropertyDescriptor(n,r);t&&!("get"in t?!n.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,t)}:function(e,n,r,i){void 0===i&&(i=r),e[i]=n[r]}),n=N&&N.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),r=N&&N.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var t in r)"default"!==t&&Object.prototype.hasOwnProperty.call(r,t)&&e(i,r,t);return n(i,r),i};Object.defineProperty(N,"__esModule",{value:!0}),N.useTurnstile=N.Turnstile=void 0;const i=r(s()),t="undefined"!=typeof globalThis?globalThis:window;let a,l,o=void 0!==t.turnstile?"ready":"unloaded";const c=new Promise((e,n)=>{l={resolve:e,reject:n},"ready"===o&&e(void 0)});{const e="cf__reactTurnstileOnLoad",n="https://challenges.cloudflare.com/turnstile/v0/api.js";a=()=>{if("unloaded"===o){o="loading",t[e]=()=>{l.resolve(),o="ready",delete t[e]};const r=`${n}?onload=${e}&render=explicit`,i=document.createElement("script");i.src=r,i.async=!0,i.addEventListener("error",()=>{l.reject("Failed to load Turnstile."),delete t[e]}),document.head.appendChild(i)}return c}}function d({id:e,className:n,style:r,sitekey:t,action:s,cData:l,theme:c,language:d,tabIndex:u,responseField:h,responseFieldName:m,size:p,fixedSize:v,retry:x,retryInterval:f,refreshExpired:g,appearance:_,execution:j,userRef:y,onVerify:w,onSuccess:b,onLoad:S,onError:k,onExpire:E,onTimeout:C,onAfterInteractive:N,onBeforeInteractive:L,onUnsupported:A}){const F=(0,i.useRef)(null),T=(0,i.useState)({onVerify:w,onSuccess:b,onLoad:S,onError:k,onExpire:E,onTimeout:C,onAfterInteractive:N,onBeforeInteractive:L,onUnsupported:A})[0],z=null!=y?y:F,B=v?{width:"compact"===p?"130px":"flexible"===p?"100%":"300px",height:"compact"===p?"120px":"65px",...r}:r;return(0,i.useEffect)(()=>{if(!z.current)return;let e=!1,n="";return(async()=>{var r,i;if("ready"!==o)try{await a()}catch(w){return void(null===(r=T.onError)||void 0===r||r.call(T,w))}if(e||!z.current)return;let v;const y={sitekey:t,action:s,cData:l,theme:c,language:d,tabindex:u,"response-field":h,"response-field-name":m,size:p,retry:x,"retry-interval":f,"refresh-expired":g,appearance:_,execution:j,callback:(e,n)=>{var r,i;null===(r=T.onVerify)||void 0===r||r.call(T,e,v),null===(i=T.onSuccess)||void 0===i||i.call(T,e,n,v)},"error-callback":e=>{var n;return null===(n=T.onError)||void 0===n?void 0:n.call(T,e,v)},"expired-callback":e=>{var n;return null===(n=T.onExpire)||void 0===n?void 0:n.call(T,e,v)},"timeout-callback":()=>{var e;return null===(e=T.onTimeout)||void 0===e?void 0:e.call(T,v)},"after-interactive-callback":()=>{var e;return null===(e=T.onAfterInteractive)||void 0===e?void 0:e.call(T,v)},"before-interactive-callback":()=>{var e;return null===(e=T.onBeforeInteractive)||void 0===e?void 0:e.call(T,v)},"unsupported-callback":()=>{var e;return null===(e=T.onUnsupported)||void 0===e?void 0:e.call(T,v)}};n=window.turnstile.render(z.current,y),v=function(e){return{execute:n=>window.turnstile.execute(e,n),reset:()=>window.turnstile.reset(e),getResponse:()=>window.turnstile.getResponse(e),isExpired:()=>window.turnstile.isExpired(e)}}(n),null===(i=T.onLoad)||void 0===i||i.call(T,n,v)})(),()=>{e=!0,n&&window.turnstile.remove(n)}},[t,s,l,c,d,u,h,m,p,x,f,g,_,j]),(0,i.useEffect)(()=>{T.onVerify=w,T.onSuccess=b,T.onLoad=S,T.onError=k,T.onExpire=E,T.onTimeout=C,T.onAfterInteractive=N,T.onBeforeInteractive=L,T.onUnsupported=A},[w,b,S,k,E,C,N,L,A]),i.default.createElement("div",{ref:z,id:e,className:n,style:B})}return N.Turnstile=d,N.default=d,N.useTurnstile=function(){const[e,n]=(0,i.useState)(o);return(0,i.useEffect)(()=>{"ready"!==o&&c.then(()=>n(o))},[]),t.turnstile},N}()),A="_wrap_1y8k6_1",F="_iconWrap_1y8k6_66",T="_iconHalo_1y8k6_76",z="_icon_1y8k6_66",B="_heading_1y8k6_107",I="_body_1y8k6_111",M="_emailLine_1y8k6_118",V="_expires_1y8k6_128",P="_inboxCta_1y8k6_133",D="_inboxCtaMark_1y8k6_162",R="_resend
1Row_1y8k6_171",O="_resendLink_1y8k6_181",W="_resendPending_1y8k6_203",q="_dot_1y8k6_209",U="_resendSent_1y8k6_233",H="_resendFailed_1y8k6_243",K="_divider_1y8k6_260",G="_useDifferent_1y8k6_267",X="_crossDevice_1y8k6_300",J=({provider:e})=>"gmail"===e?c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[c.jsx("path",{d:"M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z",fill:"#EA4335"}),c.jsx("path",{d:"M5.455 4.64v7.09L0 7.616V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64z",fill:"#4285F4"}),c.jsx("path",{d:"M24 5.457v2.16l-5.455 4.113v-7.09l1.528-1.146C21.69 2.28 24 3.434 24 5.457z",fill:"#34A853"}),c.jsx("path",{d:"M0 7.616v11.75c0 .904.732 1.636 1.636 1.636h3.819V11.73L0 7.616z",fill:"#C5221F"}),c.jsx("path",{d:"M24 7.616v11.75c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L24 7.616z",fill:"#34A853"}),c.jsx("path",{d:"M5.455 11.73l6.545 4.91 6.545-4.91v-7.09L12 9.548 5.455 4.64v7.09z",fill:"#FBBC04"})]}):"outlook"===e?c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[c.jsx("path",{d:"M22.5 3.75H15v3.75h7.5V3.75zm0 5.25H15v3.75h7.5V9zm0 5.25H15v3.75h7.5v-3.75zM13.5 2.25H1.5v19.5h12V2.25zm-3.75 11.4a3.4 3.4 0 1 1 0-6.8 3.4 3.4 0 0 1 0 6.8z",fill:"#0078D4"}),c.jsx("circle",{cx:"7.5",cy:"10.25",r:"2",fill:"#FFFFFF"})]}):"yahoo"===e?c.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c.jsx("path",{d:"M3.36 4.5h4.27l2.86 7.34L13.4 4.5h4.16l-7.13 17.04H6.27l1.96-4.6L3.36 4.5zM18.4 11.34h2.16v2.16H18.4v-2.16zm-.16 3.66h2.48l-.27 5.04h-1.94l-.27-5.04z",fill:"#6001D2"})}):"icloud"===e?c.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c.jsx("path",{d:"M18 10c0-.34-.03-.67-.08-1 .68-.69 1.08-1.62 1.08-2.62 0-2.06-1.68-3.72-3.75-3.72-.85 0-1.66.28-2.31.78A5.99 5.99 0 0 0 8 2C4.69 2 2 4.69 2 8c0 .39.04.77.11 1.13C.86 9.7 0 10.95 0 12.4 0 14.39 1.61 16 3.6 16h14.4c2.21 0 4-1.79 4-4 0-1.79-1.17-3.3-2.79-3.83.05-.05.79-.17.79-.17z",fill:"#3693F3"})}):null,$=({email:e,mode:n,onFooterClick:s,activationPoll:l})=>{const{t:m}=o(),[p,v]=r.useState("idle");(e=>{const n=null==e?void 0:e.uid,s=null==e?void 0:e.token;r.useEffect(()=>{if(!n||!s)return;let e=!1,r=null,l=null,o=0;const c=()=>{null!==r&&(window.clearTimeout(r),r=null)},d=()=>{e=!0,c(),null==l||l.abort()},u=n=>{e||(c(),r=window.setTimeout(()=>{h()},n))},h=async()=>{if(r=null,e||l)return;if("visible"!==document.visibilityState)return;if(o>=450)return void d();o+=1;const c=new AbortController;l=c;try{const{data:r}=await i.post(t.activationStatus,{uid:n,token:s},{signal:c.signal});if(e)return;if(null==r?void 0:r.verified)return d(),void(r.access&&r.refresh&&a.setTokens({access:r.access,refresh:r.refresh}));u(4e3)}catch(h){if(e)return;const n=null==h?void 0:h.status;if(400===n)return void d();u(429===n?8e3:4e3)}finally{l===c&&(l=null)}},m=()=>{e||l||"visible"===document.visibilityState&&(c(),h())},p=()=>{"visible"===document.visibilityState?m():(c(),null==l||l.abort())};return document.addEventListener("visibilitychange",p),window.addEventListener("focus",m),h(),()=>{d(),document.removeEventListener("visibilitychange",p),window.removeEventListener("focus",m)}},[n,s])})("just-signed-up"===n?l:void 0);const x=(e=>{const n=(e||"").lastIndexOf("@");if(n<0)return null;const r=e.slice(n+1).toLowerCase();return"gmail.com"===r||"googlemail.com"===r?{provider:"gmail",url:"https://mail.google.com/",labelKey:"Open Gmail"}:"outlook.com"===r||"hotmail.com"===r||"live.com"===r||"msn.com"===r?{provider:"outlook",url:"https://outlook.live.com/mail/",labelKey:"Open Outlook"}:"yahoo.com"===r?{provider:"yahoo",url:"https://mail.yahoo.com/",labelKey:"Open Yahoo Mail"}:"icloud.com"===r||"me.com"===r?{provider:"icloud",url:"https://www.icloud.com/mail",labelKey:"Open iCloud Mail"}:null})(e),f=r.useRef(!1),g=r.useRef(null);r.useEffect(()=>()=>{null!==g.current&&window.clearTimeout(g.current)},[]);const _="verify-required"===n,j=_?"Verify your email to continue":"Check your email",y=_?"Click the link to activate your account, then sign in again.":"Click the link in the email to activate your account.",w=_?"Wrong account? Sign out":"Use a different email address";return c.jsxs("div",{className:A,"aria-live":"polite",children:[c.jsxs("div",{className:F,"aria-hidden":"true",children:[c.jsx("div",{className:T}),c.jsx("div",{className:z,children:c.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 48 48",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"6",y:"11",width:"36",height:"26",rx:"2.5"}),c.jsx("path",{d:"M6 14 L24 28 L42 14"}),c.jsx("circle",{cx:"38",cy:"9",r:"2.25",fill:"currentColor",stroke:"none"})]})})]}),c.jsx("div",{className:B,children:c.jsx(d,{variant:"textXL",color:"main",weight:600,align:"center",children:c.jsx(u,{children:j})})}),c.jsxs("div",{className:I,children:[c.jsx(d,{variant:"textM",color:"secondary",align:"center",children:c.jsx(u,{children:"We sent a verification link to"})}),c.jsx("p",{className:M,children:e}),c.jsx(d,{variant:"textM",color:"secondary",align:"center",children:c.jsx(u,{children:y})})]}),c.jsx("div",{className:V,children:c.jsx(d,{variant:"textXS",color:"secondary",align:"center",children:c.jsx(u,{children:"The link expires in 24 hours."})})}),x&&c.jsxs("a",{className:P,href:x.url,target:"_blank",rel:"noopener noreferrer",children:[c.jsx("span",{className:D,children:c.jsx(J,{provider:x.provider})}),c.jsx(d,{variant:"button",weight:500,color:"inherit",children:c.jsx(u,{children:x.labelKey})})]}),c.jsxs("div",{className:R,children:["idle"===p&&c.jsx("button",{type:"button",className:O,onClick:async()=>
1{if(!f.current&&"pending"!==p){f.current=!0,v("pending");try{await i.post("/auth/users/resend_activation/",{email:e}),v("sent")}catch(n){const e=null==n?void 0:n.name,r=null==n?void 0:n.code;if("AbortError"===e||"CanceledError"===e||"ERR_CANCELED"===r)return void v("idle");v("failed")}finally{f.current=!1}null!==g.current&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,v(e=>"pending"===e?e:"idle")},1e4)}},children:c.jsx(u,{children:"Didn't get the email? Resend"})}),"pending"===p&&c.jsxs("span",{className:W,"aria-busy":"true",children:[c.jsx("span",{className:q}),c.jsx("span",{className:q}),c.jsx("span",{className:q})]}),"sent"===p&&c.jsxs("span",{className:U,children:[c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})}),c.jsx(u,{children:"Email sent. Check your inbox."})]}),"failed"===p&&c.jsx("span",{className:H,children:m("errors.generic")})]}),c.jsx("div",{className:K,"aria-hidden":"true"}),c.jsx("button",{type:"button",className:G,onClick:s,children:c.jsx(d,{variant:"textS",color:"secondary",children:c.jsx(u,{children:w})})}),!_&&c.jsx(h,{to:"/signin",className:X,children:c.jsx(d,{variant:"textS",color:"secondary",children:c.jsx(u,{children:"Verified on another device? Sign in"})})})]})};$.displayName="CheckEmailCard";const Y="_form_fields_1gxwn_2",Q="_forgot_link_1gxwn_9",Z="_captcha_wrapper_1gxwn_22",ee="_provider_notice_1gxwn_30",ne=({showCaptcha:e,setShowCaptcha:n,onStepChange:i})=>{const t=(()=>{try{return globalThis.__sentxFormDraft}catch{return}})(),[a,s]=r.useState((null==t?void 0:t.email)??""),[l,h]=r.useState((null==t?void 0:t.password)??"");r.useEffect(()=>{(()=>{try{delete globalThis.__sentxFormDraft}catch{}})()},[]);const[j,y]=r.useState(void 0),[w,b]=r.useState(null),[S,k]=r.useState(!1),[E,C]=r.useState(!1),[N,A]=r.useState(!1),[F,T]=r.useState(null),{handleError:z,getFieldError:B,clearErrors:I}=m(),{t:M}=o(),V=p(),[P]=r.useState(()=>{const e=V.state;return"email_unverified_at_provider"===(null==e?void 0:e.oauthNotice)}),{login:D,isLoginLoading:R}=v(),O=e=>{R||(I(),A(!1),D({email:a,password:l},{captchaToken:e,onSuccess:()=>{},onError:e=>{const r=null==e?void 0:e.name,t=null==e?void 0:e.code;if("AbortError"===r||"CanceledError"===r||"ERR_CANCELED"===t)return n(!1),void b(null);const s=e;if("email_not_verified"===(null==s?void 0:s.serverCode)){const e=s.email||a;return T(e),n(!1),b(null),void(null==i||i("verify-required"))}if(401===(null==s?void 0:s.status)&&"authentication_failed"===(null==s?void 0:s.serverCode))return A(!0),n(!1),void b(null);z(s),n(!1),b(null)}}))},W=()=>{k(!0),b(null)},q=r.useRef(()=>{});q.current=()=>O(null),r.useEffect(()=>{if(!e||w)return;const n=window.setTimeout(()=>{k(!0),q.current()},8e3);return()=>window.clearTimeout(n)},[e,w]);const U=()=>{T(null),s(""),h(""),y(void 0),b(null),n(!1),A(!1),I(),null==i||i("form")},[H,K]=r.useState(""),[G,X]=r.useState(void 0),J=()=>{C(!1),K(""),X(void 0)};return F?c.jsx($,{email:F,mode:"verify-required",onFooterClick:U}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:Y,children:[P&&c.jsx("div",{className:ee,children:M("Verify your email with your sign-in provider, then try again.")}),c.jsx(x,{label:M("Email"),type:"email",value:a,error:B("email"),onValidationError:y,onChange:e=>{s(e.target.value),A(!1)},placeholder:M("[email protected]"),autocomplete:"email",fullWidth:!0,required:!0}),c.jsx(x,{label:M("Password"),type:"password",value:l,error:B("password")||(N?M("Incorrect email or password."):void 0),onChange:e=>{h(e.target.value),A(!1)},placeholder:M("Enter password"),autocomplete:"current-password",fullWidth:!0,required:!0,noValidate:!0}),c.jsx("button",{type:"button",className:Q,onClick:()=>C(!0),children:c.jsx(d,{variant:"textS",color:"main",weight:500,children:c.jsx(u,{children:"Forgot your password?"})})}),c.jsx(f,{portal:!0,visible:E,close:J,ariaLabel:M("Reset your password"),children:c.jsx(g,{resetEmail:H,setResetEmail:K,resetEmailError:G,setResetEmailError:X,onSuccess:J})})]}),e&&c.jsx("div",{className:Z,children:c.jsx(L,{sitekey:"0x4AAAAAABhA1HbKG0E7ibJq",onVerify:e=>{b(e),O(e)},onError:W,onExpire:W,onTimeout:W,refreshExpired:"auto"})}),c.jsx(_,{variant:"primary",fullWidth:!0,type:"submit",size:"normal",onClick:r=>{r.preventDefault(),S?O(null):e&&w?O(w):n(!0)},disabled:!a||!l||!!j||e&&!w&&!S||R||E,loading:R||e&&!w&&!S,children:R?c.jsx(u,{children:"Signing in..."}):c.jsx(u,{children:"Sign in"})})]})};
1ne.displayName="SignInFields";const re="_form_fields_1b5a6_1",ie="_captcha_wrapper_1b5a6_8",te="_email_error_1b5a6_16",ae="_email_error_link_1b5a6_24",se="_back_link_1b5a6_30",le=({email:i,showCaptcha:t,setShowCaptcha:a,onRegistered:s,onBack:l})=>{const[p,v]=r.useState(""),[f,g]=r.useState(""),[j,y]=r.useState(void 0),[w,b]=r.useState(void 0),{getFieldErrorCodes:S,clearErrors:k,handleError:E}=m(),{t:C}=o(),[N,A]=r.useState(null),[F,T]=r.useState(!1),z=S("email"),B=S("password"),I=z.includes("unique"),M=!I&&z.length?C("Enter a valid email."):void 0,V=B.length?C("Choose a stronger password — at least 8 characters and not only numbers."):void 0,P=()=>{T(!0),A(null)},D=e({mutationKey:n.mutations.register.key,mutationFn:async e=>(await n.mutations.register.mutate(e)).data}),R=r.useRef(()=>{});r.useEffect(()=>{if(!t||N)return;const e=window.setTimeout(()=>{T(!0),R.current()},8e3);return()=>window.clearTimeout(e)},[t,N]);const O=()=>{D.isPending||i&&p&&f&&p===f&&D.mutate({email:i,password:p,re_password:f},{onSuccess:e=>{s(null==e?void 0:e.activation_poll)},onError:e=>{E(e),a(!1),A(null)}})};return R.current=O,c.jsxs(c.Fragment,{children:[I&&c.jsxs("div",{className:te,children:[C("This email is already registered.")," ",c.jsx(h,{to:"/signin",className:ae,children:C("Sign in instead.")})]}),M&&c.jsx("div",{className:te,children:M}),c.jsxs("div",{className:re,children:[c.jsx(x,{label:C("Password"),type:"password",value:p,onChange:e=>v(e.target.value),placeholder:C("Enter password"),autocomplete:"new-password",fullWidth:!0,required:!0,error:V,onValidationError:y}),c.jsx(d,{variant:"textS",color:"secondary",children:C("At least 8 characters, not only numbers.")}),c.jsx(x,{label:C("Confirm password"),type:"password",value:f,onChange:e=>g(e.target.value),placeholder:C("Confirm your password"),autocomplete:"new-password",fullWidth:!0,required:!0,error:f&&p!==f?C("Passwords do not match"):void 0,onValidationError:b})]}),t&&c.jsx("div",{className:ie,children:c.jsx(L,{sitekey:"0x4AAAAAABhA1HbKG0E7ibJq",onVerify:e=>{A(e),i&&p&&p===f&&O()},onError:P,onExpire:P,onTimeout:P,refreshExpired:"auto"})}),c.jsx(_,{fullWidth:!0,type:"submit",size:"normal",variant:"primary",loading:D.isPending||t&&!N&&!F,disabled:!p||!f||!!j||!!w||p!==f||D.isPending,onClick:e=>{e.preventDefault(),k(),F||t&&N?O():a(!0)},children:c.jsx(u,{children:"Submit"})}),c.jsx("button",{type:"button",className:se,onClick:l,children:c.jsx(d,{variant:"textS",color:"secondary",children:c.jsx(u,{children:"Use a different email address"})})})]})};le.displayName="SignUpPasswordStep";const oe="_form_fields_1y2y6_1",ce=({email:e,setEmail:n,onButtonClick:i})=>{const[t,a]=r.useState(void 0),{getFieldError:s}=m(),{t:l}=o();return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:oe,children:c.jsx(x,{label:l("Email"),type:"email",value:e,onChange:e=>n(e.target.value),onValidationError:a,placeholder:l("[email protected]"),autocomplete:"email",fullWidth:!0,required:!0,error:s("email")})}),c.jsx(_,{fullWidth:!0,type:"submit",size:"normal",variant:"primary",disabled:!e||!!t,onClick:e=>{e.preventDefault(),i(e)},children:c.jsx(u,{children:"Next"})})]})};ce.displayName="SignUpEmailStep";const de=({email:e,activationPoll:n,onUseDifferentEmail:r})=>c.jsx($,{email:e,mode:"just-signed-up",activationPoll:n,onFooterClick:r});de.displayName="SignUpCheckEmailStep";const ue=1,he=2,me=3,pe=({showCaptcha:e,setShowCaptcha:n,onStepChange:i})=>{const[t,a]=r.useState(""),[s,l]=r.useState(null),[o,d]=r.useState(ue),u=e=>{d(e),i&&i(e===ue?"email":e===he?"password":"check-email")},h=()=>{u(he)},m=e=>{l(e??null),u(me)},p=()=>{l(null),u(ue)};return o===ue?c.jsx(ce,{email:t,setEmail:a,onButtonClick:h}):o===he?c.jsx(le,{email:t,showCaptcha:e,setShowCaptcha:n,onRegistered:m,onBack:p}):c.jsx(de,{email:t,activationPoll:s??void 0,onUseDifferentEmail:p})};pe.displayName="SignUpFields";const ve="_container_1t6x2_1",xe="_apple_btn_1t6x2_7",fe="_google_btn_1t6x2_11",ge=e=>{const{className:n,isSignIn:i=!1,disabled:t=!1}=e,{handleLogin:a,isLoading:s}=(()=>{const{clearErrors:e,showError:n}=m(),{t:i}=o(),[t,a]=r.useState(!1);return{handleLogin:async r=>{try{a(!0),e(),await E(r)}catch{a(!1),n(i("errors.generic"))}},isLoading:t}})();return c.jsx(_,{variant:"outline",size:"big",icon:c.jsx(j,{variant:"google",width:16}),onClick:()=>a("google"),className:n,disabled:s||t,loading:s,children:i?c.jsx(u,{children:"Continue with Google"}):c.jsx(u,{children:"Sign up with Google"})})};ge.displayName="GoogleButton";const _e=r=>{const{className:i,isSignIn:t=!1,disabled:a=!1}=r,{mutate:s,isPending:l}=e({mutationFn:async()=>(await n.mutations.signInWithApple.mutate()).data,onSuccess:({auth_url:e})=>{window.location.href=e}});return c.jsx(_,{className:i,onClick:()=>s(),variant:"outline",size:"big",icon:c.jsx(j,{variant:"apple",width:16}),disabled:l||a,loading:l,children:t?c.jsx(u,{children:"Continue with Apple"}):c.jsx(u,{children:"Sign up with Apple"})})};_e.displayName="AppleButton";const je=({isSignIn:e=!1})=>y?null:c.jsxs("div",{className:ve,children:[c.jsx(ge,{className:fe,isSignIn:e}),c.jsx(_e,{className:xe,isSignIn:e})]});
1je.displayName="OAuthButtons";const ye="_notice_10c85_5",we="_link_10c85_12",be=()=>c.jsxs("p",{className:ye,children:[c.jsx(d,{as:"span",variant:"textXS",color:"secondary",children:c.jsx(u,{children:"By continuing, you confirm you are 18 or older and agree to our"})})," ",c.jsx(h,{to:"/terms",className:we,children:c.jsx(d,{as:"span",variant:"textXS",color:"accent",children:c.jsx(u,{children:"Terms of Service"})})})," ",c.jsx(d,{as:"span",variant:"textXS",color:"secondary",children:c.jsx(u,{children:"and"})})," ",c.jsx(h,{to:"/privacy",className:we,children:c.jsx(d,{as:"span",variant:"textXS",color:"accent",children:c.jsx(u,{children:"Privacy Policy"})})})]});be.displayName="AuthTermsNotice";const Se="_form_1lgde_1",ke="_input_fields_1lgde_6",Ee="_footer_1lgde_14",Ce=({isSignIn:e=!1})=>{const[n]=w();r.useEffect(()=>{const e=n.get("next");b(e)&&S(e)},[n]);const[i,t]=r.useState(!1),[a,s]=r.useState("email"),[l,o]=r.useState("form"),m=()=>k(!0),p=!e&&"check-email"===a||e&&"verify-required"===l;return c.jsx("form",{onSubmit:e=>{e.preventDefault(),m(),t(!0)},className:Se,children:c.jsxs("div",{className:ke,children:[e?c.jsx(ne,{showCaptcha:i,setShowCaptcha:t,onStepChange:o}):c.jsx(pe,{showCaptcha:i,setShowCaptcha:t,onStepChange:s}),!p&&c.jsx(be,{}),!p&&c.jsx("div",{onClickCapture:m,children:c.jsx(je,{isSignIn:e})}),!p&&c.jsxs("footer",{className:Ee,children:[c.jsx(d,{variant:"textS",color:"secondary",children:e?c.jsx(u,{children:"Don't have an account?"}):c.jsx(u,{children:"Already have an account?"})}),c.jsx(h,{to:e?"/signup":"/signin",children:c.jsx(d,{variant:"textS",color:"main",weight:500,children:e?c.jsx(u,{children:"Sign up"}):c.jsx(u,{children:"Sign in"})})})]})]})})};Ce.displayName="AuthForm";export{Ce as A};

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.