PageSourceSearch

https://sparc.world/_next/static/chunks/8472-c1a14262327da13f.js

js sparc.world collected 2026-10-05 20:02:32 UTC 21,500 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8472,3270],{16996:function(e,i,n){"use strict";n.d(i,{n:function(){return l}});var t=n(52322);n(2784);var r=n(92679),a=n(85801),s=n(65992);let o=(0,s.ZP)(a.Z)(e=>{let{theme:i}=e;return{position:"absolute",right:8,top:8,color:i.palette.grey[500],[i.breakpoints.down("sm")]:{right:"2px",top:"2px"}}});function l(e){return(0,t.jsx)(o,{"aria-label":"Close",title:"Close",onClick:e.onClick,children:(0,t.jsx)(r.Z,{htmlColor:e.color})})}},31073:function(e,i,n){"use strict";n.d(i,{b:function(){return p}});var t=n(52322),r=n(65992),a=n(75006),s=n(74183),o=n(69692),l=n(2784),c=n(22829),d=n(43493),u=n(9705),x=n(5632);let m=(0,r.ZP)("img")(e=>{let{}=e;return{display:"inline-block",width:"100%",maxWidth:"180px",margin:"4px","&:hover":{cursor:"pointer",transform:"scale(1.2)"}}}),h=[{id:"facebook",img:a.NQ.cdn+"/assets/buttons/login/facebook.png",alt:"Sign in With Facebook"},{id:"linkedin",img:a.NQ.cdn+"/assets/buttons/login/linkedin.png",alt:"Sign in With LinkedIn"},{id:"google",img:a.NQ.cdn+"/assets/buttons/login/google.png",alt:"Sign in With Google"},{id:"apple",img:a.NQ.cdn+"/assets/buttons/login/apple.png",alt:"Sign in With Apple"}];function p(e){let{redirectTo:i}=e,{handleApiError:n}=(0,c._)(),{getReferredBy:r}=(0,u.E)(),[a,p]=(0,l.useState)(!1),g=(0,x.useRouter)(),f=async e=>{let t;p(!0),i?t=i:g.query.continue?t=g.query.continue:g.asPath&&(t=g.asPath),t&&(t.startsWith("/signin")||t.startsWith("/join"))&&(t=void 0);try{let{redirect:i}=await d.e.signinWithExternalService(e,{continue:t,referredBy:r()||void 0});window.location.replace(i);return}catch(e){n(e)}p(!1)};return a?(0,t.jsx)(s.g,{centered:!0}):(0,t.jsx)(o.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",textAlign:"center"},children:h.map(e=>(0,t.jsx)(o.Z,{children:(0,t.jsx)(m,{draggable:!1,alt:e.alt,src:e.img,onClick:()=>f(e.id)})},e.id))})}},56:function(e,i,n){"use strict";n.d(i,{q:function(){return o}});var t=n(52322),r=n(2784),a=n(93696);let s=null;function o(e){let{animationData:i,width:o,height:l,maxWidth:c,loop:d=!1,autoplay:u=!0}=e,x=(0,r.useRef)(null),m=(0,r.useRef)();return(0,r.useEffect)(()=>{let e=async()=>{s||(s=await n.e(7642).then(n.t.bind(n,12039,23))),x.current&&s&&(m.current=s.loadAnimation({animationData:i,container:x.current,loop:d,autoplay:u}))},t=a.g.executeTaskWhenEverythingIsElseIsDone(e);return()=>{var e;t.cancel(),null===(e=m.current)||void 0===e||e.destroy()}},[i]),(0,t.jsx)("div",{style:{width:o,height:l,maxWidth:c,margin:"auto"},ref:x})}},78929:function(e,i,n){"use strict";n.d(i,{W:function(){return d}});var t=n(52322),r=n(85801),a=n(35469),s=n(45596),o=n(2784),l=n(38203),c=n(26436);function d(e){let[i,n]=(0,o.useState)(!1);return(0,t.jsx)(s.Z,{id:e.id,label:e.label,type:i?"text":"password",error:e.error,required:e.required,name:e.name,value:e.value,onChange:e.onChange,helperText:e.helperText,size:e.size,fullWidth:e.fullWidth,InputProps:e.allowShow?{endAdornment:(0,t.jsx)(a.Z,{position:"end",children:(0,t.jsx)(r.Z,{"aria-label":"toggle password visibility",onClick:()=>n(e=>!e),edge:"end",children:i?(0,t.jsx)(l.Z,{}):(0,t.jsx)(c.Z,{})})})}:void 0})}},93270:function(e,i,n){"use strict";n.r(i),n.d(i,{default:function(){return u}});var t=n(52322),r=n(2784),a=n(56),s=JSON.parse('{"v":"4.10.1","fr":30,"ip":0,"op":40,"w":80,"h":80,"nm":"Success Checkmark","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Check Mark","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[40,40,0],"ix":2},"a":{"a":0,"k":[-1.312,6,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-15.75,8],[-8,16],[13.125,-4]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":25,"s":[0],"e":[100]},{"t":33}],"ix":1},"e":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":40,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Circle Flash","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":25,"s":[0],"e":[98]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":30,"s":[98],"e":[0]},{"t":38}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[40,40,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":25,"s":[0,0,100],"e":[
vendor: 6,067 bytes, line 1
1100,100,100]},{"t":30}],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[64,64],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.529866635799,0.961458325386,0.448091417551,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":40,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Circle Stroke","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[39.022,39.022,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":16,"s":[100,100,100],"e":[80,80,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":22,"s":[80,80,100],"e":[120,120,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":25,"s":[120,120,100],"e":[100,100,100]},{"t":29}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[60,60],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[0],"e":[100]},{"t":16}],"ix":1},"e":{"a":0,"k":0,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.427450984716,0.800000011921,0.35686275363,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0.978,0.978],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":40,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Circle Green Fill","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":21,"s":[0],"e":[98]},{"t":28}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[40,40,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":21,"s":[0,0,100],"e":[100,100,100]},{"t":28}],"ix":6}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[64,64],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.427450984716,0.800000011921,0.35686275363,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":40,"st":0,"bm":0}]}'),o=n(62197),l=n(74448),c=n(69692),d=n(97922);function u(e){let i=e.animationMaxWidth||e.maxWidth||400,[n,u]=(0,r.useState)(i),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=()=>{if(!x.current)return;let e=x.current.getBoundingClientRect().width;u(e)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);let m=e.fullWidth?"100%":"80%";return(0,t.jsxs)(c.Z,{ref:x,sx:{width:m,maxWidth:e.maxWidth||"600px",display:"block",margin:"auto"},children:[(0,t.jsx)(c.Z,{sx:{marginBottom:-(.05*n)+"px"},children:(0,t.jsx)(a.q,{animationData:s,loop:!1,autoplay:!0,width:m,maxWidth:"".concat(i,"px"),height:"100%"})}),e.htmlTitle?(0,t.jsx)(o.Z,{textAlign:"center",variant:"medium"===e.fontSize?"h5":"h6",fontWeight:"600",component:"h1",mb:2,mt:"medium"===e.fontSize?2:1,color:"success.light",dangerouslySetInnerHTML:{__html:e.htmlTitle}}):null,e.customHtmlMessage?(0,t.jsx)(c.Z,{children:(0,t.jsx)(d.B,{content:e.customHtmlMessage,textAlign:"center"})}):null,e.textMessage?(0,t.jsx)(c.Z,{children:(0,t.jsx)(o.Z,{textAlign:"center",variant:"medium"===e.fontSize?"body1":"body2",maxWidth:500,display:"block",margin:"auto",children:e.textMessage})}):null,e.onContinue?(0,t.jsx)(c.Z,{mt:2,textAlign:"center",children:(0,t.jsx)(l.u,{size:"large",color:"primary",variant:"text",onClick:e.onContinue,children:"Continue"})}):null]})}},38407:function(e,i,n){"use strict";n.d(i,{z:function(){return t.default}});var t=n(93270)},5023:function(e,i,n){"use strict";n.d(i,{W:function(){return c}});var t=n(52322);n(2784);var r=n(60258),a=n(81611),s=n(17962),o=n.n(s),l=n(69692);function c(e){return(0,t.jsx)(l.Z,{children:(0,t.jsx)(r.Z,{style:{position:"relative",display:"block",width:"100%",overflow:"hidden"},children:e.items.map(i=>i.id!==e.crtScreen?null:(0,t.jsx)(a.Z,{nodeRef:i.nodeRef,mountOnEnter:!0,unmountOnExit:!0,timeout:1e3,classNames:{enter:o().screenEnter,enterActive:o().screenEnterActive,exit:o().screenExit,exitActive:o().screenExitActive},children:i.node({ref:i.nodeRef})},i.id))})})}},79833:function(e,i,n){"use strict";n.d(i,{A:function(){return t}});class t{static getLocaleLongTimezoneName(){let e=new Intl.DateTimeFormat("en-US",{timeZoneName:"long"}),i=e.resolvedOptions().timeZone;return i}static getLocaleLanguage(){let e=navigator.language;return e}}},22981:function(e,i,n){"use strict";n.d(i,{Q:function(){return s},c:function(){return r}});var t=n(63955);function r(e){return(0,t.cI)(e)}var a=n(52322);function s(e){return(0,a.jsx)(t.Qr,{...e})}n(2784)},68472:function(e,i,n){"use strict";n.d(i,{V:function(){return H}});var t=n(52322),r=n(2784),a=n(74448),s=n(35936),o=n(6060),l=n(69506),c=n(45596),d=n(69692),u=n(22981),x=n(62197),m=n(24511),h=n(6812),p=n(35199),g=n(5632),f=n(31073),y=n(56961),j=n(66198),k=n(16996),v=n(78929),_=n(5023),Z=n(98159),C=n(37892),b=n(23119),S=n(40294);let E=m.Ry({first_name:m.Z_().required("First name is required"),last_name:m.Z_().required("Last name is required"),referral_indication:m.Z_()});
1function W(e){let{control:i,handleSubmit:n,formState:{errors:o}}=(0,u.c)({resolver:(0,h.X)(E)});(0,r.useEffect)(()=>{Z.c.focusFirstError(o,["first_name","last_name"])},[o]);let m=i=>{e.onSubmit(i)};return(0,t.jsxs)(d.Z,{textAlign:"center",children:[e.isDialog?(0,t.jsx)(s.Z,{variant:"h5",fontWeight:"500",align:"center",children:(0,t.jsx)(k.n,{onClick:e.onCancel})}):null,(0,t.jsx)(S.W,{isDialog:e.isDialog,children:(0,t.jsx)(C.n,{children:(0,t.jsxs)("form",{onSubmit:n(m),noValidate:!0,children:[(0,t.jsx)(u.Q,{control:i,name:"first_name",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsx)(l.Z,{fullWidth:!0,margin:"normal",children:(0,t.jsx)(c.Z,{autoFocus:!0,type:"text",size:"medium",name:"first_name",label:"First Name",required:!0,error:void 0!==n.error,helperText:n.error?n.error.message:null,onBlur:i.onBlur,onChange:i.onChange})})}}),(0,t.jsx)(u.Q,{control:i,name:"last_name",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsx)(l.Z,{fullWidth:!0,margin:"normal",children:(0,t.jsx)(c.Z,{type:"text",size:"medium",name:"last_name",required:!0,label:"Last Name",error:void 0!==n.error,helperText:n.error?n.error.message:null,onChange:i.onChange})})}}),(0,t.jsx)(u.Q,{control:i,name:"referral_indication",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsx)(l.Z,{fullWidth:!0,margin:"normal",children:(0,t.jsx)(c.Z,{type:"text",size:"medium",value:i.value||"",name:i.name,label:"How did you hear about us? (Optional)",error:void 0!==n.error,helperText:n.error?n.error.message:null,onChange:i.onChange})})}}),(0,t.jsx)(d.Z,{mt:2,children:(0,t.jsxs)(x.Z,{variant:"caption",color:"text.secondary",children:["By clicking Agree & Join you agree that you are at least 13 years old and you accept to Sparc's\xa0",(0,t.jsx)(b.Z,{href:"/terms-of-service",target:"_blank",children:"Terms of Service"}),"\xa0and\xa0",(0,t.jsx)(b.Z,{href:"/privacy-policy",target:"_blank",children:"Privacy Policy"})]})}),(0,t.jsx)(d.Z,{mt:3,textAlign:"right",children:(0,t.jsx)(a.u,{type:"submit",variant:"contained",color:"primary",size:"large",fullWidth:!0,loading:e.isSubmitting,children:"Agree & Join"})})]})})})]})}var w=n(20969),A=n(65992),D=n(45733);let T="digits-input-first-digit",R=(0,A.ZP)("input")(e=>{let{theme:i}=e;return{width:"40px",height:"60px",fontSize:"32px",outlineWidth:"2px",outlineStyle:"solid",outlineColor:i.palette.text.secondary,display:"inline-block",textAlign:"center",margin:"10px",borderRadius:"10px",border:0,fontWeight:"500","&:focus":{outlineColor:i.palette.primary.main,outlineWidth:"3px"},"&::selection":{},"&.invalid":{outlineColor:i.palette.error.main,outlineWidth:"3px"}}}),z=r.forwardRef((e,i)=>{let{...n}=e;return(0,t.jsx)(R,{...n,ref:i,inputMode:"decimal"})});function B(e){let[i,n]=(0,r.useState)(""),a=i=>{e.onChange(i),n(i)},s=(0,D.Z)({acceptedCharacters:/^[0-9]$/,length:5,value:i,onChange:a});return(0,r.useEffect)(()=>{let e=document.getElementById(T);e&&e.focus()},[]),(0,t.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,t.jsx)(z,{id:T,className:e.error?"invalid":void 0,...s[0]}),(0,t.jsx)(z,{...s[1],className:e.error?"invalid":void 0}),(0,t.jsx)(z,{...s[2],className:e.error?"invalid":void 0}),(0,t.jsx)(z,{...s[3],className:e.error?"invalid":void 0}),(0,t.jsx)(z,{...s[4],className:e.error?"invalid":void 0})]})}var N=n(80982),P=n(22829),q=n(9705);let F="Quick security check",I=m.Ry({code:m.Z_().length(5).required("Please enter the verification code")});function G(e){let[i,n]=(0,r.useState)(!1),{control:o,handleSubmit:c,setError:m}=(0,u.c)({resolver:(0,h.X)(I)}),{handleApiError:p}=(0,P._)(),{signUserIn:g}=(0,q.E)(),f=async i=>{n(!0);try{let n=await w.K.verifyExpressAccountEmail(e.sessionId,i.code);g(n,!0),e.onSuccess()}catch(i){let e=i.message;"invalid-code"===e?m("code",{message:"This code is not valid. Please try again."}):p(i)}n(!1)};return(0,t.jsxs)(d.Z,{style:{width:"500px",maxWidth:"100%",textAlign:"center"},children:[e.isDialog?(0,t.jsxs)(s.Z,{variant:"h5",fontWeight:"500",children:[F,(0,t.jsx)(k.n,{onClick:e.onCancel})]}):null,(0,t.jsxs)(S.W,{isDialog:e.isDialog,children:[!0!==e.isDialog?(0,t.jsx)(x.Z,{variant:"h4",component:"h1",mb:2,fontWeight:500,children:F}):null,(0,t.jsx)(x.Z,{variant:"h6",fontWeight:400,component:"h2",mb:2,children:"Please enter the verification code that we sent to your email"}
1),(0,t.jsxs)("form",{onSubmit:c(f),children:[(0,t.jsx)(u.Q,{control:o,name:"code",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsxs)(l.Z,{fullWidth:!0,error:void 0!==n.error,margin:"normal",children:[(0,t.jsx)(B,{digits:5,error:void 0!==n.error,onChange:i.onChange}),n.error?(0,t.jsx)(N.Z,{sx:{textAlign:"center"},children:n.error.message}):null]})}}),(0,t.jsx)(d.Z,{mt:3,children:(0,t.jsx)(a.u,{loading:i,type:"submit",fullWidth:!0,size:"large",variant:"contained",color:"primary",children:"Complete your registration"})})]})]})]})}var L=n(79833),Q=n(38407);function V(e){return(0,t.jsx)(d.Z,{sx:{width:"600px",maxWidth:"100%",textAlign:"center"},children:(0,t.jsxs)(S.W,{isDialog:e.isDialog,children:[e.isDialog?(0,t.jsx)(k.n,{onClick:e.onClose}):null,(0,t.jsx)(Q.z,{maxWidth:250}),(0,t.jsxs)(x.Z,{variant:"h5",fontWeight:"600",component:"h1",children:["\uD83C\uDF89Congratulations, ",e.userFirstName,"!"]}),(0,t.jsx)(x.Z,{variant:"body1",children:"Your account has been successfully created. You can now start using Sparc."}),(0,t.jsx)(d.Z,{mt:3,children:(0,t.jsx)(a.u,{size:"large",color:"primary",fullWidth:!0,onClick:e.onClose,children:"Ok"})})]})})}function M(e){let{isDialog:i,children:n}=e;return i?(0,t.jsx)(o.Z,{children:n}):(0,t.jsx)(d.Z,{children:n})}let O=m.Ry({email:m.Z_().email("Please provide a valid email").required("Email is required"),password:m.Z_().min(6,"The password must have at least 6 characters").required("Password is required")}).required();function H(e){let i=(0,g.useRouter)(),[n,o]=(0,r.useState)(!1),{handleApiError:m}=(0,P._)(),{control:b,handleSubmit:E,formState:{errors:A},getValues:D,setError:T}=(0,u.c)({resolver:(0,h.X)(O)}),{getReferredBy:R}=(0,q.E)(),[z,B]=(0,r.useState)(""),[N,F]=(0,r.useState)(""),[I,Q]=(0,r.useState)("root"),{asPath:H}=(0,g.useRouter)(),J=(0,r.useMemo)(()=>"/signin?continue=".concat(encodeURIComponent(H)),[H]);(0,r.useEffect)(()=>{Z.c.focusFirstError(A,["email","password"])},[A]),(0,r.useEffect)(()=>{e.onAllowBackdropClose&&e.onAllowBackdropClose("root"===I)},[I]);let X=()=>{Q("success")},K=()=>{Q("singup-step2")},U=async e=>{o(!0),F(e.first_name);try{let i=R(),n=await w.K.createExpressSignupSession({...D(),...e,timezone:L.A.getLocaleLongTimezoneName(),locale_lang:L.A.getLocaleLanguage(),referred_by:i});B(n.session_id),Q("verify-email"),o(!1)}catch(i){let e=i.message;if("logged-in"===e){window.location.reload();return}if("invalid-email"===e){T("email",{message:"This email can't been used"}),o(!1),Q("root");return}m(i),o(!1)}},Y=()=>{e.isDialog&&e.onClose&&e.onClose()},$=()=>{e.isDialog&&e.onClose?e.onClose():i.push("/home")},ee=[{id:"root",nodeRef:(0,r.createRef)(),node:i=>{let{ref:n}=i;return(0,t.jsxs)(d.Z,{ref:n,sx:{width:"100%",maxWidth:e=>e.breakpoints.values.sm},children:[e.isDialog?(0,t.jsxs)(s.Z,{variant:"h5",fontWeight:"500",align:"center",children:["Join or sign in to ",e.actionThatRequiresSignIn||"continue",e.isDialog?(0,t.jsx)(k.n,{onClick:Y}):null]}):null,(0,t.jsxs)(M,{isDialog:e.isDialog,children:[(0,t.jsxs)(S.W,{isDialog:e.isDialog,children:[!0!==e.isDialog?(0,t.jsx)(x.Z,{variant:"h5",component:"h1",fontWeight:"500",align:"center",children:"Join or Sign in"}):null,(0,t.jsx)(C.n,{children:(0,t.jsxs)("form",{onSubmit:E(K),children:[(0,t.jsx)(u.Q,{control:b,name:"email",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsx)(l.Z,{fullWidth:!0,margin:"normal",children:(0,t.jsx)(c.Z,{type:"text",size:"medium",name:"email",label:"Email",value:i.value||"",error:void 0!==n.error,helperText:n.error?n.error.message:null,onChange:i.onChange})})}}),(0,t.jsx)(u.Q,{control:b,name:"password",render:e=>{let{field:i,fieldState:n}=e;return(0,t.jsx)(l.Z,{fullWidth:!0,margin:"normal",children:(0,t.jsx)(v.W,{size:"medium",value:i.value||"",name:"password",label:"Password (6 or more characters)",error:void 0!==n.error,helperText:n.error?n.error.message:void 0,onChange:i.onChange})})}}),(0,t.jsx)(d.Z,{textAlign:"center",mt:2,children:(0,t.jsx)(a.u,{size:"large",type:"submit",fullWidth:!0,children:"Continue"})})]})})]}),(0,t.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"center",mt:2,children:[(0,t.jsx)(x.Z,{variant:"body2",mr:1,children:"Have an account?"}),(0,t.jsx)(a.u,{size:"small",variant:"text",type:"button",href:J,children:"Sign In"})]}),(0,t.jsx)(d.Z,{my:3,children:(0,t.jsx)(y.Z,{children:(0,t.jsx)(j.Z,{label:"OR SIGN IN WITH"})})}),(0,t.jsx)(f.b,{})]})]})}},{id:"singup-step2",nodeRef:(0,r.createRef)(),node:i=>{let{ref:r}=i;return(0,t.jsx)(d.Z,{ref:r,children:(0,t.jsx)(W,{isDialog:e.isDialog,onCancel:Y,onSubmit:U,isSubmitting:n})})}},{id:"verify-email",nodeRef:(0,r.createRef)(),node:i=>{let{ref:n}=i;return(0,t.jsx)(d.Z,{ref:n,children:(0,t.jsx)(G,{onCancel:Y,isDialog:e.isDialog,sessionId:z,onSuccess:X})})}},{id:"success",nodeRef:(0,r.createRef)(),node:i=>{let{ref:n}=i;return(0,t.jsx)(d.Z,{ref:n,children:(0,t.jsx)(V,{userFirstName:N,onClose:$,isDialog:e.isDialog})})}}];return(0,t.jsx)(_.W,{crtScreen:I,items:ee})}},37892:function(e,i,n){"use strict";n.d(i,{n:function(){return a}});var t=n(65992),r=n(69692);let a=(0,t.ZP)(r.Z)(e=>{let{}=e;return{display:"block",width:"100%",maxWidth:"350px",margin:"auto"}})},40294:function(e,i,n){"use strict";n.d(i,{W:function(){return o}});var t=n(52322),r=n(7671),a=n(92096),s=n(6060);function o(e){return e.isDialog?(0,t.jsx)(s.Z,{children:e.children}):(0,t.jsx)(a.Z,{children:(0,t.jsx)(r.Z,{children:e.children})})}},98159:function(e,i,n){"use strict";n.d(i,{c:function(){return t}});let t={focusFirstError(e,i){let n;for(let t of i)if(e[t]){n=t;break}if(n){let e=document.querySelector('input[name="'.concat(n,'"]'));e&&e.focus()}}}},17962:function(e){e.exports={screenEnter:"SlideGroupTransitionStyle_screenEnter__6oMZt",screenEnterActive:"SlideGroupTransitionStyle_screenEnterActive__dCMpw",screenExit:"SlideGroupTransitionStyle_screenExit__QaXba",screenExitActive:"SlideGroupTransitionStyle_screenExitActive__prnnF"}}}]);

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.