PageSourceSearch

https://stepup.vercel.app/_next/static/chunks/pages/smb/ba/signup-390dff0d544adb90.js

js stepup.vercel.app collected 2026-10-03 07:50:31 UTC 5,986 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1521],{87885:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/smb/ba/signup",function(){return s(80032)}])},80032:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return f}});var n=s(85893),l=s(67294),r=s(11163),t=s(33299),i=s(82175),o=s(74231),c=s(41664),u=s.n(c),d=s(55456),m=s(96741),h=s.n(m),p=s(9669),_=s.n(p),x=s(99981);s(45516);var v=s(83253),b=s.n(v),g=s(37460);s(72385);var j=e=>{let{jwtHandler:a,handleModalClose:s,role:t,subRole:c}=e,[m,p]=(0,l.useState)(!1),[v,j]=(0,l.useState)(!1),[N,y]=(0,l.useState)(),[f,w]=(0,l.useState)(),[P,S]=(0,l.useState)(),[C,k]=(0,l.useState)(),[E,O]=(0,l.useState)(!1),Z=(0,r.useRouter)();(0,l.useEffect)(()=>{Z.query.error&&(j(Z.query.error),p(!1))},[Z.query.error]);let q=e=>{e.preventDefault(),Z.replace("/smb/ba/login")};return(0,n.jsxs)(n.Fragment,{children:[E?(0,n.jsxs)(b(),{isOpen:E,portalClassName:"ReactModalPortal",overlayClassName:"ReactModal__Overlay CustomModalOverlay",className:"ReactModal__Content CustomModal narrow signup-success",ariaHideApp:!1,shouldCloseOnOverlayClick:!0,children:[(0,n.jsx)("div",{className:"header",children:(0,n.jsx)("div",{className:"logo"})}),(0,n.jsxs)("div",{className:"body",children:[(0,n.jsx)("div",{className:"title",children:"OTP Verification"}),(0,n.jsx)(g.Z,{email:C,role:t,subRole:c})]})]}):"",(0,n.jsx)(i.J9,{initialValues:{email:"",password:"",passwordConfirmation:""},validationSchema:o.Ry({email:o.Z_().email("Please enter a valid Email.").required("Please enter a valid Email.").test("Unique Email","Email already in use.",async e=>{if(""==e||void 0===e)return!1;let a=e.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/);if(!a)return!0;let s=await _().post("".concat("https://live.stepup.celestiahealth.org/api","/subscribers/is-email-taken"),{email:e});return!(s=s.data).data.exists}),password:o.Z_().required("Please enter a valid Password.").min(8,"Password is too short - should be 8 chars minimum."),passwordConfirmation:o.Z_().oneOf([o.iH("password"),null],"Passwords must match.").required("Please enter a valid Password.")}),validateOnChange:!1,validateOnBlur:!1,onSubmit:async(e,s)=>{let{setSubmitting:n,resetForm:l}=s;if(!f){S("Please enter Phone Number");return}p(!0),e.username=e.email,e.role=t,e.sub_role=c,e.phone=f;try{let s=await _()({url:"".concat("https://live.stepup.celestiahealth.org/api","/auth/local/signup_by_role"),method:"POST",data:{...e}});if(s=s.data,null!=s.error)j(s.error.message),p(!1);else{O(!0),p(!1),k(e.email);let n=s.jwt;a(n)}}catch(e){if(e.response.data.error.message){let a=e.response.data.error.message;y(["alert",a])}else y(["alert","Something went wrong"]);p(!1)}},children:(0,n.jsx)(i.l0,{children:(0,n.jsxs)("div",{className:"".concat(h().signup__box," ").concat(h().ba__signup__box," auth__box ba__signup__box signup__box"),children:[(0,n.jsx)("h1",{className:"auth__box__title ".concat(h().box__title),children:"Sign up and get started!"}),(0,n.jsx)("div",{className:"".concat(h().sub__title),children:"Start your journey by signing up now!"}),N&&(0,n.jsx)("div",{className:"".concat(h().reset__alert," reset__alert"),style:{backgroundColor:"success"===N[0]?"#00d1b2":"lightcoral"},children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:N[1]}})}),(0,n.jsxs)("div",{className:"".concat(h().fields__wrapper," ").concat(h().ba__signup__fields__wrapper),children:[(0,n.jsx)("div",{className:"".concat(h().columns," columns"),children:(0,n.jsxs)("div",{className:"".concat(h().column," column"),children:[(0,n.jsx)("div",{className:"".concat(h().help__text),children:"Please use the email linked to your program."}),(0,n.jsx)(d.Z,{name:"email",type:"email",placeholder:"E-Mail"})]})}),(0,n.jsx)("div",{className:"".concat(h().columns," columns"),children:(0,n.jsxs)("div",{className:"".concat(h().column," column"),children:[(0,n.jsx)("div",{className:"".concat(h().help__text),children:"Please use the phone number linked to your program."}),(0,n.jsx)(x.ZP,{name:"phone_number",placeholder:"Phone Number",defaultCountry:"US",value:f,countries:["US","IN"],rules:{required:!0,validate:x.yf},onChange:w}),P?(0,n.jsx)("div",{className:"error",children:P}):""]})}),(0,n.jsx)("div",{className:"".concat(h().columns," columns"),children:(0,n.jsx)("div",{className:"".concat(h().column," column"),children:(0,n.jsx)(d.Z,{name:"password",type:"password",placeholder:"Password"})})}),(0,n.jsx)("div",{className:"".concat(h().columns," columns"),children:(0,n.jsx)("div",{className:"".concat(h().column," column"),children:(0,n.jsx)(d.Z,{name:"passwordConfirmation",type:"password",placeholder:"Confirm Password"})})}),(0,n.jsx)("div",{className:"".concat(h().columns," columns"),children:(0,n.jsxs)("div",{className:"".concat(h().column," column"),children:[v&&(0,n.jsx)("div",{className:"error",children:v}),(0,n.jsx)("button",{type:"submit",disabled:m,onClick:()=>{f?!1===(0,x.yf)(f)?S("Please enter a valid Phone Number."):S():S("Please enter Phone Number.")},className:"".concat(h().signup__button," auth__button button is-primary"),children:m?"Signing Up ...":"Sign Up"}),(0,n.jsx)("div",{className:"".concat(h().login__link__wrapper),children:(0,n.jsxs)("div",{children:["Do you have already an account ? ",(0,n.jsx)("span",{className:"".concat(h().link),children:(0,n.jsx)(u(),{href:"".concat("/coac
1h/login"),onClick:e=>q(e),children:"Login"})})]})})]})})]})]})})})]})},N=s(45156);let y=e=>{let{props:a}=e,s=(0,r.useRouter)(),[i,o]=(0,l.useState)(13),[c,u]=(0,l.useState)(""),[d,m]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{(0,t.getSession)().then(e=>{e?s.replace("/smb/dashboard"):m(!1)}),document.body.className="smb-signup-page signup-page"},[s]),(0,n.jsx)("div",{className:"signup-page-container smb-signup-page-container",children:(0,n.jsx)(j,{role:i,subRole:c})})};y.getLayout=function(e){return(0,n.jsx)(N.Z,{children:e})};var f=y}},function(e){e.O(0,[5156,9774,2888,179],function(){return e(e.s=87885)}),_N_E=e.O()}]);

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.