1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[107],{G5IV:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup-customer",function(){return t("Q6Qg")}])},Q6Qg:function(e,s,t){"use strict";t.r(s);var a=t("wx14"),i=t("1OyB"),n=t("vuIU"),r=t("md7G"),c=t("foSv"),m=t("Ji7U"),l=t("rePB"),o=t("q1tI"),u=t.n(o),d=t("YFqc"),b=t.n(d),p=t("XOkI"),N=t("Pks0"),f=t("LcVh"),v=t("nOHt"),g=(t("Ryl/"),t("jklj")),w=(t("WFJI"),t("KYPV")),h=t("lCZi"),_=t("IP2g"),y=t("wHSu"),k=t("fMXQ"),S=u.a.createElement;function P(e,s,t){return s=Object(c.a)(s),Object(r.a)(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(s,t||[],Object(c.a)(e).constructor):s.apply(e,t))}var j=function(e){function s(){var e;return Object(i.a)(this,s),e=P(this,s),Object(l.a)(e,"showHidePassword",(function(s){e.setState({pswdHidden:!e.state.pswdHidden})})),e.state={first_name:"",last_name:"",password1:"",password:"",email:"",submit_success:!1,submit_failed:!1,submitting:!1,msg:"",accept_terms:!1,pswdHidden:!0},e}return Object(m.a)(s,e),Object(n.a)(s,[{key:"render",value:function(){var e=this;S("button",{type:"submit",className:"btn btn-primary btn-block"},"Signup");this.state.submit_failed&&S("button",{type:"submit",className:"btn btn-danger btn-block"},"Failed"),this.state.submit_success&&(S("button",{type:"submit",className:"btn btn-success btn-block"},"Success"),s=""),this.state.submitting&&S("button",{type:"submit",className:"btn btn-primary btn-block",disabled:!0},"Submitting ...");var s=S("div",null,S(w.d,{initialValues:{firstName:"",lastName:"",email:"",password:"",confirmPassword:""},validationSchema:h.object().shape({firstName:h.string().required("First Name is required"),lastName:h.string().required("Last Name is required"),email:h.string().email("Email is invalid").required("Email is required"),password:h.string().min(6,"Password must be at least 6 characters").required("Password is required")}),onSubmit:function(s,t){var a=t.setErrors,i=t.setSubmitting,n=t.setStatus;i(!0),e.refs.error_block.innerHTML="";var r={first_name:s.firstName,last_name:s.lastName,email:s.email,username:s.email,password:s.password};Object(f.d)(N.SING_UP,r).then((function(s){i(!1),n({submit_success:!0,submitting:!0}),e.setState({submit_success:!0}),e.refs.success_block.innerHTML="<p>Please check your email to activate your account.</p>"})).catch((function(s){s.response.data.error.username||s.response.data.error.email?(i(!1),n({submit_success:!1,submitting:!1}),a({email:"Sorry this email is already registered"})):(i(!1),n({submit_success:!1,submitting:!0}),e.refs.error_block.innerHTML="<p>Something went wrong, please try agian</p>")}))},render:function(s){var t=s.errors,a=s.status,i=void 0===a?{submit_success:null}:a,n=s.touched,r=(s.values,s.isSubmitting);return S(w.c,{className:"mb-3"},S("div",{className:"row"},S("div",{className:"col"},S("div",{className:"mb-3"},S("label",{className:"form-label",htmlFor:"firstName"},"First Name"),S(w.b,{name:"firstName",type:"text",className:"form-control"+(t.firstName&&n.firstName?" is-invalid":"")}),S(w.a,{name:"firstName",component:"div",className:"invalid-feedback"}))),S("div",{className:"col"},S("div",{className:"mb-3"},S("label",{className:"form-label",htmlFor:"lastName"},"Last Name"),S(w.b,{name:"lastName",type:"text",className:"form-control"+(t.lastName&&n.lastName?" is-invalid":"")}),S(w.a,{name:"lastName",component:"div",className:"invalid-feedback"})))),S("div",{className:"mb-3"},S("label",{className:"form-label",htmlFor:"email"},"Email"),S(w.b,{name:"email",type:"text",className:"form-control"+(t.email&&n.email?" is-invalid":"")}),S(w.a,{name:"email",component:"div",className:"invalid-feedback"})),S("div",{className:"mb-3"},S("label",{className:"form-label",htmlFor:"password"},"Password"),S("span",{className:"pull-right text-picxy pointer",onClick:e.showHidePassword},S(_.a,{icon:e.state.pswdHidden?y.j:y.i,className:""})," ",e.state.pswdHidden?"Show":"Hide"),S(w.b,{name:"password",type:e.state.pswdHidden?"password":"text",className:"form-control"+(t.password&&n.password?" is-invalid":"")}),S(w.a,{name:"password",component:"div",className:"invalid-feedback"})),S("div",{className:"mb-3"},S("button",{type:"submit",className:i.submitting?i.submit_success?"btn btn-block btn-success":"btn btn-block btn-danger":"btn btn-primary w-100",disabled:r},r?"Loading...":i.submit_success?"Signup Success":"Signup")))}}),S("p",{className:"mb-1"},"Already have an account ? ",S(b.a,{href:"/login-customer"},S("a",null,S("u",null,"Login")))),S("div",null,"By signing up, you agree to ",S(b.a,{href:"/terms_and_conditions/"},S("a",{target:"_blank"},S("u",null,"terms and conditions")))));this.state.submit_success&&(s="");var t=S("div",{className:"container"},S("div",{className:"row justify-content-center mb-2"},S("div",{className:"col-md-5 login"},S("div",{className:"card card-hidden-xs mt-4 mt-sm-0 mb-4"},S("div",{className:"card-body p-0 p-sm-4"},S("h6",{className:"text-center mb-1"},"Sign up as customer"),S("p",{className:"f-18 text-center mb-4"}
1,"Welcome to Picxy, let's get you started"),S("div",{className:"mb-3"},S(g.a,{name:"Signup With Google"})),S("h6",{className:"text-center"},S("p",{style:{color:"red"},ref:"error_block"},this.state.msg),S("p",{style:{color:"green"},ref:"success_block"},this.state.msg)),s)))));return S(p.a,Object(a.a)({title:"Picxy Customer Signup"},this.props),S(k.b,Object(a.a)({name:"Picxy Customer Signup",description:"Welcome to Picxy, let's get you started"},this.props)),t)}}])}(u.a.Component);s.default=Object(v.withRouter)(j)}},[["G5IV",0,1,9,6,2,3,4,8,5,7,10,24]]]); 2//# sourceMappingURL=signup-customer-71f02fda880a8aeae4a2.js.map
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.