(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{540:function(t,e,r){"use strict";var o=r(2),l=(r(17),r(28),r(3)),n=r(67),d=r(86);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){Object(o.a)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e.a=Object(l.a)(n.a,Object(d.b)("form")).extend({name:"v-form",provide(){return{form:this}},inheritAttrs:!1,props:{disabled:Boolean,lazyValidation:Boolean,readonly:Boolean,value:Boolean},data:()=>({inputs:[],watchers:[],errorBag:{}}),watch:{errorBag:{handler(t){var e=Object.values(t).includes(!0);this.$emit("input",!e)},deep:!0,immediate:!0}},methods:{watchInput(input){var t=input=>input.$watch("hasError",(t=>{this.$set(this.errorBag,input._uid,t)}),{immediate:!0}),e={_uid:input._uid,valid:()=>{},shouldValidate:()=>{}};return this.lazyValidation?e.shouldValidate=input.$watch("shouldValidate",(r=>{r&&(this.errorBag.hasOwnProperty(input._uid)||(e.valid=t(input)))})):e.valid=t(input),e},validate(){return 0===this.inputs.filter((input=>!input.validate(!0))).length},reset(){this.inputs.forEach((input=>input.reset())),this.resetErrorBag()},resetErrorBag(){this.lazyValidation&&setTimeout((()=>{this.errorBag={}}),0)},resetValidation(){this.inputs.forEach((input=>input.resetValidation())),this.resetErrorBag()},register(input){this.inputs.push(input),this.watchers.push(this.watchInput(input))},unregister(input){var t=this.inputs.find((i=>i._uid===input._uid));if(t){var e=this.watchers.find((i=>i._uid===t._uid));e&&(e.valid(),e.shouldValidate()),this.watchers=this.watchers.filter((i=>i._uid!==t._uid)),this.inputs=this.inputs.filter((i=>i._uid!==t._uid)),this.$delete(this.errorBag,t._uid)}}},render(t){return t("form",{staticClass:"v-form",attrs:h({novalidate:!0},this.attrs$),on:{submit:t=>this.$emit("submit",t)}},this.$slots.default)}})},848:function(t,e,r){"use strict";r.r(e);var o=r(193),l=r(194),n=r(27),d=r(493),c=r(497),h=r(540),m=r(492),f=r(490),v=r(102),w=r(5),_=(r(7),r(8),r(151),r(16)),$={name:"Login",data:()=>({password:"",email:"",loading:!1,valid:!1}),computed:Object(_.d)(["settings"]),methods:{forgot(){var t=this;return Object(w.a)((function*(){t.email?(t.loading=!0,yield t.$axios.$post("/user/recover",{email:t.email}),t.loading=!1,t.$root.$message("login.check_email",{color:"success"})):t.$refs.email.focus()}))()},submit(t){var e=this;return Object(w.a)((function*(){if(e.$refs.form.validate()){try{e.loading=!0;var data=new URLSearchParams;data.append("username",e.email),data.append("password",e.password),data.append("grant_type","password"),data.append("client_id","self"),yield e.$auth.loginWith("local",{data:data}),e.loading=!1,e.$root.$message("login.ok",{color:"success"})}catch(t){return e.$root.$message("login.error",{color:"error"}),void(e.loading=!1)}e.email=e.password=""}}))()}},head(){return{htmlAttrs:{lang:this.settings.instance_locale},title:this.settings.title+" - "+this.$t("common.login")}}},y=r(13),component=Object(y.a)($,(function(){var t=this,e=t._self._c;return e(c.a,{staticClass:"pa-0 pa-md-3"},[e(m.a,{staticClass:"mt-md-5 ma-0",attrs:{align:"center",justify:"center"}},[e(d.a,{staticClass:"pa-0 pa-md-3",attrs:{cols:"12",md:"6",lg:"5",xl:"4"}},[e(h.a,{ref:"form",attrs:{"lazy-validation":""},on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}},model:{value:t.valid,callback:function(e){t.valid=e},expression:"valid"}},[e(l.a,[e(n.d,[t._v(t._s(t.$t("common.login")))]),e(n.b,{domProps:{textContent:t._s(t.$t("login.description"))}}),e(n.c,[e(v.a,{ref:"email",attrs:{type:"email","validate-on-blur":"",rules:t.$validators.email,autofocus:"",label:t.$t("common.email")},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}}),e(v.a,{attrs:{rules:t.$validators.password,type:"password",label:t.$t("common.password")},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1),e(n.a,[e(o.a,{attrs:{text:"",tabindex:"1",small:""},on:{click:t.forgot}},[t._v(t._s(t.$t("login.forgot_password")))])],1),e(n.a,[e(f.a),t.settings.allow_registration?e(o.a,{attrs:{to:"/register",text:"",color:"orange"}},[t._v(t._s(t.$t("login.not_registered")))]):t._e(),e(o.a,{attrs:{color:"success",type:"submit",outlined:"",disabled:!t.valid||t.loading,loading:t.loading}},[t._v(t._s(t.$t("common.login")))])],1)],1)],1)],1)],1)],1)}),[],!1,null,null,null);e.default=component.exports}}]);