/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.2-master-a9ba340
*/
!function(t,e,n){"use strict";function r(t,n){return{restrict:"E",transclude:!0,controller:a,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'
',link:function(r,a,o,i){n(a),i.navBarAriaLabel||t.expectAsync(a,"aria-label",e.noop)}}}function a(t,e,n,r){this._$timeout=n,this._$scope=e,this._$mdConstant=r,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=t[0],this._inkbar;var a=this,o=this._$scope.$watch(function(){return a._navBarEl.querySelectorAll("._md-nav-button").length},function(t){t>0&&(a._initTabs(),o())})}function o(t,n){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:i,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:function(t,e){var n,r,a,o=e.mdNavClick,i=e.mdNavHref,s=e.mdNavSref,c=e.srefOpts;if((o?1:0)+(i?1:0)+(s?1:0)>1)throw Error("Must not specify more than one of the md-nav-click, md-nav-href, or md-nav-sref attributes per nav-item directive.");return o?n='ng-click="ctrl.mdNavClick()"':i?n='ng-href="{{ctrl.mdNavHref}}"':s&&(n='ui-sref="{{ctrl.mdNavSref}}"'),r=c?'ui-sref-opts="{{ctrl.srefOpts}}" ':"",n&&(a=''),''+(a||"")+""},scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",srefOpts:"=?",name:"@"},link:function(r,a,o,i){n(function(){var n=i[0],o=i[1],s=e.element(a[0].querySelector("._md-nav-button"));n.name||(n.name=e.element(a[0].querySelector("._md-nav-button-text")).text().trim()),s.on("click",function(){o.mdSelectedNavItem=n.name,r.$apply()}),t.expectWithText(a,"aria-label")})}}}function i(t){this._$element=t,this.mdNavClick,this.mdNavHref,this.mdNavSref,this.srefOpts,this.name,this._selected=!1,this._focused=!1}a.$inject=["$element","$scope","$timeout","$mdConstant"],o.$inject=["$mdAria","$$rAF"],i.$inject=["$element"],r.$inject=["$mdAria","$mdTheming"],e.module("material.components.navBar",["material.core"]).controller("MdNavBarController",a).directive("mdNavBar",r).controller("MdNavItemController",i).directive("mdNavItem",o),a.prototype._initTabs=function(){this._inkbar=e.element(this._navBarEl.querySelector("md-nav-ink-bar"));var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,n)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})},a.prototype._updateTabs=function(t,e){var n=this,r=this._getTabs();if(r){var a=-1,o=-1,i=this._getTabByName(t),s=this._getTabByName(e);s&&(s.setSelected(!1),a=r.indexOf(s)),i&&(i.setSelected(!0),o=r.indexOf(i)),this._$timeout(function(){n._updateInkBarStyles(i,o,a)})}},a.prototype._updateInkBarStyles=function(t,e,n){if(this._inkbar.toggleClass("_md-left",en),this._inkbar.css({display:e<0?"none":""}),t){var r=t.getButtonEl(),a=r.offsetLeft;this._inkbar.css({left:a+"px",width:r.offsetWidth+"px"})}},a.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(t){return e.element(t).controller("mdNavItem")});return t.indexOf(n)?t:null},a.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},a.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})},a.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})},a.prototype._findTab=function(t){for(var e=this._getTabs(),n=0;n0&&this._moveFocus(r,n[a-1]);break;case e.DOWN_ARROW:case e.RIGHT_ARROW:a