(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{591:function(t,e,a){},713:function(t,e,a){t.exports=a.p+"generic-aa773.svg"},714:function(t,e,a){"use strict";var s=a(591);a.n(s).a},760:function(t,e,a){"use strict";a.r(e);var s=a(220),i=a(71),n=a(0),r=a(3).a.extend({components:{factorLink:s.u},data:()=>({toggle:!1,clickHandler:!1,menus:{}}),computed:{firstItem(){return this.menus.dashboard[0]||this.menus.admin[0]},defaultIcon:()=>a(713),activeGroup(){const{path:t}=this.$route;let e="";return Object.keys(this.menus).forEach(a=>{this.menus[a].forEach(a=>{const{items:s=[]}=a;this.getPath(a.path,!1,"44")==t&&(e=a.group),s.length>0&&s.forEach(s=>{this.getPath(s.path,a)==t&&(e=a.group)})})}),e}},watch:{$route:function(){this.redirectOnDefault()}},async mounted(){this.menus={dashboard:[]},(await Object(i.h)())._id&&this.initializeMenu()},methods:{toLabel:n.F,slugify:n.z,initializeMenu(){Object(i.f)({role:"admin"})&&this.$set(this.menus,"admin",[]),Object.keys(this.menus).forEach(t=>{this.menus[t]=Object(n.e)(`${t}-menu`,[]).map(e=>({...e,items:Object(n.e)(`${t}-menu-${e.group}`,e.items)}))}),this.redirectOnDefault()},redirectOnDefault(){"/dashboard"==this.$route.path&&this.$router.replace({path:this.getPath(this.firstItem.path)})},getPath(t,e=!1){if(t.startsWith("/"))return t;return`${e?this.getPath(e.path):this.$route.matched[0].path}/${t}`}}}),c=(a(714),a(531)),u=Object(c.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-nav-pad"},[a("div",{staticClass:"nav-list"},t._l(t.menus,(function(e,s){return a("div",{key:s,staticClass:"nav-scope",class:s},[a("div",{staticClass:"scope-title"},[t._v(t._s(t.toLabel(s)))]),t._v(" "),t._l(e,(function(e,s){return a("div",{key:s,staticClass:"nav-set",class:e.title?"has-title":""},[e.title?a("div",{staticClass:"group-title"},[t._v(t._s(e.title))]):t._e(),t._v(" "),a("div",{staticClass:"nav-group",class:t.activeGroup==e.group?"active":""},[a("div",{staticClass:"primary-item-icon"},[a("img",{attrs:{src:e.icon||t.defaultIcon,alt:e.name+" Icon"}})]),t._v(" "),a("factor-link",{staticClass:"primary-item",class:e.class,attrs:{path:t.getPath(e.path,!1,"top"),query:e.query,action:e.action,"data-test":"app-nav-"+t.slugify(e.name)}},[a("span",{directives:[{name:"formatted-text",rawName:"v-formatted-text",value:e.name,expression:"primary.name"}]})]),t._v(" "),t.activeGroup==e.group?a("div",{staticClass:"sub-menu"},[t._l(e.items,(function(s,i){return[s.name?a("factor-link",{key:i,staticClass:"sub-item",attrs:{path:t.getPath(s.path,e,"sub"),query:s.query,action:s.action,"data-test":"app-subnav-"+t.slugify(s.name)}},[a("span",{directives:[{name:"formatted-text",rawName:"v-formatted-text",value:s.name,expression:"item.name"}]})]):t._e()]}))],2):t._e()],1)])}))],2)})),0)])}),[],!1,null,null,null);e.default=u.exports}}]);