text: !function(a,b){"use strict";function c(a,b){if(!a.hasChildren())return angular.isDefined(a.state)&&b.includes(a.state);for(var d=a.children(),e=0;e<d.length;e++){if(angular.isDefined(d[e].state)&&b.includes(d[e].state))return!0;if(c(d[e],b))return!0}return!1}b["eeh-navigation"]=a,angular.module("eehNavigation",["pascalprecht.translate"]);var d=function(a){return{restrict:"A",scope:{menuItem:"=eehNavigationActiveMenuItem"},link:function(b,d){var e=function(){var e=c(b.menuItem,a);d.toggleClass("active",e)};b.$on("$stateChangeSuccess",e),e()}}};d.$inject=["$state"],angular.module("eehNavigation").directive("eehNavigationActiveMenuItem",d);var e=function(a){this.weight=0,angular.extend(this,a)};e.prototype.children=function(){var a=[];return angular.forEach(this,function(b){angular.isObject(b)&&b instanceof e&&a.push(b)}),a},e.prototype.hasChildren=function(){return this.children().length>0},e.prototype._isVisible=function(){var a=this.children().filter(function(a){return a._isVisible()!==!1}).length>0;return!a&&angular.isUndefined(this.state)&&angular.isUndefined(this.href)&&angular.isUndefined(this.click)&&!this.isDivider?!1:angular.isFunction(this.isVisible)?this.isVisible():angular.isDefined(this.isVisible)?this.isVisible:!0},e.prototype.isVisible=function(){return!0},e.prototype.isHeavy=function(){return this.hasOwnProperty("weight")?this.weight>=0:void 0};var f=function(){this._iconBaseClass="glyphicon",this._menuItems={},this._toArray=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b}};f.prototype.$get=function(){return this},f.prototype.iconBaseClass=function(a){return angular.isUndefined(a)?this._iconBaseClass:(this._iconBaseClass=a,this)},f.prototype.buildAncestorChain=function(a,b,c){var d=a.split(".");if(0!==a.length&&0!==d.length){var e=d.shift();angular.isUndefined(b[e])&&(b[e]=0===d.length?c:{},0===d.length&&(b[e]=c)),this.buildAncestorChain(d.join("."),b[e],c)}},f.prototype.menuItemTree=function(a){var b={},c=this,d={};if(angular.isDefined(a)){var e=new RegExp("^"+a+".");angular.forEach(this._menuItems,function(a,b){null!==b.match(e)&&(d[b.replace(e,"")]=a)})}else d=this._menuItems;return angular.forEach(d,function(a,d){c.buildAncestorChain(d,b,a)}),this._toArray(b)},f.prototype.menuItem=function(a,b){if(angular.isUndefined(b)){if(angular.isUndefined(this._menuItems[a]))throw a+" is not a menu item";return this._menuItems[a]}return this._menuItems[a]=new e(b),this},f.prototype.menuItems=function(){return this._menuItems},angular.module("eehNavigation").provider("eehNavigation",f);var g=function(a){return{restrict:"A",scope:{menuItem:"=eehNavigationMenuItemContent"},templateUrl:"template/eeh-navigation/menu-item-content/eeh-navigation-menu-item-content.html",link:function(b){b.iconBaseClass=function(){return a.iconBaseClass()}}}};g.$inject=["eehNavigation"],angular.module("eehNavigation").directive("eehNavigationMenuItemContent",g);var h=function(a){return{restrict:"AE",templateUrl:"template/eeh-navigation/menu/eeh-navigation-menu.html",scope:{menuName:"=",navClass:"=?"},link:function(b){b.navClass=b.navClass||"navigation-menu",b.iconBaseClass=function(){return a.iconBaseClass()},b.$watch(a.menuItems,function(){angular.isUndefined(b.menuName)||(b.menuItems=a.menuItemTree(b.menuName))},!0)}}};h.$inject=["eehNavigation"],angular.module("eehNavigation").directive("eehNavigationMenu",h);var i=function(){return{restrict:"AE",templateUrl:"template/eeh-navigation/navbar/eeh-navigation-navbar-brand.html",scope:{text:"=",state:"=",href:"=",target:"=",src:"=",click:"="}}};angular.module("eehNavigation").directive("eehNavigationNavbarBrand",i);var j=function(a,b){return{restrict:"AE",templateUrl:"template/eeh-navigation/navbar/eeh-navigation-navbar.html",scope:{menuName:"=",navClass:"=?",brandText:"=",brandState:"=",brandHref:"=",brandTarget:"=",brandSrc:"=",brandClick:"="},link:function(c){c.iconBaseClass=function(){return b.iconBaseClass()},c.navClass=c.navClass||"navbar-default navbar-static-top",c.isNavbarCollapsed=!1,c.$watch(b.menuItems,function(){if(!angular.isUndefined(c.menuName)){var a=b.menuItemTree(c.menuName);c.leftNavbarMenuItems=a.filter(function(a){return!a.isHeavy()}),c.rightNavbarMenuItems=a.filter(function(a){return a.isHeavy()})}},!0);var d=angular.element(a);d.bind("resize",function(){c.$apply()});var e=function(){return{height:d.height(),width:d.width(),innerHeight:d.innerHeight(),innerWidth:d.innerWidth()}};c.$watch(e,function(b){if(!angular.isUndefined(b)){var d=b.innerWidth>0?b.innerWidth:a.screen.width;d>=768&&(c.isNavbarCollapsed=!1)}},!0)}}};angular.module("eehNavigation").directive("eehNavigationNavbar",["$window","eehNavigation",j]);var k=function(a,b){return{restrict:"AE",transclude:!0,templateUrl:"template/eeh-navigation/search-input/eeh-navigation-search-input.html",scope:{iconClass:"=",submit:"=",classes:"=",isCollapsed:"="},link:function(a){a.model={query:""},a.iconBaseClass=function(){return b.iconBaseClass()}}}};k.$inject=["$window","eehNavigation"],angular.module("eehNavigation").directive("eehNavigationSearchInput",k);var l=function(a,b,c){return{restrict:"AE",transclude:!0,templateUrl:"template/eeh-navigation/sidebar/eeh-navigation-sidebar.html",scope:{menuName:"=",navClass:"=?",topOffset:"=?",menuItemCollapsedIconClass:"=?",menuItemExpandedIconClass:"=?",sidebarCollapsedIconClass:"=?",sidebarExpandedIconClass:"=?",searchInputIconClass:"=?",searchInputIsVisible:"=?",searchInputSubmit:"=",sidebarCollapsedButtonIsVisible:"=?",sidebarIsCollapsed:"=?"},link:function(a,d){function e(){var b="ul.sidebar-nav:not(.sidebar-nav-nested) > li > a > ",c=b+"span > .menu-item-text",e=b+".sidebar-arrow",f=d.find(c+","+e),g=d.find(".eeh-navigation-sidebar");a.sidebarIsCollapsed?(i.addClass("sidebar-text-collapsed"),g.addClass("sidebar-text-collapsed"),f.addClass("hidden"),a.sidebarMenuItems.forEach(function(a){a.isCollapsed=!0})):(i.removeClass("sidebar-text-collapsed"),g.removeClass("sidebar-text-collapsed"),f.removeClass("hidden"))}a.topOffset=a.topOffset||51,a.navClass=a.navClass||"navbar-default",a.menuItemCollapsedIconClass=a.menuItemCollapsedIconClass||"glyphicon-chevron-left",a.menuItemExpandedIconClass=a.menuItemExpandedIconClass||"glyphicon-chevron-down",a.sidebarCollapsedIconClass=a.sidebarCollapsedIconClass||"glyphicon-arrow-right",a.sidebarExpandedIconClass=a.sidebarExpandedIconClass||"glyphicon-arrow-left",a.searchInputIconClass=a.searchInputIconClass||"glyphicon-search",a.sidebarCollapsedButtonIsVisible!==!1&&(a.sidebarCollapsedButtonIsVisible=!0),a.sidebarIsCollapsed=a.sidebarIsCollapsed||!1,a.searchInputIsVisible!==!1&&(a.searchInputIsVisible=!0),a.iconBaseClass=function(){return c.iconBaseClass()};var f=function(){return c.menuItems()};a.$watch(f,function(){angular.isUndefined(a.menuName)||(a.sidebarMenuItems=c.menuItemTree(a.menuName))},!0);var g=angular.element(b);g.bind("resize",function(){a.$apply()});var h=function(){return{height:g.height(),width:g.width(),innerHeight:g.innerHeight(),innerWidth:g.innerWidth()}},i=d.find("#eeh-navigation-page-wrapper");a.$watch(h,function(c){if(!angular.isUndefined(c)){var d=c.innerHeight>0?c.innerHeight:b.screen.height;d-=a.topOffset,1>d&&(d=1),d>a.topOffset&&i.css("min-height",d+"px")}},!0),a.toggleSidebarTextCollapse=function(){a.sidebarIsCollapsed=!a.sidebarIsCollapsed,e()},a.$on("$includeContentLoaded",function(){e()}),a.isSidebarVisible=function(){return a.searchInputIsVisible||angular.isArray(a.sidebarMenuItems)&&a.sidebarMenuItems.filter(function(a){return a._isVisible()}).length>0},a.topLevelMenuItemClickHandler=function(b){a.sidebarIsCollapsed&&b.hasChildren()&&a.sidebarMenuItems.filter(function(a){return a.hasChildren()&&b!==a}).forEach(function(a){a.isCollapsed=!0})}}}};l.$inject=["$document","$window","eehNavigation"],angular.module("eehNavigation").directive("eehNavigationSidebar",l)}({},function(){return this}());
  //# sourceMappingURL=eeh-navigation.min.js.map