{"version":3,"sources":["kendo.panelbar.js"],"names":["f","define","$","undefined","updateFirstLast","items","filter","removeClass","FIRST","LAST","addClass","updateItemHtml","item","wrapper","group","children","toggleButton","hasClass","length","appendTo","remove","kendo","window","ui","keys","extend","proxy","each","isArray","template","Widget","HierarchicalDataSource","data","excludedNodesRegExp","NS","IMG","HREF","LINK","LINKSELECTOR","ERROR","ITEM","GROUP","VISIBLEGROUP","IMAGE","CHANGE","EXPAND","SELECT","CLICK","CONTENT","ACTIVATE","COLLAPSE","DATABOUND","MOUSEENTER","MOUSELEAVE","CONTENTLOAD","UNDEFINED","ACTIVECLASS","GROUPS","CONTENTS","STRING","FOCUSEDCLASS","DISABLEDCLASS","SELECTEDCLASS","SELECTEDSELECTOR","HIGHLIGHTCLASS","ACTIVEITEMSELECTOR","clickableItems","disabledItems","selectableItems","defaultState","ARIA_DISABLED","ARIA_EXPANDED","ARIA_HIDDEN","ARIA_SELECTED","VISIBLE","EMPTY","SINGLE","bindings","text","url","spriteCssClass","imageUrl","rendering","aria","attr","content","contentUrl","expanded","enabled","wrapperCssClass","result","index","cssClass","textClass","firstLevel","selected","textAttributes","arrowClass","encoded","htmlEncode","groupAttributes","ariaHidden","groupCssClass","contentAttributes","itemIcon","PanelBar","DataBoundWidget","init","element","options","hasDataSource","that","this","dataSource","fn","call","id","_itemId","_tabindex","_accessors","_dataSource","_templates","_initData","_updateClasses","_animations","on","_click","_toggleHover","_retryRequest","_keydown","select","_current","_first","find","expand","parent","_angularCompile","notify","events","name","animation","effects","duration","collapse","messages","loading","requestFailed","retry","autoBind","loadOnDemand","expandMode","dataTextField","angular","elements","dataItem","$angular","_angularCompileElements","html","map","_angularCleanup","destroy","off","empty","_progress","fetch","fieldAccessor","_fieldAccessor","templates","itemWrapper","arrow","setOptions","setDataSource","useAnimation","animBackup","_animating","is","one","setTimeout","groups","_addGroupElement","add","_collapseAllExpanded","hide","_triggerEvent","_toggleItem","updateArrow","hasChildren","append","i","field","textField","showProgress","loadingText","arguments","toggleClass","_refreshRoot","rootItemsHtml","groupData","value","idx","renderItem","trigger","eq","first","ns","_refreshChildren","parentNode","child","_toggleGroup","findByUid","uid","uidAttr","getAttribute","refresh","e","k","tempItem","node","action","level","_updateItems","_appendItems","_hasChildItems","load","_error","retryHtml","_expanded","loaded","preventDefault","_bindDataSource","_refreshHandler","_errorHandler","bind","_unbindDataSource","unbind","fieldName","fieldBindings","count","x","expr","join","fields","create","itemsHtml","insertAfter","nodeWrapper","currentNode","context","panelBar","render","clearSelection","prepend","enable","set","_toggleDisabled","closest","getByUid","skipChange","link","_updateSelected","state","disable","referenceItem","inserted","_insert","height","insertBefore","before","after","parentsUntil","reload","_ajaxRequest","_last","last","candidate","focused","_focused","removeAttr","key","keyCode","current","target","currentTarget","DOWN","RIGHT","_nextItem","UP","LEFT","_prevItem","ENTER","SPACEBAR","HOME","END","next","nextAll","prev","prevAll","plain","isPlainObject","isReferenceItem","renderGroup","not","charAt","_updateItemsClasses","parents","type","panels","panelsParent","_updateItemClasses","wrapElement","_selected","contentUrls","root","support","browser","msie","css","contents","nodeName","match","nodeType","trim","nodeValue","wrapAll","prevent","href","isAnchor","visibility","indexOf","isVisible","childGroup","notVisible","animationSettings","hasCollapseAnimation","reverse","complete","_animationCallback","kendoStop","kendoAnimate","stopExpand","siblings","contentElement","statusIcon","loadingIconTimeout","ajax","cache","dataType","error","xhr","status","clearTimeout","success","getElements","get","console","message","eventName","renderContent","subGroup","renderItems","len","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,kBAAmB,cAAeD,IAC3C,WAktCE,MAtsCC,UAAUE,EAAGC,GA6EV,QAASC,GAAgBC,GACrBA,EAAQH,EAAEG,GACVA,EAAMC,OAAO,8BAA8BC,YAAYC,GACvDH,EAAMC,OAAO,4BAA4BC,YAAYE,GACrDJ,EAAMC,OAAO,gBAAgBI,SAASF,GACtCH,EAAMC,OAAO,eAAeI,S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YAAc1I,GACvEhF,MAEP0N,YAAa,SAAU/L,GAAV,GACLE,GAAOC,KACPuD,EAAYxD,EAAKwD,WAAa1D,EAAQ2I,SAASjF,SACnD,OAAOA,GAAUzJ,MAAMW,GACnB8U,YAAa,SAAU1P,GAEnB,IADA,GAAIgD,GAAO,GAAI+B,EAAI,EAAGvL,EAAQwG,EAAQxG,MAAOmW,EAAMnW,EAAQA,EAAMa,OAAS,EAAGJ,EAAQW,GAASP,OAAQsV,GAAO3P,EAAQ/F,OAC9G8K,EAAI4K,EAAK5K,IACZ/B,GAAQhD,EAAQ2I,SAAShD,WAAW/K,EAAOoF,GACvC/F,MAAOA,EACPF,KAAMa,GAASkE,MAAOiG,GAAKvL,EAAMuL,MAGzC,OAAO/B,KAEZhD,EAAS3B,MAEhBmR,cAAe,SAAUxP,GACrB,MAAOA,GAAQ2I,SAASjF,UAAUlF,QAAQ5D,EAAOoF,EAAS3B,OAGlE7D,GAAME,GAAGkV,OAAOhQ,KAClBnF,OAAOD,MAAMqV,QACRpV,OAAOD,OACE,kBAAVpB,SAAwBA,OAAO0W,IAAM1W,OAAS,SAAU2W,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.panelbar.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.panelbar', ['kendo.data'], f);\n}(function () {\n var __meta__ = {\n id: 'panelbar',\n name: 'PanelBar',\n category: 'web',\n description: 'The PanelBar widget displays hierarchical data as a multi-level expandable panel bar.',\n depends: [\n 'core',\n 'data',\n 'data.odata'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, keys = kendo.keys, extend = $.extend, proxy = $.proxy, each = $.each, isArray = $.isArray, template = kendo.template, Widget = ui.Widget, HierarchicalDataSource = kendo.data.HierarchicalDataSource, excludedNodesRegExp = /^(ul|a|div)$/i, NS = '.kendoPanelBar', IMG = 'img', HREF = 'href', LAST = 'k-last', LINK = 'k-link', LINKSELECTOR = '.' + LINK, ERROR = 'error', ITEM = '.k-item', GROUP = '.k-group', VISIBLEGROUP = GROUP + ':visible', IMAGE = 'k-image', FIRST = 'k-first', CHANGE = 'change', EXPAND = 'expand', SELECT = 'select', CLICK = 'click', CONTENT = 'k-content', ACTIVATE = 'activate', COLLAPSE = 'collapse', DATABOUND = 'dataBound', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', CONTENTLOAD = 'contentLoad', UNDEFINED = 'undefined', ACTIVECLASS = 'k-state-active', GROUPS = '> .k-panel', CONTENTS = '> .k-content', STRING = 'string', FOCUSEDCLASS = 'k-state-focused', DISABLEDCLASS = 'k-state-disabled', SELECTEDCLASS = 'k-state-selected', SELECTEDSELECTOR = '.' + SELECTEDCLASS, HIGHLIGHTCLASS = 'k-state-highlight', ACTIVEITEMSELECTOR = ITEM + ':not(.k-state-disabled)', clickableItems = '> ' + ACTIVEITEMSELECTOR + ' > ' + LINKSELECTOR + ', .k-panel > ' + ACTIVEITEMSELECTOR + ' > ' + LINKSELECTOR, disabledItems = ITEM + '.k-state-disabled > .k-link', selectableItems = '> li > ' + SELECTEDSELECTOR + ', .k-panel > li > ' + SELECTEDSELECTOR, defaultState = 'k-state-default', ARIA_DISABLED = 'aria-disabled', ARIA_EXPANDED = 'aria-expanded', ARIA_HIDDEN = 'aria-hidden', ARIA_SELECTED = 'aria-selected', VISIBLE = ':visible', EMPTY = ':empty', SINGLE = 'single', bindings = {\n text: 'dataTextField',\n url: 'dataUrlField',\n spriteCssClass: 'dataSpriteCssClassField',\n imageUrl: 'dataImageUrlField'\n }, itemIcon, rendering = {\n aria: function (item) {\n var attr = '';\n if (item.items || item.content || item.contentUrl || item.expanded) {\n attr += ARIA_EXPANDED + '=\\'' + (item.expanded ? 'true' : 'false') + '\\' ';\n }\n if (item.enabled === false) {\n attr += ARIA_DISABLED + '=\\'true\\'';\n }\n return attr;\n },\n wrapperCssClass: function (group, item) {\n var result = 'k-item', index = item.index;\n if (item.enabled === false) {\n result += ' ' + DISABLEDCLASS;\n } else if (item.expanded === true) {\n result += ' ' + ACTIVECLASS;\n } else {\n result += ' k-state-default';\n }\n if (index === 0) {\n result += ' k-first';\n }\n if (index == group.length - 1) {\n result += ' k-last';\n }\n if (item.cssClass) {\n result += ' ' + item.cssClass;\n }\n return result;\n },\n textClass: function (item, group) {\n var result = LINK;\n if (group.firstLevel) {\n result += ' k-header';\n }\n if (item.selected) {\n result += ' ' + SELECTEDCLASS;\n }\n return result;\n },\n textAttributes: function (url) {\n return url ? ' href=\\'' + url + '\\'' : '';\n },\n arrowClass: function (item) {\n var result = 'k-icon';\n result += item.expanded ? ' k-panelbar-collapse k-i-arrow-60-up' : ' k-panelbar-expand k-i-arrow-60-down';\n return result;\n },\n text: function (item) {\n return item.encoded === false ? item.text : kendo.htmlEncode(item.text);\n },\n groupAttributes: function (group) {\n return group.expanded !== true ? ' style=\\'display:none\\'' : '';\n },\n ariaHidden: function (group) {\n return group.expanded !== true;\n },\n groupCssClass: function () {\n return 'k-group k-panel';\n },\n contentAttributes: function (content) {\n return content.item.expanded !== true ? ' style=\\'display:none\\'' : '';\n },\n content: function (item) {\n return item.content ? item.content : item.contentUrl ? '' : ' ';\n },\n contentUrl: function (item) {\n return item.contentUrl ? 'href=\"' + item.contentUrl + '\"' : '';\n }\n };\n function updateFirstLast(items) {\n items = $(items);\n items.filter('.k-first:not(:first-child)').removeClass(FIRST);\n items.filter('.k-last:not(:last-child)').removeClass(LAST);\n items.filter(':first-child').addClass(FIRST);\n items.filter(':last-child').addClass(LAST);\n }\n function updateItemHtml(item) {\n var wrapper = item, group = item.children('ul'), toggleButton = wrapper.children('.k-link').children('.k-icon');\n if (item.hasClass('k-panelbar')) {\n return;\n }\n if (!toggleButton.length && group.length) {\n toggleButton = $('').appendTo(wrapper);\n } else if (!group.length || !group.children().length) {\n toggleButton.remove();\n group.remove();\n }\n }\n itemIcon = function (item) {\n return item.children('span').children('.k-icon');\n };\n var PanelBar = kendo.ui.DataBoundWidget.extend({\n init: function (element, options) {\n var that = this, content, hasDataSource;\n if (isArray(options)) {\n options = { dataSource: options };\n }\n hasDataSource = options && !!options.dataSource;\n Widget.fn.init.call(that, element, options);\n element = that.wrapper = that.element.addClass('k-widget k-reset k-header k-panelbar');\n options = that.options;\n if (element[0].id) {\n that._itemId = element[0].id + '_pb_active';\n }\n that._tabindex();\n that._accessors();\n that._dataSource();\n that._templates();\n that._initData(hasDataSource);\n that._updateClasses();\n that._animations(options);\n element.on(CLICK + NS, clickableItems, proxy(that._click, that)).on(MOUSEENTER + NS + ' ' + MOUSELEAVE + NS, clickableItems, that._toggleHover).on(CLICK + NS, disabledItems, false).on(CLICK + NS, '.k-request-retry', proxy(that._retryRequest, that)).on('keydown' + NS, proxy(that._keydown, that)).on('focus' + NS, function () {\n var item = that.select();\n that._current(item[0] ? item : that._first());\n }).on('blur' + NS, function () {\n that._current(null);\n }).attr('role', 'menu');\n content = element.find('li.' + ACTIVECLASS + ' > .' + CONTENT);\n if (content[0]) {\n that.expand(content.parent(), false);\n }\n if (!options.dataSource) {\n that._angularCompile();\n }\n kendo.notify(that);\n },\n events: [\n EXPAND,\n COLLAPSE,\n SELECT,\n ACTIVATE,\n CHANGE,\n ERROR,\n DATABOUND,\n CONTENTLOAD\n ],\n options: {\n name: 'PanelBar',\n dataSource: {},\n animation: {\n expand: {\n effects: 'expand:vertical',\n duration: 200\n },\n collapse: { duration: 200 }\n },\n messages: {\n loading: 'Loading...',\n requestFailed: 'Request failed.',\n retry: 'Retry'\n },\n autoBind: true,\n loadOnDemand: true,\n expandMode: 'multiple',\n template: '',\n dataTextField: null\n },\n _angularCompile: function () {\n var that = this;\n that.angular('compile', function () {\n return {\n elements: that.element.children('li'),\n data: [{ dataItem: that.options.$angular }]\n };\n });\n },\n _angularCompileElements: function (html, items) {\n var that = this;\n that.angular('compile', function () {\n return {\n elements: html,\n data: $.map(items, function (item) {\n return [{ dataItem: item }];\n })\n };\n });\n },\n _angularCleanup: function () {\n var that = this;\n that.angular('cleanup', function () {\n return { elements: that.element.children('li') };\n });\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n this.element.off(NS);\n this._angularCleanup();\n kendo.destroy(this.element);\n },\n _initData: function (hasDataSource) {\n var that = this;\n if (hasDataSource) {\n that.element.empty();\n if (that.options.autoBind) {\n that._progress(true);\n that.dataSource.fetch();\n }\n }\n },\n _templates: function () {\n var that = this, options = that.options, fieldAccessor = proxy(that._fieldAccessor, that);\n if (options.template && typeof options.template == STRING) {\n options.template = template(options.template);\n } else if (!options.template) {\n options.template = template('# var text = ' + fieldAccessor('text') + '(data.item); #' + '# if (typeof data.item.encoded != \\'undefined\\' && data.item.encoded === false) {#' + '#= text #' + '# } else { #' + '#: text #' + '# } #');\n }\n that.templates = {\n content: template('
#= content(item) #
'),\n group: template(''),\n itemWrapper: template('# var url = ' + fieldAccessor('url') + '(item); #' + '# var imageUrl = ' + fieldAccessor('imageUrl') + '(item); #' + '# var spriteCssClass = ' + fieldAccessor('spriteCssClass') + '(item); #' + '# var contentUrl = contentUrl(item); #' + '# var tag = url||contentUrl ? \\'a\\' : \\'span\\'; #' + '<#= tag # class=\\'#= textClass(item, group) #\\' #= contentUrl ##= textAttributes(url) #>' + '# if (imageUrl) { #' + '\\'\\'' + '# } #' + '# if (spriteCssClass) { #' + '' + '# } #' + '#= data.panelBar.options.template(data) #' + '#= arrow(data) #' + ''),\n item: template('
  • ' + '#= itemWrapper(data) #' + '# if (item.items && item.items.length > 0) { #' + '#= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) #' + '# } else if (item.content || item.contentUrl) { #' + '#= renderContent(data) #' + '# } #' + '
  • '),\n loading: template('
    #: data.messages.loading #
    '),\n retry: template('#: data.messages.requestFailed # ' + ''),\n arrow: template(''),\n empty: template('')\n };\n },\n setOptions: function (options) {\n var animation = this.options.animation;\n this._animations(options);\n options.animation = extend(true, animation, options.animation);\n if ('dataSource' in options) {\n this.setDataSource(options.dataSource);\n }\n Widget.fn.setOptions.call(this, options);\n },\n expand: function (element, useAnimation) {\n var that = this, animBackup = {};\n element = this.element.find(element);\n if (that._animating && element.find('ul').is(':visible')) {\n that.one('complete', function () {\n setTimeout(function () {\n that.expand(element);\n });\n });\n return;\n }\n that._animating = true;\n useAnimation = useAnimation !== false;\n element.each(function (index, item) {\n item = $(item);\n var wrapper = element.children('.k-group,.k-content');\n if (!wrapper.length) {\n wrapper = that._addGroupElement(element);\n }\n var groups = wrapper.add(item.find(CONTENTS));\n if (!item.hasClass(DISABLEDCLASS) && groups.length > 0) {\n if (that.options.expandMode == SINGLE && that._collapseAllExpanded(item)) {\n return that;\n }\n element.find('.' + HIGHLIGHTCLASS).removeClass(HIGHLIGHTCLASS);\n item.addClass(HIGHLIGHTCLASS);\n if (!useAnimation) {\n animBackup = that.options.animation;\n that.options.animation = {\n expand: { effects: {} },\n collapse: {\n hide: true,\n effects: {}\n }\n };\n }\n if (!that._triggerEvent(EXPAND, item)) {\n that._toggleItem(item, false, false);\n }\n if (!useAnimation) {\n that.options.animation = animBackup;\n }\n }\n });\n return that;\n },\n collapse: function (element, useAnimation) {\n var that = this, animBackup = {};\n that._animating = true;\n useAnimation = useAnimation !== false;\n element = that.element.find(element);\n element.each(function (index, item) {\n item = $(item);\n var groups = item.find(GROUPS).add(item.find(CONTENTS));\n if (!item.hasClass(DISABLEDCLASS) && groups.is(VISIBLE)) {\n item.removeClass(HIGHLIGHTCLASS);\n if (!useAnimation) {\n animBackup = that.options.animation;\n that.options.animation = {\n expand: { effects: {} },\n collapse: {\n hide: true,\n effects: {}\n }\n };\n }\n if (!that._triggerEvent(COLLAPSE, item)) {\n that._toggleItem(item, true);\n }\n if (!useAnimation) {\n that.options.animation = animBackup;\n }\n }\n });\n return that;\n },\n updateArrow: function (items) {\n var that = this;\n items = $(items);\n items.children(LINKSELECTOR).children('.k-panelbar-collapse, .k-panelbar-expand').remove();\n items.filter(function () {\n var dataItem = that.dataItem(this);\n if (!dataItem) {\n return $(this).find('.k-panel').length > 0 || $(this).find('.k-content').length > 0;\n }\n return dataItem.hasChildren || dataItem.content || dataItem.contentUrl;\n }).children('.k-link:not(:has([class*=k-i-arrow]))').each(function () {\n var item = $(this), parent = item.parent();\n item.append('');\n });\n },\n _accessors: function () {\n var that = this, options = that.options, i, field, textField, element = that.element;\n for (i in bindings) {\n field = options[bindings[i]];\n textField = element.attr(kendo.attr(i + '-field'));\n if (!field && textField) {\n field = textField;\n }\n if (!field) {\n field = i;\n }\n if (!isArray(field)) {\n field = [field];\n }\n options[bindings[i]] = field;\n }\n },\n _progress: function (item, showProgress) {\n var element = this.element;\n var loadingText = this.templates.loading({ messages: this.options.messages });\n if (arguments.length == 1) {\n showProgress = item;\n if (showProgress) {\n element.html(loadingText);\n } else {\n element.empty();\n }\n } else {\n itemIcon(item).toggleClass('k-i-loading', showProgress).removeClass('k-i-refresh');\n }\n },\n _refreshRoot: function (items) {\n var that = this;\n var parent = that.element;\n var groupData = {\n firstLevel: true,\n expanded: true,\n length: parent.children().length\n };\n this.element.empty();\n var rootItemsHtml = $.map(items, function (value, idx) {\n if (typeof value === 'string') {\n return $(value);\n } else {\n value.items = [];\n return $(that.renderItem({\n group: groupData,\n item: extend(value, { index: idx })\n }));\n }\n });\n this.element.append(rootItemsHtml);\n var elements = this.element.children('.k-item');\n for (var i = 0; i < items.length; i++) {\n this.trigger('itemChange', {\n item: elements.eq(i).find('.k-link').first(),\n data: items[i],\n ns: ui\n });\n }\n this._angularCompileElements(rootItemsHtml, items);\n },\n _refreshChildren: function (item, parentNode) {\n var i, children, child;\n parentNode.children('.k-group').empty();\n var items = item.children.data();\n if (!items.length) {\n updateItemHtml(parentNode);\n children = parentNode.children('.k-group').children('li');\n this._angularCompileElements(children, items);\n } else {\n this.append(item.children, parentNode);\n if (this.options.loadOnDemand) {\n this._toggleGroup(parentNode.children('.k-group'), false);\n }\n children = parentNode.children('.k-group').children('li');\n for (i = 0; i < children.length; i++) {\n child = children.eq(i);\n this.trigger('itemChange', {\n item: child.find('.k-link').first(),\n data: this.dataItem(child),\n ns: ui\n });\n }\n }\n },\n findByUid: function (uid) {\n var items = this.element.find('.k-item');\n var uidAttr = kendo.attr('uid');\n var result;\n for (var i = 0; i < items.length; i++) {\n if (items[i].getAttribute(uidAttr) == uid) {\n result = items[i];\n break;\n }\n }\n return $(result);\n },\n refresh: function (e) {\n var options = this.options;\n var node = e.node;\n var action = e.action;\n var items = e.items;\n var parentNode = this.wrapper;\n var loadOnDemand = options.loadOnDemand;\n if (e.field) {\n if (!items[0] || !items[0].level) {\n return;\n }\n return this._updateItems(items, e.field);\n }\n if (node) {\n parentNode = this.findByUid(node.uid);\n this._progress(parentNode, false);\n }\n if (action == 'add') {\n this._appendItems(e.index, items, parentNode);\n } else if (action == 'remove') {\n this.remove(this.findByUid(items[0].uid));\n } else if (action == 'itemchange') {\n this._updateItems(items);\n } else if (action == 'itemloaded') {\n this._refreshChildren(node, parentNode);\n } else {\n this._refreshRoot(items);\n }\n if (action != 'remove') {\n for (var k = 0; k < items.length; k++) {\n if (!loadOnDemand || items[k].expanded) {\n var tempItem = items[k];\n if (this._hasChildItems(tempItem)) {\n tempItem.load();\n }\n }\n }\n }\n this.trigger(DATABOUND, { node: node ? parentNode : undefined });\n },\n _error: function (e) {\n var node = e.node && this.findByUid(e.node.uid);\n var retryHtml = this.templates.retry({ messages: this.options.messages });\n if (node) {\n this._progress(node, false);\n this._expanded(node, false);\n itemIcon(node).addClass('k-i-refresh');\n e.node.loaded(false);\n } else {\n this._progress(false);\n this.element.html(retryHtml);\n }\n },\n _retryRequest: function (e) {\n e.preventDefault();\n this.dataSource.fetch();\n },\n items: function () {\n return this.element.find('.k-item > span:first-child');\n },\n setDataSource: function (dataSource) {\n var options = this.options;\n options.dataSource = dataSource;\n this._dataSource();\n if (this.options.autoBind) {\n this._progress(true);\n this.dataSource.fetch();\n }\n },\n _bindDataSource: function () {\n this._refreshHandler = proxy(this.refresh, this);\n this._errorHandler = proxy(this._error, this);\n this.dataSource.bind(CHANGE, this._refreshHandler);\n this.dataSource.bind(ERROR, this._errorHandler);\n },\n _unbindDataSource: function () {\n var dataSource = this.dataSource;\n if (dataSource) {\n dataSource.unbind(CHANGE, this._refreshHandler);\n dataSource.unbind(ERROR, this._errorHandler);\n }\n },\n _fieldAccessor: function (fieldName) {\n var fieldBindings = this.options[bindings[fieldName]] || [], count = fieldBindings.length, result = '(function(item) {';\n if (count === 0) {\n result += 'return item[\\'' + fieldName + '\\'];';\n } else {\n result += 'var levels = [' + $.map(fieldBindings, function (x) {\n return 'function(d){ return ' + kendo.expr(x) + '}';\n }).join(',') + '];';\n result += 'if(item.level){return levels[Math.min(item.level(), ' + count + '-1)](item);}else';\n result += '{return levels[' + count + '-1](item)}';\n }\n result += '})';\n return result;\n },\n _dataSource: function () {\n var that = this, options = that.options, dataSource = options.dataSource;\n if (!dataSource) {\n return;\n }\n dataSource = isArray(dataSource) ? { data: dataSource } : dataSource;\n that._unbindDataSource();\n if (!dataSource.fields) {\n dataSource.fields = [\n { field: 'text' },\n { field: 'url' },\n { field: 'spriteCssClass' },\n { field: 'imageUrl' }\n ];\n }\n that.dataSource = HierarchicalDataSource.create(dataSource);\n that._bindDataSource();\n },\n _appendItems: function (index, items, parentNode) {\n var that = this, children, wrapper;\n if (parentNode.hasClass('k-panelbar')) {\n children = parentNode.children('li');\n wrapper = parentNode;\n } else {\n wrapper = parentNode.children('.k-group');\n if (!wrapper.length) {\n wrapper = that._addGroupElement(parentNode);\n }\n children = wrapper.children('li');\n }\n var groupData = {\n firstLevel: parentNode.hasClass('k-panelbar'),\n expanded: true,\n length: children.length\n };\n var itemsHtml = $.map(items, function (value, idx) {\n if (typeof value === 'string') {\n return $(value);\n } else {\n return $(that.renderItem({\n group: groupData,\n item: extend(value, { index: idx })\n }));\n }\n });\n if (typeof index == UNDEFINED) {\n index = children.length;\n }\n for (var i = 0; i < itemsHtml.length; i++) {\n if (children.length === 0 || index === 0) {\n wrapper.append(itemsHtml[i]);\n } else {\n itemsHtml[i].insertAfter(children[index - 1]);\n }\n }\n that._angularCompileElements(itemsHtml, items);\n if (that.dataItem(parentNode)) {\n that.dataItem(parentNode).hasChildren = true;\n that.updateArrow(parentNode);\n }\n },\n _updateItems: function (items, field) {\n var that = this;\n var i, node, nodeWrapper, item;\n var context = {\n panelBar: that.options,\n item: item,\n group: {}\n };\n var render = field != 'expanded';\n if (field == 'selected') {\n if (items[0][field]) {\n var currentNode = that.findByUid(items[0].uid);\n if (!currentNode.hasClass(DISABLEDCLASS)) {\n that.select(currentNode, true);\n }\n } else {\n that.clearSelection();\n }\n } else {\n var elements = $.map(items, function (item) {\n return that.findByUid(item.uid);\n });\n if (render) {\n that.angular('cleanup', function () {\n return { elements: elements };\n });\n }\n for (i = 0; i < items.length; i++) {\n context.item = item = items[i];\n context.panelBar = that;\n nodeWrapper = elements[i];\n node = nodeWrapper.parent();\n if (render) {\n context.group = {\n firstLevel: node.hasClass('k-panelbar'),\n expanded: nodeWrapper.parent().hasClass(ACTIVECLASS),\n length: nodeWrapper.children().length\n };\n nodeWrapper.children('.k-link').remove();\n nodeWrapper.prepend(that.templates.itemWrapper(extend(context, { arrow: item.hasChildren || item.content || item.contentUrl ? that.templates.arrow : that.templates.empty }, rendering)));\n }\n if (field == 'expanded') {\n that._toggleItem(nodeWrapper, !item[field], item[field] ? 'true' : true);\n } else if (field == 'enabled') {\n that.enable(nodeWrapper, item[field]);\n if (!item[field]) {\n if (item.selected) {\n item.set('selected', false);\n }\n }\n }\n if (nodeWrapper.length) {\n this.trigger('itemChange', {\n item: nodeWrapper.find('.k-link').first(),\n data: item,\n ns: ui\n });\n }\n }\n if (render) {\n that.angular('compile', function () {\n return {\n elements: elements,\n data: $.map(items, function (item) {\n return [{ dataItem: item }];\n })\n };\n });\n }\n }\n },\n _toggleDisabled: function (element, enable) {\n element = this.element.find(element);\n element.toggleClass(defaultState, enable).toggleClass(DISABLEDCLASS, !enable).attr(ARIA_DISABLED, !enable);\n },\n dataItem: function (item) {\n var uid = $(item).closest(ITEM).attr(kendo.attr('uid')), dataSource = this.dataSource;\n return dataSource && dataSource.getByUid(uid);\n },\n select: function (element, skipChange) {\n var that = this;\n if (element === undefined) {\n return that.element.find(selectableItems).parent();\n }\n element = that.element.find(element);\n if (!element.length) {\n this._updateSelected(element);\n } else {\n element.each(function () {\n var item = $(this), link = item.children(LINKSELECTOR);\n if (item.hasClass(DISABLEDCLASS)) {\n return that;\n }\n that._updateSelected(link, skipChange);\n });\n }\n return that;\n },\n clearSelection: function () {\n this.select($());\n },\n enable: function (element, state) {\n this._toggleDisabled(element, state !== false);\n return this;\n },\n disable: function (element) {\n this._toggleDisabled(element, false);\n return this;\n },\n append: function (item, referenceItem) {\n referenceItem = this.element.find(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.length ? referenceItem.find(GROUPS) : null);\n each(inserted.items, function () {\n inserted.group.append(this);\n updateFirstLast(this);\n });\n this.updateArrow(referenceItem);\n updateFirstLast(inserted.group.find('.k-first, .k-last'));\n inserted.group.height('auto');\n return this;\n },\n insertBefore: function (item, referenceItem) {\n referenceItem = this.element.find(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.parent());\n each(inserted.items, function () {\n referenceItem.before(this);\n updateFirstLast(this);\n });\n updateFirstLast(referenceItem);\n inserted.group.height('auto');\n return this;\n },\n insertAfter: function (item, referenceItem) {\n referenceItem = this.element.find(referenceItem);\n var inserted = this._insert(item, referenceItem, referenceItem.parent());\n each(inserted.items, function () {\n referenceItem.after(this);\n updateFirstLast(this);\n });\n updateFirstLast(referenceItem);\n inserted.group.height('auto');\n return this;\n },\n remove: function (element) {\n element = this.element.find(element);\n var that = this, parent = element.parentsUntil(that.element, ITEM), group = element.parent('ul');\n element.remove();\n if (group && !group.hasClass('k-panelbar') && !group.children(ITEM).length) {\n group.remove();\n }\n if (parent.length) {\n parent = parent.eq(0);\n that.updateArrow(parent);\n updateFirstLast(parent);\n }\n return that;\n },\n reload: function (element) {\n var that = this;\n element = that.element.find(element);\n element.each(function () {\n var item = $(this);\n that._ajaxRequest(item, item.children('.' + CONTENT), !item.is(VISIBLE));\n });\n },\n _first: function () {\n return this.element.children(ACTIVEITEMSELECTOR).first();\n },\n _last: function () {\n var item = this.element.children(ACTIVEITEMSELECTOR).last(), group = item.children(VISIBLEGROUP);\n if (group[0]) {\n return group.children(ACTIVEITEMSELECTOR).last();\n }\n return item;\n },\n _current: function (candidate) {\n var that = this, focused = that._focused, id = that._itemId;\n if (candidate === undefined) {\n return focused;\n }\n that.element.removeAttr('aria-activedescendant');\n if (focused && focused.length) {\n if (focused[0].id === id) {\n focused.removeAttr('id');\n }\n focused.children(LINKSELECTOR).removeClass(FOCUSEDCLASS);\n }\n if ($(candidate).length) {\n id = candidate[0].id || id;\n candidate.attr('id', id).children(LINKSELECTOR).addClass(FOCUSEDCLASS);\n that.element.attr('aria-activedescendant', id);\n }\n that._focused = candidate;\n },\n _keydown: function (e) {\n var that = this, key = e.keyCode, current = that._current();\n if (e.target != e.currentTarget) {\n return;\n }\n if (key == keys.DOWN || key == keys.RIGHT) {\n that._current(that._nextItem(current));\n e.preventDefault();\n } else if (key == keys.UP || key == keys.LEFT) {\n that._current(that._prevItem(current));\n e.preventDefault();\n } else if (key == keys.ENTER || key == keys.SPACEBAR) {\n that._click(e);\n e.preventDefault();\n } else if (key == keys.HOME) {\n that._current(that._first());\n e.preventDefault();\n } else if (key == keys.END) {\n that._current(that._last());\n e.preventDefault();\n }\n },\n _nextItem: function (item) {\n if (!item) {\n return this._first();\n }\n var group = item.children(VISIBLEGROUP), next = item.nextAll(':visible').first();\n if (group[0]) {\n next = group.children('.' + FIRST);\n }\n if (!next[0]) {\n next = item.parent(VISIBLEGROUP).parent(ITEM).next();\n }\n if (!next[0]) {\n next = this._first();\n }\n if (next.hasClass(DISABLEDCLASS)) {\n next = this._nextItem(next);\n }\n return next;\n },\n _prevItem: function (item) {\n if (!item) {\n return this._last();\n }\n var prev = item.prevAll(':visible').first(), result;\n if (!prev[0]) {\n prev = item.parent(VISIBLEGROUP).parent(ITEM);\n if (!prev[0]) {\n prev = this._last();\n }\n } else {\n result = prev;\n while (result[0]) {\n result = result.children(VISIBLEGROUP).children('.' + LAST);\n if (result[0]) {\n prev = result;\n }\n }\n }\n if (prev.hasClass(DISABLEDCLASS)) {\n prev = this._prevItem(prev);\n }\n return prev;\n },\n _insert: function (item, referenceItem, parent) {\n var that = this, items, plain = $.isPlainObject(item), isReferenceItem = referenceItem && referenceItem[0], groupData;\n if (!isReferenceItem) {\n parent = that.element;\n }\n groupData = {\n firstLevel: parent.hasClass('k-panelbar'),\n expanded: $(referenceItem).hasClass(ACTIVECLASS),\n length: parent.children().length\n };\n if (isReferenceItem && !parent.length) {\n parent = $(that.renderGroup({\n group: groupData,\n options: that.options\n })).appendTo(referenceItem);\n }\n if (plain || $.isArray(item) || item instanceof HierarchicalDataSource) {\n if (item instanceof HierarchicalDataSource) {\n item = item.data();\n }\n items = $.map(plain ? [item] : item, function (value, idx) {\n if (typeof value === 'string') {\n return $(value);\n } else {\n return $(that.renderItem({\n group: groupData,\n item: extend(value, { index: idx })\n }));\n }\n });\n if (isReferenceItem) {\n var dataItem = that.dataItem(referenceItem);\n if (dataItem) {\n dataItem.hasChildren = true;\n referenceItem.attr(ARIA_EXPANDED, dataItem.expanded).not('.' + ACTIVECLASS).children('ul').attr(ARIA_HIDDEN, !dataItem.expanded);\n } else {\n referenceItem.attr(ARIA_EXPANDED, false);\n }\n }\n } else {\n if (typeof item == 'string' && item.charAt(0) != '<') {\n items = that.element.find(item);\n } else {\n items = $(item);\n }\n that._updateItemsClasses(items);\n }\n if (!item.length) {\n item = [item];\n }\n that._angularCompileElements(items, item);\n return {\n items: items,\n group: parent\n };\n },\n _toggleHover: function (e) {\n var target = $(e.currentTarget);\n if (!target.parents('li.' + DISABLEDCLASS).length) {\n target.toggleClass('k-state-hover', e.type == MOUSEENTER);\n }\n },\n _updateClasses: function () {\n var that = this, panels, items, expanded, panelsParent, dataItem;\n panels = that.element.find('li > ul').not(function () {\n return $(this).parentsUntil('.k-panelbar', 'div').length;\n }).addClass('k-group k-panel').attr('role', 'group');\n panelsParent = panels.parent();\n dataItem = that.dataItem(panelsParent);\n expanded = dataItem && dataItem.expanded || false;\n panels.parent().attr(ARIA_EXPANDED, expanded).not('.' + ACTIVECLASS).children('ul').attr(ARIA_HIDDEN, !expanded).hide();\n items = that.element.add(panels).children();\n that._updateItemsClasses(items);\n that.updateArrow(items);\n updateFirstLast(items);\n },\n _updateItemsClasses: function (items) {\n var length = items.length, idx = 0;\n for (; idx < length; idx++) {\n this._updateItemClasses(items[idx], idx);\n }\n },\n _updateItemClasses: function (item, index) {\n var selected = this._selected, contentUrls = this.options.contentUrls, url = contentUrls && contentUrls[index], root = this.element[0], wrapElement, link;\n item = $(item).addClass('k-item').attr('role', 'menuitem');\n if (kendo.support.browser.msie) {\n item.css('list-style-position', 'inside').css('list-style-position', '');\n }\n item.children(IMG).addClass(IMAGE);\n link = item.children('a').addClass(LINK);\n if (link[0]) {\n link.attr('href', url);\n link.children(IMG).addClass(IMAGE);\n }\n item.filter(':not([disabled]):not([class*=k-state])').addClass('k-state-default');\n item.filter('li[disabled]').addClass('k-state-disabled').attr(ARIA_DISABLED, true).removeAttr('disabled');\n item.children('div').addClass(CONTENT).attr('role', 'region').attr(ARIA_HIDDEN, true).hide().parent().attr(ARIA_EXPANDED, false);\n link = item.children(SELECTEDSELECTOR);\n if (link[0]) {\n if (selected) {\n selected.removeAttr(ARIA_SELECTED).children(SELECTEDSELECTOR).removeClass(SELECTEDCLASS);\n }\n link.addClass(SELECTEDCLASS);\n this._selected = item.attr(ARIA_SELECTED, true);\n }\n if (!item.children(LINKSELECTOR)[0]) {\n wrapElement = '';\n if (contentUrls && contentUrls[index] && item[0].parentNode == root) {\n wrapElement = '';\n }\n item.contents().filter(function () {\n return !this.nodeName.match(excludedNodesRegExp) && !(this.nodeType == 3 && !kendo.trim(this.nodeValue.trim));\n }).wrapAll(wrapElement);\n }\n if (item.parent('.k-panelbar')[0]) {\n item.children(LINKSELECTOR).addClass('k-header');\n }\n },\n _click: function (e) {\n var that = this, target = e.type == CLICK ? $(e.target) : that._current().children(LINKSELECTOR), element = that.element, prevent, contents, href, isAnchor;\n if (target.parents('li.' + DISABLEDCLASS).length) {\n return;\n }\n if (target.closest('.k-widget')[0] != element[0]) {\n return;\n }\n if (target.is(':kendoFocusable') && !target.hasClass(LINK)) {\n return;\n }\n var link = target.closest(LINKSELECTOR), item = link.closest(ITEM);\n that._updateSelected(link);\n var wrapper = item.children('.k-group,.k-content');\n var dataItem = this.dataItem(item);\n if (!wrapper.length && (that.options.loadOnDemand && dataItem && dataItem.hasChildren || this._hasChildItems(item) || item.content || item.contentUrl)) {\n wrapper = that._addGroupElement(item);\n }\n contents = item.find(GROUPS).add(item.find(CONTENTS));\n href = link.attr(HREF);\n isAnchor = href && (href.charAt(href.length - 1) == '#' || href.indexOf('#' + that.element[0].id + '-') != -1);\n prevent = !!(isAnchor || contents.length);\n if (contents.data('animating') && prevent) {\n e.preventDefault();\n return;\n }\n if (that._triggerEvent(SELECT, item)) {\n prevent = true;\n }\n if (prevent === false) {\n return;\n }\n if (that.options.expandMode == SINGLE) {\n if (that._collapseAllExpanded(item) && prevent) {\n e.preventDefault();\n return;\n }\n }\n if (contents.length) {\n var visibility = contents.is(VISIBLE);\n if (!that._triggerEvent(!visibility ? EXPAND : COLLAPSE, item)) {\n prevent = that._toggleItem(item, visibility);\n }\n }\n if (prevent) {\n e.preventDefault();\n }\n },\n _hasChildItems: function (item) {\n return item.items && item.items.length > 0 || item.hasChildren;\n },\n _toggleItem: function (element, isVisible, expanded) {\n var that = this, childGroup = element.find(GROUPS), link = element.find(LINKSELECTOR), url = link.attr(HREF), prevent, content, dataItem = that.dataItem(element), notVisible = !isVisible;\n var loaded = dataItem && dataItem.loaded();\n if (dataItem && !expanded && dataItem.expanded !== notVisible) {\n dataItem.set('expanded', notVisible);\n prevent = dataItem.hasChildren || !!dataItem.content || !!dataItem.contentUrl;\n return prevent;\n }\n if (dataItem && (!expanded || expanded === 'true') && !loaded && !dataItem.content && !dataItem.contentUrl) {\n if (that.options.loadOnDemand) {\n this._progress(element, true);\n }\n element.children('.k-group,.k-content').remove();\n prevent = dataItem.hasChildren;\n dataItem.load();\n } else {\n if (childGroup.length) {\n this._toggleGroup(childGroup, isVisible);\n prevent = true;\n } else {\n content = element.children('.' + CONTENT);\n if (content.length) {\n prevent = true;\n if (!content.is(EMPTY) || url === undefined) {\n that._toggleGroup(content, isVisible);\n } else {\n that._ajaxRequest(element, content, isVisible);\n }\n }\n }\n }\n return prevent;\n },\n _toggleGroup: function (element, visibility) {\n var that = this, animationSettings = that.options.animation, animation = animationSettings.expand, hasCollapseAnimation = animationSettings.collapse && 'effects' in animationSettings.collapse, collapse = extend({}, animationSettings.expand, animationSettings.collapse);\n if (!hasCollapseAnimation) {\n collapse = extend(collapse, { reverse: true });\n }\n if (element.is(VISIBLE) != visibility) {\n that._animating = false;\n return;\n }\n element.attr(ARIA_HIDDEN, !!visibility);\n element.parent().attr(ARIA_EXPANDED, !visibility).toggleClass(ACTIVECLASS, !visibility).find('> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand').toggleClass('k-i-arrow-60-up', !visibility).toggleClass('k-panelbar-collapse', !visibility).toggleClass('k-i-arrow-60-down', visibility).toggleClass('k-panelbar-expand', visibility);\n if (visibility) {\n animation = extend(collapse, { hide: true });\n animation.complete = function () {\n that._animationCallback();\n };\n } else {\n animation = extend({\n complete: function (element) {\n that._triggerEvent(ACTIVATE, element.closest(ITEM));\n that._animationCallback();\n }\n }, animation);\n }\n element.kendoStop(true, true).kendoAnimate(animation);\n },\n _animationCallback: function () {\n var that = this;\n that.trigger('complete');\n that._animating = false;\n },\n _addGroupElement: function (element) {\n var group = $('');\n element.append(group);\n return group;\n },\n _collapseAllExpanded: function (item) {\n var that = this, children, stopExpand = false;\n var groups = item.find(GROUPS).add(item.find(CONTENTS));\n if (groups.is(VISIBLE)) {\n stopExpand = true;\n }\n if (!(groups.is(VISIBLE) || groups.length === 0)) {\n children = item.siblings();\n children.find(GROUPS).add(children.find(CONTENTS)).filter(function () {\n return $(this).is(VISIBLE);\n }).each(function (index, content) {\n content = $(content);\n stopExpand = that._triggerEvent(COLLAPSE, content.closest(ITEM));\n if (!stopExpand) {\n that._toggleGroup(content, true);\n }\n });\n that.one('complete', function () {\n setTimeout(function () {\n children.each(function (index, child) {\n var dataItem = that.dataItem(child);\n if (dataItem) {\n dataItem.set('expanded', false);\n }\n });\n });\n });\n }\n return stopExpand;\n },\n _ajaxRequest: function (element, contentElement, isVisible) {\n var that = this, statusIcon = element.find('.k-panelbar-collapse, .k-panelbar-expand'), link = element.find(LINKSELECTOR), loadingIconTimeout = setTimeout(function () {\n statusIcon.addClass('k-i-loading');\n }, 100), data = {}, url = link.attr(HREF);\n $.ajax({\n type: 'GET',\n cache: false,\n url: url,\n dataType: 'html',\n data: data,\n error: function (xhr, status) {\n statusIcon.removeClass('k-i-loading');\n if (that.trigger(ERROR, {\n xhr: xhr,\n status: status\n })) {\n this.complete();\n }\n },\n complete: function () {\n clearTimeout(loadingIconTimeout);\n statusIcon.removeClass('k-i-loading');\n },\n success: function (data) {\n function getElements() {\n return { elements: contentElement.get() };\n }\n try {\n that.angular('cleanup', getElements);\n contentElement.html(data);\n that.angular('compile', getElements);\n } catch (e) {\n var console = window.console;\n if (console && console.error) {\n console.error(e.name + ': ' + e.message + ' in ' + url);\n }\n this.error(this.xhr, 'error');\n }\n that._toggleGroup(contentElement, isVisible);\n that.trigger(CONTENTLOAD, {\n item: element[0],\n contentElement: contentElement[0]\n });\n }\n });\n },\n _triggerEvent: function (eventName, element) {\n var that = this;\n return that.trigger(eventName, { item: element[0] });\n },\n _updateSelected: function (link, skipChange) {\n var that = this, element = that.element, item = link.parent(ITEM), selected = that._selected, dataItem = that.dataItem(item);\n if (selected) {\n selected.removeAttr(ARIA_SELECTED);\n }\n that._selected = item.attr(ARIA_SELECTED, true);\n element.find(selectableItems).removeClass(SELECTEDCLASS);\n element.find('> .' + HIGHLIGHTCLASS + ', .k-panel > .' + HIGHLIGHTCLASS).removeClass(HIGHLIGHTCLASS);\n link.addClass(SELECTEDCLASS);\n link.parentsUntil(element, ITEM).filter(':has(.k-header)').addClass(HIGHLIGHTCLASS);\n that._current(item[0] ? item : null);\n if (dataItem) {\n dataItem.set('selected', true);\n }\n if (!skipChange) {\n that.trigger(CHANGE);\n }\n },\n _animations: function (options) {\n if (options && 'animation' in options && !options.animation) {\n options.animation = {\n expand: { effects: {} },\n collapse: {\n hide: true,\n effects: {}\n }\n };\n }\n },\n renderItem: function (options) {\n var that = this;\n options = extend({\n panelBar: that,\n group: {}\n }, options);\n var empty = that.templates.empty, item = options.item;\n return that.templates.item(extend(options, {\n itemWrapper: that.templates.itemWrapper,\n renderContent: that.renderContent,\n arrow: that._hasChildItems(item) || item.content || item.contentUrl ? that.templates.arrow : empty,\n subGroup: !options.loadOnDemand || item.expanded ? that.renderGroup : empty\n }, rendering));\n },\n renderGroup: function (options) {\n var that = this;\n var templates = that.templates || options.panelBar.templates;\n return templates.group(extend({\n renderItems: function (options) {\n var html = '', i = 0, items = options.items, len = items ? items.length : 0, group = extend({ length: len }, options.group);\n for (; i < len; i++) {\n html += options.panelBar.renderItem(extend(options, {\n group: group,\n item: extend({ index: i }, items[i])\n }));\n }\n return html;\n }\n }, options, rendering));\n },\n renderContent: function (options) {\n return options.panelBar.templates.content(extend(options, rendering));\n }\n });\n kendo.ui.plugin(PanelBar);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}