{:uriI"file:///Users/tvd/.rvm/gems/ruby-2.3.0@alchemy/bundler/gems/alchemy_cms-a14553bcc153/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee?type=application/javascript&pipeline=self&id=7da4864482e5a57920bd1ccf41b222f3250eb2ed8b3da50ea27e06a3760e946f:ET:load_pathI"i/Users/tvd/.rvm/gems/ruby-2.3.0@alchemy/bundler/gems/alchemy_cms-a14553bcc153/app/assets/javascripts;T: filenameI"/Users/tvd/.rvm/gems/ruby-2.3.0@alchemy/bundler/gems/alchemy_cms-a14553bcc153/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;T: nameI"!alchemy/alchemy.autocomplete;T:logical_pathI")alchemy/alchemy.autocomplete.self.js;T:content_typeI"application/javascript;T: sourceI"O(function() { if (typeof window.Alchemy === 'undefined') { window.Alchemy = {}; } Alchemy.Autocomplete = { tags: function(scope) { var field, url; field = $('[data-autocomplete]', scope); url = field.data('autocomplete'); return field.select2({ tags: true, tokenSeparators: [","], minimumInputLength: 1, openOnEnter: false, createSearchChoice: this._createResultItem, ajax: { url: url, dataType: 'json', data: function(term, page) { return { term: term }; }, results: function(data, page) { return { results: data }; } }, initSelection: this._initializeSelection }); }, _createResultItem: function(term, data) { if ($(data).filter(function() { return this.text.localeCompare(term) === 0; }).length === 0) { return { id: term, text: term }; } }, _initializeSelection: function(element, callback) { var data; data = []; $(element.val().split(",")).each(function() { return data.push({ id: $.trim(this), text: this }); }); return callback(data); } }; }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"file-digest:///Users/tvd/.rvm/gems/ruby-2.3.0@alchemy/bundler/gems/alchemy_cms-a14553bcc153/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%Q:]̲X콦͎C4ğU^: lengthiO:dependencies_digest"%\)ێaH20I)*\ZL:idI"E7da4864482e5a57920bd1ccf41b222f3250eb2ed8b3da50ea27e06a3760e946f;F: mtimel+V