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/devbridge-autocomplete/dist/jquery.autocomplete.js"],"sourcesContent":["/**\n* Ajax Autocomplete for jQuery, version 1.4.11\n* (c) 2017 Tomas Kirda\n*\n* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.\n* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete\n*/\n\n/*jslint browser: true, white: true, single: true, this: true, multivar: true */\n/*global define, window, document, jQuery, exports, require */\n\n// Expose plugin as an AMD module if AMD loader is present:\n(function (factory) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if (typeof exports === 'object' && typeof require === 'function') {\n // Browserify\n factory(require('jquery'));\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function ($) {\n 'use strict';\n\n var\n utils = (function () {\n return {\n escapeRegExChars: function (value) {\n return value.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n },\n createNode: function (containerClass) {\n var div = document.createElement('div');\n div.className = containerClass;\n div.style.position = 'absolute';\n div.style.display = 'none';\n return div;\n }\n };\n }()),\n\n keys = {\n ESC: 27,\n TAB: 9,\n RETURN: 13,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n\n noop = $.noop;\n\n function Autocomplete(el, options) {\n var that = this;\n\n // Shared variables:\n that.element = el;\n that.el = $(el);\n that.suggestions = [];\n that.badQueries = [];\n that.selectedIndex = -1;\n that.currentValue = that.element.value;\n that.timeoutId = null;\n that.cachedResponse = {};\n that.onChangeTimeout = null;\n that.onChange = null;\n that.isLocal = false;\n that.suggestionsContainer = null;\n that.noSuggestionsContainer = null;\n that.options = $.extend(true, {}, Autocomplete.defaults, options);\n that.classes = {\n selected: 'autocomplete-selected',\n suggestion: 'autocomplete-suggestion'\n };\n that.hint = null;\n that.hintValue = '';\n that.selection = null;\n\n // Initialize and set options:\n that.initialize();\n that.setOptions(options);\n }\n\n Autocomplete.utils = utils;\n\n $.Autocomplete = Autocomplete;\n\n Autocomplete.defaults = {\n ajaxSettings: {},\n autoSelectFirst: false,\n appendTo: 'body',\n serviceUrl: null,\n lookup: null,\n onSelect: null,\n width: 'auto',\n minChars: 1,\n maxHeight: 300,\n deferRequestBy: 0,\n params: {},\n formatResult: _formatResult,\n formatGroup: _formatGroup,\n delimiter: null,\n zIndex: 9999,\n type: 'GET',\n noCache: false,\n onSearchStart: noop,\n onSearchComplete: noop,\n onSearchError: noop,\n preserveInput: false,\n containerClass: 'autocomplete-suggestions',\n tabDisabled: false,\n dataType: 'text',\n currentRequest: null,\n triggerSelectOnValidInput: true,\n preventBadQueries: true,\n lookupFilter: _lookupFilter,\n paramName: 'query',\n transformResult: _transformResult,\n showNoSuggestionNotice: false,\n noSuggestionNotice: 'No results',\n orientation: 'bottom',\n forceFixPosition: false\n };\n\n function _lookupFilter(suggestion, originalQuery, queryLowerCase) {\n return suggestion.value.toLowerCase().indexOf(queryLowerCase) !== -1;\n };\n\n function _transformResult(response) {\n return typeof response === 'string' ? $.parseJSON(response) : response;\n };\n\n function _formatResult(suggestion, currentValue) {\n // Do not replace anything if the current value is empty\n if (!currentValue) {\n return suggestion.value;\n }\n\n var pattern = '(' + utils.escapeRegExChars(currentValue) + ')';\n\n return suggestion.value\n .replace(new RegExp(pattern, 'gi'), '$1<\\/strong>')\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/<(\\/?strong)>/g, '<$1>');\n };\n\n function _formatGroup(suggestion, category) {\n return '
' + category + '
';\n };\n\n Autocomplete.prototype = {\n\n initialize: function () {\n var that = this,\n suggestionSelector = '.' + that.classes.suggestion,\n selected = that.classes.selected,\n options = that.options,\n container;\n\n that.element.setAttribute('autocomplete', 'off');\n\n // html() deals with many types: htmlString or Element or Array or jQuery\n that.noSuggestionsContainer = $('
')\n .html(this.options.noSuggestionNotice).get(0);\n\n that.suggestionsContainer = Autocomplete.utils.createNode(options.containerClass);\n\n container = $(that.suggestionsContainer);\n\n container.appendTo(options.appendTo || 'body');\n\n // Only set width if it was provided:\n if (options.width !== 'auto') {\n container.css('width', options.width);\n }\n\n // Listen for mouse over event on suggestions list:\n container.on('mouseover.autocomplete', suggestionSelector, function () {\n that.activate($(this).data('index'));\n });\n\n // Deselect active element when mouse leaves suggestions container:\n container.on('mouseout.autocomplete', function () {\n that.selectedIndex = -1;\n container.children('.' + selected).removeClass(selected);\n });\n\n // Listen for click event on suggestions list:\n container.on('click.autocomplete', suggestionSelector, function () {\n that.select($(this).data('index'));\n });\n\n container.on('click.autocomplete', function () {\n clearTimeout(that.blurTimeoutId);\n })\n\n that.fixPositionCapture = function () {\n if (that.visible) {\n that.fixPosition();\n }\n };\n\n $(window).on('resize.autocomplete', that.fixPositionCapture);\n\n that.el.on('keydown.autocomplete', function (e) { that.onKeyPress(e); });\n that.el.on('keyup.autocomplete', function (e) { that.onKeyUp(e); });\n that.el.on('blur.autocomplete', function () { that.onBlur(); });\n that.el.on('focus.autocomplete', function () { that.onFocus(); });\n that.el.on('change.autocomplete', function (e) { that.onKeyUp(e); });\n that.el.on('input.autocomplete', function (e) { that.onKeyUp(e); });\n },\n\n onFocus: function () {\n var that = this;\n\n if (that.disabled) {\n return;\n }\n\n that.fixPosition();\n\n if (that.el.val().length >= that.options.minChars) {\n that.onValueChange();\n }\n },\n\n onBlur: function () {\n var that = this,\n options = that.options,\n value = that.el.val(),\n query = that.getQuery(value);\n\n // If user clicked on a suggestion, hide() will\n // be canceled, otherwise close suggestions\n that.blurTimeoutId = setTimeout(function () {\n that.hide();\n\n if (that.selection && that.currentValue !== query) {\n (options.onInvalidateSelection || $.noop).call(that.element);\n }\n }, 200);\n },\n\n abortAjax: function () {\n var that = this;\n if (that.currentRequest) {\n that.currentRequest.abort();\n that.currentRequest = null;\n }\n },\n\n setOptions: function (suppliedOptions) {\n var that = this,\n options = $.extend({}, that.options, suppliedOptions);\n\n that.isLocal = Array.isArray(options.lookup);\n\n if (that.isLocal) {\n options.lookup = that.verifySuggestionsFormat(options.lookup);\n }\n\n options.orientation = that.validateOrientation(options.orientation, 'bottom');\n\n // Adjust height, width and z-index:\n $(that.suggestionsContainer).css({\n 'max-height': options.maxHeight + 'px',\n 'width': options.width + 'px',\n 'z-index': options.zIndex\n });\n\n this.options = options;\n },\n\n\n clearCache: function () {\n this.cachedResponse = {};\n this.badQueries = [];\n },\n\n clear: function () {\n this.clearCache();\n this.currentValue = '';\n this.suggestions = [];\n },\n\n disable: function () {\n var that = this;\n that.disabled = true;\n clearTimeout(that.onChangeTimeout);\n that.abortAjax();\n },\n\n enable: function () {\n this.disabled = false;\n },\n\n fixPosition: function () {\n // Use only when container has already its content\n\n var that = this,\n $container = $(that.suggestionsContainer),\n containerParent = $container.parent().get(0);\n // Fix position automatically when appended to body.\n // In other cases force parameter must be given.\n if (containerParent !== document.body && !that.options.forceFixPosition) {\n return;\n }\n\n // Choose orientation\n var orientation = that.options.orientation,\n containerHeight = $container.outerHeight(),\n height = that.el.outerHeight(),\n offset = that.el.offset(),\n styles = { 'top': offset.top, 'left': offset.left };\n\n if (orientation === 'auto') {\n var viewPortHeight = $(window).height(),\n scrollTop = $(window).scrollTop(),\n topOverflow = -scrollTop + offset.top - containerHeight,\n bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight);\n\n orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';\n }\n\n if (orientation === 'top') {\n styles.top += -containerHeight;\n } else {\n styles.top += height;\n }\n\n // If container is not positioned to body,\n // correct its position using offset parent offset\n if(containerParent !== document.body) {\n var opacity = $container.css('opacity'),\n parentOffsetDiff;\n\n if (!that.visible){\n $container.css('opacity', 0).show();\n }\n\n parentOffsetDiff = $container.offsetParent().offset();\n styles.top -= parentOffsetDiff.top;\n styles.top += containerParent.scrollTop;\n styles.left -= parentOffsetDiff.left;\n\n if (!that.visible){\n $container.css('opacity', opacity).hide();\n }\n }\n\n if (that.options.width === 'auto') {\n styles.width = that.el.outerWidth() + 'px';\n }\n\n $container.css(styles);\n },\n\n isCursorAtEnd: function () {\n var that = this,\n valLength = that.el.val().length,\n selectionStart = that.element.selectionStart,\n range;\n\n if (typeof selectionStart === 'number') {\n return selectionStart === valLength;\n }\n if (document.selection) {\n range = document.selection.createRange();\n range.moveStart('character', -valLength);\n return valLength === range.text.length;\n }\n return true;\n },\n\n onKeyPress: function (e) {\n var that = this;\n\n // If suggestions are hidden and user presses arrow down, display suggestions:\n if (!that.disabled && !that.visible && e.which === keys.DOWN && that.currentValue) {\n that.suggest();\n return;\n }\n\n if (that.disabled || !that.visible) {\n return;\n }\n\n switch (e.which) {\n case keys.ESC:\n that.el.val(that.currentValue);\n that.hide();\n break;\n case keys.RIGHT:\n if (that.hint && that.options.onHint && that.isCursorAtEnd()) {\n that.selectHint();\n break;\n }\n return;\n case keys.TAB:\n if (that.hint && that.options.onHint) {\n that.selectHint();\n return;\n }\n if (that.selectedIndex === -1) {\n that.hide();\n return;\n }\n that.select(that.selectedIndex);\n if (that.options.tabDisabled === false) {\n return;\n }\n break;\n case keys.RETURN:\n if (that.selectedIndex === -1) {\n that.hide();\n return;\n }\n that.select(that.selectedIndex);\n break;\n case keys.UP:\n that.moveUp();\n break;\n case keys.DOWN:\n that.moveDown();\n break;\n default:\n return;\n }\n\n // Cancel event if function did not return:\n e.stopImmediatePropagation();\n e.preventDefault();\n },\n\n onKeyUp: function (e) {\n var that = this;\n\n if (that.disabled) {\n return;\n }\n\n switch (e.which) {\n case keys.UP:\n case keys.DOWN:\n return;\n }\n\n clearTimeout(that.onChangeTimeout);\n\n if (that.currentValue !== that.el.val()) {\n that.findBestHint();\n if (that.options.deferRequestBy > 0) {\n // Defer lookup in case when value changes very quickly:\n that.onChangeTimeout = setTimeout(function () {\n that.onValueChange();\n }, that.options.deferRequestBy);\n } else {\n that.onValueChange();\n }\n }\n },\n\n onValueChange: function () {\n if (this.ignoreValueChange) {\n this.ignoreValueChange = false;\n return;\n }\n\n var that = this,\n options = that.options,\n value = that.el.val(),\n query = that.getQuery(value);\n\n if (that.selection && that.currentValue !== query) {\n that.selection = null;\n (options.onInvalidateSelection || $.noop).call(that.element);\n }\n\n clearTimeout(that.onChangeTimeout);\n that.currentValue = value;\n that.selectedIndex = -1;\n\n // Check existing suggestion for the match before proceeding:\n if (options.triggerSelectOnValidInput && that.isExactMatch(query)) {\n that.select(0);\n return;\n }\n\n if (query.length < options.minChars) {\n that.hide();\n } else {\n that.getSuggestions(query);\n }\n },\n\n isExactMatch: function (query) {\n var suggestions = this.suggestions;\n\n return (suggestions.length === 1 && suggestions[0].value.toLowerCase() === query.toLowerCase());\n },\n\n getQuery: function (value) {\n var delimiter = this.options.delimiter,\n parts;\n\n if (!delimiter) {\n return value;\n }\n parts = value.split(delimiter);\n return $.trim(parts[parts.length - 1]);\n },\n\n getSuggestionsLocal: function (query) {\n var that = this,\n options = that.options,\n queryLowerCase = query.toLowerCase(),\n filter = options.lookupFilter,\n limit = parseInt(options.lookupLimit, 10),\n data;\n\n data = {\n suggestions: $.grep(options.lookup, function (suggestion) {\n return filter(suggestion, query, queryLowerCase);\n })\n };\n\n if (limit && data.suggestions.length > limit) {\n data.suggestions = data.suggestions.slice(0, limit);\n }\n\n return data;\n },\n\n getSuggestions: function (q) {\n var response,\n that = this,\n options = that.options,\n serviceUrl = options.serviceUrl,\n params,\n cacheKey,\n ajaxSettings;\n\n options.params[options.paramName] = q;\n\n if (options.onSearchStart.call(that.element, options.params) === false) {\n return;\n }\n\n params = options.ignoreParams ? null : options.params;\n\n if ($.isFunction(options.lookup)){\n options.lookup(q, function (data) {\n that.suggestions = data.suggestions;\n that.suggest();\n options.onSearchComplete.call(that.element, q, data.suggestions);\n });\n return;\n }\n\n if (that.isLocal) {\n response = that.getSuggestionsLocal(q);\n } else {\n if ($.isFunction(serviceUrl)) {\n serviceUrl = serviceUrl.call(that.element, q);\n }\n cacheKey = serviceUrl + '?' + $.param(params || {});\n response = that.cachedResponse[cacheKey];\n }\n\n if (response && Array.isArray(response.suggestions)) {\n that.suggestions = response.suggestions;\n that.suggest();\n options.onSearchComplete.call(that.element, q, response.suggestions);\n } else if (!that.isBadQuery(q)) {\n that.abortAjax();\n\n ajaxSettings = {\n url: serviceUrl,\n data: params,\n type: options.type,\n dataType: options.dataType\n };\n\n $.extend(ajaxSettings, options.ajaxSettings);\n\n that.currentRequest = $.ajax(ajaxSettings).done(function (data) {\n var result;\n that.currentRequest = null;\n result = options.transformResult(data, q);\n that.processResponse(result, q, cacheKey);\n options.onSearchComplete.call(that.element, q, result.suggestions);\n }).fail(function (jqXHR, textStatus, errorThrown) {\n options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);\n });\n } else {\n options.onSearchComplete.call(that.element, q, []);\n }\n },\n\n isBadQuery: function (q) {\n if (!this.options.preventBadQueries){\n return false;\n }\n\n var badQueries = this.badQueries,\n i = badQueries.length;\n\n while (i--) {\n if (q.indexOf(badQueries[i]) === 0) {\n return true;\n }\n }\n\n return false;\n },\n\n hide: function () {\n var that = this,\n container = $(that.suggestionsContainer);\n\n if ($.isFunction(that.options.onHide) && that.visible) {\n that.options.onHide.call(that.element, container);\n }\n\n that.visible = false;\n that.selectedIndex = -1;\n clearTimeout(that.onChangeTimeout);\n $(that.suggestionsContainer).hide();\n that.signalHint(null);\n },\n\n suggest: function () {\n if (!this.suggestions.length) {\n if (this.options.showNoSuggestionNotice) {\n this.noSuggestions();\n } else {\n this.hide();\n }\n return;\n }\n\n var that = this,\n options = that.options,\n groupBy = options.groupBy,\n formatResult = options.formatResult,\n value = that.getQuery(that.currentValue),\n className = that.classes.suggestion,\n classSelected = that.classes.selected,\n container = $(that.suggestionsContainer),\n noSuggestionsContainer = $(that.noSuggestionsContainer),\n beforeRender = options.beforeRender,\n html = '',\n category,\n formatGroup = function (suggestion, index) {\n var currentCategory = suggestion.data[groupBy];\n\n if (category === currentCategory){\n return '';\n }\n\n category = currentCategory;\n\n return options.formatGroup(suggestion, category);\n };\n\n if (options.triggerSelectOnValidInput && that.isExactMatch(value)) {\n that.select(0);\n return;\n }\n\n // Build suggestions inner HTML:\n $.each(that.suggestions, function (i, suggestion) {\n if (groupBy){\n html += formatGroup(suggestion, value, i);\n }\n\n html += '
' + formatResult(suggestion, value, i) + '
';\n });\n\n this.adjustContainerWidth();\n\n noSuggestionsContainer.detach();\n container.html(html);\n\n if ($.isFunction(beforeRender)) {\n beforeRender.call(that.element, container, that.suggestions);\n }\n\n that.fixPosition();\n container.show();\n\n // Select first value by default:\n if (options.autoSelectFirst) {\n that.selectedIndex = 0;\n container.scrollTop(0);\n container.children('.' + className).first().addClass(classSelected);\n }\n\n that.visible = true;\n that.findBestHint();\n },\n\n noSuggestions: function() {\n var that = this,\n beforeRender = that.options.beforeRender,\n container = $(that.suggestionsContainer),\n noSuggestionsContainer = $(that.noSuggestionsContainer);\n\n this.adjustContainerWidth();\n\n // Some explicit steps. Be careful here as it easy to get\n // noSuggestionsContainer removed from DOM if not detached properly.\n noSuggestionsContainer.detach();\n\n // clean suggestions if any\n container.empty();\n container.append(noSuggestionsContainer);\n\n if ($.isFunction(beforeRender)) {\n beforeRender.call(that.element, container, that.suggestions);\n }\n\n that.fixPosition();\n\n container.show();\n that.visible = true;\n },\n\n adjustContainerWidth: function() {\n var that = this,\n options = that.options,\n width,\n container = $(that.suggestionsContainer);\n\n // If width is auto, adjust width before displaying suggestions,\n // because if instance was created before input had width, it will be zero.\n // Also it adjusts if input width has changed.\n if (options.width === 'auto') {\n width = that.el.outerWidth();\n container.css('width', width > 0 ? width : 300);\n } else if(options.width === 'flex') {\n // Trust the source! Unset the width property so it will be the max length\n // the containing elements.\n container.css('width', '');\n }\n },\n\n findBestHint: function () {\n var that = this,\n value = that.el.val().toLowerCase(),\n bestMatch = null;\n\n if (!value) {\n return;\n }\n\n $.each(that.suggestions, function (i, suggestion) {\n var foundMatch = suggestion.value.toLowerCase().indexOf(value) === 0;\n if (foundMatch) {\n bestMatch = suggestion;\n }\n return !foundMatch;\n });\n\n that.signalHint(bestMatch);\n },\n\n signalHint: function (suggestion) {\n var hintValue = '',\n that = this;\n if (suggestion) {\n hintValue = that.currentValue + suggestion.value.substr(that.currentValue.length);\n }\n if (that.hintValue !== hintValue) {\n that.hintValue = hintValue;\n that.hint = suggestion;\n (this.options.onHint || $.noop)(hintValue);\n }\n },\n\n verifySuggestionsFormat: function (suggestions) {\n // If suggestions is string array, convert them to supported format:\n if (suggestions.length && typeof suggestions[0] === 'string') {\n return $.map(suggestions, function (value) {\n return { value: value, data: null };\n });\n }\n\n return suggestions;\n },\n\n validateOrientation: function(orientation, fallback) {\n orientation = $.trim(orientation || '').toLowerCase();\n\n if($.inArray(orientation, ['auto', 'bottom', 'top']) === -1){\n orientation = fallback;\n }\n\n return orientation;\n },\n\n processResponse: function (result, originalQuery, cacheKey) {\n var that = this,\n options = that.options;\n\n result.suggestions = that.verifySuggestionsFormat(result.suggestions);\n\n // Cache results if cache is not disabled:\n if (!options.noCache) {\n that.cachedResponse[cacheKey] = result;\n if (options.preventBadQueries && !result.suggestions.length) {\n that.badQueries.push(originalQuery);\n }\n }\n\n // Return if originalQuery is not matching current query:\n if (originalQuery !== that.getQuery(that.currentValue)) {\n return;\n }\n\n that.suggestions = result.suggestions;\n that.suggest();\n },\n\n activate: function (index) {\n var that = this,\n activeItem,\n selected = that.classes.selected,\n container = $(that.suggestionsContainer),\n children = container.find('.' + that.classes.suggestion);\n\n container.find('.' + selected).removeClass(selected);\n\n that.selectedIndex = index;\n\n if (that.selectedIndex !== -1 && children.length > that.selectedIndex) {\n activeItem = children.get(that.selectedIndex);\n $(activeItem).addClass(selected);\n return activeItem;\n }\n\n return null;\n },\n\n selectHint: function () {\n var that = this,\n i = $.inArray(that.hint, that.suggestions);\n\n that.select(i);\n },\n\n select: function (i) {\n var that = this;\n that.hide();\n that.onSelect(i);\n },\n\n moveUp: function () {\n var that = this;\n\n if (that.selectedIndex === -1) {\n return;\n }\n\n if (that.selectedIndex === 0) {\n $(that.suggestionsContainer).children('.' + that.classes.suggestion).first().removeClass(that.classes.selected);\n that.selectedIndex = -1;\n that.ignoreValueChange = false;\n that.el.val(that.currentValue);\n that.findBestHint();\n return;\n }\n\n that.adjustScroll(that.selectedIndex - 1);\n },\n\n moveDown: function () {\n var that = this;\n\n if (that.selectedIndex === (that.suggestions.length - 1)) {\n return;\n }\n\n that.adjustScroll(that.selectedIndex + 1);\n },\n\n adjustScroll: function (index) {\n var that = this,\n activeItem = that.activate(index);\n\n if (!activeItem) {\n return;\n }\n\n var offsetTop,\n upperBound,\n lowerBound,\n heightDelta = $(activeItem).outerHeight();\n\n offsetTop = activeItem.offsetTop;\n upperBound = $(that.suggestionsContainer).scrollTop();\n lowerBound = upperBound + that.options.maxHeight - heightDelta;\n\n if (offsetTop < upperBound) {\n $(that.suggestionsContainer).scrollTop(offsetTop);\n } else if (offsetTop > lowerBound) {\n $(that.suggestionsContainer).scrollTop(offsetTop - that.options.maxHeight + heightDelta);\n }\n\n if (!that.options.preserveInput) {\n // During onBlur event, browser will trigger \"change\" event,\n // because value has changed, to avoid side effect ignore,\n // that event, so that correct suggestion can be selected\n // when clicking on suggestion with a mouse\n that.ignoreValueChange = true;\n that.el.val(that.getValue(that.suggestions[index].value));\n }\n\n that.signalHint(null);\n },\n\n onSelect: function (index) {\n var that = this,\n onSelectCallback = that.options.onSelect,\n suggestion = that.suggestions[index];\n\n that.currentValue = that.getValue(suggestion.value);\n\n if (that.currentValue !== that.el.val() && !that.options.preserveInput) {\n that.el.val(that.currentValue);\n }\n\n that.signalHint(null);\n that.suggestions = [];\n that.selection = suggestion;\n\n if ($.isFunction(onSelectCallback)) {\n onSelectCallback.call(that.element, suggestion);\n }\n },\n\n getValue: function (value) {\n var that = this,\n delimiter = that.options.delimiter,\n currentValue,\n parts;\n\n if (!delimiter) {\n return value;\n }\n\n currentValue = that.currentValue;\n parts = currentValue.split(delimiter);\n\n if (parts.length === 1) {\n return value;\n }\n\n return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;\n },\n\n dispose: function () {\n var that = this;\n that.el.off('.autocomplete').removeData('autocomplete');\n $(window).off('resize.autocomplete', that.fixPositionCapture);\n $(that.suggestionsContainer).remove();\n }\n };\n\n // Create chainable jQuery plugin:\n $.fn.devbridgeAutocomplete = function (options, args) {\n var dataKey = 'autocomplete';\n // If function invoked without argument return\n // instance of the first matched element:\n if (!arguments.length) {\n return this.first().data(dataKey);\n }\n\n return this.each(function () {\n var inputElement = $(this),\n instance = inputElement.data(dataKey);\n\n if (typeof options === 'string') {\n if (instance && typeof instance[options] === 'function') {\n instance[options](args);\n }\n } else {\n // If instance already exists, destroy it:\n if (instance && instance.dispose) {\n instance.dispose();\n }\n instance = new Autocomplete(this, options);\n inputElement.data(dataKey, instance);\n }\n });\n };\n\n // Don't overwrite if it already exists\n if (!$.fn.autocomplete) {\n $.fn.autocomplete = $.fn.devbridgeAutocomplete;\n }\n}));\n"],"names":["factory","$","utils","escapeRegExChars","value","replace","createNode","containerClass","div","document","createElement","className","style","position","display","keys","noop","Autocomplete","el","options","that","this","element","suggestions","badQueries","selectedIndex","currentValue","timeoutId","cachedResponse","onChangeTimeout","onChange","isLocal","suggestionsContainer","noSuggestionsContainer","extend","defaults","classes","selected","suggestion","hint","hintValue","selection","initialize","setOptions","ajaxSettings","autoSelectFirst","appendTo","serviceUrl","lookup","onSelect","width","minChars","maxHeight","deferRequestBy","params","formatResult","pattern","RegExp","formatGroup","category","delimiter","zIndex","type","noCache","onSearchStart","onSearchComplete","onSearchError","preserveInput","tabDisabled","dataType","currentRequest","triggerSelectOnValidInput","preventBadQueries","lookupFilter","originalQuery","queryLowerCase","toLowerCase","indexOf","paramName","transformResult","response","parseJSON","showNoSuggestionNotice","noSuggestionNotice","orientation","forceFixPosition","prototype","container","suggestionSelector","setAttribute","html","get","css","on","activate","data","children","removeClass","select","clearTimeout","blurTimeoutId","fixPositionCapture","visible","fixPosition","window","e","onKeyPress","onKeyUp","onBlur","onFocus","disabled","val","length","onValueChange","query","getQuery","setTimeout","hide","onInvalidateSelection","call","abortAjax","abort","suppliedOptions","Array","isArray","verifySuggestionsFormat","validateOrientation","clearCache","clear","disable","enable","$container","containerParent","parent","body","containerHeight","outerHeight","height","offset","styles","top","left","viewPortHeight","scrollTop","topOverflow","bottomOverflow","Math","max","parentOffsetDiff","opacity","show","offsetParent","outerWidth","isCursorAtEnd","range","valLength","selectionStart","createRange","moveStart","text","which","onHint","selectHint","moveUp","moveDown","stopImmediatePropagation","preventDefault","suggest","findBestHint","ignoreValueChange","isExactMatch","getSuggestions","parts","split","trim","getSuggestionsLocal","filter","limit","parseInt","lookupLimit","grep","slice","q","cacheKey","ignoreParams","isFunction","param","isBadQuery","url","ajax","done","result","processResponse","fail","jqXHR","textStatus","errorThrown","i","onHide","signalHint","groupBy","classSelected","beforeRender","each","index","currentCategory","adjustContainerWidth","detach","first","addClass","noSuggestions","empty","append","bestMatch","foundMatch","substr","map","fallback","inArray","push","activeItem","find","adjustScroll","offsetTop","upperBound","lowerBound","heightDelta","getValue","onSelectCallback","dispose","off","removeData","remove","fn","devbridgeAutocomplete","args","dataKey","arguments","inputElement","instance","autocomplete","define","amd","parcelRequire"],"version":3,"file":"product-options.b3735b8b.js.map"}