UNPKG

@syncfusion/ej2-buttons

Version:

A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.

12 lines 104 kB
/*!
*  filename: ej2-buttons.umd.min.js
*  version : 30.2.4
*  Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
*  Use of this code is subject to the terms of our license.
*  A copy of the current license can be obtained at any time by e-mailing
*  licensing@syncfusion.com. Any infringement will be prosecuted under
*  applicable laws. 
*/
!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=e||self).ej={},e.ej2Base)}(this,function(e,c){"use strict";function o(e,t,i,s,n,o){var r=s;if(s.tagName===t){for(var t=c.getValue("ej2_instances",s),r=e("input",{attrs:{type:i}}),l=["change","cssClass","label","labelPosition","id"],a=0,p=s.attributes.length;a<p;a++)-1===l.indexOf(s.attributes[a].nodeName)&&r.setAttribute(s.attributes[a].nodeName,s.attributes[a].nodeValue);c.attributes(s,{class:n}),s.appendChild(r),s.classList.add(o),s.classList.remove(o),c.setValue("ej2_instances",t,r),c.deleteObject(s,"ej2_instances")}return r}function D(e){for(var t,i=e.childNodes,s=0;s<i.length;s++)if(3===(t=i[s]).nodeType)return t;return null}function B(t,i,e){"INPUT"===e?(i.parentNode.insertBefore(t.element,i),c.detach(i),t.element.checked=!1,["name","value","disabled"].forEach(function(e){t.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="",t.element=i)}function j(e,t,i,s,n){s=o(e.createElement,t,"checkbox",s,i,n),e.element=s,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=c.getUniqueID("e-"+n))}function n(e,t){var i;t&&((i=document.createEvent("MouseEvents")).initEvent(e.type,!1,!0),t.dispatchEvent(i))}function F(e,t){e.element.getAttribute("ejs-for")&&t.appendChild(e.createElement("input",{attrs:{name:e.name||e.element.name,value:"false",type:"hidden"}}))}function U(){}W=function(e,t){return(W=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var W,i,t=function(e,t){function i(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},s=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},r=((r=e.IconPosition||(e.IconPosition={})).Left="Left",r.Right="Right",r.Top="Top",r.Bottom="Bottom",new c.Observer),l="e-rtl",_="e-btn",V="e-primary",q="e-icon-btn",t=(i=c.Component,t(a,i),a.prototype.preRender=function(){},a.prototype.render=function(){this.initialize(),this.removeRippleEffect=c.rippleEffect(this.element,{selector:"."+_}),this.renderComplete()},a.prototype.initialize=function(){var e;this.cssClass&&c.addClass([this.element],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.isPrimary&&this.element.classList.add(V),(!c.isBlazor()||c.isBlazor()&&"progress-btn"!==this.getModuleName())&&(this.content&&(e=this.enableHtmlSanitizer?c.SanitizeHtmlHelper.sanitize(this.content):this.content,this.element.innerHTML=e),this.setIconCss()),this.enableRtl&&this.element.classList.add(l),this.disabled?this.controlStatus(this.disabled):this.wireEvents()},a.prototype.controlStatus=function(e){this.element.disabled=e},a.prototype.setIconCss=function(){var e,t;this.iconCss&&(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(q),!(t=this.element.childNodes[0])||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t))},a.prototype.wireEvents=function(){this.isToggle&&c.EventHandler.add(this.element,"click",this.btnClickHandler,this)},a.prototype.unWireEvents=function(){this.isToggle&&c.EventHandler.remove(this.element,"click",this.btnClickHandler)},a.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},a.prototype.destroy=function(){var e=[V,l,q,"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"],e=(this.cssClass&&(e=e.concat(this.cssClass.split(/\s+/).filter(function(e){return 0<e.length}))),i.prototype.destroy.call(this),c.removeClass([this.element],e),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,"")),this.element.querySelector("span.e-btn-icon"));e&&c.detach(e),this.unWireEvents(),c.isRippleEnabled&&this.removeRippleEffect()},a.prototype.getModuleName=function(){return"btn"},a.prototype.getPersistData=function(){return this.addOnPersist([])},a.Inject=function(){},a.prototype.onPropertyChanged=function(e,t){for(var i=this.element.querySelector("span.e-btn-icon"),s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"isPrimary":e.isPrimary?this.element.classList.add(V):this.element.classList.remove(V);break;case"disabled":this.controlStatus(e.disabled);break;case"iconCss":(i=this.element.querySelector("span.e-btn-icon"))?e.iconCss?(i.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?i.classList.add("e-icon-left"):i.classList.add("e-icon-right"))):c.detach(i):this.setIconCss();break;case"iconPosition":c.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(i=this.element.querySelector("span.e-btn-icon"))&&c.detach(i),this.setIconCss();break;case"cssClass":t.cssClass&&c.removeClass([this.element],t.cssClass.split(/\s+/).filter(function(e){return 0<e.length})),e.cssClass&&c.addClass([this.element],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(l):this.element.classList.remove(l);break;case"content":D(this.element)||this.element.classList.remove(q),c.isBlazor()&&(!c.isBlazor()||this.isServerRendered||"progress-btn"===this.getModuleName())||(this.enableHtmlSanitizer&&(e.content=c.SanitizeHtmlHelper.sanitize(e.content)),this.element.innerHTML=e.content,this.setIconCss());break;case"isToggle":e.isToggle?c.EventHandler.add(this.element,"click",this.btnClickHandler,this):(c.EventHandler.remove(this.element,"click",this.btnClickHandler),c.removeClass([this.element],["e-active"]))}},a.prototype.click=function(){this.element.click()},a.prototype.focusIn=function(){this.element.focus()},s([c.Property("Left")],a.prototype,"iconPosition",void 0),s([c.Property("")],a.prototype,"iconCss",void 0),s([c.Property(!1)],a.prototype,"disabled",void 0),s([c.Property(!1)],a.prototype,"isPrimary",void 0),s([c.Property("")],a.prototype,"cssClass",void 0),s([c.Property("")],a.prototype,"content",void 0),s([c.Property(!1)],a.prototype,"isToggle",void 0),s([c.Property()],a.prototype,"locale",void 0),s([c.Property(!0)],a.prototype,"enableHtmlSanitizer",void 0),s([c.Event()],a.prototype,"created",void 0),s([c.NotifyPropertyChanges],a));function a(e,t){return i.call(this,e,t)||this}z=function(e,t){return(z=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var z,K,s=function(e,t){function i(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},p=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},X="e-check",Y="e-checkbox-disabled",h="e-frame",J="e-stop",G="e-label",d="e-ripple-container",Z="e-ripple-check",Q="e-ripple-stop",$="e-rtl",ee="e-checkbox-wrapper",te=["title","class","style","disabled","readonly","name","value","id","tabindex","aria-label","required"],s=(K=c.Component,s(u,K),u.prototype.changeState=function(e,t,i){var s=this.getWrapper(),n=null,o=null;s&&(o=s.getElementsByClassName(h)[0],c.isRippleEnabled)&&(n=s.getElementsByClassName(d)[0]),"check"===e?(o&&(o.classList.remove(J),o.classList.add(X)),n&&(n.classList.remove(Q),n.classList.add(Z)),this.element.checked=!0,(this.element.required||c.closest(this.element,"form")&&c.closest(this.element,"form").classList.contains("e-formvalidator"))&&this.validCheck&&!t&&i?(this.element.checked=!1,this.validCheck=!1):(this.element.required||c.closest(this.element,"form")&&c.closest(this.element,"form").classList.contains("e-formvalidator"))&&(this.validCheck=!0)):"uncheck"===e?(o&&c.removeClass([o],[X,J]),n&&c.removeClass([n],[Z,Q]),this.element.checked=!1,(this.element.required||c.closest(this.element,"form")&&c.closest(this.element,"form").classList.contains("e-formvalidator"))&&this.validCheck&&!t&&i?(this.element.checked=!0,this.validCheck=!1):(this.element.required||c.closest(this.element,"form")&&c.closest(this.element,"form").classList.contains("e-formvalidator"))&&(this.validCheck=!0)):(o&&(o.classList.remove(X),o.classList.add(J)),n&&(n.classList.remove(Z),n.classList.add(Q)),this.element.indeterminate=!0,this.indeterminate=!0)},u.prototype.clickHandler=function(e){var t;"INPUT"===e.target.tagName&&this.clickTriggered?(this.changeState(this.checked?"check":"uncheck"),this.clickTriggered=!1):("SPAN"!==e.target.tagName&&"LABEL"!==e.target.tagName&&!c.closest(e.target,".e-label")||(this.clickTriggered=!0),this.isMouseClick&&(this.focusOutHandler(),this.isMouseClick=!1),this.indeterminate?(this.changeState(this.checked?"check":"uncheck",!1,!0),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck",!1,!0),this.checked=!1):(this.changeState("check",!1,!0),this.checked=!0),t={checked:this.updateVueArrayModel(!1),event:e},this.trigger("change",t),e.stopPropagation())},u.prototype.destroy=function(){var t=this,i=this.getWrapper();K.prototype.destroy.call(this),this.wrapper&&(i=this.wrapper,this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(this.getWrapper()&&i.parentNode&&i.parentNode.insertBefore(this.element,i),c.detach(i),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){t.element.removeAttribute(e)})):(["class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="",this.element=i,this.refreshing&&(["e-control","e-checkbox","e-lib"].forEach(function(e){t.element.classList.add(e)}),c.setValue("ej2_instances",[this],this.element))))},u.prototype.focusHandler=function(){this.isFocused=!0},u.prototype.focusOutHandler=function(){var e=this.getWrapper();e&&e.classList.remove("e-focus"),this.isFocused=!1},u.prototype.getModuleName=function(){return"checkbox"},u.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},u.prototype.getWrapper=function(){return this.element&&this.element.parentElement?this.element.parentElement.parentElement:null},u.prototype.getLabel=function(){return this.element?this.element.parentElement:null},u.prototype.initialize=function(){c.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.element.setAttribute("tabindex","0"),this.value&&(this.element.setAttribute("value",this.value),this.isVue)&&"boolean"==typeof this.value&&!0===this.value&&this.setProperties({checked:!0},!0),this.checked&&this.changeState("check",!0),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},u.prototype.initWrapper=function(){var e=this.element.parentElement,t=(e.classList.contains(ee)||(e=this.createElement("div",{className:ee}),this.element.parentNode&&this.element.parentNode.insertBefore(e,this.element)),this.createElement("label",{attrs:{for:this.htmlAttributes.id||this.element.id}})),i=this.createElement("span",{className:"e-icons "+h});e.classList.add("e-wrapper"),this.enableRtl&&e.classList.add($),this.cssClass&&c.addClass([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),e.appendChild(t),t.appendChild(this.element),F(this,t),t.appendChild(i),c.isRippleEnabled&&(e=this.createElement("span",{className:d}),"Before"===this.labelPosition?t.appendChild(e):t.insertBefore(e,i),c.rippleEffect(e,{duration:400,isCenterRipple:!0})),this.label&&this.setText(this.label)},u.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},u.prototype.labelMouseDownHandler=function(e){this.isMouseClick=!0,n(e,this.getWrapper().getElementsByClassName(d)[0])},u.prototype.labelMouseLeaveHandler=function(e){var t=this.getLabel().getElementsByClassName(d)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element").length-1;0<i;i--)t.removeChild(t.childNodes[i]);n(e,t)}},u.prototype.labelMouseUpHandler=function(e){this.isMouseClick=!0;var t=this.getWrapper().getElementsByClassName(d)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element"),s=0;s<i.length-1;s++)t.removeChild(t.childNodes[s]);n(e,t)}},u.prototype.onPropertyChanged=function(e,t){for(var i=this.getWrapper(),s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){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.wrapper=this.getWrapper(),this.unWireEvents()):(this.element.disabled=!1,i.classList.remove(Y),i.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":t.cssClass&&c.removeClass([i],t.cssClass.split(/\s+/).filter(function(e){return 0<e.length})),e.cssClass&&c.addClass([i],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?i.classList.add($):i.classList.remove($);break;case"label":this.setText(e.label);break;case"labelPosition":var o=i.getElementsByClassName(G)[0],r=i.getElementsByTagName("label")[0];c.detach(o),"After"===e.labelPosition?r.appendChild(o):r.insertBefore(o,i.getElementsByClassName(h)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":this.isVue&&"object"==typeof e.value||this.element.setAttribute("value",e.value);break;case"htmlAttributes":this.updateHtmlAttributeToWrapper()}},u.prototype.preRender=function(){var e=this.element;this.tagName=this.element.tagName,e=o(this.createElement,"EJS-CHECKBOX","checkbox",e,ee,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=c.getUniqueID("e-"+this.getModuleName()))},u.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents(),this.updateHtmlAttributeToWrapper(),this.updateVueArrayModel(!0),this.renderComplete(),this.wrapper=this.getWrapper()},u.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(Y),e.setAttribute("aria-disabled","true")},u.prototype.setText=function(e){var t,i=this.getWrapper();i&&((t=i.getElementsByClassName(G)[0])?t.innerHTML=this.enableHtmlSanitizer?c.SanitizeHtmlHelper.sanitize(e):e:(e=this.enableHtmlSanitizer?c.SanitizeHtmlHelper.sanitize(e):e,t=this.createElement("span",{className:G,innerHTML:e}),e=i.getElementsByTagName("label")[0],"Before"===this.labelPosition?e.insertBefore(t,i.getElementsByClassName(h)[0]):e.appendChild(t)))},u.prototype.changeHandler=function(e){e.stopPropagation()},u.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.element.checked=this.initialCheckedValue},u.prototype.unWireEvents=function(){var e=this.wrapper,e=(c.EventHandler.remove(this.element,"keyup",this.keyUpHandler),c.EventHandler.remove(this.element,"focus",this.focusHandler),c.EventHandler.remove(this.element,"focusout",this.focusOutHandler),e&&(c.EventHandler.remove(e,"click",this.clickHandler),e=e.getElementsByTagName("label")[0])&&(c.EventHandler.remove(e,"mousedown",this.labelMouseDownHandler),c.EventHandler.remove(e,"mouseup",this.labelMouseUpHandler),c.EventHandler.remove(e,"mouseleave",this.labelMouseLeaveHandler)),c.closest(this.element,"form"));e&&c.EventHandler.remove(e,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&c.EventHandler.remove(this.element,"change",this.changeHandler)},u.prototype.wireEvents=function(){var e=this.getWrapper(),e=(c.EventHandler.add(e,"click",this.clickHandler,this),c.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),c.EventHandler.add(this.element,"focus",this.focusHandler,this),c.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),e.getElementsByTagName("label")[0]),e=(c.EventHandler.add(e,"mousedown",this.labelMouseDownHandler,this),c.EventHandler.add(e,"mouseup",this.labelMouseUpHandler,this),c.EventHandler.add(e,"mouseleave",this.labelMouseLeaveHandler,this),c.closest(this.element,"form"));e&&c.EventHandler.add(e,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&c.EventHandler.add(this.element,"change",this.changeHandler,this)},u.prototype.updateVueArrayModel=function(e){if(this.isVue&&"object"==typeof this.value){var t=this.element.value;if(t&&this.value){if(!e)return e=this.value.indexOf(t),this.checked?e<0&&this.value.push(t):-1<e&&this.value.splice(e,1),this.value;for(var i=0;i<this.value.length;i++)t===this.value[i]&&(this.changeState("check"),this.setProperties({checked:!0},!0))}}return this.validCheck?this.element.checked:!this.element.checked},u.prototype.updateHtmlAttributeToWrapper=function(){if(!c.isNullOrUndefined(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var i=t[e],s=this.getWrapper();-1<te.indexOf(i)?"class"===i?c.addClass([s],this.htmlAttributes[""+i].split(" ")):("title"===i?s:"style"===i?this.getWrapper().getElementsByClassName(h)[0]:("disabled"===i&&"true"===this.htmlAttributes[""+i]&&this.setDisabled(),this.element)).setAttribute(i,this.htmlAttributes[""+i]):s.setAttribute(i,this.htmlAttributes[""+i])}},u.prototype.click=function(){this.element.click()},u.prototype.focusIn=function(){this.element.focus()},p([c.Event()],u.prototype,"change",void 0),p([c.Event()],u.prototype,"created",void 0),p([c.Property(!1)],u.prototype,"checked",void 0),p([c.Property("")],u.prototype,"cssClass",void 0),p([c.Property(!1)],u.prototype,"disabled",void 0),p([c.Property(!1)],u.prototype,"indeterminate",void 0),p([c.Property("")],u.prototype,"label",void 0),p([c.Property("After")],u.prototype,"labelPosition",void 0),p([c.Property("")],u.prototype,"name",void 0),p([c.Property("")],u.prototype,"value",void 0),p([c.Property(!0)],u.prototype,"enableHtmlSanitizer",void 0),p([c.Property({})],u.prototype,"htmlAttributes",void 0),p([c.NotifyPropertyChanges],u));function u(e,t){e=K.call(this,e,t)||this;return e.isFocused=!1,e.isMouseClick=!1,e.clickTriggered=!1,e.validCheck=!0,e.type="checkbox",e}ie=function(e,t){return(ie=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ie,se,ne,p=function(e,t){function i(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},m=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},oe="e-label",re="e-ripple-container",le="e-rtl",ae="e-radio-wrapper",pe=["title","class","style","disabled","readonly","name","value","id"],p=(se=c.Component,p(f,se),(ne=f).prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t=this.element.getAttribute("value"),t=(this.isVue&&t?this.element:this).value,i=typeof this.value;this.isVue&&"boolean"==i&&(t="true"===t),this.trigger("change",{value:t,event:e}),this.isAngular&&e.stopPropagation()},f.prototype.updateChange=function(){for(var e,t=this.getRadioGroup(),i=0;i<t.length;i++)(e=t[i])!==this.element&&((e=c.getInstance(e,ne)).checked=!1,"EJS-RADIOBUTTON"===this.tagName)&&(e.angularValue=this.value)},f.prototype.destroy=function(){var t=this,i=this.wrapper;se.prototype.destroy.call(this),i&&(this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(i.parentNode&&i.parentNode.insertBefore(this.element,i),c.detach(i),this.element.checked=!1,["name","value","disabled"].forEach(function(e){t.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="",this.element=this.wrapper,this.refreshing&&(["e-control","e-radio","e-lib"].forEach(function(e){t.element.classList.add(e)}),c.setValue("ej2_instances",[this],this.element))))},f.prototype.focusHandler=function(){this.isFocused=!0},f.prototype.focusOutHandler=function(){var e=this.getLabel();e&&e.classList.remove("e-focus")},f.prototype.getModuleName=function(){return"radio"},f.prototype.getSelectedValue=function(){for(var e,t=this.getRadioGroup(),i=0,s=t.length;i<s;i++)if((e=t[i]).checked)return e.value;return""},f.prototype.getRadioGroup=function(){return document.querySelectorAll('input.e-radio[name="'+this.element.getAttribute("name")+'"]')},f.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},f.prototype.getWrapper=function(){return this.element.parentElement||null},f.prototype.getLabel=function(){return this.element.nextElementSibling||null},f.prototype.initialize=function(){c.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.updateHtmlAttribute(),this.name&&this.element.setAttribute("name",this.name);var e=this.element.getAttribute("value"),t=typeof this.value;this.isVue&&"boolean"==t&&(e="true"===e),(this.isVue?this.value&&"boolean"!=t&&!e:this.value)&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},f.prototype.initWrapper=function(){var e,t=this.element.parentElement,i=(t.classList.contains(ae)||(t=this.createElement("div",{className:ae}),this.element.parentNode&&this.element.parentNode.insertBefore(t,this.element)),this.createElement("label",{attrs:{for:this.element.id}}));t.appendChild(this.element),t.appendChild(i),c.isRippleEnabled&&(e=this.createElement("span",{className:re}),i.appendChild(e),c.rippleEffect(e,{duration:400,isCenterRipple:!0})),t.classList.add("e-wrapper"),this.enableRtl&&i.classList.add(le),this.cssClass&&c.addClass([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.label&&this.setText(this.label)},f.prototype.keyUpHandler=function(){this.isFocused&&this.getLabel().classList.add("e-focus")},f.prototype.labelMouseDownHandler=function(e){n(e,this.getLabel().getElementsByClassName(re)[0])},f.prototype.labelMouseLeaveHandler=function(e){var t=this.getLabel().getElementsByClassName(re)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element").length-1;0<i;i--)t.removeChild(t.childNodes[i]);n(e,t)}},f.prototype.labelMouseUpHandler=function(e){var t=this.getLabel().getElementsByClassName(re)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element").length-1;0<i;i--)t.removeChild(t.childNodes[i]);n(e,t)}},f.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&c.attributes(this.element,{checked:"true"})},f.prototype.onPropertyChanged=function(e,t){for(var i=this.getWrapper(),s=this.getLabel(),n=0,o=Object.keys(e);n<o.length;n++)switch(o[n]){case"checked":e.checked&&this.updateChange(),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":t.cssClass&&c.removeClass([i],t.cssClass.split(/\s+/).filter(function(e){return 0<e.length})),e.cssClass&&c.addClass([i],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":e.enableRtl?s.classList.add(le):s.classList.remove(le);break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?s.classList.add("e-right"):s.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":var r=typeof this.htmlAttributes.value;!c.isNullOrUndefined(this.htmlAttributes)&&(this.htmlAttributes.value||"boolean"==r&&!this.htmlAttributes.value)||this.element.setAttribute("value",e.value);break;case"htmlAttributes":this.updateHtmlAttribute()}},f.prototype.preRender=function(){var e=this.element;this.formElement=c.closest(this.element,"form"),this.tagName=this.element.tagName,e=o(this.createElement,"EJS-RADIOBUTTON","radio",e,ae,"radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=c.getUniqueID("e-"+this.getModuleName())),"EJS-RADIOBUTTON"===this.tagName&&(e=this.element.getAttribute("formcontrolname"))&&(this.setProperties({name:e},!0),this.element.setAttribute("name",e))},f.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete(),this.wrapper=this.getWrapper()},f.prototype.setDisabled=function(){this.element.disabled=!0},f.prototype.setText=function(e){var t=this.getLabel(),i=t.getElementsByClassName(oe)[0];i?i.textContent=e:(e=this.enableHtmlSanitizer?c.SanitizeHtmlHelper.sanitize(e):e,i=this.createElement("span",{className:oe,innerHTML:e}),t.appendChild(i)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},f.prototype.updateHtmlAttribute=function(){if(!c.isNullOrUndefined(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var i=t[e],s=this.element.parentElement;-1<pe.indexOf(i)?"class"===i?c.addClass([s],this.htmlAttributes[""+i].replace(/\s+/g," ").trim().split(" ")):("title"===i||"style"===i?s:this.element).setAttribute(i,this.htmlAttributes[""+i]):s.setAttribute(i,this.htmlAttributes[""+i])}},f.prototype.unWireEvents=function(){var e=this.wrapper;c.EventHandler.remove(this.element,"change",this.changeHandler),c.EventHandler.remove(this.element,"focus",this.focusHandler),c.EventHandler.remove(this.element,"focusout",this.focusOutHandler),c.EventHandler.remove(this.element,"keyup",this.keyUpHandler),e&&(e=e.getElementsByTagName("label")[0])&&(c.EventHandler.remove(e,"mousedown",this.labelMouseDownHandler),c.EventHandler.remove(e,"mouseup",this.labelMouseUpHandler),c.EventHandler.remove(e,"mouseleave",this.labelMouseLeaveHandler)),this.formElement&&c.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},f.prototype.wireEvents=function(){var e=this.getLabel(),e=(c.EventHandler.add(this.element,"change",this.changeHandler,this),c.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),c.EventHandler.add(this.element,"focus",this.focusHandler,this),c.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),e.getElementsByClassName(oe)[0]);e&&(c.EventHandler.add(e,"mousedown",this.labelMouseDownHandler,this),c.EventHandler.add(e,"mouseup",this.labelMouseUpHandler,this),c.EventHandler.add(e,"mouseleave",this.labelMouseLeaveHandler,this)),this.formElement&&c.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},f.prototype.click=function(){this.element.click()},f.prototype.focusIn=function(){this.element.focus()},m([c.Event()],f.prototype,"change",void 0),m([c.Event()],f.prototype,"created",void 0),m([c.Property(!1)],f.prototype,"checked",void 0),m([c.Property("")],f.prototype,"cssClass",void 0),m([c.Property(!1)],f.prototype,"disabled",void 0),m([c.Property("")],f.prototype,"label",void 0),m([c.Property("After")],f.prototype,"labelPosition",void 0),m([c.Property("")],f.prototype,"name",void 0),m([c.Property("")],f.prototype,"value",void 0),m([c.Property(!0)],f.prototype,"enableHtmlSanitizer",void 0),m([c.Property({})],f.prototype,"htmlAttributes",void 0),ne=m([c.NotifyPropertyChanges],f));function f(e,t){e=se.call(this,e,t)||this;return e.isFocused=!1,e.type="radio",e}ce=function(e,t){return(ce=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ce,he,m=function(e,t){function i(){this.constructor=e}ce(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},y=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},de="e-switch-disabled",v="e-ripple-container",ue="e-ripple-check",me="e-rtl",fe="e-switch-wrapper",ye="e-switch-active",ve=["title","class","style","disabled","readonly","name","value","aria-label","id","role","tabindex"],m=(he=c.Component,m(g,he),g.prototype.changeState=function(e){var t=null,i=this.getWrapper(),s=i.querySelector(".e-switch-inner"),n=i.querySelector(".e-switch-handle");c.isRippleEnabled&&(t=i.getElementsByClassName(v)[0]),e?(c.addClass([s,n],ye),this.element.checked=!0,this.checked=!0,t&&c.addClass([t],[ue])):(c.removeClass([s,n],ye),this.element.checked=!1,this.checked=!1,t&&c.removeClass([t],[ue]))},g.prototype.clickHandler=function(e){var t;e&&this.element.closest("label")&&e.target!==this.element||(this.isDrag=!1,this.focusOutHandler(),t={event:e,cancel:!1,checked:this.checked},this.trigger("beforeChange",t),t.cancel)||(this.changeState(!t.checked),this.element.focus(),t={checked:this.element.checked,event:e},this.trigger("change",t))},g.prototype.destroy=function(){var t=this;he.prototype.destroy.call(this),this.disabled||this.unWireEvents(),this.formElement&&c.EventHandler.remove(this.formElement,"reset",this.formResetHandler),this.getWrapper()&&B(this,this.getWrapper(),this.tagName),this.refreshing&&(["e-control","e-switch","e-lib"].forEach(function(e){t.element.classList.add(e)}),c.setValue("ej2_instances",[this],this.element))},g.prototype.focusHandler=function(){this.isFocused=!0},g.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},g.prototype.getModuleName=function(){return"switch"},g.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},g.prototype.getWrapper=function(){return this.element.parentElement||null},g.prototype.initialize=function(){this.element.setAttribute("role","switch"),c.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)},g.prototype.initWrapper=function(){var e=this.element.parentElement,t=(e.classList.contains(fe)||(e=this.createElement("div",{className:fe}),this.element.parentNode.insertBefore(e,this.element)),this.createElement("span",{className:"e-switch-inner"})),i=this.createElement("span",{className:"e-switch-on"}),s=this.createElement("span",{className:"e-switch-off"}),n=this.createElement("span",{className:"e-switch-handle"});e.appendChild(this.element),F(this,e),t.appendChild(i),t.appendChild(s),e.appendChild(t),e.appendChild(n),c.isRippleEnabled&&(i=this.createElement("span",{className:v}),n.appendChild(i),c.rippleEffect(i,{duration:400,isCenterRipple:!0})),e.classList.add("e-wrapper"),this.enableRtl&&e.classList.add(me),this.cssClass&&c.addClass([e],this.cssClass.replace(/\s+/g," ").trim().split(" "))},g.prototype.onPropertyChanged=function(e,t){for(var i=this.getWrapper(),s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents(),this.isWireEvents=!1):(this.element.disabled=!1,i.classList.remove(de),i.setAttribute("aria-disabled","false"),this.isWireEvents||(this.wireEvents(),this.isWireEvents=!0));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(me):i.classList.remove(me);break;case"cssClass":t.cssClass&&c.removeClass([i],t.cssClass.split(/\s+/).filter(function(e){return 0<e.length})),e.cssClass&&c.addClass([i],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"htmlAttributes":this.updateHtmlAttribute()}},g.prototype.preRender=function(){var e=this.element;this.formElement=c.closest(this.element,"form"),this.tagName=this.element.tagName,j(this,"EJS-SWITCH",fe,e,this.getModuleName())},g.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents(),this.formElement&&c.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),this.renderComplete(),this.updateHtmlAttribute()},g.prototype.rippleHandler=function(e){n(e,this.getWrapper().getElementsByClassName(v)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isFocused=!1)},g.prototype.mouseLeaveHandler=function(e){var t=this.element.parentElement.getElementsByClassName(v)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element").length-1;0<i;i--)t.removeChild(t.childNodes[i]);n(e,t)}},g.prototype.rippleTouchHandler=function(e){var t,i=this.getWrapper().getElementsByClassName(v)[0];i&&((t=document.createEvent("MouseEvents")).initEvent(e,!1,!0),i.dispatchEvent(t))},g.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add(de),e.setAttribute("aria-disabled","true")},g.prototype.setLabel=function(e,t){var i=this.getWrapper();e&&(i.querySelector(".e-switch-on").textContent=e),t&&(i.querySelector(".e-switch-off").textContent=t)},g.prototype.updateHtmlAttribute=function(){if(!c.isNullOrUndefined(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var i=t[e],s=this.getWrapper();-1<ve.indexOf(i)?"class"===i?c.addClass([s],this.htmlAttributes[""+i].split(" ")):("title"===i||"style"===i?s:("disabled"===i&&"true"===this.htmlAttributes[""+i]&&this.setDisabled(),this.element)).setAttribute(i,this.htmlAttributes[""+i]):s.setAttribute(i,this.htmlAttributes[""+i])}},g.prototype.switchFocusHandler=function(e){this.isFocused&&this.getWrapper().classList.add("e-focus"),e&&"keyup"===e.type&&"Space"===e.code&&this.isAngular&&(this.clickHandler(e),e.stopPropagation(),e.preventDefault())},g.prototype.switchMouseUp=function(e){var t,i,s=0,n=0,o=e.target;"touchmove"===e.type&&(e.preventDefault(),i=e.changedTouches[0].clientX,t=e.changedTouches[0].clientY,n=this.bTouchX-i,s=this.bTouchY-t,Math.abs(n)<Math.abs(s)?(this.isDrag=!1,this.rippleTouchHandler("mouseup")):this.isDrag=!0),"touchstart"===e.type&&(this.bTouchX=e.changedTouches[0].clientX,this.bTouchY=e.changedTouches[0].clientY,this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&o.className.indexOf("e-switch")<0||"touchend"===e.type)&&(n=this.bTouchX-e.changedTouches[0].clientX,s=this.bTouchY-e.changedTouches[0].clientY,Math.abs(n)>=Math.abs(s))&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},g.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,this.element.checked=this.initialSwitchCheckedValue},g.prototype.toggle=function(){this.clickHandler()},g.prototype.wireEvents=function(){var e=this.getWrapper();this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyUpHandler=this.switchFocusHandler.bind(this),c.EventHandler.add(e,"click",this.clickHandler,this),c.EventHandler.add(this.element,"focus",this.focusHandler,this),c.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),c.EventHandler.add(this.element,"mouseup",this.delegateMouseUpHandler,this),c.EventHandler.add(this.element,"keyup",this.delegateKeyUpHandler,this),c.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),c.EventHandler.add(e,"mouseleave",this.mouseLeaveHandler,this),c.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this)},g.prototype.unWireEvents=function(){var e=this.getWrapper();e&&(c.EventHandler.remove(e,"click",this.clickHandler),c.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),c.EventHandler.remove(e,"mouseleave",this.mouseLeaveHandler),c.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp)),this.element&&(c.EventHandler.remove(this.element,"focus",this.focusHandler),c.EventHandler.remove(this.element,"focusout",this.focusOutHandler),c.EventHandler.remove(this.element,"mouseup",this.delegateMouseUpHandler),c.EventHandler.remove(this.element,"keyup",this.delegateKeyUpHandler))},g.prototype.click=function(){this.element.click()},g.prototype.focusIn=function(){this.element.focus()},y([c.Event()],g.prototype,"beforeChange",void 0),y([c.Event()],g.prototype,"change",void 0),y([c.Event()],g.prototype,"created",void 0),y([c.Property(!1)],g.prototype,"checked",void 0),y([c.Property("")],g.prototype,"cssClass",void 0),y([c.Property(!1)],g.prototype,"disabled",void 0),y([c.Property("")],g.prototype,"name",void 0),y([c.Property("")],g.prototype,"onLabel",void 0),y([c.Property("")],g.prototype,"offLabel",void 0),y([c.Property("")],g.prototype,"value",void 0),y([c.Property({})],g.prototype,"htmlAttributes",void 0),y([c.NotifyPropertyChanges],g));function g(e,t){e=he.call(this,e,t)||this;return e.isFocused=!1,e.isDrag=!1,e.isWireEvents=!1,e}ge=function(e,t){return(ge=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ge,be,Ee,y=function(e,t){function i(){this.constructor=e}ge(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},b=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},E={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",template:"e-chip-template",chipList:"e-chip-list",customIcon:"e-icons",chipDrag:"e-chip-drag",dragAndDrop:"e-drag-and-drop",dropRestricted:"e-error-treeview",cloneChip:"e-clone-chip",dragIndicator:"e-drag-indicator"},y=(be=c.Component,y(C,be),(Ee=C).prototype.preRender=function(){},C.prototype.chipType=function(){return this.chips&&this.chips.length&&0<this.chips.length},C.prototype.render=function(){this.type=(c.isNullOrUndefined(this.chips)||!this.chips.length)&&(this.text||this.element.innerText)?"chip":"chipset",this.setAttributes(),this.createChip(),this.setRtl(),this.select(this.selectedChips),this.wireEvent(!1),this.rippleFunction=c.rippleEffect(this.element,{selector:"."+E.chip}),this.renderComplete(),this.dragCollection=[],this.allowDragAndDrop&&this.enableDraggingChips()},C.prototype.enableDraggingChips=function(){var n,o=this;this.element.querySelectorAll("."+E.chip).forEach(function(e,s){o.dragObj=new c.Draggable(e,{preventDefault:!1,clone:!0,dragArea:o.dragArea,helper:function(){return(n=e.cloneNode(!0)).classList.add(E.cloneChip),o.element.appendChild(n),n},dragStart:function(e){o.dragIndicator=o.createElement("div",{className:E.dragIndicator}),document.body.appendChild(o.dragIndicator);var t=o.find(e.element),i={cancel:!1,event:e.event,draggedItem:e.element,draggedItemData:t,dropTarget:null};o.trigger("dragStart",i,function(){c.isNullOrUndefined(i.cancel)&&(i.cancel=!1)}),i.cancel?o.dragObj.intDestroy(e.event):n.setAttribute("drag-indicator-index",s.toString())},drag:function(e){var t=o.find(e.element),t={event:e.event,draggedItem:e.element,draggedItemData:t,dropTarget:null},t=(o.trigger("dragging",t),n.querySelector("."+E.chipDrag));c.isNullOrUndefined(t)&&(t=o.createElement("span",{className:E.customIcon+" "+E.dragAndDrop+" "+E.chipDrag}),n.prepend(t)),o.allowExternalDragging(e,n,t)},dragStop:function(e){var t=o.find(e.element),i={cancel:!1,event:e.event,draggedItem:e.element,draggedItemData:t,dropTarget:e.target};o.trigger("dragStop",i,function(){c.isNullOrUndefined(i.cancel)&&(i.cancel=!1)}),i.cancel||o.allowExternalDrop(e,n),c.isNullOrUndefined(o.dragIndicator)||c.remove(o.dragIndicator),c.isNullOrUndefined(n)||n.remove()}}),-1===o.dragCollection.indexOf(o.dragObj)&&o.dragCollection.push(o.dragObj)})},C.prototype.checkInstance=function(e,t){t=!c.isNullOrUndefined(e.target.closest("."+E.chipList))&&e.target.closest("."+E.chipList).id!==t.element.id;return t&&(this.updatedInstance=e.target.closest("."+E.chipList)),t},C.prototype.setIcons=function(e,t,i,s,n){e=e.element.contains(i),i=i.closest(".e-droppable");!e&&!i||n?(t.classList.remove(E.dragAndDrop),t.classList.add(E.dropRestricted),s.style.display="none"):(t.classList.add(E.dragAndDrop),t.classList.remove(E.dropRestricted),i&&(s.style.display="none"))},C.prototype.allowExternalDragging=function(e,s,t){var i,n=null,o=1/0,r=-1;if(this.checkInstance(e,this)){if(this.dragIndicator.style.display="none",(i=this.getCurrentInstance(e)).dragIndicator=this.dragIndicator,!i.allowDragAndDrop)return}else i=this;var l,a=i.dragIndicator,p=(a.style.display="inline",c=this.dragAreaCheck(this.dragArea,e.target,!1,t,a),this.setIcons(i,t,e.target,a,c),i.element.appendChild(s),s.getBoundingClientRect()),t=Array.from(i.element.querySelectorAll("."+E.chip)),e=(t.forEach(function(e,t){var i;e!==s&&(i=e.getBoundingClientRect(),(i=Math.sqrt(Math.pow(p.left-i.left,2)+Math.pow(p.top-i.top,2)))<o)&&(o=i,n=e,r=t)}),-1===r&&(r=t.length),this.getChipsDistance(i)),c=s.getBoundingClientRect();(n||0<t.length)&&(l=(n||t[t.length-1]).getBoundingClientRect(),a.style.top=l.top+window.scrollY+"px",a.style.left=i.enableRtl?l.right+e+"px":l.left-e+window.scrollX+"px"),i.enableRtl?c.left<l.left-l.width/2&&c.top>l.top&&(a.style.left=l.left-e+window.scrollX+"px"):c.left>l.left+l.width/2&&c.top>l.top&&(a.style.left=l.left+l.width+e+window.scrollX+"px")},C.prototype.dragAreaCheck=function(e,t,i,s,n){var o,r;return!c.isNullOrUndefined(e)&&(o="string"==typeof e,r=e instanceof HTMLElement,e=o?document.querySelector(e):e,c.isNullOrUndefined(e)||!o&&!r||e.contains(t)||(i=!0,n.style.display="none",s.classList.add(E.dropRestricted),s.classList.remove(E.dragAndDrop)),i)},C.prototype.getChipsDistance=function(e){var t,i,s;return e.chips.length<=1?4:(s=e.find(0).element.getBoundingClientRect(),t=e.find(1).element.getBoundingClientRect(),i=s.left,e.enableRtl?i<(e=t.right)?4:(i-e)/2:(e=s.width,(s=t.left)<i+e?4:(s-(i+e))/2))},C.prototype.getCurrentInstance=function(e){var t=e.target.closest("."+E.chipList);if(!c.isNullOrUndefined(t)&&!c.isNullOrUndefined(t.ej2_instances))for(var i=0;i<t.ej2_instances.length;i++)if(t.ej2_instances[parseInt(i.toString(),10)]instanceof Ee)return t.ej2_instances[i];return null},C.prototype.allowExternalDrop=function(e,t){var i,s=parseInt(t.getAttribute("drag-indicator-index"),10),n=!1;if(this.checkInstance(e,this)){if(n=!0,!(i=this.getCurrentInstance(e)).allowDragAndDrop)return}else i=this;var o=i.dragIndicator;if(o.style.display="inline",i.element.contains(e.target)&&!this.dragAreaCheck(this.dragArea,e.target,!1,t.querySelector("."+E.chipDrag),o)){for(var r=o.getBoundingClientRect(),l=Array.from(i.element.querySelectorAll("."+E.chip)),a=-1,p=0;p<l.length;p++)if(l[p]!==t){var c=l[p].getBoundingClientRect(),h=r.top<c.top+c.height/2,d=r.left<c.left+c.width/2,u=r.left>c.left+c.width/2;if(!i.enableRtl&&h&&d||i.enableRtl&&h&&u){s<(a=p)&&!n&&(a=p-1);break}}if(-1===a){for(var m=void 0,p=0;p<l.length;p++)if((c=l[p].getBoundingClientRect()).top>r.top||c.top===r.top&&c.left>r.left){m=p;break}a=m!==l.length?m:l.length}e=Array.from(this.chips);n?this.dropChip(e,s,i,a,!0):a!==s&&this.dropChip(e,s,i,a,!1)}},C.prototype.dropChip=function(e,t,i,s,n){t=e.splice(t,1)[0];n?((n=Array.from(i.chips)).splice(s,0,t),i.chips=n):(e.splice(s,0,t),i.chips=e),this.chips=e,i.dataBind(),this.dataBind(),i.enableDraggingChips()},C.prototype.createChip=function(){this.innerText=this.element.innerText&&0!==this.element.innerText.length?this.element.innerText.trim():this.element.innerText,this.element.innerHTML="",this.chipCreation("chip"===this.type?[this.innerText||this.text]:this.chips)},C.prototype.setAttributes=function(){"chip"===this.type?(this.enabled&&(this.element.tabIndex=0),this.element.setAttribute("role","button")):(this.element.classList.add(E.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(E.multiSelection),this.element.setAttribute("aria-multiselectable","true")):("Single"===this.selection&&this.element.classList.add(E.singleSelection),this.element.setAttribute("aria-multiselectable","false")))},C.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](E.rtl)},C.prototype.renderTemplates=function(){this.isReact&&this.renderReactTemplates()},C.prototype.templateParser=function(t){if(t)try{return"function"!=typeof t&&document.querySelectorAll(t).length?c.compile(document.querySelector(t).innerHTML.trim()):c.compile(t)}catch(e){return c.compile(t)}},C.prototype.chipCreation=function(e){if(!c.isNullOrUndefined(e)){for(var t=[],i=[],s=0;s<e.length;s++){var n=this.getFieldValues(e[s]),o=n.htmlAttributes,o=(i.push(o),this.elementCreation(n)),r=(E.chip+" "+(n.enabled?" ":E.disabled)+" "+(n.avatarIconCss||n.avatarText?E.chipWrapper:n.leadingIconCss?E.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if(this.chipType()&&"chip"!==this.type){var l=this.createElement("DIV",{className:r.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});if(this.enableDelete&&l.setAttribute("aria-keyshortcuts","Press delete or backspace key to delete"),n.value&&l.setAttribute("data-value",n.value.toString()),n.enabled?l.setAttribute("aria-disabled","false"):(l.removeAttribute("tabindex"),l.setAttribute("aria-disabled","true")),!c.isNullOrUndefined(i[s])&&s<i.length&&Object.keys(i[s]).length)for(var a=Object.keys(i[s]),p=0;p<a.length;p++)l.setAttribute(a[p],i[s][a[p]]);c.append(o,l),t.push(l)}else t=o,c.addClass([this.element],r),this.element.setAttribute("aria-label",n.text),n.value&&this.element.setAttribute("data-value",n.value.toString())}c.append(t,this.element)}},C.prototype.getFieldValues=function(e){var t=!("false"===this.enabled.toString());return{text:"object"==typeof e?(e.text?e:this).text.toString():this.chipType()?e.toString():this.innerText||this.text.toString(),cssClass:("object"==typeof e&&e.cssClass?e:this).cssClass.toString(),leadingIconCss:("object"==typeof e&&e.leadingIconCss?e:this).leadingIconCss.toString(),avatarIconCss:("object"==typeof e&&e.avatarIconCss?e:this).avatarIconCss.toString(),avatarText:("object"==typeof e&&e.avatarText?e:this).avatarText.toString(),trailingIconCss:("object"==typeof e&&e.trailingIconCss?e:this).trailingIconCss.toString(),enabled:"object"==typeof e&&void 0!==e.enabled?"false"!==e.enabled.toString():t,value:"object"==typeof e&&e.value?e.value.toString():null,leadingIconUrl:"object"==typeof e&&e.leadingIconUrl?e.leadingIconUrl.toString():this.leadingIconUrl,trailingIconUrl:"object"==typeof e&&e.trailingIconUrl?e.trailingIconUrl.toString():this.trailingIconUrl,htmlAttributes:"object"==typeof e&&e.htmlAttributes||this.htmlAttributes,template:"object"==typeof e&&e.template||null}},C.prototype.elementCreation=function(e){var t,i,s=[],n=(e.avatarText||e.avatarIconCss?(t=(E.avatar+" "+e.avatarIconCss).trim(),(n=this.createElement("span",{className:t})).innerText=e.avatarText,s.push(n)):e.leadingIconCss?(t=(E.icon+" "+e.leadingIconCss).trim(),i=this.createElement("span",{className:t}),s.push(i)):e.leadingIconUrl&&(t=(E.avatar+" image-url").trim(),(i=this.createElement("span",{className:t})).style.backgroundImage="url("+e.leadingIconUrl+")",s.push(i)),this.createElement("span",{className:E.text}));return n.innerText=e.text,s.push(n),e.template&&(i=this.createElement("div",{className:E.template}),n=this.templateParser(e.template)(e,this,"template",this.element.id+"_template",!1),c.append(n,i),s.push(i),this.renderTemplates()),e.trailingIconCss||this.chipType()&&this.enableDelete?(t=(E.delete+" "+(e.trailingIconCss||E.deleteIcon)).trim(),n=this.createElement("span",{className:t}),s.push(n)):e.trailingIconUrl&&(t="trailing-icon-url".trim(),(i=this.createElement("span",{className:t})).style.backgroundImage="url("+e.trailingIconUrl+")",s.push(i)),s},C.prototype.find=function(e){var t,i={text:"",index:-1,element:this.element,data:""},e=e instanceof HTMLElement?e:this.element.querySelectorAll("."+E.chip)[e];return e&&this.chipType()&&(i.index=Array.prototype.slice.call(this.element.querySelectorAll("."+E.chip)).indexOf(e),"object"==typeof(t=this.chips[i.index])&&null!==t?void 0!==t.text&&(i.text=t.text.toString()):void 0!==t&&(i.text=t.toString()),i.data=t,i.element=e),i},C.prototype.add=function(e){var t;"chip"!==this.type&&(e=e instanceof Array?e:[e],this.chips=(t=[].slice.call(this.chips)).concat.apply(t,e),this.chipCreation(e))},C.prototype.select=function(e,t){this.onSelect(e,!1,t)},C.prototype.multiSelection=function(e){for(var t=this.element.querySelectorAll("."+E.chip),i=0;i<e.length;i++)if("string"==typeof e[i]){for(var s=0;s<t.length;s++)if(e[i]!==s&&e[i]===t[s].attributes[5].value){this.multiSelectedChip.push(s);break}}else this.multiSelectedChip.push(e[i])},C.prototype.onSelect=function(e,t,i){var s=null;if(this.chipType()&&"None"!==this.selection){if(t)for(var n=this.element.querySelectorAll("."+E.chip),o=0;o<n.length;o++)n[o].setAttribute("aria-selected","false"),n[o].classList.remove(E.active);for(var r=e instanceof Array?e:[e],o=0;o<r.length;o++){var l=r[o]instanceof HTMLElement?r[o]:this.element.querySelectorAll("."+E.chip)[r[o]];if("index"!==i)for(var a=0;a<this.chips.length;a++){var p=this.element.querySelectorAll("."+E.chip)[a],c=this.getFieldValues(this.chips[a]);"value"===i?null!==c.value&&(s=p.dataset.value):"text"===i&&(s=p.innerText),s===r[o].toString()&&(c=a,l=this.element.querySelectorAll("."+E.chip)[c])}l instanceof HTMLElement&&this.selectionHandler(l)}}},C.prototype.remove=function(e){var t,i,s=this;this.chipType()&&(e=e instanceof Array?e:[e],t=[],i=this.element.querySelectorAll("."+E.chip),e.forEach(function(e){e=e instanceof HTMLElement?e:i[e];e instanceof HTMLElement&&t.push(e)}),t.forEach(function(e){var t=s.element.querySelectorAll("."+E.chip),t=Array.prototype.slice.call(t).indexOf(e);s.deleteHandler(e,t)}))},C.prototype.getSelectedChips=function(){if(this.chipType()&&"None"!==this.selection){for(var e={texts:[],Indexes:[],data:[],elements:[]},t=this.element.querySelectorAll("."+E.active),i=0;i<t.length;i++){var s=t[i],s=(e.elements.push(s),Array.prototype.slice.call(this.element.querySelectorAll("."+E.chip)).indexOf(s)),s=(e.Indexes.push(s),e.data.push(this.chips[s]),"object"==typeof this.chips[s]?this.chips[s].text||null:this.chips[s].toString());e.texts.push(s)}var n={text:e.texts[0],index:e.Indexes[0],data:e.data[0],element:e.elements[0]},n=c.isNullOrUndefined(n.index)?void 0:"Multiple"===this.selection?e:n}return n},C.prototype.wireEvent=function(e){e?(c.EventHandler.remove(this.element,"click",this.clickHandler),c.EventHandler.remove(this.element,"focusout",this.focusOutHandler),c.EventHandler.remove(this.element,"keydown",this.keyHandler),c.EventHandler.remove(this.element,"keyup",this.keyHandler)):(c.EventHandler.add(this.element,"click",this.clickHandler,this),c.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),c.EventHandler.add(this.element,"keydown",this.keyHandler,this),c.EventHandler.add(this.element,"keyup",this.keyHandler,this))},C.prototype.keyHandler=function(e){e.target.classList.contains(E.chip)&&("keydown"===e.type?13===e.keyCode||32===e.keyCode?this.clickHandler(e):46!==e.keyCode&&8!==e.keyCode||!this.enableDelete||this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},C.prototype.focusInHandler=function(e){e.classList.contains(E.focused)||e.classList.add(E.focused)},C.prototype.focusOutHandler=function(e){var e=c.closest(e.target,"."+E.chip),t=this.chipType()?this.element.querySelector("."+E.focused):this.element.classList.contains(E.focused)?this.element:null;e&&t&&t.classList.remove(E.focused)},C.prototype.clickHandler=function(t,i){var e,s,n=this,o=(void 0===i&&(i=!1),c.closest(t.target,"."+E.chip));o&&(s=void 0,(s=this.chipType()?this.find(o):(e=Array.prototype.slice.call(this.element.querySelectorAll("."+E.chip)).indexOf(o),{text:this.innerText||this.text,element:o,data:this.text,index:e})).event=t,s.cancel=!1,this.trigger("beforeClick",s,function(e){e.cancel||n.clickEventHandler(e.element,t,i)}))},C.prototype.clickEventHandler=function(t,e,i){var s,n,o=this;this.chipType()?(((s=this.find(t)).event=e).target.classList.contains(E.deleteIcon)?e.target:i?t.querySelector("."+E.deleteIcon):void 0)&&this.enableDelete?(s.cancel=!1,this.trigger("delete",s,function(e){!e.cancel&&(o.deleteHandler(e.element,e.index),o.selectionHandler(t),s.selected=e.element.classList.contains(E.active),o.trigger("click",s),e=o.element.querySelectorAll("."+E.chip)[e.index])&&(e.focus(),o.focusInHandler(e))})):"None"!==this.selection?(this.selectionHandler(t),s.selected=t.classList.contains(E.active),this.trigger("click",s)):(this.focusInHandler(t),this.trigger("click",n=s)):(this.focusInHandler(t),n={text:this.innerText||this.text,element:t,data:this.text,event:e},this.trigger("click",n))},C.prototype.selectionHandler=function(e){var t;"Single"===this.selection?((t=this.element.querySelector("."+E.active))&&t!==e&&(t.classList.remove(E.active),t.setAttribute("aria-selected","false")),this.setProperties({selectedChips:null},!0)):this.setProperties({selectedChips:[]},!0),e.classList.contains(E.active)?(e.classList.remove(E.active),e.setAttribute("aria-selected","false")):(e.classList.add(E.active),e.setAttribute("aria-selected","true")),this.updateSelectedChips()},C.prototype.updateSelectedChips=function(){for(var e=this.element.querySelectorAll("."+E.chip),t=[],i=[],s=null,n=null,o=0;o<e.length;o++){var r=this.element.querySelectorAll("."+E.chip)[o];if("true"===r.getAttribute("aria-selected")){if(n=r.getAttribute("data-value"),"Single"===this.selection&&r.classList.contains("e-active")){s=n||o;break}s=n?i.push(n):t.push(o)}}this.setProperties({selectedChips:"Single"===this.selection?s:n?i:t},!0)},C.prototype.deleteHandler=function(e,t){var i=this.find(e);this.chips.splice(t,1),this.setProperties({chips:this.chips},!0),c.detach(e),this.trigger("deleted",i)},C.prototype.destroy=function(){for(var e=0;e<this.dragCollection.length;e++)this.dragCollection[e].destroy();this.dragCollection=[],this.clearTemplate(),c.removeClass([this.element],[E.chipSet,E.chip,E.rtl,E.multiSelection,E.singleSelection,E.disabled,E.chipWrapper,E.iconWrapper,E.active,E.focused].concat(this.cssClass?this.cssClass.toString().split(" ").filter(function(e){return e}):[])),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunction(),be.prototype.destroy.call(this),this.element.innerHTML="",this.element.innerText=this.innerText},C.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},C.prototype.getPersistData=function(){return this.addOnPersist([])},C.prototype.getModuleName=function(){return"chip-list"},C.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":this.refresh();break;case"cssClass":this.chipType()?this.refresh():(c.removeClass([this.element],t.cssClass.toString().split(" ").filter(function(e){return e})),c.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e})));break;case"selectedChips":c.removeClass(this.element.querySelectorAll(".e-active"),"e-active"),"Multiple"===this.selection?(this.multiSelectedChip=[],this.multiSelection(e.selectedChips),this.onSelect(this.multiSelectedChip,!0),this.updateSelectedChips()):this.onSelect(e.selectedChips,!0);break;case"enableRtl":this.setRtl();break;case"allowDragAndDrop":for(var n=0;n<this.dragCollection.length;n++)this.dragCollection[n].destroy();this.dragCollection=[],this.allowDragAndDrop&&this.enableDraggingChips();break;case"dragArea":if(this.allowDragAndDrop)for(n=0;n<this.dragCollection.length;n++)this.dragCollection[n].dragArea=this.dragArea}},b([c.Property([])],C.prototype,"chips",void 0),b([c.Property("")],C.prototype,"text",void 0),b([c.Property("")],C.prototype,"avatarText",void 0),b([c.Property("")],C.prototype,"avatarIconCss",void 0),b([c.Property("")],C.prototype,"htmlAttributes",void 0),b([c.Property("")],C.prototype,"leadingIconCss",void 0),b([c.Property("")],C.prototype,"trailingIconCss",void 0),b([c.Property("")],C.prototype,"leadingIconUrl",void 0),b([c.Property("")],C.prototype,"trailingIconUrl",void 0),b([c.Property("")],C.prototype,"cssClass",void 0),b([c.Property(!0)],C.prototype,"enabled",void 0),b([c.Property([])],C.prototype,"selectedChips",void 0),b([c.Property("None")],C.prototype,"selection",void 0),b([c.Property(!1)],C.prototype,"enableDelete",void 0),b([c.Property(!1)],C.prototype,"allowDragAndDrop",void 0),b([c.Property(null)],C.prototype,"dragArea",void 0),b([c.Event()],C.prototype,"created",void 0),b([c.Event()],C.prototype,"click",void 0),b([c.Event()],C.prototype,"beforeClick",void 0),b([c.Event()],C.prototype,"delete",void 0),b([c.Event()],C.prototype,"deleted",void 0),b([c.Event()],C.prototype,"dragStart",void 0),b([c.Event()],C.prototype,"dragging",void 0),b([c.Event()],C.prototype,"dragStop",void 0),Ee=b([c.NotifyPropertyChanges],C));function C(e,t){e=be.call(this,e,t)||this;return e.multiSelectedChip=[],e}function Ce(){}ke=function(e,t){return(ke=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ke,k,b=function(e,t){function i(){this.constructor=e}ke(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},L=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},Le="e-fab-fixed",Pe="e-fab-top",He="e-fab-bottom",Ae="e-fab-right",we="e-fab-left",xe="e-fab-middle",Re="e-fab-center",Te=((H=e.FabPosition||(e.FabPosition={})).TopLeft="TopLeft",H.TopCenter="TopCenter",H.TopRight="TopRight",H.MiddleLeft="MiddleLeft",H.MiddleCenter="MiddleCenter",H.MiddleRight="MiddleRight",H.BottomLeft="BottomLeft",H.BottomCenter="BottomCenter",H.BottomRight="BottomRight",b(P,k=t),P.prototype.render=function(){k.prototype.render.call(this),this.initializeFab()},P.prototype.preRender=function(){k.prototype.preRender.call(this),this.element.id||(this.element.id=c.getUniqueID("e-"+this.getModuleName()))},P.prototype.getPersistData=function(){return k.prototype.getPersistData.call(this),this.addOnPersist([])},P.prototype.getModuleName=function(){return"fab"},P.prototype.initializeFab=function(){this.element.classList.add("e-"+k.prototype.getModuleName.call(this)),this.checkTarget(),this.setPosition(),this.setVisibility()},P.prototype.checkTarget=function(){this.isFixed=!0,this.target&&(this.targetEle="string"==typeof this.target?c.select(this.target):this.target,this.targetEle)&&(this.isFixed=!1,this.targetEle.appendChild(this.element)),this.element.classList[this.isFixed?"add":"remove"](Le)},P.prototype.setVisibility=function(){this.element.classList[this.visible?"remove":"add"]("e-fab-hidden")},P.prototype.setPosition=function(){this.element.classList.add(-1!==["BottomLeft","BottomCenter","BottomRight"].indexOf(this.position)?He:Pe);var e=-1!==["TopRight","MiddleRight","BottomRight"].indexOf(this.position);this.element.classList.add(!this.enableRtl&&!e||this.enableRtl&&e?we:Ae),-1!==["MiddleLeft","MiddleRight","MiddleCenter"].indexOf(this.position)&&this.element.classList.add(xe),-1!==["TopCenter","BottomCenter","MiddleCenter"].indexOf(this.position)&&this.element.classList.add(Re)},P.prototype.clearPosition=function(){this.element.classList.remove(Pe,He,xe),this.element.classList.remove(Ae,we,Re)},P.prototype.refreshPosition=function(){},P.prototype.destroy=function(){k.prototype.destroy.call(this),this.element.classList.remove("e-"+k.prototype.getModuleName.call(this),Le),this.clearPosition()},P.prototype.onPropertyChanged=function(e,t){k.prototype.onPropertyChanged.call(this,e,t);for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"enableRtl":case"position":this.clearPosition(),this.setPosition();break;case"visible":this.setVisibility();break;case"target":this.checkTarget(),this.setPosition();break;case"currencyCode":this.refresh()}},L([c.Property("BottomRight")],P.prototype,"position",void 0),L([c.Property("")],P.prototype,"target",void 0),L([c.Property(!0)],P.prototype,"visible",void 0),L([c.Property(!0)],P.prototype,"isPrimary",void 0),L([c.NotifyPropertyChanges],P));function P(e,t){return k.call(this,e,t)||this}Se=function(e,t){return(Se=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Se,Oe,H=function(e,t){function i(){this.constructor=e}Se(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},b=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},Ne=["TopLeft","TopCenter","TopRight"],Ie=["BottomLeft","BottomCenter","BottomRight"],Me=["TopLeft","MiddleLeft","BottomLeft"],De=["TopRight","MiddleRight","BottomRight"],A="e-speeddial-hidden",Be="e-speeddial-fixed",je="e-speeddial",Fe="e-speeddial-hover-open",w="e-speeddial-radial",x="e-speeddial-linear",Ue="e-speeddial-template",We="e-speeddial-popup",_e="e-speeddial-ul",R="e-speeddial-li",Ve="e-speeddial-li-active",qe="e-speeddial-li-icon",T="e-disabled",ze="e-speeddial-vert-bottom",Ke="e-speeddial-vert-right",Xe="e-speeddial-horz-top",Ye="e-speeddial-horz-left",Je="e-speeddial-horz-right",Ge="e-speeddial-overflow",Ze="e-speeddial-vert-overflow",Qe="e-speeddial-horz-overflow",$e="e-speeddial-top",et="e-speeddial-bottom",tt="e-speeddial-right",it="e-speeddial-left",st="e-speeddial-middle",nt="e-speeddial-center",ot="e-speeddial-top-left",rt="e-speeddial-bottom-right",lt="e-speeddial-top-right",at="e-speeddial-bottom-left",pt="--speeddialVertDist",ct="--speeddialHorzDist",ht="--speeddialRadialOffset",dt="--speeddialRadialMinHeight",ut="--speeddialRadialMinWidth",mt="--speeddialOverflowLimit",ft="--speeddialRadialHorzDist",L=((L=e.SpeedDialMode||(e.SpeedDialMode={})).Linear="Linear",L.Radial="Radial",(L=e.LinearDirection||(e.LinearDirection={})).Up="Up",L.Down="Down",L.Right="Right",L.Left="Left",L.Auto="Auto",(L=e.RadialDirection||(e.RadialDirection={})).Clockwise="Clockwise",L.AntiClockwise="AntiClockwise",L.Auto="Auto",(L=e.SpeedDialAnimationEffect||(e.SpeedDialAnimationEffect={})).Fade="Fade",L.FadeZoom="FadeZoom",L.FlipLeftDown="FlipLeftDown",L.FlipLeftUp="FlipLeftUp",L.FlipRightDown="FlipRightDown",L.FlipRightUp="FlipRightUp",L.FlipXDown="FlipXDown",L.FlipXUp="FlipXUp",L.FlipYLeft="FlipYLeft",L.FlipYRight="FlipYRight",L.SlideBottom="SlideBottom",L.SlideLeft="SlideLeft",L.SlideRight="SlideRight",L.SlideTop="SlideTop",L.Zoom="Zoom",L.None="None",Oe=c.ChildProperty,H(S,Oe),b([c.Property("Fade")],S.prototype,"effect",void 0),b([c.Property(400)],S.prototype,"duration",void 0),b([c.Property(0)],S.prototype,"delay",void 0),S);function S(){return null!==Oe&&Oe.apply(this,arguments)||this}yt=c.ChildProperty,H(O,yt),b([c.Property("Auto")],O.prototype,"direction",void 0),b([c.Property(-1)],O.prototype,"endAngle",void 0),b([c.Property("100px")],O.prototype,"offset",void 0),b([c.Property(-1)],O.prototype,"startAngle",void 0);var yt,vt=O;function O(){return null!==yt&&yt.apply(this,arguments)||this}gt=c.ChildProperty,H(N,gt),b([c.Property("")],N.prototype,"iconCss",void 0),b([c.Property("")],N.prototype,"id",void 0),b([c.Property("")],N.prototype,"text",void 0),b([c.Property("")],N.prototype,"title",void 0),b([c.Property(!1)],N.prototype,"disabled",void 0);var gt,bt=N;function N(){return null!==gt&&gt.apply(this,arguments)||this}Et=c.Component,H(I,Et),I.prototype.render=function(){this.initialize()},I.prototype.preRender=function(){this.keyConfigs={space:"space",enter:"enter",end:"end",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",esc:"escape"},this.validateDirection()},I.prototype.getPersistData=function(){return this.addOnPersist([])},I.prototype.getModuleName=function(){return"speed-dial"},I.prototype.initialize=function(){this.element.id||(this.element.id=c.getUniqueID("e-"+this.getModuleName())),this.fab=new Te({content:this.content,cssClass:this.cssClass?je+" "+this.cssClass:je,disabled:this.disabled,enablePersistence:this.enablePersistence,enableRtl:this.enableRtl,iconCss:this.openIconCss,iconPosition:this.iconPosition,position:this.position,target:this.target,visible:this.visible,isPrimary:this.isPrimary}),this.fab.appendTo(this.element),(0<this.items.length||this.popupTemplate)&&this.createPopup(),this.wireEvents()},I.prototype.wireEvents=function(){c.EventHandler.add(window,"resize",this.resizeHandler,this),c.EventHandler.add(document.body,"click",this.bodyClickHandler,this),this.opensOnHover?this.wireFabHover():this.wireFabClick()},I.prototype.wirePopupEvents=function(){this.removeRippleEffect=c.rippleEffect(this.popupEle,{selector:"."+qe}),this.keyboardModule=new c.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.popupKeyboardModule=new c.KeyboardEvents(this.popupEle,{keyAction:this.popupKeyActionHandler.bind(this),keyConfigs:{esc:"escape"},eventName:"keydown"}),this.documentKeyboardModule=new c.KeyboardEvents(document.body,{keyAction:this.popupKeyActionHandler.bind(this),keyConfigs:{enter:"enter",space:"space"},eventName:"keydown"}),c.EventHandler.add(this.popupEle,"click",this.popupClick,this),c.EventHandler.add(this.popupEle,"mouseleave",this.popupMouseLeaveHandle,this)},I.prototype.wireFabClick=function(){c.EventHandler.add(this.fab.element,"click",this.fabClick,this)},I.prototype.wireFabHover=function(){this.popupEle.classList.add(Fe),c.EventHandler.add(this.fab.element,"mouseover",this.mouseOverHandle,this),c.EventHandler.add(this.element,"mouseleave",this.mouseLeaveHandle,this)},I.prototype.createPopup=function(){var e=We+" "+A,e=this.enableRtl?e+" e-rtl":e;e=this.cssClass?e+" "+this.cssClass:e,this.popupEle=this.createElement("div",{className:e,id:this.element.id+"_popup"}),this.element.insertAdjacentElement("afterend",this.popupEle),c.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-controls":this.popupEle.id}),this.setPopupContent(),this.modal&&this.createOverlay(),this.checkTarget(),this.setPositionProps(),this.wirePopupEvents()},I.prototype.createOverlay=function(){this.overlayEle=this.createElement("div",{id:this.element.id+"_overlay",className:("e-speeddial-overlay"+(this.isMenuOpen?"":" "+A)+" "+this.cssClass).trim()}),this.element.insertAdjacentElement("beforebegin",this.overlayEle)},I.prototype.popupClick=function(){this.isControl=!0},I.prototype.bodyClickHandler=function(e){this.isControl?this.isControl=!1:this.isMenuOpen&&this.hidePopupEle(e)},I.prototype.fabClick=function(e){this.isControl=!0,this.isMenuOpen?this.hidePopupEle(e):this.showPopupEle(e)},I.prototype.setPopupContent=function(){this.popupEle.classList.remove(w,x,Ue),this.popupTemplate?(this.popupEle.classList.add(Ue),this.appendTemplate()):(this.popupEle.classList.add("Radial"===this.mode?w:x),this.createUl(),this.createItems()),this.renderReactTemplates()},I.prototype.appendTemplate=function(){var e=this.createElement("div",{className:"e-speeddial-template-container"}),t=(c.append([e],this.popupEle),this.getTemplateString(this.popupTemplate));c.append(t({},this,"fabPopupTemplate",this.element.id+"popupTemplate",this.isStringTemplate),e)},I.prototype.getTemplateString=function(t){var i="";try{var e=c.select(t),i="function"!=typeof t&&e?"SCRIPT"===e.tagName?e.innerHTML:e.outerHTML:t}catch(e){i=t}return c.compile(i)},I.prototype.updatePopupTemplate=function(){if(this.popupEle){for(this.popupEle.querySelector("."+R)&&(this.clearItems(),this.popupEle.classList.remove(w,x),this.popupEle.classList.add(Ue));this.popupEle.firstElementChild;)c.remove(this.popupEle.firstElementChild);this.setPopupContent(),this.updatePositionProperties()}else this.createPopup()},I.prototype.createUl=function(){var e=this.createElement("ul",{className:_e,id:this.element.id+"_ul",attrs:{role:"menu"}});this.popupEle.appendChild(e)},I.prototype.createItems=function(){for(var s=this,n=(this.focusedIndex=-1,this.popupEle.querySelector("."+_e)),o=this,e=0;e<this.items.length;e++)!function(e){var t=o.items[parseInt(e.toString(),10)],e=o.createElement("li",{className:R+" "+A,id:t.id||o.element.id+"_li_"+e,attrs:{role:"menuitem"}}),i=(t.text&&e.setAttribute("aria-label",t.text),o.itemTemplate?(i=o.getTemplateString(o.itemTemplate),c.append(i(t,o,"fabItemTemplate",o.element.id+"itemTemplate",o.isStringTemplate),e)):(t.iconCss&&(i=o.createElement("span",{className:qe+" "+t.iconCss}),e.appendChild(i)),t.text&&((i=o.createElement("span",{className:"e-speeddial-li-text"})).innerText=t.text,e.appendChild(i),t.iconCss||e.classList.add("e-speeddial-text-li"))),t.disabled?(e.classList.add(T),e.setAttribute("aria-disabled","true")):c.EventHandler.add(e,"click",function(e){return s.triggerItemClick(e,t)},o),t.title&&e.setAttribute("title",t.title),{element:e,item:t});o.trigger("beforeItemRender",i,function(e){n.appendChild(e.element)})}(e)},I.prototype.setRTL=function(){this.popupEle.classList[this.enableRtl?"add":"remove"]("e-rtl"),this.clearHorizontalPosition(),this.popupTemplate||"Radial"===this.mode?(this.popupTemplate||"Radial"!==this.mode||this.setRadialPosition(),this.setHorizontalPosition()):this.setLinearHorizontalPosition()},I.prototype.checkTarget=function(){this.isFixed=!0,this.target&&(this.targetEle="string"==typeof this.target?c.select(this.target):this.target,this.targetEle)&&(this.targetEle.appendChild(this.element),this.isFixed=!1),this.isFixed?(this.popupEle&&this.popupEle.classList.add(Be),this.overlayEle&&this.overlayEle.classList.add(Be)):(this.popupEle&&this.popupEle.classList.remove(Be),this.overlayEle&&this.overlayEle.classList.remove(Be))},I.prototype.setVisibility=function(e){this.setProperties({visible:e},!0),this.fab.setProperties({visible:e})},I.prototype.popupMouseLeaveHandle=function(e){var t=e.relatedTarget;!this.opensOnHover||t.classList.contains(je)||c.closest(t,"."+je)||this.hidePopupEle(e)},I.prototype.mouseOverHandle=function(e){this.showPopupEle(e)},I.prototype.mouseLeaveHandle=function(e){var t=e.relatedTarget;t.classList.contains(We)||c.closest(t,"."+We)||this.hidePopupEle(e)},I.prototype.popupKeyActionHandler=function(e){switch(e.action){case"esc":this.hidePopupEle(e);break;case"enter":case"space":this.isMenuOpen&&e.target!==this.element&&this.hidePopupEle(e)}},I.prototype.keyActionHandler=function(e){switch(e.preventDefault(),e.action){case"enter":case"space":this.isMenuOpen?-1!==this.focusedIndex?this.triggerItemClick(e,this.items[this.focusedIndex]):this.hidePopupEle(e):this.showPopupEle(e);break;case"esc":this.hidePopupEle(e);break;default:if(!this.popupTemplate&&this.isMenuOpen)switch(e.action){case"end":this.focusLastElement();break;case"home":this.focusFirstElement();break;case"moveRight":"Radial"===this.mode?this.focusLeftRightElement(!1):this.focusLinearElement(!1);break;case"moveDown":"Radial"===this.mode?this.focusUpDownElement(!1):this.focusLinearElement(!1);break;case"moveLeft":"Radial"===this.mode?this.focusLeftRightElement(!0):this.focusLinearElement(!0);break;case"moveUp":"Radial"===this.mode?this.focusUpDownElement(!0):this.focusLinearElement(!0)}}},I.prototype.focusFirstElement=function(){for(var e=c.selectAll("."+R,this.popupEle),t=0;e[parseInt(t.toString(),10)].classList.contains(T);)if(++t>e.length-1)return;this.setFocus(t,e[parseInt(t.toString(),10)])},I.prototype.focusLastElement=function(){for(var e=c.selectAll("."+R,this.popupEle),t=e.length-1;e[parseInt(t.toString(),10)].classList.contains(T);)if(--t<0)return;this.setFocus(t,e[parseInt(t.toString(),10)])},I.prototype.focusLinearElement=function(e){(this.popupEle.classList.contains(ze)||this.popupEle.classList.contains(Je))!==e?this.focusPrevElement():this.focusNextElement()},I.prototype.focusLeftRightElement=function(e){var t=-1!==["TopLeft","TopCenter","TopRight","MiddleLeft"].indexOf(this.position);t&&e!==this.isClock||!t&&e===this.isClock?this.focusPrevElement():this.focusNextElement()},I.prototype.focusUpDownElement=function(e){var t=-1!==["TopRight","MiddleRight","BottomRight","BottomCenter"].indexOf(this.position);t&&e!==this.isClock||!t&&e===this.isClock?this.focusPrevElement():this.focusNextElement()},I.prototype.focusPrevElement=function(){var e=c.selectAll("."+R,this.popupEle),t=this.focusedIndex;do{if(--t<0)return void this.setFocus(-1)}while(e[parseInt(t.toString(),10)].classList.contains(T));this.setFocus(t,e[parseInt(t.toString(),10)])},I.prototype.focusNextElement=function(){var e=c.selectAll("."+R,this.popupEle),t=this.focusedIndex;do{if(++t>e.length-1)return}while(e[parseInt(t.toString(),10)].classList.contains(T));this.setFocus(t,e[parseInt(t.toString(),10)])},I.prototype.setFocus=function(e,t){this.removeFocus(),t&&t.classList.add(Ve),this.focusedIndex=e},I.prototype.removeFocus=function(){var e=c.select("."+Ve,this.popupEle);e&&e.classList.remove(Ve)},I.prototype.updatePositionProperties=function(){this.hidePopupEle(),this.clearPosition(),this.validateDirection(),this.setPositionProps()},I.prototype.setPositionProps=function(){this.popupTemplate?this.setPosition():"Radial"===this.mode?(this.setRadialPosition(),this.setPosition()):(this.setLinearPosition(),this.setMaxSize())},I.prototype.validateDirection=function(){switch(this.direction){case"Up":this.actualLinDirection=-1!==Ne.indexOf(this.position)?"Auto":"Up";break;case"Down":this.actualLinDirection=-1!==Ie.indexOf(this.position)?"Auto":"Down";break;case"Right":this.actualLinDirection=-1!==De.indexOf(this.position)?"Auto":"Right";break;case"Left":this.actualLinDirection=-1!==Me.indexOf(this.position)?"Auto":"Left";break;default:this.actualLinDirection="Auto"}this.isVertical=!("Left"===this.actualLinDirection||"Right"===this.actualLinDirection)},I.prototype.setMaxSize=function(){var e=this.element.offsetTop,t=this.element.offsetLeft,i=(this.isFixed?window.innerHeight:this.targetEle.clientHeight)-this.element.offsetTop-this.element.offsetHeight,s=(this.isFixed?window.innerWidth:this.targetEle.clientWidth)-this.element.offsetLeft-this.element.offsetWidth,n=0,o=this.popupEle.querySelector("."+_e);this.isVertical?(n="Up"===this.actualLinDirection||"Auto"===this.actualLinDirection&&-1===Ne.indexOf(this.position)?e:i)<o.offsetHeight&&(this.popupEle.classList.add(Ge,Ze),o.style.setProperty(mt,n+"px")):(n=this.enableRtl?"Right"===this.direction?t:s:"Right"===this.direction?s:t)<o.offsetWidth&&(this.popupEle.classList.add(Ge,Qe),o.style.setProperty(mt,n+"px"))},I.prototype.setLinearPosition=function(){var e=0,t="Down"===this.actualLinDirection||"Auto"===this.actualLinDirection&&-1!==Ne.indexOf(this.position)||!this.isVertical&&-1===Ie.indexOf(this.position),i=this.element.offsetHeight/2,s=-1!==["MiddleRight","MiddleCenter","MiddleLeft"].indexOf(this.position);t?(e=this.element.offsetTop+(this.isVertical?this.element.offsetHeight:0),s&&("Right"!==this.actualLinDirection&&"Left"!==this.actualLinDirection||(e=this.element.offsetTop-i),"Down"===this.actualLinDirection)&&(e-=i),this.isVertical||this.popupEle.classList.add(Xe)):(e=(e=(this.isFixed?window.document.documentElement:this.targetEle).clientHeight)-this.element.offsetTop-(this.isVertical?0:this.element.offsetHeight),!s||"Auto"!==this.actualLinDirection&&"Up"!==this.actualLinDirection||(e+=i),this.isVertical&&this.popupEle.classList.add(ze)),this.popupEle.classList.add(t?$e:et),this.popupEle.style.setProperty(pt,e+"px"),this.setLinearHorizontalPosition()},I.prototype.setLinearHorizontalPosition=function(){"Right"===this.actualLinDirection||this.isVertical&&-1===De.indexOf(this.position)?(this.enableRtl?this.setRight():this.setLeft(),this.isVertical||this.popupEle.classList.add(Ye)):(this.enableRtl?this.setLeft():this.setRight(),this.popupEle.classList.add(this.isVertical?Ke:Je))},I.prototype.setLeft=function(){var e=this.element.offsetWidth/2,t=-1!==["TopCenter","MiddleCenter","BottomCenter"].indexOf(this.position),i=this.element.offsetLeft+(this.isVertical?0:this.element.offsetWidth);t&&(i="Auto"===this.actualLinDirection||"Down"===this.actualLinDirection||"Up"===this.actualLinDirection?this.element.offsetLeft-e:"Right"===this.actualLinDirection?this.element.offsetLeft+e:i+e),this.popupEle.style.setProperty(ct,i+"px"),this.popupEle.classList.add(it)},I.prototype.setRight=function(){var e=this.element.offsetWidth/2,t=-1!==["TopCenter","MiddleCenter","BottomCenter"].indexOf(this.position),i=(i=(this.isFixed?window.document.documentElement:this.targetEle).clientWidth)-this.element.offsetLeft-(this.isVertical?this.element.offsetWidth:0);t&&"Left"===this.actualLinDirection&&(i+=e),this.popupEle.classList.contains("e-rtl")&&t&&(i-=e),this.popupEle.style.setProperty(ct,i+"px"),this.popupEle.classList.add(tt)},I.prototype.setPosition=function(){var e;-1!==["MiddleLeft","MiddleRight","MiddleCenter"].indexOf(this.position)&&(this.popupEle.classList.add(st),e=((this.isFixed?window.innerHeight:this.targetEle.clientHeight)-this.popupEle.offsetHeight)/2,this.popupEle.style.setProperty(pt,e+"px")),this.popupEle.classList.add(-1===Ie.indexOf(this.position)?$e:et),this.setHorizontalPosition()},I.prototype.setHorizontalPosition=function(){-1!==["TopCenter","BottomCenter","MiddleCenter"].indexOf(this.position)&&(this.popupEle.classList.add(nt),e=((this.isFixed?window.innerWidth:this.targetEle.clientWidth)-this.popupEle.offsetWidth)/2,this.popupEle.style.setProperty(ct,e+"px"));var e=-1!==De.indexOf(this.position);this.popupEle.classList.add(!this.enableRtl&&!e||this.enableRtl&&e?it:tt)},I.prototype.setCustomRadialPosition=function(){var e,t=document.documentElement.clientWidth,i=document.documentElement.clientHeight;-1!==["TopLeft","BottomLeft","MiddleLeft"].indexOf(this.position)&&(e=void 0,e=this.enableRtl?this.isFixed?t-(this.element.offsetLeft+this.element.offsetWidth):this.targetEle.clientWidth-(this.element.offsetLeft+this.element.offsetWidth):this.element.offsetLeft,this.popupEle.style.setProperty(ft,e+"px")),-1!==["TopLeft","TopCenter","TopRight"].indexOf(this.position)&&(this.popupEle.style.top=this.element.offsetTop+"px"),-1!==["TopRight","BottomRight","MiddleRight"].indexOf(this.position)&&(e=void 0,e=this.enableRtl?this.element.offsetLeft:this.isFixed?t-(this.element.offsetLeft+this.element.offsetWidth):this.targetEle.clientWidth-(this.element.offsetLeft+this.element.offsetWidth),this.popupEle.style.setProperty(ft,e+"px")),-1!==["BottomLeft","BottomCenter","BottomRight"].indexOf(this.position)&&(this.isFixed?this.popupEle.style.bottom=i-(this.element.offsetTop+this.element.offsetHeight)+"px":this.popupEle.style.bottom=this.targetEle.clientHeight-(this.element.offsetTop+this.element.offsetHeight)+"px"),-1!==["TopCenter","MiddleCenter","BottomCenter"].indexOf(this.position)&&(e=void 0,e=this.enableRtl?this.isFixed?t-(this.element.offsetLeft+this.element.offsetWidth)-this.popupEle.offsetWidth/2:(i=this.targetEle.clientWidth,t=this.popupEle.offsetWidth,i-(this.element.offsetLeft+this.element.offsetWidth)-t/2):this.element.offsetLeft-this.popupEle.offsetWidth/2,this.popupEle.style.setProperty(ft,e+"px")),-1!==["MiddleLeft","MiddleCenter","MiddleRight"].indexOf(this.position)&&(this.popupEle.style.top=this.element.offsetTop-this.popupEle.offsetHeight/2+"px")},I.prototype.setRadialPosition=function(){this.setRadialCorner();for(var e=this.getActualRange(),t=(this.isClock="Clockwise"===e.direction,c.formatUnit(e.offset)),i=c.selectAll("."+R,this.popupEle),t=(this.popupEle.style.setProperty(ht,t),this.popupEle.style.setProperty(dt,i[0].offsetHeight+"px"),this.popupEle.style.setProperty(ut,i[0].offsetWidth+"px"),Math.abs(e.endAngle-e.startAngle)),s=t/(360===t||0===t?i.length:i.length-1),n=0;n<i.length;n++){var o=i[parseInt(n.toString(),10)],r=e.startAngle,r=this.isClock?r+s*n:r-s*n;r%=360,o.style.setProperty("--speeddialRadialAngle",r+"deg")}},I.prototype.setRadialCorner=function(){-1!==["TopLeft","TopCenter","MiddleLeft","MiddleCenter"].indexOf(this.position)&&this.popupEle.classList.add(this.enableRtl?lt:ot),-1!==["TopRight","TopCenter","MiddleRight","MiddleCenter"].indexOf(this.position)&&this.popupEle.classList.add(this.enableRtl?ot:lt),-1!==["BottomLeft","BottomCenter","MiddleLeft","MiddleCenter"].indexOf(this.position)&&this.popupEle.classList.add(this.enableRtl?rt:at),-1!==["BottomRight","BottomCenter","MiddleRight","MiddleCenter"].indexOf(this.position)&&this.popupEle.classList.add(this.enableRtl?at:rt)},I.prototype.getActualRange=function(){var e,t={offset:this.radialSettings.offset},i=this.radialSettings.startAngle,s=this.radialSettings.endAngle,n=!1;switch(this.position){case"TopLeft":case"TopRight":"TopLeft"===this.position!==this.enableRtl?(n="Clockwise"===this.radialSettings.direction,this.checkAngleRange(i,s,t,n,0,90,!1)):(n="AntiClockwise"!==this.radialSettings.direction,this.checkAngleRange(i,s,t,n,90,180,!1));break;case"TopCenter":n="Clockwise"===this.radialSettings.direction,this.checkAngleRange(i,s,t,n,0,180,!1);break;case"MiddleLeft":case"MiddleRight":"MiddleLeft"===this.position!==this.enableRtl?(n="Clockwise"===this.radialSettings.direction,i=(i=c.isNullOrUndefined(i)||i<0||360<i||90<i&&i<270?n?270:90:i)<91?i+360:i,s=(s=c.isNullOrUndefined(s)||s<0||360<s||90<s&&s<270?n?90:270:s)<91?s+360:s,t.startAngle=(e=n&&s<i||!n&&i<s)?s:i,t.endAngle=e?i:s):(n="AntiClockwise"!==this.radialSettings.direction,this.checkAngleRange(i,s,t,n,90,270,!1));break;case"MiddleCenter":n="AntiClockwise"!==this.radialSettings.direction,i=c.isNullOrUndefined(i)||i<0||360<i?n?0:360:i,s=c.isNullOrUndefined(s)||s<0||360<s?n?360:0:s,t.startAngle=!n&&i<=s?i+360:i,t.endAngle=n&&s<=i?s+360:s;break;case"BottomLeft":case"BottomRight":"BottomLeft"===this.position!==this.enableRtl?(n="Clockwise"===this.radialSettings.direction,this.checkAngleRange(i,s,t,n,270,360,!0)):(n="AntiClockwise"!==this.radialSettings.direction,this.checkAngleRange(i,s,t,n,180,270,!0));break;case"BottomCenter":n="AntiClockwise"!==this.radialSettings.direction,this.checkAngleRange(i,s,t,n,180,360,!0)}return t.direction=n?"Clockwise":"AntiClockwise",t},I.prototype.checkAngleRange=function(e,t,i,s,n,o,r){e=this.checkAngle(e,s,n,o,r),t=this.checkAngle(t,!s,n,o,r);n=s&&t<e||!s&&e<t;i.startAngle=n?t:e,i.endAngle=n?e:t},I.prototype.checkAngle=function(e,t,i,s,n){return!(c.isNullOrUndefined(e)||e<0||360<e)&&i<=(e=n?0===e?360:e:360===e?0:e)&&e<=s?e:t?i:s},I.prototype.clearPosition=function(){this.popupEle.style.removeProperty(ht),this.popupEle.style.removeProperty(dt),this.popupEle.style.removeProperty(ut),this.popupEle.classList.remove(ot,lt,at,rt),this.popupEle.classList.remove($e,et,st),this.popupEle.classList.remove(Xe,ze),this.popupEle.style.removeProperty(pt),this.clearHorizontalPosition(),this.clearOverflow()},I.prototype.clearHorizontalPosition=function(){this.popupEle.style.removeProperty(ct),this.popupEle.style.removeProperty(ft),this.popupEle.style.removeProperty("top"),this.popupEle.style.removeProperty("bottom"),this.popupEle.classList.remove(tt,it,nt),this.popupEle.classList.remove(Ke,Ye,Je)},I.prototype.clearOverflow=function(){this.popupEle.classList.remove(Ge,Ze,Qe),this.popupEle.style.removeProperty(mt)},I.prototype.hidePopupEle=function(e){var l=this;this.popupEle&&this.isMenuOpen&&(e={element:this.popupEle,event:e,cancel:!1},this.trigger("beforeClose",e,function(e){var s,n,o,r;e.cancel||("None"!==l.animation.effect?(s={name:l.animation.effect+"Out",timingFunction:"easeOut"},n=l.popupTemplate?[l.popupEle.firstElementChild]:c.selectAll("."+R,l.popupEle),o=l.animation.duration/(n.length+1),s.duration=2*o,(r=function(e){var t,i=n[parseInt(e.toString(),10)];s.delay=e===n.length-1?l.animation.delay:0,s.begin=function(){e===n.length-1&&l.startHide()},s.end=function(){i.classList.add(A),0===e&&l.endHide()},new c.Animation(s).animate(i),0!==e&&(t=e-1,setTimeout(function(){r(t)},o))})(n.length-1)):(l.startHide(),l.popupTemplate||c.selectAll("."+R,l.popupEle).forEach(function(e){e.classList.add(A)}),l.endHide()))}))},I.prototype.startHide=function(){this.element.setAttribute("aria-expanded","false"),this.removeFocus(),this.isMenuOpen=!1},I.prototype.endHide=function(){this.fab.setProperties({iconCss:this.openIconCss}),this.popupEle.classList.add(A),this.popupTemplate&&this.setVisibility(!0),this.toggleOverlay(),this.popupTemplate&&this.popupEle.removeAttribute("tabindex"),this.trigger("onClose",{element:this.popupEle})},I.prototype.showPopupEle=function(e){var l=this;this.popupEle&&!this.isMenuOpen&&(this.popupTemplate||"Radial"===this.mode?this.setCustomRadialPosition():this.setLinearPosition(),e={element:this.popupEle,event:e,cancel:!1},this.trigger("beforeOpen",e,function(e){var s,n,o,r;e.cancel||("None"!==l.animation.effect||"Enable"===c.animationMode&&"None"===l.animation.effect?("Enable"===c.animationMode&&"None"===l.animation.effect&&(l.animation.effect="Fade"),"Enable"===c.animationMode&&0===l.animation.duration&&(l.animation.duration=400),s={name:l.animation.effect+"In",timingFunction:"easeIn"},n=l.popupTemplate?[l.popupEle.firstElementChild]:c.selectAll("."+R,l.popupEle),o=l.animation.duration/(n.length+1),s.duration=2*o,(r=function(e){var t,i=n[parseInt(e.toString(),10)];s.delay=0===e?l.animation.delay:0,s.begin=function(){0===e&&l.startShow(),i.classList.remove(A)},s.end=function(){e===n.length-1&&l.endShow()},new c.Animation(s).animate(i),e!==n.length-1&&(t=e+1,setTimeout(function(){r(t)},o))})(0)):(l.startShow(),l.popupTemplate||c.selectAll("."+R,l.popupEle).forEach(function(e){e.classList.remove(A)}),l.endShow()))}))},I.prototype.startShow=function(){this.element.setAttribute("aria-expanded","true"),this.isMenuOpen=!0,this.toggleOverlay(),this.popupEle.classList.remove(A),this.popupTemplate&&this.setVisibility(!1)},I.prototype.endShow=function(){this.closeIconCss&&this.fab.setProperties({iconCss:this.closeIconCss}),this.popupTemplate&&(this.popupEle.setAttribute("tabindex","1"),this.popupEle.focus()),this.trigger("onOpen",{element:this.popupEle})},I.prototype.toggleOverlay=function(){this.overlayEle&&this.overlayEle.classList[this.isMenuOpen?"remove":"add"](A)},I.prototype.removeOverlayEle=function(){this.overlayEle&&(c.remove(this.overlayEle),this.overlayEle=void 0)},I.prototype.updatePopupItems=function(){this.popupEle?(this.hidePopupEle(),this.clearItems(),this.createItems(),this.updatePositionProperties()):this.createPopup()},I.prototype.handleResize=function(e){this.popupEle&&(this.hidePopupEle(e),this.clearOverflow(),this.setPositionProps())},I.prototype.triggerItemClick=function(e,t){var i=(i=e.target).classList.contains(R)?i:c.closest(i,"."+R);this.trigger("clicked",{element:i,item:t,event:e}),this.hidePopupEle(e)},I.prototype.show=function(){this.showPopupEle()},I.prototype.hide=function(){this.hidePopupEle()},I.prototype.refreshPosition=function(){this.resizeHandler()},I.prototype.resizeHandler=function(e){this.handleResize(e)},I.prototype.clearItems=function(){c.selectAll("."+R,this.popupEle).forEach(function(e){c.remove(e)})},I.prototype.unwireEvents=function(){c.EventHandler.remove(window,"resize",this.resizeHandler),c.EventHandler.remove(document.body,"click",this.bodyClickHandler),this.opensOnHover?this.unwireFabHover():this.unwireFabClick()},I.prototype.unwireFabClick=function(){c.EventHandler.remove(this.fab.element,"click",this.fabClick)},I.prototype.unwireFabHover=function(){this.popupEle.classList.remove(Fe),c.EventHandler.remove(this.fab.element,"mouseover",this.mouseOverHandle),c.EventHandler.remove(this.element,"mouseleave",this.mouseLeaveHandle)},I.prototype.unwirePopupEvents=function(){c.isRippleEnabled&&this.removeRippleEffect(),this.removeRippleEffect=null,this.keyboardModule.destroy(),this.popupKeyboardModule.destroy(),this.documentKeyboardModule.destroy(),this.keyboardModule=null,this.popupKeyboardModule=null,this.documentKeyboardModule=null,c.EventHandler.remove(this.popupEle,"click",this.popupClick),c.EventHandler.remove(this.popupEle,"mouseleave",this.popupMouseLeaveHandle)},I.prototype.destroy=function(){var t=this;Et.prototype.destroy.call(this),this.unwireEvents(),["aria-expanded","aria-haspopup","aria-controls"].forEach(function(e){t.element.removeAttribute(e)}),this.popupEle&&(this.unwirePopupEvents(),c.remove(this.popupEle),this.popupEle=void 0),this.removeOverlayEle(),this.fab.destroy(),this.fab=void 0},I.prototype.onPropertyChanged=function(e,t){for(var i=["content","cssClass","disabled","enablePersistence","enableRtl","iconPosition","position","target","template","title","visible","isPrimary"],s=c.extend({},e),n=0,o=Object.keys(s);n<o.length;n++){var r=o[n];i.indexOf(r)<0&&c.deleteObject(s,r)}this.fab.setProperties(s);for(var l=0,a=Object.keys(e);l<a.length;l++)switch(r=a[l]){case"cssClass":this.popupEle&&(t.cssClass&&c.removeClass(this.overlayEle?[this.popupEle,this.overlayEle]:[this.popupEle],t.cssClass.split(/\s+/).filter(function(e){return 0<e.length})),e.cssClass)&&c.addClass(this.overlayEle?[this.popupEle,this.overlayEle]:[this.popupEle],e.cssClass.split(/\s+/).filter(function(e){return 0<e.length}));break;case"visible":case"disabled":this.hide();break;case"enableRtl":this.popupEle&&this.setRTL();break;case"openIconCss":this.isMenuOpen||this.fab.setProperties({iconCss:this.openIconCss});break;case"closeIconCss":this.isMenuOpen&&this.fab.setProperties({iconCss:this.closeIconCss});break;case"position":this.popupEle&&this.updatePositionProperties();break;case"direction":this.popupEle&&!this.popupTemplate&&this.updatePositionProperties();break;case"popupTemplate":this.updatePopupTemplate();break;case"target":this.hidePopupEle(),this.checkTarget(),this.overlayEle&&this.element.insertAdjacentElement("beforebegin",this.overlayEle),this.popupEle&&(this.element.insertAdjacentElement("afterend",this.popupEle),this.updatePositionProperties());break;case"items":case"itemTemplate":this.popupTemplate||this.updatePopupItems();break;case"modal":e.modal?this.createOverlay():this.removeOverlayEle();break;case"mode":this.popupEle&&!this.popupTemplate&&(this.popupEle.classList.remove(w,x),this.popupEle.classList.add("Radial"===this.mode?w:x),this.updatePositionProperties());break;case"radialSettings":this.popupEle&&"Radial"===this.mode&&!this.popupTemplate&&this.setRadialPosition();break;case"opensOnHover":this.opensOnHover?(this.unwireFabClick(),this.wireFabHover()):(this.unwireFabHover(),this.wireFabClick())}},b([c.Complex({},L)],I.prototype,"animation",void 0),b([c.Property("")],I.prototype,"content",void 0),b([c.Property("")],I.prototype,"closeIconCss",void 0),b([c.Property("")],I.prototype,"cssClass",void 0),b([c.Property("Auto")],I.prototype,"direction",void 0),b([c.Property(!1)],I.prototype,"disabled",void 0),b([c.Property("Left")],I.prototype,"iconPosition",void 0),b([c.Collection([],bt)],I.prototype,"items",void 0),b([c.Property("")],I.prototype,"itemTemplate",void 0),b([c.Property("Linear")],I.prototype,"mode",void 0),b([c.Property("")],I.prototype,"openIconCss",void 0),b([c.Property(!1)],I.prototype,"opensOnHover",void 0),b([c.Property("BottomRight")],I.prototype,"position",void 0),b([c.Property(!1)],I.prototype,"modal",void 0),b([c.Property("")],I.prototype,"popupTemplate",void 0),b([c.Complex({},vt)],I.prototype,"radialSettings",void 0),b([c.Property("")],I.prototype,"target",void 0),b([c.Property(!0)],I.prototype,"visible",void 0),b([c.Property(!0)],I.prototype,"isPrimary",void 0),b([c.Event()],I.prototype,"beforeClose",void 0),b([c.Event()],I.prototype,"beforeItemRender",void 0),b([c.Event()],I.prototype,"beforeOpen",void 0),b([c.Event()],I.prototype,"created",void 0),b([c.Event()],I.prototype,"clicked",void 0),b([c.Event()],I.prototype,"onClose",void 0),b([c.Event()],I.prototype,"onOpen",void 0);var Et,H=b([c.NotifyPropertyChanges],I);function I(e,t){e=Et.call(this,e,t)||this;return e.isMenuOpen=!1,e.isClock=!0,e.isVertical=!0,e.isControl=!1,e.focusedIndex=-1,e}Ct=function(e,t){return(Ct=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Ct,kt,b=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;0<=l;l--)(n=e[l])&&(r=(o<3?n(r):3<o?n(t,i,r):n(t,i))||r);return 3<o&&r&&Object.defineProperty(t,i,r),r},Lt=function(o,r,l,a){return new(l=l||Promise)(function(e,t){function i(e){try{n(a.next(e))}catch(e){t(e)}}function s(e){try{n(a.throw(e))}catch(e){t(e)}}function n(t){t.done?e(t.value):new l(function(e){e(t.value)}).then(i,s)}n((a=a.apply(o,r||[])).next())})},Pt=function(s,n){var o,r,l,a={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(i){return function(e){var t=[i,e];if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(l=2&t[0]?r.return:t[0]?r.throw||((l=r.return)&&l.call(r),0):r.next)&&!(l=l.call(r,t[1])).done)return l;switch(r=0,(t=l?[2&t[0],l.value]:t)[0]){case 0:case 1:l=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,r=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(l=0<(l=a.trys).length&&l[l.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!l||t[1]>l[0]&&t[1]<l[3]))a.label=t[1];else if(6===t[0]&&a.label<l[1])a.label=l[1],l=t;else{if(!(l&&a.label<l[2])){l[2]&&a.ops.pop(),a.trys.pop();continue}a.label=l[2],a.ops.push(t)}}t=n.call(s,a)}catch(e){t=[6,e],r=0}finally{o=l=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},b=(function(e,t){function i(){this.constructor=e}Ct(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(M,kt=t),M.prototype.wireEvents=function(){c.EventHandler.add(this.element,"click",this.smartPasteBtnClickHandler,this)},M.prototype.unWireEvents=function(){c.EventHandler.remove(this.element,"click",this.smartPasteBtnClickHandler)},M.prototype.smartPasteBtnClickHandler=function(o){return Lt(this,void 0,void 0,function(){var t,i,s,n;return Pt(this,function(e){switch(e.label){case 0:return(t=o.target,t=t.closest("form"))?0===(i=this.getFormFields(t)).length?[2]:[4,this.getClipboardContent().then(function(e){return e})]:[2];case 1:if("Clipboard API not supported"===(s=e.sent())||"Clipboard access failed"===s)return[3,6];e.label=2;case 2:return e.trys.push([2,,5,6]),this.disabled=!0,n=i.map(function(e){return{fieldName:e.fieldName,description:e.description,allowedValues:e.allowedValues,type:e.type}}),n="\nCurrent date: "+(new Date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})+"\n\nEach response line matches the following format:\nFIELD identifier^^^value\n\nGive a response with the following lines only, with values inferred from USER_DATA:\n"+this.formatFields(n)+"\nEND_RESPONSE\n\nDo not explain how the values were determined.\nFor fields without any corresponding information in USER_DATA, use value NO_DATA.",n={messages:[{role:"system",content:n},{role:"user",content:"\nUSER_DATA: "+s+"\n                    "}],temperature:0,topP:1,maxTokens:2e3,frequencyPenalty:.1,presencePenalty:0,stop:["END_RESPONSE"]},"function"!=typeof this.aiAssistHandler?[3,4]:[4,this.aiAssistHandler(n)];case 3:"string"==typeof(n=e.sent())&&""!==n&&this.setFormFields(t,i,n),e.label=4;case 4:return[3,6];case 5:return this.disabled=!1,[7];case 6:return[2]}})})},M.prototype.formatFields=function(e){var i=[];return e.forEach(function(e){var t=[];t.push("\nFIELD "+e.fieldName+"^^^"),e.description&&t.push("The "+e.description),e.allowedValues&&0<e.allowedValues.length?(t.push(" (multiple choice, with allowed values: "),t.push(e.allowedValues.map(function(e){return""+e}).join(",")),t.push(")")):t.push(" of type "+e.type),i.push(t.join(""))}),i.join("")},M.prototype.setFormFields=function(s,e,t){var n=this,o={},i=null;t.split("\n").forEach(function(e){var t;e.startsWith("FIELD ")?2===(t=e.substring("FIELD ".length).split("^^^")).length&&(o[""+t[0]]=t[1],i=t[0]):i&&(o[""+i]+="\n"+e)}),e.forEach(function(e){var t,i=o[e.fieldName];void 0!==i&&"NO_DATA"!==(i=i.trim())&&(e.element instanceof HTMLInputElement&&"radio"===e.element.type?(t=n.findRadioButton(s,e.element.name,i))&&n.updateElementValue(t,"true"):n.updateElementValue(e.element,i))})},M.prototype.findRadioButton=function(t,i,s){var n=this,e=Array.from(t.querySelectorAll("input[type=radio]")).filter(function(e){return e instanceof HTMLInputElement&&e.name===i}).map(function(e){return{elem:e,text:n.getElementDescription(t,e)}}),o=e.find(function(e){return e.text===s});return o?o.elem:1===(o=e.filter(function(e){return e.text&&e.text.includes(s)})).length?o[0].elem:null},M.prototype.triggerBeforeChange=function(e){e.dispatchEvent(new CustomEvent("beforeinput",{bubbles:!0,detail:{fromSmartComponents:!0}}))},M.prototype.triggerAfterChange=function(e){e.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{fromSmartComponents:!0}})),e.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{fromSmartComponents:!0}}))},M.prototype.updateElementValue=function(e,t){var i,s,n,o,r=e.classList.contains("e-control");e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)?(s=null==t?void 0:t.toString().toLowerCase(),e.checked!==(s="true"===s||"yes"===s||"on"===s)&&(this.triggerBeforeChange(e),r?e.ej2_instances[0].checked=s:e.checked=s,this.triggerAfterChange(e))):e instanceof HTMLSelectElement?(i=t.toString(),s=null,0<(o=(n=Array.from(e.querySelectorAll("option"))).filter(function(e){return e.textContent===i})).length?s=n.indexOf(o[0]):1===(o=n.filter(function(e){return e.textContent&&0<=e.textContent.indexOf(i)})).length&&(s=n.indexOf(o[0])),null!==s&&e.selectedIndex!==s&&(this.triggerBeforeChange(e),r?e.ej2_instances[0].index=s:e.selectedIndex=s,this.triggerAfterChange(e))):(this.triggerBeforeChange(e),e.classList.contains("e-rating")||e.classList.contains("e-colorpicker")?e.ej2_instances[0].value=t:e.value=t,this.triggerAfterChange(e)),e.focus()},M.prototype.getFormFields=function(o){var r=this,l=[],a=0;return o.querySelectorAll("input, select, textarea").forEach(function(e){var t,i,s,n;(e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)&&"hidden"!==e.type&&!r.isFieldIgnore(e)&&(t="radio"===e.type,i=t?e.name:e.id||e.name||"unidentified_"+ ++a,!t||!l.find(function(e){return e.fieldName===i}))&&(n=null,t||(n=r.getElementDescription(o,e)))&&(s={fieldName:e.name,description:n,element:e,type:"checkbox"===e.type?"boolean":"number"===e.type?"number":"string"},e instanceof HTMLSelectElement?(n=Array.from(e.querySelectorAll("option")).filter(function(e){return e.value}),s.allowedValues=n.map(function(e){return e.textContent}),s.type="fixed-choices"):t&&(s.allowedValues=[],s.type="fixed-choices",Array.from(o.querySelectorAll("input[type=radio]")).forEach(function(e){e.name===i&&(e=r.getElementDescription(o,e))&&s.allowedValues.push(e)})),l.push(s))}),l},M.prototype.isFieldIgnore=function(e){return e.hasAttribute("data-smartpaste-ignore")||e.hasAttribute("aria-disabled")&&"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||e.hasAttribute("readonly")||e.hasAttribute("aria-readonly")&&"true"===e.getAttribute("aria-readonly")||e.hasAttribute("aria-hidden")&&"true"===e.getAttribute("aria-hidden")},M.prototype.getElementDescription=function(e,t){return t.hasAttribute("data-smartpaste-description")?t.getAttribute("data-smartpaste-description"):(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.placeholder?t.placeholder:(e=e.querySelector('label[for="'+t.id+'"]'))?e.textContent.trim():t.name||t.id},M.prototype.getClipboardContent=function(){return Lt(this,void 0,void 0,function(){var t,i;return Pt(this,function(e){switch(e.label){case 0:return(t=navigator,(i=document.getElementById("custom-clipboard"))&&i.value)?[2,i.value]:[3,1];case 1:if("undefined"==typeof window||!t.clipboard||!t.clipboard.readText)return[3,6];e.label=2;case 2:return e.trys.push([2,4,,5]),[4,t.clipboard.readText()];case 3:return[2,e.sent()];case 4:return e.sent(),[2,"Clipboard access failed"];case 5:return[3,7];case 6:return[2,"Clipboard API not supported"];case 7:return[2]}})})},b([c.Property()],M.prototype,"aiAssistHandler",void 0),M);function M(e,t){return kt.call(this,e,t)||this}e.BeforeChangeEventArgs=U,e.Button=t,e.CheckBox=s,e.Chip=Ce,e.ChipList=y,e.Fab=Te,e.RadialSettings=vt,e.RadioButton=p,e.SmartPasteButton=b,e.SpeedDial=H,e.SpeedDialAnimationSettings=L,e.SpeedDialItem=bt,e.Switch=m,e.buttonObserver=r,e.classNames=E,e.createCheckBox=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i={});var s=e("div",{className:"e-checkbox-wrapper e-css"}),t=(i.cssClass&&c.addClass([s],i.cssClass.split(" ")),i.enableRtl&&s.classList.add("e-rtl"),t&&(t=e("span",{className:"e-ripple-container"}),c.rippleEffect(t,{isCenterRipple:!0,duration:400}),s.appendChild(t)),e("span",{className:"e-frame e-icons"}));return i.checked&&t.classList.add("e-check"),s.appendChild(t),i.label&&(t=e("span",{className:"e-label"}),i.disableHtmlEncode?t.textContent=i.label:t.innerHTML=i.label,s.appendChild(t)),s},e.destroy=B,e.getTextNode=D,e.preRender=j,e.rippleMouseHandler=n,e.setHiddenInput=F,e.wrapperInitialize=o,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-buttons.umd.min.js.map