{"version":3,"sources":["kendo.toolbar.js"],"names":["f","define","$","undefined","toggleActive","e","target","is","toggleClass","STATE_ACTIVE","type","actionSheetWrap","element","hasClass","closest","addClass","wrap","parent","preventClick","length","preventDefault","findFocusableSibling","dir","getSibling","fn","next","prev","getter","first","last","candidate","call","OVERFLOW_ANCHOR","find","components","Item","Button","ToolBarButton","OverflowButton","ButtonGroup","ToolBarButtonGroup","OverflowButtonGroup","ToolBarSplitButton","OverflowSplitButton","ToolBarSeparator","OverflowSeparator","ToolBarSpacer","TemplateItem","OverflowTemplateItem","Group","ToolBar","kendo","window","Class","Widget","ui","proxy","isFunction","keys","outerWidth","_outerWidth","ns","TOOLBAR","BUTTON","OVERFLOW_BUTTON","TOGGLE_BUTTON","BUTTON_GROUP","SPLIT_BUTTON","SEPARATOR","SPACER_CLASS","SPACER","POPUP","RESIZABLE_TOOLBAR","STATE_DISABLED","STATE_HIDDEN","HIDDEN","GROUP_START","GROUP_END","PRIMARY","ARIA_DISABLED","ARIA_PRESSED","ICON","ICON_PREFIX","BUTTON_ICON","BUTTON_ICON_TEXT","LIST_CONTAINER","SPLIT_BUTTON_ARROW","OVERFLOW_CONTAINER","FIRST_TOOLBAR_VISIBLE","LAST_TOOLBAR_VISIBLE","CLICK","TOGGLE","OPEN","CLOSE","OVERFLOW_OPEN","OVERFLOW_CLOSE","OVERFLOW_NEVER","OVERFLOW_AUTO","OVERFLOW_ALWAYS","OVERFLOW_HIDDEN","OPTION_LIST_SUFFIX","KENDO_UID_ATTR","attr","toolbar","overflowAnchor","overflowContainer","registerComponent","name","overflow","extend","addOverflowAttr","this","options","addUidAttr","uid","addIdAttr","id","addOverflowIdAttr","attributes","show","removeClass","hidden","hide","overflowHidden","remove","enable","isEnabled","twin","splitContainerId","data","resizable","popup","init","useButtonTag","primary","togglable","toggle","selected","url","mobile","group","addToGroup","click","clickHandler","toggleHandler","state","propagate","select","getParentGroup","isChild","_addGraphics","isEmpty","span","img","icon","spriteCssClass","imageUrl","contents","filter","each","idx","el","nodeType","trim","nodeValue","children","prependTo","align","showText","text","html","hasIcon","showIcon","button","_wrap","createButtons","buttonConstructor","item","i","items","buttons","guid","appendTo","refresh","buttonGroup","mainButton","arrowButton","popupElement","removeAttr","createMenuButtons","createPopup","_navigatable","main","splitButton","kendoPopup","that","on","li","keyCode","ESC","TAB","altKey","UP","focus","DOWN","SPACEBAR","ENTER","userEvents","trigger","HOME","END","menuButtons","rootUid","anchor","isRtl","_isRtl","copyAnchorStyles","animation","open","isDefaultPrevented","adjustPopupWidth","sender","activate","close","width","computedWidth","css","fontFamily","min-width","off","destroy","visible","separator","template","jQuery","add","index","inArray","splice","tmp","wrapper","support","_groups","isMobile","effects","_renderOverflow","overflowUserEvents","UserEvents","threshold","allowSelection","tap","_toggleOverflow","_resizeHandler","onResize","resize","_shrink","innerWidth","document","_buttonClick","press","release","_toggleOverflowAnchor","notify","events","groupName","unbindResize","tool","overflowTool","component","itemClasses","overflowTemplate","container","angular","elements","get","_getItem","toolbarItem","overflowItem","isResizable","buttonGroupInstance","getSelectedFromGroup","checked","horizontalDirection","append","Popup","origin","position","parseFloat","innerHeight","isComplexTool","hasVisibleChildren","paddingEnd","visibility","splitContainer","handler","eventData","urlTarget","isSplitButtonArrow","_toggle","parents","ev","_keydown","lastHasFocus","firstHasFocus","isOnlyOverflowAnchor","lastItemNotOverflowAnchor","isFirstTool","prevFocusable","isOverflowAnchor","direction","parentsUntil","not","shiftKey","_getPrevFocusable","_preventNextFocus","activeElement","eq","RIGHT","_getNextElement","LEFT","itemIndex","parentElement","startIndex","directionNumber","searchIndex","focusableItem","elementToFocus","prevElement","prevElements","prevAll","_resize","containerWidth","_stretch","_markVisibles","_childrenWidth","childrenWidth","Math","ceil","commandElement","visibleCommands","_hideItem","hiddenCommands","_showItem","itemOuterWidth","overflowItems","toolbarItems","visibleOverflowItems","visibleToolbarItems","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,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N,mBAAqB/N,KAAKuO,UAAUJ,EAAgBP,IAFvCzJ,OAQnDkK,UAAW,SAAUnK,GACjBA,EAAKlK,SAAS4D,GACVoC,KAAKoB,OACLpB,KAAKoB,MAAM4I,UAAU9O,KAAK,iBAAoBgJ,EAAKhD,KAAK,OAAS,MAAOT,YAAYrB,KAG5FmP,UAAW,SAAUrK,EAAM0J,GACvB1J,EAAKzD,YAAY7C,EACjB,IAAI4Q,GAAiB5R,EAAWsH,GAAM,EAEtC,OADAA,GAAKlK,SAAS4D,MACVsG,EAAK9J,QAAUwT,EAAiB5N,KAAK+N,iBAAmBS,KACxDtK,EAAKzD,YAAY7C,GACboC,KAAKoB,OACLpB,KAAKoB,MAAM4I,UAAU9O,KAAK,iBAAoBgJ,EAAKhD,KAAK,OAAS,MAAOlH,SAASoF,KAE9E,IAIf0O,cAAe,WACX,GAAIW,GAAgBzO,KAAKoB,MAAM4I,UAAU1G,WAAYoL,EAAe1O,KAAKnG,QAAQyJ,SAAS,4BAA6BqL,EAAuBF,EAAc1L,OAAO,4BAA6B6L,EAAsBF,EAAa3L,OAAO,WAC1O0L,GAAc7G,IAAI8G,GAAcjO,YAAYhC,GAAwB,IAAMC,IAC1EiQ,EAAqB9T,QAAQ+M,IAAIgH,EAAoB/T,SAASb,SAASyE,IACvEkQ,EAAqB7T,OAAO8M,IAAIgH,EAAoB9T,QAAQd,SAAS0E,OAG7EtC,EAAMI,GAAGqS,OAAO1S,IAClBE,OAAOD,MAAMuL,QACRtL,OAAOD,OACE,kBAAVlD,SAAwBA,OAAO4V,IAAM5V,OAAS,SAAU6V,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.toolbar.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.toolbar', [\n 'kendo.core',\n 'kendo.userevents',\n 'kendo.popup'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'toolbar',\n name: 'ToolBar',\n category: 'web',\n description: 'The ToolBar widget displays one or more command buttons divided into groups.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Class = kendo.Class, Widget = kendo.ui.Widget, proxy = $.proxy, isFunction = kendo.isFunction, keys = kendo.keys, outerWidth = kendo._outerWidth, ns = '.kendoToolBar', TOOLBAR = 'k-toolbar', BUTTON = 'k-button', OVERFLOW_BUTTON = 'k-overflow-button', TOGGLE_BUTTON = 'k-toggle-button', BUTTON_GROUP = 'k-button-group', SPLIT_BUTTON = 'k-split-button', SEPARATOR = 'k-separator', SPACER_CLASS = 'k-spacer', SPACER = 'spacer', POPUP = 'k-popup', RESIZABLE_TOOLBAR = 'k-toolbar-resizable', STATE_ACTIVE = 'k-state-active', STATE_DISABLED = 'k-state-disabled', STATE_HIDDEN = 'k-state-hidden', HIDDEN = 'k-hidden', GROUP_START = 'k-group-start', GROUP_END = 'k-group-end', PRIMARY = 'k-primary', ARIA_DISABLED = 'aria-disabled', ARIA_PRESSED = 'aria-pressed', ICON = 'k-icon', ICON_PREFIX = 'k-i-', BUTTON_ICON = 'k-button-icon', BUTTON_ICON_TEXT = 'k-button-icontext', LIST_CONTAINER = 'k-list-container k-split-container', SPLIT_BUTTON_ARROW = 'k-split-button-arrow', OVERFLOW_ANCHOR = 'k-overflow-anchor', OVERFLOW_CONTAINER = 'k-overflow-container', FIRST_TOOLBAR_VISIBLE = 'k-toolbar-first-visible', LAST_TOOLBAR_VISIBLE = 'k-toolbar-last-visible', CLICK = 'click', TOGGLE = 'toggle', OPEN = 'open', CLOSE = 'close', OVERFLOW_OPEN = 'overflowOpen', OVERFLOW_CLOSE = 'overflowClose', OVERFLOW_NEVER = 'never', OVERFLOW_AUTO = 'auto', OVERFLOW_ALWAYS = 'always', OVERFLOW_HIDDEN = 'k-overflow-hidden', OPTION_LIST_SUFFIX = '_optionlist', KENDO_UID_ATTR = kendo.attr('uid');\n kendo.toolbar = {};\n var components = {\n overflowAnchor: '
',\n overflowContainer: ''\n };\n kendo.toolbar.registerComponent = function (name, toolbar, overflow) {\n components[name] = {\n toolbar: toolbar,\n overflow: overflow\n };\n };\n var Item = kendo.Class.extend({\n addOverflowAttr: function () {\n this.element.attr(kendo.attr('overflow'), this.options.overflow || OVERFLOW_AUTO);\n },\n addUidAttr: function () {\n this.element.attr(KENDO_UID_ATTR, this.options.uid);\n },\n addIdAttr: function () {\n if (this.options.id) {\n this.element.attr('id', this.options.id);\n }\n },\n addOverflowIdAttr: function () {\n if (this.options.id) {\n this.element.attr('id', this.options.id + '_overflow');\n }\n },\n attributes: function () {\n if (this.options.attributes) {\n this.element.attr(this.options.attributes);\n }\n },\n show: function () {\n this.element.removeClass(STATE_HIDDEN);\n this.element.removeClass(HIDDEN);\n this.options.hidden = false;\n },\n hide: function () {\n this.element.addClass(STATE_HIDDEN);\n this.element.addClass(HIDDEN);\n if (this.overflow && this.overflowHidden) {\n this.overflowHidden();\n }\n this.options.hidden = true;\n },\n remove: function () {\n this.element.remove();\n },\n enable: function (isEnabled) {\n if (isEnabled === undefined) {\n isEnabled = true;\n }\n this.element.toggleClass(STATE_DISABLED, !isEnabled);\n this.element.attr(ARIA_DISABLED, !isEnabled);\n this.options.enable = isEnabled;\n },\n twin: function () {\n var uid = this.element.attr(KENDO_UID_ATTR);\n if (this.overflow && this.options.splitContainerId) {\n return $('#' + this.options.splitContainerId).find('[' + KENDO_UID_ATTR + '=\\'' + uid + '\\']').data(this.options.type);\n } else if (this.overflow) {\n return this.toolbar.element.find('[' + KENDO_UID_ATTR + '=\\'' + uid + '\\']').data(this.options.type);\n } else if (this.toolbar.options.resizable) {\n return this.toolbar.popup.element.find('[' + KENDO_UID_ATTR + '=\\'' + uid + '\\']').data(this.options.type);\n }\n }\n });\n kendo.toolbar.Item = Item;\n var Button = Item.extend({\n init: function (options, toolbar) {\n var element = options.useButtonTag ? $('') : $('');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.attributes();\n if (options.primary) {\n element.addClass(PRIMARY);\n }\n if (options.togglable) {\n element.addClass(TOGGLE_BUTTON);\n this.toggle(options.selected);\n }\n if (options.url !== undefined && !options.useButtonTag) {\n element.attr('href', options.url);\n if (options.mobile) {\n element.attr(kendo.attr('role'), 'button');\n }\n }\n if (options.group) {\n element.attr(kendo.attr('group'), options.group);\n this.group = this.toolbar.addToGroup(this, options.group);\n }\n if (!options.togglable && options.click && isFunction(options.click)) {\n this.clickHandler = options.click;\n }\n if (options.togglable && options.toggle && isFunction(options.toggle)) {\n this.toggleHandler = options.toggle;\n }\n },\n toggle: function (state, propagate) {\n state = !!state;\n if (this.group && state) {\n this.group.select(this);\n } else if (!this.group) {\n this.select(state);\n }\n if (propagate && this.twin()) {\n this.twin().toggle(state);\n }\n },\n getParentGroup: function () {\n if (this.options.isChild) {\n return this.element.closest('.' + BUTTON_GROUP).data('buttonGroup');\n }\n },\n _addGraphics: function () {\n var element = this.element, icon = this.options.icon, spriteCssClass = this.options.spriteCssClass, imageUrl = this.options.imageUrl, isEmpty, span, img;\n if (spriteCssClass || imageUrl || icon) {\n isEmpty = true;\n element.contents().filter(function () {\n return !$(this).hasClass('k-sprite') && !$(this).hasClass(ICON) && !$(this).hasClass('k-image');\n }).each(function (idx, el) {\n if (el.nodeType == 1 || el.nodeType == 3 && kendo.trim(el.nodeValue).length > 0) {\n isEmpty = false;\n }\n });\n if (isEmpty) {\n element.addClass(BUTTON_ICON);\n } else {\n element.addClass(BUTTON_ICON_TEXT);\n }\n }\n if (icon) {\n span = element.children('span.' + ICON).first();\n if (!span[0]) {\n span = $('').prependTo(element);\n }\n span.addClass(ICON_PREFIX + icon);\n } else if (spriteCssClass) {\n span = element.children('span.k-sprite').first();\n if (!span[0]) {\n span = $('').prependTo(element);\n }\n span.addClass(spriteCssClass);\n } else if (imageUrl) {\n img = element.children('img.k-image').first();\n if (!img[0]) {\n img = $('\"icon\"').prependTo(element);\n }\n img.attr('src', imageUrl);\n }\n }\n });\n kendo.toolbar.Button = Button;\n var ToolBarButton = Button.extend({\n init: function (options, toolbar) {\n Button.fn.init.call(this, options, toolbar);\n var element = this.element;\n element.addClass(BUTTON);\n this.addIdAttr();\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n if (options.showText != 'overflow' && options.text) {\n if (options.mobile) {\n element.html('' + options.text + '');\n } else {\n element.html(options.text);\n }\n }\n options.hasIcon = options.showIcon != 'overflow' && (options.icon || options.spriteCssClass || options.imageUrl);\n if (options.hasIcon) {\n this._addGraphics();\n }\n this.addUidAttr();\n this.addOverflowAttr();\n this.enable(options.enable);\n if (options.hidden) {\n this.hide();\n }\n this.element.data({\n type: 'button',\n button: this\n });\n },\n select: function (selected) {\n if (selected === undefined) {\n selected = false;\n }\n if (this.options.togglable) {\n this.element.attr(ARIA_PRESSED, selected);\n }\n this.element.toggleClass(STATE_ACTIVE, selected);\n this.options.selected = selected;\n }\n });\n kendo.toolbar.ToolBarButton = ToolBarButton;\n var OverflowButton = Button.extend({\n init: function (options, toolbar) {\n this.overflow = true;\n Button.fn.init.call(this, $.extend({}, options), toolbar);\n var element = this.element;\n if (options.showText != 'toolbar' && options.text) {\n if (options.mobile) {\n element.html('' + options.text + '');\n } else {\n element.html('' + options.text + '');\n }\n }\n options.hasIcon = options.showIcon != 'toolbar' && (options.icon || options.spriteCssClass || options.imageUrl);\n if (options.hasIcon) {\n this._addGraphics();\n }\n if (!options.isChild) {\n this._wrap();\n }\n this.addOverflowIdAttr();\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.enable(options.enable);\n element.addClass(OVERFLOW_BUTTON + ' ' + BUTTON);\n if (options.hidden) {\n this.hide();\n }\n if (options.togglable) {\n this.toggle(options.selected);\n }\n this.element.data({\n type: 'button',\n button: this\n });\n },\n _wrap: function () {\n this.element = this.element.wrap('
  • ').parent();\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n },\n select: function (selected) {\n if (selected === undefined) {\n selected = false;\n }\n if (this.options.isChild) {\n this.element.toggleClass(STATE_ACTIVE, selected);\n } else {\n this.element.find('.k-button').toggleClass(STATE_ACTIVE, selected);\n }\n this.options.selected = selected;\n }\n });\n kendo.toolbar.OverflowButton = OverflowButton;\n kendo.toolbar.registerComponent('button', ToolBarButton, OverflowButton);\n var ButtonGroup = Item.extend({\n createButtons: function (buttonConstructor) {\n var options = this.options;\n var items = options.buttons || [];\n var item;\n for (var i = 0; i < items.length; i++) {\n if (!items[i].uid) {\n items[i].uid = kendo.guid();\n }\n item = new buttonConstructor($.extend({\n mobile: options.mobile,\n isChild: true,\n type: 'button'\n }, items[i]), this.toolbar);\n item.element.appendTo(this.element);\n }\n },\n refresh: function () {\n this.element.children().filter(':not(\\'.' + STATE_HIDDEN + '\\'):first').addClass(GROUP_START);\n this.element.children().filter(':not(\\'.' + STATE_HIDDEN + '\\'):last').addClass(GROUP_END);\n }\n });\n kendo.toolbar.ButtonGroup = ButtonGroup;\n var ToolBarButtonGroup = ButtonGroup.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
    ');\n this.options = options;\n this.toolbar = toolbar;\n this.addIdAttr();\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n this.createButtons(ToolBarButton);\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.refresh();\n element.addClass(BUTTON_GROUP);\n this.element.data({\n type: 'buttonGroup',\n buttonGroup: this\n });\n }\n });\n kendo.toolbar.ToolBarButtonGroup = ToolBarButtonGroup;\n var OverflowButtonGroup = ButtonGroup.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  • ');\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n this.addOverflowIdAttr();\n this.createButtons(OverflowButton);\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.refresh();\n element.addClass((options.mobile ? '' : BUTTON_GROUP) + ' k-overflow-group');\n this.element.data({\n type: 'buttonGroup',\n buttonGroup: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowButtonGroup = OverflowButtonGroup;\n kendo.toolbar.registerComponent('buttonGroup', ToolBarButtonGroup, OverflowButtonGroup);\n var ToolBarSplitButton = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
    ');\n this.options = options;\n this.toolbar = toolbar;\n this.mainButton = new ToolBarButton($.extend({}, options, { hidden: false }), toolbar);\n this.arrowButton = $('');\n this.popupElement = $('');\n this.mainButton.element.removeAttr('href tabindex').appendTo(element);\n this.arrowButton.appendTo(element);\n this.popupElement.appendTo(element);\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n if (!options.id) {\n options.id = options.uid;\n }\n element.attr('id', options.id + '_wrapper');\n this.addOverflowAttr();\n this.addUidAttr();\n this.createMenuButtons();\n this.createPopup();\n this._navigatable();\n this.mainButton.main = true;\n this.enable(options.enable);\n if (options.hidden) {\n this.hide();\n }\n element.data({\n type: 'splitButton',\n splitButton: this,\n kendoPopup: this.popup\n });\n },\n _navigatable: function () {\n var that = this;\n that.popupElement.on('keydown' + ns, '.' + BUTTON, function (e) {\n var li = $(e.target).parent();\n e.preventDefault();\n if (e.keyCode === keys.ESC || e.keyCode === keys.TAB || e.altKey && e.keyCode === keys.UP) {\n that.toggle();\n that.focus();\n } else if (e.keyCode === keys.DOWN) {\n findFocusableSibling(li, 'next').focus();\n } else if (e.keyCode === keys.UP) {\n findFocusableSibling(li, 'prev').focus();\n } else if (e.keyCode === keys.SPACEBAR || e.keyCode === keys.ENTER) {\n that.toolbar.userEvents.trigger('tap', { target: $(e.target) });\n } else if (e.keyCode === keys.HOME) {\n li.parent().find(':kendoFocusable').first().focus();\n } else if (e.keyCode === keys.END) {\n li.parent().find(':kendoFocusable').last().focus();\n }\n });\n },\n createMenuButtons: function () {\n var options = this.options;\n var items = options.menuButtons;\n var item;\n for (var i = 0; i < items.length; i++) {\n item = new ToolBarButton($.extend({\n mobile: options.mobile,\n type: 'button',\n click: options.click\n }, items[i]), this.toolbar);\n item.element.wrap('
  • ').parent().appendTo(this.popupElement);\n }\n },\n createPopup: function () {\n var that = this;\n var options = this.options;\n var element = this.element;\n this.popupElement.attr('id', options.id + OPTION_LIST_SUFFIX).attr(KENDO_UID_ATTR, options.rootUid);\n if (options.mobile) {\n this.popupElement = actionSheetWrap(this.popupElement);\n }\n this.popup = this.popupElement.kendoPopup({\n appendTo: options.mobile ? $(options.mobile).children('.km-pane') : null,\n anchor: element,\n isRtl: this.toolbar._isRtl,\n copyAnchorStyles: false,\n animation: options.animation,\n open: function (e) {\n var isDefaultPrevented = that.toolbar.trigger(OPEN, { target: element });\n if (isDefaultPrevented) {\n e.preventDefault();\n return;\n }\n that.adjustPopupWidth(e.sender);\n },\n activate: function () {\n this.element.find(':kendoFocusable').first().focus();\n },\n close: function (e) {\n var isDefaultPrevented = that.toolbar.trigger(CLOSE, { target: element });\n if (isDefaultPrevented) {\n e.preventDefault();\n }\n element.focus();\n }\n }).data('kendoPopup');\n this.popup.element.on(CLICK + ns, 'a.k-button', preventClick);\n },\n adjustPopupWidth: function (popup) {\n var anchor = popup.options.anchor, computedWidth = outerWidth(anchor), width;\n kendo.wrap(popup.element).addClass('k-split-wrapper');\n if (popup.element.css('box-sizing') !== 'border-box') {\n width = computedWidth - (outerWidth(popup.element) - popup.element.width());\n } else {\n width = computedWidth;\n }\n popup.element.css({\n fontFamily: anchor.css('font-family'),\n 'min-width': width\n });\n },\n remove: function () {\n this.popup.element.off(CLICK + ns, 'a.k-button');\n this.popup.destroy();\n this.element.remove();\n },\n toggle: function () {\n if (this.options.enable || this.popup.visible()) {\n this.popup.toggle();\n }\n },\n enable: function (isEnabled) {\n if (isEnabled === undefined) {\n isEnabled = true;\n }\n this.mainButton.enable(isEnabled);\n this.element.toggleClass(STATE_DISABLED, !isEnabled);\n this.element.attr(ARIA_DISABLED, !isEnabled);\n this.options.enable = isEnabled;\n },\n focus: function () {\n this.element.focus();\n },\n hide: function () {\n if (this.popup) {\n this.popup.close();\n }\n this.element.addClass(STATE_HIDDEN);\n this.element.addClass(HIDDEN);\n this.options.hidden = true;\n },\n show: function () {\n this.element.removeClass(STATE_HIDDEN);\n this.element.removeClass(HIDDEN);\n this.options.hidden = false;\n }\n });\n kendo.toolbar.ToolBarSplitButton = ToolBarSplitButton;\n var OverflowSplitButton = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  • '), items = options.menuButtons, item, splitContainerId;\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n splitContainerId = (options.id || options.uid) + OPTION_LIST_SUFFIX;\n this.mainButton = new OverflowButton($.extend({ isChild: true }, options));\n this.mainButton.element.appendTo(element);\n for (var i = 0; i < items.length; i++) {\n item = new OverflowButton($.extend({\n mobile: options.mobile,\n type: 'button',\n splitContainerId: splitContainerId,\n isChild: true\n }, items[i]), this.toolbar);\n item.element.appendTo(element);\n }\n this.addUidAttr();\n this.addOverflowAttr();\n this.mainButton.main = true;\n element.data({\n type: 'splitButton',\n splitButton: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowSplitButton = OverflowSplitButton;\n kendo.toolbar.registerComponent('splitButton', ToolBarSplitButton, OverflowSplitButton);\n var ToolBarSeparator = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
     
    ');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.attributes();\n this.addIdAttr();\n this.addUidAttr();\n this.addOverflowAttr();\n element.addClass(SEPARATOR);\n element.data({\n type: 'separator',\n separator: this\n });\n }\n });\n var OverflowSeparator = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  •  
  • ');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n this.attributes();\n this.addUidAttr();\n this.addOverflowIdAttr();\n element.addClass(SEPARATOR);\n element.data({\n type: 'separator',\n separator: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.registerComponent('separator', ToolBarSeparator, OverflowSeparator);\n var ToolBarSpacer = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
     
    ');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n element.addClass(SPACER_CLASS);\n element.data({ type: SPACER });\n }\n });\n kendo.toolbar.registerComponent(SPACER, ToolBarSpacer);\n var TemplateItem = Item.extend({\n init: function (template, options, toolbar) {\n var element = isFunction(template) ? template(options) : template;\n if (!(element instanceof jQuery)) {\n element = $('
    ').html(element);\n } else {\n element = element.wrap('
    ').parent();\n }\n this.element = element;\n this.options = options;\n this.options.type = 'template';\n this.toolbar = toolbar;\n this.attributes();\n this.addUidAttr();\n this.addIdAttr();\n this.addOverflowAttr();\n element.data({\n type: 'template',\n template: this\n });\n }\n });\n kendo.toolbar.TemplateItem = TemplateItem;\n var OverflowTemplateItem = Item.extend({\n init: function (template, options, toolbar) {\n var element = isFunction(template) ? $(template(options)) : $(template);\n if (!(element instanceof jQuery)) {\n element = $('
  • ').html(element);\n } else {\n element = element.wrap('
  • ').parent();\n }\n this.element = element;\n this.options = options;\n this.options.type = 'template';\n this.toolbar = toolbar;\n this.overflow = true;\n this.attributes();\n this.addUidAttr();\n this.addOverflowIdAttr();\n this.addOverflowAttr();\n element.data({\n type: 'template',\n template: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowTemplateItem = OverflowTemplateItem;\n function toggleActive(e) {\n if (!e.target.is('.k-toggle-button')) {\n e.target.toggleClass(STATE_ACTIVE, e.type == 'press');\n }\n }\n function actionSheetWrap(element) {\n element = $(element);\n return element.hasClass('km-actionsheet') ? element.closest('.km-popup-wrapper') : element.addClass('km-widget km-actionsheet').wrap('
    ').parent().wrap('
    ').parent();\n }\n function preventClick(e) {\n if ($(e.target).closest('a.k-button').length) {\n e.preventDefault();\n }\n }\n function findFocusableSibling(element, dir) {\n var getSibling = dir === 'next' ? $.fn.next : $.fn.prev;\n var getter = dir === 'next' ? $.fn.first : $.fn.last;\n var candidate = getSibling.call(element);\n if (!candidate.length && element.is('.' + OVERFLOW_ANCHOR)) {\n return element;\n }\n if (candidate.is(':kendoFocusable') || !candidate.length) {\n return candidate;\n }\n if (candidate.find(':kendoFocusable').length) {\n return getter.call(candidate.find(':kendoFocusable'));\n }\n return findFocusableSibling(candidate, dir);\n }\n var Group = Class.extend({\n init: function (name) {\n this.name = name;\n this.buttons = [];\n },\n add: function (button) {\n this.buttons[this.buttons.length] = button;\n },\n remove: function (button) {\n var index = $.inArray(button, this.buttons);\n this.buttons.splice(index, 1);\n },\n select: function (button) {\n var tmp;\n for (var i = 0; i < this.buttons.length; i++) {\n tmp = this.buttons[i];\n tmp.select(false);\n }\n button.select(true);\n if (button.twin()) {\n button.twin().select(true);\n }\n }\n });\n var ToolBar = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n options = that.options;\n element = that.wrapper = that.element;\n element.addClass(TOOLBAR + ' k-widget');\n this.uid = kendo.guid();\n this._isRtl = kendo.support.isRtl(element);\n this._groups = {};\n element.attr(KENDO_UID_ATTR, this.uid);\n that.isMobile = typeof options.mobile === 'boolean' ? options.mobile : that.element.closest('.km-root')[0];\n that.animation = that.isMobile ? { open: { effects: 'fade' } } : {};\n if (that.isMobile) {\n element.addClass('km-widget');\n ICON = 'km-icon';\n ICON_PREFIX = 'km-';\n BUTTON = 'km-button';\n BUTTON_GROUP = 'km-buttongroup';\n STATE_ACTIVE = 'km-state-active';\n STATE_DISABLED = 'km-state-disabled';\n }\n if (options.resizable) {\n that._renderOverflow();\n element.addClass(RESIZABLE_TOOLBAR);\n that.overflowUserEvents = new kendo.UserEvents(that.element, {\n threshold: 5,\n allowSelection: true,\n filter: '.' + OVERFLOW_ANCHOR,\n tap: proxy(that._toggleOverflow, that)\n });\n that._resizeHandler = kendo.onResize(function () {\n that.resize();\n });\n } else {\n that.popup = { element: $([]) };\n }\n if (options.items && options.items.length) {\n for (var i = 0; i < options.items.length; i++) {\n that.add(options.items[i]);\n }\n if (options.resizable) {\n that._shrink(that.element.innerWidth());\n }\n }\n that.userEvents = new kendo.UserEvents(document, {\n threshold: 5,\n allowSelection: true,\n filter: '[' + KENDO_UID_ATTR + '=' + this.uid + '] a.' + BUTTON + ', ' + '[' + KENDO_UID_ATTR + '=' + this.uid + '] .' + OVERFLOW_BUTTON,\n tap: proxy(that._buttonClick, that),\n press: toggleActive,\n release: toggleActive\n });\n that.element.on(CLICK + ns, 'a.k-button', preventClick);\n that._navigatable();\n if (options.resizable) {\n that.popup.element.on(CLICK + ns, +'a.k-button', preventClick);\n }\n if (options.resizable) {\n this._toggleOverflowAnchor();\n }\n kendo.notify(that);\n },\n events: [\n CLICK,\n TOGGLE,\n OPEN,\n CLOSE,\n OVERFLOW_OPEN,\n OVERFLOW_CLOSE\n ],\n options: {\n name: 'ToolBar',\n items: [],\n resizable: true,\n mobile: null\n },\n addToGroup: function (button, groupName) {\n var group;\n if (!this._groups[groupName]) {\n group = this._groups[groupName] = new Group();\n } else {\n group = this._groups[groupName];\n }\n group.add(button);\n return group;\n },\n destroy: function () {\n var that = this;\n that.element.find('.' + SPLIT_BUTTON).each(function (idx, element) {\n $(element).data('kendoPopup').destroy();\n });\n that.element.off(ns, 'a.k-button');\n that.userEvents.destroy();\n if (that.options.resizable) {\n kendo.unbindResize(that._resizeHandler);\n that.overflowUserEvents.destroy();\n that.popup.element.off(ns, 'a.k-button');\n that.popup.destroy();\n }\n Widget.fn.destroy.call(that);\n },\n add: function (options) {\n var component = components[options.type], template = options.template, tool, that = this, itemClasses = that.isMobile ? '' : 'k-item k-state-default', overflowTemplate = options.overflowTemplate, overflowTool;\n $.extend(options, {\n uid: kendo.guid(),\n animation: that.animation,\n mobile: that.isMobile,\n rootUid: that.uid\n });\n if (options.menuButtons) {\n for (var i = 0; i < options.menuButtons.length; i++) {\n $.extend(options.menuButtons[i], { uid: kendo.guid() });\n }\n }\n if (template && !overflowTemplate || options.type === SPACER) {\n options.overflow = OVERFLOW_NEVER;\n } else if (!options.overflow) {\n options.overflow = OVERFLOW_AUTO;\n }\n if (options.overflow !== OVERFLOW_NEVER && that.options.resizable) {\n if (overflowTemplate) {\n overflowTool = new OverflowTemplateItem(overflowTemplate, options, that);\n } else if (component) {\n overflowTool = new component.overflow(options, that);\n overflowTool.element.addClass(itemClasses);\n }\n if (overflowTool) {\n if (options.overflow === OVERFLOW_AUTO) {\n overflowTool.overflowHidden();\n }\n overflowTool.element.appendTo(that.popup.container);\n that.angular('compile', function () {\n return { elements: overflowTool.element.get() };\n });\n }\n }\n if (options.overflow !== OVERFLOW_ALWAYS) {\n if (template) {\n tool = new TemplateItem(template, options, that);\n } else if (component) {\n tool = new component.toolbar(options, that);\n }\n if (tool) {\n tool.element.appendTo(that.element);\n that.angular('compile', function () {\n return { elements: tool.element.get() };\n });\n }\n }\n },\n _getItem: function (candidate) {\n var element, toolbarItem, overflowItem, isResizable = this.options.resizable, type;\n element = this.element.find(candidate);\n if (!element.length) {\n element = $('.k-split-container[data-uid=' + this.uid + ']').find(candidate);\n }\n type = element.length ? element.data('type') : '';\n toolbarItem = element.data(type);\n if (toolbarItem) {\n if (toolbarItem.main) {\n element = element.parent('.' + SPLIT_BUTTON);\n type = 'splitButton';\n toolbarItem = element.data(type);\n }\n if (isResizable) {\n overflowItem = toolbarItem.twin();\n }\n } else if (isResizable) {\n element = this.popup.element.find(candidate);\n type = element.length ? element.data('type') : '';\n overflowItem = element.data(type);\n if (overflowItem && overflowItem.main) {\n element = element.parent('.' + SPLIT_BUTTON);\n type = 'splitButton';\n overflowItem = element.data(type);\n }\n }\n return {\n type: type,\n toolbar: toolbarItem,\n overflow: overflowItem\n };\n },\n remove: function (candidate) {\n var item = this._getItem(candidate);\n if (item.toolbar) {\n item.toolbar.remove();\n }\n if (item.overflow) {\n item.overflow.remove();\n }\n this.resize(true);\n },\n hide: function (candidate) {\n var item = this._getItem(candidate);\n var buttonGroupInstance;\n if (item.toolbar) {\n if (item.toolbar.options.type === 'button' && item.toolbar.options.isChild) {\n buttonGroupInstance = item.toolbar.getParentGroup();\n item.toolbar.hide();\n if (buttonGroupInstance) {\n buttonGroupInstance.refresh();\n }\n } else if (!item.toolbar.options.hidden) {\n item.toolbar.hide();\n }\n }\n if (item.overflow) {\n if (item.overflow.options.type === 'button' && item.overflow.options.isChild) {\n buttonGroupInstance = item.overflow.getParentGroup();\n item.overflow.hide();\n if (buttonGroupInstance) {\n buttonGroupInstance.refresh();\n }\n } else if (!item.overflow.options.hidden) {\n item.overflow.hide();\n }\n }\n this.resize(true);\n },\n show: function (candidate) {\n var item = this._getItem(candidate);\n var buttonGroupInstance;\n if (item.toolbar) {\n if (item.toolbar.options.type === 'button' && item.toolbar.options.isChild) {\n buttonGroupInstance = item.toolbar.getParentGroup();\n item.toolbar.show();\n if (buttonGroupInstance) {\n buttonGroupInstance.refresh();\n }\n } else if (item.toolbar.options.hidden) {\n item.toolbar.show();\n }\n }\n if (item.overflow) {\n if (item.overflow.options.type === 'button' && item.overflow.options.isChild) {\n buttonGroupInstance = item.overflow.getParentGroup();\n item.toolbar.show();\n if (buttonGroupInstance) {\n buttonGroupInstance.refresh();\n }\n } else if (item.overflow.options.hidden) {\n item.overflow.show();\n }\n }\n this.resize(true);\n },\n enable: function (element, enable) {\n var item = this._getItem(element);\n if (typeof enable == 'undefined') {\n enable = true;\n }\n if (item.toolbar) {\n item.toolbar.enable(enable);\n }\n if (item.overflow) {\n item.overflow.enable(enable);\n }\n },\n getSelectedFromGroup: function (groupName) {\n return this.element.find('.' + TOGGLE_BUTTON + '[data-group=\\'' + groupName + '\\']').filter('.' + STATE_ACTIVE);\n },\n toggle: function (button, checked) {\n var element = $(button), item = element.data('button');\n if (item.options.togglable) {\n if (checked === undefined) {\n checked = true;\n }\n item.toggle(checked, true);\n }\n },\n _renderOverflow: function () {\n var that = this, overflowContainer = components.overflowContainer, isRtl = that._isRtl, horizontalDirection = isRtl ? 'left' : 'right';\n that.overflowAnchor = $(components.overflowAnchor).addClass(BUTTON);\n that.element.append(that.overflowAnchor);\n if (that.isMobile) {\n that.overflowAnchor.append('');\n overflowContainer = actionSheetWrap(overflowContainer);\n } else {\n that.overflowAnchor.append('');\n }\n that.popup = new kendo.ui.Popup(overflowContainer, {\n origin: 'bottom ' + horizontalDirection,\n position: 'top ' + horizontalDirection,\n anchor: that.overflowAnchor,\n isRtl: isRtl,\n animation: that.animation,\n appendTo: that.isMobile ? $(that.isMobile).children('.km-pane') : null,\n copyAnchorStyles: false,\n open: function (e) {\n var wrapper = kendo.wrap(that.popup.element).addClass('k-overflow-wrapper');\n if (!that.isMobile) {\n wrapper.css('margin-left', (isRtl ? -1 : 1) * ((outerWidth(wrapper) - wrapper.width()) / 2 + 1));\n } else {\n that.popup.container.css('max-height', parseFloat($('.km-content:visible').innerHeight()) - 15 + 'px');\n }\n if (that.trigger(OVERFLOW_OPEN)) {\n e.preventDefault();\n }\n },\n activate: function () {\n this.element.find(':kendoFocusable').first().focus();\n },\n close: function (e) {\n if (that.trigger(OVERFLOW_CLOSE)) {\n e.preventDefault();\n }\n this.element.focus();\n }\n });\n that.popup.element.on('keydown' + ns, '.' + BUTTON, function (e) {\n var target = $(e.target), li = target.parent(), isComplexTool = li.is('.' + BUTTON_GROUP) || li.is('.' + SPLIT_BUTTON), element;\n e.preventDefault();\n if (e.keyCode === keys.ESC || e.keyCode === keys.TAB || e.altKey && e.keyCode === keys.UP) {\n that._toggleOverflow();\n that.overflowAnchor.focus();\n } else if (e.keyCode === keys.DOWN) {\n element = !isComplexTool || isComplexTool && target.is(':last-child') ? li : target;\n findFocusableSibling(element, 'next').focus();\n } else if (e.keyCode === keys.UP) {\n element = !isComplexTool || isComplexTool && target.is(':first-child') ? li : target;\n findFocusableSibling(element, 'prev').focus();\n } else if (e.keyCode === keys.SPACEBAR || e.keyCode === keys.ENTER) {\n that.userEvents.trigger('tap', { target: $(e.target) });\n that.overflowAnchor.focus();\n } else if (e.keyCode === keys.HOME) {\n li.parent().find(':kendoFocusable').first().focus();\n } else if (e.keyCode === keys.END) {\n li.parent().find(':kendoFocusable').last().focus();\n }\n });\n if (that.isMobile) {\n that.popup.container = that.popup.element.find('.' + OVERFLOW_CONTAINER);\n } else {\n that.popup.container = that.popup.element;\n }\n that.popup.container.attr(KENDO_UID_ATTR, this.uid);\n },\n _toggleOverflowAnchor: function () {\n var hasVisibleChildren = false;\n var paddingEnd = this._isRtl ? 'padding-left' : 'padding-right';\n if (this.options.mobile) {\n hasVisibleChildren = this.popup.element.find('.' + OVERFLOW_CONTAINER).children(':not(.' + OVERFLOW_HIDDEN + ', .' + POPUP + ')').length > 0;\n } else {\n hasVisibleChildren = this.popup.element.children(':not(.' + OVERFLOW_HIDDEN + ', .' + POPUP + ')').length > 0;\n }\n if (hasVisibleChildren) {\n this.overflowAnchor.css({\n visibility: 'visible',\n width: ''\n });\n this.wrapper.css(paddingEnd, this.overflowAnchor.outerWidth(true));\n } else {\n this.overflowAnchor.css({\n visibility: 'hidden',\n width: '1px'\n });\n this.wrapper.css(paddingEnd, '');\n }\n },\n _buttonClick: function (e) {\n var that = this, popup, target, item, splitContainer, isSplitButtonArrow = e.target.closest('.' + SPLIT_BUTTON_ARROW).length, handler, eventData, urlTarget;\n e.preventDefault();\n if (isSplitButtonArrow) {\n that._toggle(e);\n return;\n }\n target = $(e.target).closest('.' + BUTTON, that.element);\n if (target.hasClass(OVERFLOW_ANCHOR)) {\n return;\n }\n item = target.data('button');\n if (!item && that.popup) {\n target = $(e.target).closest('.' + OVERFLOW_BUTTON, that.popup.container);\n item = target.parent('li').data('button');\n }\n if (!item || !item.options.enable) {\n return;\n }\n if (item.options.togglable) {\n handler = isFunction(item.toggleHandler) ? item.toggleHandler : null;\n item.toggle(!item.options.selected, true);\n eventData = {\n target: target,\n group: item.options.group,\n checked: item.options.selected,\n id: item.options.id,\n item: item\n };\n if (handler) {\n handler.call(that, eventData);\n }\n that.trigger(TOGGLE, eventData);\n } else {\n handler = isFunction(item.clickHandler) ? item.clickHandler : null;\n eventData = {\n sender: that,\n target: target,\n id: item.options.id,\n item: item\n };\n if (handler) {\n handler.call(that, eventData);\n }\n that.trigger(CLICK, eventData);\n }\n if (item.options.url) {\n if (item.options.attributes && item.options.attributes.target) {\n urlTarget = item.options.attributes.target;\n }\n window.open(item.options.url, urlTarget || '_self');\n }\n if (target.hasClass(OVERFLOW_BUTTON)) {\n that.popup.close();\n }\n splitContainer = target.closest('.k-split-container');\n if (splitContainer[0]) {\n popup = splitContainer.data('kendoPopup');\n (popup ? popup : splitContainer.parents('.km-popup-wrapper').data('kendoPopup')).close();\n }\n },\n _navigatable: function () {\n var that = this;\n that.element.attr('tabindex', 0).on('focusin' + ns, function (ev) {\n var target = $(ev.target);\n var element = $(this).find(':kendoFocusable:first');\n if (!target.is('.' + TOOLBAR) || element.length === 0) {\n return;\n }\n if (element.is('.' + OVERFLOW_ANCHOR)) {\n element = findFocusableSibling(element, 'next');\n }\n if (element.length) {\n element[0].focus();\n }\n }).on('keydown' + ns, proxy(that._keydown, that));\n },\n _keydown: function (e) {\n var target = $(e.target), keyCode = e.keyCode, items = this.element.children(':not(.k-separator):visible'), direction = this._isRtl ? -1 : 1;\n if (keyCode === keys.TAB) {\n var element = target.parentsUntil(this.element).last(), lastHasFocus = false, firstHasFocus = false, isOnlyOverflowAnchor = false;\n if (!items.not('.' + OVERFLOW_ANCHOR).length) {\n isOnlyOverflowAnchor = true;\n }\n if (!element.length) {\n element = target;\n }\n if (element.is('.' + OVERFLOW_ANCHOR) && !isOnlyOverflowAnchor) {\n var lastItemNotOverflowAnchor = items.last();\n if (e.shiftKey) {\n e.preventDefault();\n }\n if (lastItemNotOverflowAnchor.is(':kendoFocusable')) {\n items.last().focus();\n } else {\n items.last().find(':kendoFocusable').last().focus();\n }\n }\n if (!e.shiftKey && items.index(element) === items.length - 1) {\n if (element.is('.' + BUTTON_GROUP)) {\n lastHasFocus = target.is(':last-child');\n } else {\n lastHasFocus = true;\n }\n }\n var isFirstTool = items.index(element) === items.not('.k-overflow-anchor').first().index();\n if (e.shiftKey && isFirstTool) {\n if (element.is('.' + BUTTON_GROUP)) {\n firstHasFocus = target.is(':first-child');\n } else {\n firstHasFocus = true;\n }\n }\n if (lastHasFocus && this.overflowAnchor && this.overflowAnchor.css('visibility') !== 'hidden' && !isOnlyOverflowAnchor) {\n e.preventDefault();\n this.overflowAnchor.focus();\n }\n if (firstHasFocus || isOnlyOverflowAnchor && e.shiftKey) {\n e.preventDefault();\n var prevFocusable = this._getPrevFocusable(this.wrapper);\n if (prevFocusable) {\n prevFocusable.focus();\n }\n }\n this._preventNextFocus = false;\n }\n if (e.altKey && keyCode === keys.DOWN) {\n var splitButton = $(document.activeElement).data('splitButton');\n var isOverflowAnchor = $(document.activeElement).is('.' + OVERFLOW_ANCHOR);\n if (splitButton) {\n splitButton.toggle();\n } else if (isOverflowAnchor) {\n this._toggleOverflow();\n }\n return;\n }\n if ((keyCode === keys.SPACEBAR || keyCode === keys.ENTER) && !target.is('input, checkbox')) {\n if (keyCode === keys.SPACEBAR) {\n e.preventDefault();\n }\n if (target.is('.' + SPLIT_BUTTON)) {\n target = target.children().first();\n this.userEvents.trigger('tap', { target: target });\n } else if (keyCode === keys.SPACEBAR) {\n this.userEvents.trigger('tap', { target: target });\n }\n return;\n }\n if (keyCode === keys.HOME) {\n if (target.is('.k-dropdown') || target.is('input')) {\n return;\n }\n if (this.overflowAnchor) {\n items.eq(1).focus();\n } else {\n items.first().focus();\n }\n e.preventDefault();\n } else if (keyCode === keys.END) {\n if (target.is('.k-dropdown') || target.is('input')) {\n return;\n }\n if (this.overflowAnchor && $(this.overflowAnchor).css('visibility') != 'hidden') {\n this.overflowAnchor.focus();\n } else {\n items.last().focus();\n }\n e.preventDefault();\n } else if (keyCode === keys.RIGHT && !this._preventNextFocus && !target.is('input, select, .k-dropdown, .k-colorpicker') && this._getNextElement(e.target, 1 * direction)) {\n this._getNextElement(e.target, 1 * direction).focus();\n e.preventDefault();\n } else if (keyCode === keys.LEFT && !this._preventNextFocus && !target.is('input, select, .k-dropdown, .k-colorpicker') && this._getNextElement(e.target, -1 * direction)) {\n this._getNextElement(e.target, -1 * direction).focus();\n e.preventDefault();\n }\n },\n _getNextElement: function (item, direction) {\n var items = this.element.children(':not(.k-separator):visible');\n var itemIndex = items.index(item) === -1 ? items.index(item.parentElement) : items.index(item);\n var startIndex = this.overflowAnchor ? 1 : 0;\n var directionNumber = direction;\n var searchIndex = direction === 1 ? items.length - 1 : startIndex;\n var index = direction === 1 ? startIndex : items.length - 1;\n var focusableItem = items[itemIndex + direction];\n this._preventNextFocus = false;\n if ($(item).closest('.' + BUTTON_GROUP).length && !$(item).is(direction === 1 ? ':last-child' : ':first-child')) {\n return $(item).closest('.' + BUTTON_GROUP).children()[$(item).closest('.' + BUTTON_GROUP).children().index(item) + direction];\n }\n if (this.overflowAnchor && item === this.overflowAnchor[0] && direction === -1) {\n focusableItem = items[items.length - 1];\n }\n if (itemIndex === searchIndex) {\n focusableItem = !this.overflowAnchor || this.overflowAnchor && $(this.overflowAnchor).css('visibility') === 'hidden' ? items[index] : this.overflowAnchor;\n }\n while (!$(focusableItem).is(':kendoFocusable')) {\n if (direction === -1 && $(focusableItem).closest('.' + BUTTON_GROUP).length) {\n focusableItem = $(focusableItem).children(':not(label, div)').last();\n } else {\n focusableItem = $(focusableItem).children(':not(label, div)').first();\n }\n if (!focusableItem.length) {\n directionNumber = directionNumber + direction;\n focusableItem = items[itemIndex + directionNumber];\n if (!focusableItem) {\n return this.overflowAnchor;\n }\n }\n this._preventNextFocus = $(focusableItem).closest('.' + BUTTON_GROUP).length ? false : true;\n }\n return focusableItem;\n },\n _getPrevFocusable: function (element) {\n if (element.is('html')) {\n return element;\n }\n var elementToFocus, prevElement, prevElements = element.prevAll();\n prevElements.each(function () {\n prevElement = $(this);\n if (prevElement.is(':kendoFocusable')) {\n elementToFocus = prevElement;\n return false;\n } else if (prevElement.find(':kendoFocusable').length > 0) {\n elementToFocus = prevElement.find(':kendoFocusable').last();\n return false;\n }\n });\n if (elementToFocus) {\n return elementToFocus;\n } else {\n return this._getPrevFocusable(element.parent());\n }\n },\n _toggle: function (e) {\n var splitButton = $(e.target).closest('.' + SPLIT_BUTTON).data('splitButton');\n e.preventDefault();\n if (!splitButton.options.enable) {\n return;\n }\n splitButton.toggle();\n },\n _toggleOverflow: function () {\n this.popup.toggle();\n },\n _resize: function (e) {\n var containerWidth = e.width;\n if (!this.options.resizable) {\n return;\n }\n this.popup.close();\n this._shrink(containerWidth);\n this._stretch(containerWidth);\n this._markVisibles();\n this._toggleOverflowAnchor();\n },\n _childrenWidth: function () {\n var childrenWidth = 0;\n this.element.children(':visible:not(.' + STATE_HIDDEN + ', .' + SPACER_CLASS + ')').each(function () {\n childrenWidth += outerWidth($(this), true);\n });\n return Math.ceil(childrenWidth);\n },\n _shrink: function (containerWidth) {\n var commandElement, visibleCommands;\n if (containerWidth < this._childrenWidth()) {\n visibleCommands = this.element.children(':visible:not([data-overflow=\\'never\\'], .' + OVERFLOW_ANCHOR + ')');\n for (var i = visibleCommands.length - 1; i >= 0; i--) {\n commandElement = visibleCommands.eq(i);\n if (containerWidth > this._childrenWidth()) {\n break;\n } else {\n this._hideItem(commandElement);\n }\n }\n }\n },\n _stretch: function (containerWidth) {\n var commandElement, hiddenCommands;\n if (containerWidth > this._childrenWidth()) {\n hiddenCommands = this.element.children(':hidden:not(\\'.' + STATE_HIDDEN + '\\')');\n for (var i = 0; i < hiddenCommands.length; i++) {\n commandElement = hiddenCommands.eq(i);\n if (containerWidth < this._childrenWidth() || !this._showItem(commandElement, containerWidth)) {\n break;\n }\n }\n }\n },\n _hideItem: function (item) {\n item.addClass(HIDDEN);\n if (this.popup) {\n this.popup.container.find('>li[data-uid=\\'' + item.data('uid') + '\\']').removeClass(OVERFLOW_HIDDEN);\n }\n },\n _showItem: function (item, containerWidth) {\n item.removeClass(HIDDEN);\n var itemOuterWidth = outerWidth(item, true);\n item.addClass(HIDDEN);\n if (item.length && containerWidth > this._childrenWidth() + itemOuterWidth) {\n item.removeClass(HIDDEN);\n if (this.popup) {\n this.popup.container.find('>li[data-uid=\\'' + item.data('uid') + '\\']').addClass(OVERFLOW_HIDDEN);\n }\n return true;\n }\n return false;\n },\n _markVisibles: function () {\n var overflowItems = this.popup.container.children(), toolbarItems = this.element.children(':not(.k-overflow-anchor)'), visibleOverflowItems = overflowItems.filter(':not(.k-overflow-hidden)'), visibleToolbarItems = toolbarItems.filter(':visible');\n overflowItems.add(toolbarItems).removeClass(FIRST_TOOLBAR_VISIBLE + ' ' + LAST_TOOLBAR_VISIBLE);\n visibleOverflowItems.first().add(visibleToolbarItems.first()).addClass(FIRST_TOOLBAR_VISIBLE);\n visibleOverflowItems.last().add(visibleToolbarItems.last()).addClass(LAST_TOOLBAR_VISIBLE);\n }\n });\n kendo.ui.plugin(ToolBar);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}