Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-buttons

Package Overview
Dependencies
Maintainers
2
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-buttons - npm Package Compare versions

Comparing version 16.4.53 to 16.4.55

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## 16.4.53 (2019-02-13)
### Button

@@ -7,0 +9,0 @@

4

dist/ej2-buttons.umd.min.js
/*!
* filename: ej2-buttons.umd.min.js
* version : 16.4.53
* version : 16.4.55
* Copyright Syncfusion Inc. 2001 - 2019. 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")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var o=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)}}(),l=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},c="e-rtl",h="e-btn",p="e-primary",d="e-icon-btn",u=function(e){function s(t,s){return e.call(this,t,s)||this}return o(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(p),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(c),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.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(d);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[p,c,d,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(p):this.element.classList.remove(p);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(c):this.element.classList.remove(c);break;case"content":i(this.element)||this.element.classList.remove(d),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},l([t.Property("Left")],s.prototype,"iconPosition",void 0),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),l([t.Property(!1)],s.prototype,"isPrimary",void 0),l([t.Property("")],s.prototype,"cssClass",void 0),l([t.Property("")],s.prototype,"content",void 0),l([t.Property(!1)],s.prototype,"isToggle",void 0),l([t.Property()],s.prototype,"locale",void 0),l([t.Event()],s.prototype,"created",void 0),s=l([t.NotifyPropertyChanges],s)}(t.Component),m=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)}}(),f=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},v="e-checkbox-disabled",y="e-frame",b="e-ripple-container",g="e-ripple-check",C="e-ripple-stop",E="e-checkbox-wrapper",k=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return m(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(y)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(b)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(C),i.classList.add(g)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[g,C]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(g),i.classList.add(C)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(E)||(e=this.createElement("div",{className:E,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+y});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:b});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){a(e,this.getWrapper().getElementsByClassName(b)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(v),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName(y)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,E,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(v),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(y)[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},f([t.Event()],i.prototype,"change",void 0),f([t.Event()],i.prototype,"created",void 0),f([t.Property(!1)],i.prototype,"checked",void 0),f([t.Property("")],i.prototype,"cssClass",void 0),f([t.Property(!1)],i.prototype,"disabled",void 0),f([t.Property(!1)],i.prototype,"indeterminate",void 0),f([t.Property("")],i.prototype,"label",void 0),f([t.Property("After")],i.prototype,"labelPosition",void 0),f([t.Property("")],i.prototype,"name",void 0),f([t.Property("")],i.prototype,"value",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),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])})(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)}}(),P=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},L="e-label",w="e-ripple-container",x="e-radio-wrapper",N=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}H(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(x)||(s=this.createElement("div",{className:x}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:w}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){a(e,this.getLabel().getElementsByClassName(w)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,x,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(L)[0];s?s.textContent=e:(s=this.createElement("span",{className:L,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"label",void 0),P([t.Property("After")],i.prototype,"labelPosition",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"value",void 0),i=n=P([t.NotifyPropertyChanges],i)}(t.Component),S=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)}}(),O=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},A="e-switch-disabled",T="e-ripple-container",R="e-ripple-check",I="e-switch-wrapper",W="e-switch-active",D=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return S(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(T)[0]),e?(t.addClass([r,a],W),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[R])):(t.removeClass([r,a],W),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[R])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(I)||(e=this.createElement("div",{className:I,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:T});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(A),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH",I,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){a(e,this.getWrapper().getElementsByClassName(T)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(T)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(A),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(T)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},O([t.Event()],s.prototype,"change",void 0),O([t.Event()],s.prototype,"created",void 0),O([t.Property(!1)],s.prototype,"checked",void 0),O([t.Property("")],s.prototype,"cssClass",void 0),O([t.Property(!1)],s.prototype,"disabled",void 0),O([t.Property("")],s.prototype,"name",void 0),O([t.Property("")],s.prototype,"onLabel",void 0),O([t.Property("")],s.prototype,"offLabel",void 0),O([t.Property("")],s.prototype,"value",void 0),s=O([t.NotifyPropertyChanges],s)}(t.Component),j=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)}}(),B=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},M={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},_=function(e){function s(t,s){return e.call(this,t,s)||this}return j(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(M.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(M.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(M.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](M.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(M.chip+" "+(n.enabled?" ":M.disabled)+" "+(n.avatarIconCss||n.avatarText?M.chipWrapper:n.leadingIconCss?M.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(M.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){s=(M.icon+" "+e.leadingIconCss).trim();var n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:M.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){s=(M.delete+" "+(e.trailingIconCss?e.trailingIconCss:M.deleteIcon)).trim();var a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+M.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+M.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+M.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+M.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+M.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+M.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+M.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(M.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(M.focused)||e.classList.add(M.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+M.chip),i="chip"===this.type?this.element.classList.contains(M.focused)?this.element:null:this.element.querySelector("."+M.focused);s&&i&&i.classList.remove(M.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+M.chip);if(i)if("chip"!==this.type){var n=this.find(i);n.event=e;if((e.target.classList.contains(M.delete)?e.target:s?i.querySelector("."+M.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(M.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);var o=n;this.trigger("click",o)}}else{this.focusInHandler(i);o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+M.active);t&&t!==e&&(t.classList.remove(M.active),e.setAttribute("aria-selected","false"))}e.classList.contains(M.active)?(e.classList.remove(M.active),e.setAttribute("aria-selected","false")):(e.classList.add(M.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[M.chipSet,M.chip,M.rtl,M.multiSelection,M.singleSelection,M.disabled,M.chipWrapper,M.iconWrapper,M.active,M.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}}},B([t.Property([])],s.prototype,"chips",void 0),B([t.Property("")],s.prototype,"text",void 0),B([t.Property("")],s.prototype,"avatarText",void 0),B([t.Property("")],s.prototype,"avatarIconCss",void 0),B([t.Property("")],s.prototype,"leadingIconCss",void 0),B([t.Property("")],s.prototype,"trailingIconCss",void 0),B([t.Property("")],s.prototype,"cssClass",void 0),B([t.Property(!0)],s.prototype,"enabled",void 0),B([t.Property([])],s.prototype,"selectedChips",void 0),B([t.Property("None")],s.prototype,"selection",void 0),B([t.Property(!1)],s.prototype,"enableDelete",void 0),B([t.Event()],s.prototype,"created",void 0),B([t.Event()],s.prototype,"click",void 0),B([t.Event()],s.prototype,"delete",void 0),s=B([t.NotifyPropertyChanges],s)}(t.Component),q=function(){return function(){}}();e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=a,e.Button=u,e.CheckBox=k,e.RadioButton=N,e.Switch=D,e.classNames=M,e.ChipList=_,e.Chip=q,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t(e.ej={},e.ej2Base)}(this,function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}var o=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)}}(),l=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},c="e-rtl",h="e-btn",p="e-primary",d="e-icon-btn",u=function(e){function s(t,s){return e.call(this,t,s)||this}return o(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(p),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(c),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.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(d);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[p,c,d,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(p):this.element.classList.remove(p);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(c):this.element.classList.remove(c);break;case"content":i(this.element)||this.element.classList.remove(d),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}}},l([t.Property("Left")],s.prototype,"iconPosition",void 0),l([t.Property("")],s.prototype,"iconCss",void 0),l([t.Property(!1)],s.prototype,"disabled",void 0),l([t.Property(!1)],s.prototype,"isPrimary",void 0),l([t.Property("")],s.prototype,"cssClass",void 0),l([t.Property("")],s.prototype,"content",void 0),l([t.Property(!1)],s.prototype,"isToggle",void 0),l([t.Property()],s.prototype,"locale",void 0),l([t.Event()],s.prototype,"created",void 0),s=l([t.NotifyPropertyChanges],s)}(t.Component),m=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)}}(),f=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},v="e-checkbox-disabled",y="e-frame",b="e-ripple-container",g="e-ripple-check",C="e-ripple-stop",E="e-checkbox-wrapper",k=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i}return m(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName(y)[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(b)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove(C),i.classList.add(g)),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],[g,C]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove(g),i.classList.add(C)),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isFocused=!0},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(E)||(e=this.createElement("div",{className:E,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons "+y});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:b});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},i.prototype.labelMouseHandler=function(e){a(e,this.getWrapper().getElementsByClassName(b)[0])},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(v),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName(y)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,E,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(v),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName(y)[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},f([t.Event()],i.prototype,"change",void 0),f([t.Event()],i.prototype,"created",void 0),f([t.Property(!1)],i.prototype,"checked",void 0),f([t.Property("")],i.prototype,"cssClass",void 0),f([t.Property(!1)],i.prototype,"disabled",void 0),f([t.Property(!1)],i.prototype,"indeterminate",void 0),f([t.Property("")],i.prototype,"label",void 0),f([t.Property("After")],i.prototype,"labelPosition",void 0),f([t.Property("")],i.prototype,"name",void 0),f([t.Property("")],i.prototype,"value",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),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])})(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)}}(),P=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},L="e-label",x="e-ripple-container",w="e-radio-wrapper",N=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}H(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains(w)||(s=this.createElement("div",{className:w}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:x}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){a(e,this.getLabel().getElementsByClassName(x)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,w,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName(L)[0];s?s.textContent=e:(s=this.createElement("span",{className:L,innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName(L)[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"label",void 0),P([t.Property("After")],i.prototype,"labelPosition",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"value",void 0),i=n=P([t.NotifyPropertyChanges],i)}(t.Component),S=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)}}(),O=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},A="e-switch-disabled",T="e-ripple-container",R="e-ripple-check",I="e-switch-wrapper",W="e-switch-active",j=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return S(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(T)[0]),e?(t.addClass([r,a],W),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],[R])):(t.removeClass([r,a],W),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],[R])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(I)||(e=this.createElement("div",{className:I,attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:T});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(A),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH",I,e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){a(e,this.getWrapper().getElementsByClassName(T)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(T)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(A),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(T)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},O([t.Event()],s.prototype,"change",void 0),O([t.Event()],s.prototype,"created",void 0),O([t.Property(!1)],s.prototype,"checked",void 0),O([t.Property("")],s.prototype,"cssClass",void 0),O([t.Property(!1)],s.prototype,"disabled",void 0),O([t.Property("")],s.prototype,"name",void 0),O([t.Property("")],s.prototype,"onLabel",void 0),O([t.Property("")],s.prototype,"offLabel",void 0),O([t.Property("")],s.prototype,"value",void 0),s=O([t.NotifyPropertyChanges],s)}(t.Component),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)}}(),B=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},M={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},_=function(e){function s(t,s){return e.call(this,t,s)||this}return D(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(M.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(M.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(M.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](M.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(M.chip+" "+(n.enabled?" ":M.disabled)+" "+(n.avatarIconCss||n.avatarText?M.chipWrapper:n.leadingIconCss?M.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(M.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){s=(M.icon+" "+e.leadingIconCss).trim();var n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:M.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){s=(M.delete+" "+(e.trailingIconCss?e.trailingIconCss:M.deleteIcon)).trim();var a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+M.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+M.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+M.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+M.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+M.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+M.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+M.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(M.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(M.focused)||e.classList.add(M.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+M.chip),i="chip"===this.type?this.element.classList.contains(M.focused)?this.element:null:this.element.querySelector("."+M.focused);s&&i&&i.classList.remove(M.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+M.chip);if(i)if("chip"!==this.type){var n=this.find(i);n.event=e;if((e.target.classList.contains(M.delete)?e.target:s?i.querySelector("."+M.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(M.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);var o=n;this.trigger("click",o)}}else{this.focusInHandler(i);o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+M.active);t&&t!==e&&(t.classList.remove(M.active),e.setAttribute("aria-selected","false"))}e.classList.contains(M.active)?(e.classList.remove(M.active),e.setAttribute("aria-selected","false")):(e.classList.add(M.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[M.chipSet,M.chip,M.rtl,M.multiSelection,M.singleSelection,M.disabled,M.chipWrapper,M.iconWrapper,M.active,M.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++){switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}}},B([t.Property([])],s.prototype,"chips",void 0),B([t.Property("")],s.prototype,"text",void 0),B([t.Property("")],s.prototype,"avatarText",void 0),B([t.Property("")],s.prototype,"avatarIconCss",void 0),B([t.Property("")],s.prototype,"leadingIconCss",void 0),B([t.Property("")],s.prototype,"trailingIconCss",void 0),B([t.Property("")],s.prototype,"cssClass",void 0),B([t.Property(!0)],s.prototype,"enabled",void 0),B([t.Property([])],s.prototype,"selectedChips",void 0),B([t.Property("None")],s.prototype,"selection",void 0),B([t.Property(!1)],s.prototype,"enableDelete",void 0),B([t.Event()],s.prototype,"created",void 0),B([t.Event()],s.prototype,"click",void 0),B([t.Event()],s.prototype,"delete",void 0),s=B([t.NotifyPropertyChanges],s)}(t.Component),q=function(){return function(){}}();e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=function(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n},e.rippleMouseHandler=a,e.Button=u,e.CheckBox=k,e.RadioButton=N,e.Switch=j,e.classNames=M,e.ChipList=_,e.Chip=q,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map
/*!
* filename: ej2-buttons.min.js
* version : 16.4.53
* version : 16.4.55
* Copyright Syncfusion Inc. 2001 - 2019. 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.buttons=function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n}function o(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}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,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},h={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},p=function(e){function s(t,s){return e.call(this,t,s)||this}return l(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(h.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(h.RTL),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h.BUTTON})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.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(h.ICONBTN);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[h.PRIMARY,h.RTL,h.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(h.PRIMARY):this.element.classList.remove(h.PRIMARY);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(h.RTL):this.element.classList.remove(h.RTL);break;case"content":i(this.element)||this.element.classList.remove(h.ICONBTN),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}},c([t.Property("Left")],s.prototype,"iconPosition",void 0),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),c([t.Property(!1)],s.prototype,"isPrimary",void 0),c([t.Property("")],s.prototype,"cssClass",void 0),c([t.Property("")],s.prototype,"content",void 0),c([t.Property(!1)],s.prototype,"isToggle",void 0),c([t.Property()],s.prototype,"locale",void 0),c([t.Event()],s.prototype,"created",void 0),s=c([t.NotifyPropertyChanges],s)}(t.Component),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,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},m="e-ripple-container",f="e-checkbox-wrapper",v=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}return d(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName("e-frame")[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(m)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove("e-ripple-stop"),i.classList.add("e-ripple-check")),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],["e-ripple-check","e-ripple-stop"]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove("e-ripple-check"),i.classList.add("e-ripple-stop")),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(f)||(e=this.createElement("div",{className:f,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:m});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelMouseHandler=function(e){o(e,this.getWrapper().getElementsByClassName(m)[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-checkbox-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,f,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},u([t.Event()],i.prototype,"change",void 0),u([t.Event()],i.prototype,"created",void 0),u([t.Property(!1)],i.prototype,"checked",void 0),u([t.Property("")],i.prototype,"cssClass",void 0),u([t.Property(!1)],i.prototype,"disabled",void 0),u([t.Property(!1)],i.prototype,"indeterminate",void 0),u([t.Property("")],i.prototype,"label",void 0),u([t.Property("After")],i.prototype,"labelPosition",void 0),u([t.Property("")],i.prototype,"name",void 0),u([t.Property("")],i.prototype,"value",void 0),i=u([t.NotifyPropertyChanges],i)}(t.Component),y=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)}}(),b=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},g=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}y(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains("e-radio-wrapper")||(s=this.createElement("div",{className:"e-radio-wrapper"}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:"e-ripple-container"}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){o(e,this.getLabel().getElementsByClassName("e-ripple-container")[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,"e-radio-wrapper","radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=this.createElement("span",{className:"e-label",innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return b([t.Event()],i.prototype,"change",void 0),b([t.Event()],i.prototype,"created",void 0),b([t.Property(!1)],i.prototype,"checked",void 0),b([t.Property("")],i.prototype,"cssClass",void 0),b([t.Property(!1)],i.prototype,"disabled",void 0),b([t.Property("")],i.prototype,"label",void 0),b([t.Property("After")],i.prototype,"labelPosition",void 0),b([t.Property("")],i.prototype,"name",void 0),b([t.Property("")],i.prototype,"value",void 0),i=n=b([t.NotifyPropertyChanges],i)}(t.Component),C=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)}}(),E=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},k="e-ripple-container",H=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return C(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(k)[0]),e?(t.addClass([r,a],"e-switch-active"),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],["e-ripple-check"])):(t.removeClass([r,a],"e-switch-active"),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],["e-ripple-check"])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains("e-switch-wrapper")||(e=this.createElement("div",{className:"e-switch-wrapper",attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:k});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-switch-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH","e-switch-wrapper",e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){o(e,this.getWrapper().getElementsByClassName(k)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(k)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-switch-disabled"),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(k)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},E([t.Event()],s.prototype,"change",void 0),E([t.Event()],s.prototype,"created",void 0),E([t.Property(!1)],s.prototype,"checked",void 0),E([t.Property("")],s.prototype,"cssClass",void 0),E([t.Property(!1)],s.prototype,"disabled",void 0),E([t.Property("")],s.prototype,"name",void 0),E([t.Property("")],s.prototype,"onLabel",void 0),E([t.Property("")],s.prototype,"offLabel",void 0),E([t.Property("")],s.prototype,"value",void 0),s=E([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])})(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,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},L={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},N=function(e){function s(t,s){return e.call(this,t,s)||this}return P(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(L.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(L.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(L.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](L.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(L.chip+" "+(n.enabled?" ":L.disabled)+" "+(n.avatarIconCss||n.avatarText?L.chipWrapper:n.leadingIconCss?L.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(L.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){var s=(L.icon+" "+e.leadingIconCss).trim(),n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:L.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){var s=(L.delete+" "+(e.trailingIconCss?e.trailingIconCss:L.deleteIcon)).trim(),a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+L.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+L.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+L.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+L.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+L.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+L.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+L.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(L.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(L.focused)||e.classList.add(L.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+L.chip),i="chip"===this.type?this.element.classList.contains(L.focused)?this.element:null:this.element.querySelector("."+L.focused);s&&i&&i.classList.remove(L.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+L.chip);if(i)if("chip"!==this.type){var n=this.find(i);if(n.event=e,(e.target.classList.contains(L.delete)?e.target:s?i.querySelector("."+L.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(L.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);o=n;this.trigger("click",o)}}else{this.focusInHandler(i);var o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+L.active);t&&t!==e&&(t.classList.remove(L.active),e.setAttribute("aria-selected","false"))}e.classList.contains(L.active)?(e.classList.remove(L.active),e.setAttribute("aria-selected","false")):(e.classList.add(L.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[L.chipSet,L.chip,L.rtl,L.multiSelection,L.singleSelection,L.disabled,L.chipWrapper,L.iconWrapper,L.active,L.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++)switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}},w([t.Property([])],s.prototype,"chips",void 0),w([t.Property("")],s.prototype,"text",void 0),w([t.Property("")],s.prototype,"avatarText",void 0),w([t.Property("")],s.prototype,"avatarIconCss",void 0),w([t.Property("")],s.prototype,"leadingIconCss",void 0),w([t.Property("")],s.prototype,"trailingIconCss",void 0),w([t.Property("")],s.prototype,"cssClass",void 0),w([t.Property(!0)],s.prototype,"enabled",void 0),w([t.Property([])],s.prototype,"selectedChips",void 0),w([t.Property("None")],s.prototype,"selection",void 0),w([t.Property(!1)],s.prototype,"enableDelete",void 0),w([t.Event()],s.prototype,"created",void 0),w([t.Event()],s.prototype,"click",void 0),w([t.Event()],s.prototype,"delete",void 0),s=w([t.NotifyPropertyChanges],s)}(t.Component),x=function(){function e(){}return e}();return e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=a,e.rippleMouseHandler=o,e.Button=p,e.CheckBox=v,e.RadioButton=g,e.Switch=H,e.classNames=L,e.ChipList=N,e.Chip=x,e}({},ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.buttons=function(e,t){"use strict";function s(e,s,i,n,r,a){var o=n;if(n.tagName===s){var l=t.getValue("ej2_instances",n);o=e("input",{attrs:{type:i}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&o.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(o),t.setValue("ej2_instances",l,o),t.deleteObject(n,"ej2_instances")}return o}function i(e){for(var t,s=e.childNodes,i=0;i<s.length;i++)if(3===(t=s[i]).nodeType)return t;return null}function n(e,s,i){"INPUT"===i?(s.parentNode.insertBefore(e.element,s),t.detach(s),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")}function r(e,i,n,r,a){r=s(e.createElement,i,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,s,i){void 0===s&&(s=!1),void 0===i&&(i={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(i.cssClass&&t.addClass([n],i.cssClass.split(" ")),i.enableRtl&&n.classList.add("e-rtl"),s){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(i.checked&&a.classList.add("e-check"),n.appendChild(a),i.label){var o=e("span",{className:"e-label",innerHTML:i.label});n.appendChild(o)}return n}function o(e,t){if(t){var s=document.createEvent("MouseEvents");s.initEvent(e.type,!1,!0),t.dispatchEvent(s)}}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,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},h={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},p=function(e){function s(t,s){return e.call(this,t,s)||this}return l(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(h.PRIMARY),this.content&&(this.element.innerHTML=this.content),this.setIconCss(),this.enableRtl&&this.element.classList.add(h.RTL),this.disabled?this.controlStatus(this.disabled):this.wireEvents(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+h.BUTTON})},s.prototype.controlStatus=function(e){this.element.disabled=e},s.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.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(h.ICONBTN);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},s.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},s.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},s.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},s.prototype.destroy=function(){var s,i=[h.PRIMARY,h.RTL,h.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,"")),(s=this.element.querySelector("span.e-btn-icon"))&&t.detach(s),this.unWireEvents(),this.removeRippleEffect()},s.prototype.getModuleName=function(){return"btn"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.Inject=function(){},s.prototype.onPropertyChanged=function(e,s){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"isPrimary":e.isPrimary?this.element.classList.add(h.PRIMARY):this.element.classList.remove(h.PRIMARY);break;case"disabled":this.controlStatus(e.disabled),this.unWireEvents();break;case"iconCss":var a=this.element.querySelector("span.e-btn-icon");a?(a.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?a.classList.add("e-icon-left"):a.classList.add("e-icon-right"))):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(a=this.element.querySelector("span.e-btn-icon"))&&t.detach(a),this.setIconCss();break;case"cssClass":s.cssClass&&t.removeClass([this.element],s.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(h.RTL):this.element.classList.remove(h.RTL);break;case"content":i(this.element)||this.element.classList.remove(h.ICONBTN),this.element.innerHTML=e.content,this.setIconCss();break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}},c([t.Property("Left")],s.prototype,"iconPosition",void 0),c([t.Property("")],s.prototype,"iconCss",void 0),c([t.Property(!1)],s.prototype,"disabled",void 0),c([t.Property(!1)],s.prototype,"isPrimary",void 0),c([t.Property("")],s.prototype,"cssClass",void 0),c([t.Property("")],s.prototype,"content",void 0),c([t.Property(!1)],s.prototype,"isToggle",void 0),c([t.Property()],s.prototype,"locale",void 0),c([t.Event()],s.prototype,"created",void 0),s=c([t.NotifyPropertyChanges],s)}(t.Component),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,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},m="e-ripple-container",f="e-checkbox-wrapper",v=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isFocused=!1,i}return d(i,e),i.prototype.changeState=function(e){var s,i,n=this.getWrapper().getElementsByClassName("e-frame")[0];t.isRippleEnabled&&(i=this.getWrapper().getElementsByClassName(m)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),i&&(i.classList.remove("e-ripple-stop"),i.classList.add("e-ripple-check")),s="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),i&&t.removeClass([i],["e-ripple-check","e-ripple-stop"]),s="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),i&&(i.classList.remove("e-ripple-check"),i.classList.add("e-ripple-stop")),s="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",s)},i.prototype.clickHandler=function(e){this.focusOutHandler(),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){var s=this,i=this.getWrapper();e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isFocused=!0},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"checkbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},i.prototype.getWrapper=function(){return this.element.parentElement.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(f)||(e=this.createElement("div",{className:f,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}}),i=this.createElement("span",{className:"e-icons e-frame"});if(this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(s),s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled){var n=this.createElement("span",{className:m});"Before"===this.labelPosition?s.appendChild(n):s.insertBefore(n,i),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},i.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},i.prototype.labelMouseHandler=function(e){o(e,this.getWrapper().getElementsByClassName(m)[0])},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-checkbox-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=i.getElementsByClassName("e-label")[0],o=i.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?o.appendChild(a):o.insertBefore(a,i.getElementsByClassName("e-frame")[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-CHECKBOX","checkbox",e,f,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},i.prototype.setText=function(e){var t=this.getWrapper().getElementsByClassName("e-label")[0];if(t)t.textContent=e;else{t=this.createElement("span",{className:"e-label",innerHTML:e});var s=this.getWrapper().getElementsByTagName("label")[0];"Before"===this.labelPosition?s.insertBefore(t,this.getWrapper().getElementsByClassName("e-frame")[0]):s.appendChild(t)}},i.prototype.changeHandler=function(e){e.stopPropagation()},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,t.attributes(this.element,{checked:this.initialCheckedValue.toString()})},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByTagName("label")[0];t.EventHandler.remove(s,"mousedown",this.labelMouseHandler),t.EventHandler.remove(s,"mouseup",this.labelMouseHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},i.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByTagName("label")[0];t.EventHandler.add(s,"mousedown",this.labelMouseHandler,this),t.EventHandler.add(s,"mouseup",this.labelMouseHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},u([t.Event()],i.prototype,"change",void 0),u([t.Event()],i.prototype,"created",void 0),u([t.Property(!1)],i.prototype,"checked",void 0),u([t.Property("")],i.prototype,"cssClass",void 0),u([t.Property(!1)],i.prototype,"disabled",void 0),u([t.Property(!1)],i.prototype,"indeterminate",void 0),u([t.Property("")],i.prototype,"label",void 0),u([t.Property("After")],i.prototype,"labelPosition",void 0),u([t.Property("")],i.prototype,"name",void 0),u([t.Property("")],i.prototype,"value",void 0),i=u([t.NotifyPropertyChanges],i)}(t.Component),y=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)}}(),b=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},g=function(e){function i(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i}y(i,e),n=i,i.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t={value:this.value,event:e};this.trigger("change",t),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},i.prototype.updateChange=function(e){for(var s,i=this.element.getAttribute("name"),r=document.querySelectorAll('input.e-radio[name="'+i+'"]'),a=0;a<r.length;a++)(s=r[a])!==this.element&&(t.getInstance(s,n).checked=!1)},i.prototype.destroy=function(){var s=this,i=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode.insertBefore(this.element,i),t.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){s.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")},i.prototype.focusHandler=function(){this.isKeyPressed&&this.getLabel().classList.add("e-focus")},i.prototype.focusOutHandler=function(){this.getLabel().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"radio"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getLabel=function(){return this.element.nextElementSibling},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},i.prototype.initWrapper=function(){var e,s=this.element.parentElement;s.classList.contains("e-radio-wrapper")||(s=this.createElement("div",{className:"e-radio-wrapper"}),this.element.parentNode.insertBefore(s,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}});s.appendChild(this.element),s.appendChild(i),t.isRippleEnabled&&(e=this.createElement("span",{className:"e-ripple-container"}),i.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.enableRtl&&i.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},i.prototype.keyDownHandler=function(){this.isKeyPressed=!0},i.prototype.labelRippleHandler=function(e){o(e,this.getLabel().getElementsByClassName("e-ripple-container")[0])},i.prototype.mouseDownHandler=function(){this.isKeyPressed=!1},i.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},i.prototype.onPropertyChanged=function(e,s){for(var i=this.getLabel(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":e.checked&&this.updateChange(e.checked),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?i.classList.add("e-right"):i.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.element.setAttribute("value",e.value)}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=s(this.createElement,"EJS-RADIOBUTTON","radio",e,"e-radio-wrapper","radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents()},i.prototype.setDisabled=function(){this.element.disabled=!0},i.prototype.setText=function(e){var t=this.getLabel(),s=t.getElementsByClassName("e-label")[0];s?s.textContent=e:(s=this.createElement("span",{className:"e-label",innerHTML:e}),t.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},i.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(document,"keydown",this.keyDownHandler),t.EventHandler.remove(e,"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.remove(s,"mousedown",this.labelRippleHandler),t.EventHandler.remove(s,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(document,"keydown",this.keyDownHandler,this),t.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var s=e.getElementsByClassName("e-label")[0];s&&(t.EventHandler.add(s,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(s,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)};var n;return b([t.Event()],i.prototype,"change",void 0),b([t.Event()],i.prototype,"created",void 0),b([t.Property(!1)],i.prototype,"checked",void 0),b([t.Property("")],i.prototype,"cssClass",void 0),b([t.Property(!1)],i.prototype,"disabled",void 0),b([t.Property("")],i.prototype,"label",void 0),b([t.Property("After")],i.prototype,"labelPosition",void 0),b([t.Property("")],i.prototype,"name",void 0),b([t.Property("")],i.prototype,"value",void 0),i=n=b([t.NotifyPropertyChanges],i)}(t.Component),C=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)}}(),E=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},k="e-ripple-container",H=function(e){function s(t,s){var i=e.call(this,t,s)||this;return i.isKeyPressed=!1,i.isDrag=!1,i}return C(s,e),s.prototype.changeState=function(e){var s,i,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(i=n.getElementsByClassName(k)[0]),e?(t.addClass([r,a],"e-switch-active"),s="true",this.element.checked=!0,this.checked=!0,i&&t.addClass([i],["e-ripple-check"])):(t.removeClass([r,a],"e-switch-active"),s="false",this.element.checked=!1,this.checked=!1,i&&t.removeClass([i],["e-ripple-check"])),n.setAttribute("aria-checked",s)},s.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},s.prototype.focusHandler=function(){this.isKeyPressed&&this.getWrapper().classList.add("e-focus")},s.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},s.prototype.getModuleName=function(){return"switch"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element.parentElement},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains("e-switch-wrapper")||(e=this.createElement("div",{className:"e-switch-wrapper",attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var s=this.createElement("span",{className:"e-switch-inner"}),i=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),s.appendChild(i),s.appendChild(n),e.appendChild(s),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:k});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},s.prototype.onPropertyChanged=function(e,s){for(var i=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove("e-switch-disabled"),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl");break;case"cssClass":s.cssClass&&t.removeClass([i],s.cssClass.split(" ")),e.cssClass&&t.addClass([i],e.cssClass.split(" "))}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH","e-switch-wrapper",e,this.getModuleName())},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents()},s.prototype.rippleHandler=function(e){o(e,this.getWrapper().getElementsByClassName(k)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isKeyPressed=!1)},s.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(k)[0];if(t){var s=document.createEvent("MouseEvents");s.initEvent(e,!1,!0),t.dispatchEvent(s)}},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-switch-disabled"),e.setAttribute("aria-disabled","true")},s.prototype.setLabel=function(e,t){var s=this.getWrapper();e&&(s.querySelector(".e-switch-on").textContent=e),t&&(s.querySelector(".e-switch-off").textContent=t)},s.prototype.switchFocusHandler=function(){this.isKeyPressed=!0},s.prototype.switchMouseUp=function(e){var t=e.target;this.getWrapper().getElementsByClassName(k)[0];"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},s.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,t.attributes(this.element,{checked:this.initialSwitchCheckedValue.toString()})},s.prototype.toggle=function(){this.clickHandler()},s.prototype.wireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyDownHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(document,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(document,"keydown",this.delegateKeyDownHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.unWireEvents=function(){var e=this.getWrapper();e.querySelector(".e-switch-handle");t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(document,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(document,"keydown",this.delegateKeyDownHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},E([t.Event()],s.prototype,"change",void 0),E([t.Event()],s.prototype,"created",void 0),E([t.Property(!1)],s.prototype,"checked",void 0),E([t.Property("")],s.prototype,"cssClass",void 0),E([t.Property(!1)],s.prototype,"disabled",void 0),E([t.Property("")],s.prototype,"name",void 0),E([t.Property("")],s.prototype,"onLabel",void 0),E([t.Property("")],s.prototype,"offLabel",void 0),E([t.Property("")],s.prototype,"value",void 0),s=E([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])})(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)}}(),L=function(e,t,s,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(a=(r<3?n(a):r>3?n(t,s,a):n(t,s))||a);return r>3&&a&&Object.defineProperty(t,s,a),a},w={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},N=function(e){function s(t,s){return e.call(this,t,s)||this}return P(s,e),s.prototype.preRender=function(){},s.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.wireEvent(!1),this.select(this.selectedChips),this.rippleFunctin=t.rippleEffect(this.element,{selector:".e-chip"})},s.prototype.createChip=function(){this.innerText=this.element.innerText.trim(),this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},s.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(w.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(w.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(w.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},s.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](w.rtl)},s.prototype.chipCreation=function(e){for(var s=[],i=0;i<e.length;i++){var n=this.getFieldValues(e[i]),r=this.elementCreation(n),a=(w.chip+" "+(n.enabled?" ":w.disabled)+" "+(n.avatarIconCss||n.avatarText?w.chipWrapper:n.leadingIconCss?w.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if("chip"===this.type)s=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text);else{var o=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});t.append(r,o),s.push(o)}}t.append(s,this.element)},s.prototype.getFieldValues=function(e){var s="false"!==this.enabled.toString();return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():"chip"===this.type?this.innerText?this.innerText:this.text.toString():e.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?s:"false"!==e.enabled.toString():s}},s.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var s=(w.avatar+" "+e.avatarIconCss).trim(),i=this.createElement("span",{className:s});i.innerText=e.avatarText,t.push(i)}else if(e.leadingIconCss){var s=(w.icon+" "+e.leadingIconCss).trim(),n=this.createElement("span",{className:s});t.push(n)}var r=this.createElement("span",{className:w.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||"chip"!==this.type&&this.enableDelete){var s=(w.delete+" "+(e.trailingIconCss?e.trailingIconCss:w.deleteIcon)).trim(),a=this.createElement("span",{className:s});t.push(a)}return t},s.prototype.find=function(e){var t,s=e instanceof HTMLElement?e:this.element.querySelectorAll("."+w.chip)[e];return s&&"chip"!==this.type&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(s),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=s),t},s.prototype.add=function(e){var t;if("chip"!==this.type){var s=e instanceof Array?e:[e];(t=this.chips).push.apply(t,s),this.chipCreation(s)}},s.prototype.select=function(e){if("chip"!==this.type&&"None"!==this.selection)for(var t=e instanceof Array?e:[e],s=0;s<t.length;s++){var i=t[s]instanceof HTMLElement?t[s]:this.element.querySelectorAll("."+w.chip)[t[s]];i instanceof HTMLElement&&this.selectionHandler(i)}},s.prototype.remove=function(e){var t=this;if("chip"!==this.type){var s=e instanceof Array?e:[e],i=[],n=this.element.querySelectorAll("."+w.chip);s.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&i.push(t)}),i.forEach(function(e){var s=t.element.querySelectorAll("."+w.chip),i=Array.prototype.slice.call(s).indexOf(e);t.deleteHandler(e,i)})}},s.prototype.getSelectedChips=function(){var e,s=this;if("chip"!==this.type&&"None"!==this.selection){var i={texts:[],Indexes:[],data:[],elements:[]};this.element.querySelectorAll("."+w.active).forEach(function(e){i.elements.push(e);var t=Array.prototype.slice.call(s.element.querySelectorAll("."+w.chip)).indexOf(e);i.Indexes.push(t),i.data.push(s.chips[t]);var n="object"==typeof s.chips[t]?s.chips[t].text.toString():s.chips[t].toString();i.texts.push(n)});var n={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?i:n}return e},s.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},s.prototype.keyHandler=function(e){e.target.classList.contains(w.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},s.prototype.focusInHandler=function(e){e.classList.contains(w.focused)||e.classList.add(w.focused)},s.prototype.focusOutHandler=function(e){var s=t.closest(e.target,"."+w.chip),i="chip"===this.type?this.element.classList.contains(w.focused)?this.element:null:this.element.querySelector("."+w.focused);s&&i&&i.classList.remove(w.focused)},s.prototype.clickHandler=function(e,s){void 0===s&&(s=!1);var i=t.closest(e.target,"."+w.chip);if(i)if("chip"!==this.type){var n=this.find(i);if(n.event=e,(e.target.classList.contains(w.delete)?e.target:s?i.querySelector("."+w.delete):void 0)&&this.enableDelete){n.cancel=!1;var r=n;this.trigger("delete",r),r.cancel||this.deleteHandler(n.element,n.index)}else if("None"!==this.selection){this.selectionHandler(i),n.selected=i.classList.contains(w.active);var a=n;this.trigger("click",a)}else{this.focusInHandler(i);o=n;this.trigger("click",o)}}else{this.focusInHandler(i);var o={text:this.innerText?this.innerText:this.text,element:i,data:this.text,event:e};this.trigger("click",o)}},s.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+w.active);t&&t!==e&&(t.classList.remove(w.active),e.setAttribute("aria-selected","false"))}e.classList.contains(w.active)?(e.classList.remove(w.active),e.setAttribute("aria-selected","false")):(e.classList.add(w.active),e.setAttribute("aria-selected","true"))},s.prototype.deleteHandler=function(e,s){this.chips.splice(s,1),t.detach(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[w.chipSet,w.chip,w.rtl,w.multiSelection,w.singleSelection,w.disabled,w.chipWrapper,w.iconWrapper,w.active,w.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunctin(),this.element.innerHTML="",this.element.innerText=this.innerText},s.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.getModuleName=function(){return"chip-list"},s.prototype.onPropertyChanged=function(e,s){for(var i=0,n=Object.keys(e);i<n.length;i++)switch(n[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":"chip"===this.type?(t.removeClass([this.element],s.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))):this.refresh();break;case"selectedChips":this.select(e.selectedChips);break;case"enableRtl":this.setRtl()}},L([t.Property([])],s.prototype,"chips",void 0),L([t.Property("")],s.prototype,"text",void 0),L([t.Property("")],s.prototype,"avatarText",void 0),L([t.Property("")],s.prototype,"avatarIconCss",void 0),L([t.Property("")],s.prototype,"leadingIconCss",void 0),L([t.Property("")],s.prototype,"trailingIconCss",void 0),L([t.Property("")],s.prototype,"cssClass",void 0),L([t.Property(!0)],s.prototype,"enabled",void 0),L([t.Property([])],s.prototype,"selectedChips",void 0),L([t.Property("None")],s.prototype,"selection",void 0),L([t.Property(!1)],s.prototype,"enableDelete",void 0),L([t.Event()],s.prototype,"created",void 0),L([t.Event()],s.prototype,"click",void 0),L([t.Event()],s.prototype,"delete",void 0),s=L([t.NotifyPropertyChanges],s)}(t.Component),x=function(){function e(){}return e}();return e.wrapperInitialize=s,e.getTextNode=i,e.destroy=n,e.preRender=r,e.createCheckBox=a,e.rippleMouseHandler=o,e.Button=p,e.CheckBox=v,e.RadioButton=g,e.Switch=H,e.classNames=w,e.ChipList=N,e.Chip=x,e}({},ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-buttons.min.js.map
/*!
* filename: index.d.ts
* version : 16.4.53
* version : 16.4.55
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

{
"name": "@syncfusion/ej2-buttons",
"version": "16.4.53",
"version": "16.4.55",
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",

@@ -5,0 +5,0 @@ "author": "Syncfusion Inc.",

@@ -19,3 +19,3 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';

private tagName;
private isKeyPressed;
private isFocused;
private keyboardModule;

@@ -110,5 +110,4 @@ private formElement;

private initWrapper;
private keyDownHandler;
private keyUpHandler;
private labelMouseHandler;
private mouseDownHandler;
/**

@@ -115,0 +114,0 @@ * Called internally if any of the property value changes.

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

var _this = _super.call(this, options, element) || this;
_this.isKeyPressed = false;
_this.isFocused = false;
return _this;

@@ -142,5 +142,3 @@ }

CheckBox.prototype.focusHandler = function () {
if (this.isKeyPressed) {
this.getWrapper().classList.add('e-focus');
}
this.isFocused = true;
};

@@ -220,4 +218,6 @@ CheckBox.prototype.focusOutHandler = function () {

};
CheckBox.prototype.keyDownHandler = function () {
this.isKeyPressed = true;
CheckBox.prototype.keyUpHandler = function () {
if (this.isFocused) {
this.getWrapper().classList.add('e-focus');
}
};

@@ -228,5 +228,2 @@ CheckBox.prototype.labelMouseHandler = function (e) {

};
CheckBox.prototype.mouseDownHandler = function () {
this.isKeyPressed = false;
};
/**

@@ -366,4 +363,3 @@ * Called internally if any of the property value changes.

EventHandler.remove(this.element, 'click', this.clickHandler);
EventHandler.remove(document, 'keydown', this.keyDownHandler);
EventHandler.remove(wrapper, 'mousedown', this.mouseDownHandler);
EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
EventHandler.remove(this.element, 'focus', this.focusHandler);

@@ -384,4 +380,3 @@ EventHandler.remove(this.element, 'focusout', this.focusOutHandler);

EventHandler.add(this.element, 'click', this.clickHandler, this);
EventHandler.add(document, 'keydown', this.keyDownHandler, this);
EventHandler.add(wrapper, 'mousedown', this.mouseDownHandler, this);
EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
EventHandler.add(this.element, 'focus', this.focusHandler, this);

@@ -388,0 +383,0 @@ EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);

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

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