{"version":3,"sources":["kendo.multiselect.js"],"names":["f","define","$","undefined","compare","a","b","length","kendo","window","ui","List","keys","activeElement","_activeElement","ObservableArray","data","proxy","ID","LI","ACCEPT","FILTER","REBIND","OPEN","CLOSE","CHANGE","PROGRESS","SELECT","DESELECT","ARIA_DISABLED","FOCUSEDCLASS","HIDDENCLASS","HOVERCLASS","STATEDISABLED","DISABLED","READONLY","ns","CLICK","KEYDOWN","MOUSEENTER","MOUSELEAVE","HOVEREVENTS","quotRegExp","isArray","styles","MultiSelect","extend","init","element","options","id","disabled","that","this","fn","call","_optionsMap","_customOptions","_wrapper","_tagList","_input","_textContainer","_loader","_clearButton","_tabindex","input","attr","hide","placeholder","_tagID","tagList","_aria","_dataSource","_ignoreCase","_popup","_tagTemplate","requireValueMapper","_initList","_reset","_enable","_placeholder","autoBind","dataSource","fetch","value","_preselect","parents","is","enable","notify","name","tagMode","enabled","autoClose","highlightFirst","dataTextField","dataValueField","filter","ignoreCase","minLength","enforceMinLength","delay","maxSelectedItems","height","animation","virtual","itemTemplate","tagTemplate","groupTemplate","fixedGroupTemplate","clearButton","events","setDataSource","_state","listView","setOptions","listOptions","_listOptions","_accessors","currentTag","candidate","_currentTag","removeClass","removeAttr","addClass","dataItems","selectedDataItems","destroy","clearTimeout","_busy","_typingTimeout","wrapper","off","_clear","_activateItem","selectedItemChange","_selectedItemChange","selectable","template","expr","_setListValue","_initialValues","slice","_listChange","e","i","flatView","optionsMap","valueGetter","_value","added","dataItem","_render","_selectValue","removed","context","idx","items","children","eq","index","html","tagTextTemplate","item","_wrapperMousedown","notInput","target","nodeName","toLowerCase","closeButton","hasClass","closest","support","mobileOS","preventDefault","focus","open","_inputFocus","_inputFocusout","close","skipUpdate","blur","_removeTag","tag","option","done","state","position","customIndex","trigger","_close","_change","select","selected","removeAt","remove","_tagListClick","currentTarget","_clearClick","_editable","disable","readonly","add","on","_toggleHover","_keydown","_search","popup","_filterSource","force","_retrieveData","_request","bound","_open","_allowOpening","_focusItem","toggle","visible","refresh","_listBound","skip","_renderFooter","_renderNoData","_toggleNoData","_resizePopup","focusFirst","_touchScroller","reset","_hideBusy","_makeUnselectable","_inputValue","inputValue","val","oldValue","clearFilters","isFiltered","_normalizeValues","_clearFilter","_old","_fetchData","isPlainObject","ObservableObject","_setOption","hasItems","view","isEmptyArray","_fetch","read","_isBound","fields","field","_refreshHandler","_unbindDataSource","_progressHandler","_showBusy","_errorHandler","DataSource","create","bind","formId","form","_resetHandler","setTimeout","_form","_initValue","map","_click","_select","direction","key","keyCode","current","hasValue","isRtl","DOWN","focusNext","focusLast","UP","focusPrev","LEFT","RIGHT","prev","lastChild","next","ENTER","ESC","HOME","firstChild","END","DELETE","BACKSPACE","PAGEDOWN","PAGEUP","_scale","scrollWith","screenHeight","_loading","_showClear","_showBusyHandler","_hideClear","show","skipCaret","active","isActive","caretPos","_prev","toggleClass","caret","textWidth","wrapperWidth","width","span","_span","text","appendTo","document","documentElement","_option","dataValue","dataText","indexOf","replace","htmlEncode","selectedIndex","custom","selectedItems","values","_buildSelectedItems","_selectedItemIndex","splice","_text","valueField","textField","result","push","search","_allowSelection","max","_angularTagItems","cmd","angular","elements","removedItem","addedItem","total","getter","removeChild","append","_maxTotal","maxTotal","currentTotal","isSelected","resolved","Deferred","resolve","dataItemByIndex","getElementIndex","accessKey","_innerWrapper","_focused","accesskey","autocomplete","role","title","aria-expanded","defaultTemplate","hasDataSource","isMultiple","useWithBlock","insertAfter","tabIndex","computedStyles","getComputedStyles","visibility","top","left","css","parent","wrap","style","cssText","insertBefore","className","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBACH,aACA,yBACDD,IACL,WAy6BE,MAn5BC,UAAUE,EAAGC,GAi4BV,QAASC,GAAQC,EAAGC,GAChB,GAAIC,EACJ,IAAU,OAANF,GAAoB,OAANC,GAAoB,OAAND,GAAoB,OAANC,EAC1C,OAAO,CAGX,IADAC,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SACRQ,cAEA7T,KAAKJ,QAAQ6D,aACbzD,KAAKgF,OAAO4O,YAAY5T,KAAKY,QAGrCJ,eAAgB,WACZ,GAAIsT,GAAiB3W,EAAM4W,kBAAkB/T,KAAKY,MAAM,GAAIrB,EAC5DuU,GAAexL,SAAW,WAC1BwL,EAAeE,WAAa,SAC5BF,EAAeG,UACfH,EAAeI,WACflU,KAAKmQ,MAAQtT,EAAE,WAAWsX,IAAIL,GAAgBzD,SAASrQ,KAAK8E,UAEhEzE,SAAU,WACN,GAAIN,GAAOC,KAAML,EAAUI,EAAKJ,QAASmF,EAAUnF,EAAQyU,OAAO,qBAC7DtP,GAAQ,KACTA,EAAUnF,EAAQ0U,KAAK,qEAAqED,SAC5FtP,EAAQ,GAAGwP,MAAMC,QAAU5U,EAAQ,GAAG2U,MAAMC,QAC5CzP,EAAQ,GAAGwO,MAAQ3T,EAAQ,GAAG2T,MAC9BzW,EAAE,oEAAoE2X,aAAa7U,IAEvFI,EAAK+E,QAAUA,EAAQP,SAAS5E,EAAQ,GAAG8U,WAAWN,IAAI,UAAW,IACrEpU,EAAKkT,cAAgBpW,EAAEiI,EAAQ,GAAG4J,cAmB1CrR,GAAGqX,OAAOlV,IACZpC,OAAOD,MAAMwX,QACRvX,OAAOD,OACE,kBAAVP,SAAwBA,OAAOgY,IAAMhY,OAAS,SAAUiY,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.multiselect.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.multiselect', [\n 'kendo.list',\n 'kendo.mobile.scroller'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'multiselect',\n name: 'MultiSelect',\n category: 'web',\n description: 'The MultiSelect widget allows the selection from pre-defined values.',\n depends: ['list'],\n features: [\n {\n id: 'mobile-scroller',\n name: 'Mobile scroller',\n description: 'Support for kinetic scrolling in mobile device',\n depends: ['mobile.scroller']\n },\n {\n id: 'virtualization',\n name: 'VirtualList',\n description: 'Support for virtualization',\n depends: ['virtuallist']\n }\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, List = ui.List, keys = kendo.keys, activeElement = kendo._activeElement, ObservableArray = kendo.data.ObservableArray, proxy = $.proxy, ID = 'id', LI = 'li', ACCEPT = 'accept', FILTER = 'filter', REBIND = 'rebind', OPEN = 'open', CLOSE = 'close', CHANGE = 'change', PROGRESS = 'progress', SELECT = 'select', DESELECT = 'deselect', ARIA_DISABLED = 'aria-disabled', FOCUSEDCLASS = 'k-state-focused', HIDDENCLASS = 'k-loading-hidden', HOVERCLASS = 'k-state-hover', STATEDISABLED = 'k-state-disabled', DISABLED = 'disabled', READONLY = 'readonly', ns = '.kendoMultiSelect', CLICK = 'click' + ns, KEYDOWN = 'keydown' + ns, MOUSEENTER = 'mouseenter' + ns, MOUSELEAVE = 'mouseleave' + ns, HOVEREVENTS = MOUSEENTER + ' ' + MOUSELEAVE, quotRegExp = /\"/g, isArray = $.isArray, styles = [\n 'font-family',\n 'font-size',\n 'font-stretch',\n 'font-style',\n 'font-weight',\n 'letter-spacing',\n 'text-transform',\n 'line-height'\n ];\n var MultiSelect = List.extend({\n init: function (element, options) {\n var that = this, id, disabled;\n that.ns = ns;\n List.fn.init.call(that, element, options);\n that._optionsMap = {};\n that._customOptions = {};\n that._wrapper();\n that._tagList();\n that._input();\n that._textContainer();\n that._loader();\n that._clearButton();\n that._tabindex(that.input);\n element = that.element.attr('multiple', 'multiple').hide();\n options = that.options;\n if (!options.placeholder) {\n options.placeholder = element.data('placeholder');\n }\n id = element.attr(ID);\n if (id) {\n that._tagID = id + '_tag_active';\n id = id + '_taglist';\n that.tagList.attr(ID, id);\n }\n that._aria(id);\n that._dataSource();\n that._ignoreCase();\n that._popup();\n that._tagTemplate();\n that.requireValueMapper(that.options);\n that._initList();\n that._reset();\n that._enable();\n that._placeholder();\n if (options.autoBind) {\n that.dataSource.fetch();\n } else if (options.value) {\n that._preselect(options.value);\n }\n disabled = $(that.element).parents('fieldset').is(':disabled');\n if (disabled) {\n that.enable(false);\n }\n kendo.notify(that);\n },\n options: {\n name: 'MultiSelect',\n tagMode: 'multiple',\n enabled: true,\n autoBind: true,\n autoClose: true,\n highlightFirst: true,\n dataTextField: '',\n dataValueField: '',\n filter: 'startswith',\n ignoreCase: true,\n minLength: 1,\n enforceMinLength: false,\n delay: 100,\n value: null,\n maxSelectedItems: null,\n placeholder: '',\n height: 200,\n animation: {},\n virtual: false,\n itemTemplate: '',\n tagTemplate: '',\n groupTemplate: '#:data#',\n fixedGroupTemplate: '#:data#',\n clearButton: true\n },\n events: [\n OPEN,\n CLOSE,\n CHANGE,\n SELECT,\n DESELECT,\n 'filtering',\n 'dataBinding',\n 'dataBound'\n ],\n setDataSource: function (dataSource) {\n this.options.dataSource = dataSource;\n this._state = '';\n this._dataSource();\n this.listView.setDataSource(this.dataSource);\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n setOptions: function (options) {\n var listOptions = this._listOptions(options);\n List.fn.setOptions.call(this, options);\n this.listView.setOptions(listOptions);\n this._accessors();\n this._aria(this.tagList.attr(ID));\n this._tagTemplate();\n },\n currentTag: function (candidate) {\n var that = this;\n if (candidate !== undefined) {\n if (that._currentTag) {\n that._currentTag.removeClass(FOCUSEDCLASS).removeAttr(ID);\n that.input.removeAttr('aria-activedescendant');\n }\n if (candidate) {\n candidate.addClass(FOCUSEDCLASS).attr(ID, that._tagID);\n that.input.attr('aria-activedescendant', that._tagID);\n }\n that._currentTag = candidate;\n } else {\n return that._currentTag;\n }\n },\n dataItems: function () {\n return this.listView.selectedDataItems();\n },\n destroy: function () {\n var that = this, ns = that.ns;\n clearTimeout(that._busy);\n clearTimeout(that._typingTimeout);\n that.wrapper.off(ns);\n that.tagList.off(ns);\n that.input.off(ns);\n that._clear.off(ns);\n List.fn.destroy.call(that);\n },\n _activateItem: function () {\n List.fn._activateItem.call(this);\n this.currentTag(null);\n },\n _listOptions: function (options) {\n var that = this;\n var listOptions = List.fn._listOptions.call(that, $.extend(options, {\n selectedItemChange: proxy(that._selectedItemChange, that),\n selectable: 'multiple'\n }));\n var itemTemplate = this.options.itemTemplate || this.options.template;\n var template = listOptions.itemTemplate || itemTemplate || listOptions.template;\n if (!template) {\n template = '#:' + kendo.expr(listOptions.dataTextField, 'data') + '#';\n }\n listOptions.template = template;\n return listOptions;\n },\n _setListValue: function () {\n List.fn._setListValue.call(this, this._initialValues.slice(0));\n },\n _listChange: function (e) {\n var data = this.dataSource.flatView();\n var optionsMap = this._optionsMap;\n var valueGetter = this._value;\n if (this._state === REBIND) {\n this._state = '';\n }\n for (var i = 0; i < e.added.length; i++) {\n if (optionsMap[valueGetter(e.added[i].dataItem)] === undefined) {\n this._render(data);\n break;\n }\n }\n this._selectValue(e.added, e.removed);\n },\n _selectedItemChange: function (e) {\n var items = e.items;\n var context;\n var idx;\n for (idx = 0; idx < items.length; idx++) {\n context = items[idx];\n this.tagList.children().eq(context.index).children('span:first').html(this.tagTextTemplate(context.item));\n }\n },\n _wrapperMousedown: function (e) {\n var that = this;\n var notInput = e.target.nodeName.toLowerCase() !== 'input';\n var target = $(e.target);\n var closeButton = target.hasClass('k-select') || target.hasClass('k-icon');\n if (closeButton) {\n closeButton = !target.closest('.k-select').children('.k-i-arrow-s').length;\n }\n if (notInput && !(closeButton && kendo.support.mobileOS)) {\n e.preventDefault();\n }\n if (!closeButton) {\n if (that.input[0] !== activeElement() && notInput) {\n that.input.focus();\n }\n if (that.options.minLength === 1) {\n that.open();\n }\n }\n },\n _inputFocus: function () {\n this._placeholder(false);\n this.wrapper.addClass(FOCUSEDCLASS);\n },\n _inputFocusout: function () {\n var that = this;\n clearTimeout(that._typingTimeout);\n that.wrapper.removeClass(FOCUSEDCLASS);\n that._placeholder(!that.listView.selectedDataItems()[0], true);\n that.close();\n if (that._state === FILTER) {\n that._state = ACCEPT;\n that.listView.skipUpdate(true);\n }\n that.element.blur();\n },\n _removeTag: function (tag) {\n var that = this;\n var state = that._state;\n var position = tag.index();\n var listView = that.listView;\n var value = listView.value()[position];\n var dataItem = that.listView.selectedDataItems()[position];\n var customIndex = that._customOptions[value];\n var option;\n if (that.trigger(DESELECT, {\n dataItem: dataItem,\n item: tag\n })) {\n that._close();\n return;\n }\n if (customIndex === undefined && (state === ACCEPT || state === FILTER)) {\n customIndex = that._optionsMap[value];\n }\n var done = function () {\n that.currentTag(null);\n that._change();\n that._close();\n };\n if (customIndex === undefined) {\n listView.select(listView.select()[position]).done(done);\n } else {\n option = that.element[0].children[customIndex];\n option.selected = false;\n listView.removeAt(position);\n tag.remove();\n done();\n }\n },\n _tagListClick: function (e) {\n var target = $(e.currentTarget);\n if (!target.children('.k-i-arrow-s').length) {\n this._removeTag(target.closest(LI));\n }\n },\n _clearClick: function () {\n this.value(null);\n this.trigger('change');\n },\n _editable: function (options) {\n var that = this, disable = options.disable, readonly = options.readonly, wrapper = that.wrapper.off(ns), tagList = that.tagList.off(ns), input = that.element.add(that.input.off(ns));\n if (!readonly && !disable) {\n wrapper.removeClass(STATEDISABLED).on(HOVEREVENTS, that._toggleHover).on('mousedown' + ns + ' touchend' + ns, proxy(that._wrapperMousedown, that));\n that.input.on(KEYDOWN, proxy(that._keydown, that)).on('paste' + ns, proxy(that._search, that)).on('focus' + ns, proxy(that._inputFocus, that)).on('focusout' + ns, proxy(that._inputFocusout, that));\n that._clear.on('click' + ns, proxy(that._clearClick, that));\n input.removeAttr(DISABLED).removeAttr(READONLY).attr(ARIA_DISABLED, false);\n tagList.on(MOUSEENTER, LI, function () {\n $(this).addClass(HOVERCLASS);\n }).on(MOUSELEAVE, LI, function () {\n $(this).removeClass(HOVERCLASS);\n }).on(CLICK, 'li.k-button .k-select', proxy(that._tagListClick, that));\n } else {\n if (disable) {\n wrapper.addClass(STATEDISABLED);\n } else {\n wrapper.removeClass(STATEDISABLED);\n }\n input.attr(DISABLED, disable).attr(READONLY, readonly).attr(ARIA_DISABLED, disable);\n }\n },\n _close: function () {\n var that = this;\n if (that.options.autoClose) {\n that.close();\n } else {\n that.popup.position();\n }\n },\n _filterSource: function (filter, force) {\n if (!force) {\n force = this._retrieveData;\n }\n this._retrieveData = false;\n List.fn._filterSource.call(this, filter, force);\n },\n close: function () {\n this.popup.close();\n },\n open: function () {\n var that = this;\n if (that._request) {\n that._retrieveData = false;\n }\n if (that._retrieveData || !that.listView.bound() || that._state === ACCEPT) {\n that._open = true;\n that._state = REBIND;\n that.listView.skipUpdate(true);\n that._filterSource();\n } else if (that._allowOpening()) {\n that.popup.open();\n that._focusItem();\n }\n },\n toggle: function (toggle) {\n toggle = toggle !== undefined ? toggle : !this.popup.visible();\n this[toggle ? OPEN : CLOSE]();\n },\n refresh: function () {\n this.listView.refresh();\n },\n _listBound: function () {\n var that = this;\n var data = that.dataSource.flatView();\n var skip = that.listView.skip();\n that._render(data);\n that._renderFooter();\n that._renderNoData();\n that._toggleNoData(!data.length);\n that._resizePopup();\n if (that._open) {\n that._open = false;\n that.toggle(that._allowOpening());\n }\n that.popup.position();\n if (that.options.highlightFirst && (skip === undefined || skip === 0)) {\n that.listView.focusFirst();\n }\n if (that._touchScroller) {\n that._touchScroller.reset();\n }\n that._hideBusy();\n that._makeUnselectable();\n that.trigger('dataBound');\n },\n _inputValue: function () {\n var that = this;\n var inputValue = that.input.val();\n if (that.options.placeholder === inputValue) {\n inputValue = '';\n }\n return inputValue;\n },\n value: function (value) {\n var that = this;\n var listView = that.listView;\n var oldValue = listView.value().slice();\n var maxSelectedItems = that.options.maxSelectedItems;\n var clearFilters = listView.bound() && listView.isFiltered();\n if (value === undefined) {\n return oldValue;\n }\n that.requireValueMapper(that.options, value);\n value = that._normalizeValues(value);\n if (maxSelectedItems !== null && value.length > maxSelectedItems) {\n value = value.slice(0, maxSelectedItems);\n }\n if (clearFilters) {\n that._clearFilter();\n }\n listView.value(value);\n that._old = listView.value();\n if (!clearFilters) {\n that._fetchData();\n }\n },\n _preselect: function (data, value) {\n var that = this;\n if (!isArray(data) && !(data instanceof kendo.data.ObservableArray)) {\n data = [data];\n }\n if ($.isPlainObject(data[0]) || data[0] instanceof kendo.data.ObservableObject || !that.options.dataValueField) {\n that.dataSource.data(data);\n that.value(value || that._initialValues);\n that._retrieveData = true;\n }\n },\n _setOption: function (value, selected) {\n var option = this.element[0].children[this._optionsMap[value]];\n if (option) {\n option.selected = selected;\n }\n },\n _fetchData: function () {\n var that = this;\n var hasItems = !!that.dataSource.view().length;\n var isEmptyArray = that.listView.value().length === 0;\n if (isEmptyArray || that._request) {\n return;\n }\n if (that._retrieveData || !that._fetch && !hasItems) {\n that._fetch = true;\n that._retrieveData = false;\n that.dataSource.read().done(function () {\n that._fetch = false;\n });\n }\n },\n _isBound: function () {\n return this.listView.bound() && !this._retrieveData;\n },\n _dataSource: function () {\n var that = this, element = that.element, options = that.options, dataSource = options.dataSource || {};\n dataSource = isArray(dataSource) ? { data: dataSource } : dataSource;\n dataSource.select = element;\n dataSource.fields = [\n { field: options.dataTextField },\n { field: options.dataValueField }\n ];\n if (that.dataSource && that._refreshHandler) {\n that._unbindDataSource();\n } else {\n that._progressHandler = proxy(that._showBusy, that);\n that._errorHandler = proxy(that._hideBusy, that);\n }\n that.dataSource = kendo.data.DataSource.create(dataSource).bind(PROGRESS, that._progressHandler).bind('error', that._errorHandler);\n },\n _reset: function () {\n var that = this, element = that.element, formId = element.attr('form'), form = formId ? $('#' + formId) : element.closest('form');\n if (form[0]) {\n that._resetHandler = function () {\n setTimeout(function () {\n that.value(that._initialValues);\n that._placeholder();\n });\n };\n that._form = form.on('reset', that._resetHandler);\n }\n },\n _initValue: function () {\n var value = this.options.value || this.element.val();\n this._old = this._initialValues = this._normalizeValues(value);\n },\n _normalizeValues: function (value) {\n var that = this;\n if (value === null) {\n value = [];\n } else if (value && $.isPlainObject(value)) {\n value = [that._value(value)];\n } else if (value && $.isPlainObject(value[0])) {\n value = $.map(value, function (dataItem) {\n return that._value(dataItem);\n });\n } else if (!isArray(value) && !(value instanceof ObservableArray)) {\n value = [value];\n } else if (isArray(value)) {\n value = value.slice();\n }\n return value;\n },\n _change: function () {\n var that = this, value = that.value();\n if (!compare(value, that._old)) {\n that._old = value.slice();\n that.trigger(CHANGE);\n that.element.trigger(CHANGE);\n }\n },\n _click: function (e) {\n var that = this;\n var item = e.item;\n e.preventDefault();\n that._select(item).done(function () {\n that._change();\n that._close();\n });\n },\n _keydown: function (e) {\n var that = this;\n var key = e.keyCode;\n var tag = that._currentTag;\n var listView = that.listView;\n var current = listView.focus();\n var hasValue = that.input.val();\n var isRtl = kendo.support.isRtl(that.wrapper);\n var visible = that.popup.visible();\n if (key === keys.DOWN) {\n e.preventDefault();\n if (!visible) {\n that.open();\n if (!current) {\n listView.focusFirst();\n }\n return;\n }\n if (current) {\n listView.focusNext();\n if (!listView.focus()) {\n listView.focusLast();\n }\n } else {\n listView.focusFirst();\n }\n } else if (key === keys.UP) {\n if (visible) {\n if (current) {\n listView.focusPrev();\n }\n if (!listView.focus()) {\n that.close();\n }\n }\n e.preventDefault();\n } else if (key === keys.LEFT && !isRtl || key === keys.RIGHT && isRtl) {\n if (!hasValue) {\n tag = tag ? tag.prev() : $(that.tagList[0].lastChild);\n if (tag[0]) {\n that.currentTag(tag);\n }\n }\n } else if (key === keys.RIGHT && !isRtl || key === keys.LEFT && isRtl) {\n if (!hasValue && tag) {\n tag = tag.next();\n that.currentTag(tag[0] ? tag : null);\n }\n } else if (key === keys.ENTER && visible) {\n that._select(current).done(function () {\n that._change();\n that._close();\n });\n e.preventDefault();\n } else if (key === keys.ESC) {\n if (visible) {\n e.preventDefault();\n } else {\n that.currentTag(null);\n }\n that.close();\n } else if (key === keys.HOME) {\n if (visible) {\n listView.focusFirst();\n } else if (!hasValue) {\n tag = that.tagList[0].firstChild;\n if (tag) {\n that.currentTag($(tag));\n }\n }\n } else if (key === keys.END) {\n if (visible) {\n listView.focusLast();\n } else if (!hasValue) {\n tag = that.tagList[0].lastChild;\n if (tag) {\n that.currentTag($(tag));\n }\n }\n } else if ((key === keys.DELETE || key === keys.BACKSPACE) && !hasValue) {\n if (that.options.tagMode === 'single') {\n listView.value([]);\n that._change();\n that._close();\n return;\n }\n if (key === keys.BACKSPACE && !tag) {\n tag = $(that.tagList[0].lastChild);\n }\n if (tag && tag[0]) {\n that._removeTag(tag);\n }\n } else if (that.popup.visible() && (key === keys.PAGEDOWN || key === keys.PAGEUP)) {\n e.preventDefault();\n var direction = key === keys.PAGEDOWN ? 1 : -1;\n listView.scrollWith(direction * listView.screenHeight());\n } else {\n clearTimeout(that._typingTimeout);\n setTimeout(function () {\n that._scale();\n });\n that._search();\n }\n },\n _hideBusy: function () {\n var that = this;\n clearTimeout(that._busy);\n that.input.attr('aria-busy', false);\n that._loading.addClass(HIDDENCLASS);\n that._request = false;\n that._busy = null;\n that._showClear();\n },\n _showBusyHandler: function () {\n this.input.attr('aria-busy', true);\n this._loading.removeClass(HIDDENCLASS);\n this._hideClear();\n },\n _showBusy: function () {\n var that = this;\n that._request = true;\n if (that._busy) {\n return;\n }\n that._busy = setTimeout(proxy(that._showBusyHandler, that), 100);\n },\n _placeholder: function (show, skipCaret) {\n var that = this;\n var input = that.input;\n var active = activeElement();\n var placeholder = that.options.placeholder;\n var inputValue = input.val();\n var isActive = input[0] === active;\n var caretPos = inputValue.length;\n if (!isActive || that.options.autoClose || inputValue === placeholder) {\n caretPos = 0;\n inputValue = '';\n }\n if (show === undefined) {\n show = false;\n if (input[0] !== active) {\n show = !that.listView.selectedDataItems()[0];\n }\n }\n that._prev = inputValue;\n input.toggleClass('k-readonly', show).val(show ? placeholder : inputValue);\n if (isActive && !skipCaret) {\n kendo.caret(input[0], caretPos, caretPos);\n }\n that._scale();\n },\n _scale: function () {\n var that = this, wrapper = that.wrapper, wrapperWidth = wrapper.width(), span = that._span.text(that.input.val()), textWidth;\n if (!wrapper.is(':visible')) {\n span.appendTo(document.documentElement);\n wrapperWidth = textWidth = span.width() + 25;\n span.appendTo(wrapper);\n } else {\n textWidth = span.width() + 25;\n }\n that.input.width(textWidth > wrapperWidth ? wrapperWidth : textWidth);\n },\n _option: function (dataValue, dataText, selected) {\n var option = '';\n },\n _render: function (data) {\n var selectedItems = this.listView.selectedDataItems();\n var values = this.listView.value();\n var length = data.length;\n var selectedIndex;\n var options = '';\n var dataItem;\n var value;\n var idx;\n if (values.length !== selectedItems.length) {\n selectedItems = this._buildSelectedItems(values);\n }\n var custom = {};\n var optionsMap = {};\n for (idx = 0; idx < length; idx++) {\n dataItem = data[idx];\n value = this._value(dataItem);\n selectedIndex = this._selectedItemIndex(value, selectedItems);\n if (selectedIndex !== -1) {\n selectedItems.splice(selectedIndex, 1);\n }\n optionsMap[value] = idx;\n options += this._option(value, this._text(dataItem), selectedIndex !== -1);\n }\n if (selectedItems.length) {\n for (idx = 0; idx < selectedItems.length; idx++) {\n dataItem = selectedItems[idx];\n value = this._value(dataItem);\n custom[value] = length;\n optionsMap[value] = length;\n length += 1;\n options += this._option(value, this._text(dataItem), true);\n }\n }\n this._customOptions = custom;\n this._optionsMap = optionsMap;\n this.element.html(options);\n },\n _buildSelectedItems: function (values) {\n var valueField = this.options.dataValueField;\n var textField = this.options.dataTextField;\n var result = [];\n var item;\n for (var idx = 0; idx < values.length; idx++) {\n item = {};\n item[valueField] = values[idx];\n item[textField] = values[idx];\n result.push(item);\n }\n return result;\n },\n _selectedItemIndex: function (value, selectedItems) {\n var valueGetter = this._value;\n var idx = 0;\n for (; idx < selectedItems.length; idx++) {\n if (value === valueGetter(selectedItems[idx])) {\n return idx;\n }\n }\n return -1;\n },\n _search: function () {\n var that = this;\n that._typingTimeout = setTimeout(function () {\n var value = that.input.val();\n if (that._prev !== value) {\n that._prev = value;\n that.search(value);\n }\n }, that.options.delay);\n },\n _allowOpening: function () {\n return this._allowSelection() && List.fn._allowOpening.call(this);\n },\n _allowSelection: function () {\n var max = this.options.maxSelectedItems;\n return max === null || max > this.listView.value().length;\n },\n _angularTagItems: function (cmd) {\n var that = this;\n that.angular(cmd, function () {\n return {\n elements: that.tagList[0].children,\n data: $.map(that.dataItems(), function (dataItem) {\n return { dataItem: dataItem };\n })\n };\n });\n },\n _selectValue: function (added, removed) {\n var that = this;\n var values = that.value();\n var total = that.dataSource.total();\n var tagList = that.tagList;\n var getter = that._value;\n var removedItem;\n var addedItem;\n var idx;\n that._angularTagItems('cleanup');\n if (that.options.tagMode === 'multiple') {\n for (idx = removed.length - 1; idx > -1; idx--) {\n removedItem = removed[idx];\n tagList[0].removeChild(tagList[0].children[removedItem.position]);\n that._setOption(getter(removedItem.dataItem), false);\n }\n for (idx = 0; idx < added.length; idx++) {\n addedItem = added[idx];\n tagList.append(that.tagTemplate(addedItem.dataItem));\n that._setOption(getter(addedItem.dataItem), true);\n }\n } else {\n if (!that._maxTotal || that._maxTotal < total) {\n that._maxTotal = total;\n }\n tagList.html('');\n if (values.length) {\n tagList.append(that.tagTemplate({\n values: values,\n dataItems: that.dataItems(),\n maxTotal: that._maxTotal,\n currentTotal: total\n }));\n }\n for (idx = removed.length - 1; idx > -1; idx--) {\n that._setOption(getter(removed[idx].dataItem), false);\n }\n for (idx = 0; idx < added.length; idx++) {\n that._setOption(getter(added[idx].dataItem), true);\n }\n }\n that._angularTagItems('compile');\n that._placeholder();\n },\n _select: function (candidate) {\n var resolved = $.Deferred().resolve();\n if (!candidate) {\n return resolved;\n }\n var that = this;\n var listView = that.listView;\n var dataItem = listView.dataItemByIndex(listView.getElementIndex(candidate));\n var isSelected = candidate.hasClass('k-state-selected');\n if (that._state === REBIND) {\n that._state = '';\n }\n if (!that._allowSelection()) {\n return resolved;\n }\n if (that.trigger(isSelected ? DESELECT : SELECT, {\n dataItem: dataItem,\n item: candidate\n })) {\n that._close();\n return resolved;\n }\n return listView.select(candidate).done(function () {\n that._placeholder();\n if (that._state === FILTER) {\n that._state = ACCEPT;\n listView.skipUpdate(true);\n }\n });\n },\n _input: function () {\n var that = this;\n var element = that.element;\n var accessKey = element[0].accessKey;\n var input = that._innerWrapper.children('input.k-input');\n if (!input[0]) {\n input = $('').appendTo(that._innerWrapper);\n }\n element.removeAttr('accesskey');\n that._focused = that.input = input.attr({\n 'accesskey': accessKey,\n 'autocomplete': 'off',\n 'role': 'listbox',\n 'title': element[0].title,\n 'aria-expanded': false\n });\n },\n _tagList: function () {\n var that = this, tagList = that._innerWrapper.children('ul');\n if (!tagList[0]) {\n tagList = $('