(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0babe1"],{3905:function(s,e,t){"use strict";t.r(e);var r=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"container my-5"},[t("div",{staticClass:"d-flex flex-column align-items-center"},[t("h4",[s._v("Reset Password")]),t("form",{on:{submit:s.handleSubmit}},[t("div",{staticClass:"form-group"},[t("div",{staticClass:"my-2 text-center"},[s._v(" Reset the password for your account. ")]),t("input",{directives:[{name:"model",rawName:"v-model",value:s.password,expression:"password"}],staticClass:"form-control",attrs:{type:"password",placeholder:"new password"},domProps:{value:s.password},on:{input:function(e){e.target.composing||(s.password=e.target.value)}}})]),t("div",{staticClass:"form-group"},[t("input",{directives:[{name:"model",rawName:"v-model",value:s.passwordConfirm,expression:"passwordConfirm"}],staticClass:"form-control",attrs:{type:"password",placeholder:"confirm password"},domProps:{value:s.passwordConfirm},on:{input:function(e){e.target.composing||(s.passwordConfirm=e.target.value)}}})]),t("button",{staticClass:"btn"},[s._v(" "+s._s(s.processingForm?"Please wait...":"Reset Password")+" ")])])])])},o=[],a=(t("96cf"),t("1da1")),n=(t("4a4a"),t("97af")),i={data:function(){return{processingForm:!1,submittedForm:!1,password:"",passwordConfirm:""}},mounted:function(){this.$route.query.token||this.$router.push({name:"login"})},methods:{handleSubmit:function(s){var e=this;return Object(a["a"])(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(s.preventDefault(),e.verifyInputs()){t.next=3;break}return t.abrupt("return");case 3:if(!e.processingForm){t.next=5;break}return t.abrupt("return");case 5:return e.processingForm=!0,t.prev=6,t.next=9,n["a"].post("/reset-password",{token:e.$route.query.token,password:e.password});case 9:r=t.sent,e.$toasted.success(r.data.message||"Password reset success."),e.submittedForm=!0,window.location.href="/login",t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](6),console.log(t.t0.response.data),e.$toasted.error(t.t0.response&&t.t0.response.data&&t.t0.response.data.message||"Could not reset the password.");case 19:e.processingForm=!1;case 20:case"end":return t.stop()}}),t,null,[[6,15]])})))()},verifyInputs:function(){return this.password&&this.passwordConfirm?this.password.length<6?(this.$toasted.error("Password length must be at least 6 characters."),!1):this.password===this.passwordConfirm||(this.$toasted.error("Password and confirm password doesn't match."),!1):(this.$toasted.error("Please fill up the fields."),!1)}}},d=i,p=t("2877"),u=Object(p["a"])(d,r,o,!1,null,null,null);e["default"]=u.exports}}]); //# sourceMappingURL=chunk-2d0babe1.f0596b91.js.map