1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7616,9311],{47805:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup",function(){return r(67034)}])},40287:function(n,e){"use strict";e.Z={src:"/_next/static/media/logo.d4ee6930.svg",height:1e3,width:4e3,blurWidth:0,blurHeight:0}},79311:function(n,e,r){"use strict";r.r(e),r.d(e,{HeroSection:function(){return HeroSection}});var t=r(85893);r(67294);var i=r(53130),o=r.n(i),s=r(40287),a=r(25675),c=r.n(a);let HeroSection=()=>(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("div",{className:"".concat(o().hero," col-12 align-items-center d-flex flex-column justify-content-center"),children:[(0,t.jsx)(c(),{className:o().logo,src:s.Z,alt:"TechShots Logo",height:100,width:400}),(0,t.jsx)("h1",{className:o().sub_heading,children:"Adding Intelligence to Enterprise IT Buying"}),(0,t.jsx)("p",{className:o().info,children:"TechShots, a new-age information platform by Messy Desk Media, aims to add intelligence to buying and selling of Enterprise Information Technology products and services like Cloud computing, Cybersecurity, Artificial Intelligence, Big Data, Automation, Machine Learning, and more."})]})})},3485:function(n,e,r){"use strict";var t=r(85893);r(67294),e.Z=n=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-facebook",viewBox:"0 0 16 16",...n,children:(0,t.jsx)("path",{d:"M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951"})})},71480:function(n,e,r){"use strict";var t=r(85893);r(67294),e.Z=n=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-google me-1",viewBox:"0 0 16 16",...n,children:(0,t.jsx)("path",{d:"M15.545 6.558a9.4 9.4 0 0 1 .139 1.626c0 2.434-.87 4.492-2.384 5.885h.002C11.978 15.292 10.158 16 8 16A8 8 0 1 1 8 0a7.7 7.7 0 0 1 5.352 2.082l-2.284 2.284A4.35 4.35 0 0 0 8 3.166c-2.087 0-3.86 1.408-4.492 3.304a4.8 4.8 0 0 0 0 3.063h.003c.635 1.893 2.405 3.301 4.492 3.301 1.078 0 2.004-.276 2.722-.764h-.003a3.7 3.7 0 0 0 1.599-2.431H8v-3.08z"})})},67034:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return signup}});var t=r(85893),i=r(53130),o=r.n(i),s=r(67294),a=r(81886);let c=a.ZP.object({name:a.ZP.string().min(1,{message:"Name is required"}),email:a.ZP.string().min(1,{message:"Email is required"}).email({message:"Must be a valid email"}),password:a.ZP.string().min(6,{message:"Password must be atleast 6 characters"}),confirmPassword:a.ZP.string().min(1,{message:"Confirm Password is required"})}).refine(n=>n.password===n.confirmPassword,{path:["confirmPassword"],message:"Password don't match"});var u=r(87536),l=r(56312),d=r(19451),f=r(62286),m=r(11163),g=r.n(m);let RegisterForm=()=>{var n,e,r,i;let[a,m]=(0,s.useState)(void 0),{register:h,handleSubmit:p,formState:{errors:_},reset:j}=(0,u.cI)({resolver:(0,l.F)(c)});return(0,t.jsxs)(t.Fragment,{children:[_&&(0,t.jsx)("div",{className:"row mb-2",children:(0,t.jsx)("div",{className:"col-12",children:(0,t.jsxs)("div",{className:"invalid-feedback d-block",children:[(0,t.jsx)("small",{children:null==_?void 0:null===(n=_.email)||void 0===n?void 0:n.message}),(0,t.jsx)("small",{children:null==_?void 0:null===(e=_.password)||void 0===e?void 0:e.message}),(0,t.jsx)("small",{children:null==_?void 0:null===(r=_.confirmPassword)||void 0===r?void 0:r.message})]})})}),a&&(0,t.jsx)("div",{className:"row mb-2",children:(0,t.jsx)("div",{className:"col-12",children:(0,t.jsx)("div",{className:"invalid-feedback d-block",children:(0,t.jsx)("small",{children:a})})})}),(0,t.jsxs)("form",{className:"mt-2",style:{width:"100%",maxWidth:"280px"},onSubmit:p(n=>{let e=(0,d.v0)();(0,d.Xb)(e,n.email,n.password).then(async e=>{let r=e.user;(0,d.ck)(r,{displayName:n.name}).then(async()=>{let e=await r.getIdToken();await fetch("/api/user/create/".concat(e,"?name=").concat(n.name)),(0,f.setCookie)(null,"token",e,{maxAge:2592e3,path:"/"})}).catch(n=>{console.log(n)}),await g().push("/")}
1).catch(n=>{if(n instanceof Error){var e;m(null!==(e=n.message)&&void 0!==e?e:"An unknown error occurred")}else m("An unknown error occurred")}),j()}),children:[(0,t.jsxs)("div",{className:o().group,style:{marginBottom:"0.8rem"},children:[(0,t.jsx)("input",{type:"text",required:!0,...h("name")}),(0,t.jsx)("span",{className:o().highlight}),(0,t.jsx)("span",{className:o().bar}),(0,t.jsx)("label",{children:"Name"})]}),(0,t.jsxs)("div",{className:o().group,style:{marginBottom:"0.8rem"},children:[(0,t.jsx)("input",{type:"email",required:!0,...h("email")}),(0,t.jsx)("span",{className:o().highlight}),(0,t.jsx)("span",{className:o().bar}),(0,t.jsx)("label",{children:"Email"})]}),(0,t.jsxs)("div",{className:o().group,style:{marginBottom:"0.8rem"},children:[(0,t.jsx)("input",{type:"password",...h("password"),required:!0}),(0,t.jsx)("span",{className:o().highlight}),(0,t.jsx)("span",{className:o().bar}),(0,t.jsx)("label",{children:"Password"})]}),(0,t.jsxs)("div",{className:o().group,style:{marginBottom:"1rem"},children:[(0,t.jsx)("input",{type:"password",...h("confirmPassword"),required:!0}),(0,t.jsx)("span",{className:o().highlight}),(0,t.jsx)("span",{className:o().bar}),(0,t.jsx)("label",{children:"Confirm Password"})]}),(0,t.jsx)("div",{className:o().group,children:(0,t.jsx)("button",{type:"submit",className:[o().loginBtn,null!==(i=o().btn)&&void 0!==i?i:""].filter(Boolean).join(" "),children:"Register"})})]})]})};var h=r(79311),p=r(41664),_=r.n(p),j=r(71480),x=r(3485);let SocialAuth=n=>{let{mode:e}=n,[r,i]=(0,s.useState)(null),a=(0,m.useRouter)(),c=(0,d.v0)(),handleSocialAuth=async(n,e)=>{i(e);try{var r,t,o;let e=await (0,d.rh)(c,n),i=await (0,d.wU)(e.user),s=null!==(o=null!==(t=e.user.displayName)&&void 0!==t?t:null===(r=e.user.email)||void 0===r?void 0:r.split("@")[0])&&void 0!==o?o:"User";await fetch("/api/user/create/".concat(i,"?name=").concat(encodeURIComponent(s))),(0,f.setCookie)(null,"token",i,{maxAge:2592e3,path:"/"}),await a.push("/")}catch(n){console.error("".concat(e," Sign-In Error:"),n),"auth/popup-closed-by-user"===n.code?alert("Sign-in was cancelled. Please try again."):"auth/account-exists-with-different-credential"===n.code?alert("An account already exists with this email using a different sign-in method."):alert("Failed to sign in with ".concat(e,". Please try again."))}finally{i(null)}},handleGoogleAuth=async()=>{let n=new d.hJ;n.addScope("email"),n.addScope("profile"),await handleSocialAuth(n,"google")},handleFacebookAuth=async()=>{let n=new d._O;n.addScope("email"),n.addScope("public_profile"),await handleSocialAuth(n,"facebook")};return(0,t.jsx)("div",{className:o().socialAuthContainer,style:{margin:"0.5rem 0"},children:(0,t.jsxs)("div",{style:{display:"flex",gap:"0.5rem",justifyContent:"center"},children:[(0,t.jsx)("button",{type:"button",onClick:()=>void handleGoogleAuth(),className:[o().socialIconBtn,o().googleBtn].filter(Boolean).join(" "),"aria-label":"".concat("login"===e?"Login":"Sign up"," with Google"),disabled:null!==r,style:{padding:"0.5rem",fontSize:"0.9rem"},children:"google"===r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:o().socialSpinner}),(0,t.jsx)("span",{className:"sr-only",children:"Signing in with Google..."})]}):(0,t.jsx)(j.Z,{className:o().socialIcon})}),(0,t.jsx)("button",{type:"button",onClick:()=>void handleFacebookAuth(),className:[o().socialIconBtn,o().facebookBtn].filter(Boolean).join(" "),"aria-label":"".concat("login"===e?"Login":"Sign up"," with Facebook"),disabled:null!==r,style:{padding:"0.5rem",fontSize:"0.9rem"},children:"facebook"===r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:o().socialSpinner}),(0,t.jsx)("span",{className:"sr-only",children:"Signing in with Facebook..."})]}):(0,t.jsx)(x.Z,{className:o().socialIcon})})]})})};var signup=()=>{var n,e;return(0,t.jsx)("div",{className:o().pageWrapper,children:(0,t.jsxs)("div",{className:o().glassMorphismContainer,children:[(0,t.jsxs)("div",{className:"".concat(null!==(n=o().heroSectionContainer)&&void 0!==n?n:""," d-none d-lg-flex"),children:[(0,t.jsx)(h.HeroSection,{})," "]}),(0,t.jsxs)("div",{className:o().loginFormSection,style:{padding:"2rem 2rem"},children:[(0,t.jsx)("h1",{className:"".concat(null!==(e=o().sub_heading)&&void 0!==e?e:""," mt-2 mb-3"),children:"Hello, Register Here!"}),(0,t.jsx)(RegisterForm,{}),(0,t.jsx)("div",{className:o().or,style:{margin:"0.5rem 0"},children:"OR"}),(0,t.jsx)(SocialAuth,{mode:"signup"}),(0,t.jsxs)("p",{className:o().signupPrompt,style:{marginTop:"1rem"},children:["Already have an account?"," ",(0,t.jsx)(_(),{href:"/login",className:o().signupLink,children:"Login!"})]})]})]})})}},53130:function(n){n.exports={pageWrapper:"login_pageWrapper__d8QXZ",float:"login_float__24ji6",glassMorphismContainer:"login_glassMorphismContainer__y5oYg",slideIn:"login_slideIn__pdMLQ",loginFormSection:"login_loginFormSection__M4KpR",heroSectionContainer:"login_heroSectionContainer__RibQj",pulse:"login_pulse__Od
17T0",sub_heading:"login_sub_heading__6n6QD",fadeInUp:"login_fadeInUp__bH6Am",info:"login_info__wQDFF",group:"login_group__6MV4O",rememberMe:"login_rememberMe__jTAVl",loginBtn:"login_loginBtn__eHUnt",forgotPasswordLink:"login_forgotPasswordLink__7Is_v",or:"login_or__N1_k8",socialAuthContainer:"login_socialAuthContainer__HDUL0",socialIconBtn:"login_socialIconBtn__QNOmj",googleBtn:"login_googleBtn__cBqdL",facebookBtn:"login_facebookBtn__zdujy",linkedinBtn:"login_linkedinBtn__Kq09N",signupPrompt:"login_signupPrompt__e_enL",signupLink:"login_signupLink__WvVKf",loading:"login_loading__NYe6_",spin:"login_spin__5eJ3t",inputError:"login_inputError__NrqA1",errorMessage:"login_errorMessage__jeRLt",fadeIn:"login_fadeIn__CeVrm",statusMessage:"login_statusMessage__9WOFB",statusSuccess:"login_statusSuccess__9Qnpi",statusError:"login_statusError__w1wfV",socialSpinner:"login_socialSpinner__OD0hO","success-checkmark":"login_success-checkmark__ob68_",checkmark:"login_checkmark__sWUWn"}},81886:function(n,e,r){"use strict";r.d(e,{ZP:function(){return u}});var t={};r.r(t),r.d(t,{BRAND:function(){return a.cg},DIRTY:function(){return o.RC},EMPTY_PATH:function(){return o.h2},INVALID:function(){return o.UI},NEVER:function(){return a.C4},OK:function(){return o.OK},ParseStatus:function(){return o.Q9},Schema:function(){return a.V_},ZodAny:function(){return a.O8},ZodArray:function(){return a.p5},ZodBigInt:function(){return a.EG},ZodBoolean:function(){return a.pZ},ZodBranded:function(){return a.Gd},ZodCatch:function(){return a.ON},ZodDate:function(){return a.$s},ZodDefault:function(){return a.uE},ZodDiscriminatedUnion:function(){return a.Iy},ZodEffects:function(){return a.Xc},ZodEnum:function(){return a.K7},ZodError:function(){return c.jm},ZodFirstPartyTypeKind:function(){return a.pA},ZodFunction:function(){return a.b_},ZodIntersection:function(){return a.f9},ZodIssueCode:function(){return c.NL},ZodLazy:function(){return a.dT},ZodLiteral:function(){return a.SG},ZodMap:function(){return a.Ym},ZodNaN:function(){return a.Hu},ZodNativeEnum:function(){return a.Zl},ZodNever:function(){return a.$n},ZodNull:function(){return a.pV},ZodNullable:function(){return a.ng},ZodNumber:function(){return a.IV},ZodObject:function(){return a.CQ},ZodOptional:function(){return a.ak},ZodParsedType:function(){return s.$k},ZodPipeline:function(){return a.om},ZodPromise:function(){return a.Wx},ZodReadonly:function(){return a.ur},ZodRecord:function(){return a.KX},ZodSchema:function(){return a.I6},ZodSet:function(){return a.qA},ZodString:function(){return a.$T},ZodSymbol:function(){return a.tX},ZodTransformer:function(){return a.z2},ZodTuple:function(){return a._P},ZodType:function(){return a.DI},ZodUndefined:function(){return a.DY},ZodUnion:function(){return a.jp},ZodUnknown:function(){return a.Dy},ZodVoid:function(){return a.XE},addIssueToContext:function(){return o.KD},any:function(){return a.Yj},array:function(){return a.IX},bigint:function(){return a.Kv},boolean:function(){return a.O7},coerce:function(){return a.oQ},custom:function(){return a.PG},date:function(){return a.hT},datetimeRegex:function(){return a.wU},defaultErrorMap:function(){return i.jY},discriminatedUnion:function(){return a.VK},effect:function(){return a.cE},enum:function(){return a.Km},function:function(){return a.ZI},getErrorMap:function(){return i.Pr},getParsedType:function(){return s.FQ},instanceof:function(){return a.Pp},intersection:function(){return a.jV},isAborted:function(){return o.Hc},isAsync:function(){return o.S9},isDirty:function(){return o.eT},isValid:function(){return o.JY},late:function(){return a.wt},lazy:function(){return a.Vo},literal:function(){return a.i0},makeIssue:function(){return o.Xm},map:function(){return a.UI},nan:function(){return a.qn},nativeEnum:function(){return a.jb},never:function(){return a.Fi},null:function(){return a.lB},nullable:function(){return a.AG},number:function(){return a.Rx},object:function(){return a.Ry},objectUtil:function(){return s.Mg},oboolean:function(){return a.Ts},onumber:function(){return a.vs},optional:function(){return a.jt},ostring:function(){return a.Dk},pipeline:function(){return a.EU},preprocess:function(){return a.dj},promise:function(){return a.MC},quotelessJson:function(){return c.Zh},record:function(){return a.IM},set:function(){return a.t8},setErrorMap:function(){return i.DJ},strictObject:function(){return a.cf},string:function(){return a.Z_},symbol:function(){return a.NA},transformer:function(){return a.l4},tuple:function(){return a.bc},undefined:function(){return a.S1},union:function(){return a.G0},unknown:function(){return a._4},util:function(){return s.D5},void:function(){return a.Hc}});
1var i=r(47985),o=r(49971),s=r(56672),a=r(62734),c=r(79711),u=t}},function(n){n.O(0,[1664,5675,2734,6312,9774,2888,179],function(){return n(n.s=47805)}),_N_E=n.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.