UNPKG

@syncfusion/ej2-popups

Version:

A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups.

10 lines 108 kB
/*! * filename: ej2-popups.umd.min.js * version : 31.1.20 * 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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons"],e):e((t=t||self).ej={},t.ej2Base,t.ej2Buttons)}(this,function(t,L,M){"use strict";var l,r,a,h,u,f,I=!1;function A(t,e){var i=!1,o={left:0,top:0},n=t;if(t&&e){for(L.isNullOrUndefined(e.offsetParent)&&"fixed"===e.style.position&&(i=!0);(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;for(t=n;(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left-=t.scrollLeft,o.top-=t.scrollTop,t=t.parentElement}return o}function m(t,e,i,o,n){if(r=void 0,r=n,I=!!o,!t)return{left:0,top:0};i=i||"top",h=t.ownerDocument,a=t;var n=(e=e||"left").toLowerCase(),o=i.toLowerCase(),s={left:0,top:0};switch(l=a.getBoundingClientRect(),o+n){case"topcenter":d(V(),s),p(F(),s);break;case"topright":d(W(),s),p(F(),s);break;case"centercenter":d(V(),s),p(X(),s);break;case"centerright":d(W(),s),p(X(),s);break;case"centerleft":d(q(),s),p(X(),s);break;case"bottomcenter":d(V(),s),p(j(),s);break;case"bottomright":d(W(),s),p(j(),s);break;case"bottomleft":d(q(),s),p(j(),s);break;default:d(q(),s),p(F(),s)}return a=null,s}function d(t,e){e.left=t}function p(t,e){e.top=t}function D(){return h.documentElement.scrollTop||h.body.scrollTop}function Y(){return h.documentElement.scrollLeft||h.body.scrollLeft}function j(){return I?l.bottom:l.bottom+D()}function X(){return F()+l.height/2}function F(){return I?l.top:l.top+D()}function q(){return l.left+Y()}function W(){var t=a&&((a.classList.contains("e-date-wrapper")||a.classList.contains("e-datetime-wrapper"))&&a.classList.contains("e-rtl")||a.classList.contains("e-ddl")&&a.classList.contains("e-rtl")||a.classList.contains("e-date-range-wrapper"))?r?r.width:0:r&&l.width>=r.width?r.width:0;return a&&a.classList.contains("e-rtl")&&a.classList.contains("e-multiselect")&&(t=r.width),l.right+Y()-t}function V(){return q()+l.width/2}function _(t,e,i,o){var n,s,l,r;return void 0===e&&(e=null),(i=void 0===i?{X:!1,Y:!1}:i).Y||i.X?(n=t.getBoundingClientRect(),f=e,u=t.ownerDocument,o=o||m(t,"left","top"),i.X&&(e=(f?et:ct)(),t=lt(),s=rt(),l=t-o.left,r=o.left+n.width-s,n.width>e?o.left=0<l&&r<=0||!(0<r&&l<=0)&&r<l?s-n.width:t:0<l?o.left+=l:0<r&&(o.left-=r)),i.Y&&(e=(f?it:pt)(),s=st(),t=at(),l=s-o.top,r=o.top+n.height-t,n.height>e?o.top=0<l&&r<=0||!(0<r&&l<=0)&&r<l?t-n.height:s:0<l?o.top+=l:0<r&&(o.top-=r)),o):{left:0,top:0}}function Z(t,e,i,o){void 0===e&&(e=null);var n=m(t,"left","top"),i=(i&&(n.left=i),o&&(n.top=o),[]),o=(f=e,u=t.ownerDocument,t.getBoundingClientRect()),e=n.top,t=n.left,s=n.left+o.width,e=tt(e,n.top+o.height),n=$(t,s);return e.topSide&&i.push("top"),n.rightSide&&i.push("right"),n.leftSide&&i.push("left"),e.bottomSide&&i.push("bottom"),i}function G(t,e,i,o,n,s,l,r,a){var h,d,p,c;void 0===l&&(l=null),void 0===r&&(r={X:!0,Y:!0}),e&&t&&n&&s&&(r.X||r.Y)&&(h={TL:null,TR:null,BL:null,BR:null},c={TL:null,TR:null,BL:null,BR:null},"none"===window.getComputedStyle(t).display?(p=t.style.visibility,t.style.visibility="hidden",t.style.display="block",d=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=p):d=t.getBoundingClientRect(),f=l,u=e.ownerDocument,p=h,l=d,(n={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}}).position=m(s=e,n.posX,n.posY,i=a,l),p.TL=m(s,"left","top",i,l),p.TR=m(s,"right","top",i,l),p.BR=m(s,"left","bottom",i,l),p.BL=m(s,"right","bottom",i,l),Q(c,n,d),r.X&&function t(e,i,o,n,s,l){var r=$(i.TL.left,i.TR.left);o.TL.left-dt()<=lt()&&(r.leftSide=!1);o.TR.left>rt()&&(r.rightSide=!1);(r.leftSide&&!r.rightSide||!r.leftSide&&r.rightSide)&&("right"===n.posX?n.posX="left":n.posX="right",n.offsetX=n.offsetX+s.width,n.offsetX=-1*n.offsetX,n.position=m(e,n.posX,n.posY,!1),Q(i,n,s),l)&&t(e,i,o,n,s,!1)}(e,c,h,n,d,!0),r.Y&&-1<h.TL.top&&function t(e,i,o,n,s,l){var r=tt(i.TL.top,i.BL.top);o.TL.top-ht()<=st()&&(r.topSide=!1);o.BL.top>=at()&&e.getBoundingClientRect().bottom<window.innerHeight&&(r.bottomSide=!1);(r.topSide&&!r.bottomSide||!r.topSide&&r.bottomSide)&&("top"===n.posY?n.posY="bottom":n.posY="top",n.offsetY=n.offsetY+s.height,n.offsetY=-1*n.offsetY,n.position=m(e,n.posX,n.posY,!1,s),Q(i,n,s),l)&&t(e,i,o,n,s,!1)}(e,c,h,n,d,!0),o=n,a=d,i=s=0,null==(l=t).offsetParent||"absolute"!==getComputedStyle(l.offsetParent).position&&"relative"!==getComputedStyle(l.offsetParent).position||(a=m(l.offsetParent,"left","top",!1,a),s=a.left,i=a.top),r=a=1,(e=J(l))&&("none"!==(c=getComputedStyle(e).transform)&&(c=new DOMMatrix(c),a=c.a,r=c.d),"none"!==getComputedStyle(e).zoom)&&(c=K(document.body),a*=c,r*=c),l.style.top=o.position.top/r+o.offsetY-i/r+"px",l.style.left=o.position.left/a+o.offsetX-s/a+"px")}function K(t){t=getComputedStyle(t).zoom;return parseFloat(t)||1}function J(t){for(;t;){var e=window.getComputedStyle(t).transform,i=K(document.body);if(e&&"none"!==e||i&&1!==i)return t;if(t===document.body)return null;t=t.offsetParent||t.parentElement}return null}function Q(t,e,i){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+i.width},t.BL={top:t.TL.top+i.height,left:t.TL.left},t.BR={top:t.TL.top+i.height,left:t.TL.left+i.width}}function $(t,e){var i=!1,o=!1;return{leftSide:i=t-dt()<lt()?!0:i,rightSide:o=e>rt()?!0:o}}function tt(t,e){var i=!1,o=!1;return{topSide:i=t-ht()<st()?!0:i,bottomSide:o=e>at()?!0:o}}function et(){return f.getBoundingClientRect().width}function it(){return f.getBoundingClientRect().height}function ot(){return f.getBoundingClientRect().left}function nt(){return f.getBoundingClientRect().top}function st(){return f?nt():0}function lt(){return f?ot():0}function rt(){return f?dt()+ot()+et():dt()+ct()}function at(){return f?ht()+nt()+it():ht()+pt()}function ht(){return u.documentElement.scrollTop||u.body.scrollTop}function dt(){return u.documentElement.scrollLeft||u.body.scrollLeft}function pt(){return window.innerHeight}function ct(){var t=window.innerWidth,e=document.documentElement.getBoundingClientRect();return t-(t-(L.isNullOrUndefined(document.documentElement)?0:e.width))}function ut(){u=f=null}ft=function(t,e){return(ft=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};var ft,mt,e=function(t,e){function i(){this.constructor=t}ft(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},i=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;0<=r;r--)(n=t[r])&&(l=(s<3?n(l):3<s?n(e,i,l):n(e,i))||l);return 3<s&&l&&Object.defineProperty(e,i,l),l},gt=(mt=L.ChildProperty,e(yt,mt),i([L.Property("left")],yt.prototype,"X",void 0),i([L.Property("top")],yt.prototype,"Y",void 0),yt);function yt(){return null!==mt&&mt.apply(this,arguments)||this}var vt,bt="e-popup",Et="e-rtl",o="e-popup-open",n="e-popup-close",Ct=(vt=L.Component,e(s,vt),s.prototype.onPropertyChanged=function(t,e){for(var i=0,o=Object.keys(t);i<o.length;i++)switch(o[i]){case"width":L.setStyleAttribute(this.element,{width:L.formatUnit(t.width)});break;case"height":L.setStyleAttribute(this.element,{height:L.formatUnit(t.height)});break;case"zIndex":L.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var n=t.offsetX-e.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+n).toString()+"px";break;case"offsetY":n=t.offsetY-e.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+n).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}},s.prototype.getModuleName=function(){return"popup"},s.prototype.resolveCollision=function(){this.checkCollision()},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(bt,Et,o,n),this.content=null,this.relateTo=null,ut(),vt.prototype.destroy.call(this)},s.prototype.render=function(){this.element.classList.add(bt);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=L.formatUnit(this.width)),"auto"!==this.height&&(t.height=L.formatUnit(this.height)),L.setStyleAttribute(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},s.prototype.wireEvents=function(){L.Browser.isDevice&&L.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},s.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];L.EventHandler.add(i,"scroll",this.scrollRefresh,this)}},s.prototype.unwireEvents=function(){L.Browser.isDevice&&L.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},s.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];L.EventHandler.remove(i,"scroll",this.scrollRefresh)}},s.prototype.getRelateToElement=function(){var t=""===this.relateTo||L.isNullOrUndefined(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},s.prototype.scrollRefresh=function(t){"reposition"===this.actionOnScroll?L.isNullOrUndefined(this.element)||this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()&&((t=this.isElementOnViewport(this.getRelateToElement(),t.target))||this.targetInvisibleStatus?t&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0))},s.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},s.prototype.isElementVisible=function(t,e){var i,o,n,s,l,r,a,h=this.checkGetBoundingClientRect(t);return!(!h.height||!h.width)&&(L.isNullOrUndefined(this.checkGetBoundingClientRect(e))?(i=(a=window).scrollY,o=a.scrollX,n=a.scrollX+a.outerWidth,a=a.scrollY+a.outerHeight,s=(t=m(t)).top,l=t.left,r=t.left+h.width,t=t.top+h.height,0<a-s&&0<n-l&&0<r-o&&0<t-i):(a=e.getBoundingClientRect(),!(h.bottom<a.top||h.bottom>a.bottom||h.right>a.right||h.left<a.left)))},s.prototype.preRender=function(){},s.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(Et):this.element.classList.remove(Et)},s.prototype.setContent=function(){var t,e;L.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:(t=this.getRelateToElement(),e=this.content.props,t.classList.contains("e-dropdown-btn")&&!L.isNullOrUndefined(e)||this.element.appendChild(this.content)))},s.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},s.prototype.refreshPosition=function(t,e){L.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),e||this.checkCollision()},s.prototype.reposition=function(){var t,e,i,o,n=this.getRelateToElement();"number"==typeof this.position.X&&"number"==typeof this.position.Y?t={left:this.position.X,top:this.position.Y}:"string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y?(e=void 0,o=this.element.style.display,this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(e=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),i=this.getAnchorPosition(n,this.element,this.position,this.offsetX,this.offsetY),t="string"==typeof this.position.X?{left:i.left,top:this.position.Y}:{left:this.position.X,top:i.top},this.element.style.display=o,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=e)):n?(i=this.element.clientHeight,o=this.element.style.display,this.element.style.display="block",t=this.getAnchorPosition(n,this.element,this.position,this.offsetX,this.offsetY,i),this.element.style.display=o):t={left:0,top:0},L.isNullOrUndefined(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},s.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},s.prototype.getAnchorPosition=function(t,e,i,o,n,s){void 0===s&&(s=0);var l=this.checkGetBoundingClientRect(e),r=this.checkGetBoundingClientRect(t);if(L.isNullOrUndefined(l)||L.isNullOrUndefined(r))return null;var a,h,d,p=t,c={left:0,top:0},c=e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?m(t):A(p,e=e.classList.contains("e-dlg-modal")&&"BODY"!==p.tagName?e.parentElement:e);switch(i.X){default:case"left":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.left+=window.innerWidth/2-l.width/2:"container"===this.targetType?c.left+=r.width/2-l.width/2:c.left+=r.width/2;break;case"right":e.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.left+=window.innerWidth-l.width:"container"===this.targetType?(d=1,(a=J(e))&&("none"!==(h=getComputedStyle(a).transform)&&(d=new DOMMatrix(h).a),"none"!==getComputedStyle(a).zoom)&&(d*=K(document.body)),c.left+=(r.width-l.width)/d):c.left+=r.width}switch(i.Y){default:case"top":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight/2-l.height/2:"container"===this.targetType?c.top+=r.height/2-l.height/2:c.top+=r.height/2;break;case"bottom":e.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight-l.height:"container"!==this.targetType||e.classList.contains("e-dialog")?"container"===this.targetType&&e.classList.contains("e-dialog")?c.top+=r.height-s:c.top+=r.height:c.top+=r.height-l.height}return c.left+=o,c.top+=n,c},s.prototype.callFlip=function(t){var e=this.getRelateToElement();G(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},s.prototype.callFit=function(t){if(0!==Z(this.element,this.viewPortElement).length)if(L.isNullOrUndefined(this.viewPortElement)){var e=_(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=e.left+"px"),t.Y&&(this.element.style.top=e.top+"px")}else{var e=this.checkGetBoundingClientRect(this.element),i=this.checkGetBoundingClientRect(this.viewPortElement);if(L.isNullOrUndefined(e)||L.isNullOrUndefined(i))return null;t&&!0===t.Y&&(i.top>e.top?this.element.style.top="0px":i.bottom<e.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(e.bottom-i.bottom)+"px")),t&&!0===t.X&&(i.right<e.right?this.element.style.left=parseInt(this.element.style.left,10)-(e.right-i.right)+"px":i.left>e.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(i.left-e.left)+"px"))}},s.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},s.prototype.show=function(t,e){var i=this;this.wireEvents(),this.getRelateToElement(),1e3!==this.zIndex&&L.isNullOrUndefined(e)||(e=L.isNullOrUndefined(e)?this.element:e,this.zIndex=wt(e),L.setStyleAttribute(this.element,{zIndex:this.zIndex})),t=L.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(L.removeClass([this.element],n),L.addClass([this.element],o),this.checkCollision(),L.removeClass([this.element],o),L.addClass([this.element],n)),L.isNullOrUndefined(t)?(L.removeClass([this.element],n),L.addClass([this.element],o),this.trigger("open")):(t.begin=function(){i.isDestroyed||(L.removeClass([i.element],n),L.addClass([i.element],o))},t.end=function(){i.isDestroyed||i.trigger("open")},new L.Animation(t).animate(this.element))},s.prototype.hide=function(t){var e=this;t=L.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,L.isNullOrUndefined(t)?(L.removeClass([this.element],o),L.addClass([this.element],n),this.trigger("close")):(t.end=function(){e.isDestroyed||(L.removeClass([e.element],o),L.addClass([e.element],n),e.trigger("close"))},new L.Animation(t).animate(this.element)),this.unwireEvents()},s.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),Ot(t,this.fixedParent)},s.prototype.checkFixedParent=function(t){for(var e=t.parentElement;e&&"HTML"!==e.tagName;){var i=getComputedStyle(e);"fixed"!==i.position&&"sticky"!==i.position||L.isNullOrUndefined(this.element)||!this.element.offsetParent||"BODY"!==this.element.offsetParent.tagName||"hidden"===getComputedStyle(this.element.offsetParent).overflow||(this.element.style.top=window.scrollY>parseInt(this.element.style.top,10)?L.formatUnit(window.scrollY-parseInt(this.element.style.top,10)):L.formatUnit(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),e=e.parentElement,!L.isNullOrUndefined(this.element)&&L.isNullOrUndefined(this.element.offsetParent)&&"fixed"===i.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},i([L.Property("auto")],s.prototype,"height",void 0),i([L.Property("auto")],s.prototype,"width",void 0),i([L.Property(null)],s.prototype,"content",void 0),i([L.Property("container")],s.prototype,"targetType",void 0),i([L.Property(null)],s.prototype,"viewPortElement",void 0),i([L.Property({X:"none",Y:"none"})],s.prototype,"collision",void 0),i([L.Property("")],s.prototype,"relateTo",void 0),i([L.Complex({},gt)],s.prototype,"position",void 0),i([L.Property(0)],s.prototype,"offsetX",void 0),i([L.Property(0)],s.prototype,"offsetY",void 0),i([L.Property(1e3)],s.prototype,"zIndex",void 0),i([L.Property(!1)],s.prototype,"enableRtl",void 0),i([L.Property("reposition")],s.prototype,"actionOnScroll",void 0),i([L.Property(null)],s.prototype,"showAnimation",void 0),i([L.Property(null)],s.prototype,"hideAnimation",void 0),i([L.Event()],s.prototype,"open",void 0),i([L.Event()],s.prototype,"close",void 0),i([L.Event()],s.prototype,"targetExitViewport",void 0),i([L.NotifyPropertyChanges],s));function s(t,e){return vt.call(this,e,t)||this}function Ot(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var l=getComputedStyle(s);"absolute"===i.position&&"static"===l.position||!n.test(l.overflow+l.overflowY+l.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function wt(t){for(var e=t.parentElement,i=[];e&&"BODY"!==e.tagName;){var o=document.defaultView.getComputedStyle(e,null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(e,null).getPropertyValue("position");"auto"!==o&&"static"!==n&&i.push(o),e=e.parentElement}for(var s=[],l=0;l<document.body.children.length;l++)t.isEqualNode(document.body.children[l])||(o=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("position"),"auto"!==o&&"static"!==n&&s.push(o));s.push("999");var r=[];if(!L.isNullOrUndefined(t.parentElement)&&"BODY"!==t.parentElement.tagName)for(var a=[].slice.call(t.parentElement.children),l=0;l<a.length;l++)t.isEqualNode(a[l])||(o=document.defaultView.getComputedStyle(a[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(a[l],null).getPropertyValue("position"),"auto"!==o&&"static"!==n&&r.push(o));var h=i.concat(s,r),h=Math.max.apply(Math,h)+1;return 2147483647<h?2147483647:h}var c,g,y,v,Nt,b,E,C,Tt=["north-west","north","north-east","west","east","south-west","south","south-east"],Pt="e-resize-handle",O="e-focused-handle",St="e-dlg-resizable",xt=["e-restrict-left"],Ut="e-resize-viewport",Ht=["north","west","east","south"],Bt=0,kt=0,Mt=0,Lt=0,Rt=0,zt=0,w=null,It=null,At=null,Dt=0,Yt=!0,jt=0,Xt=!0;function Ft(t){w=t.resizeBegin,It=t.resizing,At=t.resizeComplete,c=qt(t.element),E=qt(t.boundary);for(var e,i,o=t.direction.split(" "),n=0;n<o.length;n++)0<=Ht.indexOf(o[n])&&o[n]?(e=i=void 0,i=o[n],Gt(),(e=L.createElement("span",{attrs:{unselectable:"on",contenteditable:"false"}})).setAttribute("class","e-dialog-border-resize e-"+i),"south"===i&&(e.style.height="2px",e.style.width="100%",e.style.bottom="0px",e.style.left="0px"),"north"===i&&(e.style.height="2px",e.style.width="100%",e.style.top="0px",e.style.left="0px"),"east"===i&&(e.style.height="100%",e.style.width="2px",e.style.right="0px",e.style.top="0px"),"west"===i&&(e.style.height="100%",e.style.width="2px",e.style.left="0px",e.style.top="0px"),c.appendChild(e)):""!==o[n].trim()&&(i=L.createElement("div",{className:"e-icons "+Pt+" e-"+o[n]}),c.appendChild(i));y=t.minHeight,Nt=t.minWidth,b=t.maxWidth,v=t.maxHeight,Dt++,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?Wt(t.proxy):Wt()}function qt(t){var e;return e=L.isNullOrUndefined(t)?e:"string"==typeof t?document.querySelector(t):t}function Wt(t){for(var e=t||this,i=c.querySelectorAll("."+Pt),o=0;o<i.length;o++){g=i[o],L.EventHandler.add(g,"mousedown",_t,e);var n="msie"===L.Browser.info.name?"pointerdown":"touchstart";L.EventHandler.add(g,n,Kt,e)}var s=c.querySelectorAll(".e-dialog-border-resize");if(!L.isNullOrUndefined(s))for(o=0;o<s.length;o++){g=s[o],L.EventHandler.add(g,"mousedown",_t,e);n="msie"===L.Browser.info.name?"pointerdown":"touchstart";L.EventHandler.add(g,n,Kt,e)}}function Vt(t){return-1<t.indexOf("mouse")?"mouse":"touch"}function _t(t){if(t.preventDefault(),c=t.target.parentElement,Gt(),Rt=t.pageX,zt=t.pageY,t.target.classList.add(O),!L.isNullOrUndefined(w))if(!0===w(t,this))return;this.targetEle&&c&&c.querySelector("."+St)&&(E="body"===this.target?null:this.targetEle,b=this.targetEle.clientWidth,v=this.targetEle.clientHeight);t=L.isNullOrUndefined(E)?document:E;L.EventHandler.add(t,"mousemove",Jt,this),L.EventHandler.add(document,"mouseup",Zt,this);for(var e=0;e<xt.length;e++)Yt=!c.classList.contains(xt[e])}function Zt(t){var e="msie"===L.Browser.info.name?"pointermove":"touchmove",i="msie"===L.Browser.info.name?"pointerup":"touchend",o=L.isNullOrUndefined(E)?document:E,n="msie"===L.Browser.info.name?"pointerdown":"touchstart";L.EventHandler.remove(o,"mousemove",Jt),L.EventHandler.remove(o,e,Jt),L.EventHandler.remove(o,n,Jt),L.isNullOrUndefined(document.body.querySelector("."+O))||document.body.querySelector("."+O).classList.remove(O),L.isNullOrUndefined(At)||At(t,this),L.EventHandler.remove(document,"mouseup",Zt),L.EventHandler.remove(document,i,Zt)}function Gt(){Bt=parseFloat(getComputedStyle(c,null).getPropertyValue("width").replace("px","")),kt=parseFloat(getComputedStyle(c,null).getPropertyValue("height").replace("px","")),Mt=c.getBoundingClientRect().left,Lt=c.getBoundingClientRect().top}function Kt(t){c=t.target.parentElement,Gt();var e=c.classList.contains("e-dialog"),e=((t.target.classList.contains(Pt)||t.target.classList.contains("e-dialog-border-resize"))&&e&&t.target.classList.add(O),t.touches?t.changedTouches[0]:t);if(Rt=e.pageX,zt=e.pageY,!L.isNullOrUndefined(w))if(!0===w(t,this))return;var e="msie"===L.Browser.info.name?"pointermove":"touchmove",t="msie"===L.Browser.info.name?"pointerup":"touchend",i=L.isNullOrUndefined(E)?document:E;L.EventHandler.add(i,e,Jt,this),L.EventHandler.add(document,t,Zt,this)}function Jt(t){if(t.target.classList.contains(Pt)&&t.target.classList.contains(O)?g=t.target:L.isNullOrUndefined(document.body.querySelector("."+O))||(g=document.body.querySelector("."+O)),!L.isNullOrUndefined(g)){for(var e="",i=0;i<Tt.length;i++)g.classList.contains("e-"+Tt[i])&&(e=Tt[i]);switch(L.isNullOrUndefined(It)||It(t,this),e){case"south":Qt(t);break;case"north":$t(t);break;case"west":te(t);break;case"east":ee(t);break;case"south-east":Qt(t),ee(t);break;case"south-west":Qt(t),te(t);break;case"north-east":$t(t),ee(t);break;case"north-west":$t(t),te(t)}}}function N(t){return t.getBoundingClientRect()}function Qt(t){var e=document.documentElement.clientHeight,i=!1,t=(t.touches?t.changedTouches[0]:t).pageY,o=N(c);L.isNullOrUndefined(E)||(s=N(E)),(!L.isNullOrUndefined(E)||L.isNullOrUndefined(E)&&(0<=e-t||o.top<0))&&(i=!0);var t=y<(t=kt+(t-zt))?t:y,n=0,s=(L.isNullOrUndefined(E)||(n=s.top),L.isNullOrUndefined(E)?0:E.offsetHeight-E.clientHeight),n=(n=o.top-n-s/2)<0?0:n;if(0<o.top&&v<n+t)return i=!1,c.classList.contains(Ut)?void 0:void(c.style.height=v-parseInt(n.toString(),10)+"px");s=0;i&&((t=o.top<0&&0<e+(o.height+o.top)&&t+(s=o.top)<=30?o.height-(o.height+o.top)+30:t)+o.top>=v&&(c.style.height=o.height+(e-(o.height+o.top))+"px"),i=L.isNullOrUndefined(E)?s:n,y<=t)&&t+i<=v&&(c.style.height=t+"px")}function $t(t){var e,i=!1,t=("mouse"===Vt(t.type)?t:t.touches[0]).pageY,o=N(c),n=L.isNullOrUndefined(E)?0:E.offsetHeight-E.clientHeight,o=(L.isNullOrUndefined(E)||(e=N(E)),(!L.isNullOrUndefined(E)&&0<o.top-e.top||L.isNullOrUndefined(E)&&0<t||!L.isNullOrUndefined(E)&&Math.floor(o.top-e.top+o.height+(e.bottom-o.bottom))-n<=v)&&(i=!0),kt-(t-zt));i&&y<=o&&o<=v&&(n=0,L.isNullOrUndefined(E)||(n=e.top),i=0<(i=Lt-n+(t-zt))?i:1,c.style.height=o+"px",c.style.top=i+"px")}function te(t){var e,i=document.documentElement.clientWidth,o=!1,t=(L.isNullOrUndefined(E)||(e=N(E)),("mouse"===Vt(t.type)?t:t.touches[0]).pageX),n=N(c),s=L.isNullOrUndefined(E)?0:E.offsetWidth-E.clientWidth,l=L.isNullOrUndefined(E)?0:e.left,r=L.isNullOrUndefined(E)?0:e.width,i=(L.isNullOrUndefined(C)&&(L.isNullOrUndefined(E)?C=i:(C=n.left-l-s/2+n.width,C+=r-s-C)),(!L.isNullOrUndefined(E)&&Math.floor(n.left-e.left+n.width+(e.right-n.right))-s<=b||L.isNullOrUndefined(E)&&0<=t)&&(o=!0),Bt-(t-Rt));Yt&&(i=C<i?C:i),o&&Nt<=i&&i<=b&&(l=0,L.isNullOrUndefined(E)||(l=e.left),r=0<(r=Mt-l+(t-Rt))?r:1,i!==jt&&Xt&&(c.style.width=i+"px"),Yt)&&(c.style.left=r+"px",Xt=1!=r),jt=i}function ee(t){var e,i=document.documentElement.clientWidth,o=!1;L.isNullOrUndefined(E)||(e=N(E));var t=(t.touches?t.changedTouches[0]:t).pageX,n=N(c),i=((!L.isNullOrUndefined(E)&&(n.left-e.left+n.width<=b||n.right-e.left>=n.width)||L.isNullOrUndefined(E)&&0<i-t)&&(o=!0),Bt+(t-Rt)),t=0;if(L.isNullOrUndefined(E)||(t=e.left),n.left-t+i>b){if(o=!1,c.classList.contains(Ut))return;c.style.width=b-(n.left-t)+"px"}o&&Nt<=i&&i<=b&&(c.style.width=i+"px")}function ie(){for(var t=c.querySelectorAll("."+Pt),e=0;e<t.length;e++)L.detach(t[e]);var i=c.querySelectorAll(".e-dialog-border-resize");if(!L.isNullOrUndefined(i))for(e=0;e<i.length;e++)L.detach(i[e])}oe=function(t,e){return(oe=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};var oe,ne,e=function(t,e){function i(){this.constructor=t}oe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},i=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;0<=r;r--)(n=t[r])&&(l=(s<3?n(l):3<s?n(e,i,l):n(e,i))||l);return 3<s&&l&&Object.defineProperty(e,i,l),l},se=(ne=L.ChildProperty,e(T,ne),i([L.Property(!0)],T.prototype,"isFlat",void 0),i([L.Property()],T.prototype,"buttonModel",void 0),i([L.Property("Button")],T.prototype,"type",void 0),i([L.Event()],T.prototype,"click",void 0),T);function T(){return null!==ne&&ne.apply(this,arguments)||this}le=L.ChildProperty,e(ae,le),i([L.Property("Fade")],ae.prototype,"effect",void 0),i([L.Property(400)],ae.prototype,"duration",void 0),i([L.Property(0)],ae.prototype,"delay",void 0);var le,re=ae;function ae(){return null!==le&&le.apply(this,arguments)||this}var he,de="e-dialog",pe="e-rtl",ce="e-dlg-header-content",ue="e-dlg-header",fe="e-footer-content",me="e-dlg-modal",ge="e-icon-dlg-close",P="e-dlg-target",S="e-scroll-disabled",ye="e-device",ve="e-dlg-fullscreen",be="e-dlg-closeicon-btn",Ee="e-popup-open",Ce="Information",Oe="e-scroll-disabled",we="e-alert-dialog",Ne="e-confirm-dialog",Te="e-dlg-resizable",x="e-restrict-left",Pe="e-resize-viewport",Se="user action",xe=(he=L.Component,e(U,he),U.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=L.formatUnit(this.minHeight)),this.enableResize&&(this.setResize(),this.isModal&&(this.isModelResize=!0),"None"===this.animationSettings.effect)&&this.getMinHeight(),this.renderComplete()},U.prototype.initializeValue=function(){this.dlgClosedBy=Se},U.prototype.preRender=function(){var t,e=this;this.initializeValue(),this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(t){e.dlgClosedBy="close icon",e.hide(t)},this.dlgOverlayClickEventHandler=function(t){e.dlgClosedBy="overlayClick",t.preventFocus=!1,e.trigger("overlayClick",t,function(t){t.preventFocus||e.focusContent(),e.dlgClosedBy=Se})};this.l10n=new L.L10n("dialog",{close:"Close"},this.locale),this.checkPositionData(),L.isNullOrUndefined(this.target)&&(t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=t)},U.prototype.updatePersistData=function(){this.enablePersistence&&this.setProperties({width:parseFloat(this.element.style.width),height:parseFloat(this.element.style.height),position:{X:parseFloat(this.dragObj.element.style.left),Y:parseFloat(this.dragObj.element.style.top)}},!0)},U.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},U.prototype.checkPositionData=function(){var t;L.isNullOrUndefined(this.position)||(L.isNullOrUndefined(this.position.X)||"number"==typeof this.position.X||this.isNumberValue(this.position.X)&&(t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=t),L.isNullOrUndefined(this.position.Y))||"number"==typeof this.position.Y||this.isNumberValue(this.position.Y)&&(t=this.isProtectedOnChange,this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=t)},U.prototype.getEle=function(t,e){for(var i=void 0,o=0;o<t.length;o++)if(t[o].classList.contains(e)){i=t[o];break}return i},U.prototype.getMinHeight=function(){var t="0px",e="0px",i=(L.isNullOrUndefined(this.element.querySelector("."+ce))||(t=getComputedStyle(this.headerContent).height),this.getEle(this.element.children,fe)),i=(L.isNullOrUndefined(i)||(e=getComputedStyle(i).height),parseInt(t.slice(0,t.indexOf("p")),10)),t=parseInt(e.slice(0,e.indexOf("p")),10);return e=i+30+(isNaN(t)?0:t),y=e,i+30+t},U.prototype.onResizeStart=function(t,e){return e.trigger("resizeStart",t),!t.cancel&&this.isModelResize&&!L.isNullOrUndefined(this.dlgContainer)&&this.dlgContainer.classList.contains("e-dlg-"+this.position.X+"-"+this.position.Y)&&(this.setPopupPosition(),this.dlgContainer.classList.remove("e-dlg-"+this.position.X+"-"+this.position.Y),(e=this.getTargetContainer(this.target))instanceof Element&&"rtl"===window.getComputedStyle(e).getPropertyValue("direction")?this.element.style.position="absolute":this.element.style.position="relative",this.element.classList.contains(x)&&this.element.classList.remove(x),this.isModelResize=!1),t.cancel},U.prototype.onResizing=function(t,e){e.trigger("resizing",t)},U.prototype.onResizeComplete=function(t,e){e.trigger("resizeStop",t),this.updatePersistData()},U.prototype.setResize=function(){if(this.enableResize){this.element.classList.add(Te);for(var t=getComputedStyle(this.element).minHeight,e=getComputedStyle(this.element).minWidth,i="",o=0;o<this.resizeHandles.length;o++){if("All"===this.resizeHandles[o]){i="south north east west north-east north-west south-east south-west";break}var n="";switch(this.resizeHandles[o].toString()){case"SouthEast":n="south-east";break;case"SouthWest":n="south-west";break;case"NorthEast":n="north-east";break;case"NorthWest":n="north-west";break;default:n=this.resizeHandles[o].toString()}i+=n.toLocaleLowerCase()+" "}this.enableRtl&&"south-east"===i.trim()?i="south-west":this.enableRtl&&"south-west"===i.trim()&&(i="south-east"),this.isModal&&this.enableRtl?this.element.classList.add(x):this.isModal&&this.target===document.body&&this.element.classList.add(Pe),Ft({element:this.element,direction:i,minHeight:parseInt(t.slice(0,e.indexOf("p")),10),maxHeight:this.targetEle.clientHeight,minWidth:parseInt(e.slice(0,e.indexOf("p")),10),maxWidth:this.targetEle.clientWidth,boundary:this.target===document.body?null:this.targetEle,resizeBegin:this.onResizeStart.bind(this),resizeComplete:this.onResizeComplete.bind(this),resizing:this.onResizing.bind(this),proxy:this}),this.wireWindowResizeEvent()}else ie(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove(x):this.element.classList.remove(Pe),this.element.classList.remove(Te)},U.prototype.getFocusElement=function(t){t=t.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:t[t.length-1]}},U.prototype.keyDown=function(t){var e,i,o=this,n=(9===t.keyCode&&this.isModal&&(n=void 0,L.isNullOrUndefined(this.btnObj)||(n=this.btnObj[this.btnObj.length-1]),L.isNullOrUndefined(this.btnObj)&&!L.isNullOrUndefined(this.ftrTemplateContent)&&(n=this.getFocusElement(this.ftrTemplateContent)),L.isNullOrUndefined(this.btnObj)&&L.isNullOrUndefined(this.ftrTemplateContent)&&!L.isNullOrUndefined(this.contentEle)&&(n=this.getFocusElement(this.contentEle)),L.isNullOrUndefined(n)||document.activeElement!==n.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element))&&t.shiftKey&&(t.preventDefault(),L.isNullOrUndefined(n)||n.element.focus()),document.activeElement),s=-1<["input","textarea"].indexOf(n.tagName.toLowerCase()),l=!1;s||(l=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.dlgClosedBy="escape",e=document.querySelector(".e-popup-open:not(.e-dialog)"),L.isNullOrUndefined(e)||e.classList.contains("e-toolbar-pop")||e.classList.contains("e-slider-tooltip"))&&this.hide(t),(13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!L.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||l)&&!L.isNullOrUndefined(this.primaryButtonEle))&&this.buttons.some(function(t,e){i=e;e=t.buttonModel;return!L.isNullOrUndefined(e)&&!0===e.isPrimary})&&"function"==typeof this.buttons[i].click&&!this.primaryButtonEle.disabled&&setTimeout(function(){o.buttons[i].click.call(o,t)})},U.prototype.initialize=function(){L.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||L.addClass([this.element],de),L.Browser.isDevice&&L.addClass([this.element],ye),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},U.prototype.initRender=function(){var t,i=this;this.initialRender=!0,this.isBlazorServerRender()||L.attributes(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.setTargetContent(),""===this.header||L.isNullOrUndefined(this.header)||this.setHeader(),this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||L.isNullOrUndefined(this.footerTemplate)?L.isNullOrUndefined(this.buttons[0])||L.isNullOrUndefined(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate(),this.allowDragging&&!L.isNullOrUndefined(this.headerContent)&&this.setAllowDragging(),L.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),!0===this.element.classList.contains(we)||!0===this.element.classList.contains(Ne)||L.isNullOrUndefined(this.element.parentElement)||(t=(this.isModal?this.dlgContainer:this.element).parentElement,this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),t.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)),L.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new Ct(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(t){var e={container:i.isModal?i.dlgContainer:i.element,element:i.element,target:i.target,preventFocus:!1};i.enableResize&&i.resetResizeIcon(),i.trigger("open",e,function(t){t.preventFocus||i.focusContent()})},close:function(t){i.isModal&&L.addClass([i.dlgOverlay],"e-fade"),i.unBindEvent(i.element),i.isModal&&(i.dlgContainer.style.display="none"),i.trigger("close",i.closeArgs);var e=document.activeElement;L.isNullOrUndefined(e)||L.isNullOrUndefined(e.blur)||e.blur(),L.isNullOrUndefined(i.storeActiveElement)||L.isNullOrUndefined(i.storeActiveElement.focus)||i.closeArgs.preventFocus||i.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||(L.addClass([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex()),this.visible?(this.show(),this.isModal&&(t=this.getTargetContainer(this.target))instanceof Element&&"rtl"===window.getComputedStyle(t).getPropertyValue("direction")&&this.setPopupPosition()):this.isModal&&(this.dlgOverlay.style.display="none"),this.initialRender=!1},U.prototype.getTargetContainer=function(t){var e,i=null;return"string"==typeof t?t.startsWith("#")?i=document.getElementById(t.substring(1)):t.startsWith(".")?i=0<(e=document.getElementsByClassName(t.substring(1))).length?e[0]:null:t instanceof HTMLElement||t===document.body||(i=document.querySelector(t)):t instanceof HTMLElement&&(i=t),i},U.prototype.resetResizeIcon=function(){var t,e=this.getMinHeight();this.targetEle.offsetHeight<e&&(t=this.enableRtl?"e-south-west":"e-south-east",t=this.element.querySelector("."+t),L.isNullOrUndefined(t)||(t.style.bottom="-"+e.toString()+"px"))},U.prototype.setOverlayZindex=function(t){t=L.isNullOrUndefined(t)?parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex:t;this.dlgOverlay.style.zIndex=(t-1).toString(),this.dlgContainer.style.zIndex=t.toString()},U.prototype.positionChange=function(){!this.isModal||!isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))||!isNaN(parseFloat(this.position.X))&&isNaN(parseFloat(this.position.Y))||isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))?this.setPopupPosition():(this.element.style.top="0px",this.element.style.left="0px",this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y))},U.prototype.setPopupPosition=function(){this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},U.prototype.setAllowDragging=function(){var i=this;this.element.classList.contains("e-draggable")||(this.dragObj=new L.Draggable(this.element,{clone:!1,isDragScroll:!0,abort:".e-dlg-closeicon-btn",handle:".e-dlg-header-content",dragStart:function(e){i.trigger("dragStart",e,function(t){L.isBlazor()&&t.bindEvents(e.dragElement)})},dragStop:function(t){var e;i.isModal&&(i.IsDragStop=!0,L.isNullOrUndefined(i.position)||i.dlgContainer.classList.remove("e-dlg-"+i.position.X+"-"+i.position.Y),(e=i.getTargetContainer(i.target))instanceof Element&&"rtl"===window.getComputedStyle(e).getPropertyValue("direction")?i.element.style.position="absolute":i.element.style.position="relative"),i.trigger("dragStop",t),i.isModelResize=!1,i.element.classList.remove(x),i.updatePersistData()},drag:function(t){i.trigger("drag",t)}}),L.isNullOrUndefined(this.targetEle))||(this.dragObj.dragArea=this.targetEle)},U.prototype.setButton=function(){if(!this.isBlazorServerRender()){this.buttonContent=[],this.btnObj=[];for(var t,e=0;e<this.buttons.length;e++)L.isNullOrUndefined(this.buttons[e].buttonModel)||(t=L.isNullOrUndefined(this.buttons[e].type)?"button":this.buttons[e].type.toLowerCase(),t=this.createElement("button",{className:this.cssClass,attrs:{type:t,tabindex:"0"}}),this.buttonContent.push(t.outerHTML));this.setFooterTemplate()}for(var i,e=0,o=this.element.children;e<o.length;e++)o[e].classList.contains(fe)&&(i=o[e].querySelectorAll("button"));for(e=0;e<this.buttons.length;e++)L.isNullOrUndefined(this.buttons[e].buttonModel)||(this.isBlazorServerRender()||(this.btnObj[e]=new M.Button(this.buttons[e].buttonModel)),!L.isNullOrUndefined(this.ftrTemplateContent)&&0<i.length&&("function"==typeof this.buttons[e].click&&L.EventHandler.add(i[e],"click",this.buttons[e].click,this),"object"==typeof this.buttons[e].click)&&L.EventHandler.add(i[e],"click",this.buttonClickHandler.bind(this,e),this),this.isBlazorServerRender())||L.isNullOrUndefined(this.ftrTemplateContent)||(this.btnObj[e].appendTo(this.ftrTemplateContent.children[e]),this.buttons[e].isFlat&&this.btnObj[e].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0])},U.prototype.buttonClickHandler=function(t){this.trigger("buttons["+t+"].click",{})},U.prototype.setContent=function(){this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.headerEle?L.attributes(this.element,{"aria-describedby":this.element.id+"_title "+this.element.id+"_dialog-content"}):L.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):(L.isNullOrUndefined(this.content)||""===this.content)&&this.initialRender||(("string"!=typeof this.content||L.isBlazor())&&this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content")),L.isNullOrUndefined(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!L.Browser.isIE||""!==this.element.style.width||L.isNullOrUndefined(this.width)||(this.element.style.width=L.formatUnit(this.width)),this.setMaxHeight())},U.prototype.setTemplate=function(t,e,i){var o,n,s=e.classList.contains(ue)?this.element.id+"header":e.classList.contains(fe)?this.element.id+"footerTemplate":this.element.id+"content",l=(L.isNullOrUndefined(t.outerHTML)?("string"==typeof t||"string"!=typeof t||L.isBlazor()&&!this.isStringTemplate)&&("string"==typeof t&&(t=this.sanitizeHelper(t)),this.isVue||"string"!=typeof t?(o=L.compile(t),n=t):e.innerHTML=t):e.appendChild(t),[]);if(!L.isNullOrUndefined(o)){for(var r=0,a=o({},this,i,s,!(L.isBlazor()&&!this.isStringTemplate&&0===n.indexOf("<div>Blazor"))||this.isStringTemplate);r<a.length;r++){var h=a[r];l.push(h)}L.append([].slice.call(l),e)}},U.prototype.sanitizeHelper=function(t){var e;return this.enableHtmlSanitizer&&(e=L.SanitizeHtmlHelper.beforeSanitize(),L.extend(e,e,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",e),e.cancel&&!L.isNullOrUndefined(e.helper)?t=e.helper(t):e.cancel||(t=L.SanitizeHtmlHelper.serializeValue(e,t))),t},U.prototype.setMaxHeight=function(){var t;this.allowMaxHeight&&(t=this.element.style.display,this.element.style.display="none",this.element.style.maxHeight=!L.isNullOrUndefined(this.target)&&this.targetEle.offsetHeight<window.innerHeight?this.targetEle.offsetHeight-20+"px":window.innerHeight-20+"px",this.element.style.display=t,L.Browser.isIE)&&"auto"===this.height&&!L.isNullOrUndefined(this.contentEle)&&this.element.offsetHeight<this.contentEle.offsetHeight&&(this.element.style.height="inherit")},U.prototype.setEnableRTL=function(){this.isBlazorServerRender()||(this.enableRtl?L.addClass([this.element],pe):L.removeClass([this.element],pe)),L.isNullOrUndefined(this.element.querySelector(".e-resize-handle"))||(ie(),this.setResize())},U.prototype.setTargetContent=function(){var t,e=this;(L.isNullOrUndefined(this.content)||""===this.content)&&(t=""!==this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g,""),0<this.element.children.length||t)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach(function(t){8!==t.nodeType&&e.innerContentElement.appendChild(t)}))},U.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:ue}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),L.attributes(this.element,{"aria-describedby":this.element.id+"_title"}),L.attributes(this.element,{"aria-labelledby":this.element.id+"_dialog-header"}),this.element.insertBefore(this.headerContent,this.element.children[0]),this.allowDragging&&!L.isNullOrUndefined(this.headerContent)&&this.setAllowDragging()},U.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:fe}),""===this.footerTemplate||L.isNullOrUndefined(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},U.prototype.createHeaderContent=function(){L.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:ce}))},U.prototype.renderCloseIcon=function(){this.showCloseIcon&&(this.closeIcon=this.createElement("button",{className:be,attrs:{type:"button"}}),this.closeIconBtnObj=new M.Button({cssClass:"e-flat",iconCss:ge+" e-icons"}),this.closeIconTitle(),L.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),L.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):L.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon))},U.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t),this.closeIcon.setAttribute("aria-label",t)},U.prototype.setCSSClass=function(t){t&&(L.removeClass([this.element],t.split(" ")),this.isModal)&&!L.isNullOrUndefined(this.dlgContainer)&&L.removeClass([this.dlgContainer],t.split(" ")),this.cssClass&&(L.addClass([this.element],this.cssClass.split(" ")),this.isModal)&&!L.isNullOrUndefined(this.dlgContainer)&&L.addClass([this.dlgContainer],this.cssClass.split(" "))},U.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.setCSSClass(),this.element.classList.remove(Ee),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),L.addClass([this.element],me),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},U.prototype.getValidFocusNode=function(t){for(var e,i=0;i<t.length;i++){if((0<(e=t[i]).clientHeight||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&-1<e.tabIndex&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]'))return e;e=null}return e},U.prototype.focusableElements=function(t){return L.isNullOrUndefined(t)?null:(t=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]'),this.getValidFocusNode(t))},U.prototype.getAutoFocusNode=function(t){var e=t.querySelector("."+be),t=t.querySelectorAll("[autofocus]"),t=this.getValidFocusNode(t);if(L.isBlazor()&&(this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]),L.isNullOrUndefined(t)){if(t=this.focusableElements(this.contentEle),!L.isNullOrUndefined(t))return t;if(!L.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else e=t;return e},U.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msGetRegionContent:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},U.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element),t=L.isNullOrUndefined(t)?this.element:t,e=L.Browser.userAgent;(0<e.indexOf("MSIE ")||0<e.indexOf("Trident/"))&&this.element.focus(),t.focus(),this.unBindEvent(this.element),this.bindEvent(this.element)},U.prototype.bindEvent=function(t){L.EventHandler.add(t,"keydown",this.keyDown,this)},U.prototype.unBindEvent=function(t){L.EventHandler.remove(t,"keydown",this.keyDown)},U.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},U.prototype.isBlazorServerRender=function(){return L.isBlazor()&&this.isServerRendered},U.prototype.getModuleName=function(