Files
upo-senior-assistant/SeniorAssistant/wwwroot/kendo/2018.1.221/js/kendo.toolbar.min.js
Giacomo c807c474c4 Init
- aggiunto un po di tutto comeil progetto del prof
2018-09-14 19:38:02 +02:00

27 lines
28 KiB
JavaScript

/**
* Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui)
* Copyright 2018 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(t,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],t)}(function(){return function(t,e){function o(t){t.target.is(".k-toggle-button")||t.target.toggleClass(N,"press"==t.type)}function i(e){return e=t(e),e.hasClass("km-actionsheet")?e.closest(".km-popup-wrapper"):e.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function n(t){t.preventDefault()}function s(e,o){var i="next"===o?t.fn.next:t.fn.prev,n="next"===o?t.fn.first:t.fn.last,l=i.call(e);return l.is(":kendoFocusable")||!l.length?l:l.find(":kendoFocusable").length?n.call(l.find(":kendoFocusable")):s(l,o)}var l,r,a,d,h,p,u,c,f,m,v,b,g,w,k,C,y=window.kendo,_=y.Class,A=y.ui.Widget,x=t.proxy,B=y.isFunction,E=y.keys,T=y._outerWidth,O="k-toolbar",I="k-button",F="k-overflow-button",P="k-toggle-button",U="k-button-group",D="k-split-button",z="k-separator",G="k-popup",H="k-toolbar-resizable",N="k-state-active",M="k-state-disabled",R="k-state-hidden",W="k-group-start",S="k-group-end",K="k-primary",j="k-icon",q="k-i-",Q="k-button-icon",V="k-button-icontext",L="k-list-container k-split-container",J="k-split-button-arrow",X="k-overflow-anchor",Y="k-overflow-container",Z="k-toolbar-first-visible",$="k-toolbar-last-visible",tt="click",et="toggle",ot="open",it="close",nt="overflowOpen",st="overflowClose",lt="never",rt="auto",at="always",dt="k-overflow-hidden",ht="_optionlist",pt=y.attr("uid");y.toolbar={},l={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},y.toolbar.registerComponent=function(t,e,o){l[t]={toolbar:e,overflow:o}},r=y.Class.extend({addOverflowAttr:function(){this.element.attr(y.attr("overflow"),this.options.overflow||rt)},addUidAttr:function(){this.element.attr(pt,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(R).show(),this.options.hidden=!1},hide:function(){this.element.addClass(R).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(t){t===e&&(t=!0),this.element.toggleClass(M,!t),this.options.enable=t},twin:function(){var o=this.element.attr(pt);return this.overflow&&this.options.splitContainerId?t("#"+this.options.splitContainerId).find("["+pt+"='"+o+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+pt+"='"+o+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+pt+"='"+o+"']").data(this.options.type):e}}),y.toolbar.Item=r,a=r.extend({init:function(o,i){var n=t(o.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=n,this.options=o,this.toolbar=i,this.attributes(),o.primary&&n.addClass(K),o.togglable&&(n.addClass(P),this.toggle(o.selected)),o.url===e||o.useButtonTag||(n.attr("href",o.url),o.mobile&&n.attr(y.attr("role"),"button")),o.group&&(n.attr(y.attr("group"),o.group),this.group=this.toolbar.addToGroup(this,o.group)),!o.togglable&&o.click&&B(o.click)&&(this.clickHandler=o.click),o.togglable&&o.toggle&&B(o.toggle)&&(this.toggleHandler=o.toggle)},toggle:function(t,e){t=!!t,this.group&&t?this.group.select(this):this.group||this.select(t),e&&this.twin()&&this.twin().toggle(t)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+U).data("buttonGroup")},_addGraphics:function(){var e,o,i,n=this.element,s=this.options.icon,l=this.options.spriteCssClass,r=this.options.imageUrl;(l||r||s)&&(e=!0,n.contents().filter(function(){return!t(this).hasClass("k-sprite")&&!t(this).hasClass(j)&&!t(this).hasClass("k-image")}).each(function(o,i){(1==i.nodeType||3==i.nodeType&&t.trim(i.nodeValue).length>0)&&(e=!1)}),n.addClass(e?Q:V)),s?(o=n.children("span."+j).first(),o[0]||(o=t('<span class="'+j+'"></span>').prependTo(n)),o.addClass(q+s)):l?(o=n.children("span.k-sprite").first(),o[0]||(o=t('<span class="k-sprite '+j+'"></span>').prependTo(n)),o.addClass(l)):r&&(i=n.children("img.k-image").first(),i[0]||(i=t('<img alt="icon" class="k-image" />').prependTo(n)),i.attr("src",r))}}),y.toolbar.Button=a,d=a.extend({init:function(t,e){a.fn.init.call(this,t,e);var o=this.element;o.addClass(I),this.addIdAttr(),t.align&&o.addClass("k-align-"+t.align),"overflow"!=t.showText&&t.text&&o.html(t.mobile?'<span class="km-text">'+t.text+"</span>":t.text),t.hasIcon="overflow"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),t.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(t){t===e&&(t=!1),this.element.toggleClass(N,t),this.options.selected=t}}),y.toolbar.ToolBarButton=d,h=a.extend({init:function(e,o){this.overflow=!0,a.fn.init.call(this,t.extend({},e),o);var i=this.element;"toolbar"!=e.showText&&e.text&&i.html(e.mobile?'<span class="km-text">'+e.text+"</span>":'<span class="k-text">'+e.text+"</span>"),e.hasIcon="toolbar"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),e.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),i.addClass(F+" "+I),e.hidden&&this.hide(),e.togglable&&this.toggle(e.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(dt)},select:function(t){t===e&&(t=!1),this.options.isChild?this.element.toggleClass(N,t):this.element.find(".k-button").toggleClass(N,t),this.options.selected=t}}),y.toolbar.OverflowButton=h,y.toolbar.registerComponent("button",d,h),p=r.extend({createButtons:function(e){var o,i,n=this.options,s=n.buttons||[];for(i=0;i<s.length;i++)s[i].uid||(s[i].uid=y.guid()),o=new e(t.extend({mobile:n.mobile,isChild:!0,type:"button"},s[i]),this.toolbar),o.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+R+"'):first").addClass(W),this.element.children().filter(":not('."+R+"'):last").addClass(S)}}),y.toolbar.ButtonGroup=p,u=p.extend({init:function(e,o){var i=this.element=t("<div></div>");this.options=e,this.toolbar=o,this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(U),this.element.data({type:"buttonGroup",buttonGroup:this})}}),y.toolbar.ToolBarButtonGroup=u,c=p.extend({init:function(e,o){var i=this.element=t("<li></li>");this.options=e,this.toolbar=o,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(h),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((e.mobile?"":U)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.OverflowButtonGroup=c,y.toolbar.registerComponent("buttonGroup",u,c),f=r.extend({init:function(e,o){var i=this.element=t('<div class="'+D+'" tabindex="0"></div>');this.options=e,this.toolbar=o,this.mainButton=new d(t.extend({},e,{hidden:!1}),o),this.arrowButton=t('<a class="'+I+" "+J+'"><span class="'+(e.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-60-down")+'"></span></a>'),this.popupElement=t('<ul class="'+L+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),e.align&&i.addClass("k-align-"+e.align),e.id||(e.id=e.uid),i.attr("id",e.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(e.enable),e.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var e=this;e.popupElement.on("keydown","."+I,function(o){var i=t(o.target).parent();o.preventDefault(),o.keyCode===E.ESC||o.keyCode===E.TAB||o.altKey&&o.keyCode===E.UP?(e.toggle(),e.focus()):o.keyCode===E.DOWN?s(i,"next").focus():o.keyCode===E.UP?s(i,"prev").focus():o.keyCode===E.SPACEBAR||o.keyCode===E.ENTER?e.toolbar.userEvents.trigger("tap",{target:t(o.target)}):o.keyCode===E.HOME?i.parent().find(":kendoFocusable").first().focus():o.keyCode===E.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var e,o,i=this.options,n=i.menuButtons;for(o=0;o<n.length;o++)e=new d(t.extend({mobile:i.mobile,type:"button",click:i.click},n[o]),this.toolbar),e.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var o=this,s=this.options,l=this.element;this.popupElement.attr("id",s.id+ht).attr(pt,s.rootUid),s.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:s.mobile?t(s.mobile).children(".km-pane"):null,anchor:l,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:s.animation,open:function(t){var i=o.toolbar.trigger(ot,{target:l});return i?(t.preventDefault(),e):(o.adjustPopupWidth(t.sender),e)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){var e=o.toolbar.trigger(it,{target:l});e&&t.preventDefault(),l.focus()}}).data("kendoPopup"),this.popup.element.on(tt,"a.k-button",n)},adjustPopupWidth:function(t){var e,o=t.options.anchor,i=T(o);y.wrap(t.element).addClass("k-split-wrapper"),e="border-box"!==t.element.css("box-sizing")?i-(T(t.element)-t.element.width()):i,t.element.css({fontFamily:o.css("font-family"),"min-width":e})},remove:function(){this.popup.element.off(tt,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(t){t===e&&(t=!0),this.mainButton.enable(t),this.options.enable=t},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(R).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(R).hide(),this.options.hidden=!1}}),y.toolbar.ToolBarSplitButton=f,m=r.extend({init:function(e,o){var i,n,s,l=this.element=t('<li class="'+D+'"></li>'),r=e.menuButtons;for(this.options=e,this.toolbar=o,this.overflow=!0,n=(e.id||e.uid)+ht,this.mainButton=new h(t.extend({},e)),this.mainButton.element.appendTo(l),s=0;s<r.length;s++)i=new h(t.extend({mobile:e.mobile,type:"button",splitContainerId:n},r[s]),this.toolbar),i.element.appendTo(l);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,l.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.OverflowSplitButton=m,y.toolbar.registerComponent("splitButton",f,m),v=r.extend({init:function(e,o){var i=this.element=t("<div>&nbsp;</div>");this.element=i,this.options=e,this.toolbar=o,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(z),i.data({type:"separator",separator:this})}}),b=r.extend({init:function(e,o){var i=this.element=t("<li>&nbsp;</li>");this.element=i,this.options=e,this.toolbar=o,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(z),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.registerComponent("separator",v,b),g=r.extend({init:function(e,o,i){var n=B(e)?e(o):e;n=n instanceof jQuery?n.wrap("<div></div>").parent():t("<div></div>").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})}}),y.toolbar.TemplateItem=g,w=r.extend({init:function(e,o,i){var n=t(B(e)?e(o):e);n=n instanceof jQuery?n.wrap("<li></li>").parent():t("<li></li>").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(dt)}}),y.toolbar.OverflowTemplateItem=w,k=_.extend({init:function(t){this.name=t,this.buttons=[]},add:function(t){this.buttons[this.buttons.length]=t},remove:function(e){var o=t.inArray(e,this.buttons);this.buttons.splice(o,1)},select:function(t){var e,o;for(o=0;o<this.buttons.length;o++)e=this.buttons[o],e.select(!1);t.select(!0),t.twin()&&t.twin().select(!0)}}),C=A.extend({init:function(e,i){var s,l=this;if(A.fn.init.call(l,e,i),i=l.options,e=l.wrapper=l.element,e.addClass(O+" k-widget"),this.uid=y.guid(),this._isRtl=y.support.isRtl(e),this._groups={},e.attr(pt,this.uid),l.isMobile="boolean"==typeof i.mobile?i.mobile:l.element.closest(".km-root")[0],l.animation=l.isMobile?{open:{effects:"fade"}}:{},l.isMobile&&(e.addClass("km-widget"),j="km-icon",q="km-",I="km-button",U="km-buttongroup km-widget",N="km-state-active",M="km-state-disabled"),i.resizable?(l._renderOverflow(),e.addClass(H),l.overflowUserEvents=new y.UserEvents(l.element,{threshold:5,allowSelection:!0,filter:"."+X,tap:x(l._toggleOverflow,l)}),l._resizeHandler=y.onResize(function(){l.resize()})):l.popup={element:t([])},i.items&&i.items.length)for(s=0;s<i.items.length;s++)l.add(i.items[s]);l.userEvents=new y.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+pt+"="+this.uid+"] a."+I+", ["+pt+"="+this.uid+"] ."+F,tap:x(l._buttonClick,l),press:o,release:o}),l.element.on(tt,"a.k-button",n),l._navigatable(),i.resizable&&l.popup.element.on(tt,NaN,n),i.resizable&&this._toggleOverflowAnchor(),y.notify(l)},events:[tt,et,ot,it,nt,st],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(t,e){var o;return o=this._groups[e]?this._groups[e]:this._groups[e]=new k,o.add(t),o},destroy:function(){var e=this;e.element.find("."+D).each(function(e,o){t(o).data("kendoPopup").destroy()}),e.element.off(tt,"a.k-button"),e.userEvents.destroy(),e.options.resizable&&(y.unbindResize(e._resizeHandler),e.overflowUserEvents.destroy(),e.popup.element.off(tt,"a.k-button"),e.popup.destroy()),A.fn.destroy.call(e)},add:function(e){var o,i,n,s=l[e.type],r=e.template,a=this,d=a.isMobile?"":"k-item k-state-default",h=e.overflowTemplate;if(t.extend(e,{uid:y.guid(),animation:a.animation,mobile:a.isMobile,rootUid:a.uid}),e.menuButtons)for(n=0;n<e.menuButtons.length;n++)t.extend(e.menuButtons[n],{uid:y.guid()});r&&!h?e.overflow=lt:e.overflow||(e.overflow=rt),e.overflow!==lt&&a.options.resizable&&(h?i=new w(h,e,a):s&&(i=new s.overflow(e,a),i.element.addClass(d)),i&&(e.overflow===rt&&i.overflowHidden(),i.element.appendTo(a.popup.container),a.angular("compile",function(){return{elements:i.element.get()}}))),e.overflow!==at&&(r?o=new g(r,e,a):s&&(o=new s.toolbar(e,a)),o&&(a.options.resizable?(o.element.appendTo(a.element).css("visibility","hidden"),a._shrink(a.element.innerWidth()),o.element.css("visibility","visible")):o.element.appendTo(a.element),a.angular("compile",function(){return{elements:o.element.get()}})))},_getItem:function(e){var o,i,n,s,l=this.options.resizable;return o=this.element.find(e),o.length||(o=t(".k-split-container[data-uid="+this.uid+"]").find(e)),s=o.length?o.data("type"):"",i=o.data(s),i?(i.main&&(o=o.parent("."+D),s="splitButton",i=o.data(s)),l&&(n=i.twin())):l&&(o=this.popup.element.find(e),s=o.length?o.data("type"):"",n=o.data(s),n&&n.main&&(o=o.parent("."+D),s="splitButton",n=o.data(s))),{type:s,toolbar:i,overflow:n}},remove:function(t){var e=this._getItem(t);e.toolbar&&e.toolbar.remove(),e.overflow&&e.overflow.remove(),this.resize(!0)},hide:function(t){var e=this._getItem(t);e.toolbar&&("button"===e.toolbar.options.type&&e.toolbar.options.isChild?(e.toolbar.hide(),e.toolbar.getParentGroup().refresh()):e.toolbar.options.hidden||e.toolbar.hide()),e.overflow&&("button"===e.overflow.options.type&&e.overflow.options.isChild?(e.overflow.hide(),e.overflow.getParentGroup().refresh()):e.overflow.options.hidden||e.overflow.hide()),this.resize(!0)},show:function(t){var e=this._getItem(t);e.toolbar&&("button"===e.toolbar.options.type&&e.toolbar.options.isChild?(e.toolbar.show(),e.toolbar.getParentGroup().refresh()):e.toolbar.options.hidden&&e.toolbar.show()),e.overflow&&("button"===e.overflow.options.type&&e.overflow.options.isChild?(e.toolbar.show(),e.overflow.getParentGroup().refresh()):e.overflow.options.hidden&&e.overflow.show()),this.resize(!0)},enable:function(t,o){var i=this._getItem(t);e===o&&(o=!0),i.toolbar&&i.toolbar.enable(o),i.overflow&&i.overflow.enable(o)},getSelectedFromGroup:function(t){return this.element.find("."+P+"[data-group='"+t+"']").filter("."+N)},toggle:function(o,i){var n=t(o),s=n.data("button");s.options.togglable&&(i===e&&(i=!0),s.toggle(i,!0))},_renderOverflow:function(){var e=this,o=l.overflowContainer,n=e._isRtl,r=n?"left":"right";e.overflowAnchor=t(l.overflowAnchor).addClass(I),e.element.append(e.overflowAnchor),e.isMobile?(e.overflowAnchor.append('<span class="km-icon km-more"></span>'),o=i(o)):e.overflowAnchor.append('<span class="k-icon k-i-more-vertical"></span>'),e.popup=new y.ui.Popup(o,{origin:"bottom "+r,position:"top "+r,anchor:e.overflowAnchor,isRtl:n,animation:e.animation,appendTo:e.isMobile?t(e.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(o){var i=y.wrap(e.popup.element).addClass("k-overflow-wrapper");e.isMobile?e.popup.container.css("max-height",parseFloat(t(".km-content:visible").innerHeight())-15+"px"):i.css("margin-left",(n?-1:1)*((T(i)-i.width())/2+1)),e.trigger(nt)&&o.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){e.trigger(st)&&t.preventDefault(),this.element.focus()}}),e.popup.element.on("keydown","."+I,function(o){var i,n=t(o.target),l=n.parent(),r=l.is("."+U)||l.is("."+D);o.preventDefault(),o.keyCode===E.ESC||o.keyCode===E.TAB||o.altKey&&o.keyCode===E.UP?(e._toggleOverflow(),e.overflowAnchor.focus()):o.keyCode===E.DOWN?(i=!r||r&&n.is(":last-child")?l:n,s(i,"next").focus()):o.keyCode===E.UP?(i=!r||r&&n.is(":first-child")?l:n,s(i,"prev").focus()):o.keyCode===E.SPACEBAR||o.keyCode===E.ENTER?(e.userEvents.trigger("tap",{target:t(o.target)}),e.overflowAnchor.focus()):o.keyCode===E.HOME?l.parent().find(":kendoFocusable").first().focus():o.keyCode===E.END&&l.parent().find(":kendoFocusable").last().focus()}),e.popup.container=e.isMobile?e.popup.element.find("."+Y):e.popup.element,e.popup.container.attr(pt,this.uid)},_toggleOverflowAnchor:function(){var t=!1;t=this.options.mobile?this.popup.element.find("."+Y).children(":not(."+dt+", ."+G+")").length>0:this.popup.element.children(":not(."+dt+", ."+G+")").length>0,this.overflowAnchor.css(t?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(o){var i,n,s,l,r,a,d,h=this,p=o.target.closest("."+J).length;return o.preventDefault(),p?(h._toggle(o),e):(n=t(o.target).closest("."+I,h.element),n.hasClass(X)||(s=n.data("button"),!s&&h.popup&&(n=t(o.target).closest("."+F,h.popup.container),s=n.parent("li").data("button")),s&&s.options.enable&&(s.options.togglable?(r=B(s.toggleHandler)?s.toggleHandler:null,s.toggle(!s.options.selected,!0),a={target:n,group:s.options.group,checked:s.options.selected,id:s.options.id},r&&r.call(h,a),h.trigger(et,a)):(r=B(s.clickHandler)?s.clickHandler:null,a={sender:h,target:n,id:s.options.id},r&&r.call(h,a),h.trigger(tt,a)),s.options.url&&(s.options.attributes&&s.options.attributes.target&&(d=s.options.attributes.target),window.open(s.options.url,d||"_self")),n.hasClass(F)&&h.popup.close(),l=n.closest(".k-split-container"),l[0]&&(i=l.data("kendoPopup"),(i?i:l.parents(".km-popup-wrapper").data("kendoPopup")).close()))),e)},_navigatable:function(){var e=this;e.element.attr("tabindex",0).focus(function(){var e=t(this).find(":kendoFocusable:first");0!==e.length&&(e.is("."+X)&&(e=s(e,"next")),e[0].focus())}).on("keydown",x(e._keydown,e))},_keydown:function(o){var i,n,s,l,r,a,d,h=t(o.target),p=o.keyCode,u=this.element.children(":not(.k-separator):visible"),c=this._isRtl?-1:1;if(p===E.TAB&&(i=h.parentsUntil(this.element).last(),n=!1,s=!1,i.length||(i=h),i.is("."+X)&&(o.shiftKey&&o.preventDefault(),u.last().is(":kendoFocusable")?u.last().focus():u.last().find(":kendoFocusable").last().focus()),o.shiftKey||u.index(i)!==u.length-1||(n=!i.is("."+U)||h.is(":last-child")),l=u.index(i)===u.not(".k-overflow-anchor").first().index(),o.shiftKey&&l&&(s=!i.is("."+U)||h.is(":first-child")),n&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(o.preventDefault(),this.overflowAnchor.focus()),s&&(o.preventDefault(),r=this._getPrevFocusable(this.wrapper),r&&r.focus()),this._preventNextFocus=!1),o.altKey&&p===E.DOWN)return a=t(document.activeElement).data("splitButton"),d=t(document.activeElement).is("."+X),a?a.toggle():d&&this._toggleOverflow(),e;if((p===E.SPACEBAR||p===E.ENTER)&&!h.is("input, checkbox"))return o.preventDefault(),h.is("."+D)&&(h=h.children().first()),this.userEvents.trigger("tap",{target:h}),e;if(p===E.HOME){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor?u.eq(1).focus():u.first().focus(),o.preventDefault()}else if(p===E.END){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor&&"hidden"!=t(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():u.last().focus(),o.preventDefault()}else p!==E.RIGHT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,1*c)?p!==E.LEFT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,-1*c)||(this._getNextElement(o.target,-1*c).focus(),o.preventDefault()):(this._getNextElement(o.target,1*c).focus(),o.preventDefault())},_getNextElement:function(e,o){var i=this.element.children(":not(.k-separator):visible"),n=i.index(i.index(e)===-1?e.parentElement:e),s=this.overflowAnchor?1:0,l=o,r=1===o?i.length-1:s,a=1===o?s:i.length-1,d=i[n+o];if(this._preventNextFocus=!1,t(e).closest("."+U).length&&!t(e).is(1===o?":last-child":":first-child"))return t(e).closest("."+U).children()[t(e).closest("."+U).children().index(e)+o];for(this.overflowAnchor&&e===this.overflowAnchor[0]&&o===-1&&(d=i[i.length-1]),n===r&&(d=!this.overflowAnchor||this.overflowAnchor&&"hidden"===t(this.overflowAnchor).css("visibility")?i[a]:this.overflowAnchor);!t(d).is(":kendoFocusable");){if(d=o===-1&&t(d).closest("."+U).length?t(d).children(":not(label, div)").last():t(d).children(":not(label, div)").first(),!d.length&&(l+=o,d=i[n+l],!d))return this.overflowAnchor;this._preventNextFocus=!t(d).closest("."+U).length}return d},_getPrevFocusable:function(o){if(o.is("html"))return o;var i,n,s=o.prevAll();return s.each(function(){return n=t(this),n.is(":kendoFocusable")?(i=n,!1):n.find(":kendoFocusable").length>0?(i=n.find(":kendoFocusable").last(),!1):e}),i?i:this._getPrevFocusable(o.parent())},_toggle:function(e){var o=t(e.target).closest("."+D).data("splitButton");e.preventDefault(),o.options.enable&&o.toggle()},_toggleOverflow:function(){this.popup.toggle()},_resize:function(t){var e=t.width;this.options.resizable&&(this.popup.close(),this._shrink(e),this._stretch(e),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var e=0;return this.element.children(":visible:not('."+R+"')").each(function(){e+=T(t(this),!0)}),Math.ceil(e)},_shrink:function(t){var e,o,i;if(t<this._childrenWidth())for(o=this.element.children(":visible:not([data-overflow='never'], ."+X+")"),i=o.length-1;i>=0&&(e=o.eq(i),!(t>this._childrenWidth()));i--)this._hideItem(e)},_stretch:function(t){var e,o,i;if(t>this._childrenWidth())for(o=this.element.children(":hidden:not('."+R+"')"),i=0;i<o.length&&(e=o.eq(i),!(t<this._childrenWidth())&&this._showItem(e,t));i++);},_hideItem:function(t){t.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").removeClass(dt)},_showItem:function(t,e){return!!(t.length&&e>this._childrenWidth()+T(t,!0))&&(t.show(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").addClass(dt),!0)},_markVisibles:function(){var t=this.popup.container.children(),e=this.element.children(":not(.k-overflow-anchor)"),o=t.filter(":not(.k-overflow-hidden)"),i=e.filter(":visible");t.add(e).removeClass(Z+" "+$),o.first().add(i.first()).addClass(Z),o.last().add(i.last()).addClass($)}}),y.ui.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,o){(o||e)()});
//# sourceMappingURL=kendo.toolbar.min.js.map