{ "version": 3, "sources": ["../../javascript/vendor/autocomplete.jquery.js"], "sourcesContent": ["/*!\n * autocomplete.js 0.35.0\n * https://github.com/algolia/autocomplete.js\n * Copyright 2018 Algolia, Inc. and other contributors; Licensed MIT\n */\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tmodule.exports = __webpack_require__(1);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\t// setup DOM element\n\tvar DOM = __webpack_require__(2);\n\tvar $ = __webpack_require__(3);\n\tDOM.element = $;\n\n\t// setup utils functions\n\tvar _ = __webpack_require__(4);\n\t_.isArray = $.isArray;\n\t_.isFunction = $.isFunction;\n\t_.isObject = $.isPlainObject;\n\t_.bind = $.proxy;\n\t_.each = function(collection, cb) {\n\t // stupid argument order for jQuery.each\n\t $.each(collection, reverseArgs);\n\t function reverseArgs(index, value) {\n\t return cb(value, index);\n\t }\n\t};\n\t_.map = $.map;\n\t_.mixin = $.extend;\n\t_.Event = $.Event;\n\n\tvar Typeahead = __webpack_require__(5);\n\tvar EventBus = __webpack_require__(6);\n\n\tvar old;\n\tvar typeaheadKey;\n\tvar methods;\n\n\told = $.fn.autocomplete;\n\n\ttypeaheadKey = 'aaAutocomplete';\n\n\tmethods = {\n\t // supported signatures:\n\t // function(o, dataset, dataset, ...)\n\t // function(o, [dataset, dataset, ...])\n\t initialize: function initialize(o, datasets) {\n\t datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);\n\n\t o = o || {};\n\n\t return this.each(attach);\n\n\t function attach() {\n\t var $input = $(this);\n\t var eventBus = new EventBus({el: $input});\n\t var typeahead;\n\n\t typeahead = new Typeahead({\n\t input: $input,\n\t eventBus: eventBus,\n\t dropdownMenuContainer: o.dropdownMenuContainer,\n\t hint: o.hint === undefined ? true : !!o.hint,\n\t minLength: o.minLength,\n\t autoselect: o.autoselect,\n\t autoselectOnBlur: o.autoselectOnBlur,\n\t tabAutocomplete: o.tabAutocomplete,\n\t openOnFocus: o.openOnFocus,\n\t templates: o.templates,\n\t debug: o.debug,\n\t clearOnSelected: o.clearOnSelected,\n\t cssClasses: o.cssClasses,\n\t datasets: datasets,\n\t keyboardShortcuts: o.keyboardShortcuts,\n\t appendTo: o.appendTo,\n\t autoWidth: o.autoWidth\n\t });\n\n\t $input.data(typeaheadKey, typeahead);\n\t }\n\t },\n\n\t open: function open() {\n\t return this.each(openTypeahead);\n\n\t function openTypeahead() {\n\t var $input = $(this);\n\t var typeahead;\n\n\t if (typeahead = $input.data(typeaheadKey)) {\n\t typeahead.open();\n\t }\n\t }\n\t },\n\n\t close: function close() {\n\t return this.each(closeTypeahead);\n\n\t function closeTypeahead() {\n\t var $input = $(this);\n\t var typeahead;\n\n\t if (typeahead = $input.data(typeaheadKey)) {\n\t typeahead.close();\n\t }\n\t }\n\t },\n\n\t val: function val(newVal) {\n\t // mirror jQuery#val functionality: read operate on first match,\n\t // write operates on all matches\n\t return !arguments.length ? getVal(this.first()) : this.each(setVal);\n\n\t function setVal() {\n\t var $input = $(this);\n\t var typeahead;\n\n\t if (typeahead = $input.data(typeaheadKey)) {\n\t typeahead.setVal(newVal);\n\t }\n\t }\n\n\t function getVal($input) {\n\t var typeahead;\n\t var query;\n\n\t if (typeahead = $input.data(typeaheadKey)) {\n\t query = typeahead.getVal();\n\t }\n\n\t return query;\n\t }\n\t },\n\n\t destroy: function destroy() {\n\t return this.each(unattach);\n\n\t function unattach() {\n\t var $input = $(this);\n\t var typeahead;\n\n\t if (typeahead = $input.data(typeaheadKey)) {\n\t typeahead.destroy();\n\t $input.removeData(typeaheadKey);\n\t }\n\t }\n\t }\n\t};\n\n\t$.fn.autocomplete = function(method) {\n\t var tts;\n\n\t // methods that should only act on intialized typeaheads\n\t if (methods[method] && method !== 'initialize') {\n\t // filter out non-typeahead inputs\n\t tts = this.filter(function() { return !!$(this).data(typeaheadKey); });\n\t return methods[method].apply(tts, [].slice.call(arguments, 1));\n\t }\n\t return methods.initialize.apply(this, arguments);\n\t};\n\n\t$.fn.autocomplete.noConflict = function noConflict() {\n\t $.fn.autocomplete = old;\n\t return this;\n\t};\n\n\t$.fn.autocomplete.sources = Typeahead.sources;\n\t$.fn.autocomplete.escapeHighlightedString = _.escapeHighlightedString;\n\n\tmodule.exports = $.fn.autocomplete;\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tmodule.exports = {\n\t element: null\n\t};\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = jQuery;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar DOM = __webpack_require__(2);\n\n\tfunction escapeRegExp(str) {\n\t return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n\t}\n\n\tmodule.exports = {\n\t // those methods are implemented differently\n\t // depending on which build it is, using\n\t // $... or angular... or Zepto... or require(...)\n\t isArray: null,\n\t isFunction: null,\n\t isObject: null,\n\t bind: null,\n\t each: null,\n\t map: null,\n\t mixin: null,\n\n\t isMsie: function(agentString) {\n\t if (agentString === undefined) { agentString = navigator.userAgent; }\n\t // from https://github.com/ded/bowser/blob/master/bowser.js\n\t if ((/(msie|trident)/i).test(agentString)) {\n\t var match = agentString.match(/(msie |rv:)(\\d+(.\\d+)?)/i);\n\t if (match) { return match[2]; }\n\t }\n\t return false;\n\t },\n\n\t // http://stackoverflow.com/a/6969486\n\t escapeRegExChars: function(str) {\n\t return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n\t },\n\n\t isNumber: function(obj) { return typeof obj === 'number'; },\n\n\t toStr: function toStr(s) {\n\t return s === undefined || s === null ? '' : s + '';\n\t },\n\n\t cloneDeep: function cloneDeep(obj) {\n\t var clone = this.mixin({}, obj);\n\t var self = this;\n\t this.each(clone, function(value, key) {\n\t if (value) {\n\t if (self.isArray(value)) {\n\t clone[key] = [].concat(value);\n\t } else if (self.isObject(value)) {\n\t clone[key] = self.cloneDeep(value);\n\t }\n\t }\n\t });\n\t return clone;\n\t },\n\n\t error: function(msg) {\n\t throw new Error(msg);\n\t },\n\n\t every: function(obj, test) {\n\t var result = true;\n\t if (!obj) {\n\t return result;\n\t }\n\t this.each(obj, function(val, key) {\n\t if (result) {\n\t result = test.call(null, val, key, obj) && result;\n\t }\n\t });\n\t return !!result;\n\t },\n\n\t any: function(obj, test) {\n\t var found = false;\n\t if (!obj) {\n\t return found;\n\t }\n\t this.each(obj, function(val, key) {\n\t if (test.call(null, val, key, obj)) {\n\t found = true;\n\t return false;\n\t }\n\t });\n\t return found;\n\t },\n\n\t getUniqueId: (function() {\n\t var counter = 0;\n\t return function() { return counter++; };\n\t })(),\n\n\t templatify: function templatify(obj) {\n\t if (this.isFunction(obj)) {\n\t return obj;\n\t }\n\t var $template = DOM.element(obj);\n\t if ($template.prop('tagName') === 'SCRIPT') {\n\t return function template() { return $template.text(); };\n\t }\n\t return function template() { return String(obj); };\n\t },\n\n\t defer: function(fn) { setTimeout(fn, 0); },\n\n\t noop: function() {},\n\n\t formatPrefix: function(prefix, noPrefix) {\n\t return noPrefix ? '' : prefix + '-';\n\t },\n\n\t className: function(prefix, clazz, skipDot) {\n\t return (skipDot ? '' : '.') + prefix + clazz;\n\t },\n\n\t escapeHighlightedString: function(str, highlightPreTag, highlightPostTag) {\n\t highlightPreTag = highlightPreTag || '';\n\t var pre = document.createElement('div');\n\t pre.appendChild(document.createTextNode(highlightPreTag));\n\n\t highlightPostTag = highlightPostTag || '';\n\t var post = document.createElement('div');\n\t post.appendChild(document.createTextNode(highlightPostTag));\n\n\t var div = document.createElement('div');\n\t div.appendChild(document.createTextNode(str));\n\t return div.innerHTML\n\t .replace(RegExp(escapeRegExp(pre.innerHTML), 'g'), highlightPreTag)\n\t .replace(RegExp(escapeRegExp(post.innerHTML), 'g'), highlightPostTag);\n\t }\n\t};\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar attrsKey = 'aaAttrs';\n\n\tvar _ = __webpack_require__(4);\n\tvar DOM = __webpack_require__(2);\n\tvar EventBus = __webpack_require__(6);\n\tvar Input = __webpack_require__(7);\n\tvar Dropdown = __webpack_require__(16);\n\tvar html = __webpack_require__(18);\n\tvar css = __webpack_require__(19);\n\n\t// constructor\n\t// -----------\n\n\t// THOUGHT: what if datasets could dynamically be added/removed?\n\tfunction Typeahead(o) {\n\t var $menu;\n\t var $hint;\n\n\t o = o || {};\n\n\t if (!o.input) {\n\t _.error('missing input');\n\t }\n\n\t this.isActivated = false;\n\t this.debug = !!o.debug;\n\t this.autoselect = !!o.autoselect;\n\t this.autoselectOnBlur = !!o.autoselectOnBlur;\n\t this.openOnFocus = !!o.openOnFocus;\n\t this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;\n\t this.autoWidth = (o.autoWidth === undefined) ? true : !!o.autoWidth;\n\t this.clearOnSelected = !!o.clearOnSelected;\n\t this.tabAutocomplete = (o.tabAutocomplete === undefined) ? true : !!o.tabAutocomplete;\n\n\t o.hint = !!o.hint;\n\n\t if (o.hint && o.appendTo) {\n\t throw new Error('[autocomplete.js] hint and appendTo options can\\'t be used at the same time');\n\t }\n\n\t this.css = o.css = _.mixin({}, css, o.appendTo ? css.appendTo : {});\n\t this.cssClasses = o.cssClasses = _.mixin({}, css.defaultClasses, o.cssClasses || {});\n\t this.cssClasses.prefix =\n\t o.cssClasses.formattedPrefix = _.formatPrefix(this.cssClasses.prefix, this.cssClasses.noPrefix);\n\t this.listboxId = o.listboxId = [this.cssClasses.root, 'listbox', _.getUniqueId()].join('-');\n\n\t var domElts = buildDom(o);\n\n\t this.$node = domElts.wrapper;\n\t var $input = this.$input = domElts.input;\n\t $menu = domElts.menu;\n\t $hint = domElts.hint;\n\n\t if (o.dropdownMenuContainer) {\n\t DOM.element(o.dropdownMenuContainer)\n\t .css('position', 'relative') // ensure the container has a relative position\n\t .append($menu.css('top', '0')); // override the top: 100%\n\t }\n\n\t // #705: if there's scrollable overflow, ie doesn't support\n\t // blur cancellations when the scrollbar is clicked\n\t //\n\t // #351: preventDefault won't cancel blurs in ie <= 8\n\t $input.on('blur.aa', function($e) {\n\t var active = document.activeElement;\n\t if (_.isMsie() && ($menu[0] === active || $menu[0].contains(active))) {\n\t $e.preventDefault();\n\t // stop immediate in order to prevent Input#_onBlur from\n\t // getting exectued\n\t $e.stopImmediatePropagation();\n\t _.defer(function() { $input.focus(); });\n\t }\n\t });\n\n\t // #351: prevents input blur due to clicks within dropdown menu\n\t $menu.on('mousedown.aa', function($e) { $e.preventDefault(); });\n\n\t this.eventBus = o.eventBus || new EventBus({el: $input});\n\n\t this.dropdown = new Typeahead.Dropdown({\n\t appendTo: o.appendTo,\n\t wrapper: this.$node,\n\t menu: $menu,\n\t datasets: o.datasets,\n\t templates: o.templates,\n\t cssClasses: o.cssClasses,\n\t minLength: this.minLength\n\t })\n\t .onSync('suggestionClicked', this._onSuggestionClicked, this)\n\t .onSync('cursorMoved', this._onCursorMoved, this)\n\t .onSync('cursorRemoved', this._onCursorRemoved, this)\n\t .onSync('opened', this._onOpened, this)\n\t .onSync('closed', this._onClosed, this)\n\t .onSync('shown', this._onShown, this)\n\t .onSync('empty', this._onEmpty, this)\n\t .onSync('redrawn', this._onRedrawn, this)\n\t .onAsync('datasetRendered', this._onDatasetRendered, this);\n\n\t this.input = new Typeahead.Input({input: $input, hint: $hint})\n\t .onSync('focused', this._onFocused, this)\n\t .onSync('blurred', this._onBlurred, this)\n\t .onSync('enterKeyed', this._onEnterKeyed, this)\n\t .onSync('tabKeyed', this._onTabKeyed, this)\n\t .onSync('escKeyed', this._onEscKeyed, this)\n\t .onSync('upKeyed', this._onUpKeyed, this)\n\t .onSync('downKeyed', this._onDownKeyed, this)\n\t .onSync('leftKeyed', this._onLeftKeyed, this)\n\t .onSync('rightKeyed', this._onRightKeyed, this)\n\t .onSync('queryChanged', this._onQueryChanged, this)\n\t .onSync('whitespaceChanged', this._onWhitespaceChanged, this);\n\n\t this._bindKeyboardShortcuts(o);\n\n\t this._setLanguageDirection();\n\t}\n\n\t// instance methods\n\t// ----------------\n\n\t_.mixin(Typeahead.prototype, {\n\t // ### private\n\n\t _bindKeyboardShortcuts: function(options) {\n\t if (!options.keyboardShortcuts) {\n\t return;\n\t }\n\t var $input = this.$input;\n\t var keyboardShortcuts = [];\n\t _.each(options.keyboardShortcuts, function(key) {\n\t if (typeof key === 'string') {\n\t key = key.toUpperCase().charCodeAt(0);\n\t }\n\t keyboardShortcuts.push(key);\n\t });\n\t DOM.element(document).keydown(function(event) {\n\t var elt = (event.target || event.srcElement);\n\t var tagName = elt.tagName;\n\t if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {\n\t // already in an input\n\t return;\n\t }\n\n\t var which = event.which || event.keyCode;\n\t if (keyboardShortcuts.indexOf(which) === -1) {\n\t // not the right shortcut\n\t return;\n\t }\n\n\t $input.focus();\n\t event.stopPropagation();\n\t event.preventDefault();\n\t });\n\t },\n\n\t _onSuggestionClicked: function onSuggestionClicked(type, $el) {\n\t var datum;\n\t var context = {selectionMethod: 'click'};\n\n\t if (datum = this.dropdown.getDatumForSuggestion($el)) {\n\t this._select(datum, context);\n\t }\n\t },\n\n\t _onCursorMoved: function onCursorMoved(event, updateInput) {\n\t var datum = this.dropdown.getDatumForCursor();\n\t var currentCursorId = this.dropdown.getCurrentCursor().attr('id');\n\t this.input.setActiveDescendant(currentCursorId);\n\n\t if (datum) {\n\t if (updateInput) {\n\t this.input.setInputValue(datum.value, true);\n\t }\n\n\t this.eventBus.trigger('cursorchanged', datum.raw, datum.datasetName);\n\t }\n\t },\n\n\t _onCursorRemoved: function onCursorRemoved() {\n\t this.input.resetInputValue();\n\t this._updateHint();\n\t this.eventBus.trigger('cursorremoved');\n\t },\n\n\t _onDatasetRendered: function onDatasetRendered() {\n\t this._updateHint();\n\n\t this.eventBus.trigger('updated');\n\t },\n\n\t _onOpened: function onOpened() {\n\t this._updateHint();\n\t this.input.expand();\n\n\t this.eventBus.trigger('opened');\n\t },\n\n\t _onEmpty: function onEmpty() {\n\t this.eventBus.trigger('empty');\n\t },\n\n\t _onRedrawn: function onRedrawn() {\n\t this.$node.css('top', 0 + 'px');\n\t this.$node.css('left', 0 + 'px');\n\n\t var inputRect = this.$input[0].getBoundingClientRect();\n\n\t if (this.autoWidth) {\n\t this.$node.css('width', inputRect.width + 'px');\n\t }\n\n\t var wrapperRect = this.$node[0].getBoundingClientRect();\n\n\t var top = inputRect.bottom - wrapperRect.top;\n\t this.$node.css('top', top + 'px');\n\t var left = inputRect.left - wrapperRect.left;\n\t this.$node.css('left', left + 'px');\n\n\t this.eventBus.trigger('redrawn');\n\t },\n\n\t _onShown: function onShown() {\n\t this.eventBus.trigger('shown');\n\t if (this.autoselect) {\n\t this.dropdown.cursorTopSuggestion();\n\t }\n\t },\n\n\t _onClosed: function onClosed() {\n\t this.input.clearHint();\n\t this.input.removeActiveDescendant();\n\t this.input.collapse();\n\n\t this.eventBus.trigger('closed');\n\t },\n\n\t _onFocused: function onFocused() {\n\t this.isActivated = true;\n\n\t if (this.openOnFocus) {\n\t var query = this.input.getQuery();\n\t if (query.length >= this.minLength) {\n\t this.dropdown.update(query);\n\t } else {\n\t this.dropdown.empty();\n\t }\n\n\t this.dropdown.open();\n\t }\n\t },\n\n\t _onBlurred: function onBlurred() {\n\t var cursorDatum;\n\t var topSuggestionDatum;\n\n\t cursorDatum = this.dropdown.getDatumForCursor();\n\t topSuggestionDatum = this.dropdown.getDatumForTopSuggestion();\n\t var context = {selectionMethod: 'blur'};\n\n\t if (!this.debug) {\n\t if (this.autoselectOnBlur && cursorDatum) {\n\t this._select(cursorDatum, context);\n\t } else if (this.autoselectOnBlur && topSuggestionDatum) {\n\t this._select(topSuggestionDatum, context);\n\t } else {\n\t this.isActivated = false;\n\t this.dropdown.empty();\n\t this.dropdown.close();\n\t }\n\t }\n\t },\n\n\t _onEnterKeyed: function onEnterKeyed(type, $e) {\n\t var cursorDatum;\n\t var topSuggestionDatum;\n\n\t cursorDatum = this.dropdown.getDatumForCursor();\n\t topSuggestionDatum = this.dropdown.getDatumForTopSuggestion();\n\t var context = {selectionMethod: 'enterKey'};\n\n\t if (cursorDatum) {\n\t this._select(cursorDatum, context);\n\t $e.preventDefault();\n\t } else if (this.autoselect && topSuggestionDatum) {\n\t this._select(topSuggestionDatum, context);\n\t $e.preventDefault();\n\t }\n\t },\n\n\t _onTabKeyed: function onTabKeyed(type, $e) {\n\t if (!this.tabAutocomplete) {\n\t // Closing the dropdown enables further tabbing\n\t this.dropdown.close();\n\t return;\n\t }\n\n\t var datum;\n\t var context = {selectionMethod: 'tabKey'};\n\n\t if (datum = this.dropdown.getDatumForCursor()) {\n\t this._select(datum, context);\n\t $e.preventDefault();\n\t } else {\n\t this._autocomplete(true);\n\t }\n\t },\n\n\t _onEscKeyed: function onEscKeyed() {\n\t this.dropdown.close();\n\t this.input.resetInputValue();\n\t },\n\n\t _onUpKeyed: function onUpKeyed() {\n\t var query = this.input.getQuery();\n\n\t if (this.dropdown.isEmpty && query.length >= this.minLength) {\n\t this.dropdown.update(query);\n\t } else {\n\t this.dropdown.moveCursorUp();\n\t }\n\n\t this.dropdown.open();\n\t },\n\n\t _onDownKeyed: function onDownKeyed() {\n\t var query = this.input.getQuery();\n\n\t if (this.dropdown.isEmpty && query.length >= this.minLength) {\n\t this.dropdown.update(query);\n\t } else {\n\t this.dropdown.moveCursorDown();\n\t }\n\n\t this.dropdown.open();\n\t },\n\n\t _onLeftKeyed: function onLeftKeyed() {\n\t if (this.dir === 'rtl') {\n\t this._autocomplete();\n\t }\n\t },\n\n\t _onRightKeyed: function onRightKeyed() {\n\t if (this.dir === 'ltr') {\n\t this._autocomplete();\n\t }\n\t },\n\n\t _onQueryChanged: function onQueryChanged(e, query) {\n\t this.input.clearHintIfInvalid();\n\n\t if (query.length >= this.minLength) {\n\t this.dropdown.update(query);\n\t } else {\n\t this.dropdown.empty();\n\t }\n\n\t this.dropdown.open();\n\t this._setLanguageDirection();\n\t },\n\n\t _onWhitespaceChanged: function onWhitespaceChanged() {\n\t this._updateHint();\n\t this.dropdown.open();\n\t },\n\n\t _setLanguageDirection: function setLanguageDirection() {\n\t var dir = this.input.getLanguageDirection();\n\n\t if (this.dir !== dir) {\n\t this.dir = dir;\n\t this.$node.css('direction', dir);\n\t this.dropdown.setLanguageDirection(dir);\n\t }\n\t },\n\n\t _updateHint: function updateHint() {\n\t var datum;\n\t var val;\n\t var query;\n\t var escapedQuery;\n\t var frontMatchRegEx;\n\t var match;\n\n\t datum = this.dropdown.getDatumForTopSuggestion();\n\n\t if (datum && this.dropdown.isVisible() && !this.input.hasOverflow()) {\n\t val = this.input.getInputValue();\n\t query = Input.normalizeQuery(val);\n\t escapedQuery = _.escapeRegExChars(query);\n\n\t // match input value, then capture trailing text\n\t frontMatchRegEx = new RegExp('^(?:' + escapedQuery + ')(.+$)', 'i');\n\t match = frontMatchRegEx.exec(datum.value);\n\n\t // clear hint if there's no trailing text\n\t if (match) {\n\t this.input.setHint(val + match[1]);\n\t } else {\n\t this.input.clearHint();\n\t }\n\t } else {\n\t this.input.clearHint();\n\t }\n\t },\n\n\t _autocomplete: function autocomplete(laxCursor) {\n\t var hint;\n\t var query;\n\t var isCursorAtEnd;\n\t var datum;\n\n\t hint = this.input.getHint();\n\t query = this.input.getQuery();\n\t isCursorAtEnd = laxCursor || this.input.isCursorAtEnd();\n\n\t if (hint && query !== hint && isCursorAtEnd) {\n\t datum = this.dropdown.getDatumForTopSuggestion();\n\t if (datum) {\n\t this.input.setInputValue(datum.value);\n\t }\n\n\t this.eventBus.trigger('autocompleted', datum.raw, datum.datasetName);\n\t }\n\t },\n\n\t _select: function select(datum, context) {\n\t if (typeof datum.value !== 'undefined') {\n\t this.input.setQuery(datum.value);\n\t }\n\t if (this.clearOnSelected) {\n\t this.setVal('');\n\t } else {\n\t this.input.setInputValue(datum.value, true);\n\t }\n\n\t this._setLanguageDirection();\n\n\t var event = this.eventBus.trigger('selected', datum.raw, datum.datasetName, context);\n\t if (event.isDefaultPrevented() === false) {\n\t this.dropdown.close();\n\n\t // #118: allow click event to bubble up to the body before removing\n\t // the suggestions otherwise we break event delegation\n\t _.defer(_.bind(this.dropdown.empty, this.dropdown));\n\t }\n\t },\n\n\t // ### public\n\n\t open: function open() {\n\t // if the menu is not activated yet, we need to update\n\t // the underlying dropdown menu to trigger the search\n\t // otherwise we're not gonna see anything\n\t if (!this.isActivated) {\n\t var query = this.input.getInputValue();\n\t if (query.length >= this.minLength) {\n\t this.dropdown.update(query);\n\t } else {\n\t this.dropdown.empty();\n\t }\n\t }\n\t this.dropdown.open();\n\t },\n\n\t close: function close() {\n\t this.dropdown.close();\n\t },\n\n\t setVal: function setVal(val) {\n\t // expect val to be a string, so be safe, and coerce\n\t val = _.toStr(val);\n\n\t if (this.isActivated) {\n\t this.input.setInputValue(val);\n\t } else {\n\t this.input.setQuery(val);\n\t this.input.setInputValue(val, true);\n\t }\n\n\t this._setLanguageDirection();\n\t },\n\n\t getVal: function getVal() {\n\t return this.input.getQuery();\n\t },\n\n\t destroy: function destroy() {\n\t this.input.destroy();\n\t this.dropdown.destroy();\n\n\t destroyDomStructure(this.$node, this.cssClasses);\n\n\t this.$node = null;\n\t },\n\n\t getWrapper: function getWrapper() {\n\t return this.dropdown.$container[0];\n\t }\n\t});\n\n\tfunction buildDom(options) {\n\t var $input;\n\t var $wrapper;\n\t var $dropdown;\n\t var $hint;\n\n\t $input = DOM.element(options.input);\n\t $wrapper = DOM\n\t .element(html.wrapper.replace('%ROOT%', options.cssClasses.root))\n\t .css(options.css.wrapper);\n\n\t // override the display property with the table-cell value\n\t // if the parent element is a table and the original input was a block\n\t // -> https://github.com/algolia/autocomplete.js/issues/16\n\t if (!options.appendTo && $input.css('display') === 'block' && $input.parent().css('display') === 'table') {\n\t $wrapper.css('display', 'table-cell');\n\t }\n\t var dropdownHtml = html.dropdown.\n\t replace('%PREFIX%', options.cssClasses.prefix).\n\t replace('%DROPDOWN_MENU%', options.cssClasses.dropdownMenu);\n\t $dropdown = DOM.element(dropdownHtml)\n\t .css(options.css.dropdown)\n\t .attr({\n\t role: 'listbox',\n\t id: options.listboxId\n\t });\n\t if (options.templates && options.templates.dropdownMenu) {\n\t $dropdown.html(_.templatify(options.templates.dropdownMenu)());\n\t }\n\t $hint = $input.clone().css(options.css.hint).css(getBackgroundStyles($input));\n\n\t $hint\n\t .val('')\n\t .addClass(_.className(options.cssClasses.prefix, options.cssClasses.hint, true))\n\t .removeAttr('id name placeholder required')\n\t .prop('readonly', true)\n\t .attr({\n\t 'aria-hidden': 'true',\n\t autocomplete: 'off',\n\t spellcheck: 'false',\n\t tabindex: -1\n\t });\n\t if ($hint.removeData) {\n\t $hint.removeData();\n\t }\n\n\t // store the original values of the attrs that get modified\n\t // so modifications can be reverted on destroy\n\t $input.data(attrsKey, {\n\t 'aria-autocomplete': $input.attr('aria-autocomplete'),\n\t 'aria-expanded': $input.attr('aria-expanded'),\n\t 'aria-owns': $input.attr('aria-owns'),\n\t autocomplete: $input.attr('autocomplete'),\n\t dir: $input.attr('dir'),\n\t role: $input.attr('role'),\n\t spellcheck: $input.attr('spellcheck'),\n\t style: $input.attr('style'),\n\t type: $input.attr('type')\n\t });\n\n\t $input\n\t .addClass(_.className(options.cssClasses.prefix, options.cssClasses.input, true))\n\t .attr({\n\t autocomplete: 'off',\n\t spellcheck: false,\n\n\t // Accessibility features\n\t // Give the field a presentation of a \"select\".\n\t // Combobox is the combined presentation of a single line textfield\n\t // with a listbox popup.\n\t // https://www.w3.org/WAI/PF/aria/roles#combobox\n\t role: 'combobox',\n\t // Let the screen reader know the field has an autocomplete\n\t // feature to it.\n\t 'aria-autocomplete': (options.datasets &&\n\t options.datasets[0] && options.datasets[0].displayKey ? 'both' : 'list'),\n\t // Indicates whether the dropdown it controls is currently expanded or collapsed\n\t 'aria-expanded': 'false',\n\t 'aria-label': options.ariaLabel,\n\t // Explicitly point to the listbox,\n\t // which is a list of suggestions (aka options)\n\t 'aria-owns': options.listboxId\n\t })\n\t .css(options.hint ? options.css.input : options.css.inputWithNoHint);\n\n\t // ie7 does not like it when dir is set to auto\n\t try {\n\t if (!$input.attr('dir')) {\n\t $input.attr('dir', 'auto');\n\t }\n\t } catch (e) {\n\t // ignore\n\t }\n\n\t $wrapper = options.appendTo\n\t ? $wrapper.appendTo(DOM.element(options.appendTo).eq(0)).eq(0)\n\t : $input.wrap($wrapper).parent();\n\n\t $wrapper\n\t .prepend(options.hint ? $hint : null)\n\t .append($dropdown);\n\n\t return {\n\t wrapper: $wrapper,\n\t input: $input,\n\t hint: $hint,\n\t menu: $dropdown\n\t };\n\t}\n\n\tfunction getBackgroundStyles($el) {\n\t return {\n\t backgroundAttachment: $el.css('background-attachment'),\n\t backgroundClip: $el.css('background-clip'),\n\t backgroundColor: $el.css('background-color'),\n\t backgroundImage: $el.css('background-image'),\n\t backgroundOrigin: $el.css('background-origin'),\n\t backgroundPosition: $el.css('background-position'),\n\t backgroundRepeat: $el.css('background-repeat'),\n\t backgroundSize: $el.css('background-size')\n\t };\n\t}\n\n\tfunction destroyDomStructure($node, cssClasses) {\n\t var $input = $node.find(_.className(cssClasses.prefix, cssClasses.input));\n\n\t // need to remove attrs that weren't previously defined and\n\t // revert attrs that originally had a value\n\t _.each($input.data(attrsKey), function(val, key) {\n\t if (val === undefined) {\n\t $input.removeAttr(key);\n\t } else {\n\t $input.attr(key, val);\n\t }\n\t });\n\n\t $input\n\t .detach()\n\t .removeClass(_.className(cssClasses.prefix, cssClasses.input, true))\n\t .insertAfter($node);\n\t if ($input.removeData) {\n\t $input.removeData(attrsKey);\n\t }\n\n\t $node.remove();\n\t}\n\n\tTypeahead.Dropdown = Dropdown;\n\tTypeahead.Input = Input;\n\tTypeahead.sources = __webpack_require__(20);\n\n\tmodule.exports = Typeahead;\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar namespace = 'autocomplete:';\n\n\tvar _ = __webpack_require__(4);\n\tvar DOM = __webpack_require__(2);\n\n\t// constructor\n\t// -----------\n\n\tfunction EventBus(o) {\n\t if (!o || !o.el) {\n\t _.error('EventBus initialized without el');\n\t }\n\n\t this.$el = DOM.element(o.el);\n\t}\n\n\t// instance methods\n\t// ----------------\n\n\t_.mixin(EventBus.prototype, {\n\n\t // ### public\n\n\t trigger: function(type, suggestion, dataset, context) {\n\t var event = _.Event(namespace + type);\n\t this.$el.trigger(event, [suggestion, dataset, context]);\n\t return event;\n\t }\n\t});\n\n\tmodule.exports = EventBus;\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar specialKeyCodeMap;\n\n\tspecialKeyCodeMap = {\n\t 9: 'tab',\n\t 27: 'esc',\n\t 37: 'left',\n\t 39: 'right',\n\t 13: 'enter',\n\t 38: 'up',\n\t 40: 'down'\n\t};\n\n\tvar _ = __webpack_require__(4);\n\tvar DOM = __webpack_require__(2);\n\tvar EventEmitter = __webpack_require__(8);\n\n\t// constructor\n\t// -----------\n\n\tfunction Input(o) {\n\t var that = this;\n\t var onBlur;\n\t var onFocus;\n\t var onKeydown;\n\t var onInput;\n\n\t o = o || {};\n\n\t if (!o.input) {\n\t _.error('input is missing');\n\t }\n\n\t // bound functions\n\t onBlur = _.bind(this._onBlur, this);\n\t onFocus = _.bind(this._onFocus, this);\n\t onKeydown = _.bind(this._onKeydown, this);\n\t onInput = _.bind(this._onInput, this);\n\n\t this.$hint = DOM.element(o.hint);\n\t this.$input = DOM.element(o.input)\n\t .on('blur.aa', onBlur)\n\t .on('focus.aa', onFocus)\n\t .on('keydown.aa', onKeydown);\n\n\t // if no hint, noop all the hint related functions\n\t if (this.$hint.length === 0) {\n\t this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;\n\t }\n\n\t // ie7 and ie8 don't support the input event\n\t // ie9 doesn't fire the input event when characters are removed\n\t // not sure if ie10 is compatible\n\t if (!_.isMsie()) {\n\t this.$input.on('input.aa', onInput);\n\t } else {\n\t this.$input.on('keydown.aa keypress.aa cut.aa paste.aa', function($e) {\n\t // if a special key triggered this, ignore it\n\t if (specialKeyCodeMap[$e.which || $e.keyCode]) {\n\t return;\n\t }\n\n\t // give the browser a chance to update the value of the input\n\t // before checking to see if the query changed\n\t _.defer(_.bind(that._onInput, that, $e));\n\t });\n\t }\n\n\t // the query defaults to whatever the value of the input is\n\t // on initialization, it'll most likely be an empty string\n\t this.query = this.$input.val();\n\n\t // helps with calculating the width of the input's value\n\t this.$overflowHelper = buildOverflowHelper(this.$input);\n\t}\n\n\t// static methods\n\t// --------------\n\n\tInput.normalizeQuery = function(str) {\n\t // strips leading whitespace and condenses all whitespace\n\t return (str || '').replace(/^\\s*/g, '').replace(/\\s{2,}/g, ' ');\n\t};\n\n\t// instance methods\n\t// ----------------\n\n\t_.mixin(Input.prototype, EventEmitter, {\n\n\t // ### private\n\n\t _onBlur: function onBlur() {\n\t this.resetInputValue();\n\t this.$input.removeAttr('aria-activedescendant');\n\t this.trigger('blurred');\n\t },\n\n\t _onFocus: function onFocus() {\n\t this.trigger('focused');\n\t },\n\n\t _onKeydown: function onKeydown($e) {\n\t // which is normalized and consistent (but not for ie)\n\t var keyName = specialKeyCodeMap[$e.which || $e.keyCode];\n\n\t this._managePreventDefault(keyName, $e);\n\t if (keyName && this._shouldTrigger(keyName, $e)) {\n\t this.trigger(keyName + 'Keyed', $e);\n\t }\n\t },\n\n\t _onInput: function onInput() {\n\t this._checkInputValue();\n\t },\n\n\t _managePreventDefault: function managePreventDefault(keyName, $e) {\n\t var preventDefault;\n\t var hintValue;\n\t var inputValue;\n\n\t switch (keyName) {\n\t case 'tab':\n\t hintValue = this.getHint();\n\t inputValue = this.getInputValue();\n\n\t preventDefault = hintValue &&\n\t hintValue !== inputValue &&\n\t !withModifier($e);\n\t break;\n\n\t case 'up':\n\t case 'down':\n\t preventDefault = !withModifier($e);\n\t break;\n\n\t default:\n\t preventDefault = false;\n\t }\n\n\t if (preventDefault) {\n\t $e.preventDefault();\n\t }\n\t },\n\n\t _shouldTrigger: function shouldTrigger(keyName, $e) {\n\t var trigger;\n\n\t switch (keyName) {\n\t case 'tab':\n\t trigger = !withModifier($e);\n\t break;\n\n\t default:\n\t trigger = true;\n\t }\n\n\t return trigger;\n\t },\n\n\t _checkInputValue: function checkInputValue() {\n\t var inputValue;\n\t var areEquivalent;\n\t var hasDifferentWhitespace;\n\n\t inputValue = this.getInputValue();\n\t areEquivalent = areQueriesEquivalent(inputValue, this.query);\n\t hasDifferentWhitespace = areEquivalent && this.query ?\n\t this.query.length !== inputValue.length : false;\n\n\t this.query = inputValue;\n\n\t if (!areEquivalent) {\n\t this.trigger('queryChanged', this.query);\n\t } else if (hasDifferentWhitespace) {\n\t this.trigger('whitespaceChanged', this.query);\n\t }\n\t },\n\n\t // ### public\n\n\t focus: function focus() {\n\t this.$input.focus();\n\t },\n\n\t blur: function blur() {\n\t this.$input.blur();\n\t },\n\n\t getQuery: function getQuery() {\n\t return this.query;\n\t },\n\n\t setQuery: function setQuery(query) {\n\t this.query = query;\n\t },\n\n\t getInputValue: function getInputValue() {\n\t return this.$input.val();\n\t },\n\n\t setInputValue: function setInputValue(value, silent) {\n\t if (typeof value === 'undefined') {\n\t value = this.query;\n\t }\n\t this.$input.val(value);\n\n\t // silent prevents any additional events from being triggered\n\t if (silent) {\n\t this.clearHint();\n\t } else {\n\t this._checkInputValue();\n\t }\n\t },\n\n\t expand: function expand() {\n\t this.$input.attr('aria-expanded', 'true');\n\t },\n\n\t collapse: function collapse() {\n\t this.$input.attr('aria-expanded', 'false');\n\t },\n\n\t setActiveDescendant: function setActiveDescendant(activedescendantId) {\n\t this.$input.attr('aria-activedescendant', activedescendantId);\n\t },\n\n\t removeActiveDescendant: function removeActiveDescendant() {\n\t this.$input.removeAttr('aria-activedescendant');\n\t },\n\n\t resetInputValue: function resetInputValue() {\n\t this.setInputValue(this.query, true);\n\t },\n\n\t getHint: function getHint() {\n\t return this.$hint.val();\n\t },\n\n\t setHint: function setHint(value) {\n\t this.$hint.val(value);\n\t },\n\n\t clearHint: function clearHint() {\n\t this.setHint('');\n\t },\n\n\t clearHintIfInvalid: function clearHintIfInvalid() {\n\t var val;\n\t var hint;\n\t var valIsPrefixOfHint;\n\t var isValid;\n\n\t val = this.getInputValue();\n\t hint = this.getHint();\n\t valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;\n\t isValid = val !== '' && valIsPrefixOfHint && !this.hasOverflow();\n\n\t if (!isValid) {\n\t this.clearHint();\n\t }\n\t },\n\n\t getLanguageDirection: function getLanguageDirection() {\n\t return (this.$input.css('direction') || 'ltr').toLowerCase();\n\t },\n\n\t hasOverflow: function hasOverflow() {\n\t // 2 is arbitrary, just picking a small number to handle edge cases\n\t var constraint = this.$input.width() - 2;\n\n\t this.$overflowHelper.text(this.getInputValue());\n\n\t return this.$overflowHelper.width() >= constraint;\n\t },\n\n\t isCursorAtEnd: function() {\n\t var valueLength;\n\t var selectionStart;\n\t var range;\n\n\t valueLength = this.$input.val().length;\n\t selectionStart = this.$input[0].selectionStart;\n\n\t if (_.isNumber(selectionStart)) {\n\t return selectionStart === valueLength;\n\t } else if (document.selection) {\n\t // NOTE: this won't work unless the input has focus, the good news\n\t // is this code should only get called when the input has focus\n\t range = document.selection.createRange();\n\t range.moveStart('character', -valueLength);\n\n\t return valueLength === range.text.length;\n\t }\n\n\t return true;\n\t },\n\n\t destroy: function destroy() {\n\t this.$hint.off('.aa');\n\t this.$input.off('.aa');\n\n\t this.$hint = this.$input = this.$overflowHelper = null;\n\t }\n\t});\n\n\t// helper functions\n\t// ----------------\n\n\tfunction buildOverflowHelper($input) {\n\t return DOM.element('
')\n\t .css({\n\t // position helper off-screen\n\t position: 'absolute',\n\t visibility: 'hidden',\n\t // avoid line breaks and whitespace collapsing\n\t whiteSpace: 'pre',\n\t // use same font css as input to calculate accurate width\n\t fontFamily: $input.css('font-family'),\n\t fontSize: $input.css('font-size'),\n\t fontStyle: $input.css('font-style'),\n\t fontVariant: $input.css('font-variant'),\n\t fontWeight: $input.css('font-weight'),\n\t wordSpacing: $input.css('word-spacing'),\n\t letterSpacing: $input.css('letter-spacing'),\n\t textIndent: $input.css('text-indent'),\n\t textRendering: $input.css('text-rendering'),\n\t textTransform: $input.css('text-transform')\n\t })\n\t .insertAfter($input);\n\t}\n\n\tfunction areQueriesEquivalent(a, b) {\n\t return Input.normalizeQuery(a) === Input.normalizeQuery(b);\n\t}\n\n\tfunction withModifier($e) {\n\t return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;\n\t}\n\n\tmodule.exports = Input;\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar immediate = __webpack_require__(9);\n\tvar splitter = /\\s+/;\n\n\tmodule.exports = {\n\t onSync: onSync,\n\t onAsync: onAsync,\n\t off: off,\n\t trigger: trigger\n\t};\n\n\tfunction on(method, types, cb, context) {\n\t var type;\n\n\t if (!cb) {\n\t return this;\n\t }\n\n\t types = types.split(splitter);\n\t cb = context ? bindContext(cb, context) : cb;\n\n\t this._callbacks = this._callbacks || {};\n\n\t while (type = types.shift()) {\n\t this._callbacks[type] = this._callbacks[type] || {sync: [], async: []};\n\t this._callbacks[type][method].push(cb);\n\t }\n\n\t return this;\n\t}\n\n\tfunction onAsync(types, cb, context) {\n\t return on.call(this, 'async', types, cb, context);\n\t}\n\n\tfunction onSync(types, cb, context) {\n\t return on.call(this, 'sync', types, cb, context);\n\t}\n\n\tfunction off(types) {\n\t var type;\n\n\t if (!this._callbacks) {\n\t return this;\n\t }\n\n\t types = types.split(splitter);\n\n\t while (type = types.shift()) {\n\t delete this._callbacks[type];\n\t }\n\n\t return this;\n\t}\n\n\tfunction trigger(types) {\n\t var type;\n\t var callbacks;\n\t var args;\n\t var syncFlush;\n\t var asyncFlush;\n\n\t if (!this._callbacks) {\n\t return this;\n\t }\n\n\t types = types.split(splitter);\n\t args = [].slice.call(arguments, 1);\n\n\t while ((type = types.shift()) && (callbacks = this._callbacks[type])) { // eslint-disable-line\n\t syncFlush = getFlush(callbacks.sync, this, [type].concat(args));\n\t asyncFlush = getFlush(callbacks.async, this, [type].concat(args));\n\n\t if (syncFlush()) {\n\t immediate(asyncFlush);\n\t }\n\t }\n\n\t return this;\n\t}\n\n\tfunction getFlush(callbacks, context, args) {\n\t return flush;\n\n\t function flush() {\n\t var cancelled;\n\n\t for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {\n\t // only cancel if the callback explicitly returns false\n\t cancelled = callbacks[i].apply(context, args) === false;\n\t }\n\n\t return !cancelled;\n\t }\n\t}\n\n\tfunction bindContext(fn, context) {\n\t return fn.bind ?\n\t fn.bind(context) :\n\t function() { fn.apply(context, [].slice.call(arguments, 0)); };\n\t}\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\tvar types = [\n\t __webpack_require__(10),\n\t __webpack_require__(12),\n\t __webpack_require__(13),\n\t __webpack_require__(14),\n\t __webpack_require__(15)\n\t];\n\tvar draining;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\tvar queue = [];\n\tvar scheduled = false;\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t nextTick();\n\t }\n\t}\n\n\t//named nextTick for less confusing stack traces\n\tfunction nextTick() {\n\t if (draining) {\n\t return;\n\t }\n\t scheduled = false;\n\t draining = true;\n\t var len = queue.length;\n\t var timeout = setTimeout(cleanUpNextTick);\n\t while (len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (currentQueue && ++queueIndex < len) {\n\t currentQueue[queueIndex].run();\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t queueIndex = -1;\n\t draining = false;\n\t clearTimeout(timeout);\n\t}\n\tvar scheduleDrain;\n\tvar i = -1;\n\tvar len = types.length;\n\twhile (++i < len) {\n\t if (types[i] && types[i].test && types[i].test()) {\n\t scheduleDrain = types[i].install(nextTick);\n\t break;\n\t }\n\t}\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t var fun = this.fun;\n\t var array = this.array;\n\t switch (array.length) {\n\t case 0:\n\t return fun();\n\t case 1:\n\t return fun(array[0]);\n\t case 2:\n\t return fun(array[0], array[1]);\n\t case 3:\n\t return fun(array[0], array[1], array[2]);\n\t default:\n\t return fun.apply(null, array);\n\t }\n\n\t};\n\tmodule.exports = immediate;\n\tfunction immediate(task) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(task, args));\n\t if (!scheduled && !draining) {\n\t scheduled = true;\n\t scheduleDrain();\n\t }\n\t}\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\texports.test = function () {\n\t // Don't get fooled by e.g. browserify environments.\n\t return (typeof process !== 'undefined') && !process.browser;\n\t};\n\n\texports.install = function (func) {\n\t return function () {\n\t process.nextTick(func);\n\t };\n\t};\n\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(11)))\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\n\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\n\n\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\n\tfunction noop() {}\n\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t//based off rsvp https://github.com/tildeio/rsvp.js\n\t//license https://github.com/tildeio/rsvp.js/blob/master/LICENSE\n\t//https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/asap.js\n\n\tvar Mutation = MutationObserver;\n\n\texports.test = function () {\n\t return Mutation;\n\t};\n\n\texports.install = function (handle) {\n\t var called = 0;\n\t var observer = new Mutation(handle);\n\t var element = document.createTextNode('');\n\t observer.observe(element, {\n\t characterData: true\n\t });\n\t return function () {\n\t element.data = (called = ++called % 2);\n\t };\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\n\texports.test = function () {\n\t if (setImmediate) {\n\t // we can only get here in IE10\n\t // which doesn't handel postMessage well\n\t return false;\n\t }\n\t return typeof MessageChannel !== 'undefined';\n\t};\n\n\texports.install = function (func) {\n\t var channel = new MessageChannel();\n\t channel.port1.onmessage = func;\n\t return function () {\n\t channel.port2.postMessage(0);\n\t };\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 14 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\n\texports.test = function () {\n\t return 'document' in global && 'onreadystatechange' in document.createElement('script');\n\t};\n\n\texports.install = function (handle) {\n\t return function () {\n\n\t // Create a