/**
* Kendo UI v2019.2.619 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. 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(W,"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('
').parent().wrap('').parent()}function n(e){t(e.target).closest("a.k-button").length&&e.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.length&&e.is("."+$)?e: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,v,m,b,g,w,k,C,y,A=window.kendo,_=A.Class,x=A.ui.Widget,B=t.proxy,E=A.isFunction,T=A.keys,O=A._outerWidth,I="k-toolbar",F="k-button",P="k-overflow-button",U="k-toggle-button",D="k-button-group",z="k-split-button",G="k-separator",H="k-spacer",N="spacer",R="k-popup",M="k-toolbar-resizable",W="k-state-active",S="k-state-disabled",K="k-state-hidden",j="k-group-start",q="k-group-end",Q="k-primary",V="k-icon",L="k-i-",J="k-button-icon",X="k-button-icontext",Y="k-list-container k-split-container",Z="k-split-button-arrow",$="k-overflow-anchor",tt="k-overflow-container",et="k-toolbar-first-visible",ot="k-toolbar-last-visible",it="click",nt="toggle",st="open",lt="close",rt="overflowOpen",at="overflowClose",dt="never",ht="auto",pt="always",ut="k-overflow-hidden",ct="_optionlist",ft=A.attr("uid");A.toolbar={},l={overflowAnchor:'
',overflowContainer:''},A.toolbar.registerComponent=function(t,e,o){l[t]={toolbar:e,overflow:o}},r=A.Class.extend({addOverflowAttr:function(){this.element.attr(A.attr("overflow"),this.options.overflow||ht)},addUidAttr:function(){this.element.attr(ft,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(K).show(),this.options.hidden=!1},hide:function(){this.element.addClass(K).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(S,!t),this.options.enable=t},twin:function(){var o=this.element.attr(ft);return this.overflow&&this.options.splitContainerId?t("#"+this.options.splitContainerId).find("["+ft+"='"+o+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+ft+"='"+o+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ft+"='"+o+"']").data(this.options.type):e}}),A.toolbar.Item=r,a=r.extend({init:function(o,i){var n=t(o.useButtonTag?' ':' ');this.element=n,this.options=o,this.toolbar=i,this.attributes(),o.primary&&n.addClass(Q),o.togglable&&(n.addClass(U),this.toggle(o.selected)),o.url===e||o.useButtonTag||(n.attr("href",o.url),o.mobile&&n.attr(A.attr("role"),"button")),o.group&&(n.attr(A.attr("group"),o.group),this.group=this.toolbar.addToGroup(this,o.group)),!o.togglable&&o.click&&E(o.click)&&(this.clickHandler=o.click),o.togglable&&o.toggle&&E(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("."+D).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(V)&&!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?J:X)),s?(o=n.children("span."+V).first(),o[0]||(o=t(' ').prependTo(n)),o.addClass(L+s)):l?(o=n.children("span.k-sprite").first(),o[0]||(o=t(' ').prependTo(n)),o.addClass(l)):r&&(i=n.children("img.k-image").first(),i[0]||(i=t(' ').prependTo(n)),i.attr("src",r))}}),A.toolbar.Button=a,d=a.extend({init:function(t,e){a.fn.init.call(this,t,e);var o=this.element;o.addClass(F),this.addIdAttr(),t.align&&o.addClass("k-align-"+t.align),"overflow"!=t.showText&&t.text&&o.html(t.mobile?''+t.text+" ":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(W,t),this.options.selected=t}}),A.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?''+e.text+" ":''+e.text+" "),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(P+" "+F),e.hidden&&this.hide(),e.togglable&&this.toggle(e.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap(" ").parent()},overflowHidden:function(){this.element.addClass(ut)},select:function(t){t===e&&(t=!1),this.options.isChild?this.element.toggleClass(W,t):this.element.find(".k-button").toggleClass(W,t),this.options.selected=t}}),A.toolbar.OverflowButton=h,A.toolbar.registerComponent("button",d,h),p=r.extend({createButtons:function(e){var o,i,n=this.options,s=n.buttons||[];for(i=0;i");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(D),this.element.data({type:"buttonGroup",buttonGroup:this})}}),A.toolbar.ToolBarButtonGroup=u,c=p.extend({init:function(e,o){var i=this.element=t(" ");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?"":D)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.OverflowButtonGroup=c,A.toolbar.registerComponent("buttonGroup",u,c),f=r.extend({init:function(e,o){var i=this.element=t('
');this.options=e,this.toolbar=o,this.mainButton=new d(t.extend({},e,{hidden:!1}),o),this.arrowButton=t(' '),this.popupElement=t(''),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","."+F,function(o){var i=t(o.target).parent();o.preventDefault(),o.keyCode===T.ESC||o.keyCode===T.TAB||o.altKey&&o.keyCode===T.UP?(e.toggle(),e.focus()):o.keyCode===T.DOWN?s(i,"next").focus():o.keyCode===T.UP?s(i,"prev").focus():o.keyCode===T.SPACEBAR||o.keyCode===T.ENTER?e.toolbar.userEvents.trigger("tap",{target:t(o.target)}):o.keyCode===T.HOME?i.parent().find(":kendoFocusable").first().focus():o.keyCode===T.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var e,o,i=this.options,n=i.menuButtons;for(o=0;o").parent().appendTo(this.popupElement)},createPopup:function(){var o=this,s=this.options,l=this.element;this.popupElement.attr("id",s.id+ct).attr(ft,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(st,{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(lt,{target:l});e&&t.preventDefault(),l.focus()}}).data("kendoPopup"),this.popup.element.on(it,"a.k-button",n)},adjustPopupWidth:function(t){var e,o=t.options.anchor,i=O(o);A.wrap(t.element).addClass("k-split-wrapper"),e="border-box"!==t.element.css("box-sizing")?i-(O(t.element)-t.element.width()):i,t.element.css({fontFamily:o.css("font-family"),"min-width":e})},remove:function(){this.popup.element.off(it,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){(this.options.enable||this.popup.visible())&&this.popup.toggle()},enable:function(t){t===e&&(t=!0),this.mainButton.enable(t),this.element.toggleClass(S,!t),this.options.enable=t},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(K).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(K).hide(),this.options.hidden=!1}}),A.toolbar.ToolBarSplitButton=f,v=r.extend({init:function(e,o){var i,n,s,l=this.element=t(' '),r=e.menuButtons;for(this.options=e,this.toolbar=o,this.overflow=!0,n=(e.id||e.uid)+ct,this.mainButton=new h(t.extend({},e)),this.mainButton.element.appendTo(l),s=0;s ");this.element=i,this.options=e,this.toolbar=o,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(G),i.data({type:"separator",separator:this})}}),b=r.extend({init:function(e,o){var i=this.element=t(" ");this.element=i,this.options=e,this.toolbar=o,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(G),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.registerComponent("separator",m,b),g=r.extend({init:function(e,o){var i=this.element=t("
");this.element=i,this.options=e,this.toolbar=o,i.addClass(H),i.data({type:N})}}),A.toolbar.registerComponent(N,g),w=r.extend({init:function(e,o,i){var n=E(e)?e(o):e;n=n instanceof jQuery?n.wrap("
").parent():t("
").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})}}),A.toolbar.TemplateItem=w,k=r.extend({init:function(e,o,i){var n=t(E(e)?e(o):e);n=n instanceof jQuery?n.wrap(" ").parent():t(" ").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(ut)}}),A.toolbar.OverflowTemplateItem=k,C=_.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'),o=i(o)):e.overflowAnchor.append(' '),e.popup=new A.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=A.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)*((O(i)-i.width())/2+1)),e.trigger(rt)&&o.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){e.trigger(at)&&t.preventDefault(),this.element.focus()}}),e.popup.element.on("keydown","."+F,function(o){var i,n=t(o.target),l=n.parent(),r=l.is("."+D)||l.is("."+z);o.preventDefault(),o.keyCode===T.ESC||o.keyCode===T.TAB||o.altKey&&o.keyCode===T.UP?(e._toggleOverflow(),e.overflowAnchor.focus()):o.keyCode===T.DOWN?(i=!r||r&&n.is(":last-child")?l:n,s(i,"next").focus()):o.keyCode===T.UP?(i=!r||r&&n.is(":first-child")?l:n,s(i,"prev").focus()):o.keyCode===T.SPACEBAR||o.keyCode===T.ENTER?(e.userEvents.trigger("tap",{target:t(o.target)}),e.overflowAnchor.focus()):o.keyCode===T.HOME?l.parent().find(":kendoFocusable").first().focus():o.keyCode===T.END&&l.parent().find(":kendoFocusable").last().focus()}),e.popup.container=e.isMobile?e.popup.element.find("."+tt):e.popup.element,e.popup.container.attr(ft,this.uid)},_toggleOverflowAnchor:function(){var t=!1,e=this._isRtl?"padding-left":"padding-right";t=this.options.mobile?this.popup.element.find("."+tt).children(":not(."+ut+", ."+R+")").length>0:this.popup.element.children(":not(."+ut+", ."+R+")").length>0,t?(this.overflowAnchor.css({visibility:"visible",width:""}),this.wrapper.css(e,this.overflowAnchor.outerWidth(!0))):(this.overflowAnchor.css({visibility:"hidden",width:"1px"}),this.wrapper.css(e,""))},_buttonClick:function(o){var i,n,s,l,r,a,d,h=this,p=o.target.closest("."+Z).length;return o.preventDefault(),p?(h._toggle(o),e):(n=t(o.target).closest("."+F,h.element),n.hasClass($)||(s=n.data("button"),!s&&h.popup&&(n=t(o.target).closest("."+P,h.popup.container),s=n.parent("li").data("button")),s&&s.options.enable&&(s.options.togglable?(r=E(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,item:s},r&&r.call(h,a),h.trigger(nt,a)):(r=E(s.clickHandler)?s.clickHandler:null,a={sender:h,target:n,id:s.options.id,item:s},r&&r.call(h,a),h.trigger(it,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(P)&&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).on("focusin",function(e){var o=t(e.target),i=t(this).find(":kendoFocusable:first");o.is("."+I)&&0!==i.length&&(i.is("."+$)&&(i=s(i,"next")),i.length&&i[0].focus())}).on("keydown",B(e._keydown,e))},_keydown:function(o){var i,n,s,l,r,a,d,h,p,u=t(o.target),c=o.keyCode,f=this.element.children(":not(.k-separator):visible"),v=this._isRtl?-1:1;if(c===T.TAB&&(i=u.parentsUntil(this.element).last(),n=!1,s=!1,l=!1,f.not("."+$).length||(l=!0),i.length||(i=u),i.is("."+$)&&!l&&(r=f.last(),o.shiftKey&&o.preventDefault(),r.is(":kendoFocusable")?f.last().focus():f.last().find(":kendoFocusable").last().focus()),o.shiftKey||f.index(i)!==f.length-1||(n=!i.is("."+D)||u.is(":last-child")),a=f.index(i)===f.not(".k-overflow-anchor").first().index(),o.shiftKey&&a&&(s=!i.is("."+D)||u.is(":first-child")),n&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&!l&&(o.preventDefault(),this.overflowAnchor.focus()),(s||l&&o.shiftKey)&&(o.preventDefault(),d=this._getPrevFocusable(this.wrapper),d&&d.focus()),this._preventNextFocus=!1),o.altKey&&c===T.DOWN)return h=t(document.activeElement).data("splitButton"),p=t(document.activeElement).is("."+$),h?h.toggle():p&&this._toggleOverflow(),e;if((c===T.SPACEBAR||c===T.ENTER)&&!u.is("input, checkbox"))return c===T.SPACEBAR&&o.preventDefault(),u.is("."+z)?(u=u.children().first(),this.userEvents.trigger("tap",{target:u})):c===T.SPACEBAR&&this.userEvents.trigger("tap",{target:u}),e;if(c===T.HOME){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor?f.eq(1).focus():f.first().focus(),o.preventDefault()}else if(c===T.END){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor&&"hidden"!=t(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():f.last().focus(),o.preventDefault()}else c!==T.RIGHT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,1*v)?c!==T.LEFT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,-1*v)||(this._getNextElement(o.target,-1*v).focus(),o.preventDefault()):(this._getNextElement(o.target,1*v).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("."+D).length&&!t(e).is(1===o?":last-child":":first-child"))return t(e).closest("."+D).children()[t(e).closest("."+D).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("."+D).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("."+D).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("."+z).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(."+K+", ."+H+")").each(function(){e+=O(t(this),!0)}),Math.ceil(e)},_shrink:function(t){var e,o,i;if(t=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('."+K+"')"),i=0;ili[data-uid='"+t.data("uid")+"']").removeClass(ut)},_showItem:function(t,e){return!!(t.length&&e>this._childrenWidth()+O(t,!0))&&(t.show(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").addClass(ut),!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(et+" "+ot),o.first().add(i.first()).addClass(et),o.last().add(i.last()).addClass(ot)}}),A.ui.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,o){(o||e)()});
//# sourceMappingURL=kendo.toolbar.min.js.map