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AAS,UAAgB,SAAS,KAAM,aAAY,gBAAA,SAAA,EAAA,EAAA,EAAA,EAAA,oCAKnD,+CAKL,GAAI,IAAQ,MAAQ,EACpB,SAAI,SAAa,YAAQ,YAAc,QAAS,UAAA,WAAA,OAAA,YAAA,WAAA,SAAA,QAAA,YAAA,eAAA,aAAA,aAAA,MAAA,SAAA,yCAKhD,IAAG,GAAO,EAAA,QAAa,EAAgB,OACnC,EAAA,EAAgB,OAAA,EAAc,mCAG9B,EAAY,EAAA,sDAGb,IAAA,GAAQ,cAAc,8BAOnB,aAAW,IAEZ,GAAA,EAAA,OAAA,GAAA,QAAA,OAAA,IAAA,QAAA,UAAA,IAAA,8DAIC,EAAO,OAAK,mBAGhB,KAIE,OAAG,EAAQ,QAAA,SAAe,KAExB,YAAA,uBAEC,SAAO,0CAKT,WADD,GAAU,cAAgB,EAAU,WAAU,UAAU,EAAA,EAAA,WAAA,OAAA,GAGxD,GAAA,OAAW,IAAA,EAAA,EAAA,MAAA,EAAA,0EAKf,GAAW,EAAiB,OAAA,GAE1B,EAAI,eAKN,EAAW,YAAU,KAAA,SAAY,GAE/B,GAAG,GAAW,EAAS,aAAW,EAClC,OAAsB,UAAlB,EAA4B,GAAA,qEAOlC,IAAM,GAAI,EAAY,UAAW,EAAA,aAC3B,EAAW,QAAA,UAAU,GAAA,EAAA,OAAA,SAAA,GAAA,MAAA,EAAA,UACzB,GAAU,QAAA,SAAA,GAAA,EAAA,aAAA,GAAA,EACV,EAAA,IAAY,EAAA,EAAA,WAAA,QAAA,iBAAA,IAAA,OAAA,gDAMjB,EAAA”,“file”:“typeahead.min.js”,“sourcesContent”:[“‘use strict’;nnangular.module(‘mgcrea.ngStrap.typeahead’, [‘mgcrea.ngStrap.tooltip’, ‘mgcrea.ngStrap.helpers.parseOptions’])nn .provider(‘$typeahead’, function() {nn var defaults = this.defaults = {n animation: ‘am-fade’,n prefixClass: ‘typeahead’,n prefixEvent: ‘$typeahead’,n placement: ‘bottom-left’,n template: ‘typeahead/typeahead.tpl.html’,n trigger: ‘focus’,n container: false,n keyboard: true,n html: false,n delay: 0,n minLength: 1,n filter: ‘filter’,n limit: 6,n comparator: ”n };nn this.$get = function($window, $rootScope, $tooltip, $timeout) {nn var bodyEl = angular.element($window.document.body);nn function TypeaheadFactory(element, controller, config) {nn var $typeahead = {};nn // Common varsn var options = angular.extend({}, defaults, config);nn $typeahead = $tooltip(element, options);n var parentScope = config.scope;n var scope = $typeahead.$scope;nn scope.$resetMatches = function(){n scope.$matches = [];n scope.$activeIndex = 0;n };n scope.$resetMatches();nn scope.$activate = function(index) {n scope.$$postDigest(function() {n $typeahead.activate(index);n });n };nn scope.$select = function(index, evt) {n scope.$$postDigest(function() {n $typeahead.select(index);n });n };nn scope.$isVisible = function() {n return $typeahead.$isVisible();n };nn // Public methodsnn $typeahead.update = function(matches) {n scope.$matches = matches;n if(scope.$activeIndex >= matches.length) {n scope.$activeIndex = 0;n }n };nn $typeahead.activate = function(index) {n scope.$activeIndex = index;n };nn $typeahead.select = function(index) {n var value = scope.$matches.value;n // console.log(‘$setViewValue’, value);n controller.$setViewValue(value);n controller.$render();n scope.$resetMatches();n if(parentScope) parentScope.$digest();n // Emit eventn scope.$emit(options.prefixEvent + ‘.select’, value, index, $typeahead);n };nn // Protected methodsnn $typeahead.$isVisible = function() {n if(!options.minLength || !controller) {n return !!scope.$matches.length;n }n // minLength supportn return scope.$matches.length && angular.isString(controller.$viewValue) && controller.$viewValue.length >= options.minLength;n };nn $typeahead.$getIndex = function(value) {n var l = scope.$matches.length, i = l;n if(!l) return;n for(i = l; i–;) {n if(scope.$matches.value === value) break;n }n if(i < 0) return;n return i;n };nn $typeahead.$onMouseDown = function(evt) {n // Prevent blur on mousedownn evt.preventDefault();n evt.stopPropagation();n };nn $typeahead.$onKeyDown = function(evt) {n if(!/(38|40|13)/.test(evt.keyCode)) return;nn // Let ngSubmit pass if the typeahead tip is hiddenn if($typeahead.$isVisible()) {n evt.preventDefault();n evt.stopPropagation();n }nn // Select with entern if(evt.keyCode === 13 && scope.$matches.length) {n $typeahead.select(scope.$activeIndex);n }nn // Navigate with keyboardn else if(evt.keyCode === 38 && scope.$activeIndex > 0) scope.$activeIndex–;n else if(evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1) scope.$activeIndex++;n else if(angular.isUndefined(scope.$activeIndex)) scope.$activeIndex = 0;n scope.$digest();n };nn // Overridesnn var show = $typeahead.show;n $typeahead.show = function() {n show();n // use timeout to hookup the events to preventn // event bubbling from being processed imediately.n $timeout(function() {n $typeahead.$element.on(‘mousedown’, $typeahead.$onMouseDown);n if(options.keyboard) {n element.on(‘keydown’, $typeahead.$onKeyDown);n }n }, 0, false);n };nn var hide = $typeahead.hide;n $typeahead.hide = function() {n $typeahead.$element.off(‘mousedown’, $typeahead.$onMouseDown);n if(options.keyboard) {n element.off(‘keydown’, $typeahead.$onKeyDown);n }n hide();n };nn return $typeahead;nn }nn TypeaheadFactory.defaults = defaults;n return TypeaheadFactory;nn };nn })nn .directive(‘bsTypeahead’, function($window, $parse, $q, $typeahead, $parseOptions) {nn var defaults = $typeahead.defaults;nn return {n restrict: ‘EAC’,n require: ‘ngModel’,n link: function postLink(scope, element, attr, controller) {nn // Directive optionsn var options = {scope: scope};n angular.forEach([‘placement’, ‘container’, ‘delay’, ‘trigger’, ‘keyboard’, ‘html’, ‘animation’, ‘template’, ‘filter’, ‘limit’, ‘minLength’, ‘watchOptions’, ‘selectMode’, ‘comparator’, ‘id’], function(key) {n if(angular.isDefined(attr)) options = attr;n });nn // Build proper ngOptionsn var filter = options.filter || defaults.filter;n var limit = options.limit || defaults.limit;n var comparator = options.comparator || defaults.comparator;nn var ngOptions = attr.ngOptions;n if(filter) ngOptions += ‘ | ’ + filter + ‘:$viewValue’;n if (comparator) ngOptions += ‘:’ + comparator;n if(limit) ngOptions += ‘ | limitTo:’ + limit;n var parsedOptions = $parseOptions(ngOptions);nn // Initialize typeaheadn var typeahead = $typeahead(element, controller, options);nn // Watch options on demandn if(options.watchOptions) {n // Watch ngOptions values before filtering for changes, drop function callsn var watchedOptions = parsedOptions.$match.replace(/\|.+/, ”).replace(/\(.*\)/g, ”).trim();n scope.$watch(watchedOptions, function (newValue, oldValue) {n // console.warn(‘scope.$watch(%s)’, watchedOptions, newValue, oldValue);n parsedOptions.valuesFn(scope, controller).then(function (values) {n typeahead.update(values);n controller.$render();n });n }, true);n }nn // Watch model for changesn scope.$watch(attr.ngModel, function(newValue, oldValue) {n // console.warn(‘$watch’, element.attr(‘ng-model’), newValue);n scope.$modelValue = newValue; // Publish modelValue on scope for custom templatesn parsedOptions.valuesFn(scope, controller)n .then(function(values) {n // Prevent input with no future prospect if selectMode is truthyn // @TODO test selectModen if(options.selectMode && !values.length && newValue.length > 0) {n controller.$setViewValue(controller.$viewValue.substring(0, controller.$viewValue.length - 1));n return;n }n if(values.length > limit) values = values.slice(0, limit);n var isVisible = typeahead.$isVisible();n isVisible && typeahead.update(values);n // Do not re-queue an update if a correct value has been selectedn if(values.length === 1 && values.value === newValue) return;n !isVisible && typeahead.update(values);n // Queue a new rendering that will leverage collection loadingn controller.$render();n });n });nn // modelValue -> $formatters -> viewValuen controller.$formatters.push(function(modelValue) {n // console.warn(‘$formatter("%s"): modelValue=%o (%o)’, element.attr(‘ng-model’), modelValue, typeof modelValue);n var displayValue = parsedOptions.displayValue(modelValue);n return displayValue === undefined ? ” : displayValue;n });nn // Model rendering in viewn controller.$render = function () {n // console.warn(‘$render’, element.attr(‘ng-model’), ‘controller.$modelValue’, typeof controller.$modelValue, controller.$modelValue, ‘controller.$viewValue’, typeof controller.$viewValue, controller.$viewValue);n if(controller.$isEmpty(controller.$viewValue)) return element.val(”);n var index = typeahead.$getIndex(controller.$modelValue);n var selected = angular.isDefined(index) ? typeahead.$scope.$matches.label : controller.$viewValue;n selected = angular.isObject(selected) ? parsedOptions.displayValue(selected) : selected;n element.val(selected ? selected.toString().replace(/<(?:.|\n)*?>/gm, ”).trim() : ”);n };nn // Garbage collectionn scope.$on(‘$destroy’, function() {n if (typeahead) typeahead.destroy();n options = null;n typeahead = null;n });nn }n };nn });n”],“sourceRoot”:“/source/”}