(function(b,a,d){var c={};c.dropdownToggle=["$document","$location","$window",function(h,i,g){var e=null,f;return{restrict:"C",link:function(l,k,j){l.$watch(function(){return i.path()},function(){f&&f()});k.parent().bind("click",function(m){f&&f()});k.bind("click",function(m){m.preventDefault();m.stopPropagation();var n=false;if(e){n=e===k;f()}if(!n){k.parent().addClass("open");e=k;f=function(o){o&&o.preventDefault();o&&o.stopPropagation();h.unbind("click",f);k.parent().removeClass("open");f=null;e=null};h.bind("click",f)}})}}}];c.tabbable=function(){return{restrict:"C",compile:function(f){var e=a.element(''),g=a.element('
');g.append(f.contents());f.append(e).append(g)},controller:["$scope","$element",function(h,f){var e=f.contents().eq(0),j=f.controller("ngModel")||{},i=[],g;j.$render=function(){var k=this.$viewValue;if(g?(g.value!=k):k){if(g){g.paneElement.removeClass("active");g.tabElement.removeClass("active");g=null}if(k){for(var l=0,m=i.length;l"),m=k.find("a"),o={paneElement:n,paneAttrs:l,tabElement:k};i.push(o);l.$observe("value",p)();l.$observe("title",function(){p();m.text(o.title)})();function p(){o.title=l.title;o.value=l.value||l.title;if(!j.$setViewValue&&(!j.$viewValue||o==g)){j.$viewValue=o.value}j.$render()}e.append(k);k.bind("click",function(q){q.preventDefault();q.stopPropagation();if(j.$setViewValue){h.$apply(function(){j.$setViewValue(o.value);j.$render()})}else{j.$viewValue=o.value;j.$render()}});return function(){o.tabElement.remove();for(var q=0,r=i.length;q