{"version":3,"sources":["kendo.multiselect.js"],"names":["f","define","$","undefined","compare","a","b","length","kendo","window","ui","List","keys","extend","A","activeElement","_activeElement","ObservableArray","data","proxy","ID","LI","ACCEPT","FILTER","REBIND","OPEN","CLOSE","CHANGE","PROGRESS","SELECT","DESELECT","ARIA_DISABLED","ARIA_READONLY","FOCUSEDCLASS","SELECTEDCLASS","HIDDENCLASS","HOVERCLASS","STATEDISABLED","NOCLICKCLASS","DISABLED","READONLY","AUTOCOMPLETEVALUE","ns","CLICK","KEYDOWN","MOUSEENTER","MOUSELEAVE","HOVEREVENTS","quotRegExp","isArray","styles","MultiSelect","init","element","options","id","disabled","that","this","fn","call","_optionsMap","_customOptions","_wrapper","_tagList","_input","_textContainer","_loader","_clearButton","_tabindex","input","attr","hide","placeholder","_tagID","tagList","_initialOpen","_ariaLabel","_ariaSetLive","_dataSource","_ignoreCase","_popup","_tagTemplate","requireValueMapper","_initList","_reset","_enable","_placeholder","autoBind","dataSource","fetch","value","_preselect","parents","is","enable","_ariaSetSize","notify","_toggleCloseVisibility","name","tagMode","enabled","autoClose","highlightFirst","dataTextField","dataValueField","filter","ignoreCase","minLength","messages","singleTag","clear","deleteTag","noData","enforceMinLength","delay","maxSelectedItems","height","animation","virtual","itemTemplate","tagTemplate","groupTemplate","fixedGroupTemplate","clearButton","autoWidth","popup","events","setDataSource","_state","persistTagList","listView","setOptions","listOptions","_listOptions","_accessors","_aria","currentTag","candidate","_currentTag","removeClass","removeAttr","find","addClass","dataItems","selectedDataItems","destroy","clearTimeout","_busy","_typingTimeout","wrapper","off","_clear","_activateItem","visible","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","cancelable","preventDefault","focus","open","_inputFocus","_inputFocusout","close","skipUpdate","bound","isFiltered","_clearFilter","blur","_removeTag","tag","shouldTrigger","option","listViewChild","done","state","position","customIndex","listViewChildren","trigger","_close","_change","select","selected","removeAt","classList","remove","_updateTagListHTML","_tagListClick","stopPropagation","currentTarget","_clearValue","_clearSingleTagValue","each","val","_search","_hideClear","tags","first","_focusHandler","_editable","disable","readonly","add","toggleClass","on","_toggleHover","_keydown","_filterSource","force","_retrieveData","_activeItem","_request","_open","_focusItem","_allowOpening","isPlainObject","_hovered","toggle","refresh","_listBound","skip","_renderFooter","_renderNoData","_toggleNoData","_resizePopup","focusFirst","_touchScroller","reset","_hideBusy","_makeUnselectable","_inputValue","inputValue","oldValue","clearFilters","_normalizeValues","_old","_valueBeforeCascade","_fetchData","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","_getActiveItem","_getSelectedIndices","_selectedIndices","_selectedIndexes","activeItemIdx","activeIndex","currentIndex","direction","key","keyCode","hasValue","isRtl","dir","ENTER","_multipleSelection","DOWN","shiftKey","getElementIndex","focusNext","_selectRange","focusLast","UP","focusPrev","LEFT","RIGHT","prev","lastChild","next","ctrlKey","altKey","SPACEBAR","ESC","HOME","firstChild","END","DELETE","BACKSPACE","PAGEDOWN","PAGEUP","_scale","scrollWith","screenHeight","_loading","_showBusyHandler","show","skipCaret","active","isActive","caretPos","_prev","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","_showClear","_allowSelection","max","_angularTagItems","cmd","angular","elements","updatePersistTagList","_removedAddedIndexes","removedItem","addedItem","total","getter","removeChild","append","_maxTotal","maxTotal","currentTotal","isSelected","resolved","Deferred","resolve","dataItemByIndex","startIndex","endIndex","indices","indicesToSelect","selectIndices","forEach","accessKey","_inputWrapper","_focused","accesskey","autocomplete","role","title","aria-expanded","aria-haspopup","aria-autocomplete","defaultTemplate","hasDataSource","isMultiple","useWithBlock","insertAfter","computedStyles","getComputedStyles","visibility","top","left","css","parent","wrap","style","cssText","insertBefore","className","ul","_isFilterEnabled","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBACH,aACA,wBACA,qBACDD,IACL,WAorCE,MA9pCC,UAAUE,EAAGC,GA4oCV,QAASC,GAAQC,EAAGC,GAChB,GAAIC,EACJ,IAAU,OAANF,GAAoB,OAANC,GAAoB,OAAND,GAAoB,OAANC,EAC1C,OAAO,CAGX,IADAC,EAASF,EAAEE,OACPA,IAAWD,EAAEC,OACb,OAAO,CAEX,MAAOA,KACH,GAAIF,EAAEE,KAAYD,EAAEC,GAChB,OAAO,CAGf,QAAO,EA1pCd,GACOC,GAAQC,OAAOD,MAAOE,EAAKF,EAAME,GAAIC,EAAOD,EAAGC,KAAMC,EAAOV,EAAEW,QAASC,EAAG,IAAMN,EAAMI,MAAOG,EAAgBP,EAAMQ,eAAgBC,EAAkBT,EAAMU,KAAKD,gBAAiBE,EAAQjB,EAAEiB,MAAOC,EAAK,KAAMC,EAAK,KAAMC,EAAS,SAAUC,EAAS,SAAUC,EAAS,SAAUC,EAAO,OAAQC,EAAQ,QAASC,EAAS,SAAUC,EAAW,WAAYC,EAAS,SAAUC,EAAW,WAAYC,EAAgB,gBAAiBC,EAAgB,gBAAiBC,EAAe,kBAAmBC,EAAgB,mBAAoBC,EAAc,WAAYC,EAAa,gBAAiBC,EAAgB,mBAAoBC,EAAe,aAAcC,EAAW,WAAYC,EAAW,WAAYC,EAAoB,MAAOC,EAAK,oBAAqBC,EAAQ,QAAUD,EAAIE,EAAU,UAAYF,EAAIG,EAAa,aAAeH,EAAII,EAAa,aAAeJ,EAAIK,EAAcF,EAAa,IAAMC,E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Q4X,KAAK,4DAA4DD,SACnF1R,EAAQ,GAAG4R,MAAMC,QAAU9X,EAAQ,GAAG6X,MAAMC,QAC5C7R,EAAQ,GAAG2Q,MAAQ5W,EAAQ,GAAG4W,MAC9B/Z,EAAE,mFAAmFkb,aAAa/X,IAEtGI,EAAK6F,QAAUA,EAAQP,SAAS1F,EAAQ,GAAGgY,WAAWzS,YAAY,0BAA0BmS,IAAI,UAAW,IAC3GtX,EAAKmW,cAAgB1Z,EAAEoJ,EAAQ,GAAG0L,aAEtChP,aAAc,SAAUL,GAAV,GACNlC,GAAOC,KACPyT,EAAgB1T,EAAKkB,QAAQuG,UAC7BvF,IAASwR,EAAc5W,QACvB4W,EAAc5S,KAAK,eAAgBoB,IAG3Cb,aAAc,WACV,GAAIrB,GAAOC,IACXD,GAAK6X,GAAG/W,KAAK,YAAcd,EAAK8X,mBAA6B,SAAR,SAmB7D7a,GAAG8a,OAAOrY,IACZ1C,OAAOD,MAAMib,QACRhb,OAAOD,OACE,kBAAVP,SAAwBA,OAAOyb,IAAMzb,OAAS,SAAU0b,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 'kendo.virtuallist'\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 = $.extend({ A: 65 }, 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', ARIA_READONLY = 'aria-readonly', FOCUSEDCLASS = 'k-state-focused', SELECTEDCLASS = 'k-state-selected', HIDDENCLASS = 'k-hidden', HOVERCLASS = 'k-state-hover', STATEDISABLED = 'k-state-disabled', NOCLICKCLASS = 'k-no-click', DISABLED = 'disabled', READONLY = 'readonly', AUTOCOMPLETEVALUE = 'off', 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 that.input.attr('aria-describedby', id);\n }\n that._initialOpen = true;\n that._ariaLabel();\n that._ariaSetLive();\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 that._ariaSetSize(that.value().length);\n kendo.notify(that);\n that._toggleCloseVisibility();\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 messages: {\n 'singleTag': 'item(s) selected',\n 'clear': 'clear',\n 'deleteTag': 'delete',\n 'noData': 'No data found.'\n },\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 autoWidth: false,\n popup: null\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.persistTagList = false;\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 this._placeholder();\n this._clearButton();\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._currentTag.find('.k-select').attr('aria-hidden', true);\n that.input.removeAttr('aria-activedescendant');\n }\n if (candidate) {\n candidate.addClass(FOCUSEDCLASS).attr(ID, that._tagID);\n candidate.find('.k-select').removeAttr('aria-hidden');\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 if (this.popup.visible()) {\n List.fn._activateItem.call(this);\n }\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-60-down').length;\n }\n if (notInput && !(closeButton && kendo.support.mobileOS) && e.cancelable) {\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 if (that.listView.bound() && that.listView.isFiltered()) {\n that.persistTagList = true;\n that._clearFilter();\n }\n that.element.blur();\n },\n _removeTag: function (tag, shouldTrigger) {\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 listViewChildren = listView.element[0].children;\n var option;\n var listViewChild;\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 if (shouldTrigger) {\n that._change();\n }\n that._close();\n };\n if (customIndex === undefined && listView.select().length) {\n that.persistTagList = false;\n listView.select(listView.select()[position]).done(done);\n } else {\n option = that.element[0].children[customIndex];\n if (option) {\n option.selected = false;\n }\n listView.removeAt(position);\n listViewChild = listViewChildren[customIndex];\n if (listViewChild) {\n listViewChildren[customIndex].classList.remove('k-state-selected');\n }\n if (that.options.tagMode !== 'single') {\n tag.remove();\n } else {\n that._updateTagListHTML();\n }\n done();\n }\n },\n _tagListClick: function (e) {\n e.preventDefault();\n e.stopPropagation();\n var target = $(e.currentTarget);\n if (!target.children('.k-i-arrow-60-down').length) {\n this._removeTag(target.closest(LI), true);\n }\n },\n _clearValue: function () {\n var that = this;\n if (that.options.tagMode === 'single') {\n that._clearSingleTagValue();\n } else {\n that.tagList.children().each(function (index, tag) {\n that._removeTag($(tag), false);\n });\n }\n that.input.val('');\n that._search();\n that._change();\n that.focus();\n that._hideClear();\n if (that._state === FILTER) {\n that._state = ACCEPT;\n }\n },\n _clearSingleTagValue: function () {\n var that = this;\n var items = that.dataItems();\n var tags = that.tagList.children();\n var persistTagList = that.persistTagList;\n for (var i = 0; i < items.length; i += 1) {\n if (that.trigger(DESELECT, {\n dataItem: items[i],\n item: tags.first()\n })) {\n that._close();\n return;\n }\n }\n if (persistTagList) {\n that.persistTagList = false;\n }\n that.listView.value([]);\n that.persistTagList = persistTagList;\n },\n _focusHandler: function () {\n this.input.focus();\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).removeClass(NOCLICKCLASS).on(HOVEREVENTS, that._toggleHover).on('mousedown' + ns + ' touchend' + ns, proxy(that._wrapperMousedown, that)).on(CLICK, proxy(that._focusHandler, that));\n that.input.on(KEYDOWN, proxy(that._keydown, that)).on('paste' + ns, proxy(that._search, that)).on('input' + ns, proxy(that._search, that)).on('focus' + ns, proxy(that._inputFocus, that)).on('focusout' + ns, proxy(that._inputFocusout, that));\n that._clear.on(CLICK + ' touchend' + ns, proxy(that._clearValue, that));\n input.removeAttr(DISABLED).removeAttr(READONLY).attr(ARIA_DISABLED, false).attr(ARIA_READONLY, false);\n tagList.on(MOUSEENTER, LI, function () {\n $(this).addClass(HOVERCLASS);\n }).on(MOUSELEAVE, LI, function () {\n $(this).removeClass(HOVERCLASS);\n }).on(CLICK + ' touchend' + ns, 'li.k-button .k-select', proxy(that._tagListClick, that));\n } else {\n wrapper.toggleClass(STATEDISABLED, disable).toggleClass(NOCLICKCLASS, readonly);\n input.attr(DISABLED, disable).attr(READONLY, readonly).attr(ARIA_DISABLED, disable).attr(ARIA_READONLY, readonly);\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._activeItem = null;\n this.input.removeAttr('aria-activedescendant');\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.persistTagList = that._initialOpen && !that.listView.bound() ? false : true;\n that._filterSource();\n that._focusItem();\n } else if (that._allowOpening()) {\n if (that._initialOpen && !that.options.autoBind && !that.options.virtual && that.options.value && !$.isPlainObject(that.options.value[0])) {\n that.value(that.value() || that._initialValues);\n }\n that.popup._hovered = true;\n that._initialOpen = false;\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.persistTagList = false;\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 = that._valueBeforeCascade = value.slice();\n if (!clearFilters) {\n that._fetchData();\n }\n that._ariaSetSize(that.value().length);\n that._toggleCloseVisibility();\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 that.popup.position();\n that._ariaSetSize(value.length);\n that._toggleCloseVisibility();\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._activeItem = item;\n that._change();\n that._close();\n });\n },\n _getActiveItem: function () {\n return this._activeItem || $(this.listView.items()[this._getSelectedIndices().length - 1]) || this.listView.focus();\n },\n _getSelectedIndices: function () {\n return this.listView._selectedIndices || this.listView._selectedIndexes;\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 hasValue = that.input.val();\n var isRtl = kendo.support.isRtl(that.wrapper);\n var visible = that.popup.visible();\n var dir = 0;\n var activeItemIdx;\n if (key !== keys.ENTER) {\n this._multipleSelection = false;\n }\n if (key === keys.DOWN) {\n e.preventDefault();\n if (!visible) {\n that.open();\n if (!listView.focus()) {\n listView.focusFirst();\n }\n return;\n }\n if (listView.focus()) {\n if (!that._activeItem && e.shiftKey) {\n that._activeItem = listView.focus();\n dir = -1;\n }\n activeItemIdx = listView.getElementIndex(that._getActiveItem().first());\n listView.focusNext();\n if (!listView.focus()) {\n listView.focusLast();\n } else {\n if (e.shiftKey) {\n this._multipleSelection = true;\n that._selectRange(activeItemIdx, listView.getElementIndex(listView.focus().first()) + dir);\n }\n }\n } else {\n listView.focusFirst();\n }\n } else if (key === keys.UP) {\n if (visible) {\n if (!that._activeItem && e.shiftKey) {\n that._activeItem = listView.focus();\n dir = 1;\n }\n activeItemIdx = listView.getElementIndex(that._getActiveItem().first());\n listView.focusPrev();\n if (!listView.focus()) {\n that.close();\n } else {\n if (e.shiftKey) {\n this._multipleSelection = true;\n that._selectRange(activeItemIdx, listView.getElementIndex(listView.focus().first()) + dir);\n }\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 (e.ctrlKey && !e.altKey && key === keys.A && visible && !that.options.virtual) {\n this._multipleSelection = true;\n if (this._getSelectedIndices().length === listView.items().length) {\n that._activeItem = null;\n }\n if (listView.items().length) {\n that._selectRange(0, listView.items().length - 1);\n }\n } else if (key === keys.ENTER && visible) {\n if (!listView.focus()) {\n return;\n }\n e.preventDefault();\n if (this._multipleSelection) {\n this._multipleSelection = false;\n if (listView.focus().hasClass(SELECTEDCLASS)) {\n that._close();\n return;\n }\n }\n that._select(listView.focus()).done(function () {\n that._change();\n that._close();\n });\n } else if (key === keys.SPACEBAR && e.ctrlKey && visible) {\n if (that._activeItem && listView.focus() && listView.focus()[0] === that._activeItem[0]) {\n that._activeItem = null;\n }\n if (!$(listView.focus()).hasClass(SELECTEDCLASS)) {\n that._activeItem = listView.focus();\n }\n that._select(listView.focus()).done(function () {\n that._change();\n });\n e.preventDefault();\n } else if (key === keys.SPACEBAR && e.shiftKey && visible) {\n var activeIndex = listView.getElementIndex(that._getActiveItem());\n var currentIndex = listView.getElementIndex(listView.focus());\n if (activeIndex !== undefined && currentIndex !== undefined) {\n that._selectRange(activeIndex, currentIndex);\n }\n e.preventDefault();\n } else if (key === keys.ESC) {\n if (visible) {\n e.preventDefault();\n } else {\n that.tagList.children().each(function (index, tag) {\n that._removeTag($(tag), false);\n });\n that._change();\n }\n that.close();\n } else if (key === keys.HOME) {\n if (visible) {\n if (!listView.focus()) {\n that.close();\n } else {\n if (e.ctrlKey && e.shiftKey && !that.options.virtual) {\n that._selectRange(listView.getElementIndex(listView.focus()[0]), 0);\n }\n listView.focusFirst();\n }\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 if (!listView.focus()) {\n that.close();\n } else {\n if (e.ctrlKey && e.shiftKey && !that.options.virtual) {\n that._selectRange(listView.getElementIndex(listView.focus()[0]), listView.element.children().length - 1);\n }\n listView.focusLast();\n }\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 that._state = ACCEPT;\n if (that.options.tagMode === 'single') {\n that._clearSingleTagValue();\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, true);\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._toggleCloseVisibility();\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.find('.k-multiselect-wrap'), 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 = ' 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 updatePersistTagList: function (added, removed) {\n if (this.persistTagList.added && this.persistTagList.added.length === removed.length && this.persistTagList.removed && this.persistTagList.removed.length === added.length) {\n this.persistTagList = false;\n } else {\n this.listView._removedAddedIndexes = this._old.slice();\n this.persistTagList = {\n added: added,\n removed: removed\n };\n }\n },\n _selectValue: function (added, removed) {\n var that = this;\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 if (this.persistTagList) {\n this.updatePersistTagList(added, removed);\n return;\n }\n that._angularTagItems('cleanup');\n if (that.options.tagMode === 'multiple') {\n for (idx = removed.length - 1; idx > -1; idx--) {\n removedItem = removed[idx];\n if (tagList.children().length) {\n tagList[0].removeChild(tagList[0].children[removedItem.position]);\n that._setOption(getter(removedItem.dataItem), false);\n }\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 this._updateTagListHTML();\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 _updateTagListHTML: function () {\n var that = this;\n var values = that.value();\n var total = that.dataSource.total();\n var tagList = that.tagList;\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 },\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() && !isSelected) {\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 that.persistTagList = false;\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 _selectRange: function (startIndex, endIndex) {\n var that = this;\n var listView = this.listView;\n var maxSelectedItems = this.options.maxSelectedItems;\n var indices = this._getSelectedIndices().slice();\n var indicesToSelect = [];\n var i;\n var selectIndices = function (indices) {\n listView.select(indices).done(function () {\n indices.forEach(function (index) {\n var dataItem = listView.dataItemByIndex(index);\n var candidate = listView.element.children()[index];\n var isSelected = $(candidate).hasClass('k-state-selected');\n that.trigger(isSelected ? SELECT : DESELECT, {\n dataItem: dataItem,\n item: $(candidate)\n });\n });\n that._change();\n });\n };\n if (indices.length - 1 === endIndex - startIndex) {\n return selectIndices(indices);\n }\n if (startIndex < endIndex) {\n for (i = startIndex; i <= endIndex; i++) {\n indicesToSelect.push(i);\n }\n } else {\n for (i = startIndex; i >= endIndex; i--) {\n indicesToSelect.push(i);\n }\n }\n if (maxSelectedItems !== null && indicesToSelect.length > maxSelectedItems) {\n indicesToSelect = indicesToSelect.slice(0, maxSelectedItems);\n }\n for (i = 0; i < indicesToSelect.length; i++) {\n var index = indicesToSelect[i];\n if (this._getSelectedIndices().indexOf(index) == -1) {\n indices.push(index);\n } else {\n indices.splice(indices.indexOf(index), 1);\n }\n }\n if (!indices.length) {\n return;\n }\n that.persistTagList = false;\n return selectIndices(indices);\n },\n _input: function () {\n var that = this;\n var element = that.element;\n var accessKey = element[0].accessKey;\n var input = that._inputWrapper.children('input.k-input');\n if (!input[0]) {\n input = $('').appendTo(that._inputWrapper);\n }\n element.removeAttr('accesskey');\n that._focused = that.input = input.attr({\n 'accesskey': accessKey,\n 'autocomplete': AUTOCOMPLETEVALUE,\n 'role': 'listbox',\n 'title': element[0].title,\n 'aria-expanded': false,\n 'aria-haspopup': 'listbox',\n 'aria-autocomplete': 'list'\n });\n },\n _tagList: function () {\n var that = this, tagList = that._inputWrapper.children('ul');\n if (!tagList[0]) {\n tagList = $('