1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2059],{6578:(e,a,l)=>{l.d(a,{Ay:()=>u,YB:()=>d,ZB:()=>c,hF:()=>o,l6:()=>m});var t=l(4848),s=l(2491),i=l(5729),n=l(3816),r=l(5418);let o=function(e,a){var l,t,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=Object.assign({},a),c=null==e?void 0:null===(l=e.target)||void 0===l?void 0:l.value;return(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.type)=="checkbox"&&(c=null==e?void 0:null===(s=e.target)||void 0===s?void 0:s.checked),r?(o[n][r]=c,i(o)):n?(o[n]=c,i(o)):a(c),!1},c=o,d=e=>{let{label:a,value:l,onChange:i}=e;return(0,t.jsx)(s.A,{className:"mt-12 smallinput",fullWidth:!0,label:a,variant:"filled",value:l,onChange:e=>i(e)})},u=e=>{let{label:a,value:l,onChange:i}=e;return(0,t.jsx)(s.A,{className:"mt-12 milliinput",label:a,variant:"filled",value:l,onChange:e=>i(e)})};function m(e){let{options:a,value:l,onChange:s}=e;return(0,t.jsx)(i.A,{value:l,onChange:e=>s(e),children:a.map(e=>(0,t.jsx)(n.A,{value:e.value,control:(0,t.jsx)(r.A,{}),label:e.label}))})}},2059:(e,a,l)=>{l.r(a),l.d(a,{default:()=>x,setUserLocalData:()=>g});var t=l(4848),s=l(2491),i=l(5026),n=l(8465),r=l.n(n),o=l(6715),c=l(6540),d=l(4505),u=l(8874),m=l(6578);let h=l(6425),g=e=>{localStorage.userid=e.userid||"",localStorage.type=e.type||"",localStorage.name=e.name||"",localStorage.firstname=e.name.split(" ")[0],localStorage.email=e.email||"",localStorage.phone=e.phone||"",localStorage.org=e.org?JSON.stringify(e.org):"{}",localStorage.lastPage=e.lastPage||"",localStorage.userImage=e.userImage||"",e.name&&e.name.split(" ").length>1?localStorage.lastname=e.name.split(" ")[1]:localStorage.lastname=""},x=()=>{let[e,a]=(0,c.useState)(""),[l,n]=(0,c.useState)(!1),[x,v]=(0,c.useState)(""),[j,f]=(0,c.useState)(""),[p,b]=(0,c.useState)(""),[N,C]=(0,c.useState)(""),[y,k]=(0,c.useState)(""),[S,A]=(0,c.useState)(""),[w,P]=(0,c.useState)(""),[F,W]=(0,c.useState)(!1),[E,T]=(0,c.useState)(!1),[q,B]=(0,c.useState)(!1),L=(0,o.useRouter)();(0,c.useEffect)(()=>{void 0!==L.query.login?a("login"):void 0!==L.query.register?a("register"):void 0!==L.query.otp?a("otp"):void 0!==L.query.demo?(a("register"),n(!0)):L.query&&void 0!==L.query.direct?((0,d.Ay)("Checking Email Link ..."),G(decodeURIComponent(L.query.email),decodeURIComponent(L.query.direct))):a("")},[L]),(0,c.useEffect)(()=>{l&&"register"!=e&&n(!1)},[e]);let I=a=>{"Enter"==a.key&&("login"==e?U(a):"otp"==e?O(a):D(a))},U=e=>(e.preventDefault(),B(!0),h.post("/api/User",{action:"signin",email:j,password:N}).then(e=>{!1==e.data?r().fire({title:"Error!",text:"Please check Email and Password again or go to Forget Password to reset it.",icon:"error",confirmButtonText:"Close",showCancelButton:!1}):(a("success"),_(e.data))}).catch(e=>{console.log(e)}).finally(()=>{B(!1)}),!1),_=e=>{g(e),L.query&&L.query.donor?L.push("/page/donate?id="+L.query.donor):L.push("/user/home")},D=e=>{if(e.preventDefault(),!l&&N!=y){(0,d.Ay)("Passwords do not match ! Please recheck.");return}return B(!0),h.post("/api/User",{action:"signup",name:x,email:j,phone:S,password:l?"":N,companyName:w}).then(e=>{!1==e.data||e.data.error?r().fire({title:"Error!",text:e.data.error||"Please retry !",icon:"error",confirmButtonText:"Close",showCancelButton:!1}):(a("success"),l?(g(null==e?void 0:e.data),L.push("/page/donate?id=123456789abcde0123456789")):_(e.data))}).finally(()=>{B(!1)}),!1},G=(e,l)=>(B(!0),h.post("/api/User",{action:"secret",email:e||j,secret:l||p}).then(e=>{d.Ay.dismiss(),!1==e.data?r().fire({title:"Error!",text:"Please check Login Code.",icon:"error",confirmButtonText:"Close",showCancelButton:!1}):(a("success"),_(e.data))}).catch(e=>{console.log(e)}).finally(()=>{B(!1)}),!1),O=e=>{if(!(0,u.DT)(j)){d.Ay.error("Please enter a correct email.");return}(0,u.ki)({type:"secret",to:j}),d.Ay.success("Quick Link sent ! Please check."),W(!0),a("otp")},R=()=>{(0,d.Ay)("test")},H=()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"titlefont",children:l?"Take a Test Drive":"Register"}),(0,t.jsx)("div",{className:"mt-8"}),(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:()=>a("login"),children:"Already have an account? Sign in"}),(0,t.jsxs)("form",{id:"signupForm",onKeyPress:I,onSubmit:D,children:[(0,t.jsx)(s.A,{className:"mt-24",label:"First & Last Name ",variant:"filled",fullWidth:!0,value:x,onChange:e=>v(e.target.value)}),(0,t.jsx)(s.A,{className:"mt-12",label:"Email",variant:"filled",fullWidth:!0,value:j,onChange:e=>f(e.target.value)}),l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.A,{className:"mt-12",label:"Phone",variant:"filled",fullWidth:!0,value:S,onChange:e=>{A((0,u.n4)(e.target.value))}}),(0,t.jsx)(s.A,{className:"mt-12",label:"Company Name",variant:"filled",fullWidth:!0,value:w,onChange:e=>{P(e.target.value)}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.A,{className:"mt-12",label:"Phone (Optional)",variant:"filled",fullWidth:!0,value:S,onChange:e=>{A((0,u.n4)(e.target.value))}}),(0,t.jsx)(s.A,{className:"mt-12",label:"Password",type:"password",variant:"filled",value:N,onChange:e=>C(e.target.value),fullWidth:!0}),(0,t.jsx)(s.A,{className:"mt-12",label:"Confirm Password",type:"password",variant:"filled",value:y,onChange:e=>k(e.target.value),fullWidth:!0})]}),(0,t.jsx)(i.A,{variant:"outlined",className:"mt-24",fullWidth:!0,disabled:q,onClick:D,children:l?"Signup":"Register"})," ",(0,t.jsx)("br",{}),(0,t.jsx)(i.A,{variant:"outlined",className:"mt-12",fullWidth:!0,color:"secondary",onClick:R,children:"Sign up with Google"})," ",(0,t.jsx)("br",{})]}),(0,t.jsx)("div",{className:"float-right milli mt-12",children:(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:e=>{a("otp")},children:"Can't Sign In? Login Via OTP"})}),(0,t.jsx)("br",{})]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.l$,{}),(0,t.jsx)("link",{rel:"stylesheet",href:"/style.css"}),(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n body{\n background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1170&q=80);\n background-size: cover;\n background-attachment: fixed;\n background-position: center;\n background-repeat:no-repeat;\n }\n "}}),(0,t.jsx)("div",{className:"loginbox flexcontainer",children:(0,t.jsx)("div",{className:"logincontent",children:"login"==e?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"titlefont",children:"Sign In"}),(0,t.jsx)("div",{className:"mt-8"}),(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:()=>a("register"),children:"New user? Create an account"}),(0,t.jsxs)("form",{id:"signInForm",onKeyPress:I,onSubmit:U,children:[(0,t.jsx)(s.A,{className:"mt-24",label:"Email",n
1ame:"signup_email",variant:"filled",fullWidth:!0,value:j,onChange:e=>f(e.target.value)}),(0,t.jsx)(s.A,{className:"mt-12",label:"Password",name:"signup_password",type:"password",variant:"filled",fullWidth:!0,value:N,onChange:e=>(0,m.ZB)(e,C)}),(0,t.jsx)(i.A,{variant:"outlined",type:"submit",className:"mt-24",fullWidth:!0,disabled:q,children:"Login"})," ",(0,t.jsx)("br",{}),(0,t.jsx)(i.A,{variant:"outlined",className:"mt-12",fullWidth:!0,color:"secondary",onClick:R,children:"Sign in with Google"})," ",(0,t.jsx)("br",{})]}),(0,t.jsx)("div",{className:"float-right milli mt-12",children:(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:e=>{a("otp")},children:"Can't Sign In? Login Via OTP"})})," ",(0,t.jsx)("br",{})]})," "]}):"register"==e?(0,t.jsxs)(t.Fragment,{children:[" ",H()," "]}):"otp"==e?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"titlefont",children:"Get OTP"}),(0,t.jsx)("div",{className:"mt-8"}),(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:()=>a("register"),children:"New user? Create an account"}),(0,t.jsxs)("form",{id:"otpForm",onKeyPress:I,onSubmit:O,children:[(0,t.jsx)(s.A,{className:"mt-24",label:"Email",variant:"filled",fullWidth:!0,value:j,onChange:e=>f(e.target.value)}),(0,t.jsx)(s.A,{id:"outlined-disabled",className:"mt-12",label:"Code",variant:"filled",disabled:!F,value:p,onChange:e=>b(e.target.value),fullWidth:!0}),F?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)(i.A,{variant:"outlined",className:"mt-24",fullWidth:!0,disabled:q,onClick:G,children:"Use Code"})," ",(0,t.jsx)("br",{})," "]}):(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)(i.A,{variant:"outlined",className:"mt-24",fullWidth:!0,onClick:O,children:"Get OTP"})," ",(0,t.jsx)("br",{})," "]})]}),F?E?(0,t.jsx)(t.Fragment,{}):(0,t.jsx)("div",{className:"float-right milli mt-12",children:(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:()=>{T(!0),O()},children:"Resend the code"})}):(0,t.jsx)("div",{className:"float-right milli mt-12",children:(0,t.jsx)("a",{className:"a-tag-plain clickable",onClick:e=>{a("otp"),W(!0)},children:"Have a code? Enter Code"})}),(0,t.jsx)("br",{})]})," "]}):"success"==e?(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("h3",{children:"Logged in"})," ",(0,t.jsx)("p",{children:"Page Loading..."})," "]}):(0,t.jsxs)(t.Fragment,{children:[" ",H()," "]})})}),(0,t.jsxs)("footer",{class:"loginfooter",children:[(0,t.jsx)("span",{children:(0,t.jsx)("a",{href:"/",className:"whiteclick",children:"\xa9 The Venti Group"})}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:"/page/terms",className:"whiteclick",children:"Terms"})}),(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:"/page/privacy",className:"whiteclick",children:"Privacy"})}),(0,t.jsx)("li",{children:(0,t.jsx)("a",{href:"/page/contact",className:"whiteclick",children:"Contact Us"})})]})]})]})}}}]);
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.