text: (function(t){function e(e){for(var s,o,l=e[0],r=e[1],c=e[2],u=0,p=[];u<l.length;u++)o=l[u],i[o]&&p.push(i[o][0]),i[o]=0;for(s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s]);d&&d(e);while(p.length)p.shift()();return n.push.apply(n,c||[]),a()}function a(){for(var t,e=0;e<n.length;e++){for(var a=n[e],s=!0,l=1;l<a.length;l++){var r=a[l];0!==i[r]&&(s=!1)}s&&(n.splice(e--,1),t=o(o.s=a[0]))}return t}var s={},i={app:0},n=[];function o(e){if(s[e])return s[e].exports;var a=s[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=t,o.c=s,o.d=function(t,e,a){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)o.d(a,s,function(e){return t[e]}.bind(null,s));return a},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/static/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],r=l.push.bind(l);l.push=e,l=l.slice();for(var c=0;c<l.length;c++)e(l[c]);var d=r;n.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"0e55":function(t,e,a){},"22d7":function(t,e,a){"use strict";var s=a("0e55"),i=a.n(s);i.a},4711:function(t,e,a){},"4d1c":function(t,e,a){},"56d7":function(t,e,a){"use strict";a.r(e);a("cadf"),a("551c"),a("f751"),a("097d");var s=a("2b0e"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("notifications"),a("router-view")],1)},n=[],o={computed:{isLoggedIn:function(){return this.$store.getters.isLoggedIn}},methods:{logout:function(){var t=this;this.$store.dispatch("logout").then(function(){t.$router.push("/login")})}}},l=o,r=a("2877"),c=Object(r["a"])(l,i,n,!1,null,null,null),d=c.exports,u=a("8c4f"),p=a("795b"),f=a.n(p),h=a("2f62"),m=a("bc3a"),b=a.n(m);s["a"].use(h["a"]);var g=new h["a"].Store({state:{status:"",token:localStorage.getItem("token")||"",user:{}},mutations:{auth_request:function(t){t.status="loading"},auth_success:function(t,e,a){t.status="success",t.token=e,t.user=a},auth_error:function(t){t.status="error"},auth_user:function(t,e){t.status="success",t.user=e},logout:function(t){t.status="",t.token=""}},actions:{login:function(t,e){var a=t.commit;return new f.a(function(t,s){a("auth_request"),b()({url:"/api/token-auth",data:e,method:"POST"}).then(function(e){var s=e.data.token,i=e.data.user;localStorage.setItem("token",s),b.a.defaults.headers.common.Authorization="Token "+s,a("auth_success",s,i),t(e)}).catch(function(t){a("auth_error"),localStorage.removeItem("token"),s(t)})})},register:function(t,e){var a=t.commit;return new f.a(function(t,s){a("auth_request"),b()({url:"/api/register",data:e,method:"POST"}).then(function(e){var s=e.data.token,i=e.data.user;localStorage.setItem("token",s),b.a.defaults.headers.common.Authorization="Token "+s,a("auth_success",s,i),t(e)}).catch(function(t){a("auth_error",t),localStorage.removeItem("token"),s(t)})})},logout:function(t){var e=t.commit;return new f.a(function(t,a){e("logout"),localStorage.removeItem("token"),delete b.a.defaults.headers.common.Authorization,t()})},getUser:function(t){var e=t.commit;return new f.a(function(t,a){e("auth_request"),b()({url:"/api/user",method:"GET"}).then(function(a){var s=a.data;e("auth_user",s),t(a)}).catch(function(t){e("auth_error",t),localStorage.removeItem("token"),a(t)})})}},getters:{isLoggedIn:function(t){return!!t.token},authStatus:function(t){return t.status}}}),v=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"wrapper",class:{"nav-open":t.$sidebar.showSidebar}},[a("side-bar",{attrs:{"background-color":t.sidebarBackground,"short-title":"Dashboard",title:"Dashboard"}},[a("template",{slot:"links"},[a("sidebar-item",{attrs:{link:{name:"Dashboard",icon:"ni ni-tv-2 text-primary",path:"/dashboard"}}}),a("sidebar-item",{attrs:{link:{name:"User Profile",icon:"ni ni-single-02 text-yellow",path:"/profile"}}})],1)],2),a("div",{staticClass:"main-content",attrs:{data:t.sidebarBackground}},[a("dashboard-navbar"),a("div",{on:{click:t.toggleSidebar}},[a("fade-transition",{attrs:{duration:200,origin:"center top",mode:"out-in"}},[a("router-view")],1),t.$route.meta.hideFooter?t._e():a("content-footer")],1)],1)],1)},_=[],y=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("base-nav",{staticClass:"navbar-top navbar-dark",attrs:{id:"navbar-main","show-toggle-button":!1,expand:""}},[a("form",{staticClass:"navbar-search navbar-search-dark form-inline mr-3 d-none d-md-flex ml-lg-auto"},[a("div",{staticClass:"form-group mb-0"},[a("base-input",{staticClass:"input-group-alternative",attrs:{placeholder:"Search",alternative:"","addon-right-icon":"fas fa-search"}})],1)]),a("ul",{staticClass:"navbar-nav align-items-center d-none d-md-flex"},[a("li",{staticClass:"nav-item dropdown"},[a("base-dropdown",{staticClass:"nav-link pr-0"},[a("div",{staticClass:"media align-items-center",attrs:{slot:"title"},slot:"title"},[a("span",{staticClass:"avatar avatar-sm rounded-circle"},[a("img",{attrs:{alt:"Image placeholder",src:"/static/img/theme/team-4-800x800.jpg"}})]),a("div",{staticClass:"media-body ml-2 d-none d-lg-block"},[a("span",{staticClass:"mb-0 text-sm font-weight-bold"},[t._v(t._s(t.userFullName))])])]),[a("div",{staticClass:"dropdown-header noti-title"},[a("h6",{staticClass:"text-overflow m-0"},[t._v("Welcome!")])]),a("router-link",{staticClass:"dropdown-item",attrs:{to:"/profile"}},[a("i",{staticClass:"ni ni-single-02"}),a("span",[t._v("My profile")])]),a("div",{staticClass:"dropdown-divider"}),t.isLoggedIn?a("a",{staticClass:"dropdown-item",attrs:{href:"#"},on:{click:t.logout}},[a("i",{staticClass:"ni ni-user-run"}),a("span",[t._v("Logout")])]):t._e()]],2)],1)])])},C=[],w={data:function(){return{activeNotifications:!1,showMenu:!1,searchQuery:""}},beforeCreate:function(){var t=this;"undefined"!=typeof this.$store.state.user&&"undefined"!=typeof this.$store.state.user.first_name||this.$store.dispatch("getUser").catch(function(e){t.$router.push("login")})},methods:{toggleSidebar:function(){this.$sidebar.displaySidebar(!this.$sidebar.showSidebar)},hideSidebar:function(){this.$sidebar.displaySidebar(!1)},toggleMenu:function(){this.showMenu=!this.showMenu},logout:function(){var t=this;this.$store.dispatch("logout").then(function(){return t.$router.push("/login")})}},computed:{isLoggedIn:function(){return this.$store.getters.isLoggedIn},userFullName:function(){return"undefined"==typeof this.$store.state.user||"undefined"==typeof this.$store.state.user.first_name?"":this.$store.state.user.first_name+" "+this.$store.state.user.last_name}}},k=w,x=Object(r["a"])(k,y,C,!1,null,null,null),$=x.exports,S=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("footer",{staticClass:"footer px-4"},[a("div",{staticClass:"row align-items-center justify-content-lg-between"},[a("div",{staticClass:"col-lg-6"},[a("div",{staticClass:"copyright text-center text-lg-left text-muted"},[t._v("\n        © "+t._s(t.year)+"\n        "),a("a",{staticClass:"font-weight-bold ml-1",attrs:{href:"#",target:"_blank"}},[t._v("BriteCore")])])]),t._m(0)])])},D=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"col-lg-6"},[a("ul",{staticClass:"nav nav-footer justify-content-center justify-content-lg-end"},[a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"#",target:"_blank"}},[t._v("About Us")])]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"#",target:"_blank"}},[t._v("Blog")])])])])}],T={data:function(){return{year:(new Date).getFullYear()}}},O=T,M=Object(r["a"])(O,S,D,!1,null,null,null),j=M.exports,A=a("7c76"),I={components:{DashboardNavbar:$,ContentFooter:j,FadeTransition:A["a"]},data:function(){return{sidebarBackground:"vue"}},methods:{toggleSidebar:function(){this.$sidebar.showSidebar&&this.$sidebar.displaySidebar(!1)}}},B=I,N=Object(r["a"])(B,v,_,!1,null,null,null),E=N.exports,P=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main-content bg-default"},[a("base-nav",{staticClass:"navbar-top navbar-horizontal navbar-dark",attrs:{containerClasses:"px-4 container",expand:""},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.closeMenu;return[a("div",{staticClass:"navbar-collapse-header d-md-none"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6 collapse-brand"},[a("router-link",{attrs:{to:"/"}},[a("img",{attrs:{src:"/static/img/brand/logo.png"}})])],1),a("div",{staticClass:"col-6 collapse-close"},[a("button",{staticClass:"navbar-toggler",attrs:{type:"button","aria-label":"Toggle sidenav"},on:{click:s}},[a("span"),a("span")])])])]),a("ul",{staticClass:"navbar-nav ml-auto"},[a("li",{staticClass:"nav-item"},[a("router-link",{staticClass:"nav-link nav-link-icon",attrs:{to:"/register"}},[a("i",{staticClass:"ni ni-circle-08"}),a("span",{staticClass:"nav-link-inner--text"},[t._v("Register")])])],1),a("li",{staticClass:"nav-item"},[a("router-link",{staticClass:"nav-link nav-link-icon",attrs:{to:"/login"}},[a("i",{staticClass:"ni ni-key-25"}),a("span",{staticClass:"nav-link-inner--text"},[t._v("Login")])])],1)])]}}])},[a("router-link",{staticClass:"navbar-brand",attrs:{slot:"brand",to:"/"},slot:"brand"},[a("img",{attrs:{src:"/static/img/brand/logo.png"}})])],1),a("div",{staticClass:"header bg-gradient-success py-7 py-lg-8"},[t._m(0),a("div",{staticClass:"separator separator-bottom separator-skew zindex-100"},[a("svg",{attrs:{x:"0",y:"0",viewBox:"0 0 2560 100",preserveAspectRatio:"none",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[a("polygon",{staticClass:"fill-default",attrs:{points:"2560 0 2560 100 0 100"}})])])]),a("div",{staticClass:"container mt--8 pb-5"},[a("slide-y-up-transition",{attrs:{mode:"out-in",origin:"center top"}},[a("router-view")],1)],1),a("footer",{staticClass:"py-5"},[a("div",{staticClass:"container"},[a("div",{staticClass:"row align-items-center justify-content-xl-between"},[a("div",{staticClass:"col-xl-6"},[a("div",{staticClass:"copyright text-center text-xl-left text-muted"},[t._v("\n            © "+t._s(t.year)+"\n            "),a("a",{staticClass:"font-weight-bold ml-1",attrs:{href:"#",target:"_blank"}},[t._v("BriteCore")])])]),t._m(1)])])])],1)},L=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("div",{staticClass:"header-body text-center mb-7"})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"col-xl-6"},[a("ul",{staticClass:"nav nav-footer justify-content-center justify-content-xl-end"},[a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"#",target:"_blank"}},[t._v("\n                About\n                Us\n              ")])]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"#",target:"_blank"}},[t._v("Blog")])])])])}],z={name:"auth-layout",components:{SlideYUpTransition:A["b"]},data:function(){return{year:(new Date).getFullYear(),showMenu:!1}}},F=z,W=Object(r["a"])(F,P,L,!1,null,null,null),R=W.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("base-header",{staticClass:"pb-6 pb-8 pt-5 pt-md-8",attrs:{type:"gradient-success"}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-md-4"},[a("stats-card",{staticClass:"mb-4 mb-xl-0",attrs:{title:"Total tables",type:"gradient-red","sub-title":t.tableCount,icon:"ni ni-calendar-grid-58"}})],1),a("div",{staticClass:"col-md-4"},[a("stats-card",{staticClass:"mb-4 mb-xl-0",attrs:{title:"Total fields",type:"gradient-orange","sub-title":t.fieldCount,icon:"ni ni-chart-pie-35"}})],1),a("div",{staticClass:"col-md-4"},[a("stats-card",{staticClass:"mb-4 mb-xl-0",attrs:{title:"Total Data",type:"gradient-green","sub-title":t.dataCount,icon:"ni ni-money-coins"}})],1)])]),a("div",{staticClass:"container-fluid mt--7"},[a("div",{staticClass:"row mt-5"},[a("div",{staticClass:"col-xl-4"},[a("data-tables-table",{on:{tableCount:t.setTableCount,fieldCount:t.setFieldCount,selectedTable:t.setSelectedTable}})],1),a("div",{staticClass:"col-xl-8 mb-5 mb-xl-0"},[a("table-data-table",{attrs:{tableName:t.tableData.name,tableColumns:t.tableData.columns,tableId:t.tableData.id},on:{dataUpdated:t.getDataCount}})],1)])])],1)},q=[],Y=(a("7f7f"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header border-0"},[a("div",{staticClass:"row align-items-center"},[t._m(0),a("div",{staticClass:"col text-right"},[a("base-button",{attrs:{size:"sm",type:"primary"},on:{click:t.addTable}},[t._v("Add Table")])],1)])]),a("div",{staticClass:"table-responsive"},[a("base-table",{attrs:{"thead-classes":"thead-light",data:t.tableData},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("th",{attrs:{scope:"row"}},[a("a",{attrs:{href:"#"},on:{click:function(e){return t.viewTable(s)}}},[t._v(t._s(s.name))])]),a("td",[t._v(t._s(s.fields.length))]),a("td",[a("base-button",{attrs:{size:"sm",type:"primary",iconOnly:"",icon:"fa fa-eye",title:"View"},on:{click:function(e){return t.viewTable(s)}}}),a("base-button",{attrs:{size:"sm",type:"primary",iconOnly:"",icon:"fas fa-pencil-alt",title:"Edit"},on:{click:function(e){return t.editTable(s)}}}),a("base-button",{attrs:{size:"sm",type:"danger",iconOnly:"",icon:"fa fa-trash",title:"Delete"},on:{click:function(e){return t.deleteTable(s.id)}}})],1)]}}])},[a("template",{slot:"columns"},[a("th",[t._v("Name")]),a("th",[t._v("Fields")]),a("th",[t._v("Action")])])],2)],1),a("modal",{attrs:{show:t.showDialogModal},on:{close:t.toggleDialogModal}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("h3",[t._v("Are You Sure?")])]),a("span",[t._v(t._s(t.dialogMessage))]),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("base-button",{staticClass:"sm",attrs:{type:"default"},on:{click:t.dialogYes}},[t._v("Yes")]),a("base-button",{staticClass:"sm",attrs:{type:"primary"},on:{click:t.dialogNo}},[t._v("No")])],1)]),a("modal",{attrs:{show:t.showModal,type:"large"},on:{close:t.toggleTableModal}},[a("div",{attrs:{slot:"header"},slot:"header"},[t._v("Add/Edit Table")]),a("div",[t.errors.message?a("base-alert",{attrs:{type:"danger"}},[t._v(t._s(t.errors.message))]):t._e(),a("form",{attrs:{role:"form"}},[a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:"Table Name",error:t.errors.tableName},on:{input:function(e){t.errors.tableName=""}},model:{value:t.active_table.name,callback:function(e){t.$set(t.active_table,"name",e)},expression:"active_table.name"}}),a("base-textarea",{staticClass:"input-group-alternative mb-4",attrs:{placeholder:"Table Description"},model:{value:t.active_table.description,callback:function(e){t.$set(t.active_table,"description",e)},expression:"active_table.description"}}),a("base-table",{attrs:{"thead-classes":"thead-light",data:t.active_table.fields},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("td",[a("base-input",{staticClass:"input-group-sm mb-0",attrs:{placeholder:"Name"},model:{value:s.name,callback:function(e){t.$set(s,"name",e)},expression:"row.name"}})],1),a("td",[a("base-select",{staticClass:"input-group-sm mb-0",attrs:{value:s.field_type,options:t.field_types},model:{value:s.field_type,callback:function(e){t.$set(s,"field_type",e)},expression:"row.field_type"}})],1),a("td",[a("base-input",{directives:[{name:"show",rawName:"v-show",value:3==s.field_type,expression:"row.field_type == 3"}],staticClass:"input-group-sm mb-0",attrs:{placeholder:"Comma separated options"},model:{value:s.field_options,callback:function(e){t.$set(s,"field_options",e)},expression:"row.field_options"}})],1),a("td",[a("base-button",{attrs:{size:"sm",type:"danger",iconOnly:"",icon:"ni ni-fat-remove",title:"Remove"},on:{click:function(e){return t.removeField(s.name)}}})],1)]}}])},[a("template",{slot:"columns"},[a("th",[t._v("Name")]),a("th",[t._v("Type")]),a("th",[t._v("Options")]),a("th",[t._v("Action")])]),a("tr",{attrs:{slot:"custom-row"},slot:"custom-row"},[a("td",[a("base-input",{staticClass:"input-group-sm mb-0",attrs:{placeholder:"Name",error:t.errors.fieldName},on:{input:function(e){t.errors.fieldName=""}},model:{value:t.new_field.name,callback:function(e){t.$set(t.new_field,"name",e)},expression:"new_field.name"}})],1),a("td",[a("base-select",{staticClass:"input-group-sm mb-0",attrs:{options:t.field_types},model:{value:t.new_field.field_type,callback:function(e){t.$set(t.new_field,"field_type",e)},expression:"new_field.field_type"}})],1),a("td",[a("base-input",{directives:[{name:"show",rawName:"v-show",value:3==t.new_field.field_type,expression:"new_field.field_type == 3"}],staticClass:"input-group-sm mb-0",attrs:{placeholder:"Comma separated options",value:t.new_field.field_options},model:{value:t.new_field.field_options,callback:function(e){t.$set(t.new_field,"field_options",e)},expression:"new_field.field_options"}})],1),a("td",[a("base-button",{attrs:{size:"sm",type:"primary",iconOnly:"",icon:"ni ni-fat-add",title:"Add"},on:{click:t.addField}})],1)])],2),a("div",{staticClass:"text-center"})],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("base-button",{staticClass:"sm",attrs:{type:"primary"},on:{click:t.saveTable}},[t._v("Save")])],1)])],1)}),V=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"col"},[a("h3",{staticClass:"mb-0"},[t._v("Tables")])])}],H=a("e814"),G=a.n(H),J={name:"data-tables-table",data:function(){return{errors:{tableName:null,fieldName:null,message:null},tableData:[],active_table:{fields:[]},new_field:{name:null,field_type:0,field_options:null},field_types:[{value:0,name:"Text"},{value:1,name:"Number"},{value:2,name:"Date"},{value:3,name:"enum"}],showModal:!1,showDialogModal:!1,dialogMessage:null}},mounted:function(){this.loadTables()},methods:{viewTable:function(t){this.$emit("selectedTable",t)},loadTables:function(){var t=this;this.$http.get("/api/data-tables").then(function(e){t.tableData=[];var a=0,s=0;for(var i in e.data)t.tableData.push({id:e.data[i].id,name:e.data[i].name,fields:e.data[i].data_fields}),a+=e.data[i].data_fields.length,s+=1;t.$emit("tableCount",s),t.$emit("fieldCount",a)})},toggleTableModal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.showModal;this.showModal=t},toggleDialogModal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.showDialogModal;this.showDialogModal=t},showDialog:function(t,e){this.dialogMessage=t;var a=this;this.dialogYes=function(){e(),a.toggleDialogModal()},this.toggleDialogModal()},dialogYes:function(){},dialogNo:function(){this.toggleDialogModal()},addTable:function(){this.active_table={fields:[]},this.toggleTableModal(!0)},addField:function(){this.new_field.name?(this.new_field.field_type=G()(this.new_field.field_type),this.active_table.fields.push(this.new_field),this.new_field={name:null,field_type:0,field_options:null}):this.errors.fieldName="The field name is required"},removeField:function(t){for(var e=0,a=0,s=-1,i=0;i<this.active_table.fields.length;i++)this.active_table.fields[i].name==t&&(this.active_table.id&&(e=this.active_table.id,this.active_table.fields[i].id&&(a=this.active_table.fields[i].id)),s=i);var n=this;e&&a&&s>-1?this.showDialog("Are you sure you want to delete this field?",function(){n.$http.delete("/api/data-table/"+e+"/field/"+a).then(function(t){n.active_table.fields.splice(s,1)})}):s>-1&&n.active_table.fields.splice(s,1)},editTable:function(t){this.active_table=t,this.toggleTableModal()},deleteTable:function(t){var e=this,a=this;this.showDialog("Are you sure you want to delete this table?",function(){a.$http.delete("/api/data-table/"+t).then(function(s){for(var i=0;i<a.tableData.length;i++)if(e.tableData[i].id==t){a.tableData.splice(i,1);break}})})},saveTable:function(){var t=this;if(this.active_table.name)if(0!=this.active_table.fields.length){var e=this;this.active_table.id?this.$http.put("/api/data-table/"+this.active_table.id,{name:this.active_table.name,description:this.active_table.description}).then(function(a){for(var s=a.data.id,i=0;i<e.active_table.fields.length;i++)e.active_table.fields[i].id?e.$http.put("/api/data-table/"+s+"/field/"+e.active_table.fields[i].id,{name:e.active_table.fields[i].name,field_type:e.active_table.fields[i].field_type,field_options:e.active_table.fields[i].field_options}).then(function(t){}).catch(function(t){console.log(t)}):e.$http.post("/api/data-table/"+s+"/fields",e.active_table.fields[i]).then(function(t){}).catch(function(t){console.log(t)});t.$notify({type:"success",title:"Table and fields saved successfully"}),e.resetActiveTableAndCloseModal()}):this.$http.post("/api/data-tables",{name:this.active_table.name,description:this.active_table.description}).then(function(t){for(var a=t.data.id,s=0;s<e.active_table.fields.length;s++)e.$http.post("/api/data-table/"+a+"/fields",e.active_table.fields[s]).then(function(t){}).catch(function(t){console.log(t)});e.resetActiveTableAndCloseModal()})}else this.errors.message="You must add at least one field";else this.errors.tableName="The table name is required"},resetActiveTableAndCloseModal:function(){this.loadTables(),this.active_table={fields:[]},this.toggleTableModal()}},watch:{active_table:{handler:function(t,e){this.errors.message=null},deep:!0}}},Q=J,K=Object(r["a"])(Q,Y,V,!1,null,null,null),X=K.exports,Z=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header border-0"},[a("div",{staticClass:"row align-items-center"},[a("div",{staticClass:"col"},[a("h3",{staticClass:"mb-0"},[t._v(t._s(t.compTableName))])]),a("div",{staticClass:"col text-right"},[a("a",{directives:[{name:"show",rawName:"v-show",value:t.tableColumns.length>0,expression:"tableColumns.length > 0"}],staticClass:"btn btn-sm btn-primary",attrs:{href:"#!"},on:{click:t.toggleAddDataModal}},[t._v("Add Table Data")])])])]),a("div",{staticClass:"table-responsive"},[a("base-table",{attrs:{"thead-classes":"thead-light",data:t.table_data},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[t._l(s.row_contents,function(e){return a("td",{key:e.id},[t._v(t._s(e.content))])}),a("td",[a("base-button",{attrs:{size:"sm",type:"danger",iconOnly:"",icon:"fa fa-trash",title:"Delete"},on:{click:function(e){return t.deleteRow(s.id)}}})],1)]}}])},[a("template",{slot:"columns"},[t._l(t.tableColumns,function(e){return a("th",{key:e.id},[t._v(t._s(e.name))])}),t.tableColumns.length?a("th",[t._v("Action")]):t._e()],2),0==t.table_data.length?a("tr",{attrs:{slot:"custom-row"},slot:"custom-row"},[a("td",{attrs:{colspan:t.tableColumns.length+1}},[a("center",[t._v("Table has no data")])],1)]):t._e()],2)],1),a("modal",{attrs:{show:t.showDialogModal},on:{close:t.toggleDialogModal}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("h3",[t._v("Are You Sure?")])]),a("span",[t._v(t._s(t.dialogMessage))]),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("base-button",{staticClass:"sm",attrs:{type:"default"},on:{click:t.dialogYes}},[t._v("Yes")]),a("base-button",{staticClass:"sm",attrs:{type:"primary"},on:{click:t.dialogNo}},[t._v("No")])],1)]),a("modal",{attrs:{show:t.showAddDataModal},on:{close:t.toggleAddDataModal}},[a("div",{attrs:{slot:"header"},slot:"header"},[t._v("Add/Edit Data")]),a("div",[t.errors.message?a("base-alert",{attrs:{type:"danger"}},[t._v(t._s(t.errors.message))]):t._e(),a("form",{attrs:{role:"form"}},t._l(t.tableColumns,function(e){return a("div",{key:e.id},[3!=e.field_type?a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:e.name,label:e.name,type:t.getFieldType(e.field_type)},model:{value:t.tableModel[e.id],callback:function(a){t.$set(t.tableModel,e.id,a)},expression:"tableModel[field.id]"}}):a("base-select",{staticClass:"input-group-alternative mb-3",attrs:{label:e.name,options:t.getSelectOptions(e.field_options)},model:{value:t.tableModel[e.id],callback:function(a){t.$set(t.tableModel,e.id,a)},expression:"tableModel[field.id]"}})],1)}),0)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("base-button",{staticClass:"sm",attrs:{type:"primary"},on:{click:t.saveData}},[t._v("Save")])],1)])],1)},tt=[],et=(a("28a5"),a("c5f6"),{name:"table-data-table",props:{tableName:{type:String,default:"No table selected",description:"Selected table name"},tableId:{type:Number,description:"Selected table ID"},tableColumns:{type:Array,description:"Table columns from fields"}},data:function(){return{errors:{message:null},showAddDataModal:!1,tableModel:{},table_data:[],showDialogModal:!1,dialogMessage:null}},methods:{loadTableData:function(){var t=this;this.$http.get("/api/data-table/"+this.tableId+"/rows").then(function(e){for(var a in t.table_data=e.data,t.table_data)if(t.tableColumns.length>t.table_data[a].row_contents.length){var s=[];for(var i in t.tableColumns){var n=t.hasField(t.tableColumns[i],t.table_data[a].row_contents);n?s.push(n):s.push({content:null,field_id:t.tableColumns[i].field_id,id:0,row_id:t.table_data[a].id,table_id:t.tableColumns[i].table_id,user_id:t.tableColumns[i].user_id})}t.table_data[a].row_contents=s}})},hasField:function(t,e){for(var a in e)if(e[a].field_id==t.id)return e[a];return!1},toggleAddDataModal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.showAddDataModal;this.showAddDataModal=t},toggleDialogModal:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.showDialogModal;this.showDialogModal=t},showDialog:function(t,e){this.dialogMessage=t;var a=this;this.dialogYes=function(){e(),a.toggleDialogModal()},this.toggleDialogModal()},dialogYes:function(){},dialogNo:function(){this.toggleDialogModal()},getSelectOptions:function(t){return t?(t=t.split(","),t.map(function(t){return t=t.trim(),{value:t,name:t}})):[]},getFieldType:function(t){return 1==t?"number":2==t?"date":"text"},saveData:function(){var t=[];for(var e in this.tableModel)t.push({content:this.tableModel[e],field_id:e});var a=this;this.$http.post("/api/data-table/"+this.tableId+"/rows",t).then(function(){a.tableModel={},a.$notify({type:"success",title:"Data added successfully"}),a.loadTableData(),a.$emit("dataUpdated")}).catch(function(t){console.log(t)})},deleteRow:function(t){var e=this,a=this;this.showDialog("Are you sure you want to delete this row data?",function(){a.$http.delete("/api/data-table/"+e.tableId+"/row/"+t).then(function(){a.loadTableData(),a.$emit("dataUpdated"),a.$notify({type:"success",title:"Row data deleted successfully"})})})}},computed:{compTableName:function(){return null==this.tableName?"No table selected":this.tableName}},watch:{tableId:function(t,e){t&&t!=e&&this.loadTableData()}}}),at=et,st=Object(r["a"])(at,Z,tt,!1,null,null,null),it=st.exports,nt={components:{TableDataTable:it,DataTablesTable:X},data:function(){return{tableCount:0,fieldCount:0,dataCount:0,tableData:{id:0,name:null,columns:[]}}},methods:{setTableCount:function(t){this.tableCount=t},setFieldCount:function(t){this.fieldCount=t},setSelectedTable:function(t){this.tableData.columns=t.fields,this.tableData.name=t.name,this.tableData.id=t.id},getDataCount:function(){var t=this;this.$http.get("/api/data-rows/count").then(function(e){return t.dataCount=e.data})}},mounted:function(){this.getDataCount()}},ot=nt,lt=Object(r["a"])(ot,U,q,!1,null,null,null),rt=lt.exports,ct=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-lg-5 col-md-7"},[a("div",{staticClass:"card bg-secondary shadow border-0"},[t._m(0),a("div",{staticClass:"card-body px-lg-5 py-lg-5"},[t.errors.message?a("base-alert",{attrs:{type:"danger"}},[t._v(t._s(t.errors.message))]):t._e(),a("form",{attrs:{role:"form"},on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:"Username","addon-left-icon":"ni ni-circle-08"},model:{value:t.model.username,callback:function(e){t.$set(t.model,"username",e)},expression:"model.username"}}),a("base-input",{staticClass:"input-group-alternative",attrs:{placeholder:"Password",type:"password","addon-left-icon":"ni ni-lock-circle-open"},model:{value:t.model.password,callback:function(e){t.$set(t.model,"password",e)},expression:"model.password"}}),a("div",{staticClass:"text-center"},[a("base-button",{staticClass:"my-4",attrs:{type:"primary"},on:{click:t.login}},[t._v("Sign in")])],1)],1)],1)]),a("div",{staticClass:"row mt-3"},[t._m(1),a("div",{staticClass:"col-6 text-right"},[a("router-link",{staticClass:"text-light",attrs:{to:"/register"}},[a("small",[t._v("Create new account")])])],1)])])])},dt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"card-header bg-transparent"},[a("div",{staticClass:"text-muted text-center mt-2 mb-3"},[a("h3",[t._v("Sign In")])])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"col-6"},[a("a",{staticClass:"text-light",attrs:{href:"#"}},[a("small",[t._v("Forgot password?")])])])}],ut={name:"login",data:function(){return{errors:{message:null},model:{username:"",password:""}}},methods:{login:function(){var t=this,e=this.model.username,a=this.model.password;this.$store.dispatch("login",{username:e,password:a}).then(function(){return t.$router.push("/")}).catch(function(t){console.log(t)})}}},pt=ut,ft=Object(r["a"])(pt,ct,dt,!1,null,null,null),ht=ft.exports,mt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-lg-5 col-md-7"},[a("div",{staticClass:"card bg-secondary shadow border-0"},[a("div",{staticClass:"card-body px-lg-5 py-lg-5"},[t._m(0),a("form",{attrs:{role:"form"}},[a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:"Name","addon-left-icon":"ni ni-hat-3"},model:{value:t.model.name,callback:function(e){t.$set(t.model,"name",e)},expression:"model.name"}}),a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:"Username","addon-left-icon":"ni ni-circle-08"},model:{value:t.model.username,callback:function(e){t.$set(t.model,"username",e)},expression:"model.username"}}),a("base-input",{staticClass:"input-group-alternative mb-3",attrs:{placeholder:"Email","addon-left-icon":"ni ni-email-83"},model:{value:t.model.email,callback:function(e){t.$set(t.model,"email",e)},expression:"model.email"}}),a("base-input",{staticClass:"input-group-alternative",attrs:{placeholder:"Password",type:"password","addon-left-icon":"ni ni-lock-circle-open"},model:{value:t.model.password,callback:function(e){t.$set(t.model,"password",e)},expression:"model.password"}}),a("div",{staticClass:"row my-4"},[a("div",{staticClass:"col-12"},[a("base-checkbox",{staticClass:"custom-control-alternative"},[a("span",{staticClass:"text-muted"},[t._v("\n                  I agree with the\n                  "),a("a",{attrs:{href:"#!"}},[t._v("Privacy Policy")])])])],1)]),a("div",{staticClass:"text-center"},[a("base-button",{staticClass:"my-4",attrs:{type:"primary"},on:{click:t.register}},[t._v("Create account")])],1)],1)])]),a("div",{staticClass:"row mt-3"},[t._m(1),a("div",{staticClass:"col-6 text-right"},[a("router-link",{staticClass:"text-light",attrs:{to:"/login"}},[a("small",[t._v("Login into your account")])])],1)])])])},bt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"text-center text-muted mb-4"},[a("h4",[t._v("Sign Up")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"col-6"},[a("a",{staticClass:"text-light",attrs:{href:"#"}},[a("small",[t._v("Forgot password?")])])])}],gt={name:"register",data:function(){return{model:{name:"",username:"",email:"",password:""}}},methods:{register:function(){}}},vt=gt,_t=Object(r["a"])(vt,mt,bt,!1,null,null,null),yt=_t.exports,Ct=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("base-header",{staticClass:"header pb-8 pt-5 pt-lg-8 d-flex align-items-center",staticStyle:{"min-height":"600px","background-image":"url(/static/img/theme/profile-cover.jpg)","background-size":"cover","background-position":"center top"}},[a("span",{staticClass:"mask bg-gradient-success opacity-8"}),a("div",{staticClass:"container-fluid d-flex align-items-center"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-md-11"},[a("h1",{staticClass:"display-2 text-white"},[t._v(t._s(t.userFullName))]),a("p",{staticClass:"text-white mt-0 mb-5"},[t._v("This is your profile page. You can edit your profile information")])])])])]),a("div",{staticClass:"container-fluid mt--7"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-xl-4 order-xl-2 mb-5 mb-xl-0"},[a("div",{staticClass:"card card-profile shadow"},[t._m(0),a("div",{staticClass:"card-header text-center border-0 pt-8 pt-md-4 pb-2 pb-md-4"}),a("div",{staticClass:"card-body pt-1 mt-2 pt-md-4"},[a("div",{staticClass:"text-center mt-md-5"},[a("h3",[t._v(t._s(t.userFullName))]),a("div",{staticClass:"h5 font-weight-300"},[a("i",{staticClass:"ni location_pin mr-2"}),t._v("\n                "+t._s(t.model.username)+"\n              ")]),a("div",{staticClass:"h5 mt-4"},[a("i",{staticClass:"ni business_briefcase-24 mr-2"}),t._v("\n                "+t._s(t.model.email)+"\n              ")])])])])]),a("div",{staticClass:"col-xl-8 order-xl-1"},[a("card",{attrs:{shadow:"",type:"secondary"}},[a("div",{staticClass:"bg-white border-0",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"row align-items-center"},[a("div",{staticClass:"col-8"},[a("h3",{staticClass:"mb-0"},[t._v("My account")])]),a("div",{staticClass:"col-4 text-right"},[a("a",{staticClass:"btn btn-sm btn-primary",attrs:{href:"#!"}},[t._v("Save")])])])]),[a("form",{on:{submit:function(t){t.preventDefault()}}},[a("h6",{staticClass:"heading-small text-muted mb-4"},[t._v("User information")]),a("div",{staticClass:"pl-lg-4"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6"},[a("base-input",{attrs:{alternative:"",label:"Username",placeholder:"Username","input-classes":"form-control-alternative"},model:{value:t.model.username,callback:function(e){t.$set(t.model,"username",e)},expression:"model.username"}})],1),a("div",{staticClass:"col-lg-6"},[a("base-input",{attrs:{alternative:"",label:"Email address",placeholder:"jesse@example.com","input-classes":"form-control-alternative"},model:{value:t.model.email,callback:function(e){t.$set(t.model,"email",e)},expression:"model.email"}})],1)]),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6"},[a("base-input",{attrs:{alternative:"",label:"First name",placeholder:"First name","input-classes":"form-control-alternative"},model:{value:t.model.first_name,callback:function(e){t.$set(t.model,"first_name",e)},expression:"model.first_name"}})],1),a("div",{staticClass:"col-lg-6"},[a("base-input",{attrs:{alternative:"",label:"Last name",placeholder:"Last name","input-classes":"form-control-alternative"},model:{value:t.model.last_name,callback:function(e){t.$set(t.model,"last_name",e)},expression:"model.last_name"}})],1)])])])]],2)],1)])])],1)},wt=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-lg-3 order-lg-2"},[a("div",{staticClass:"card-profile-image"},[a("a",{attrs:{href:"#"}},[a("img",{staticClass:"rounded-circle",attrs:{src:"/static/img/theme/team-4-800x800.jpg"}})])])])])}],kt={name:"user-profile",data:function(){return{model:{username:"",email:"",first_name:"",last_name:"",about:""}}},mounted:function(){var t=this;console.log(this.$store.state.user),"undefined"!=typeof this.$store.state.user&&"undefined"!=typeof this.$store.state.user.first_name?this.setModel(this.$store.state.user):this.$store.dispatch("getUser").then(function(e){return t.setModel(e.data)}).catch(function(e){console.log(e),t.$router.push("login")})},methods:{setModel:function(t){this.model.username=t.username,this.model.email=t.email,this.model.first_name=t.first_name,this.model.last_name=t.last_name}},computed:{userFullName:function(){return"undefined"==typeof this.$store.state.user||"undefined"==typeof this.$store.state.user.first_name?"":this.$store.state.user.first_name+" "+this.$store.state.user.last_name}}},xt=kt,$t=Object(r["a"])(xt,Ct,wt,!1,null,null,null),St=$t.exports;s["a"].use(u["a"]);var Dt=new u["a"]({linkExactActiveClass:"active",mode:"history",base:"/",routes:[{path:"/",redirect:"dashboard",component:E,children:[{path:"/dashboard",name:"dashboard",component:rt,meta:{requiresAuth:!0}},{path:"/profile",name:"profile",component:St,meta:{requiresAuth:!0}}]},{path:"/",redirect:"login",component:R,children:[{path:"/login",name:"login",component:ht},{path:"/register",name:"register",component:yt}]}]});Dt.beforeEach(function(t,e,a){if(t.matched.some(function(t){return t.meta.requiresAuth})){if(g.getters.isLoggedIn)return void a();a("/login")}else a()});var Tt=Dt,Ot=(a("4d1c"),a("a4d4"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a(t.tag,{tag:"component",staticClass:"badge",class:["badge-"+t.type,t.rounded?"badge-pill":"",t.circle&&"badge-circle"]},[t._t("default",[t.icon?a("i",{class:t.icon}):t._e()])],2)}),Mt=[],jt={name:"badge",props:{tag:{type:String,default:"span",description:"Html tag to use for the badge."},rounded:{type:Boolean,default:!1,description:"Whether badge is of pill type"},circle:{type:Boolean,default:!1,description:"Whether badge is circle"},icon:{type:String,default:"",description:"Icon name. Will be overwritten by slot if slot is used"},type:{type:String,default:"default",description:"Badge type (primary|info|danger|default|warning|success)"}}},At=jt,It=Object(r["a"])(At,Ot,Mt,!1,null,null,null),Bt=It.exports,Nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("fade-transition",[t.visible?a("div",{staticClass:"alert",class:["alert-"+t.type,{"alert-dismissible":t.dismissible}],attrs:{role:"alert"}},[t.dismissible?[t._t("default",[t.icon?a("span",{staticClass:"alert-inner--icon"},[a("i",{class:t.icon})]):t._e(),t.$slots.text?a("span",{staticClass:"alert-inner--text"},[t._t("text")],2):t._e()]),t._t("dismiss-icon",[a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"alert","aria-label":"Close"},on:{click:t.dismissAlert}},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])])]:t._t("default",[t.icon?a("span",{staticClass:"alert-inner--icon"},[a("i",{class:t.icon})]):t._e(),t.$slots.text?a("span",{staticClass:"alert-inner--text"},[t._t("text")],2):t._e()])],2):t._e()])},Et=[],Pt={name:"base-alert",components:{FadeTransition:A["a"]},props:{type:{type:String,default:"default",description:"Alert type"},icon:{type:String,default:"",description:"Alert icon. Will be overwritten by default slot"},dismissible:{type:Boolean,default:!1,description:"Whether alert is closes when clicking"}},data:function(){return{visible:!0}},methods:{dismissAlert:function(){this.visible=!1}}},Lt=Pt,zt=Object(r["a"])(Lt,Nt,Et,!1,null,null,null),Ft=zt.exports,Wt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a(t.tag,{tag:"component",staticClass:"btn",class:t.classes,attrs:{type:"button"===t.tag?t.nativeType:"",title:t.title},on:{click:t.handleClick}},[t.$slots.icon||t.icon&&t.$slots.default?a("span",{staticClass:"btn-inner--icon"},[t._t("icon",[a("i",{class:t.icon})])],2):t._e(),t.$slots.default?t._e():a("i",{class:t.icon}),t.$slots.icon||t.icon&&t.$slots.default?a("span",{staticClass:"btn-inner--text"},[t._t("default",[t._v(t._s(t.text))])],2):t._e(),t.$slots.icon||t.icon?t._e():t._t("default")],2)},Rt=[],Ut=a("bd86"),qt={name:"base-button",props:{tag:{type:String,default:"button",description:"Button tag (default -> button)"},type:{type:String,default:"default",description:"Button type (e,g primary, danger etc)"},size:{type:String,default:"",description:"Button size lg|sm"},textColor:{type:String,default:"",description:"Button text color (e.g primary, danger etc)"},nativeType:{type:String,default:"button",description:"Button native type (e.g submit,button etc)"},icon:{type:String,default:"",description:"Button icon"},text:{type:String,default:"",description:"Button text in case not provided via default slot"},outline:{type:Boolean,default:!1,description:"Whether button style is outline"},rounded:{type:Boolean,default:!1,description:"Whether button style is rounded"},iconOnly:{type:Boolean,default:!1,description:"Whether button contains only an icon"},title:{type:String,default:"",description:"Button tooltip"},block:{type:Boolean,default:!1,description:"Whether button is of block type"}},computed:{classes:function(){var t=[{"btn-block":this.block},{"rounded-circle":this.rounded},{"btn-icon-only":this.iconOnly},Object(Ut["a"])({},"text-".concat(this.textColor),this.textColor),{"btn-icon":this.icon||this.$slots.icon},this.type&&!this.outline?"btn-".concat(this.type):"",this.outline?"btn-outline-".concat(this.type):""];return this.size&&t.push("btn-".concat(this.size)),t}},methods:{handleClick:function(t){this.$emit("click",t)}}},Yt=qt,Vt=Object(r["a"])(Yt,Wt,Rt,!1,null,null,null),Ht=Vt.exports,Gt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-group",class:[{"input-group":t.hasIcon},{"has-danger":t.error},{focused:t.focused},{"has-label":t.label||t.$slots.label},{"has-success":!0===t.valid},{"has-danger":!1===t.valid},t.groupClasses]},[t._t("label",[t.label?a("label",{staticClass:"form-control-label",class:t.labelClasses},[t._v("\n      "+t._s(t.label)+"\n      "),t.required?a("span",[t._v("*")]):t._e()]):t._e()]),t.addonLeftIcon||t.$slots.addonLeft?a("div",{staticClass:"input-group-prepend"},[a("span",{staticClass:"input-group-text"},[t._t("addonLeft",[a("i",{class:t.addonLeftIcon})])],2)]):t._e(),t._t("default",[a("input",t._g(t._b({staticClass:"form-control",class:[{"is-valid":!0===t.valid},{"is-invalid":!1===t.valid},t.inputClasses],attrs:{"aria-describedby":"addon-right addon-left"},domProps:{value:t.value}},"input",t.$attrs,!1),t.listeners))],null,t.slotData),t.addonRightIcon||t.$slots.addonRight?a("div",{staticClass:"input-group-append"},[a("span",{staticClass:"input-group-text"},[t._t("addonRight",[a("i",{class:t.addonRightIcon})])],2)]):t._e(),t._t("infoBlock"),t._t("helpBlock",[t.error?a("div",{staticClass:"text-danger invalid-feedback",class:{"mt-2":t.hasIcon},staticStyle:{display:"block"}},[t._v(t._s(t.error))]):t._e()])],2)},Jt=[],Qt=a("cebc"),Kt={inheritAttrs:!1,name:"base-input",props:{required:{type:Boolean,description:"Whether input is required (adds an asterix *)"},valid:{type:Boolean,description:"Whether is valid",default:void 0},label:{type:String,description:"Input label (text before input)"},error:{type:String,description:"Input error (below input)"},groupClasses:{type:String,description:"Div form-group css classes"},labelClasses:{type:String,description:"Input label css classes"},inputClasses:{type:String,description:"Input css classes"},value:{type:[String,Number],description:"Input value"},addonRightIcon:{type:String,description:"Addon right icon"},addonLeftIcon:{type:String,description:"Addon left icon"}},data:function(){return{focused:!1}},computed:{listeners:function(){return Object(Qt["a"])({},this.$listeners,{input:this.updateValue,focus:this.onFocus,blur:this.onBlur})},slotData:function(){return Object(Qt["a"])({focused:this.focused},this.listeners)},hasIcon:function(){var t=this.$slots,e=t.addonRight,a=t.addonLeft;return void 0!==e||void 0!==a||void 0!==this.addonRightIcon||void 0!==this.addonLeftIcon}},methods:{updateValue:function(t){var e=t.target.value;this.$emit("input",e)},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.$emit("blur",t)}}},Xt=Kt,Zt=Object(r["a"])(Xt,Gt,Jt,!1,null,null,null),te=Zt.exports,ee=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-group",class:[{"has-danger":t.error},{focused:t.focused},{"has-label":t.label||t.$slots.label},{"has-success":!0===t.valid},{"has-danger":!1===t.valid},t.groupClasses]},[t._t("label",[t.label?a("label",{staticClass:"form-control-label",class:t.labelClasses},[t._v("\n      "+t._s(t.label)+"\n      "),t.required?a("span",[t._v("*")]):t._e()]):t._e()]),t._t("default",[a("textarea",t._g(t._b({staticClass:"form-control",class:[{"is-valid":!0===t.valid},{"is-invalid":!1===t.valid},t.inputClasses],attrs:{"aria-describedby":"addon-right addon-left"}},"textarea",t.$attrs,!1),t.listeners))],null,t.slotData),t._t("infoBlock"),t._t("helpBlock",[t.error?a("div",{staticClass:"text-danger invalid-feedback",staticStyle:{display:"block"}},[t._v(t._s(t.error))]):t._e()])],2)},ae=[],se={inheritAttrs:!1,name:"base-textarea",props:{required:{type:Boolean,description:"Whether input is required (adds an asterix *)"},valid:{type:Boolean,description:"Whether is valid",default:void 0},label:{type:String,description:"Input label (text before input)"},error:{type:String,description:"Input error (below input)"},groupClasses:{type:String,description:"Div form-group css classes"},labelClasses:{type:String,description:"Input label css classes"},inputClasses:{type:String,description:"Input css classes"},value:{type:String,description:"Input value"}},data:function(){return{focused:!1}},computed:{listeners:function(){return Object(Qt["a"])({},this.$listeners,{input:this.updateValue,focus:this.onFocus,blur:this.onBlur})},slotData:function(){return Object(Qt["a"])({focused:this.focused},this.listeners)}},methods:{updateValue:function(t){var e=t.target.value;this.$emit("input",e)},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.$emit("blur",t)}}},ie=se,ne=Object(r["a"])(ie,ee,ae,!1,null,null,null),oe=ne.exports,le=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"form-group",class:[{"input-group":t.hasIcon},{"has-danger":t.error},{focused:t.focused},{"has-label":t.label||t.$slots.label},{"has-success":!0===t.valid},{"has-danger":!1===t.valid},t.groupClasses]},[t._t("label",[t.label?a("label",{staticClass:"form-control-label",class:t.labelClasses},[t._v("\n      "+t._s(t.label)+"\n      "),t.required?a("span",[t._v("*")]):t._e()]):t._e()]),t.addonLeftIcon||t.$slots.addonLeft?a("div",{staticClass:"input-group-prepend"},[a("span",{staticClass:"input-group-text"},[t._t("addonLeft",[a("i",{class:t.addonLeftIcon})])],2)]):t._e(),t._t("default",[a("select",t._g(t._b({staticClass:"form-control",class:[{"is-valid":!0===t.valid},{"is-invalid":!1===t.valid},t.inputClasses],attrs:{"aria-describedby":"addon-right addon-left"}},"select",t.$attrs,!1),t.listeners),[a("option",{attrs:{value:""}},[t._v("--Select One--")]),t._l(t.options,function(e){return a("option",{key:e.value,domProps:{value:e.value,selected:t.value==e.value?"selected":""}},[t._v(t._s(e.name))])})],2)],null,t.slotData),t.addonRightIcon||t.$slots.addonRight?a("div",{staticClass:"input-group-append"},[a("span",{staticClass:"input-group-text"},[t._t("addonRight",[a("i",{class:t.addonRightIcon})])],2)]):t._e(),t._t("infoBlock"),t._t("helpBlock",[t.error?a("div",{staticClass:"text-danger invalid-feedback",class:{"mt-2":t.hasIcon},staticStyle:{display:"block"}},[t._v(t._s(t.error))]):t._e()])],2)},re=[],ce={inheritAttrs:!1,name:"base-select",props:{required:{type:Boolean,description:"Whether input is required (adds an asterix *)"},valid:{type:Boolean,description:"Whether is valid",default:void 0},label:{type:String,description:"Input label (text before input)"},error:{type:String,description:"Input error (below input)"},groupClasses:{type:String,description:"Div form-group css classes"},labelClasses:{type:String,description:"Input label css classes"},inputClasses:{type:String,description:"Input css classes"},value:{type:[String,Number],description:"Input value"},addonRightIcon:{type:String,description:"Addon right icon"},addonLeftIcon:{type:String,description:"Addon left icon"},options:{type:Array,description:"Select Options"}},data:function(){return{focused:!1}},computed:{listeners:function(){return Object(Qt["a"])({},this.$listeners,{input:this.updateValue,focus:this.onFocus,blur:this.onBlur})},slotData:function(){return Object(Qt["a"])({focused:this.focused},this.listeners)},hasIcon:function(){var t=this.$slots,e=t.addonRight,a=t.addonLeft;return void 0!==e||void 0!==a||void 0!==this.addonRightIcon||void 0!==this.addonLeftIcon}},methods:{updateValue:function(t){var e=t.target.value;this.$emit("input",e)},onFocus:function(t){this.focused=!0,this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.$emit("blur",t)}}},de=ce,ue=Object(r["a"])(de,le,re,!1,null,null,null),pe=ue.exports,fe=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a(t.tag,{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.closeDropDown,expression:"closeDropDown"}],tag:"component",staticClass:"dropdown",class:[{show:t.isOpen},{dropdown:"down"===t.direction},{dropup:"up"===t.direction}],attrs:{"aria-haspopup":"true","aria-expanded":t.isOpen},on:{click:t.toggleDropDown}},[t._t("title",[a("a",{staticClass:"dropdown-toggle nav-link",class:{"no-caret":t.hideArrow},attrs:{"data-toggle":"dropdown"}},[a("i",{class:t.icon}),a("span",{staticClass:"no-icon"},[t._v(t._s(t.title))])])]),a("ul",{ref:"menu",staticClass:"dropdown-menu",class:[{"dropdown-menu-right":"right"===t.position},{show:t.isOpen},t.menuClasses]},[t._t("default")],2)],2)},he=[],me={name:"base-dropdown",props:{direction:{type:String,default:"down"},title:{type:String,description:"Dropdown title"},icon:{type:String,description:"Icon for dropdown title"},position:{type:String,description:"Position of dropdown menu (e.g right|left)"},menuClasses:{type:[String,Object],description:"Dropdown menu classes"},hideArrow:{type:Boolean,description:"Whether dropdown arrow should be hidden"},appendToBody:{type:Boolean,default:!0,description:"Whether dropdown should be appended to document body"},tag:{type:String,default:"li",description:"Dropdown html tag (e.g div, li etc)"}},data:function(){return{isOpen:!1}},methods:{toggleDropDown:function(){this.isOpen=!this.isOpen,this.$emit("change",this.isOpen)},closeDropDown:function(){this.isOpen=!1,this.$emit("change",this.isOpen)}}},be=me,ge=(a("f364"),Object(r["a"])(be,fe,he,!1,null,null,null)),ve=ge.exports,_e=function(){var t,e=this,a=e.$createElement,s=e._self._c||a;return s("nav",{staticClass:"navbar",class:[{"navbar-expand-md":e.expand},{"navbar-transparent":e.transparent},(t={},t["bg-"+e.type]=e.type,t)]},[s("div",{class:e.containerClasses},[e._t("brand",[s("router-link",{staticClass:"h4 mb-0 text-white text-uppercase d-none d-lg-inline-block",attrs:{to:e.$route.path}},[e._v("\n                "+e._s(e.$route.name)+"\n            ")])]),e.showToggleButton?s("navbar-toggle-button",{attrs:{toggled:e.toggled,target:e.contentId},nativeOn:{click:function(t){t.stopPropagation(),e.toggled=!e.toggled}}},[s("span",{staticClass:"navbar-toggler-icon"})]):e._e(),s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],staticClass:"collapse navbar-collapse",class:{show:e.toggled},attrs:{id:e.contentId}},[e._t("default",null,{closeMenu:e.closeMenu})],2)],2)])},ye=[],Ce=(a("6b54"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",{staticClass:"navbar-toggler",attrs:{type:"button","data-toggle":"collapse","data-target":t.target,"aria-controls":t.target,"aria-expanded":t.toggled,"aria-label":"Toggle navigation"}},[t._t("default",[a("span"),a("span")])],2)}),we=[],ke={props:{target:{type:[String,Number],description:"Button target element"},toggled:{type:Boolean,default:!1,description:"Whether button is toggled"}}},xe=ke,$e=Object(r["a"])(xe,Ce,we,!1,null,null,null),Se=$e.exports,De={name:"base-nav",components:{NavbarToggleButton:Se},props:{type:{type:String,default:"",description:"Navbar type (e.g default, primary etc)"},title:{type:String,default:"",description:"Title of navbar"},contentId:{type:[String,Number],default:Math.random().toString(),description:"Explicit id for the menu. By default it's a generated random number"},containerClasses:{type:[String,Object,Array],default:"container-fluid"},transparent:{type:Boolean,default:!1,description:"Whether navbar is transparent"},expand:{type:Boolean,default:!1,description:"Whether navbar should contain `navbar-expand-lg` class"},showToggleButton:{type:Boolean,default:!0}},data:function(){return{toggled:!1}},methods:{closeMenu:function(){this.toggled=!1}}},Te=De,Oe=Object(r["a"])(Te,_e,ye,!1,null,null,null),Me=Oe.exports,je=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ul",{staticClass:"pagination",class:[t.size&&"pagination-"+t.size,t.align&&"justify-content-"+t.align]},[a("li",{staticClass:"page-item prev-page",class:{disabled:1===t.value}},[a("a",{staticClass:"page-link",attrs:{"aria-label":"Previous"},on:{click:t.prevPage}},[t._m(0)])]),t._l(t.range(t.minPage,t.maxPage),function(e){return a("li",{key:e,staticClass:"page-item",class:{active:t.value===e}},[a("a",{staticClass:"page-link",on:{click:function(a){return t.changePage(e)}}},[t._v(t._s(e))])])}),a("li",{staticClass:"page-item next-page",class:{disabled:t.value===t.totalPages}},[a("a",{staticClass:"page-link",attrs:{"aria-label":"Next"},on:{click:t.nextPage}},[t._m(1)])])],2)},Ae=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{attrs:{"aria-hidden":"true"}},[a("i",{staticClass:"fa fa-angle-left",attrs:{"aria-hidden":"true"}})])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{attrs:{"aria-hidden":"true"}},[a("i",{staticClass:"fa fa-angle-right",attrs:{"aria-hidden":"true"}})])}],Ie={name:"base-pagination",props:{pageCount:{type:Number,default:0,description:"Pagination page count. This should be specified in combination with perPage"},perPage:{type:Number,default:10,description:"Pagination per page. Should be specified with total or pageCount"},total:{type:Number,default:0,description:"Can be specified instead of pageCount. The page count in this case will be total/perPage"},value:{type:Number,default:1,description:"Pagination value"},size:{type:String,default:"",description:"Pagination size"},align:{type:String,default:"",description:"Pagination alignment (e.g center|start|end)"}},computed:{totalPages:function(){return this.pageCount>0?this.pageCount:this.total>0?Math.ceil(this.total/this.perPage):1},pagesToDisplay:function(){return this.totalPages>0&&this.totalPages<this.defaultPagesToDisplay?this.totalPages:this.defaultPagesToDisplay},minPage:function(){if(this.value>=this.pagesToDisplay){var t=Math.floor(this.pagesToDisplay/2),e=t+this.value;return e>this.totalPages?this.totalPages-this.pagesToDisplay+1:this.value-t}return 1},maxPage:function(){if(this.value>=this.pagesToDisplay){var t=Math.floor(this.pagesToDisplay/2),e=t+this.value;return e<this.totalPages?e:this.totalPages}return this.pagesToDisplay}},data:function(){return{defaultPagesToDisplay:5}},methods:{range:function(t,e){for(var a=[],s=t;s<=e;s++)a.push(s);return a},changePage:function(t){this.$emit("input",t)},nextPage:function(){this.value<this.totalPages&&this.$emit("input",this.value+1)},prevPage:function(){this.value>1&&this.$emit("input",this.value-1)}},watch:{perPage:function(){this.$emit("input",1)},total:function(){this.$emit("input",1)}}},Be=Ie,Ne=Object(r["a"])(Be,je,Ae,!1,null,null,null),Ee=Ne.exports,Pe=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("table",{staticClass:"table tablesorter",class:t.tableClass},[a("thead",{class:t.theadClasses},[a("tr",[t._t("columns",t._l(t.columns,function(e){return a("th",{key:e},[t._v(t._s(e))])}),{columns:t.columns})],2)]),a("tbody",{class:t.tbodyClasses},[t._l(t.data,function(e,s){return a("tr",{key:s},[t._t("default",t._l(t.colsWithValue(e),function(s,i){return a("td",{key:i},[t._v(t._s(t.itemValue(e,s)))])}),{row:e,index:s})],2)}),t._t("custom-row")],2)])},Le=[],ze={name:"base-table",props:{columns:{type:Array,default:function(){return[]},description:"Table columns"},data:{type:Array,default:function(){return[]},description:"Table data"},type:{type:String,default:"",description:"Whether table is striped or hover type"},theadClasses:{type:String,default:"",description:"<thead> css classes"},tbodyClasses:{type:String,default:"",description:"<tbody> css classes"}},computed:{tableClass:function(){return this.type&&"table-".concat(this.type)},colsWithValue:function(){var t=this;return function(e){return t.columns.filter(function(a){return t.hasValue(e,a)})}}},methods:{hasValue:function(t,e){return"undefined"!==t[e.toLowerCase()]},itemValue:function(t,e){return t[e.toLowerCase()]}}},Fe=ze,We=Object(r["a"])(Fe,Pe,Le,!1,null,null,null),Re=We.exports,Ue=function(){var t,e=this,a=e.$createElement,s=e._self._c||a;return s("div",{staticClass:"header",class:(t={},t["bg-"+e.type]=e.type,t)},[s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"header-body"},[e._t("default")],2)])])},qe=[],Ye={name:"base-header",props:{type:{type:String,default:"primary",description:"Header background type"}}},Ve=Ye,He=Object(r["a"])(Ve,Ue,qe,!1,null,null,null),Ge=He.exports,Je=function(){var t,e,a,s=this,i=s.$createElement,n=s._self._c||i;return n("div",{staticClass:"card",class:[{"card-lift--hover":s.hover},{shadow:s.shadow},(t={},t["shadow-"+s.shadowSize]=s.shadowSize,t),(e={},e["bg-gradient-"+s.gradient]=s.gradient,e),(a={},a["bg-"+s.type]=s.type,a)]},[s.$slots.header?n("div",{staticClass:"card-header",class:s.headerClasses},[s._t("header")],2):s._e(),s.noBody?s._e():n("div",{staticClass:"card-body",class:s.bodyClasses},[s._t("default")],2),s.noBody?s._t("default"):s._e(),s.$slots.footer?n("div",{staticClass:"card-footer",class:s.footerClasses},[s._t("footer")],2):s._e()],2)},Qe=[],Ke={name:"card",props:{type:{type:String,description:"Card type"},gradient:{type:String,description:"Card background gradient type (warning,danger etc)"},hover:{type:Boolean,description:"Whether card should move on hover"},shadow:{type:Boolean,description:"Whether card has shadow"},shadowSize:{type:String,description:"Card shadow size"},noBody:{type:Boolean,default:!1,description:"Whether card should have wrapper body class"},bodyClasses:{type:[String,Object,Array],description:"Card body css classes"},headerClasses:{type:[String,Object,Array],description:"Card header css classes"},footerClasses:{type:[String,Object,Array],description:"Card footer css classes"}}},Xe=Ke,Ze=Object(r["a"])(Xe,Je,Qe,!1,null,null,null),ta=Ze.exports,ea=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("card",{staticClass:"card-stats",attrs:{"show-footer-line":!0}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[t._t("default",[t.title?a("h5",{staticClass:"card-title text-uppercase text-muted mb-0"},[t._v(t._s(t.title))]):t._e(),t.subTitle?a("span",{staticClass:"h2 font-weight-bold mb-0"},[t._v(t._s(t.subTitle))]):t._e()])],2),t.$slots.icon||t.icon?a("div",{staticClass:"col-auto"},[t._t("icon",[a("div",{staticClass:"icon icon-shape text-white rounded-circle shadow",class:["bg-"+t.type,t.iconClasses]},[a("i",{class:t.icon})])])],2):t._e()]),a("p",{staticClass:"mt-3 mb-0 text-sm"},[t._t("footer")],2)])},aa=[],sa={name:"stats-card",components:{Card:ta},props:{type:{type:String,default:"primary"},icon:String,title:String,subTitle:[String,Number],iconClasses:[String,Array]}},ia=sa,na=Object(r["a"])(ia,ea,aa,!1,null,null,null),oa=na.exports,la=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("SlideYUpTransition",{attrs:{duration:t.animationDuration}},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"modal fade",class:[{"show d-block":t.show},{"d-none":!t.show},{"modal-mini":"mini"===t.type}],attrs:{tabindex:"-1",role:"dialog","aria-hidden":!t.show},on:{click:function(e){return e.target!==e.currentTarget?null:t.closeModal(e)}}},[a("div",{staticClass:"modal-dialog modal-dialog-centered",class:[{"modal-notice":"notice"===t.type},{"modal-lg":"large"===t.type},t.modalClasses]},[a("div",{staticClass:"modal-content",class:[t.gradient?"bg-gradient-"+t.gradient:"",t.modalContentClasses]},[t.$slots.header?a("div",{staticClass:"modal-header",class:[t.headerClasses]},[t._t("header"),t._t("close-button",[t.showClose?a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"},on:{click:t.closeModal}},[a("span",{attrs:{"aria-hidden":!t.show}},[t._v("×")])]):t._e()])],2):t._e(),a("div",{staticClass:"modal-body",class:t.bodyClasses},[t._t("default")],2),t.$slots.footer?a("div",{staticClass:"modal-footer",class:t.footerClasses},[t._t("footer")],2):t._e()])])])])},ra=[],ca={name:"modal",components:{SlideYUpTransition:A["b"]},props:{show:Boolean,showClose:{type:Boolean,default:!0},type:{type:String,default:"",validator:function(t){var e=["","notice","mini","large"];return-1!==e.indexOf(t)},description:'Modal type (notice|mini|"") '},modalClasses:{type:[Object,String],description:"Modal dialog css classes"},modalContentClasses:{type:[Object,String],description:"Modal dialog content css classes"},gradient:{type:String,description:"Modal gradient type (danger, primary etc)"},headerClasses:{type:[Object,String],description:"Modal Header css classes"},bodyClasses:{type:[Object,String],description:"Modal Body css classes"},footerClasses:{type:[Object,String],description:"Modal Footer css classes"},animationDuration:{type:Number,default:500,description:"Modal transition duration"}},methods:{closeModal:function(){this.$emit("update:show",!1),this.$emit("close")}},watch:{show:function(t){var e=document.body.classList;t?e.add("modal-open"):e.remove("modal-open")}}},da=ca,ua=(a("22d7"),Object(r["a"])(da,la,ra,!1,null,null,null)),pa=ua.exports,fa={install:function(t){t.component(Bt.name,Bt),t.component(Ft.name,Ft),t.component(Ht.name,Ht),t.component(te.name,te),t.component(oe.name,oe),t.component(pe.name,pe),t.component(Me.name,Me),t.component(ve.name,ve),t.component(Ee.name,Ee),t.component(Re.name,Re),t.component(Ge.name,Ge),t.component(ta.name,ta),t.component(oa.name,oa),t.component(pa.name,pa)}},ha={bind:function(t,e,a){t.clickOutsideEvent=function(s){t==s.target||t.contains(s.target)||a.context[e.expression](s)},document.body.addEventListener("click",t.clickOutsideEvent)},unbind:function(t){document.body.removeEventListener("click",t.clickOutsideEvent)}},ma={install:function(t){t.directive("click-outside",ha)}},ba=ma,ga=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("nav",{staticClass:"navbar navbar-vertical fixed-left navbar-expand-md navbar-light bg-white",attrs:{id:"sidenav-main"}},[a("div",{staticClass:"container-fluid"},[a("navbar-toggle-button",{nativeOn:{click:function(e){return t.showSidebar(e)}}},[a("span",{staticClass:"navbar-toggler-icon"})]),a("router-link",{staticClass:"navbar-brand",attrs:{to:"/"}},[a("img",{staticClass:"navbar-brand-img",attrs:{src:t.logo,alt:"..."}})]),t._t("mobile-right",[a("ul",{staticClass:"nav align-items-center d-md-none"},[a("base-dropdown",{staticClass:"nav-item",attrs:{position:"right"}},[a("a",{staticClass:"nav-link nav-link-icon",attrs:{slot:"title",href:"#",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},slot:"title"},[a("i",{staticClass:"ni ni-bell-55"})]),a("a",{staticClass:"dropdown-item",attrs:{href:"#"}},[t._v("Action")]),a("a",{staticClass:"dropdown-item",attrs:{href:"#"}},[t._v("Another action")]),a("div",{staticClass:"dropdown-divider"}),a("a",{staticClass:"dropdown-item",attrs:{href:"#"}},[t._v("Something else here")])]),a("base-dropdown",{staticClass:"nav-item",attrs:{position:"right"}},[a("a",{staticClass:"nav-link",attrs:{slot:"title",href:"#",role:"button"},slot:"title"},[a("div",{staticClass:"media align-items-center"},[a("span",{staticClass:"avatar avatar-sm rounded-circle"},[a("img",{attrs:{alt:"Image placeholder",src:"/static/img/theme/team-1-800x800.jpg"}})])])]),a("div",{staticClass:"dropdown-header noti-title"},[a("h6",{staticClass:"text-overflow m-0"},[t._v("Welcome!")])]),a("router-link",{staticClass:"dropdown-item",attrs:{to:"/profile"}},[a("i",{staticClass:"ni ni-single-02"}),a("span",[t._v("My profile")])]),a("div",{staticClass:"dropdown-divider"}),a("a",{staticClass:"dropdown-item",attrs:{href:"#!"}},[a("i",{staticClass:"ni ni-user-run"}),a("span",[t._v("Logout")])])],1)],1)]),t._t("default"),a("div",{directives:[{name:"show",rawName:"v-show",value:t.$sidebar.showSidebar,expression:"$sidebar.showSidebar"}],staticClass:"navbar-collapse collapse show",attrs:{id:"sidenav-collapse-main"}},[a("div",{staticClass:"navbar-collapse-header d-md-none"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6 collapse-brand"},[a("router-link",{attrs:{to:"/"}},[a("img",{attrs:{src:t.logo}})])],1),a("div",{staticClass:"col-6 collapse-close"},[a("navbar-toggle-button",{nativeOn:{click:function(e){return t.closeSidebar(e)}}})],1)])]),a("ul",{staticClass:"navbar-nav"},[t._t("links")],2),a("hr",{staticClass:"my-3"}),a("h6",{staticClass:"navbar-heading text-muted"},[t._v("Documentation")]),t._m(0)])],2)])},va=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ul",{staticClass:"navbar-nav mb-md-3"},[a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"https://github.com/emmanuel-nike/django-generic-datamodel"}},[a("i",{staticClass:"ni ni-spaceship"}),t._v(" Github\n          ")])]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"https://github.com/emmanuel-nike/django-generic-datamodel/blob/master/README.md"}},[a("i",{staticClass:"ni ni-palette"}),t._v(" Readme\n          ")])])])}],_a={name:"sidebar",components:{NavbarToggleButton:Se},props:{logo:{type:String,default:"/static/img/brand/logo.png",description:"Britecore logo"},autoClose:{type:Boolean,default:!0,description:"Whether sidebar should autoclose on mobile when clicking an item"}},provide:function(){return{autoClose:this.autoClose}},methods:{closeSidebar:function(){this.$sidebar.displaySidebar(!1)},showSidebar:function(){this.$sidebar.displaySidebar(!0)}},beforeDestroy:function(){this.$sidebar.showSidebar&&(this.$sidebar.showSidebar=!1)}},ya=_a,Ca=Object(r["a"])(ya,ga,va,!1,null,null,null),wa=Ca.exports,ka=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("li",{staticClass:"nav-item"},[a("router-link",{staticClass:"nav-link",attrs:{to:t.link.path,target:t.link.target,href:t.link.path},nativeOn:{click:function(e){return t.linkClick(e)}}},[[a("i",{class:t.link.icon}),a("span",{staticClass:"nav-link-text"},[t._v(t._s(t.link.name))])]],2)],1)},xa=[],$a={name:"sidebar-item",props:{link:{type:Object,default:function(){return{name:"",path:"",children:[]}},description:"Sidebar link description"}},data:function(){return{children:[],collapsed:!0}},methods:{linkClick:function(){this.autoClose&&this.$sidebar&&!0===this.$sidebar.showSidebar&&this.$sidebar.displaySidebar(!1)}}},Sa=$a,Da=Object(r["a"])(Sa,ka,xa,!1,null,null,null),Ta=Da.exports,Oa={showSidebar:!1,sidebarLinks:[],isMinimized:!1,displaySidebar:function(t){this.showSidebar=t},toggleMinimize:function(){document.body.classList.toggle("sidebar-mini"),this.isMinimized=!this.isMinimized}},Ma={install:function(t,e){e&&e.sidebarLinks&&(Oa.sidebarLinks=e.sidebarLinks);var a=new t({data:{sidebarStore:Oa}});t.prototype.$sidebar=a.sidebarStore,t.component("side-bar",wa),t.component("sidebar-item",Ta)}},ja=Ma,Aa=(a("ac6a"),a("a745")),Ia=a.n(Aa),Ba=(a("20d6"),a("5176")),Na=a.n(Ba),Ea=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"notifications"},[a("slide-y-up-transition",{attrs:{duration:t.transitionDuration,group:"",mode:"out-in"}},t._l(t.notifications,function(e){return a("notification",t._b({key:e.timestamp.getTime(),attrs:{clickHandler:e.onClick},on:{close:t.removeNotification}},"notification",e,!1))}),1)],1)},Pa=[],La=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"alert alert-notify alert-dismissible",class:[{"alert-with-icon":t.icon},t.verticalAlign,t.horizontalAlign,t.alertType],style:t.customPosition,attrs:{"data-notify":"container",role:"alert","data-notify-position":"top-center"},on:{click:t.tryClose}},[t.icon||t.$slots.icon?[t._t("icon",[a("span",{staticClass:"alert-icon",attrs:{"data-notify":"icon"}},[a("i",{class:t.icon})])])]:t._e(),a("span",{staticClass:"alert-text"},[t.title?a("span",{staticClass:"title"},[a("b",[t._v(t._s(t.title)),a("br")])]):t._e(),t.message?a("span",{domProps:{innerHTML:t._s(t.message)}}):t._e(),!t.message&&t.component?a("content-render",{attrs:{component:t.component}}):t._e()],1),t._t("dismiss-icon",[a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"alert","aria-label":"Close"},on:{click:t.close}},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])])],2)},za=[],Fa=void 0,Wa={name:"notification",components:{contentRender:{props:["component"],render:function(t){return t(Fa.component)}}},props:{message:String,title:String,icon:String,verticalAlign:{type:String,default:"top",validator:function(t){var e=["top","bottom"];return-1!==e.indexOf(t)}},horizontalAlign:{type:String,default:"right",validator:function(t){var e=["left","center","right"];return-1!==e.indexOf(t)}},type:{type:String,default:"info",validator:function(t){var e=["default","info","primary","danger","warning","success"];return-1!==e.indexOf(t)}},timeout:{type:Number,default:5e3,validator:function(t){return t>=0}},timestamp:{type:Date,default:function(){return new Date}},component:{type:[Object,Function]},showClose:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!0},clickHandler:Function},data:function(){return{elmHeight:0}},computed:{hasIcon:function(){return this.icon&&this.icon.length>0},alertType:function(){return"alert-".concat(this.type)},customPosition:function(){var t=this,e=20,a=this.elmHeight+10,s=this.$notifications.state.filter(function(e){return e.horizontalAlign===t.horizontalAlign&&e.verticalAlign===t.verticalAlign&&e.timestamp<=t.timestamp}).length;this.$notifications.settings.overlap&&(s=1);var i=(s-1)*a+e,n={};return"top"===this.verticalAlign?n.top="".concat(i,"px"):n.bottom="".concat(i,"px"),n}},methods:{close:function(){this.$emit("close",this.timestamp)},tryClose:function(t){this.clickHandler&&this.clickHandler(t,this),this.closeOnClick&&this.close()}},mounted:function(){this.elmHeight=this.$el.clientHeight,this.timeout&&setTimeout(this.close,this.timeout)}},Ra=Wa,Ua=(a("f0fa"),Object(r["a"])(Ra,La,za,!1,null,null,null)),qa=Ua.exports,Ya={components:{SlideYUpTransition:A["b"],Notification:qa},props:{transitionDuration:{type:Number,default:200},overlap:{type:Boolean,default:!1}},data:function(){return{notifications:this.$notifications.state}},methods:{removeNotification:function(t){this.$notifications.removeNotification(t)}},created:function(){this.$notifications.settings.overlap=this.overlap},watch:{overlap:function(t){this.$notifications.settings.overlap=t}}},Va=Ya,Ha=Object(r["a"])(Va,Ea,Pa,!1,null,null,null),Ga=Ha.exports,Ja={state:[],settings:{overlap:!1,verticalAlign:"top",horizontalAlign:"right",type:"info",timeout:5e3,closeOnClick:!0,showClose:!0},setOptions:function(t){this.settings=Na()(this.settings,t)},removeNotification:function(t){var e=this.state.findIndex(function(e){return e.timestamp===t});-1!==e&&this.state.splice(e,1)},addNotification:function(t){("string"===typeof t||t instanceof String)&&(t={message:t}),t.timestamp=new Date,t.timestamp.setMilliseconds(t.timestamp.getMilliseconds()+this.state.length),t=Na()({},this.settings,t),this.state.push(t)},notify:function(t){var e=this;Ia()(t)?t.forEach(function(t){e.addNotification(t)}):this.addNotification(t)}},Qa={install:function(t,e){var a=new t({data:{notificationStore:Ja},methods:{notify:function(t){this.notificationStore.notify(t)}}});t.prototype.$notify=a.notify,t.prototype.$notifications=a.notificationStore,t.component("Notifications",Ga),e&&Ja.setOptions(e)}},Ka=Qa,Xa={install:function(t){t.use(fa),t.use(ba),t.use(ja),t.use(Ka)}};s["a"].prototype.$http=b.a,s["a"].config.productionTip=!1;var Za=localStorage.getItem("token");Za&&(s["a"].prototype.$http.defaults.headers.common.Authorization="Token "+Za),s["a"].use(Xa),new s["a"]({router:Tt,store:g,render:function(t){return t(d)}}).$mount("#app")},a4d4:function(t,e,a){},e90a:function(t,e,a){},f0fa:function(t,e,a){"use strict";var s=a("e90a"),i=a.n(s);i.a},f364:function(t,e,a){"use strict";var s=a("4711"),i=a.n(s);i.a}});
  //# sourceMappingURL=app.eed6e88e.js.map