text: (function(t){function e(e){for(var a,s,i=e[0],u=e[1],l=e[2],f=0,p=[];f<i.length;f++)s=i[f],n[s]&&p.push(n[s][0]),n[s]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(t[a]=u[a]);c&&c(e);while(p.length)p.shift()();return o.push.apply(o,l||[]),r()}function r(){for(var t,e=0;e<o.length;e++){for(var r=o[e],a=!0,i=1;i<r.length;i++){var u=r[i];0!==n[u]&&(a=!1)}a&&(o.splice(e--,1),t=s(s.s=r[0]))}return t}var a={},n={login:0},o=[];function s(e){if(a[e])return a[e].exports;var r=a[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=t,s.c=a,s.d=function(t,e,r){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(r,a,function(e){return t[e]}.bind(null,a));return r},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],u=i.push.bind(i);i.push=e,i=i.slice();for(var l=0;l<i.length;l++)e(i[l]);var c=u;o.push([6,"chunk-vendors"]),r()})({"3a17":function(t,e,r){},4398:function(t,e,r){"use strict";r.r(e);r("cadf"),r("551c"),r("f751"),r("097d");var a=r("2b0e"),n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"app"}},[r("Navbar"),t.show?r("b-form",{attrs:{id:"form"},on:{submit:[function(t){t.preventDefault()},t.onSubmit]}},[r("label",{attrs:{for:"textUsername"}},[t._v("Username")]),r("b-input",{attrs:{type:"text",id:"textUsername"},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}}),r("br"),r("label",{attrs:{for:"textPassword"}},[t._v("Password")]),r("b-input",{attrs:{type:"password",id:"textPassword","aria-describedby":"passwordHelpBlock"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),r("br"),r("b-button",{attrs:{type:"submit",variant:"primary"}},[t._v("Log in")])],1):t._e(),r("router-view"),r("Footer")],1)},o=[],s=(r("a481"),r("d178")),i=r("fd2d"),u={name:"app",components:{Navbar:s["a"],Footer:i["a"]},data:function(){return{form:{username:"",password:""},show:!0}},methods:{onSubmit:function(t){var e=this;t.preventDefault();var r=this.form.username,a=this.form.password,n="http://localhost:8000/api/v1/login";this.$http.post(n,{username:r,password:a}).then(function(t){e.$cookies.set("token",t.data.token),e.$router.replace({path:"/helloworld"}),e.show=!1;var r="JWT ".concat(e.$cookies.get("token"));e.$http.get("http://localhost:8000/api/v1/whoami",{headers:{Authorization:r}}).then(function(t){e.$cookies.set("user_type",t.data.user_type)})})}}},l=u,c=(r("5767"),r("2877")),f=Object(c["a"])(l,n,o,!1,null,null,null),p=f.exports,d=r("9f7b"),v=r.n(d),b=r("2b27"),h=r.n(b),m=r("bc3a"),_=r.n(m),g=r("8c4f"),w=r("fdab");a["a"].use(g["a"]);var y=new g["a"]({routes:[{path:"/helloworld",component:w["a"]}],linkActiveClass:"active",mode:"history"});r("f9e3"),r("2dd8");a["a"].prototype.$http=_.a,a["a"].config.productionTip=!1,a["a"].use(v.a),a["a"].use(h.a),new a["a"]({router:y,render:function(t){return t(p)}}).$mount("#app")},5767:function(t,e,r){"use strict";var a=r("3a17"),n=r.n(a);n.a},6:function(t,e,r){t.exports=r("4398")},d178:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"nav"}},[r("b-navbar",{attrs:{toggleable:"lg",type:"dark",variant:"info"}},[r("b-navbar-brand",{attrs:{href:"#"}},[t._v("DataMe")]),r("b-navbar-toggle",{attrs:{target:"nav_collapse"}}),r("b-collapse",{attrs:{"is-nav":"",id:"nav_collapse"}},[r("b-navbar-nav",{staticClass:"ml-auto"},[r("b-nav-item",{attrs:{href:"/applications"}},[t._v("Applications")]),r("b-nav-item",{attrs:{href:"/explore"}},[t._v("Offers")]),r("b-nav-item",{attrs:{href:"/mail"}},[t._v("Mail")]),"ds"===t.user_type?r("div",[r("b-nav-item",{attrs:{href:"/my_cv"}},[t._v("Curriculum")])],1):t._e(),r("b-nav-item",{attrs:{href:"/login"}},[t._v("Log In")]),r("b-nav-item-dropdown",{attrs:{text:"Lang",right:""}},[r("b-dropdown-item",{attrs:{href:"#"}},[t._v("EN")]),r("b-dropdown-item",{attrs:{href:"#"}},[t._v("ES")])],1)],1)],1)],1)],1)},n=[],o={name:"Navbar",props:{},data:function(){return{items:[],form:{title:"",description:"",status:"",date:null},user_type:this.$cookies.get("user_type")}}},s=o,i=r("2877"),u=Object(i["a"])(s,a,n,!1,null,null,null);e["a"]=u.exports},e089:function(t,e,r){},e50e:function(t,e,r){"use strict";var a=r("e089"),n=r.n(a);n.a},fd2d:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"footer"}},[r("b-navbar",{attrs:{type:"dark",variant:"dark",fixed:"bottom"}},[r("b-nav-text",[t._v("© Copyright 2019 | Made with ❤️ in Sevilla")]),r("b-navbar-nav",{staticClass:"ml-auto"},[r("b-nav-item",{attrs:{href:"#"}},[t._v("About us")]),r("b-nav-item",{attrs:{href:"#"}},[t._v("Terms and conditions")]),r("b-nav-item",{attrs:{href:"#"}},[t._v("Privacy policy")])],1)],1)],1)},n=[],o={name:"Footer",props:{fixed:String,sticky:Boolean}},s=o,i=r("2877"),u=Object(i["a"])(s,a,n,!1,null,null,null);e["a"]=u.exports},fdab:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"hello"},[r("br"),r("h1",[t._v(t._s(t.msg))])])},n=[],o={name:"HelloWorld",data:function(){return{msg:""}},mounted:function(){var t=this,e="JWT "+this.$cookies.get("token");this.$http.get("http://localhost:8000/api/v1/helloworld",{headers:{Authorization:e}}).then(function(e){t.msg=e.data.saludo})}},s=o,i=(r("e50e"),r("2877")),u=Object(i["a"])(s,a,n,!1,null,"feb3ea04",null);e["a"]=u.exports}});
  //# sourceMappingURL=login.5b991a99.js.map