{"version":3,"sources":["bootstrap-combobox.js"],"names":["$","Combobox","element","options","this","extend","fn","combobox","defaults","template","$source","$container","setup","$element","find","$target","$button","$menu","menu","appendTo","matcher","sorter","highlighter","shown","selected","refresh","transferAttributes","listen","prototype","constructor","before","hide","disable","prop","attr","disabled","addClass","enable","removeClass","parse","that","map","source","selectedValue","each","option","val","placeholder","text","push","appendId","removeAttr","undefined","select","updater","trigger","item","show","pos","position","height","offsetHeight","insertAfter","css","top","left","on","proxy","scrollSafety","off","blur","lookup","event","query","process","items","grep","length","render","slice","bsVersion","toLowerCase","indexOf","beginswith","caseSensitive","caseInsensitive","shift","concat","replace","RegExp","$1","match","i","html","first","next","active","prev","last","toggle","hasClass","clearTarget","triggerChange","clearElement","e","target","tagName","focus","keypress","keyup","eventSupported","keydown","click","mouseenter","mouseleave","eventName","isSupported","setAttribute","move","keyCode","preventDefault","fixMenuScroll","stopPropagation","bottom","scrollTop","menuHeight","suppressKeyPressRepeat","inArray","focused","mousedover","setTimeout","currentTarget","$this","data","Constructor","window","jQuery"],"mappings":"CAkBA,SAAAA,GAEA,YAKA,IAAAC,GAAA,SAAAC,EAAAC,GACAC,KAAAD,QAAAH,EAAAK,UAAAL,EAAAM,GAAAC,SAAAC,SAAAL,GACAC,KAAAK,SAAAL,KAAAD,QAAAM,UAAAL,KAAAK,SACAL,KAAAM,QAAAV,EAAAE,GACAE,KAAAO,WAAAP,KAAAQ,QACAR,KAAAS,SAAAT,KAAAO,WAAAG,KAAA,oBACAV,KAAAW,QAAAX,KAAAO,WAAAG,KAAA,sBACAV,KAAAY,QAAAZ,KAAAO,WAAAG,KAAA,oBACAV,KAAAa,MAAAjB,EAAAI,KAAAD,QAAAe,MAAAC,SAAA,QACAf,KAAAgB,QAAAhB,KAAAD,QAAAiB,SAAAhB,KAAAgB,QACAhB,KAAAiB,OAAAjB,KAAAD,QAAAkB,QAAAjB,KAAAiB,OACAjB,KAAAkB,YAAAlB,KAAAD,QAAAmB,aAAAlB,KAAAkB,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GAAAC,SAAA,SAAAsC,GACA,MAAAzC,MAAAwC,KAAA,WACA,GAAAwF,GAAApI,EAAAI,MACAiI,EAAAD,EAAAC,KAAA,YACAlI,EAAA,gBAAA0C,IAAAA,CACAwF,IAAAD,EAAAC,KAAA,WAAAA,EAAA,GAAApI,GAAAG,KAAAD,IACA,gBAAA0C,IAAAwF,EAAAxF,QAIA7C,EAAAM,GAAAC,SAAAC,UACAwE,UAAA,IACA9D,KAAA,2DACAsC,KAAA,6BAGAxD,EAAAM,GAAAC,SAAA+H,YAAArI,GAEAsI,OAAAC","file":"bootstrap-combobox.min.js","sourcesContent":["/* =============================================================\n * bootstrap-combobox.js v1.1.7\n * =============================================================\n * Copyright 2012 Daniel Farrell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ============================================================ */\n\n!function( $ ) {\n\n \"use strict\";\n\n /* COMBOBOX PUBLIC CLASS DEFINITION\n * ================================ */\n\n var Combobox = function ( element, options ) {\n this.options = $.extend({}, $.fn.combobox.defaults, options);\n this.template = this.options.template || this.template\n this.$source = $(element);\n this.$container = this.setup();\n this.$element = this.$container.find('input[type=text]');\n this.$target = this.$container.find('input[type=hidden]');\n this.$button = this.$container.find('.dropdown-toggle');\n this.$menu = $(this.options.menu).appendTo('body');\n this.matcher = this.options.matcher || this.matcher;\n this.sorter = this.options.sorter || this.sorter;\n this.highlighter = this.options.highlighter || this.highlighter;\n this.shown = false;\n this.selected = false;\n this.refresh();\n this.transferAttributes();\n this.listen();\n };\n\n Combobox.prototype = {\n\n constructor: Combobox\n\n , setup: function () {\n var combobox = $(this.template());\n this.$source.before(combobox);\n this.$source.hide();\n return combobox;\n }\n\n , disable: function() {\n this.$element.prop('disabled', true);\n this.$button.attr('disabled', true);\n this.disabled = true;\n this.$container.addClass('combobox-disabled');\n }\n\n , enable: function() {\n this.$element.prop('disabled', false);\n this.$button.attr('disabled', false);\n this.disabled = false;\n this.$container.removeClass('combobox-disabled');\n }\n , parse: function () {\n var that = this\n , map = {}\n , source = []\n , selected = false\n , selectedValue = '';\n this.$source.find('option').each(function() {\n var option = $(this);\n if (option.val() === '') {\n that.options.placeholder = option.text();\n return;\n }\n map[option.text()] = option.val();\n source.push(option.text());\n if (option.prop('selected')) {\n selected = option.text();\n selectedValue = option.val();\n }\n })\n this.map = map;\n if (selected) {\n this.$element.val(selected);\n this.$target.val(selectedValue);\n this.$container.addClass('combobox-selected');\n this.selected = true;\n }\n return source;\n }\n\n , transferAttributes: function() {\n this.options.placeholder = this.$source.attr('data-placeholder') || this.options.placeholder\n if(this.options.appendId !== \"undefined\") {\n \tthis.$element.attr('id', this.$source.attr('id') + this.options.appendId);\n }\n this.$element.attr('placeholder', this.options.placeholder)\n this.$target.prop('name', this.$source.prop('name'))\n this.$target.val(this.$source.val())\n this.$source.removeAttr('name') // Remove from source otherwise form will pass parameter twice.\n this.$element.attr('required', this.$source.attr('required'))\n this.$element.attr('rel', this.$source.attr('rel'))\n this.$element.attr('title', this.$source.attr('title'))\n this.$element.attr('class', this.$source.attr('class'))\n this.$element.attr('tabindex', this.$source.attr('tabindex'))\n this.$source.removeAttr('tabindex')\n if (this.$source.attr('disabled')!==undefined)\n this.disable();\n }\n\n , select: function () {\n var val = this.$menu.find('.active').attr('data-value');\n this.$element.val(this.updater(val)).trigger('change');\n this.$target.val(this.map[val]).trigger('change');\n this.$source.val(this.map[val]).trigger('change');\n this.$container.addClass('combobox-selected');\n this.selected = true;\n return this.hide();\n }\n\n , updater: function (item) {\n return item;\n }\n\n , show: function () {\n var pos = $.extend({}, this.$element.position(), {\n height: this.$element[0].offsetHeight\n });\n\n this.$menu\n .insertAfter(this.$element)\n .css({\n top: pos.top + pos.height\n , left: pos.left\n })\n .show();\n\n $('.dropdown-menu').on('mousedown', $.proxy(this.scrollSafety, this));\n\n this.shown = true;\n return this;\n }\n\n , hide: function () {\n this.$menu.hide();\n $('.dropdown-menu').off('mousedown', $.proxy(this.scrollSafety, this));\n this.$element.on('blur', $.proxy(this.blur, this));\n this.shown = false;\n return this;\n }\n\n , lookup: function (event) {\n this.query = this.$element.val();\n return this.process(this.source);\n }\n\n , process: function (items) {\n var that = this;\n\n items = $.grep(items, function (item) {\n return that.matcher(item);\n })\n\n items = this.sorter(items);\n\n if (!items.length) {\n return this.shown ? this.hide() : this;\n }\n\n return this.render(items.slice(0, this.options.items)).show();\n }\n\n , template: function() {\n if (this.options.bsVersion == '2') {\n return '