text: (window.webpackJsonp=window.webpackJsonp||[]).push([[12],{277:function(e,t,r){"use strict";r.r(t);var n=r(30),i=r(4);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c={components:{"vue-recaptcha":n.a},data:function(){return{form:{email:"",password:"",robot:!1},text:"",loading:!1,snackbar:!1,showPassword:!1,valid:!0,rules:{required:function(e){return!!e||"This Field is Required"},min:function(e){return e.length>=3||"Minimum 5 Chracters Required"},minpass:function(e){return e.length>=8||"Minimum 8 Chracters Required"},validEmail:function(e){return/.+@.+\..+/.test(e)||"Email must be valid"}}}},methods:o(o({},Object(i.b)({signIn:"auth/signIn"})),{},{submit:function(){var e=this;this.form.robot&&(axios.interceptors.request.use((function(t){return e.loading=!0,t}),(function(t){return e.loading=!1,Promise.reject(t)})),axios.interceptors.response.use((function(t){return e.loading=!1,t}),(function(t){return e.loading=!1,Promise.reject(t)})),this.signIn(this.form).then((function(t){"Administrator"==e.user.role?e.$router.replace({name:"dashboard"}):e.$router.replace({name:"account"})})).catch((function(t){e.text=t.response.data.errors.email[0],e.snackbar=!0})))},onVerify:function(e){e&&(this.form.robot=!0)}}),computed:o({},Object(i.c)({authenticated:"auth/authenticated",user:"auth/user"}))},u=r(0),l=Object(u.a)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-app",[r("v-container",[r("v-row",{attrs:{align:"center",justify:"center"}},[r("v-col",{attrs:{cols:"12",sm:"8",md:"5"}},[r("v-card",{staticClass:"elevation-12"},[r("v-progress-linear",{attrs:{active:e.loading,indeterminate:e.loading,absolute:"",top:"",color:"primary"}}),e._v(" "),r("v-toolbar",{attrs:{color:"",flat:""}},[r("v-toolbar-title",[e._v("Login form")])],1),e._v(" "),r("v-form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.submit(t)}},model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[r("v-card-text",[r("v-text-field",{attrs:{label:"Login",rules:[e.rules.required,e.rules.validEmail],name:"login","prepend-icon":"mdi-account-circle",type:"text",required:""},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}}),e._v(" "),r("v-text-field",{attrs:{id:"password",label:"Password",rules:[e.rules.required,e.rules.minpass],name:"password","prepend-icon":"mdi-lock",type:e.showPassword?"text":"password","append-icon":e.showPassword?"mdi-eye":"mdi-eye-off",required:""},on:{"click:append":function(t){e.showPassword=!e.showPassword}},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}}),e._v(" "),r("vue-recaptcha",{ref:"recaptcha",attrs:{sitekey:"6Lc0fNsZAAAAAJoq33n9PPWeN7nWgNeJDBVaNNZ1"},on:{verify:e.onVerify}})],1),e._v(" "),r("v-card-actions",[r("v-spacer"),e._v(" "),e.loading?e._e():r("v-btn",{attrs:{color:"primary",block:"",disabled:!e.valid,type:"submit"}},[e._v("Login")])],1)],1),e._v(" "),r("v-card-actions",{staticClass:"d-flex justify-end mr-2"},[r("router-link",{staticClass:"overline",attrs:{to:{name:"forgot-password"}}},[e._v(" Forgot Password ")])],1)],1),e._v(" "),r("div",{staticClass:"d-flex justify-center mt-3"},[r("div",{staticClass:"caption mr-3 mt-1"},[e._v("Don't have Account?")]),e._v(" "),r("div",[r("router-link",{staticClass:"overline",attrs:{to:{name:"register"}}},[e._v(" SignUp ")])],1)]),e._v(" "),r("v-snackbar",{model:{value:e.snackbar,callback:function(t){e.snackbar=t},expression:"snackbar"}},[e._v("\n      "+e._s(e.text)+"\n      "),r("v-btn",{attrs:{color:"white",text:""},on:{click:function(t){e.snackbar=!1}}},[e._v("\n          Close\n      ")])],1)],1)],1)],1)],1)}),[],!1,null,null,null);t.default=l.exports},30:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var i=Object.prototype.hasOwnProperty;var a,o,s,c=(a=!1,o=[],s={resolved:function(){return a},resolve:function(e){if(!a){a=!0;for(var t=0,r=o.length;t<r;t++)o[t](e)}},promise:{then:function(e){a?e():o.push(e)}}},{notify:function(){s.resolve()},wait:function(){return s.promise},render:function(e,t,r){this.wait().then((function(){r(window.grecaptcha.render(e,t))}))},reset:function(e){void 0!==e&&(this.assertLoaded(),this.wait().then((function(){return window.grecaptcha.reset(e)})))},execute:function(e){void 0!==e&&(this.assertLoaded(),this.wait().then((function(){return window.grecaptcha.execute(e)})))},checkRecaptchaLoad:function(){i.call(window,"grecaptcha")&&i.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!s.resolved())throw new Error("ReCAPTCHA has not been loaded")}});"undefined"!=typeof window&&(window.vueRecaptchaApiLoaded=c.notify);var u={name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!1},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},beforeMount:function(){if(this.loadRecaptchaScript&&!document.getElementById(this.recaptchaScriptId)){var e=document.createElement("script");e.id=this.recaptchaScriptId,e.src="https://"+this.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+this.language,e.async=!0,e.defer=!0,document.head.appendChild(e)}},mounted:function(){var e=this;c.checkRecaptchaLoad();var t=n({},this.$props,{callback:this.emitVerify,"expired-callback":this.emitExpired,"error-callback":this.emitError}),r=this.$slots.default?this.$el.children[0]:this.$el;c.render(r,t,(function(t){e.$widgetId=t,e.$emit("render",t)}))},methods:{reset:function(){c.reset(this.$widgetId)},execute:function(){c.execute(this.$widgetId)},emitVerify:function(e){this.$emit("verify",e)},emitExpired:function(){this.$emit("expired")},emitError:function(){this.$emit("error")}},render:function(e){return e("div",{},this.$slots.default)}};t.a=u}}]);