!function(e,t,n){'use strict';functiona(e,n,a,o,i,r){functionl(e,n){returnangular.element((n||t).querySelectorAll(e))}functions(e){returnu[e]?u[e]:u[e]=n.get(e,{cache:r}).then(function(e){returne.data})}this.compile=function(t){t.template&&/\.html$/.test(t.template)&&(console.warn('Deprecated use of `template` option to pass a file. Please use the `templateUrl` option instead.'),t.templateUrl=t.template,t.template='');varn=t.templateUrl,r=t.template||'',u=t.controller,c=t.controllerAs,d=t.resolve||{},f=t.locals||{},p=t.transformTemplate||angular.identity,g=t.bindToController;if(angular.forEach(d,function(e,t){angular.isString(e)?d[t]=a.get(e):d[t]=a.invoke(e)}),angular.extend(d,f),r)d.$template=e.when(r);else{if(!n)thrownewError('Missing `template` / `templateUrl` option.');d.$template=s(n)}returnt.titleTemplate&&(d.$template=e.all([d.$template,s(t.titleTemplate)]).then(function(e){vart=angular.element(e[0]);returnl('[ng-bind="title"]',t[0]).removeAttr('ng-bind').html(e[1]),t[0].outerHTML})),t.contentTemplate&&(d.$template=e.all([d.$template,s(t.contentTemplate)]).then(function(e){varn=angular.element(e[0]),a=l('[ng-bind="content"]',n[0]).removeAttr('ng-bind').html(e[1]);returnt.templateUrl||a.next().remove(),n[0].outerHTML})),e.all(d).then(function(e){varn=p(e.$template);t.html&&(n=n.replace(/ng-bind="/gi,'ng-bind-html="'));vara=angular.element('<div>').html(n.trim()).contents(),r=o(a);return{locals:e,element:a,link:function(t){if(e.$scope=t,u){varn=i(u,e,!0);g&&angular.extend(n.instance,e);varo=angular.isObject(n)?n:n();a.data('$ngControllerController',o),a.children().data('$ngControllerController',o),c&&(t[c]=o)}returnr.apply(null,arguments)}}})};varu={}}a.$inject=['$q','$http','$injector','$compile','$controller','$templateCache'],angular.module('mgcrea.ngStrap.typeahead',['mgcrea.ngStrap.tooltip','mgcrea.ngStrap.helpers.parseOptions']).provider('$typeahead',function(){vare=this.defaults={animation:'am-fade',prefixClass:'typeahead',prefixEvent:'$typeahead',placement:'bottom-left',templateUrl:'typeahead/typeahead.tpl.html',trigger:'focus',container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:'bsAsyncFilter',limit:6,autoSelect:!1,comparator:'',trimValue:!0};this.$get=['$window','$rootScope','$tooltip','$$rAF','$timeout',function(t,n,a,o,i){functionr(t,n,r){vars={},u=angular.extend({},e,r);s=a(t,u);varc=r.scope,d=s.$scope;d.$resetMatches=function(){d.$matches=[],d.$activeIndex=u.autoSelect?0:-1},d.$resetMatches(),d.$activate=function(e){d.$$postDigest(function(){s.activate(e)})},d.$select=function(e,t){d.$$postDigest(function(){s.select(e)})},d.$isVisible=function(){returns.$isVisible()},s.update=function(e){d.$matches=e,d.$activeIndex>=e.length&&(d.$activeIndex=u.autoSelect?0:-1),l(d),o(s.$applyPlacement)},s.activate=function(e){d.$activeIndex=e},s.select=function(e){if(e!==-1){vart=d.$matches[e].value;n.$setViewValue(t),n.$render(),d.$resetMatches(),c&&c.$digest(),d.$emit(u.prefixEvent+'.select',t,e,s),angular.isDefined(u.onSelect)&&angular.isFunction(u.onSelect)&&u.onSelect(t,e,s)}},s.$isVisible=function(){returnu.minLength&&n?d.$matches.length&&angular.isString(n.$viewValue)&&n.$viewValue.length>=u.minLength:!!d.$matches.length},s.$getIndex=function(e){vart;for(t=d.$matches.length;t--&&!angular.equals(d.$matches[t].value,e););returnt},s.$onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},s.$$updateScrollTop=function(e,t){if(t>-1&&t<e.children.length){varn=e.children[t],a=n.offsetTop,o=n.offsetTop+n.clientHeight,i=e.scrollTop,r=e.scrollTop+e.clientHeight;o>=i&&a<i?e.scrollTop=Math.max(0,e.scrollTop-e.clientHeight):o>r&&(e.scrollTop=a)}},s.$onKeyDown=function(e){/(38|40|13)/.test(e.keyCode)&&(!s.$isVisible()||13===e.keyCode&&d.$activeIndex===-1||(e.preventDefault(),e.stopPropagation()),13===e.keyCode&&d.$matches.length?s.select(d.$activeIndex):38===e.keyCode&&d.$activeIndex>0?d.$activeIndex--:40===e.keyCode&&d.$activeIndex<d.$matches.length-1?d.$activeIndex++:angular.isUndefined(d.$activeIndex)&&(d.$activeIndex=0),s.$$updateScrollTop(s.$element[0],d.$activeIndex),d.$di