Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-splitbuttons

Package Overview
Dependencies
Maintainers
3
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-splitbuttons - npm Package Compare versions

Comparing version 25.2.4 to 26.1.35

styles/button-group/_bootstrap5.3-definition.scss

5

.eslintrc.json

@@ -18,3 +18,4 @@ {

"sourceType": "module"
},
},
"ignorePatterns": ["*.d.ts", "*.js"],
"plugins": [

@@ -188,3 +189,3 @@ "@typescript-eslint",

],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-explicit-any": "warn",
"no-cond-assign": [

@@ -191,0 +192,0 @@ "error",

4

dist/ej2-splitbuttons.min.js
/*!
* filename: ej2-splitbuttons.min.js
* version : 25.2.4
* version : 26.1.35
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.

@@ -10,2 +10,2 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons","SyncfusionPopups"],t):"object"==typeof exports?exports.SyncfusionSplitbuttons=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):e.SyncfusionSplitbuttons=t(e.SyncfusionBase,e.SyncfusionButtons,e.SyncfusionPopups)}(this,function(e,t,i){return function(e){function t(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=11)}([function(t,i){t.exports=e},function(e,t,i){"use strict";function n(e,t){for(var n=i.i(a.extend)({},e),s=0,o=Object.keys(n);s<o.length;s++){var r=o[s];t.indexOf(r)<0&&i.i(a.deleteObject)(n,r)}return n}function s(e,t){var n,s=40===t?0:e.childElementCount-1,r=s,p=e.querySelector(".e-selected");p&&p.classList.remove("e-selected");for(var l=0,c=e.children.length;l<c;l++)e.children[l].classList.contains("e-focused")&&(n=e.children[l],r=l,n.classList.remove("e-focused"),40===t?r++:r--,r===(40===t?e.childElementCount:-1)&&(r=s));n=e.children[r],-1!==(r=o(e,n,r,t))&&(i.i(a.addClass)([e.children[r]],"e-focused"),e.children[r].focus())}function o(e,t,i,n,s){if(void 0===s&&(s=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===n?e.childElementCount-1:0)?i=40===n?0:e.childElementCount-1:40===n?i++:i--),t=e.children[i],t.classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++s===e.childElementCount)return i=-1;i=o(e,t,i,n,s)}return i}function r(e,t){var n=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(t){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(n.length){var s=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!i.i(a.isNullOrUndefined)(s)){s.classList.contains("e-url")&&(s=s.querySelector(".e-menu-url"));var o,r=s.querySelector(".e-menu-icon"),p=e.classList.contains("e-rtl");o=p?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var l=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(s).paddingLeft,10)+"px";n.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=l:e.style[o.padding]=l})}}}t.a=n,t.d=s,t.c=r,i.d(t,"b",function(){return c});var a=i(0),p=(i.n(a),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),l=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),l([i.i(a.Property)("")],t.prototype,"iconCss",void 0),l([i.i(a.Property)("")],t.prototype,"id",void 0),l([i.i(a.Property)(!1)],t.prototype,"separator",void 0),l([i.i(a.Property)("")],t.prototype,"text",void 0),l([i.i(a.Property)("")],t.prototype,"url",void 0),l([i.i(a.Property)(!1)],t.prototype,"disabled",void 0),t}(a.ChildProperty)},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(4)),r=(i.n(o),i(1)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},c=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.isPopupCreated=!0,n}return a(t,e),t.prototype.preRender=function(){},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},t.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(e,t){for(var i,n=this.items.length,s=0,o=this.items.length;s<o;s++)if(t===this.items[s].text){n=s;break}for(var a=e.length-1;a>=0;a--)i=new r.b(this,"items",e[a],!0),this.items.splice(n,0,i);this.canOpen()||this.createItems()},t.prototype.removeItems=function(e,t){for(var i=!1,n=0,s=e.length;n<s;n++)for(var o=0,r=this.items.length;o<r;o++)if(e[n]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},t.prototype.createPopup=function(){var e,t=this.createElement("div",{className:l.POPUP,id:this.element.id+"-popup"});document.body.appendChild(t),this.dropDown=new o.Popup(t,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),i.i(n.isNullOrUndefined)(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),i.i(n.attributes)(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&i.i(n.addClass)([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},t.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||i.i(n.isNullOrUndefined)(this.popupContent)?"string"==typeof this.target?i.i(n.select)(this.target):this.target:this.popupContent},t.prototype.createItems=function(e){var t,s,o,a,p=this.items,c=this.hasIcon(this.items,"iconCss"),d=this.getULElement();d?d.innerHTML="":d=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var h=0;h<p.length;h++){s=p[h];var u=s.text;o=this.createElement("li",{innerHTML:s.url?"":u,className:s.separator?l.ITEM+" "+l.SEPARATOR:l.ITEM,attrs:s.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":u},id:s.id?s.id:i.i(n.getUniqueID)("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?o.textContent=s.url?"":u:o.innerHTML=s.url?"":u,s.url&&(o.appendChild(this.createAnchor(s)),o.classList.add("e-url")),s.iconCss?(t=this.createElement("span",{className:l.ICON+" "+s.iconCss}),s.url?o.childNodes[0].appendChild(t):o.insertBefore(t,o.childNodes[0])):c&&!s.separator&&o.classList.add("e-blank-icon");var m=s.disabled;s.disabled&&o.classList.add("e-disabled"),a={item:s,element:o},this.trigger("beforeItemRender",a);m!==a.item.disabled&&(a.item.disabled?o.classList.add("e-disabled"):o.classList.remove("e-disabled")),d.appendChild(o)}e&&this.getPopUpElement().appendChild(d),c&&i.i(r.c)(this.getPopUpElement())},t.prototype.hasIcon=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i][""+t])return!0;return!1},t.prototype.createAnchor=function(e){var t=this.enableHtmlSanitizer?n.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:t,attrs:{href:e.url}})},t.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},t.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},t.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(l.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},t.prototype.setActiveElem=function(e){this.activeElem=e},t.prototype.getModuleName=function(){return"dropdown-btn"},t.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},t.prototype.destroy=function(){var t=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&i.i(n.detach)(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&i.i(n.removeClass)([this.element],s),i.i(n.removeClass)(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},t.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(i.i(n.removeClass)([e],["e-popup-open","e-popup-close"]),i.i(n.detach)(e))}n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},t.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var t=i.i(n.getComponent)(this.activeElem[1],"dropdown-btn");t&&(this.dropDown=t.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},t.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},t.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),n.EventHandler.add(this.element,"click",this.clickHandler,this),n.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),n.EventHandler.add(window,"resize",this.windowResize,this)},t.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},t.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(n.EventHandler.add(e,"click",this.clickHandler,this),n.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&n.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=i.i(n.rippleEffect)(e,{selector:"."+l.ITEM})},t.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(n.EventHandler.remove(e,"click",this.clickHandler),n.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&n.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),n.isRippleEnabled&&this.rippleFn&&this.rippleFn()},t.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},t.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),i.i(r.d)(this.getULElement(),e.keyCode))},t.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},t.prototype.getLI=function(e){return"LI"===e.tagName?e:i.i(n.closest)(e,"li")},t.prototype.mousedownHandler=function(e){var t=e.target;!this.dropDown||this.canOpen()||i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')||i.i(n.closest)(t,'[id="'+this.element.id+'"]')||this.closePopup(e)},t.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var n=Array.prototype.indexOf.call(this.getULElement().children,i),s=this.items[n];if(s){var o={element:i,item:s,event:e};this.trigger("select",o)}}}this.closePopup(e)}},t.prototype.clickHandler=function(e){var t=e.target;if(i.i(n.closest)(t,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(i.i(n.closest)(t,'[id="'+this.getPopUpElement().id+'"]')){var s=this.getLI(e.target);s&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))}},t.prototype.triggerSelect=function(e){var t,i,n,s=this.getLI(e.target);s&&(i=Array.prototype.indexOf.call(this.getULElement().children,s),(n=this.items[i])&&(t={element:s,item:n,event:e},this.trigger("select",t)))},t.prototype.openPopUp=function(e){var t=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var o=i.i(n.getComponent)(this.activeElem[0],"split-btn");o.isReact&&s.childNodes.length<1&&(!0,o.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(!0,this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var r=this.getULElement();this.popupWireEvents();var a={element:r,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",a,function(e){if(!e.cancel){var s=t.getULElement();if(t.dropDown.show(null,t.element),i.i(n.addClass)([t.element],"e-active"),t.element.setAttribute("aria-expanded","true"),t.element.setAttribute("aria-owns",t.getPopUpElement().id),s&&s.focus(),t.enableRtl&&"0px"!==s.parentElement.style.left){var o=void 0;o=t.element.parentElement&&t.element.parentElement.classList.contains("e-split-btn-wrapper")?t.element.parentElement.offsetWidth:t.element.offsetWidth;var r=s.parentElement.offsetWidth-o,a=parseFloat(s.parentElement.style.left)-r;a<0&&(a=0),s.parentElement.style.left=a+"px"}var p={element:s,items:t.items};t.trigger("open",p)}})},t.prototype.closePopup=function(e,t){var s=this;void 0===e&&(e=null);var o=this.getULElement(),r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",r,function(e){if(e.cancel)o&&o.focus();else{var r=s.getPopUpElement();r&&n.EventHandler.remove(r,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var a=s.getULElement(),p=void 0;a&&(p=a.querySelector(".e-selected")),p&&p.classList.remove("e-selected"),s.dropDown.hide(),i.i(n.removeClass)(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),t&&t.focus();var l={element:a,items:s.items};s.trigger("close",l),!s.target&&a&&i.i(n.detach)(a),(!s.target||s.isColorPicker()||s.target&&!s.isColorPicker())&&s.createPopupOnClick&&s.destroyPopup()}})},t.prototype.unWireEvents=function(){this.createPopupOnClick||n.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),n.EventHandler.remove(this.element,"click",this.clickHandler),n.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(n.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),n.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),n.EventHandler.remove(window,"resize",this.windowResize)},t.prototype.onPropertyChanged=function(e,t){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(i.i(r.a)(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(i.i(r.a)(e,["enableRtl"])));for(var a=0,p=Object.keys(e);a<p.length;a++){switch(p[a]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(l.VERTICAL)>-1||t.cssClass.indexOf(l.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var c=this.element.querySelector("span.e-caret");e.cssClass.indexOf(l.VERTICAL)>-1?i.i(n.classList)(c,["e-icon-bottom"],["e-icon-right"]):i.i(n.classList)(c,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(t.cssClass&&i.i(n.removeClass)([o],t.cssClass.split(" ")),e.cssClass&&i.i(n.addClass)([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),p([i.i(n.Collection)([],r.b)],t.prototype,"items",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Property)("")],t.prototype,"closeActionEvents",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t){e.exports=i},function(e,t,i){"use strict";var n=i(10);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(1);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.d}),i.d(t,"c",function(){return n.c}),i.d(t,"d",function(){return n.b})},function(e,t,i){"use strict";var n=i(3);i.d(t,"a",function(){return n.a})},function(e,t,i){"use strict";var n=i(12);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b}),i.d(t,"c",function(){return n.c})},function(e,t,i){"use strict";var n=i(13);i.d(t,"a",function(){return n.a}),i.d(t,"b",function(){return n.b})},function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={});var r,a,p,l;i.i(s.isNullOrUndefined)(n)&&(n=s.createElement);var c=document.querySelector(e);i.i(s.addClass)([c],["e-btn-group","e-css"]),c.setAttribute("role","group");var d=c.children;t.buttons=t.buttons||[];for(var h=0,u=0;u<d.length;h++,u++)r=d[u],null!==(l=t.buttons[h])&&("BUTTON"===r.tagName?a=r:(a=n("label"),p=d[u+1],p?c.insertBefore(a,p):c.appendChild(a),r.id&&a.setAttribute("for",r.id),l&&l.disabled&&(r.disabled=!0),u++),t.cssClass&&l&&!l.cssClass&&(l.cssClass=t.cssClass),new o.Button(l||{},a));return c}t.a=n;var s=i(0),o=(i.n(s),i(2));i.n(o)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6);i.d(t,"getModel",function(){return n.a}),i.d(t,"upDownKeyHandler",function(){return n.b}),i.d(t,"setBlankIconStyle",function(){return n.c}),i.d(t,"Item",function(){return n.d});var s=i(7);i.d(t,"DropDownButton",function(){return s.a});var o=i(9);i.d(t,"SplitButton",function(){return o.a}),i.d(t,"Deferred",function(){return o.b});var r=i(5);i.d(t,"createButtonGroup",function(){return r.a});var a=i(8);i.d(t,"SpinSettings",function(){return a.a}),i.d(t,"AnimationSettings",function(){return a.b}),i.d(t,"ProgressButton",function(){return a.c})},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return d});var n=i(2),s=(i.n(n),i(0)),o=(i.n(s),i(4)),r=(i.n(o),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}()),a=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p="e-btn-content",l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(null)],t.prototype,"template",void 0),a([i.i(s.Property)(16)],t.prototype,"width",void 0),a([i.i(s.Property)("Left")],t.prototype,"position",void 0),t}(s.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),a([i.i(s.Property)(400)],t.prototype,"duration",void 0),a([i.i(s.Property)("None")],t.prototype,"effect",void 0),a([i.i(s.Property)("ease")],t.prototype,"easing",void 0),t}(s.ChildProperty),d=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.step=1,n}return r(t,e),t.prototype.preRender=function(){e.prototype.preRender.call(this)},t.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},t.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},t.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},t.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},t.prototype.getModuleName=function(){return"progress-btn"},t.prototype.destroy=function(){var t=this,n=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(n=n.concat(this.cssClass.split(" "))),i.i(s.removeClass)([this.element],n),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},t.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},t.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.i(o.createSpinner)({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},t.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},t.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},t.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(p)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},t.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},t.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=s.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:p,innerHTML:e}))},t.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:p,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var n=t.childNodes[0];!n||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,n)}this.element.appendChild(t)},t.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},t.prototype.startProgress=function(e,t){var n=this.element.classList,s=n.contains("e-vertical");n.add("e-progress-active"),n.contains("e-hide-spinner")||i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,s),this.startContAnimate()},t.prototype.startAnimate=function(e,t,i,n,s,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,d=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-d,i=e-d,n+=(l-d)/this.duration*100,s=(t-r)%c==0||100===n?n:s;var h={percent:s,currentDuration:t,step:o};this.eIsVertical=a,0===n?this.trigger("begin",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):100===n||t===this.duration?this.trigger("end",h,function(e){p.successCallback(e,n,s,t,r,d,i)}):this.trigger("progress",h,function(e){p.successCallback(e,n,s,t,r,d,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},t.prototype.successCallback=function(e,t,i,n,s,o,r){var a=this,p=t,l=i,c=o,d=n,h=s,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(d-h)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,h=d),this.isPaused||(d<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),d,u,p,l,e.step,h,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},t.prototype.startContAnimate=function(){var e=this,t=this.element.getElementsByClassName(p)[0];"None"!==this.animationSettings.effect?new s.Animation({}).animate(t,{duration:0===this.animationSettings.duration&&"Enable"===s.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){t.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},t.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)i+=10,i>100&&(i=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var n={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",n),this.progressTime=this.percent=0},t.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(p)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},t.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(p)[0];if(this.element.classList.contains("e-hide-spinner")||i.i(o.hideSpinner)(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},t.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(p)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},t.prototype.setAria=function(){i.i(s.attributes)(this.element,{"aria-label":this.element.textContent+" progress"})},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"click",this.clickHandler,this)},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler)},t.prototype.onPropertyChanged=function(t,n){var r=this.element,a=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(a=!0),e.prototype.onPropertyChanged.call(this,t,n);for(var p=0,l=Object.keys(t);p<l.length;p++){switch(l[p]){case"content":this.setContent(),this.createSpinner(),a&&(i.i(o.showSpinner)(this.element.querySelector(".e-spinner")),a=!1),this.enableProgress&&this.createProgress(),r.setAttribute("aria-label",r.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":t.enableProgress?this.createProgress():i.i(s.remove)(this.getProgress());break;case"spinSettings":t.spinSettings.position&&(r.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(t.spinSettings.template||t.spinSettings.width)&&(r.removeChild(this.getSpinner()),this.createSpinner())}}},t.prototype.focusIn=function(){this.element.focus()},a([i.i(s.Property)(!1)],t.prototype,"enableProgress",void 0),a([i.i(s.Property)(2e3)],t.prototype,"duration",void 0),a([i.i(s.Property)("Left")],t.prototype,"iconPosition",void 0),a([i.i(s.Property)("")],t.prototype,"iconCss",void 0),a([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),a([i.i(s.Property)(!1)],t.prototype,"isPrimary",void 0),a([i.i(s.Property)("")],t.prototype,"cssClass",void 0),a([i.i(s.Property)("")],t.prototype,"content",void 0),a([i.i(s.Property)(!1)],t.prototype,"isToggle",void 0),a([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),a([i.i(s.Complex)({},l)],t.prototype,"spinSettings",void 0),a([i.i(s.Complex)({},c)],t.prototype,"animationSettings",void 0),a([i.i(s.Event)()],t.prototype,"created",void 0),a([i.i(s.Event)()],t.prototype,"begin",void 0),a([i.i(s.Event)()],t.prototype,"progress",void 0),a([i.i(s.Event)()],t.prototype,"end",void 0),a([i.i(s.Event)()],t.prototype,"fail",void 0),t=a([s.NotifyPropertyChanges],t)}(n.Button)},function(e,t,i){"use strict";i.d(t,"a",function(){return d}),i.d(t,"b",function(){return h});var n=i(0),s=(i.n(n),i(2)),o=(i.n(s),i(1)),r=i(3),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),p=this&&this.__decorate||function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},l="e-rtl",c="EJS-SPLITBUTTON",d=function(e){function t(t,i){return e.call(this,t,i)||this}return a(t,e),t.prototype.preRender=function(){var e=this.element;if(e.tagName===c){for(var t=i.i(n.getValue)("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),o=this.createElement(c,{className:"e-"+this.getModuleName()+"-wrapper"}),r=0,a=e.attributes.length;r<a;r++)s.setAttribute(e.attributes[r].nodeName,e.attributes[r].nodeValue);e.parentNode.insertBefore(o,e),i.i(n.detach)(e),e=s,o.appendChild(e),i.i(n.setValue)("ej2_instances",t,e),this.wrapper=o,this.element=e}this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName()))},t.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},t.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},t.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},t.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(l),this.cssClass&&i.i(n.addClass)([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},t.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},t.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new h;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new h;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new r.a(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},t.prototype.setAria=function(){i.i(n.attributes)(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},t.prototype.getModuleName=function(){return"split-btn"},t.prototype.toggle=function(){this.secondaryBtnObj.toggle()},t.prototype.destroy=function(){var t=this,s=[l];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var o=document.getElementById(this.element.id);o&&o.parentElement===this.wrapper&&(this.wrapper.tagName===c?(this.wrapper.innerHTML="",i.i(n.removeClass)([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),i.i(n.removeClass)([this.wrapper],this.cssClass.split(" "))):(i.i(n.removeClass)([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){t.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),i.i(n.remove)(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach(function(e){t.element.classList.add(e)}),i.i(n.setValue)("ej2_instances",[this],this.element)),this.wrapper=null},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new n.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},t.prototype.unWireEvents=function(){n.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),i.i(n.getInstance)(this.element,n.KeyboardEvents).destroy()},t.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},t.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},t.prototype.onPropertyChanged=function(e,t){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(i.i(o.a)(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(i.i(o.a)(e,s));for(var r=0,a=Object.keys(e);r<a.length;r++){switch(a[r]){case"cssClass":t.cssClass&&i.i(n.removeClass)([this.wrapper],t.cssClass.split(" ")),i.i(n.addClass)([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?i.i(n.addClass)([this.wrapper],l):i.i(n.removeClass)([this.wrapper],l);break;case"disabled":e.disabled?i.i(n.addClass)([this.wrapper],"e-splitbtn-disabled"):i.i(n.removeClass)([this.wrapper],"e-splitbtn-disabled")}}},t.prototype.focusIn=function(){this.element.focus()},p([i.i(n.Property)("")],t.prototype,"content",void 0),p([i.i(n.Property)("")],t.prototype,"cssClass",void 0),p([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),p([i.i(n.Property)("")],t.prototype,"iconCss",void 0),p([i.i(n.Property)("Left")],t.prototype,"iconPosition",void 0),p([i.i(n.Property)(!1)],t.prototype,"createPopupOnClick",void 0),p([i.i(n.Collection)([],o.b)],t.prototype,"items",void 0),p([i.i(n.Property)("")],t.prototype,"target",void 0),p([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),p([i.i(n.Event)()],t.prototype,"beforeOpen",void 0),p([i.i(n.Event)()],t.prototype,"beforeClose",void 0),p([i.i(n.Event)()],t.prototype,"click",void 0),p([i.i(n.Event)()],t.prototype,"close",void 0),p([i.i(n.Event)()],t.prototype,"open",void 0),p([i.i(n.Event)()],t.prototype,"select",void 0),p([i.i(n.Event)()],t.prototype,"created",void 0),t=p([n.NotifyPropertyChanges],t)}(r.a),h=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}()}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons","SyncfusionPopups"],t):"object"==typeof exports?exports.SyncfusionSplitbuttons=t(require("SyncfusionBase"),require("SyncfusionButtons"),require("SyncfusionPopups")):e.SyncfusionSplitbuttons=t(e.SyncfusionBase,e.SyncfusionButtons,e.SyncfusionPopups)}(self,((e,t,s)=>(()=>{"use strict";var i={766:t=>{t.exports=e},741:e=>{e.exports=t},197:e=>{e.exports=s}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return i[e](s,s.exports,o),s.exports}o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{AnimationSettings:()=>U,Deferred:()=>S,DropDownButton:()=>C,Item:()=>c,ProgressButton:()=>R,SpinSettings:()=>D,SplitButton:()=>O,createButtonGroup:()=>L,getModel:()=>n,setBlankIconStyle:()=>l,upDownKeyHandler:()=>a});var e,t=o(766),s=(e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)},function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}),i=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r};function n(e,s){for(var i=(0,t.extend)({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];s.indexOf(r)<0&&(0,t.deleteObject)(i,r)}return i}function a(e,s){var i=40===s?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var r=0,a=e.children.length;r<a;r++)e.children[r].classList.contains("e-focused")&&(n=r,e.children[r].classList.remove("e-focused"),40===s?n++:n--,n===(40===s?e.childElementCount:-1)&&(n=i));-1!==(n=p(e,e.children[n],n,s))&&((0,t.addClass)([e.children[n]],"e-focused"),e.children[n].focus())}function p(e,t,s,i,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(s===(40===i?e.childElementCount-1:0)?s=40===i?0:e.childElementCount-1:40===i?s++:s--),(t=e.children[s]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return-1;s=p(e,t,s,i,n)}return s}function l(e,s){var i=[].slice.call(e.getElementsByClassName("e-blank-icon"));s&&[].slice.call(e.getElementsByClassName("e-item")).forEach((function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}));if(i.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!(0,t.isNullOrUndefined)(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";i.forEach((function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p}))}}}var c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return s(n,e),i([(0,t.Property)("")],n.prototype,"iconCss",void 0),i([(0,t.Property)("")],n.prototype,"id",void 0),i([(0,t.Property)(!1)],n.prototype,"separator",void 0),i([(0,t.Property)("")],n.prototype,"text",void 0),i([(0,t.Property)("")],n.prototype,"url",void 0),i([(0,t.Property)(!1)],n.prototype,"disabled",void 0),n}(t.ChildProperty),d=o(741),h=o(197),u=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),m=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},y="e-menu-icon",f="e-item",v="e-dropdown-popup",g="e-separator",b="e-vertical",C=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isPopupCreated=!0,i}return u(s,e),s.prototype.preRender=function(){},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},s.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;r>=0;r--)s=new c(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},s.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},s.prototype.createPopup=function(){var e,s=this.createElement("div",{className:v,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new h.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),(0,t.isNullOrUndefined)(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),(0,t.attributes)(this.element,((e={})["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&(0,t.addClass)([s],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},s.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||(0,t.isNullOrUndefined)(this.popupContent)?"string"==typeof this.target?(0,t.select)(this.target):this.target:this.popupContent},s.prototype.createItems=function(e){var s,i,n,o,r=this.items,a=this.hasIcon(this.items,"iconCss"),p=this.getULElement();p?p.innerHTML="":p=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var d=(i=r[c]).text;n=this.createElement("li",{innerHTML:i.url?"":d,className:i.separator?f+" "+g:f,attrs:i.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":d},id:i.id?i.id:(0,t.getUniqueID)("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":d:n.innerHTML=i.url?"":d,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(s=this.createElement("span",{className:y+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(s):n.insertBefore(s,n.childNodes[0])):a&&!i.separator&&n.classList.add("e-blank-icon");var h=i.disabled;i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),h!==o.item.disabled&&(o.item.disabled?n.classList.add("e-disabled"):n.classList.remove("e-disabled")),p.appendChild(n)}e&&this.getPopUpElement().appendChild(p),a&&l(this.getPopUpElement())},s.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},s.prototype.createAnchor=function(e){var s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:s,attrs:{href:e.url}})},s.prototype.initialize=function(){this.button=new d.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=(0,t.getUniqueID)("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},s.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},s.prototype.appendArrowSpan=function(){this.cssClass=(0,t.isNullOrUndefined)(this.cssClass)?"":this.cssClass,this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(b)>-1?"bottom":"right")+" e-caret"}))},s.prototype.setActiveElem=function(e){this.activeElem=e},s.prototype.getModuleName=function(){return"dropdown-btn"},s.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},s.prototype.destroy=function(){var s,i=this;(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName())&&(this.element.querySelector("span.e-caret")&&(0,t.detach)(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&(0,t.removeClass)([this.element],s),(0,t.removeClass)(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach((function(e){i.element.removeAttribute(e)})),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents())},s.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&((0,t.removeClass)([e],["e-popup-open","e-popup-close"]),(0,t.detach)(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},s.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var s=(0,t.getComponent)(this.activeElem[1],"dropdown-btn");s&&(this.dropDown=s.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},s.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},s.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(window,"resize",this.windowResize,this)},s.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},s.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=(0,t.rippleEffect)(e,{selector:"."+f})},s.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},s.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},s.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),a(this.getULElement(),e.keyCode))},s.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},s.prototype.getLI=function(e){return"LI"===e.tagName?e:(0,t.closest)(e,"li")},s.prototype.mousedownHandler=function(e){var s=e.target;!this.dropDown||this.canOpen()||(0,t.closest)(s,'[id="'+this.getPopUpElement().id+'"]')||(0,t.closest)(s,'[id="'+this.element.id+'"]')||this.closePopup(e)},s.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var s=this.getLI(t);if(s){var i=Array.prototype.indexOf.call(this.getULElement().children,s),n=this.items[i];if(n){var o={element:s,item:n,event:e};this.trigger("select",o)}}}this.closePopup(e)}},s.prototype.clickHandler=function(e){var s=e.target;(0,t.closest)(s,'[id="'+this.element.id+'"]')?!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e)):(0,t.closest)(s,'[id="'+this.getPopUpElement().id+'"]')&&this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))},s.prototype.triggerSelect=function(e){var t,s,i,n=this.getLI(e.target);n&&(s=Array.prototype.indexOf.call(this.getULElement().children,n),(i=this.items[s])&&(t={element:n,item:i,event:e},this.trigger("select",t)))},s.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=(0,t.getComponent)(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(!0,n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(!0,this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,(function(e){if(!e.cancel){var i=s.getULElement();if(s.dropDown.show(null,s.element),(0,t.addClass)([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),i&&i.focus(),s.enableRtl&&"0px"!==i.parentElement.style.left){var n=void 0;n=s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement.offsetWidth:s.element.offsetWidth;var o=i.parentElement.offsetWidth-n,r=parseFloat(i.parentElement.style.left)-o;r<0&&(r=0),i.parentElement.style.left=r+"px"}var a={element:i,items:s.items};s.trigger("open",a)}}))},s.prototype.closePopup=function(e,s){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,(function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),i.dropDown.hide(),(0,t.removeClass)(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus();var p={element:r,items:i.items};i.trigger("close",p),!i.target&&r&&(0,t.detach)(r),(!i.target||i.isColorPicker()||i.target&&!i.isColorPicker())&&i.createPopupOnClick&&i.destroyPopup()}}))},s.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),t.EventHandler.remove(window,"resize",this.windowResize)},s.prototype.onPropertyChanged=function(e,s){var i;this.button.setProperties(n(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"])),this.isPopupCreated&&(i=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(b)>-1||s.cssClass.indexOf(b)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var a=this.element.querySelector("span.e-caret");e.cssClass.indexOf(b)>-1?(0,t.classList)(a,["e-icon-bottom"],["e-icon-right"]):(0,t.classList)(a,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(s.cssClass&&(0,t.removeClass)([i],s.cssClass.split(" ")),e.cssClass&&(0,t.addClass)([i],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},s.prototype.focusIn=function(){this.element.focus()},m([(0,t.Property)("")],s.prototype,"content",void 0),m([(0,t.Property)("")],s.prototype,"cssClass",void 0),m([(0,t.Property)(!1)],s.prototype,"disabled",void 0),m([(0,t.Property)("")],s.prototype,"iconCss",void 0),m([(0,t.Property)("Left")],s.prototype,"iconPosition",void 0),m([(0,t.Property)(!0)],s.prototype,"enableHtmlSanitizer",void 0),m([(0,t.Collection)([],c)],s.prototype,"items",void 0),m([(0,t.Property)(!1)],s.prototype,"createPopupOnClick",void 0),m([(0,t.Property)("")],s.prototype,"target",void 0),m([(0,t.Property)("")],s.prototype,"closeActionEvents",void 0),m([(0,t.Event)()],s.prototype,"beforeItemRender",void 0),m([(0,t.Event)()],s.prototype,"beforeOpen",void 0),m([(0,t.Event)()],s.prototype,"beforeClose",void 0),m([(0,t.Event)()],s.prototype,"close",void 0),m([(0,t.Event)()],s.prototype,"open",void 0),m([(0,t.Event)()],s.prototype,"select",void 0),m([(0,t.Event)()],s.prototype,"created",void 0),s=m([t.NotifyPropertyChanges],s)}(t.Component),P=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),E=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},w="e-rtl",k="EJS-SPLITBUTTON",O=function(e){function s(t,s){return e.call(this,t,s)||this}return P(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===k){for(var s=(0,t.getValue)("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(k,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),(0,t.detach)(e),e=i,n.appendChild(e),(0,t.setValue)("ej2_instances",s,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=(0,t.getUniqueID)("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},s.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(t,s){e.prototype.addItems.call(this,t,s),this.secondaryBtnObj.items=this.items},s.prototype.removeItems=function(t,s){e.prototype.removeItems.call(this,t,s),this.secondaryBtnObj.items=this.items},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(w),this.cssClass&&(0,t.addClass)([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new d.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var s={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick,beforeItemRender:function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},open:function(t){e.trigger("open",t)},close:function(t){e.trigger("close",t)},select:function(t){e.trigger("select",t)},beforeOpen:function(t){e.createPopupOnClick&&0===e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var s=new S;return e.trigger("beforeOpen",t,(function(e){s.resolve(e)})),s},beforeClose:function(t){var s=new S;return e.trigger("beforeClose",t,(function(e){s.resolve(e)})),s}};this.secondaryBtnObj=new C(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},s.prototype.setAria=function(){(0,t.attributes)(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var s=this,i=[w];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===k?(this.wrapper.innerHTML="",(0,t.removeClass)([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),(0,t.removeClass)([this.wrapper],this.cssClass.split(" "))):((0,t.removeClass)([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach((function(e){s.element.removeAttribute(e)})),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),(0,t.remove)(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach((function(e){s.element.classList.add(e)})),(0,t.setValue)("ej2_instances",[this],this.element)),this.wrapper=null},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),(0,t.getInstance)(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},s.prototype.onPropertyChanged=function(e,s){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,i));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":s.cssClass&&(0,t.removeClass)([this.wrapper],s.cssClass.split(" ")),(0,t.addClass)([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?(0,t.addClass)([this.wrapper],w):(0,t.removeClass)([this.wrapper],w);break;case"disabled":e.disabled?(0,t.addClass)([this.wrapper],"e-splitbtn-disabled"):(0,t.removeClass)([this.wrapper],"e-splitbtn-disabled")}}},s.prototype.focusIn=function(){this.element.focus()},E([(0,t.Property)("")],s.prototype,"content",void 0),E([(0,t.Property)("")],s.prototype,"cssClass",void 0),E([(0,t.Property)(!1)],s.prototype,"disabled",void 0),E([(0,t.Property)("")],s.prototype,"iconCss",void 0),E([(0,t.Property)("Left")],s.prototype,"iconPosition",void 0),E([(0,t.Property)(!1)],s.prototype,"createPopupOnClick",void 0),E([(0,t.Collection)([],c)],s.prototype,"items",void 0),E([(0,t.Property)("")],s.prototype,"target",void 0),E([(0,t.Event)()],s.prototype,"beforeItemRender",void 0),E([(0,t.Event)()],s.prototype,"beforeOpen",void 0),E([(0,t.Event)()],s.prototype,"beforeClose",void 0),E([(0,t.Event)()],s.prototype,"click",void 0),E([(0,t.Event)()],s.prototype,"close",void 0),E([(0,t.Event)()],s.prototype,"open",void 0),E([(0,t.Event)()],s.prototype,"select",void 0),E([(0,t.Event)()],s.prototype,"created",void 0),s=E([t.NotifyPropertyChanges],s)}(C),S=function(){var e=this;this.promise=new Promise((function(t,s){e.resolve=t,e.reject=s})),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)};function L(e,s,i){var n,o,r,a;void 0===s&&(s={}),(0,t.isNullOrUndefined)(i)&&(i=t.createElement);var p=document.querySelector(e);(0,t.addClass)([p],["e-btn-group","e-css"]),p.setAttribute("role","group");var l=p.children;s.buttons=s.buttons||[];for(var c=0,h=0;h<l.length;c++,h++)n=l[h],null!==(a=s.buttons[c])&&("BUTTON"===n.tagName?o=n:(o=i("label"),(r=l[h+1])?p.insertBefore(o,r):p.appendChild(o),n.id&&o.setAttribute("for",n.id),a&&a.disabled&&(n.disabled=!0),h++),s.cssClass&&a&&!a.cssClass&&(a.cssClass=s.cssClass),new d.Button(a||{},o));return p}var H=function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},e(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),B=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},N="e-hide-spinner",j="e-progress",x="e-progress-active",A="e-btn-content",D=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return H(s,e),B([(0,t.Property)(null)],s.prototype,"template",void 0),B([(0,t.Property)(16)],s.prototype,"width",void 0),B([(0,t.Property)("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),U=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return H(s,e),B([(0,t.Property)(400)],s.prototype,"duration",void 0),B([(0,t.Property)("None")],s.prototype,"effect",void 0),B([(0,t.Property)("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),R=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.step=1,i}return H(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,i=[N,x,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(i=i.concat(this.cssClass.split(" "))),(0,t.removeClass)([this.element],i),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach((function(e){s.element.removeAttribute(e)})),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),(0,h.createSpinner)({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName(j)[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(A)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:j}))},s.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:A,innerHTML:e}))},s.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:A,innerHTML:e});if(this.iconCss){var s=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(s.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var i=t.childNodes[0];!i||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(s):t.insertBefore(s,i)}this.element.appendChild(t)},s.prototype.clickHandler=function(){this.element.classList.contains(x)||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,i=s.contains("e-vertical");s.add(x),s.contains(N)||(0,h.showSpinner)(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,d=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-d,s=e-d,i+=(l-d)/this.duration*100;var h={percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o};this.eIsVertical=a,0===i?this.trigger("begin",h,(function(e){p.successCallback(e,i,n,t,r,d,s)})):100===i||t===this.duration?this.trigger("end",h,(function(e){p.successCallback(e,i,n,t,r,d,s)})):this.trigger("progress",h,(function(e){p.successCallback(e,i,n,t,r,d,s)}))}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,c=o,d=i,h=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(d-h)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame((function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())})),l=p,h=d),this.isPaused||(d<this.duration&&p<100?this.interval=window.setTimeout((function(){a.startAnimate(Date.now(),d,u,p,l,e.step,h,m)}),this.duration/100-c):this.interval=window.setTimeout((function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()}),100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(A)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:0===this.animationSettings.duration&&"Enable"===t.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(x);for(var s=this.percent;s<100;s++)(s+=10)>100&&(s=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var i={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",i),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(A)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(A)[0];if(this.element.classList.contains(N)||(0,h.hideSpinner)(this.element.querySelector(".e-spinner")),this.element.classList.remove(x),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(A)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){(0,t.attributes)(this.element,{"aria-label":this.element.textContent+" progress"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,i){var n=this.element,o=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(o=!0),e.prototype.onPropertyChanged.call(this,s,i);for(var r=0,a=Object.keys(s);r<a.length;r++){switch(a[r]){case"content":this.setContent(),this.createSpinner(),o&&((0,h.showSpinner)(this.element.querySelector(".e-spinner")),o=!1),this.enableProgress&&this.createProgress(),n.setAttribute("aria-label",n.textContent+" progress");break;case"iconCss":i.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():(0,t.remove)(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(n.classList.remove("e-spin-"+i.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(n.removeChild(this.getSpinner()),this.createSpinner())}}},s.prototype.focusIn=function(){this.element.focus()},B([(0,t.Property)(!1)],s.prototype,"enableProgress",void 0),B([(0,t.Property)(2e3)],s.prototype,"duration",void 0),B([(0,t.Property)("Left")],s.prototype,"iconPosition",void 0),B([(0,t.Property)("")],s.prototype,"iconCss",void 0),B([(0,t.Property)(!1)],s.prototype,"disabled",void 0),B([(0,t.Property)(!1)],s.prototype,"isPrimary",void 0),B([(0,t.Property)("")],s.prototype,"cssClass",void 0),B([(0,t.Property)("")],s.prototype,"content",void 0),B([(0,t.Property)(!1)],s.prototype,"isToggle",void 0),B([(0,t.Property)(!0)],s.prototype,"enableHtmlSanitizer",void 0),B([(0,t.Complex)({},D)],s.prototype,"spinSettings",void 0),B([(0,t.Complex)({},U)],s.prototype,"animationSettings",void 0),B([(0,t.Event)()],s.prototype,"created",void 0),B([(0,t.Event)()],s.prototype,"begin",void 0),B([(0,t.Event)()],s.prototype,"progress",void 0),B([(0,t.Event)()],s.prototype,"end",void 0),B([(0,t.Event)()],s.prototype,"fail",void 0),s=B([t.NotifyPropertyChanges],s)}(d.Button)})(),r})()));
/*!
* filename: ej2-splitbuttons.umd.min.js
* version : 25.2.4
* version : 26.1.35
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t(e.ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,t,i,s){"use strict";function n(e,i){for(var s=t.extend({},e),n=0,o=Object.keys(s);n<o.length;n++){var r=o[n];i.indexOf(r)<0&&t.deleteObject(s,r)}return s}function o(e,i){var s=40===i?0:e.childElementCount-1,n=s,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===i?n++:n--,n===(40===i?e.childElementCount:-1)&&(n=s));-1!==(n=r(e,e.children[n],n,i))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,i,s,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===s?e.childElementCount-1:0)?i=40===s?0:e.childElementCount-1:40===s?i++:i--),(t=e.children[i]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return i=-1;i=r(e,t,i,s,n)}return i}function a(e,i){var s=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(i){[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")})}if(s.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";s.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}var p=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),l=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),l([t.Property("")],i.prototype,"iconCss",void 0),l([t.Property("")],i.prototype,"id",void 0),l([t.Property(!1)],i.prototype,"separator",void 0),l([t.Property("")],i.prototype,"text",void 0),l([t.Property("")],i.prototype,"url",void 0),l([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),h=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),d=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},u="e-menu-icon",m="e-item",y="e-dropdown-popup",f="e-separator",v="e-vertical",g=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!0,s}return h(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var i,s=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){s=n;break}for(var r=e.length-1;r>=0;r--)i=new c(this,"items",e[r],!0),this.items.splice(s,0,i);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var i=!1,s=0,n=e.length;s<n;s++)for(var o=0,r=this.items.length;o<r;o++)if(e[s]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,i=this.createElement("div",{className:y,id:this.element.id+"-popup"});document.body.appendChild(i),this.dropDown=new s.Popup(i,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),t.isNullOrUndefined(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&t.addClass([i],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||t.isNullOrUndefined(this.popupContent)?"string"==typeof this.target?t.select(this.target):this.target:this.popupContent},r.prototype.createItems=function(e){var i,s,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(s=r[c]).text;n=this.createElement("li",{innerHTML:s.url?"":h,className:s.separator?m+" "+f:m,attrs:s.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=s.url?"":h:n.innerHTML=s.url?"":h,s.url&&(n.appendChild(this.createAnchor(s)),n.classList.add("e-url")),s.iconCss?(i=this.createElement("span",{className:u+" "+s.iconCss}),s.url?n.childNodes[0].appendChild(i):n.insertBefore(i,n.childNodes[0])):p&&!s.separator&&n.classList.add("e-blank-icon");var d=s.disabled;s.disabled&&n.classList.add("e-disabled"),o={item:s,element:n},this.trigger("beforeItemRender",o);d!==o.item.disabled&&(o.item.disabled?n.classList.add("e-disabled"):n.classList.remove("e-disabled")),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var i=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:i,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new i.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(v)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var i=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&t.removeClass([this.element],s),t.removeClass(this.activeElem,["e-active"]);(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var i=t.getComponent(this.activeElem[1],"dropdown-btn");i&&(this.dropDown=i.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(window,"resize",this.windowResize,this)},r.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},r.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var i=e.target;!this.dropDown||this.canOpen()||t.closest(i,'[id="'+this.getPopUpElement().id+'"]')||t.closest(i,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var s=Array.prototype.indexOf.call(this.getULElement().children,i),n=this.items[s];if(n){var o={element:i,item:n,event:e};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var i=e.target;if(t.closest(i,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(i,'[id="'+this.getPopUpElement().id+'"]')){this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))}},r.prototype.triggerSelect=function(e){var t,i,s,n=this.getLI(e.target);n&&(i=Array.prototype.indexOf.call(this.getULElement().children,n),(s=this.items[i])&&(t={element:n,item:s,event:e},this.trigger("select",t)))},r.prototype.openPopUp=function(e){var i=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&s.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var s=i.getULElement();if(i.dropDown.show(null,i.element),t.addClass([i.element],"e-active"),i.element.setAttribute("aria-expanded","true"),i.element.setAttribute("aria-owns",i.getPopUpElement().id),s&&s.focus(),i.enableRtl&&"0px"!==s.parentElement.style.left){var n=void 0;n=i.element.parentElement&&i.element.parentElement.classList.contains("e-split-btn-wrapper")?i.element.parentElement.offsetWidth:i.element.offsetWidth;var o=s.parentElement.offsetWidth-n,r=parseFloat(s.parentElement.style.left)-o;r<0&&(r=0),s.parentElement.style.left=r+"px"}var a={element:s,items:i.items};i.trigger("open",a)}})},r.prototype.closePopup=function(e,i){var s=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=s.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var r=s.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),s.dropDown.hide(),t.removeClass(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),i&&i.focus();var p={element:r,items:s.items};s.trigger("close",p),!s.target&&r&&t.detach(r),(!s.target||s.isColorPicker()||s.target&&!s.isColorPicker())&&s.createPopupOnClick&&s.destroyPopup()}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),t.EventHandler.remove(window,"resize",this.windowResize)},r.prototype.onPropertyChanged=function(e,i){this.button.setProperties(n(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"]));var s;this.isPopupCreated&&(s=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(v)>-1||i.cssClass.indexOf(v)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var a=this.element.querySelector("span.e-caret");e.cssClass.indexOf(v)>-1?t.classList(a,["e-icon-bottom"],["e-icon-right"]):t.classList(a,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(i.cssClass&&t.removeClass([s],i.cssClass.split(" ")),e.cssClass&&t.addClass([s],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}}},r.prototype.focusIn=function(){this.element.focus()},d([t.Property("")],r.prototype,"content",void 0),d([t.Property("")],r.prototype,"cssClass",void 0),d([t.Property(!1)],r.prototype,"disabled",void 0),d([t.Property("")],r.prototype,"iconCss",void 0),d([t.Property("Left")],r.prototype,"iconPosition",void 0),d([t.Property(!0)],r.prototype,"enableHtmlSanitizer",void 0),d([t.Collection([],c)],r.prototype,"items",void 0),d([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),d([t.Property("")],r.prototype,"target",void 0),d([t.Property("")],r.prototype,"closeActionEvents",void 0),d([t.Event()],r.prototype,"beforeItemRender",void 0),d([t.Event()],r.prototype,"beforeOpen",void 0),d([t.Event()],r.prototype,"beforeClose",void 0),d([t.Event()],r.prototype,"close",void 0),d([t.Event()],r.prototype,"open",void 0),d([t.Event()],r.prototype,"select",void 0),d([t.Event()],r.prototype,"created",void 0),r=d([t.NotifyPropertyChanges],r)}(t.Component),b=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),C=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},P="EJS-SPLITBUTTON",E=function(e){function s(t,i){return e.call(this,t,i)||this}return b(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===P){for(var i=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(P,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)s.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=s,n.appendChild(e),t.setValue("ej2_instances",i,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},s.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new i.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new w;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new w;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new g(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},s.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var i=this,s=["e-rtl"];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===P?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){i.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach(function(e){i.element.classList.add(e)}),t.setValue("ej2_instances",[this],this.element)),this.wrapper=null},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},s.prototype.onPropertyChanged=function(e,i){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,s));for(var o=0,r=Object.keys(e);o<r.length;o++){switch(r[o]){case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],"e-rtl"):t.removeClass([this.wrapper],"e-rtl");break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}}},s.prototype.focusIn=function(){this.element.focus()},C([t.Property("")],s.prototype,"content",void 0),C([t.Property("")],s.prototype,"cssClass",void 0),C([t.Property(!1)],s.prototype,"disabled",void 0),C([t.Property("")],s.prototype,"iconCss",void 0),C([t.Property("Left")],s.prototype,"iconPosition",void 0),C([t.Property(!1)],s.prototype,"createPopupOnClick",void 0),C([t.Collection([],c)],s.prototype,"items",void 0),C([t.Property("")],s.prototype,"target",void 0),C([t.Event()],s.prototype,"beforeItemRender",void 0),C([t.Event()],s.prototype,"beforeOpen",void 0),C([t.Event()],s.prototype,"beforeClose",void 0),C([t.Event()],s.prototype,"click",void 0),C([t.Event()],s.prototype,"close",void 0),C([t.Event()],s.prototype,"open",void 0),C([t.Event()],s.prototype,"select",void 0),C([t.Event()],s.prototype,"created",void 0),s=C([t.NotifyPropertyChanges],s)}(g),w=function(){return function(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}}(),k=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),O=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},L="e-hide-spinner",S="e-progress-active",H="e-btn-content",B=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return k(i,e),O([t.Property(null)],i.prototype,"template",void 0),O([t.Property(16)],i.prototype,"width",void 0),O([t.Property("Left")],i.prototype,"position",void 0),i}(t.ChildProperty),j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return k(i,e),O([t.Property(400)],i.prototype,"duration",void 0),O([t.Property("None")],i.prototype,"effect",void 0),O([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),N=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.step=1,s}return k(i,e),i.prototype.preRender=function(){e.prototype.preRender.call(this)},i.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},i.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},i.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},i.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},i.prototype.getModuleName=function(){return"progress-btn"},i.prototype.destroy=function(){var i=this,s=[L,S,"e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(s=s.concat(this.cssClass.split(" "))),t.removeClass([this.element],s);(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},i.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},i.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),s.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},i.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},i.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},i.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(H)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},i.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},i.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:H,innerHTML:e}))},i.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:H,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var s=t.childNodes[0];!s||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,s)}this.element.appendChild(t)},i.prototype.clickHandler=function(){this.element.classList.contains(S)||this.startProgress()},i.prototype.startProgress=function(e,t){var i=this.element.classList,n=i.contains("e-vertical");i.add(S),i.contains(L)||s.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},i.prototype.startAnimate=function(e,t,i,s,n,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,i=e-h,s+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===s?s:n,currentDuration:t,step:o};this.eIsVertical=a,0===s?this.trigger("begin",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):100===s||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):this.trigger("progress",d,function(e){p.successCallback(e,s,n,t,r,h,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},i.prototype.successCallback=function(e,t,i,s,n,o,r){var a=this,p=t,l=i,c=o,h=s,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},i.prototype.startContAnimate=function(){var e=this,i=this.element.getElementsByClassName(H)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(i,{duration:0===this.animationSettings.duration&&"Enable"===t.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){i.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},i.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add(S);for(var i=this.percent;i<100;i++)(i+=10)>100&&(i=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var s={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},i.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(H)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},i.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(H)[0];if(this.element.classList.contains(L)||s.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove(S),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},i.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(H)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},i.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress"})},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},i.prototype.onPropertyChanged=function(i,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,i,n);for(var a=0,p=Object.keys(i);a<p.length;a++){switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(s.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":i.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":i.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(i.spinSettings.template||i.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}}},i.prototype.focusIn=function(){this.element.focus()},O([t.Property(!1)],i.prototype,"enableProgress",void 0),O([t.Property(2e3)],i.prototype,"duration",void 0),O([t.Property("Left")],i.prototype,"iconPosition",void 0),O([t.Property("")],i.prototype,"iconCss",void 0),O([t.Property(!1)],i.prototype,"disabled",void 0),O([t.Property(!1)],i.prototype,"isPrimary",void 0),O([t.Property("")],i.prototype,"cssClass",void 0),O([t.Property("")],i.prototype,"content",void 0),O([t.Property(!1)],i.prototype,"isToggle",void 0),O([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),O([t.Complex({},B)],i.prototype,"spinSettings",void 0),O([t.Complex({},j)],i.prototype,"animationSettings",void 0),O([t.Event()],i.prototype,"created",void 0),O([t.Event()],i.prototype,"begin",void 0),O([t.Event()],i.prototype,"progress",void 0),O([t.Event()],i.prototype,"end",void 0),O([t.Event()],i.prototype,"fail",void 0),i=O([t.NotifyPropertyChanges],i)}(i.Button);e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=c,e.DropDownButton=g,e.SplitButton=E,e.Deferred=w,e.createButtonGroup=function(e,s,n){void 0===s&&(s={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;s.buttons=s.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=s.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),s.cssClass&&p&&!p.cssClass&&(p.cssClass=s.cssClass),new i.Button(p||{},r));return l},e.SpinSettings=B,e.AnimationSettings=j,e.ProgressButton=N,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Buttons,e.ej2Popups)}(this,function(e,h,d,r){"use strict";i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};var i,t=function(e,t){function s(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},s=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(o<3?n(r):3<o?n(t,s,r):n(t,s))||r);return 3<o&&r&&Object.defineProperty(t,s,r),r};function a(e,t){for(var s=h.extend({},e),i=0,n=Object.keys(s);i<n.length;i++){var o=n[i];t.indexOf(o)<0&&h.deleteObject(s,o)}return s}function n(e,t){var s=40===t?0:e.childElementCount-1,i=s,n=e.querySelector(".e-selected");n&&n.classList.remove("e-selected");for(var o=0,r=e.children.length;o<r;o++)e.children[o].classList.contains("e-focused")&&(i=o,e.children[o].classList.remove("e-focused"),40===t?i++:i--,i===(40===t?e.childElementCount:-1))&&(i=s);-1!==(i=function e(t,s,i,n,o){void 0===o&&(o=0);(s.classList.contains("e-separator")||s.classList.contains("e-disabled"))&&(i===(40===n?t.childElementCount-1:0)?i=40===n?0:t.childElementCount-1:40===n?i++:i--);s=t.children[i];if(s.classList.contains("e-separator")||s.classList.contains("e-disabled")){if(++o===t.childElementCount)return i=-1;i=e(t,s,i,n,o)}return i}(e,e.children[i],i,t))&&(h.addClass([e.children[i]],"e-focused"),e.children[i].focus())}function p(e,t){var s,i,n,o=[].slice.call(e.getElementsByClassName("e-blank-icon"));t&&[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}),o.length&&(t=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)"),h.isNullOrUndefined(t)||(s=(t=t.classList.contains("e-url")?t.querySelector(".e-menu-url"):t).querySelector(".e-menu-icon"),e=e.classList.contains("e-rtl"),i=e?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},n=parseInt(getComputedStyle(s).fontSize,10)+parseInt(getComputedStyle(s)[i.margin],10)+parseInt(getComputedStyle(t).paddingLeft,10)+"px",o.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[i.padding]=n:e.style[i.padding]=n})))}o=h.ChildProperty,t(c,o),s([h.Property("")],c.prototype,"iconCss",void 0),s([h.Property("")],c.prototype,"id",void 0),s([h.Property(!1)],c.prototype,"separator",void 0),s([h.Property("")],c.prototype,"text",void 0),s([h.Property("")],c.prototype,"url",void 0),s([h.Property(!1)],c.prototype,"disabled",void 0);var o,l=c;function c(){return null!==o&&o.apply(this,arguments)||this}u=function(e,t){return(u=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};var u,m,t=function(e,t){function s(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},s=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(o<3?n(r):3<o?n(t,s,r):n(t,s))||r);return 3<o&&r&&Object.defineProperty(t,s,r),r},R="e-menu-icon",y="e-item",I="e-dropdown-popup",T="e-separator",f="e-vertical",g=(m=h.Component,t(v,m),v.prototype.preRender=function(){},v.prototype.getPersistData=function(){return this.addOnPersist([])},v.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},v.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},v.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;0<=r;r--)s=new l(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},v.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},v.prototype.createPopup=function(){var e,t=this.createElement("div",{className:I,id:this.element.id+"-popup"});document.body.appendChild(t),this.dropDown=new r.Popup(t,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),h.isNullOrUndefined(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),h.attributes(this.element,((e={})["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&h.addClass([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},v.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||h.isNullOrUndefined(this.popupContent)?"string"==typeof this.target?h.select(this.target):this.target:this.popupContent},v.prototype.createItems=function(e){var t=this.items,s=this.hasIcon(this.items,"iconCss"),i=this.getULElement();i?i.innerHTML="":i=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var n=0;n<t.length;n++){var o,r=(o=t[n]).text,a=this.createElement("li",{innerHTML:o.url?"":r,className:o.separator?y+" "+T:y,attrs:o.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":r},id:o.id||h.getUniqueID("e-"+this.getModuleName()+"-item")}),r=(this.enableHtmlSanitizer?a.textContent=o.url?"":r:a.innerHTML=o.url?"":r,o.url&&(a.appendChild(this.createAnchor(o)),a.classList.add("e-url")),o.iconCss?(r=this.createElement("span",{className:R+" "+o.iconCss}),o.url?a.childNodes[0].appendChild(r):a.insertBefore(r,a.childNodes[0])):s&&!o.separator&&a.classList.add("e-blank-icon"),o.disabled);o.disabled&&a.classList.add("e-disabled"),this.trigger("beforeItemRender",o={item:o,element:a}),r!==o.item.disabled&&(o.item.disabled?a.classList.add("e-disabled"):a.classList.remove("e-disabled")),i.appendChild(a)}e&&this.getPopUpElement().appendChild(i),s&&p(this.getPopUpElement())},v.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},v.prototype.createAnchor=function(e){var t=this.enableHtmlSanitizer?h.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:t,attrs:{href:e.url}})},v.prototype.initialize=function(){this.button=new d.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=h.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent||"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},v.prototype.isColorPicker=function(){var e;return!!this.element&&!!((e=this.element.previousSibling)&&e.classList&&e.classList.contains("e-split-colorpicker"))},v.prototype.appendArrowSpan=function(){this.cssClass=h.isNullOrUndefined(this.cssClass)?"":this.cssClass,this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(-1<this.cssClass.indexOf(f)?"bottom":"right")+" e-caret"}))},v.prototype.setActiveElem=function(e){this.activeElem=e},v.prototype.getModuleName=function(){return"dropdown-btn"},v.prototype.canOpen=function(){var e=!1;return e=this.isPopupCreated?this.getPopUpElement().classList.contains("e-popup-close"):e},v.prototype.destroy=function(){var e,t=this;m.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()&&(this.element.querySelector("span.e-caret")&&h.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(e=this.cssClass.split(" ")),this.button.destroy(),e&&h.removeClass([this.element],e),h.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents())},v.prototype.destroyPopup=function(){var e;this.isPopupCreated&&(this.dropDown.destroy(),this.getPopUpElement()&&(e=document.getElementById(this.getPopUpElement().id))&&(h.removeClass([e],["e-popup-open","e-popup-close"]),h.detach(e)),h.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),h.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated)&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0),this.isPopupCreated=!1},v.prototype.getPopUpElement=function(){var e,t=null;return!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")&&(e=h.getComponent(this.activeElem[1],"dropdown-btn"))&&(this.dropDown=e.dropDown),t=this.dropDown?this.dropDown.element:t},v.prototype.getULElement=function(){var e=null;return e=this.getPopUpElement()?this.getPopUpElement().children[0]:e},v.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||h.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),h.EventHandler.add(this.element,"click",this.clickHandler,this),h.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),h.EventHandler.add(window,"resize",this.windowResize,this)},v.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},v.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&h.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(h.EventHandler.add(e,"click",this.clickHandler,this),h.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents)&&h.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this),this.rippleFn=h.rippleEffect(e,{selector:"."+y})},v.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&h.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(h.EventHandler.remove(e,"click",this.clickHandler),h.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents)&&h.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler),h.isRippleEnabled&&this.rippleFn&&this.rippleFn()},v.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},v.prototype.upDownKeyHandler=function(e){this.target&&(38===e.keyCode||40===e.keyCode)||(e.preventDefault(),n(this.getULElement(),e.keyCode))},v.prototype.keyEventHandler=function(e){this.target&&(13===e.keyCode||9===e.keyCode)||(13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),this.activeElem[0].focus()):e.target&&-1<e.target.className.indexOf("e-edit-template")&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},v.prototype.getLI=function(e){return"LI"===e.tagName?e:h.closest(e,"li")},v.prototype.mousedownHandler=function(e){var t=e.target;!this.dropDown||this.canOpen()||h.closest(t,'[id="'+this.getPopUpElement().id+'"]')||h.closest(t,'[id="'+this.element.id+'"]')||this.closePopup(e)},v.prototype.focusoutHandler=function(e){var t,s;this.isPopupCreated&&!this.canOpen()&&((t=e.relatedTarget)&&-1<t.className.indexOf("e-item")&&(t=this.getLI(t))&&(s=Array.prototype.indexOf.call(this.getULElement().children,t),s=this.items[s])&&this.trigger("select",{element:t,item:s,event:e}),this.closePopup(e))},v.prototype.clickHandler=function(e){var t=e.target;h.closest(t,'[id="'+this.element.id+'"]')?!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e)):h.closest(t,'[id="'+this.getPopUpElement().id+'"]')&&this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))},v.prototype.triggerSelect=function(e){var t,s=this.getLI(e.target);s&&(t=Array.prototype.indexOf.call(this.getULElement().children,s),t=this.items[t])&&this.trigger("select",{element:s,item:t,event:e})},v.prototype.openPopUp=function(e){var s=this,t=(void 0===e&&(e=null),this.getPopUpElement()),i=(this.target?1<this.activeElem.length?(i=h.getComponent(this.activeElem[0],"split-btn")).isReact&&t.childNodes.length<1&&(i.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates()):this.isReact&&t.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates()):this.createItems(!0),this.getULElement()),t=(this.popupWireEvents(),{element:i,items:this.items,event:e,cancel:!1});this.trigger("beforeOpen",t,function(e){var t;e.cancel||(e=s.getULElement(),s.dropDown.show(null,s.element),h.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),e&&e.focus(),s.enableRtl&&"0px"!==e.parentElement.style.left&&(t=void 0,t=(s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement:s.element).offsetWidth,t=e.parentElement.offsetWidth-t,t=parseFloat(e.parentElement.style.left)-t,e.parentElement.style.left=(t=t<0?0:t)+"px"),t={element:e,items:s.items},s.trigger("open",t))})},v.prototype.closePopup=function(e,s){var i=this,n=(void 0===e&&(e=null),this.getULElement()),e={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",e,function(e){var t;e.cancel?n&&n.focus():((e=i.getPopUpElement())&&h.EventHandler.remove(e,"keydown",i.keyBoardHandler),i.popupUnWireEvents(),e=void 0,(e=(t=i.getULElement())?t.querySelector(".e-selected"):e)&&e.classList.remove("e-selected"),i.dropDown.hide(),h.removeClass(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus(),e={element:t,items:i.items},i.trigger("close",e),!i.target&&t&&h.detach(t),(!i.target||i.isColorPicker()||i.target&&!i.isColorPicker())&&i.createPopupOnClick&&i.destroyPopup())})},v.prototype.unWireEvents=function(){this.createPopupOnClick||h.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),h.EventHandler.remove(this.element,"click",this.clickHandler),h.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(h.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),h.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),h.EventHandler.remove(window,"resize",this.windowResize)},v.prototype.onPropertyChanged=function(e,t){var s;this.button.setProperties(a(e,["content","cssClass","iconCss","iconPosition","disabled","enableRtl"])),this.isPopupCreated&&(s=this.getPopUpElement(),this.dropDown.setProperties(a(e,["enableRtl"])));for(var i,n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":(-1<e.cssClass.indexOf(f)||-1<t.cssClass.indexOf(f))&&(this.element.querySelector("span.e-caret")||this.appendArrowSpan(),i=this.element.querySelector("span.e-caret"),-1<e.cssClass.indexOf(f)?h.classList(i,["e-icon-bottom"],["e-icon-right"]):h.classList(i,["e-icon-right"],["e-icon-bottom"])),this.isPopupCreated&&(t.cssClass&&h.removeClass([s],t.cssClass.split(" ")),e.cssClass)&&h.addClass([s],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},v.prototype.focusIn=function(){this.element.focus()},s([h.Property("")],v.prototype,"content",void 0),s([h.Property("")],v.prototype,"cssClass",void 0),s([h.Property(!1)],v.prototype,"disabled",void 0),s([h.Property("")],v.prototype,"iconCss",void 0),s([h.Property("Left")],v.prototype,"iconPosition",void 0),s([h.Property(!0)],v.prototype,"enableHtmlSanitizer",void 0),s([h.Collection([],l)],v.prototype,"items",void 0),s([h.Property(!1)],v.prototype,"createPopupOnClick",void 0),s([h.Property("")],v.prototype,"target",void 0),s([h.Property("")],v.prototype,"closeActionEvents",void 0),s([h.Event()],v.prototype,"beforeItemRender",void 0),s([h.Event()],v.prototype,"beforeOpen",void 0),s([h.Event()],v.prototype,"beforeClose",void 0),s([h.Event()],v.prototype,"close",void 0),s([h.Event()],v.prototype,"open",void 0),s([h.Event()],v.prototype,"select",void 0),s([h.Event()],v.prototype,"created",void 0),s([h.NotifyPropertyChanges],v));function v(e,t){e=m.call(this,e,t)||this;return e.isPopupCreated=!0,e}b=function(e,t){return(b=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};var b,C,t=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(o<3?n(r):3<o?n(t,s,r):n(t,s))||r);return 3<o&&r&&Object.defineProperty(t,s,r),r},P="e-rtl",E="EJS-SPLITBUTTON",s=(function(e,t){function s(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}(w,C=g),w.prototype.preRender=function(){var e=this.element;if(e.tagName===E){for(var t=h.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),i=this.createElement(E,{className:"e-"+this.getModuleName()+"-wrapper"}),n=0,o=e.attributes.length;n<o;n++)s.setAttribute(e.attributes[n].nodeName,e.attributes[n].nodeValue);e.parentNode.insertBefore(i,e),h.detach(e),i.appendChild(e=s),h.setValue("ej2_instances",t,e),this.wrapper=i,this.element=e}this.element.id||(this.element.id=h.getUniqueID("e-"+this.getModuleName()))},w.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},w.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},w.prototype.addItems=function(e,t){C.prototype.addItems.call(this,e,t),this.secondaryBtnObj.items=this.items},w.prototype.removeItems=function(e,t){C.prototype.removeItems.call(this,e,t),this.secondaryBtnObj.items=this.items},w.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(P),this.cssClass&&h.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},w.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new d.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},w.prototype.createSecondaryButton=function(){var s=this,e=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"}),t=(this.wrapper.appendChild(e),{cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick});t.beforeItemRender=function(e){s.createPopupOnClick&&(s.secondaryBtnObj.dropDown.relateTo=s.wrapper,s.dropDown=s.secondaryBtnObj.dropDown),s.trigger("beforeItemRender",e)},t.open=function(e){s.trigger("open",e)},t.close=function(e){s.trigger("close",e)},t.select=function(e){s.trigger("select",e)},t.beforeOpen=function(e){s.createPopupOnClick&&0===s.items.length&&(s.secondaryBtnObj.dropDown.relateTo=s.wrapper,s.dropDown=s.secondaryBtnObj.dropDown);var t=new k;return s.trigger("beforeOpen",e,function(e){t.resolve(e)}),t},t.beforeClose=function(e){var t=new k;return s.trigger("beforeClose",e,function(e){t.resolve(e)}),t},this.secondaryBtnObj=new g(t),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(e),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},w.prototype.setAria=function(){h.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},w.prototype.getModuleName=function(){return"split-btn"},w.prototype.toggle=function(){this.secondaryBtnObj.toggle()},w.prototype.destroy=function(){var e,t=this,s=[P];this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element&&(e=document.getElementById(this.element.id))&&e.parentElement===this.wrapper&&(this.wrapper.tagName===E?(this.wrapper.innerHTML="",h.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),h.removeClass([this.wrapper],this.cssClass.split(" "))):(h.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){t.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),h.remove(this.wrapper)),this.unWireEvents()),this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),C.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach(function(e){t.element.classList.add(e)}),h.setValue("ej2_instances",[this],this.element)),this.wrapper=null},w.prototype.wireEvents=function(){h.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new h.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},w.prototype.unWireEvents=function(){h.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),h.getInstance(this.element,h.KeyboardEvents).destroy()},w.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},w.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},w.prototype.onPropertyChanged=function(e,t){var s;this.primaryBtnObj.setProperties(a(e,["content","iconCss","iconPosition","cssClass","disabled","enableRtl"])),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],-1<Object.keys(e).indexOf("items")&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(a(e,s));for(var i=0,n=Object.keys(e);i<n.length;i++)switch(n[i]){case"cssClass":t.cssClass&&h.removeClass([this.wrapper],t.cssClass.split(" ")),h.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?h.addClass([this.wrapper],P):h.removeClass([this.wrapper],P);break;case"disabled":e.disabled?h.addClass([this.wrapper],"e-splitbtn-disabled"):h.removeClass([this.wrapper],"e-splitbtn-disabled")}},w.prototype.focusIn=function(){this.element.focus()},t([h.Property("")],w.prototype,"content",void 0),t([h.Property("")],w.prototype,"cssClass",void 0),t([h.Property(!1)],w.prototype,"disabled",void 0),t([h.Property("")],w.prototype,"iconCss",void 0),t([h.Property("Left")],w.prototype,"iconPosition",void 0),t([h.Property(!1)],w.prototype,"createPopupOnClick",void 0),t([h.Collection([],l)],w.prototype,"items",void 0),t([h.Property("")],w.prototype,"target",void 0),t([h.Event()],w.prototype,"beforeItemRender",void 0),t([h.Event()],w.prototype,"beforeOpen",void 0),t([h.Event()],w.prototype,"beforeClose",void 0),t([h.Event()],w.prototype,"click",void 0),t([h.Event()],w.prototype,"close",void 0),t([h.Event()],w.prototype,"open",void 0),t([h.Event()],w.prototype,"select",void 0),t([h.Event()],w.prototype,"created",void 0),t([h.NotifyPropertyChanges],w));function w(e,t){return C.call(this,e,t)||this}var k=function(){var s=this;this.promise=new Promise(function(e,t){s.resolve=e,s.reject=t}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)};O=function(e,t){return(O=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])}))(e,t)};var O,L,t=function(e,t){function s(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)},S=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(r=(o<3?n(r):3<o?n(t,s,r):n(t,s))||r);return 3<o&&r&&Object.defineProperty(t,s,r),r},H="e-hide-spinner",_="e-progress",B="e-progress-active",j="e-btn-content",M=(L=h.ChildProperty,t(N,L),S([h.Property(null)],N.prototype,"template",void 0),S([h.Property(16)],N.prototype,"width",void 0),S([h.Property("Left")],N.prototype,"position",void 0),N);function N(){return null!==L&&L.apply(this,arguments)||this}A=h.ChildProperty,t(D,A),S([h.Property(400)],D.prototype,"duration",void 0),S([h.Property("None")],D.prototype,"effect",void 0),S([h.Property("ease")],D.prototype,"easing",void 0);var A,q=D;function D(){return null!==A&&A.apply(this,arguments)||this}U=d.Button,t(x,U),x.prototype.preRender=function(){U.prototype.preRender.call(this)},x.prototype.render=function(){U.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},x.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},x.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},x.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},x.prototype.getModuleName=function(){return"progress-btn"},x.prototype.destroy=function(){var t=this,e=[H,B,"e-round-corner","e-"+U.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];U.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(e=e.concat(this.cssClass.split(" "))),h.removeClass([this.element],e),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){t.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},x.prototype.init=function(){this.element.classList.add("e-"+U.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},x.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),r.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},x.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},x.prototype.getProgress=function(){return this.element.getElementsByClassName(_)[0]},x.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(j)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},x.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:_}))},x.prototype.setContent=function(){var e=this.element.innerHTML;this.enableHtmlSanitizer&&(e=h.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:j,innerHTML:e}))},x.prototype.setContentIcon=function(e){var t,s,e=this.createElement("span",{className:j,innerHTML:e});this.iconCss&&(t=this.createElement("span",{className:"e-btn-icon "+this.iconCss}),this.element.textContent.trim()?(t.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn"),!(s=e.childNodes[0])||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,s)),this.element.appendChild(e)},x.prototype.clickHandler=function(){this.element.classList.contains(B)||this.startProgress()},x.prototype.startProgress=function(e,t){var s=this.element.classList,i=s.contains("e-vertical");s.add(B),s.contains(H)||r.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-+this.duration/100:Date.now(),e||0,0,this.step,0,i),this.startContAnimate()},x.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,h=l?l<c?l-c:l%c:0,d=(this.progressTime=t=t+l-h,s=e-h,i+=(l-h)/this.duration*100,{percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o});this.eIsVertical=a,0===i?this.trigger("begin",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):100===i||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):this.trigger("progress",d,function(e){p.successCallback(e,i,n,t,r,h,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},x.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,t=o,c=i,h=n,d=r,u=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(c-h)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[u?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,h=c),this.isPaused||(c<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),c,d,p,l,e.step,h,u)},this.duration/100-t):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[u?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},x.prototype.startContAnimate=function(){var e=this,t=this.element.getElementsByClassName(j)[0];"None"!==this.animationSettings.effect?new h.Animation({}).animate(t,{duration:0===this.animationSettings.duration&&"Enable"===h.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){t.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},x.prototype.finishProgress=function(){for(var e=this.element.classList,t=e.contains("e-vertical"),s=(e.add(B),this.percent);s<100;s++)100<(s+=10)&&(s=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();e={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",e),this.progressTime=this.percent=0},x.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(j)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},x.prototype.hideSpin=function(){var e,t=this.element.getElementsByClassName(j)[0];this.element.classList.contains(H)||r.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove(B),"None"!==this.animationSettings.effect&&t.classList.remove("e-animate-end"),"Center"===this.spinSettings.position&&(e=this.getSpinner(),t.classList.remove("e-cont-animate"),e.style.width="auto",e.style.height="auto")},x.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(j)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},x.prototype.setAria=function(){h.attributes(this.element,{"aria-label":this.element.textContent+" progress"})},x.prototype.wireEvents=function(){h.EventHandler.add(this.element,"click",this.clickHandler,this)},x.prototype.unWireEvents=function(){h.EventHandler.remove(this.element,"click",this.clickHandler)},x.prototype.onPropertyChanged=function(e,t){var s=this.element,i=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(i=!0),U.prototype.onPropertyChanged.call(this,e,t);for(var n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"content":this.setContent(),this.createSpinner(),i&&(r.showSpinner(this.element.querySelector(".e-spinner")),i=!1),this.enableProgress&&this.createProgress(),s.setAttribute("aria-label",s.textContent+" progress");break;case"iconCss":t.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":e.enableProgress?this.createProgress():h.remove(this.getProgress());break;case"spinSettings":e.spinSettings.position&&(s.classList.remove("e-spin-"+t.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(e.spinSettings.template||e.spinSettings.width)&&(s.removeChild(this.getSpinner()),this.createSpinner())}},S([h.Property(!(x.prototype.focusIn=function(){this.element.focus()}))],x.prototype,"enableProgress",void 0),S([h.Property(2e3)],x.prototype,"duration",void 0),S([h.Property("Left")],x.prototype,"iconPosition",void 0),S([h.Property("")],x.prototype,"iconCss",void 0),S([h.Property(!1)],x.prototype,"disabled",void 0),S([h.Property(!1)],x.prototype,"isPrimary",void 0),S([h.Property("")],x.prototype,"cssClass",void 0),S([h.Property("")],x.prototype,"content",void 0),S([h.Property(!1)],x.prototype,"isToggle",void 0),S([h.Property(!0)],x.prototype,"enableHtmlSanitizer",void 0),S([h.Complex({},M)],x.prototype,"spinSettings",void 0),S([h.Complex({},q)],x.prototype,"animationSettings",void 0),S([h.Event()],x.prototype,"created",void 0),S([h.Event()],x.prototype,"begin",void 0),S([h.Event()],x.prototype,"progress",void 0),S([h.Event()],x.prototype,"end",void 0),S([h.Event()],x.prototype,"fail",void 0);var U,t=S([h.NotifyPropertyChanges],x);function x(e,t){e=U.call(this,e,t)||this;return e.step=1,e}e.AnimationSettings=q,e.Deferred=k,e.DropDownButton=g,e.Item=l,e.ProgressButton=t,e.SpinSettings=M,e.SplitButton=s,e.createButtonGroup=function(e,t,s){void 0===t&&(t={}),h.isNullOrUndefined(s)&&(s=h.createElement);var i,n,o,r,a=document.querySelector(e),p=(h.addClass([a],["e-btn-group","e-css"]),a.setAttribute("role","group"),a.children);t.buttons=t.buttons||[];for(var l=0,c=0;c<p.length;l++,c++)i=p[c],null!==(r=t.buttons[l])&&("BUTTON"===i.tagName?n=i:(n=s("label"),(o=p[c+1])?a.insertBefore(n,o):a.appendChild(n),i.id&&n.setAttribute("for",i.id),r&&r.disabled&&(i.disabled=!0),c++),t.cssClass&&r&&!r.cssClass&&(r.cssClass=t.cssClass),new d.Button(r||{},n));return a},e.getModel=a,e.setBlankIconStyle=p,e.upDownKeyHandler=n,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-splitbuttons.umd.min.js.map
/*!
* filename: ej2-splitbuttons.min.js
* version : 25.2.4
* version : 26.1.35
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,i,s){"use strict";function n(e,i){for(var s=t.extend({},e),n=0,o=Object.keys(s);n<o.length;n++){var r=o[n];i.indexOf(r)<0&&t.deleteObject(s,r)}return s}function o(e,i){var s=40===i?0:e.childElementCount-1,n=s,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===i?n++:n--,n===(40===i?e.childElementCount:-1)&&(n=s));-1!==(n=r(e,e.children[n],n,i))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,i,s,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===s?e.childElementCount-1:0)?i=40===s?0:e.childElementCount-1:40===s?i++:i--),(t=e.children[i]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return i=-1;i=r(e,t,i,s,n)}return i}function a(e,i){var s=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(i&&[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}),s.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";s.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}function p(e,s,n){void 0===s&&(s={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;s.buttons=s.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=s.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),s.cssClass&&p&&!p.cssClass&&(p.cssClass=s.cssClass),new i.Button(p||{},r));return l}var l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),c=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return l(i,e),c([t.Property("")],i.prototype,"iconCss",void 0),c([t.Property("")],i.prototype,"id",void 0),c([t.Property(!1)],i.prototype,"separator",void 0),c([t.Property("")],i.prototype,"text",void 0),c([t.Property("")],i.prototype,"url",void 0),c([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),d=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),u=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},y=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!0,s}return d(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var i,s=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){s=n;break}for(var r=e.length-1;r>=0;r--)i=new h(this,"items",e[r],!0),this.items.splice(s,0,i);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var i=!1,s=0,n=e.length;s<n;s++)for(var o=0,r=this.items.length;o<r;o++)if(e[s]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,i=this.createElement("div",{className:m.POPUP,id:this.element.id+"-popup"});document.body.appendChild(i),this.dropDown=new s.Popup(i,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),t.isNullOrUndefined(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&t.addClass([i],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||t.isNullOrUndefined(this.popupContent)?"string"==typeof this.target?t.select(this.target):this.target:this.popupContent},r.prototype.createItems=function(e){var i,s,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(s=r[c]).text;n=this.createElement("li",{innerHTML:s.url?"":h,className:s.separator?m.ITEM+" "+m.SEPARATOR:m.ITEM,attrs:s.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=s.url?"":h:n.innerHTML=s.url?"":h,s.url&&(n.appendChild(this.createAnchor(s)),n.classList.add("e-url")),s.iconCss?(i=this.createElement("span",{className:m.ICON+" "+s.iconCss}),s.url?n.childNodes[0].appendChild(i):n.insertBefore(i,n.childNodes[0])):p&&!s.separator&&n.classList.add("e-blank-icon");var d=s.disabled;s.disabled&&n.classList.add("e-disabled"),o={item:s,element:n},this.trigger("beforeItemRender",o),d!==o.item.disabled&&(o.item.disabled?n.classList.add("e-disabled"):n.classList.remove("e-disabled")),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var i=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:i,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new i.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(m.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var i=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&t.removeClass([this.element],s),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var i=t.getComponent(this.activeElem[1],"dropdown-btn");i&&(this.dropDown=i.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(window,"resize",this.windowResize,this)},r.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},r.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m.ITEM})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var i=e.target;!this.dropDown||this.canOpen()||t.closest(i,'[id="'+this.getPopUpElement().id+'"]')||t.closest(i,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var i=this.getLI(t);if(i){var s=Array.prototype.indexOf.call(this.getULElement().children,i),n=this.items[s];if(n){var o={element:i,item:n,event:e};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var i=e.target;t.closest(i,'[id="'+this.element.id+'"]')?!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e)):t.closest(i,'[id="'+this.getPopUpElement().id+'"]')&&this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))},r.prototype.triggerSelect=function(e){var t,i,s,n=this.getLI(e.target);n&&(i=Array.prototype.indexOf.call(this.getULElement().children,n),(s=this.items[i])&&(t={element:n,item:s,event:e},this.trigger("select",t)))},r.prototype.openPopUp=function(e){var i=this;void 0===e&&(e=null);var s=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&s.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&s.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var s=i.getULElement();if(i.dropDown.show(null,i.element),t.addClass([i.element],"e-active"),i.element.setAttribute("aria-expanded","true"),i.element.setAttribute("aria-owns",i.getPopUpElement().id),s&&s.focus(),i.enableRtl&&"0px"!==s.parentElement.style.left){var n=void 0;n=i.element.parentElement&&i.element.parentElement.classList.contains("e-split-btn-wrapper")?i.element.parentElement.offsetWidth:i.element.offsetWidth;var o=s.parentElement.offsetWidth-n,r=parseFloat(s.parentElement.style.left)-o;r<0&&(r=0),s.parentElement.style.left=r+"px"}var a={element:s,items:i.items};i.trigger("open",a)}})},r.prototype.closePopup=function(e,i){var s=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=s.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",s.keyBoardHandler),s.popupUnWireEvents();var r=s.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),s.dropDown.hide(),t.removeClass(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),s.element.removeAttribute("aria-owns"),i&&i.focus();var p={element:r,items:s.items};s.trigger("close",p),!s.target&&r&&t.detach(r),(!s.target||s.isColorPicker()||s.target&&!s.isColorPicker())&&s.createPopupOnClick&&s.destroyPopup()}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),t.EventHandler.remove(window,"resize",this.windowResize)},r.prototype.onPropertyChanged=function(e,i){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(n(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(m.VERTICAL)>-1||i.cssClass.indexOf(m.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var p=this.element.querySelector("span.e-caret");e.cssClass.indexOf(m.VERTICAL)>-1?t.classList(p,["e-icon-bottom"],["e-icon-right"]):t.classList(p,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(i.cssClass&&t.removeClass([o],i.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},r.prototype.focusIn=function(){this.element.focus()},u([t.Property("")],r.prototype,"content",void 0),u([t.Property("")],r.prototype,"cssClass",void 0),u([t.Property(!1)],r.prototype,"disabled",void 0),u([t.Property("")],r.prototype,"iconCss",void 0),u([t.Property("Left")],r.prototype,"iconPosition",void 0),u([t.Property(!0)],r.prototype,"enableHtmlSanitizer",void 0),u([t.Collection([],h)],r.prototype,"items",void 0),u([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),u([t.Property("")],r.prototype,"target",void 0),u([t.Property("")],r.prototype,"closeActionEvents",void 0),u([t.Event()],r.prototype,"beforeItemRender",void 0),u([t.Event()],r.prototype,"beforeOpen",void 0),u([t.Event()],r.prototype,"beforeClose",void 0),u([t.Event()],r.prototype,"close",void 0),u([t.Event()],r.prototype,"open",void 0),u([t.Event()],r.prototype,"select",void 0),u([t.Event()],r.prototype,"created",void 0),r=u([t.NotifyPropertyChanges],r)}(t.Component),f=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),v=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g="e-rtl",b="EJS-SPLITBUTTON",C=function(e){function s(t,i){return e.call(this,t,i)||this}return f(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===b){for(var i=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(b,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)s.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=s,n.appendChild(e),t.setValue("ej2_instances",i,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},s.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(g),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new i.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){e.createPopupOnClick&&0==e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var i=new P;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new P;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new y(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},s.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var i=this,s=[g];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===b?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){i.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach(function(e){i.element.classList.add(e)}),t.setValue("ej2_instances",[this],this.element)),this.wrapper=null},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},s.prototype.onPropertyChanged=function(e,i){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,s));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],g):t.removeClass([this.wrapper],g);break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}},s.prototype.focusIn=function(){this.element.focus()},v([t.Property("")],s.prototype,"content",void 0),v([t.Property("")],s.prototype,"cssClass",void 0),v([t.Property(!1)],s.prototype,"disabled",void 0),v([t.Property("")],s.prototype,"iconCss",void 0),v([t.Property("Left")],s.prototype,"iconPosition",void 0),v([t.Property(!1)],s.prototype,"createPopupOnClick",void 0),v([t.Collection([],h)],s.prototype,"items",void 0),v([t.Property("")],s.prototype,"target",void 0),v([t.Event()],s.prototype,"beforeItemRender",void 0),v([t.Event()],s.prototype,"beforeOpen",void 0),v([t.Event()],s.prototype,"beforeClose",void 0),v([t.Event()],s.prototype,"click",void 0),v([t.Event()],s.prototype,"close",void 0),v([t.Event()],s.prototype,"open",void 0),v([t.Event()],s.prototype,"select",void 0),v([t.Event()],s.prototype,"created",void 0),s=v([t.NotifyPropertyChanges],s)}(y),P=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}(),E=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),w=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},k="e-btn-content",O=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(null)],i.prototype,"template",void 0),w([t.Property(16)],i.prototype,"width",void 0),w([t.Property("Left")],i.prototype,"position",void 0),i}(t.ChildProperty),L=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(400)],i.prototype,"duration",void 0),w([t.Property("None")],i.prototype,"effect",void 0),w([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),S=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.step=1,s}return E(i,e),i.prototype.preRender=function(){e.prototype.preRender.call(this)},i.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},i.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},i.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},i.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},i.prototype.getModuleName=function(){return"progress-btn"},i.prototype.destroy=function(){var i=this,s=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(s=s.concat(this.cssClass.split(" "))),t.removeClass([this.element],s),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},i.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},i.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),s.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},i.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},i.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},i.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(k)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},i.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},i.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:k,innerHTML:e}))},i.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:k,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var s=t.childNodes[0];!s||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,s)}this.element.appendChild(t)},i.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},i.prototype.startProgress=function(e,t){var i=this.element.classList,n=i.contains("e-vertical");i.add("e-progress-active"),i.contains("e-hide-spinner")||s.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},i.prototype.startAnimate=function(e,t,i,s,n,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,i=e-h,s+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===s?s:n,currentDuration:t,step:o};this.eIsVertical=a,0===s?this.trigger("begin",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):100===s||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):this.trigger("progress",d,function(e){p.successCallback(e,s,n,t,r,h,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},i.prototype.successCallback=function(e,t,i,s,n,o,r){var a=this,p=t,l=i,c=o,h=s,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},i.prototype.startContAnimate=function(){var e=this,i=this.element.getElementsByClassName(k)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(i,{duration:0===this.animationSettings.duration&&"Enable"===t.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){i.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},i.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)(i+=10)>100&&(i=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var s={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},i.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(k)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},i.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(k)[0];if(this.element.classList.contains("e-hide-spinner")||s.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},i.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(k)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},i.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress"})},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},i.prototype.onPropertyChanged=function(i,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,i,n);for(var a=0,p=Object.keys(i);a<p.length;a++)switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(s.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":i.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":i.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(i.spinSettings.template||i.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}},i.prototype.focusIn=function(){this.element.focus()},w([t.Property(!1)],i.prototype,"enableProgress",void 0),w([t.Property(2e3)],i.prototype,"duration",void 0),w([t.Property("Left")],i.prototype,"iconPosition",void 0),w([t.Property("")],i.prototype,"iconCss",void 0),w([t.Property(!1)],i.prototype,"disabled",void 0),w([t.Property(!1)],i.prototype,"isPrimary",void 0),w([t.Property("")],i.prototype,"cssClass",void 0),w([t.Property("")],i.prototype,"content",void 0),w([t.Property(!1)],i.prototype,"isToggle",void 0),w([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),w([t.Complex({},O)],i.prototype,"spinSettings",void 0),w([t.Complex({},L)],i.prototype,"animationSettings",void 0),w([t.Event()],i.prototype,"created",void 0),w([t.Event()],i.prototype,"begin",void 0),w([t.Event()],i.prototype,"progress",void 0),w([t.Event()],i.prototype,"end",void 0),w([t.Event()],i.prototype,"fail",void 0),i=w([t.NotifyPropertyChanges],i)}(i.Button);return e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=h,e.DropDownButton=y,e.SplitButton=C,e.Deferred=P,e.createButtonGroup=p,e.SpinSettings=O,e.AnimationSettings=L,e.ProgressButton=S,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,s,i){"use strict";function n(e,s){for(var i=t.extend({},e),n=0,o=Object.keys(i);n<o.length;n++){var r=o[n];s.indexOf(r)<0&&t.deleteObject(i,r)}return i}function o(e,s){var i=40===s?0:e.childElementCount-1,n=i,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===s?n++:n--,n===(40===s?e.childElementCount:-1)&&(n=i));-1!==(n=r(e,e.children[n],n,s))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,s,i,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(s===(40===i?e.childElementCount-1:0)?s=40===i?0:e.childElementCount-1:40===i?s++:s--),(t=e.children[s]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return s=-1;s=r(e,t,s,i,n)}return s}function a(e,s){var i=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(s&&[].slice.call(e.getElementsByClassName("e-item")).forEach(function(e){(e.style.paddingLeft||e.style.paddingRight)&&e.removeAttribute("style")}),i.length){var n=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");if(!t.isNullOrUndefined(n)){n.classList.contains("e-url")&&(n=n.querySelector(".e-menu-url"));var o,r=n.querySelector(".e-menu-icon"),a=e.classList.contains("e-rtl");o=a?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var p=parseInt(getComputedStyle(r).fontSize,10)+parseInt(getComputedStyle(r)[o.margin],10)+parseInt(getComputedStyle(n).paddingLeft,10)+"px";i.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[o.padding]=p:e.style[o.padding]=p})}}}function p(e,i,n){void 0===i&&(i={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;i.buttons=i.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=i.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),i.cssClass&&p&&!p.cssClass&&(p.cssClass=i.cssClass),new s.Button(p||{},r));return l}var l=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),c=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},h=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return l(s,e),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property("")],s.prototype,"id",void 0),c([t.Property(!1)],s.prototype,"separator",void 0),c([t.Property("")],s.prototype,"text",void 0),c([t.Property("")],s.prototype,"url",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),s}(t.ChildProperty),d=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),u=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},m={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},y=function(e){function r(t,s){var i=e.call(this,t,s)||this;return i.isPopupCreated=!0,i}return d(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.createPopupOnClick&&!this.isPopupCreated?(this.createPopup(),this.openPopUp()):this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var s,i=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){i=n;break}for(var r=e.length-1;r>=0;r--)s=new h(this,"items",e[r],!0),this.items.splice(i,0,s);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var s=!1,i=0,n=e.length;i<n;i++)for(var o=0,r=this.items.length;o<r;o++)if(e[i]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),s=!0;break}s&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,s=this.createElement("div",{className:m.POPUP,id:this.element.id+"-popup"});document.body.appendChild(s),this.dropDown=new i.Popup(s,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),this.dropDown.element.setAttribute("role","dialog"),this.dropDown.element.setAttribute("aria-label","dropdown menu"),t.isNullOrUndefined(this.popupContent)||(this.popupContent.style.display=""),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e.type="button",e)),this.cssClass&&t.addClass([s],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return!this.createPopupOnClick||this.isColorPicker()||t.isNullOrUndefined(this.popupContent)?"string"==typeof this.target?t.select(this.target):this.target:this.popupContent},r.prototype.createItems=function(e){var s,i,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){var h=(i=r[c]).text;n=this.createElement("li",{innerHTML:i.url?"":h,className:i.separator?m.ITEM+" "+m.SEPARATOR:m.ITEM,attrs:i.separator?{role:"separator",tabindex:"-1","aria-label":"separator","aria-hidden":"true"}:{role:"menuitem",tabindex:"-1","aria-label":h},id:i.id?i.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),this.enableHtmlSanitizer?n.textContent=i.url?"":h:n.innerHTML=i.url?"":h,i.url&&(n.appendChild(this.createAnchor(i)),n.classList.add("e-url")),i.iconCss?(s=this.createElement("span",{className:m.ICON+" "+i.iconCss}),i.url?n.childNodes[0].appendChild(s):n.insertBefore(s,n.childNodes[0])):p&&!i.separator&&n.classList.add("e-blank-icon");var d=i.disabled;i.disabled&&n.classList.add("e-disabled"),o={item:i,element:n},this.trigger("beforeItemRender",o),d!==o.item.disabled&&(o.item.disabled?n.classList.add("e-disabled"):n.classList.remove("e-disabled")),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var s=0,i=e.length;s<i;s++)if(e[s][""+t])return!0;return!1},r.prototype.createAnchor=function(e){var s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:s,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new s.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-label",this.element.textContent?this.element.textContent:"dropdownbutton"),this.target&&!this.isColorPicker()&&!this.createPopupOnClick||!this.createPopupOnClick?this.createPopup():(this.isPopupCreated=!1,this.target&&!this.isColorPicker()&&this.createPopupOnClick&&(this.popupContent=this.getTargetElement(),this.popupContent.style.display="none"))},r.prototype.isColorPicker=function(){if(!this.element)return!1;var e=this.element.previousSibling;return!!(e&&e.classList&&e.classList.contains("e-split-colorpicker"))},r.prototype.appendArrowSpan=function(){this.cssClass=t.isNullOrUndefined(this.cssClass)?"":this.cssClass,this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(m.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var s=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var i;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(i=this.cssClass.split(" ")),this.button.destroy(),i&&t.removeClass([this.element],i),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.popupUnWireEvents(),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&this.dropDown&&(this.dropDown.element=null,this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;if(!this.dropDown&&this.activeElem[0].classList.contains("e-split-btn")){var s=t.getComponent(this.activeElem[1],"dropdown-btn");s&&(this.dropDown=s.dropDown)}return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),this.createPopupOnClick||t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this),t.EventHandler.add(window,"resize",this.windowResize,this)},r.prototype.windowResize=function(){!this.canOpen()&&this.dropDown&&this.dropDown.refreshPosition(this.element)},r.prototype.popupWireEvents=function(){this.delegateMousedownHandler||(this.delegateMousedownHandler=this.mousedownHandler.bind(this));var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),e&&(t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.closeActionEvents&&t.EventHandler.add(e,this.closeActionEvents,this.focusoutHandler,this)),this.rippleFn=t.rippleEffect(e,{selector:"."+m.ITEM})},r.prototype.popupUnWireEvents=function(){var e=this.getPopUpElement();this.createPopupOnClick&&t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),e&&e.parentElement&&(t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(e,"keydown",this.keyBoardHandler),this.closeActionEvents&&t.EventHandler.remove(e,this.closeActionEvents,this.focusoutHandler)),t.isRippleEnabled&&this.rippleFn&&this.rippleFn()},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){if(!this.target||13!==e.keyCode&&9!==e.keyCode)return 13===e.keyCode&&this.activeElem[0].classList.contains("e-split-btn")?(this.triggerSelect(e),void this.activeElem[0].focus()):void(e.target&&e.target.className.indexOf("e-edit-template")>-1&&32===e.keyCode||(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e)))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var s=e.target;!this.dropDown||this.canOpen()||t.closest(s,'[id="'+this.getPopUpElement().id+'"]')||t.closest(s,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.focusoutHandler=function(e){if(this.isPopupCreated&&!this.canOpen()){var t=e.relatedTarget;if(t&&t.className.indexOf("e-item")>-1){var s=this.getLI(t);if(s){var i=Array.prototype.indexOf.call(this.getULElement().children,s),n=this.items[i];if(n){var o={element:s,item:n,event:e};this.trigger("select",o)}}}this.closePopup(e)}},r.prototype.clickHandler=function(e){var s=e.target;t.closest(s,'[id="'+this.element.id+'"]')?!this.createPopupOnClick||this.target&&""!==this.target&&!this.isColorPicker()&&!this.createPopupOnClick?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e)):t.closest(s,'[id="'+this.getPopUpElement().id+'"]')&&this.getLI(e.target)&&(this.triggerSelect(e),this.closePopup(e,this.activeElem[0]))},r.prototype.triggerSelect=function(e){var t,s,i,n=this.getLI(e.target);n&&(s=Array.prototype.indexOf.call(this.getULElement().children,n),(i=this.items[s])&&(t={element:n,item:i,event:e},this.trigger("select",t)))},r.prototype.openPopUp=function(e){var s=this;void 0===e&&(e=null);var i=this.getPopUpElement();if(this.target)if(this.activeElem.length>1){var n=t.getComponent(this.activeElem[0],"split-btn");n.isReact&&i.childNodes.length<1&&(n.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates())}else this.isReact&&i.childNodes.length<1&&(this.appendReactElement(this.getTargetElement(),this.getPopUpElement()),this.renderReactTemplates());else this.createItems(!0);var o=this.getULElement();this.popupWireEvents();var r={element:o,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",r,function(e){if(!e.cancel){var i=s.getULElement();if(s.dropDown.show(null,s.element),t.addClass([s.element],"e-active"),s.element.setAttribute("aria-expanded","true"),s.element.setAttribute("aria-owns",s.getPopUpElement().id),i&&i.focus(),s.enableRtl&&"0px"!==i.parentElement.style.left){var n=void 0;n=s.element.parentElement&&s.element.parentElement.classList.contains("e-split-btn-wrapper")?s.element.parentElement.offsetWidth:s.element.offsetWidth;var o=i.parentElement.offsetWidth-n,r=parseFloat(i.parentElement.style.left)-o;r<0&&(r=0),i.parentElement.style.left=r+"px"}var a={element:i,items:s.items};s.trigger("open",a)}})},r.prototype.closePopup=function(e,s){var i=this;void 0===e&&(e=null);var n=this.getULElement(),o={element:n,items:this.items,event:e,cancel:!1};this.trigger("beforeClose",o,function(e){if(e.cancel)n&&n.focus();else{var o=i.getPopUpElement();o&&t.EventHandler.remove(o,"keydown",i.keyBoardHandler),i.popupUnWireEvents();var r=i.getULElement(),a=void 0;r&&(a=r.querySelector(".e-selected")),a&&a.classList.remove("e-selected"),i.dropDown.hide(),t.removeClass(i.activeElem,"e-active"),i.element.setAttribute("aria-expanded","false"),i.element.removeAttribute("aria-owns"),s&&s.focus();var p={element:r,items:i.items};i.trigger("close",p),!i.target&&r&&t.detach(r),(!i.target||i.isColorPicker()||i.target&&!i.isColorPicker())&&i.createPopupOnClick&&i.destroyPopup()}})},r.prototype.unWireEvents=function(){this.createPopupOnClick||t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler)),t.EventHandler.remove(window,"resize",this.windowResize)},r.prototype.onPropertyChanged=function(e,s){var i=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(n(e,i));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(m.VERTICAL)>-1||s.cssClass.indexOf(m.VERTICAL)>-1){this.element.querySelector("span.e-caret")||this.appendArrowSpan();var p=this.element.querySelector("span.e-caret");e.cssClass.indexOf(m.VERTICAL)>-1?t.classList(p,["e-icon-bottom"],["e-icon-right"]):t.classList(p,["e-icon-right"],["e-icon-bottom"])}this.isPopupCreated&&(s.cssClass&&t.removeClass([o],s.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.replace(/\s+/g," ").trim().split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},r.prototype.focusIn=function(){this.element.focus()},u([t.Property("")],r.prototype,"content",void 0),u([t.Property("")],r.prototype,"cssClass",void 0),u([t.Property(!1)],r.prototype,"disabled",void 0),u([t.Property("")],r.prototype,"iconCss",void 0),u([t.Property("Left")],r.prototype,"iconPosition",void 0),u([t.Property(!0)],r.prototype,"enableHtmlSanitizer",void 0),u([t.Collection([],h)],r.prototype,"items",void 0),u([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),u([t.Property("")],r.prototype,"target",void 0),u([t.Property("")],r.prototype,"closeActionEvents",void 0),u([t.Event()],r.prototype,"beforeItemRender",void 0),u([t.Event()],r.prototype,"beforeOpen",void 0),u([t.Event()],r.prototype,"beforeClose",void 0),u([t.Event()],r.prototype,"close",void 0),u([t.Event()],r.prototype,"open",void 0),u([t.Event()],r.prototype,"select",void 0),u([t.Event()],r.prototype,"created",void 0),r=u([t.NotifyPropertyChanges],r)}(t.Component),f=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),v=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},g="e-rtl",b="EJS-SPLITBUTTON",C=function(e){function i(t,s){return e.call(this,t,s)||this}return f(i,e),i.prototype.preRender=function(){var e=this.element;if(e.tagName===b){for(var s=t.getValue("ej2_instances",e),i=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(b,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)i.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=i,n.appendChild(e),t.setValue("ej2_instances",s,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},i.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},i.prototype.addItems=function(t,s){e.prototype.addItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.removeItems=function(t,s){e.prototype.removeItems.call(this,t,s),this.secondaryBtnObj.items=this.items},i.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(g),this.cssClass&&t.addClass([this.wrapper],this.cssClass.replace(/\s+/g," ").trim().split(" "))},i.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new s.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},i.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var s={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};s.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},s.open=function(t){e.trigger("open",t)},s.close=function(t){e.trigger("close",t)},s.select=function(t){e.trigger("select",t)},s.beforeOpen=function(t){e.createPopupOnClick&&0===e.items.length&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown);var s=new P;return e.trigger("beforeOpen",t,function(e){s.resolve(e)}),s},s.beforeClose=function(t){var s=new P;return e.trigger("beforeClose",t,function(e){s.resolve(e)}),s},this.secondaryBtnObj=new y(s),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.isPopupCreated=this.secondaryBtnObj.isPopupCreated,this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right"),this.disabled&&this.wrapper.classList.add("e-splitbtn-disabled")},i.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent?this.element.textContent+" splitbutton":"splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},i.prototype.getModuleName=function(){return"split-btn"},i.prototype.toggle=function(){this.secondaryBtnObj.toggle()},i.prototype.destroy=function(){var s=this,i=[g];if(this.cssClass&&(i=i.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===b?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],i),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){s.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element&&!this.element.getAttribute("class")&&this.element.removeAttribute("class"),this.refreshing&&this.isAngular&&(this.element=this.wrapper,["e-control","e-split-btn","e-lib"].forEach(function(e){s.element.classList.add(e)}),t.setValue("ej2_instances",[this],this.element)),this.wrapper=null},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow",enter:"enter"}})},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},i.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},i.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e);break;case"enter":this.clickHandler(e),this.getPopUpElement()&&!this.getPopUpElement().classList.contains("e-popup-close")?(this.element.classList.remove("e-active"),this.secondaryBtnObj.element.classList.add("e-active")):this.secondaryBtnObj.element.classList.remove("e-active")}},i.prototype.onPropertyChanged=function(e,s){var i=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,i)),i=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,i));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":s.cssClass&&t.removeClass([this.wrapper],s.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],g):t.removeClass([this.wrapper],g);break;case"disabled":e.disabled?t.addClass([this.wrapper],"e-splitbtn-disabled"):t.removeClass([this.wrapper],"e-splitbtn-disabled")}},i.prototype.focusIn=function(){this.element.focus()},v([t.Property("")],i.prototype,"content",void 0),v([t.Property("")],i.prototype,"cssClass",void 0),v([t.Property(!1)],i.prototype,"disabled",void 0),v([t.Property("")],i.prototype,"iconCss",void 0),v([t.Property("Left")],i.prototype,"iconPosition",void 0),v([t.Property(!1)],i.prototype,"createPopupOnClick",void 0),v([t.Collection([],h)],i.prototype,"items",void 0),v([t.Property("")],i.prototype,"target",void 0),v([t.Event()],i.prototype,"beforeItemRender",void 0),v([t.Event()],i.prototype,"beforeOpen",void 0),v([t.Event()],i.prototype,"beforeClose",void 0),v([t.Event()],i.prototype,"click",void 0),v([t.Event()],i.prototype,"close",void 0),v([t.Event()],i.prototype,"open",void 0),v([t.Event()],i.prototype,"select",void 0),v([t.Event()],i.prototype,"created",void 0),i=v([t.NotifyPropertyChanges],i)}(y),P=function(){function e(){var e=this;this.promise=new Promise(function(t,s){e.resolve=t,e.reject=s}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}(),E=function(){var e=function(t,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])})(t,s)};return function(t,s){function i(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(i.prototype=s.prototype,new i)}}(),w=function(e,t,s,i){var n,o=arguments.length,r=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,s,r):n(t,s))||r);return o>3&&r&&Object.defineProperty(t,s,r),r},k="e-btn-content",O=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return E(s,e),w([t.Property(null)],s.prototype,"template",void 0),w([t.Property(16)],s.prototype,"width",void 0),w([t.Property("Left")],s.prototype,"position",void 0),s}(t.ChildProperty),L=function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return E(s,e),w([t.Property(400)],s.prototype,"duration",void 0),w([t.Property("None")],s.prototype,"effect",void 0),w([t.Property("ease")],s.prototype,"easing",void 0),s}(t.ChildProperty),S=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.step=1,i}return E(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.render=function(){e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},s.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},s.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},s.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},s.prototype.getModuleName=function(){return"progress-btn"},s.prototype.destroy=function(){var s=this,i=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(i=i.concat(this.cssClass.split(" "))),t.removeClass([this.element],i),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){s.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},s.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},s.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),i.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},s.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},s.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},s.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(k)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},s.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},s.prototype.setContent=function(){var e;e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:k,innerHTML:e}))},s.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:k,innerHTML:e});if(this.iconCss){var s=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(s.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var i=t.childNodes[0];!i||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(s):t.insertBefore(s,i)}this.element.appendChild(t)},s.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},s.prototype.startProgress=function(e,t){var s=this.element.classList,n=s.contains("e-vertical");s.add("e-progress-active"),s.contains("e-hide-spinner")||i.showSpinner(this.element.querySelector(".e-spinner")),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},s.prototype.startAnimate=function(e,t,s,i,n,o,r,a){var p=this;try{var l=e-s,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,s=e-h,i+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===i?i:n,currentDuration:t,step:o};this.eIsVertical=a,0===i?this.trigger("begin",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):100===i||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,i,n,t,r,h,s)}):this.trigger("progress",d,function(e){p.successCallback(e,i,n,t,r,h,s)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},s.prototype.successCallback=function(e,t,s,i,n,o,r){var a=this,p=t,l=s,c=o,h=i,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&a.getProgress()&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},s.prototype.startContAnimate=function(){var e=this,s=this.element.getElementsByClassName(k)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(s,{duration:0===this.animationSettings.duration&&"Enable"===t.animationMode?400:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){s.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},s.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var s=this.percent;s<100;s++)(s+=10)>100&&(s=100),this.enableProgress&&this.getProgress()&&(this.getProgress().style[t?"height":"width"]=this.percent<100?s+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var i={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",i),this.progressTime=this.percent=0},s.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(k)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},s.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(k)[0];if(this.element.classList.contains("e-hide-spinner")||i.hideSpinner(this.element.querySelector(".e-spinner")),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},s.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(k)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},s.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress"})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},s.prototype.onPropertyChanged=function(s,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,s,n);for(var a=0,p=Object.keys(s);a<p.length;a++)switch(p[a]){case"content":this.setContent(),this.createSpinner(),r&&(i.showSpinner(this.element.querySelector(".e-spinner")),r=!1),this.enableProgress&&this.createProgress(),o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":s.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":s.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(s.spinSettings.template||s.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}},s.prototype.focusIn=function(){this.element.focus()},w([t.Property(!1)],s.prototype,"enableProgress",void 0),w([t.Property(2e3)],s.prototype,"duration",void 0),w([t.Property("Left")],s.prototype,"iconPosition",void 0),w([t.Property("")],s.prototype,"iconCss",void 0),w([t.Property(!1)],s.prototype,"disabled",void 0),w([t.Property(!1)],s.prototype,"isPrimary",void 0),w([t.Property("")],s.prototype,"cssClass",void 0),w([t.Property("")],s.prototype,"content",void 0),w([t.Property(!1)],s.prototype,"isToggle",void 0),w([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),w([t.Complex({},O)],s.prototype,"spinSettings",void 0),w([t.Complex({},L)],s.prototype,"animationSettings",void 0),w([t.Event()],s.prototype,"created",void 0),w([t.Event()],s.prototype,"begin",void 0),w([t.Event()],s.prototype,"progress",void 0),w([t.Event()],s.prototype,"end",void 0),w([t.Event()],s.prototype,"fail",void 0),s=w([t.NotifyPropertyChanges],s)}(s.Button);return e.AnimationSettings=L,e.Deferred=P,e.DropDownButton=y,e.Item=h,e.ProgressButton=S,e.SpinSettings=O,e.SplitButton=C,e.createButtonGroup=p,e.getModel=n,e.setBlankIconStyle=a,e.upDownKeyHandler=o,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
//# sourceMappingURL=ej2-splitbuttons.min.js.map
/*!
* filename: index.d.ts
* version : 25.2.4
* version : 26.1.35
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-splitbuttons@*",
"_id": "@syncfusion/ej2-splitbuttons@25.2.3",
"_id": "@syncfusion/ej2-splitbuttons@19.16.4",
"_inBundle": false,
"_integrity": "sha512-QhJTvWmDM4iVnlxAq1BSFRLN1qf1zYDmPOwx7hL1/udWwrCqFzKOrkchHZhSOU3szVPaI0ihFc3h4p7LlJkyyg==",
"_integrity": "sha512-peJ/b43dMQWqyZD+YreT0LWFYA2RqvB8yDOfiZZcRwkUwPVCCu48m3vr0r6Dbacf79rF3/LalB2LW1yDRobA6A==",
"_location": "/@syncfusion/ej2-splitbuttons",

@@ -36,6 +36,6 @@ "_phantomChildren": {},

],
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-25.2.3.tgz",
"_shasum": "3d9fabd2b9843287d3774210bb5d2bf0c10d33d7",
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-splitbuttons/-/ej2-splitbuttons-19.16.4.tgz",
"_shasum": "c7391581d683eebec060c79f65162b5cdcdef629",
"_spec": "@syncfusion/ej2-splitbuttons@*",
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
"author": {

@@ -49,4 +49,4 @@ "name": "Syncfusion Inc."

"dependencies": {
"@syncfusion/ej2-base": "~25.2.3",
"@syncfusion/ej2-popups": "~25.2.4"
"@syncfusion/ej2-base": "~26.1.35",
"@syncfusion/ej2-popups": "~26.1.35"
},

@@ -94,4 +94,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "25.2.4",
"version": "26.1.35",
"sideEffects": false
}

@@ -315,2 +315,3 @@ var __extends = (this && this.__extends) || (function () {

DropDownButton.prototype.appendArrowSpan = function () {
this.cssClass = isNullOrUndefined(this.cssClass) ? '' : this.cssClass;
this.element.appendChild(this.createElement('span', {

@@ -420,2 +421,3 @@ className: 'e-btn-icon e-icons ' + 'e-icon-' + (this.cssClass.indexOf(classNames.VERTICAL) > -1

EventHandler.add(this.element, 'keydown', this.keyBoardHandler, this);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
EventHandler.add(window, 'resize', this.windowResize, this);

@@ -613,2 +615,3 @@ };

if (this.isReact && popupElem.childNodes.length < 1) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
isReact = true;

@@ -647,3 +650,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

}
ul_1.parentElement.style.left = popupLeft + "px";
ul_1.parentElement.style.left = popupLeft + 'px';
}

@@ -710,2 +713,3 @@ var openArgs = { element: ul_1, items: _this.items };

}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
EventHandler.remove(window, 'resize', this.windowResize);

@@ -754,2 +758,3 @@ };

var arrowSpan = this.element.querySelector('span.e-caret');
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])

@@ -756,0 +761,0 @@ : classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);

@@ -250,3 +250,3 @@ var __extends = (this && this.__extends) || (function () {

if (!(clsList.contains(HIDESPINNER))) {
showSpinner(this.element.querySelector(".e-spinner"));
showSpinner(this.element.querySelector('.e-spinner'));
}

@@ -384,3 +384,3 @@ this.startAnimate(Date.now(), progressTime ? progressTime : 0, progressTime ? Date.now() - (this.duration * 1 / 100) : Date.now(), percent ? percent : 0, 0, this.step, 0, isVertical);

if (!(this.element.classList.contains(HIDESPINNER))) {
hideSpinner(this.element.querySelector(".e-spinner"));
hideSpinner(this.element.querySelector('.e-spinner'));
}

@@ -442,3 +442,3 @@ this.element.classList.remove(PROGRESSACTIVE);

if (isSpinning) {
showSpinner(this.element.querySelector(".e-spinner"));
showSpinner(this.element.querySelector('.e-spinner'));
isSpinning = false;

@@ -445,0 +445,0 @@ }

@@ -186,3 +186,3 @@ var __extends = (this && this.__extends) || (function () {

dropDownBtnModel.beforeOpen = function (args) {
if (_this.createPopupOnClick && _this.items.length == 0) {
if (_this.createPopupOnClick && _this.items.length === 0) {
_this.secondaryBtnObj.dropDown.relateTo = _this.wrapper;

@@ -273,2 +273,3 @@ _this.dropDown = _this.secondaryBtnObj.dropDown;

}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (this.refreshing && this.isAngular) {

@@ -275,0 +276,0 @@ this.element = this.wrapper;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc