PageSourceSearch

https://medsy.ai/_next/static/chunks/2521-432cbd575fb9cd9d.js

js medsy.ai collected 2026-10-05 12:15:32 UTC 13,593 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2521],{12097:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});let i={src:"/_next/static/media/whatappLogo.85025e81.svg",height:22,width:22,blurWidth:0,blurHeight:0}},26907:()=>{},42339:(e,t,s)=>{"use strict";s.d(t,{Ld:()=>n,Lm:()=>l,yr:()=>a});let i=new Set(["signIn","signUp","login","universities","blog","terms-and-conditions","privacy-policy","cancelpolicy","refundpolicy","our-team","aboutus","coursehome","coursedetails","forgot-password","reset-password","report","health","yearwise","MBBSStudents","medsypolicy"]);function a(e){if(!e)return"medsy";if(Array.isArray(e)){let t=e.find(e=>e&&String(e).trim());return t?String(t).trim().replace(/^\/+/,""):"medsy"}let t=String(e).trim();if(t.startsWith("["))try{let e=JSON.parse(t);return a(e)}catch(e){}return t.includes(",")?t.split(",")[0].trim().replace(/^\/+/,"")||"medsy":t.replace(/^\/+/,"")||"medsy"}function l(e){let t=a(e);return localStorage.setItem("institution",t),t}function n(e,t,s){if(!e||!t||!s||!function(e){if(!e||"/"===e)return!1;let t=e.split("/").filter(Boolean)[0];return!!t&&!i.has(t)}(e))return;let l=e.split("/").filter(Boolean),n=l[0],r=a(localStorage.getItem("institution"));if(!r||n===r)return;let o=l.slice(1).join("/"),d=o?"/".concat(r,"/").concat(o):"/".concat(r,"/dashboard");t.replace(d)}},42521:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>I});var i=s(95155),a=s(12115),l=s(56929),n=s(88907),r=s(80095),o=s(39200),d=s(84014),c=s(50467),u=s(44382);s(26907);var m=s(79436),g=s(12097),h=s(53878),p=s(30518),v=s(42339),f=s(73520),y=s(69784);s(69512),s(91034);var x=s(99759),w=s(95435),S=s(14656);let b=(0,l.default)(()=>Promise.all([s.e(2320),s.e(7125),s.e(8195)]).then(s.bind(s,70576)),{loadableGenerated:{webpack:()=>[require.resolveWeak("../components/otpCommon")]},ssr:!1}),j=(0,l.default)(()=>Promise.all([s.e(6613),s.e(2238)]).then(s.bind(s,2238)),{loadableGenerated:{webpack:()=>[require.resolveWeak("../../app/loading")]},ssr:!1}),N=(0,l.default)(()=>Promise.all([s.e(4813),s.e(3351),s.e(4897),s.e(9809),s.e(1444),s.e(2150),s.e(8427),s.e(859),s.e(3954)]).then(s.bind(s,11729)),{loadableGenerated:{webpack:()=>[require.resolveWeak("../common/countryPicker")]}}),I=e=>{var t;let{setSign:s,setOpen:l}=e,[I,k]=(0,a.useState)(""),[_,A]=(0,a.useState)(""),[P,E]=(0,a.useState)(!1),[L,O]=(0,a.useState)(null),[C,D]=(0,a.useState)(!1),[W,J]=(0,a.useState)({}),[H,M]=(0,a.useState)(null),G=(0,o.useRouter)(),[q,T]=(0,a.useState)(""),[U,F]=(0,a.useState)([{message:"",status:!1,display:!1}]);localStorage.getItem("institution");let[B,R]=(0,a.useState)(59),V=x.find(e=>"+91"===e.dial_code),[K,z]=(0,a.useState)(V),Y=new f.HF;new f.Dt;let Q=new f.sk;Q.addScope("email"),Q.addScope("public_profile");let Z=(0,o.useSearchParams)().get("test"),$=(0,o.usePathname)(),[X,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(""),[ei,ea]=(0,a.useState)(""),[el,en]=(0,a.useState)(""),[er,eo]=(0,a.useState)(!1),[ed,ec]=(0,a.useState)(""),eu=e=>(null==e?void 0:e.dial_code)?e.dial_code:"",em=async e=>{e.preventDefault();try{if(!_&&I&&K){let e;D(!0),J({phone:I}),e=Z&&"true"===Z?{phone:I,country_code:eu(K),test:!0}:{phone:I,country_code:eu(K)};let t=await (0,p.yQ)(e),s=await t.json();(null==s?void 0:s.message)||(null==s?void 0:s.userexists)===!0?(M(null==s?void 0:s.otp),E(!0),R(s.remaining_seconds||59),F([{display:!0,message:"OTP Sent Successfully",status:!0}])):F([{display:!0,message:"This mobile is not associated with any account.",status:!1}])}else I&&(0,h.isValidPhoneNumber)(I)&&!_||(e=>e?(0,h.isValidPhoneNumber)(e,K)?A(""):A("Enter a valid phone number!"):A("Required!"))(I)}catch(e){return console.log(e),e}finally{D(!1)}},eg=async(e,t)=>{D(!0);try{let y=await (0,p.Ab)(t);if(y.ok){let t=await y.json();if(null==(i=t[0])?void 0:i.token){let e=null==(n=t[0])?void 0:n.token,s=null==(r=t[0])?void 0:r.username,i=null==(o=t[0])?void 0:o.course,a=null==(c=t[0])?void 0:c.institution,p=null==(u=t[0])?void 0:u.university,f=null==(m=t[0])?void 0:m.role;$.includes("/signUp")?(localStorage.setItem("token",e),localStorage.setItem("course",i),localStorage.setItem("name",JSON.stringify(s)),(0,v.Lm)(a),localStorage.setItem("role",f),"superadmin"===f&&(localStorage.setItem("universityArray",JSON.stringify(p)),localStorage.setItem("institutionArray",JSON.stringify(null==(g=t[0])?void 0:g.institution)),window.location.href="/universities")):(d.A.set("token",e),d.A.set("course",i),d.A.set("name",JSON.stringify(s)),(0,v.Lm)(a),localStorage.setItem("role",f),"superadmin"===f&&(localStorage.setItem("universityArray",JSON.stringify(p)),localStorage.setItem("institutionArray",JSON.stringify(null==(h=t[0])?void 0:h.institution)),window.location.href="/universities")),$.includes("/learn")?(l(!1),window.location.reload()):(e=>{let t=e.role,s=(0,v.yr)(e.institution);"superadmin"===t?G.replace("/universities"):G.replace("/".concat(s,"/dashboard"))})(t[0])}else if(null==(a=t[0])?void 0:a.create_new){var i,a,n,r,o,c,u,m,g,h,f=new Date;if(f.setTime(f.getTime()+3e4),e){let t=(e,t)=>{var s,i;return(null==e||null==(i=e.providerData)||null==(s=i[0])?void 0:s[t])||(null==e?void 0:e[t])||""};d.A.set("create_new",encodeURIComponent(e),{expires:f}),d.A.set("user_data_name",t(L,"displayName"),{expires:f}),d.A.set("user_data_email",t(L,"email"),{expires:f}),d.A.set("user_data_photo",t(L,"photoURL"),{expires:f}),d.A.set("user_data_uid",L.uid,{expires:f})}$.includes("/learn")?s(!0):G.push("/signUp")}}}catch(e){return console.log(e),e}finally{D(!1)}},eh=async(e,t)=>{e.preventDefault(),D(!0);try{let e=(await (0,f.df)(y.k,t)).user;localStorage.setItem("sso_uid",e.uid),localStorage.setItem("sso_email",e.email||""),localStorage.setItem("sso_name",e.displayName||""),localStorage.setItem("sso_method",t instanceof f.HF?"google":t instanceof f.sk?"facebook":"github"),O(e),t instanceof f.HF?T("google"):t instanceof f.sk?T("facebook"):t instanceof f.Dt&&T("github")}catch(e){if("auth/account-exists-with-different-credential"===e.code){var s;let t=null==(s=e.customData)?void 0:s.email,i=e.credential,a=await (0,f.Wm)(y.k,t),l=null;a.includes("google.com")?l=new f.HF:a.includes("facebook.com")?l=new f.sk:a.includes("github.com")&&(l=new f.Dt);let n=await (0,f.df)(y.k,l);await (0,f.OS)(n.user,i),localStorage.setItem("sso_uid",n.user.uid),localStorage.setItem("sso_email",n.user.email||""),localStorage.setItem("sso_name",n.user.displayName||""),localStorage.setItem("sso_method",l.providerId.replace(".com","")),O(n.user),T(l.providerId.replace(".com",""))}}finally{D(!1)}};(0,a.useEffect)(()=>
1{if(L&&q){var e,t;let s=L.email||(null==L||null==(t=L.providerData)||null==(e=t[0])?void 0:e.email)||"".concat(L.uid,"@facebook.com"),i={uid:L.uid,email:s,login_method:q};eg(q,i)}},[L,q]),(0,a.useEffect)(()=>{k(""),A(""),F([{message:"",status:!1,display:!1}])},[K]),(0,a.useEffect)(()=>{let e=()=>{G.replace("/signIn")};return window.history.pushState(null,"",window.location.href),window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[]);let ep=async e=>{if(e.preventDefault(),ec(""),!et||!ei)return void ec("Email and password are required");try{D(!0);let e=await (0,p.s)({email:et,password:ei}),t=await e.json();if(null==t?void 0:t.token){let e=(0,v.yr)(t.institution),s=(null==t?void 0:t.institution)||"medsy",i=null==t?void 0:t.university,a=null==t?void 0:t.role;localStorage.setItem("token",t.token),localStorage.setItem("course",t.course),localStorage.setItem("name",JSON.stringify(t.username)),(0,v.Lm)(t.institution),localStorage.setItem("role",a),d.A.set("token",t.token),d.A.set("course",t.course),d.A.set("name",JSON.stringify(t.username)),"superadmin"===a&&(localStorage.setItem("universityArray",JSON.stringify(i)),localStorage.setItem("institutionArray",JSON.stringify(s)),window.location.href="/universities"),$.includes("/learn")||G.push("/".concat(e||"medsy","/dashboard"))}else ec((null==t?void 0:t.message)||"Invalid email or password")}catch(e){ec("Something went wrong. Please try again.")}finally{D(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"header-medsy-icon",children:(0,i.jsx)("div",{className:"medsy-icon",children:(0,i.jsx)(n.default,{alt:"",src:u.A})})}),(0,i.jsx)("div",{className:"sign-in-main-page",children:P?(0,i.jsx)(b,{sigup:!1,userOtp:H,number:I,countryCode:eu(K),setOpen:l,seconds:B,setSeconds:R}):(0,i.jsx)("div",{className:"sig-in-container ",children:(0,i.jsxs)("div",{className:"mobile-sign-in d-flex-col",children:[(0,i.jsxs)("div",{className:"mobile-medsy-icon",children:[(0,i.jsx)(n.default,{alt:"",src:m.A}),(0,i.jsxs)("div",{className:"mobile-medsy-text",children:[(0,i.jsxs)("div",{children:["Medical",(0,i.jsx)("span",{children:" Education"})]}),(0,i.jsxs)("div",{children:["Made",(0,i.jsx)("span",{children:" Easy"})]})]})]}),(0,i.jsx)("span",{className:"sign-in-text-header",children:"Let’s get started"}),(0,i.jsxs)("div",{className:"sign-in-text",children:[(0,i.jsx)("span",{children:"Enter your mobile number to Sign in to"}),(0,i.jsx)("span",{children:" your Medsy account"})]}),!X&&(0,i.jsxs)("form",{className:"form-control d-flex-col",children:[(0,i.jsxs)("div",{className:"input-sections",children:[(0,i.jsx)(N,{defaultCountryCode:null==K?void 0:K.dial_co
1de,placeholder:"Enter Mobile Number",onChangeInput:e=>{let t=e.target.value.replace(/\D/g,"");if(!K)return void k(t);let{minLength:s,maxLength:i}=K.validation;t.length>i||(k(t),F([{message:"",status:!1,display:!1}]),A(((e,t)=>{if(!t||!t.validation)return"";let{validFirstDigits:s,restrictedPrefixes:i,firstDigitError:a,minLength:l,maxLength:n}=t.validation;if(!e||0===e.length)return"Required!";if(e.length<l||e.length>n)return"Phone number must be ".concat(l," digits");if(null==s?void 0:s.length){let t=e.charAt(0);if(!s.includes(t))return a||"Invalid phone number format"}if(null==i?void 0:i.length){for(let t of i)if(e.startsWith(t))return"Phone number cannot start with restricted prefix"}return""})(t,K)))},onSelect:z,selectedValue:K,inputValue:I}),(0,i.jsx)("p",{className:"error-text",children:_})]}),U[0].display&&((null==(t=U[0])?void 0:t.status)?(0,i.jsx)("div",{className:"otp-success",children:U[0].message}):(0,i.jsx)("div",{className:"error-box",children:U[0].message})),(0,i.jsx)("div",{className:"sign-in-btn-container",onClick:e=>em(e),children:(0,i.jsx)("button",{className:"sign-in-btn cursor-ptr ".concat(I&&!_?"active":null),disabled:!I||!!_,children:(0,i.jsxs)("div",{className:"sign-in-btn-text d-flex",children:[(0,i.jsx)("span",{children:(0,i.jsx)(n.default,{alt:"",src:g.A})}),(0,i.jsx)("span",{children:"Get OTP via Whatsapp"})]})})})]}),X&&(0,i.jsxs)("div",{className:"form-control-email-login d-flex-col",children:[(0,i.jsxs)("div",{className:"input-sections",children:[(0,i.jsx)("p",{className:"label-text",children:"Email"}),(0,i.jsx)("input",{type:"email",style:{width:"100%"},value:et,className:"number-input",placeholder:"Enter email",onChange:e=>{let t=e.target.value;es(t),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?en(""):en("Please enter a valid email address")}}),(0,i.jsx)("p",{className:"error-text",children:el})]}),(0,i.jsxs)("div",{className:"input-sections",children:[(0,i.jsx)("p",{className:"label-text",children:"Password"}),(0,i.jsxs)("div",{className:"password-input-wrapper",children:[(0,i.jsx)("input",{type:er?"text":"password",value:ei,className:"number-input",placeholder:"Enter password",onChange:e=>{ea(e.target.value),ec("")}}),(0,i.jsx)("span",{className:"password-toggle",onClick:()=>eo(!er),children:er?(0,i.jsx)(S.A,{}):(0,i.jsx)(w.A,{})})]}),ed&&(0,i.jsx)("p",{className:"error-text",children:ed})]}),(0,i.jsx)("button",{onClick:ep,className:"sign-in-btn cursor-ptr email-login ".concat(et&&ei&&!el?"active":""),disabled:!et||!ei,children:"Login"})]}),(0,i.jsx)("div",{className:"email-login-toggle-wrapper",children:(0,i.jsx)("button",{className:"email-login-toggle-btn cursor-ptr",onClick:()=>ee(!X),children:X?"Login with Mobile":"Login with Email"})}),(0,i.jsxs)("div",{className:"sign-up-navigation-div ",children:[(0,i.jsxs)("div",{className:"new-to-medsy",children:["New User?"," ",(0,i.jsx)(r,{href:"/signUp",children:(0,i.jsx)("span",{className:"sign-up-btn-txt",children:"Sign up"})})]}),X&&(0,i.jsx)("div",{className:"new-to-medsy forgot-password",children:(0,i.jsx)(r,{href:"/forgot-password",children:"Forgot Password?"})})]}),(0,i.jsx)("div",{className:"sign-in-other-login",children:(0,i.jsx)("p",{children:"Try other login methods"})}),(0,i.jsx)("div",{className:"sign-in-sso-login",children:(0,i.jsx)("button",{className:"email-sign-in-btn cursor-ptr",onClick:e=>eh(e,Y),children:(0,i.jsx)(n.default,{src:c.A,alt:"email",height:25,width:24})})}),(0,i.jsx)("div",{className:"sign-in-rights-reserved",children:"\xa9 2026 Medsy.ai. All rights reserved."})]})})}),C&&(0,i.jsx)(j,{})]})}},44382:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});let i={src:"/_next/static/media/medsyLogin.eaf3a15c.svg",height:575,width:306,blurWidth:0,blurHeight:0}},50467:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});let i={src:"/_next/static/media/emailGoogleLogo.3ae2df20.svg",height:25,width:24,blurWidth:0,blurHeight:0}},69512:()=>{},69784:(e,t,s)=>{"use strict";s.d(t,{k:()=>l});var i=s(73520);let a=(0,s(55298).Wp)({apiKey:"AIzaSyA5d58SW192q0d6i7OzG-oPY75K1jDHx5A",authDomain:"medsyai.firebaseapp.com",projectId:"medsyai",storageBucket:"medsyai.firebasestorage.app",messagingSenderId:"597947567694",appId:"1:597947567694:web:25e51b332ca4b99276fd1f",measurementId:"G-MZYTK8P95G"}),l=(0,i.xI)(a)},79436:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});let i={src:"/_next/static/media/mobileMedsyIcon.1230743a.svg",height:112,width:142,blurWidth:0,blurHeight:0}}}]);

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.