{"version":3,"sources":["kendo.breadcrumb.js"],"names":["f","define","$","undefined","kendo","window","Widget","ui","extend","isPlainObject","proxy","BREADCRUMB","ARIA_HIDDEN","ARIA_LABEL","CLICK","FOCUS","BLUR","KEYDOWN","CHANGE","DOT","breadcrumbStyles","widget","overlay","textbox","link","item","delimiter","rootItem","rootLink","overflowIcon","focused","hidden","inputWrapper","Breadcrumb","init","element","options","that","this","fn","call","_wrapper","editable","_editable","_tabindex","wrapper","on","_click","value","bindToLocation","items","_value","_resizeHandler","onResize","resize","navigational","name","gap","rootIcon","delimiterIcon","messages","rootTitle","events","destroy","unbindResize","add","find","off","_segments","refresh","_update","val","_generateSegments","trigger","sender","path","i","segments","_split","length","_path","slice","push","indexOf","text","e","target","closest","previousDomItems","prevAll","addBack","previousItems","_getItems","segment","index","preventDefault","originalEvent","isRoot","type","map","innerText","_edit","input","oldValue","css","height","hide","attr","show","setTimeout","select","_blur","shouldRestoreValue","replace","is","removeClass","_keydown","key","keyCode","isEnter","keys","ENTER","isEsc","ESC","focus","isNavigational","canNavigate","hasClass","_wrapperKeydown","ev","_wrapperClick","_wrapperFocus","addClass","_wrapperBlur","elementIsInput","wrap","parent","append","location","href","split","filter","isRtl","support","idx","isLastSegment","html","isOnlyRoot","showIcon","showText","icon","itemClass","linkClass","renderDelimiter","lastSegment","iconClass","splice","toLowerCase","title","match","template","itemTemplate","empty","_displayOverflowIcons","visible","last","_shrinkItems","availableWidth","width","_outerWidth","_showItem","overlayWidth","_stretchItems","_resize","getSize","dimensions","trail","b","join","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,oBAAqB,cAAeD,IAC7C,WAwWE,MAhWC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAAOE,EAASF,EAAMG,GAAGD,OAAQE,EAASN,EAAEM,OAAQC,EAAgBP,EAAEO,cAAeC,EAAQR,EAAEQ,MAAOC,EAAa,mB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AAKD,QAAQqB,GAIlN,KAHKP,EAAM6B,QACP1C,EAAK8H,uBAAsB,GAEtBvF,EAAI1B,EAAM6B,OAAS,EAAGH,GAAK,IAChCnD,EAAOvB,EAAEgD,EAAM0B,IACf+F,EAAevK,EAAMqK,YAAYnJ,KAC7BqJ,EAAeJ,IAAmBjI,KAAKoI,UAAUjJ,EAAMkJ,EAAcJ,IAHtC3F,OAQ3CiG,QAAS,WACLvI,KAAKgI,eACLhI,KAAKsI,iBAETE,QAAS,WACL,MAAO1K,GAAM2K,WAAWzI,KAAKO,UAEjCG,MAAO,SAAUuB,GACb,GAAIlC,GAAOC,IACX,OAAIiC,KAAQpE,GACRkC,EAAKmC,kBAAkBD,GACvBlC,EAAKgC,UACL,GAEGhC,EAAK2C,MAAM3C,EAAK+B,YAE3BY,MAAO,SAAUgG,GACb,MAAO9K,GAAEiG,IAAI6E,EAAO,SAAUC,GAC1B,GAAI7F,GAAO3E,EAAcwK,GAAKA,EAAE7F,KAAO6F,CACvC,OAAgB,MAAT7F,EAAe,GAAKA,IAC5B8F,KAAK,OAGhB9K,GAAMG,GAAG4K,OAAOlJ,IAClB5B,OAAOD,MAAMgL,QACR/K,OAAOD,OACE,kBAAVH,SAAwBA,OAAOoL,IAAMpL,OAAS,SAAUqL,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.breadcrumb.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.breadcrumb', ['kendo.core'], f);\n}(function () {\n var __meta__ = {\n id: 'breadcrumb',\n name: 'Breadcrumb',\n category: 'web',\n description: 'The Breadcrumb widget displays navigation breadcrumb.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, extend = $.extend, isPlainObject = $.isPlainObject, proxy = $.proxy, BREADCRUMB = '.kendoBreadcrumb', ARIA_HIDDEN = 'aria-hidden', ARIA_LABEL = 'aria-label', CLICK = 'click', FOCUS = 'focus', BLUR = 'blur', KEYDOWN = 'keydown', CHANGE = 'change', DOT = '.';\n var breadcrumbStyles = {\n widget: 'k-widget k-breadcrumb',\n overlay: 'k-breadcrumb-container',\n textbox: 'k-textbox',\n link: 'k-breadcrumb-link',\n item: 'k-breadcrumb-item',\n delimiter: 'k-breadcrumb-delimiter-icon',\n rootItem: 'k-breadcrumb-root-item',\n rootLink: 'k-breadcrumb-root-link',\n overflowIcon: 'k-breadcrumb-overflow-icon',\n focused: 'k-state-focused',\n hidden: 'k-hidden',\n inputWrapper: 'k-breadcrumb-input-container'\n };\n var Breadcrumb = Widget.extend({\n init: function (element, options) {\n var that = this;\n options = options || {};\n Widget.fn.init.call(that, element, options);\n that._wrapper();\n if (options.editable) {\n that._editable();\n that._tabindex();\n }\n that.wrapper.on(CLICK + BREADCRUMB, 'a:not(.k-state-disabled)', proxy(that._click, that));\n if (options.value || options.bindToLocation || !options.items) {\n that._value();\n } else if (options.items) {\n that.items(options.items);\n }\n that._resizeHandler = kendo.onResize(function () {\n that.resize(true);\n });\n },\n options: {\n editable: false,\n navigational: false,\n bindToLocation: false,\n items: null,\n name: 'Breadcrumb',\n gap: 0,\n rootIcon: 'home',\n delimiterIcon: 'arrow-chevron-right',\n messages: { rootTitle: 'Go to root' }\n },\n events: [\n CHANGE,\n CLICK\n ],\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n kendo.unbindResize(that._resizeHandler);\n that.wrapper.add(that.wrapper.find('input')).add(that.wrapper.find('a')).off(BREADCRUMB);\n },\n items: function (items) {\n var that = this;\n if (items === undefined) {\n return that.options.items;\n }\n that.options.items = items;\n that._segments = items;\n that.refresh();\n },\n _update: function (val) {\n var that = this;\n if (val !== that.value()) {\n that._generateSegments(val);\n that.refresh();\n that.trigger(CHANGE, {\n sender: this,\n value: val\n });\n }\n },\n _generateSegments: function (value) {\n var that = this, options = that.options, items = options.items, path, segments;\n segments = that._split(value);\n if (!items) {\n that.options.items = that._segments = segments;\n return;\n }\n that._segments = [];\n for (var i = 0; i < segments.length; i++) {\n path = that._path(items.slice(0, i + 1));\n if (path !== '' && value.indexOf(path) > -1 && items[i] && items[i].text === segments[i]) {\n that._segments.push(items[i]);\n } else {\n that._segments.push(segments[i]);\n }\n }\n },\n _click: function (e) {\n var that = this, options = that.options, item = $(e.target).closest(DOT + breadcrumbStyles.item), previousDomItems = item.prevAll().addBack(), previousItems = that._getItems(previousDomItems), path = that._path(previousItems), segment = that._segments[item.index()];\n if (!options.navigational) {\n e.preventDefault();\n }\n if (!that.trigger(CLICK, {\n sender: that,\n originalEvent: e,\n isRoot: segment.type === 'rootitem',\n item: segment\n })) {\n that._update(path);\n }\n },\n _getItems: function (items) {\n var that = this;\n return $.map(items, function (item) {\n return that._segments[$(item).index()] || item.innerText;\n });\n },\n _edit: function () {\n var that = this, input = that.input;\n that.oldValue = that.value();\n that.inputWrapper.css('height', that.wrapper.height());\n that.overlay.hide();\n that.input.val(that.value());\n that.input.attr(ARIA_HIDDEN, false);\n that.inputWrapper.show();\n setTimeout(function () {\n input.select();\n });\n },\n _blur: function (shouldRestoreValue) {\n var that = this, input = that.input, inputWrapper = that.inputWrapper, wrapper = that.wrapper, overlay = that.overlay, val = input.val().replace(/\\/{2,}/g, '/');\n if (overlay.is(':visible')) {\n return;\n }\n if (shouldRestoreValue) {\n val = that.oldValue;\n }\n input.attr(ARIA_HIDDEN, true);\n inputWrapper.hide();\n overlay.show();\n input.val('');\n that._update(val);\n wrapper.removeClass(breadcrumbStyles.focused);\n },\n _keydown: function (e) {\n var that = this, key = e.keyCode, isEnter = key === kendo.keys.ENTER, isEsc = key === kendo.keys.ESC;\n if (isEnter || isEsc) {\n that._blur(isEsc);\n setTimeout(function () {\n that.overlay.find('a:first').focus();\n });\n }\n },\n isNavigational: function (target) {\n var canNavigate = target.hasClass(breadcrumbStyles.textbox) || target.closest(DOT + breadcrumbStyles.item);\n if (target[0] === this.wrapper[0]) {\n return false;\n }\n return canNavigate && !target.hasClass('k-breadcrumb-last-item');\n },\n _wrapperKeydown: function (ev) {\n var that = this, target = $(ev.target), isNavigational = that.isNavigational(target);\n if (ev.keyCode === kendo.keys.ENTER && !isNavigational) {\n that._edit();\n }\n },\n _wrapperClick: function (ev) {\n var that = this, target = $(ev.target), isNavigational = that.isNavigational(target);\n if (!isNavigational) {\n this._edit();\n }\n },\n _wrapperFocus: function (ev) {\n $(ev.target).addClass(breadcrumbStyles.focused);\n },\n _wrapperBlur: function (ev) {\n $(ev.target).removeClass(breadcrumbStyles.focused);\n },\n _wrapper: function () {\n var that = this, element = this.element, elementIsInput = element.is('input');\n that.wrapper = elementIsInput ? element.wrap($('')).parent() : element;\n if (elementIsInput) {\n that.element.wrap($('
').addClass(breadcrumbStyles.inputWrapper)).addClass(breadcrumbStyles.textbox).parent().hide();\n that.inputWrapper = that.wrapper.find(DOT + breadcrumbStyles.inputWrapper);\n } else {\n that.inputWrapper = that.wrapper.append($('').addClass(breadcrumbStyles.inputWrapper)).find(DOT + breadcrumbStyles.inputWrapper).hide();\n }\n that.wrapper.addClass(breadcrumbStyles.widget);\n that.wrapper.attr(ARIA_LABEL, 'Breadcrumb');\n that.overlay = that.wrapper.append($('