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.

1 lines 111 kB
this.ej=this.ej||{},this.ej.popups=function(t,e,i){"use strict";function n(t,i){var n=!1,o={left:0,top:0},s=t;if(!t||!i)return o;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(n=!0);(i.offsetParent||n)&&t&&i.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||n)&&t&&i.offsetParent!==t;)o.left-=t.scrollLeft,o.top-=t.scrollTop,t=t.parentElement;return o}function o(t,e,i,n,o){if(oe=void 0,oe=o,ye=!!n,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),le=t.ownerDocument,se=t;var s={left:0,top:0};return r(e.toLowerCase(),i.toLowerCase(),s)}function s(t,e){e.left=t}function l(t,e){e.top=t}function r(t,e,i){switch(ne=se.getBoundingClientRect(),e+t){case"topcenter":s(m(),i),l(c(),i);break;case"topright":s(f(),i),l(c(),i);break;case"centercenter":s(m(),i),l(p(),i);break;case"centerright":s(f(),i),l(p(),i);break;case"centerleft":s(u(),i),l(p(),i);break;case"bottomcenter":s(m(),i),l(d(),i);break;case"bottomright":s(f(),i),l(d(),i);break;case"bottomleft":s(u(),i),l(d(),i);break;default:case"topleft":s(u(),i),l(c(),i)}return se=null,i}function a(){return le.documentElement.scrollTop||le.body.scrollTop}function h(){return le.documentElement.scrollLeft||le.body.scrollLeft}function d(){return ye?ne.bottom:ne.bottom+a()}function p(){return c()+ne.height/2}function c(){return ye?ne.top:ne.top+a()}function u(){return ne.left+h()}function f(){var t=se&&((se.classList.contains("e-date-wrapper")||se.classList.contains("e-datetime-wrapper"))&&se.classList.contains("e-rtl")||se.classList.contains("e-ddl")&&se.classList.contains("e-rtl")||se.classList.contains("e-date-range-wrapper"))?oe?oe.width:0:oe&&ne.width>=oe.width?oe.width:0;return se&&se.classList.contains("e-rtl")&&se.classList.contains("e-multiselect")&&(t=oe.width),ne.right+h()-t}function m(){return u()+ne.width/2}function g(t,e,i,n){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(ae=e,re=t.ownerDocument,n||(n=o(t,"left","top")),i.X){var l=ae?x():D(),r=L(),a=M(),h=r-n.left,d=n.left+s.width-a;s.width>l?n.left=h>0&&d<=0?a-s.width:d>0&&h<=0?r:h>d?a-s.width:r:h>0?n.left+=h:d>0&&(n.left-=d)}if(i.Y){var p=ae?U():A(),c=k(),u=R(),f=c-n.top,m=n.top+s.height-u;s.height>p?n.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?n.top+=f:m>0&&(n.top-=m)}return n}function y(t,e,i,n){void 0===e&&(e=null);var s=o(t,"left","top");i&&(s.left=i),n&&(s.top=n);var l=[];ae=e,re=t.ownerDocument;var r=t.getBoundingClientRect(),a=s.top,h=s.left,d=s.left+r.width,p=S(a,s.top+r.height),c=N(h,d);return p.topSide&&l.push("top"),c.rightSide&&l.push("right"),c.leftSide&&l.push("left"),p.bottomSide&&l.push("bottom"),l}function v(t,e,i,n,o,s,l,r,a){if(void 0===l&&(l=null),void 0===r&&(r={X:!0,Y:!0}),e&&t&&o&&s&&(r.X||r.Y)){var h,d={TL:null,TR:null,BL:null,BR:null},p={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var c=t.style.visibility;t.style.visibility="hidden",t.style.display="block",h=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=c}else h=t.getBoundingClientRect();var u={posX:o,posY:s,offsetX:i,offsetY:n,position:{left:0,top:0}};ae=l,re=e.ownerDocument,C(e,d,u,a,h),w(p,u,h),r.X&&T(e,p,d,u,h,!0),r.Y&&d.TL.top>-1&&P(e,p,d,u,h,!0),b(t,u,h)}}function b(t,e,i){var n=0,s=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var l=o(t.offsetParent,"left","top",!1,i);n=l.left,s=l.top}var r=1,a=1,h=O(t);if(h){var d=getComputedStyle(h).transform;if("none"!==d){var p=new DOMMatrix(d);r=p.a,a=p.d}if("none"!==getComputedStyle(h).zoom){var c=E(document.body);r*=c,a*=c}}t.style.top=e.position.top/a+e.offsetY-s/a+"px",t.style.left=e.position.left/r+e.offsetX-n/r+"px"}function E(t){var e=getComputedStyle(t).zoom;return parseFloat(e)||1}function O(t){for(;t;){var e=window.getComputedStyle(t).transform,i=E(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 C(t,e,i,n,s){i.position=o(t,i.posX,i.posY,n,s),e.TL=o(t,"left","top",n,s),e.TR=o(t,"right","top",n,s),e.BR=o(t,"left","bottom",n,s),e.BL=o(t,"right","bottom",n,s)}function w(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 N(t,e){var i=!1,n=!1;return t-I()<L()&&(i=!0),e>M()&&(n=!0),{leftSide:i,rightSide:n}}function T(t,e,i,n,s,l){var r=N(e.TL.left,e.TR.left);i.TL.left-I()<=L()&&(r.leftSide=!1),i.TR.left>M()&&(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=o(t,n.posX,n.posY,!1),w(e,n,s),l&&T(t,e,i,n,s,!1))}function P(t,e,i,n,s,l){var r=S(e.TL.top,e.BL.top);i.TL.top-z()<=k()&&(r.topSide=!1),i.BL.top>=R()&&t.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=o(t,n.posX,n.posY,!1,s),w(e,n,s),l&&P(t,e,i,n,s,!1))}function S(t,e){var i=!1,n=!1;return t-z()<k()&&(i=!0),e>R()&&(n=!0),{topSide:i,bottomSide:n}}function x(){return ae.getBoundingClientRect().width}function U(){return ae.getBoundingClientRect().height}function H(){return ae.getBoundingClientRect().left}function B(){return ae.getBoundingClientRect().top}function k(){return ae?B():0}function L(){return ae?H():0}function M(){return ae?I()+H()+x():I()+D()}function R(){return ae?z()+B()+U():z()+A()}function z(){return re.documentElement.scrollTop||re.body.scrollTop}function I(){return re.documentElement.scrollLeft||re.body.scrollLeft}function A(){return window.innerHeight}function D(){var t=window.innerWidth,i=document.documentElement.getBoundingClientRect();return t-(t-(e.isNullOrUndefined(document.documentElement)?0:i.width))}function Y(){ae=null,re=null}function j(t,e){for(var i=getComputedStyle(t),n=[],o=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var l=getComputedStyle(s);"absolute"===i.position&&"static"===l.position||!o.test(l.overflow+l.overflowY+l.overflowX)||n.push(s),s=s.parentElement}return e||n.push(document),n}function X(t){for(var i=t.parentElement,n=[];i&&"BODY"!==i.tagName;){var o=document.defaultView.getComputedStyle(i,null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(i,null).getPropertyValue("position");"auto"!==o&&"static"!==s&&parseInt(o,10)<2147483647&&n.push(o),i=i.parentElement}for(var l=[],r=0;r<document.body.children.length;r++)if(!t.isEqualNode(document.body.children[r])){var o=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("position");"auto"!==o&&"static"!==s&&parseInt(o,10)<2147483647&&l.push(o)}l.push("999");var a=[];if(!e.isNullOrUndefined(t.parentElement)&&"BODY"!==t.parentElement.tagName)for(var h=[].slice.call(t.parentElement.children),r=0;r<h.length;r++)if(!t.isEqualNode(h[r])){var o=document.defaultView.getComputedStyle(h[r],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(h[r],null).getPropertyValue("position");"auto"!==o&&"static"!==s&&parseInt(o,10)<2147483647&&a.push(o)}var d=n.concat(l,a),p=Math.max.apply(Math,d)+1;return p>2147483647?2147483647:p}function F(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i<t.length;i++)for(var n=document.getElementsByTagName(t[i]),o=0;o<n.length;o++){var s=document.defaultView.getComputedStyle(n[o],null).getPropertyValue("z-index"),l=document.defaultView.getComputedStyle(n[o],null).getPropertyValue("position");"auto"!==s&&"static"!==l&&e.push(s)}var r=Math.max.apply(Math,e)+1;return r>2147483647?2147483647:r}function q(t){ze=t.resizeBegin,Ie=t.resizing,Ae=t.resizeComplete,he=V(t.element),me=V(t.boundary);for(var i=t.direction.split(" "),n=0;n<i.length;n++)if(Ue.indexOf(i[n])>=0&&i[n])W(i[n]);else if(""!==i[n].trim()){var o=e.createElement("div",{className:"e-icons "+Ne+" e-"+i[n]});he.appendChild(o)}pe=t.minHeight,ue=t.minWidth,fe=t.maxWidth,ce=t.maxHeight,De++,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?_(t.proxy):_()}function W(t){J();var i=e.createElement("span",{attrs:{unselectable:"on",contenteditable:"false"}});i.setAttribute("class","e-dialog-border-resize e-"+t),"south"===t&&(i.style.height="2px",i.style.width="100%",i.style.bottom="0px",i.style.left="0px"),"north"===t&&(i.style.height="2px",i.style.width="100%",i.style.top="0px",i.style.left="0px"),"east"===t&&(i.style.height="100%",i.style.width="2px",i.style.right="0px",i.style.top="0px"),"west"===t&&(i.style.height="100%",i.style.width="2px",i.style.left="0px",i.style.top="0px"),he.appendChild(i)}function V(t){var i;return e.isNullOrUndefined(t)||(i="string"==typeof t?document.querySelector(t):t),i}function _(t){for(var i=t||this,n=he.querySelectorAll("."+Ne),o=0;o<n.length;o++){de=n[o],e.EventHandler.add(de,"mousedown",K,i);l="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(de,l,Q,i)}var s=he.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(s))for(o=0;o<s.length;o++){de=s[o],e.EventHandler.add(de,"mousedown",K,i);var l="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(de,l,Q,i)}}function Z(t){return t.indexOf("mouse")>-1?"mouse":"touch"}function K(t){if(t.preventDefault(),he=t.target.parentElement,J(),Me=t.pageX,Re=t.pageY,t.target.classList.add(Te),e.isNullOrUndefined(ze)||!0!==ze(t,this)){this.targetEle&&he&&he.querySelector("."+Pe)&&(me="body"===this.target?null:this.targetEle,fe=this.targetEle.clientWidth,ce=this.targetEle.clientHeight);var i=e.isNullOrUndefined(me)?document:me;e.EventHandler.add(i,"mousemove",$,this),e.EventHandler.add(document,"mouseup",G,this);for(var n=0;n<Se.length;n++)Ye=!he.classList.contains(Se[n])}}function G(t){var i="msie"===e.Browser.info.name?"pointermove":"touchmove",n="msie"===e.Browser.info.name?"pointerup":"touchend",o=e.isNullOrUndefined(me)?document:me,s="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.remove(o,"mousemove",$),e.EventHandler.remove(o,i,$),e.EventHandler.remove(o,s,$),e.isNullOrUndefined(document.body.querySelector("."+Te))||document.body.querySelector("."+Te).classList.remove(Te),e.isNullOrUndefined(Ae)||Ae(t,this),e.EventHandler.remove(document,"mouseup",G),e.EventHandler.remove(document,n,G)}function J(){He=parseFloat(getComputedStyle(he,null).getPropertyValue("width").replace("px","")),Be=parseFloat(getComputedStyle(he,null).getPropertyValue("height").replace("px","")),ke=he.getBoundingClientRect().left,Le=he.getBoundingClientRect().top}function Q(t){he=t.target.parentElement,J();var i=he.classList.contains("e-dialog");(t.target.classList.contains(Ne)||t.target.classList.contains("e-dialog-border-resize"))&&i&&t.target.classList.add(Te);var n=t.touches?t.changedTouches[0]:t;if(Me=n.pageX,Re=n.pageY,e.isNullOrUndefined(ze)||!0!==ze(t,this)){var o="msie"===e.Browser.info.name?"pointermove":"touchmove",s="msie"===e.Browser.info.name?"pointerup":"touchend",l=e.isNullOrUndefined(me)?document:me;e.EventHandler.add(l,o,$,this),e.EventHandler.add(document,s,G,this)}}function $(t){if(t.target.classList.contains(Ne)&&t.target.classList.contains(Te)?de=t.target:e.isNullOrUndefined(document.body.querySelector("."+Te))||(de=document.body.querySelector("."+Te)),!e.isNullOrUndefined(de)){for(var i="",n=0;n<we.length;n++)de.classList.contains("e-"+we[n])&&(i=we[n]);switch(e.isNullOrUndefined(Ie)||Ie(t,this),i){case"south":et(t);break;case"north":it(t);break;case"west":nt(t);break;case"east":ot(t);break;case"south-east":et(t),ot(t);break;case"south-west":et(t),nt(t);break;case"north-east":it(t),ot(t);break;case"north-west":it(t),nt(t)}}}function tt(t){return t.getBoundingClientRect()}function et(t){var i,n=document.documentElement.clientHeight,o=!1,s=(t.touches?t.changedTouches[0]:t).pageY,l=tt(he);e.isNullOrUndefined(me)||(i=tt(me)),e.isNullOrUndefined(me)?e.isNullOrUndefined(me)&&(n-s>=0||l.top<0)&&(o=!0):o=!0;var r=Be+(s-Re);r=r>pe?r:pe;var a=0;e.isNullOrUndefined(me)||(a=i.top);var h=e.isNullOrUndefined(me)?0:me.offsetHeight-me.clientHeight,d=l.top-a-h/2;if(d=d<0?0:d,l.top>0&&d+r>ce){if(o=!1,he.classList.contains(xe))return;return void(he.style.height=ce-parseInt(d.toString(),10)+"px")}var p=0;if(o){l.top<0&&n+(l.height+l.top)>0&&r+(p=l.top)<=30&&(r=l.height-(l.height+l.top)+30),r+l.top>=ce&&(he.style.height=l.height+(n-(l.height+l.top))+"px");var c=e.isNullOrUndefined(me)?p:d;r>=pe&&r+c<=ce&&(he.style.height=r+"px")}}function it(t){var i,n=!1,o="mouse"===Z(t.type)?t.pageY:t.touches[0].pageY,s=tt(he),l=e.isNullOrUndefined(me)?0:me.offsetHeight-me.clientHeight;e.isNullOrUndefined(me)||(i=tt(me)),!e.isNullOrUndefined(me)&&s.top-i.top>0?n=!0:e.isNullOrUndefined(me)&&o>0?n=!0:!e.isNullOrUndefined(me)&&Math.floor(s.top-i.top+s.height+(i.bottom-s.bottom))-l<=ce&&(n=!0);var r=Be-(o-Re);if(n&&r>=pe&&r<=ce){var a=0;e.isNullOrUndefined(me)||(a=i.top);var h=Le-a+(o-Re);h=h>0?h:1,he.style.height=r+"px",he.style.top=h+"px"}}function nt(t){var i,n=document.documentElement.clientWidth,o=!1;e.isNullOrUndefined(me)||(i=tt(me));var s="mouse"===Z(t.type)?t.pageX:t.touches[0].pageX,l=tt(he),r=e.isNullOrUndefined(me)?0:me.offsetWidth-me.clientWidth,a=e.isNullOrUndefined(me)?0:i.left,h=e.isNullOrUndefined(me)?0:i.width;e.isNullOrUndefined(ge)&&(e.isNullOrUndefined(me)?ge=n:(ge=l.left-a-r/2+l.width,ge+=h-r-ge)),!e.isNullOrUndefined(me)&&Math.floor(l.left-i.left+l.width+(i.right-l.right))-r<=fe?o=!0:e.isNullOrUndefined(me)&&s>=0&&(o=!0);var d=He-(s-Me);if(Ye&&(d=d>ge?ge:d),o&&d>=ue&&d<=fe){var p=0;e.isNullOrUndefined(me)||(p=i.left);var c=ke-p+(s-Me);c=c>0?c:1,d!==je&&Xe&&(he.style.width=d+"px"),Ye&&(he.style.left=c+"px",Xe=1!==c)}je=d}function ot(t){var i,n=document.documentElement.clientWidth,o=!1;e.isNullOrUndefined(me)||(i=tt(me));var s=(t.touches?t.changedTouches[0]:t).pageX,l=tt(he);!e.isNullOrUndefined(me)&&(l.left-i.left+l.width<=fe||l.right-i.left>=l.width)?o=!0:e.isNullOrUndefined(me)&&n-s>0&&(o=!0);var r=He+(s-Me),a=0;if(e.isNullOrUndefined(me)||(a=i.left),l.left-a+r>fe){if(o=!1,he.classList.contains(xe))return;he.style.width=fe-(l.left-a)+"px"}o&&r>=ue&&r<=fe&&(he.style.width=r+"px")}function st(t){pe=t}function lt(t){fe=t}function rt(t){ce=t}function at(){for(var t=he.querySelectorAll("."+Ne),i=0;i<t.length;i++)e.detach(t[i]);var n=he.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(n))for(i=0;i<n.length;i++)e.detach(n[i])}function ht(){0===--De&&(he=null,de=null,me=null,ge=null,ze=null,Ie=null,Ae=null)}function dt(t,e,i,n){switch(t){case"Create":pt({type:n,target:document.querySelector(e.target),cssClass:e.cssClass,label:e.label,width:e.width});break;case"Show":Jt(document.querySelector(i));break;case"Hide":$t(document.querySelector(i));break;case"Set":te({cssClass:e.cssClass,type:n})}}function pt(t,i){var n;if(t.target){var o,s=e.isNullOrUndefined(i)?e.createElement:i,l=At(t.target,s);if(!e.isNullOrUndefined(t.cssClass)){var r=t.cssClass.split(" ").filter(function(t){return""!==t.trim()});(n=l.wrap.classList).add.apply(n,r)}if(e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(Mi)){var a=e.isNullOrUndefined(t.type)?Nt(l.wrap):t.type;o=kt(e.isNullOrUndefined(t.width)?void 0:t.width,a),Tt(a,l.wrap,o,s),e.isNullOrUndefined(t.label)||ct(l.inner_wrap,t.label,s)}else{var h=e.isNullOrUndefined(t.template)?Mi:t.template;l.wrap.classList.add(Li),Bt(l.wrap,h,Ri)}l.wrap.classList.add(gi),l=null}}function ct(t,e,i){var n=i("div",{});return n.classList.add(ki),n.innerHTML=e,t.appendChild(n),n}function ut(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Material",radius:e},It(t,n,i,yi),jt(e,t,"Material",yi)}function ft(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Tailwind3",radius:e},It(t,n,i,bi),jt(e,t,"Tailwind3",bi)}function mt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Material3",radius:e},It(t,n,i,vi),jt(e,t,"Material3",vi)}function gt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Bootstrap4",radius:e},It(t,n,i,Ti),jt(e,t,"Bootstrap4",Ti)}function yt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Bootstrap5",radius:e},It(t,n,i,Pi),jt(e,t,"Bootstrap5",Pi)}function vt(t,e,i){var n={};li[""+e].timeOut=0,n[""+e]=Lt(e,i,0,0),Dt({uniqueID:e,container:t,globalInfo:n,timeOutVar:0})}function bt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Fabric",radius:e},zt(t,n,Ei),_t(e,t,Ei)}function Et(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Fluent",radius:e},zt(t,n,Oi),_t(e,t,Oi)}function Ot(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Fluent2",radius:e},zt(t,n,Ci),_t(e,t,Ci)}function Ct(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Tailwind",radius:e},zt(t,n,wi),_t(e,t,wi)}function wt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"HighContrast",radius:e},zt(t,n,Si),_t(e,t,Si)}function Nt(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}function Tt(t,i,n,o){var s=i.querySelector("."+Ui),l=s.querySelector("svg");switch(e.isNullOrUndefined(l)||s.removeChild(l),t){case"Material":ut(s,n,o);break;case"Material3":mt(s,n,o);break;case"Fabric":bt(s,n);break;case"Fluent":Et(s,n);break;case"Fluent2":Ot(s,n);break;case"Bootstrap":Pt(s,n);break;case"HighContrast":wt(s,n);break;case"Bootstrap4":gt(s,n,o);break;case"Bootstrap5":yt(s,n,o);break;case"Tailwind":case"Tailwind-dark":Ct(s,n);break;case"Tailwind3":ft(s,n,o)}}function Pt(t,e,i){var n=Rt();li[""+n]={timeOut:0,type:"Bootstrap",radius:e},St(t,n),xt(t,e)}function St(t,e,i){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",Ni),n.setAttribute("viewBox","0 0 64 64"),t.insertBefore(n,t.firstChild);for(var o=0;o<=7;o++){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.setAttribute("class",Hi+"_"+o),s.setAttribute("r","2"),s.setAttribute("transform","translate(32,32)"),n.appendChild(s)}}function xt(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var n=90,o=0;o<=7;o++){var s=Zt(0,0,24,n),l=i.querySelector("."+Hi+"_"+o);l.setAttribute("cx",s.x+""),l.setAttribute("cy",s.y+""),n=n>=360?0:n,n+=45}}function Ut(t,e){function i(t){n.push(t),t===s&&1!==r||(t<=o&&t>1&&!l?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),l=!0):t<8&&l?8===(t=parseFloat((t+.2).toFixed(2)))&&(l=!1):t<=8&&!l&&(t=parseFloat((t-.2).toFixed(2))),++r,i(t))}var n=[],o=t,s=e,l=!1,r=1;return i(o),n}function Ht(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,n,o){function s(e){li[""+o].isAnimate&&(++l,t.setAttribute("r",e+""),l>=n.length&&(l=0),li[o].timeOut=setTimeout(s.bind(null,n[l]),18))}var l=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,Ut(i,i),e)}function Bt(t,i,n){e.isNullOrUndefined(n)||t.classList.add(n),t.querySelector(".e-spinner-inner").innerHTML=i}function kt(t,e){var i;switch(e){case"Material":i=ri;break;case"Material3":i=ai;break;case"Fabric":i=hi;break;case"Tailwind":case"Tailwind-dark":case"Tailwind3":i=hi;break;case"Fluent":i=di;break;case"Fluent2":i=pi;break;case"Bootstrap4":i=ui;break;case"Bootstrap5":i=fi;break;default:i=ci}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}function Lt(t,e,i,n){return{radius:e,count:i,previousId:n}}function Mt(){var t=new Uint32Array(1);return window.crypto.getRandomValues(t),t[0]/4294967296}function Rt(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Mt()*e.length));return t}function zt(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",Hi);var l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("class",Bi),t.insertBefore(o,t.firstChild),o.appendChild(s),o.appendChild(l)}function It(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("class",n),o.setAttribute("id",e),s.setAttribute("class",Hi),t.insertBefore(o,t.firstChild),o.appendChild(s)}function At(t,e){var i=e("div",{}),n=e("div",{});return i.classList.add(xi),n.classList.add(Ui),n.setAttribute("aria-disabled","true"),t.appendChild(i),i.appendChild(n),{wrap:i,inner_wrap:n}}function Dt(t){Yt(1,149,Vt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Yt(t,i,n,o,s,l,r){function a(e){var i=Math.max(0,Math.min((new Date).getTime()-p,o));h(n(i,t,c,o),e.container),d===e.globalInfo[e.uniqueID].previousId&&i<o?li[e.uniqueID].timeOut=setTimeout(a.bind(null,e),1):Dt(e)}function h(t,i){if(!e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))||!e.isNullOrUndefined(i.querySelector("svg.e-spin-material3"))||!e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3"))){var n=void 0;if(e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))?e.isNullOrUndefined(i.querySelector("svg.e-spin-material3"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-material3").querySelector("path.e-path-circle"))?e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3"))||e.isNullOrUndefined(i.querySelector("svg.e-spin-tailwind3").querySelector("path.e-path-circle"))||(n=i.querySelector("svg.e-spin-tailwind3")):n=i.querySelector("svg.e-spin-material3"):n=i.querySelector("svg.e-spin-material"),!e.isNullOrUndefined(n)){var o=n.querySelector("path.e-path-circle");o.setAttribute("stroke-dashoffset",Wt(u,f,t,l)+""),o.setAttribute("transform","rotate("+m+" "+u/2+" "+u/2+")")}}}var d=++r.globalInfo[r.uniqueID].previousId,p=(new Date).getTime(),c=i-t,u=Xt(2*r.globalInfo[r.uniqueID].radius+""),f=qt(u),m=-90*(r.globalInfo[r.uniqueID].count||0);a(r)}function jt(t,e,i,n){var o=2*t,s=e.querySelector("svg."+n),l=s.querySelector("path.e-path-circle"),r=qt(o),a=o/2+"px";s.setAttribute("viewBox","0 0 "+o+" "+o),s.style.width=s.style.height=o+"px",s.style.transformOrigin=a+" "+a+" "+a,l.setAttribute("d",Ft(o,r)),"Material"!==i&&"Material3"!==i&&"Fluent2"!==i&&"Tailwind3"!==i||(l.setAttribute("stroke-width",r+""),l.setAttribute("stroke-dasharray",(o-r)*Math.PI*.75+""),l.setAttribute("stroke-dashoffset",Wt(o,r,1,75)+""))}function Xt(t){return parseFloat(t)}function Ft(t,e){var i=t/2,n=e/2;return"M"+i+","+n+"A"+(i-n)+","+(i-n)+" 0 1 1 "+n+","+i}function qt(t){return.1*t}function Wt(t,e,i,n){return(t-e)*Math.PI*(3*n/100-i/100)}function Vt(t,e,i,n){var o=(t/=n)*t,s=o*t;return e+i*(6*s*o+-15*o*o+10*s)}function _t(t,e,i){var n=t,o=t,s=2*t,l=e.querySelector("."+i),r=l.querySelector(".e-path-circle"),a=l.querySelector(".e-path-arc"),h=s/2+"px";r.setAttribute("d",Gt(n,o,t)),a.setAttribute("d",Kt(n,o,t,315,45)),l.setAttribute("viewBox","0 0 "+s+" "+s),l.style.transformOrigin=h+" "+h+" "+h,l.style.width=l.style.height=s+"px"}function Zt(t,e,i,n){var o=(n-90)*Math.PI/180;return{x:t+i*Math.cos(o),y:e+i*Math.sin(o)}}function Kt(t,e,i,n,o){var s=Zt(t,e,i,o),l=Zt(t,e,i,n);return["M",s.x,s.y,"A",i,i,0,0,0,l.x,l.y].join(" ")}function Gt(t,e,i){return["M",t,e,"m",-i,0,"a",i,i,0,1,0,2*i,0,"a",i,i,0,1,0,2*-i,0].join(" ")}function Jt(t){Qt(t,!1),t=null}function Qt(t,i){var n;if(t)if(t.classList.contains(xi))n=t;else{var o=t.querySelectorAll("."+xi);if(e.Browser.isIE){for(var s=0;s<o.length;s++)if(o[s].parentElement&&o[s].parentElement===t){n=o[s];break}}else n=Array.from(o).find(function(e){return e.parentElement===t})||null}if(t&&n){var l=n.querySelector("."+Ui);if(i?!n.classList.contains(Li)&&!n.classList.contains(gi):!n.classList.contains(Li)&&!n.classList.contains(mi)){var r=n.querySelector("svg");if(e.isNullOrUndefined(r))return;var a=r.getAttribute("id");switch(li[""+a].isAnimate=!i,li[""+a].type){case"Material":case"Material3":case"Tailwind3":i?clearTimeout(li[a].timeOut):vt(l,a,li[a].radius);break;case"Bootstrap":i?clearTimeout(li[a].timeOut):Ht(l)}}i?e.classList(n,[gi],[mi]):e.classList(n,[mi],[gi]),t=null}}function $t(t){Qt(t,!0),t=null}function te(t,i){var n=e.isNullOrUndefined(i)?e.createElement:i;void 0!==t.template&&(Mi=t.template,void 0!==t.template&&(Ri=t.cssClass));for(var o=document.querySelectorAll("."+xi),s=0;s<o.length;s++)ee(t.template,o[s],t.type,t.cssClass,n)}function ee(t,i,n,o,s){e.isNullOrUndefined(t)&&!i.classList.contains(Li)?(ie(i,n,o,s),i.classList.contains(mi)?(i.classList.remove(mi),Jt(i)):(i.classList.remove(gi),$t(i))):(Mi=t,e.isNullOrUndefined(o)||(Ri=o),e.isNullOrUndefined(Mi)||Bt(i,Mi,Ri))}function ie(t,i,n,o){e.isNullOrUndefined(n)||t.classList.add(n);var s=t.querySelector("svg");if(!e.isNullOrUndefined(s)){var l="Bootstrap"===i?parseFloat(s.style.height):parseFloat(s.style.height)/2;if(s.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var r=s.getAttribute("id");clearTimeout(li[""+r].timeOut)}Tt(i,t,l,o)}}var ne,oe,se,le,re,ae,he,de,pe,ce,ue,fe,me,ge,ye=!1,ve=function(){var t=function(e,i){return(t=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])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),be=function(t,e,i,n){var o,s=arguments.length,l=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(l=(s<3?o(l):s>3?o(e,i,l):o(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ee=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ve(i,t),be([e.Property("left")],i.prototype,"X",void 0),be([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),Oe={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},Ce=function(t){function i(e,i){return t.call(this,i,e)||this}return ve(i,t),i.prototype.onPropertyChanged=function(t,i){for(var n=0,o=Object.keys(t);n<o.length;n++)switch(o[n]){case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"zIndex":e.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var s=t.offsetX-i.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+s).toString()+"px";break;case"offsetY":var l=t.offsetY-i.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+l).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}},i.prototype.getModuleName=function(){return"popup"},i.prototype.resolveCollision=function(){this.checkCollision()},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(Oe.ROOT,Oe.RTL,Oe.OPEN,Oe.CLOSE),this.content=null,this.relateTo=null,Y(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(Oe.ROOT);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=e.formatUnit(this.width)),"auto"!==this.height&&(t.height=e.formatUnit(this.height)),e.setStyleAttribute(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},i.prototype.wireEvents=function(){e.Browser.isDevice&&e.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},i.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var n=i[t];e.EventHandler.add(n,"scroll",this.scrollRefresh,this)}},i.prototype.unwireEvents=function(){e.Browser.isDevice&&e.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},i.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var n=i[t];e.EventHandler.remove(n,"scroll",this.scrollRefresh)}},i.prototype.getRelateToElement=function(){var t=""===this.relateTo||e.isNullOrUndefined(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},i.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?e.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()){var i=this.isElementOnViewport(this.getRelateToElement(),t.target);i||this.targetInvisibleStatus?i&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},i.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),n=0;n<i.length;n++)if(!this.isElementVisible(t,i[n]))return!1;return!0},i.prototype.isElementVisible=function(t,i){var n=this.checkGetBoundingClientRect(t);if(!n.height||!n.width)return!1;if(e.isNullOrUndefined(this.checkGetBoundingClientRect(i))){var s=window,l={top:s.scrollY,left:s.scrollX,right:s.scrollX+s.outerWidth,bottom:s.scrollY+s.outerHeight},r=o(t),a={top:r.top,left:r.left,right:r.left+n.width,bottom:r.top+n.height},h={top:l.bottom-a.top,left:l.right-a.left,bottom:a.bottom-l.top,right:a.right-l.left};return h.top>0&&h.left>0&&h.right>0&&h.bottom>0}var d=i.getBoundingClientRect();return!(n.bottom<d.top||n.bottom>d.bottom||n.right>d.right||n.left<d.left)},i.prototype.preRender=function(){},i.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(Oe.RTL):this.element.classList.remove(Oe.RTL)},i.prototype.setContent=function(){if(!e.isNullOrUndefined(this.content))if(this.element.innerHTML="","string"==typeof this.content)this.element.textContent=this.content;else{var t=this.getRelateToElement(),i=this.content.props;t.classList.contains("e-dropdown-btn")&&!e.isNullOrUndefined(i)||this.element.appendChild(this.content)}},i.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},i.prototype.refreshPosition=function(t,i){e.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),i||this.checkCollision()},i.prototype.reposition=function(){var t,i,n=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var o=void 0,s=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(o=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=s,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=o)}else if(n){var l=this.element.clientHeight,s=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(n,this.element,this.position,this.offsetX,this.offsetY,l),this.element.style.display=s}else t={left:0,top:0};e.isNullOrUndefined(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},i.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},i.prototype.getAnchorPosition=function(t,i,s,l,r,a){void 0===a&&(a=0);var h=this.checkGetBoundingClientRect(i),d=this.checkGetBoundingClientRect(t);if(e.isNullOrUndefined(h)||e.isNullOrUndefined(d))return null;var p=t,c={left:0,top:0};switch(i.offsetParent&&"BODY"===i.offsetParent.tagName&&"BODY"===t.tagName?c=o(t):(i.classList.contains("e-dlg-modal")&&"BODY"!==p.tagName&&(i=i.parentElement),c=n(p,i)),s.X){default:case"left":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.left+=window.innerWidth/2-h.width/2:"container"===this.targetType?c.left+=d.width/2-h.width/2:c.left+=d.width/2;break;case"right":if(i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType)c.left+=window.innerWidth-h.width;else if("container"===this.targetType){var u=1,f=O(i);if(f){var m=getComputedStyle(f).transform;"none"!==m&&(u=new DOMMatrix(m).a),"none"!==getComputedStyle(f).zoom&&(u*=E(document.body))}c.left+=(d.width-h.width)/u}else c.left+=d.width}switch(s.Y){default:case"top":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight/2-h.height/2:"container"===this.targetType?c.top+=d.height/2-h.height/2:c.top+=d.height/2;break;case"bottom":i.classList.contains("e-dlg-modal")&&"BODY"===p.tagName&&"container"===this.targetType?c.top+=window.innerHeight-h.height:"container"!==this.targetType||i.classList.contains("e-dialog")?"container"===this.targetType&&i.classList.contains("e-dialog")?c.top+=d.height-a:c.top+=d.height:c.top+=d.height-h.height}return c.left+=l,c.top+=r,c},i.prototype.callFlip=function(t){var e=this.getRelateToElement();v(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},i.prototype.callFit=function(t){if(0!==y(this.element,this.viewPortElement).length)if(e.isNullOrUndefined(this.viewPortElement)){var i=g(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=i.left+"px"),t.Y&&(this.element.style.top=i.top+"px")}else{var n=this.checkGetBoundingClientRect(this.element),o=this.checkGetBoundingClientRect(this.viewPortElement);if(e.isNullOrUndefined(n)||e.isNullOrUndefined(o))return null;t&&!0===t.Y&&(o.top>n.top?this.element.style.top="0px":o.bottom<n.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(n.bottom-o.bottom)+"px")),t&&!0===t.X&&(o.right<n.right?this.element.style.left=parseInt(this.element.style.left,10)-(n.right-o.right)+"px":o.left>n.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(o.left-n.left)+"px"))}},i.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})))},i.prototype.show=function(t,i){var n=this;if(this.wireEvents(),this.getRelateToElement(),1e3===this.zIndex||!e.isNullOrUndefined(i)){var o=e.isNullOrUndefined(i)?this.element:i;this.zIndex=X(o),e.setStyleAttribute(this.element,{zIndex:this.zIndex})}t=e.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(e.removeClass([this.element],Oe.CLOSE),e.addClass([this.element],Oe.OPEN),this.checkCollision(),e.removeClass([this.element],Oe.OPEN),e.addClass([this.element],Oe.CLOSE)),e.isNullOrUndefined(t)?(e.removeClass([this.element],Oe.CLOSE),e.addClass([this.element],Oe.OPEN),this.trigger("open")):(t.begin=function(){n.isDestroyed||(e.removeClass([n.element],Oe.CLOSE),e.addClass([n.element],Oe.OPEN))},t.end=function(){n.isDestroyed||n.trigger("open")},new e.Animation(t).animate(this.element))},i.prototype.hide=function(t){var i=this;t=e.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,e.isNullOrUndefined(t)?(e.removeClass([this.element],Oe.OPEN),e.addClass([this.element],Oe.CLOSE),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],Oe.OPEN),e.addClass([i.element],Oe.CLOSE),i.trigger("close"))},new e.Animation(t).animate(this.element)),this.unwireEvents()},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),j(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var n=getComputedStyle(i);"fixed"!==n.position&&"sticky"!==n.position||e.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)?e.formatUnit(window.scrollY-parseInt(this.element.style.top,10)):e.formatUnit(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,!e.isNullOrUndefined(this.element)&&e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===n.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},be([e.Property("auto")],i.prototype,"height",void 0),be([e.Property("auto")],i.prototype,"width",void 0),be([e.Property(null)],i.prototype,"content",void 0),be([e.Property("container")],i.prototype,"targetType",void 0),be([e.Property(null)],i.prototype,"viewPortElement",void 0),be([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),be([e.Property("")],i.prototype,"relateTo",void 0),be([e.Complex({},Ee)],i.prototype,"position",void 0),be([e.Property(0)],i.prototype,"offsetX",void 0),be([e.Property(0)],i.prototype,"offsetY",void 0),be([e.Property(1e3)],i.prototype,"zIndex",void 0),be([e.Property(!1)],i.prototype,"enableRtl",void 0),be([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),be([e.Property(null)],i.prototype,"showAnimation",void 0),be([e.Property(null)],i.prototype,"hideAnimation",void 0),be([e.Event()],i.prototype,"open",void 0),be([e.Event()],i.prototype,"close",void 0),be([e.Event()],i.prototype,"targetExitViewport",void 0),i=be([e.NotifyPropertyChanges],i)}(e.Component),we=["north-west","north","north-east","west","east","south-west","south","south-east"],Ne="e-resize-handle",Te="e-focused-handle",Pe="e-dlg-resizable",Se=["e-restrict-left"],xe="e-resize-viewport",Ue=["north","west","east","south"],He=0,Be=0,ke=0,Le=0,Me=0,Re=0,ze=null,Ie=null,Ae=null,De=0,Ye=!0,je=0,Xe=!0,Fe=function(){var t=function(e,i){return(t=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])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qe=function(t,e,i,n){var o,s=arguments.length,l=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(l=(s<3?o(l):s>3?o(e,i,l):o(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},We=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Fe(i,t),qe([e.Property(!0)],i.prototype,"isFlat",void 0),qe([e.Property()],i.prototype,"buttonModel",void 0),qe([e.Property("Button")],i.prototype,"type",void 0),qe([e.Event()],i.prototype,"click",void 0),i}(e.ChildProperty),Ve=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Fe(i,t),qe([e.Property("Fade")],i.prototype,"effect",void 0),qe([e.Property(400)],i.prototype,"duration",void 0),qe([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),_e="e-dialog",Ze="e-dlg-target",Ke="e-scroll-disabled",Ge="e-dlg-fullscreen",Je="Information",Qe="e-scroll-disabled",$e="e-alert-dialog",ti="e-confirm-dialog",ei=function(t){function n(e,i){var n=t.call(this,e,i)||this;return n.needsID=!0,n}return Fe(n,t),n.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=e.formatUnit(this.minHeight)),this.enableResize&&(this.setResize(),this.isModal&&(this.isModelResize=!0),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},n.prototype.initializeValue=function(){this.dlgClosedBy="user action"},n.prototype.preRender=function(){var t=this;this.initializeValue(),this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.dlgClosedBy="close icon",t.hide(e)},this.dlgOverlayClickEventHandler=function(e){t.dlgClosedBy="overlayClick",e.preventFocus=!1,t.trigger("overlayClick",e,function(e){e.preventFocus||t.focusContent(),t.dlgClosedBy="user action"})};var i={close:"Close"};if(this.l10n=new e.L10n("dialog",i,this.locale),this.checkPositionData(),e.isNullOrUndefined(this.target)){var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=n}},n.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)},n.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},n.prototype.checkPositionData=function(){if(!e.isNullOrUndefined(this.position)){if(!e.isNullOrUndefined(this.position.X)&&"number"!=typeof this.position.X&&(t=this.isNumberValue(this.position.X))){i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=i}if(!e.isNullOrUndefined(this.position.Y)&&"number"!=typeof this.position.Y){var t=this.isNumberValue(this.position.Y);if(t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=i}}}},n.prototype.getEle=function(t,e){for(var i=void 0,n=0;n<t.length;n++)if(t[n].classList.contains(e)){i=t[n];break}return i},n.prototype.getMinHeight=function(){var t="0px",i="0px";e.isNullOrUndefined(this.element.querySelector(".e-dlg-header-content"))||(t=getComputedStyle(this.headerContent).height);var n=this.getEle(this.element.children,"e-footer-content");e.isNullOrUndefined(n)||(i=getComputedStyle(n).height);var o=parseInt(t.slice(0,t.indexOf("p")),10),s=parseInt(i.slice(0,i.indexOf("p")),10);return st(o+30+(isNaN(s)?0:s)),o+30+s},n.prototype.onResizeStart=function(t,i){if(i.trigger("resizeStart",t),!t.cancel&&this.isModelResize&&!e.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);var n=this.getTargetContainer(this.target);n instanceof Element&&"rtl"===window.getComputedStyle(n).getPropertyValue("direction")?this.element.style.position="absolute":this.element.style.position="relative",this.element.classList.contains("e-restrict-left")&&this.element.classList.remove("e-restrict-left"),this.isModelResize=!1}return t.cancel},n.prototype.onResizing=function(t,e){e.trigger("resizing",t)},n.prototype.onResizeComplete=function(t,e){e.trigger("resizeStop",t),this.updatePersistData()},n.prototype.setResize=function(){if(this.enableResize){this.element.classList.add("e-dlg-resizable");for(var t=getComputedStyle(this.element).minHeight,e=getComputedStyle(this.element).minWidth,i="",n=0;n<this.resizeHandles.length;n++){if("All"===this.resizeHandles[n]){i="south north east west north-east north-west south-east south-west";break}var o="";switch(this.resizeHandles[n].toString()){case"SouthEast":o="south-east";break;case"SouthWest":o="south-west";break;case"NorthEast":o="north-east";break;case"NorthWest":o="north-west";break;default:o=this.resizeHandles[n].toString()}i+=o.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("e-restrict-left"):this.isModal&&this.target===document.body&&this.element.classList.add("e-resize-viewport"),q({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 at(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove("e-restrict-left"):this.element.classList.remove("e-resize-viewport"),this.element.classList.remove("e-dlg-resizable")},n.prototype.getFocusElement=function(t){var e=t.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:e[e.length-1]}},n.prototype.keyDown=function(t){var i=this;if(9===t.keyCode&&this.isModal){var n=void 0;if(e.isNullOrUndefined(this.btnObj)||(n=this.btnObj[this.btnObj.length-1]),e.isNullOrUndefined(this.btnObj)&&!e.isNullOrUndefined(this.ftrTemplateContent)&&(n=this.getFocusElement(this.ftrTemplateContent),e.isNullOrUndefined(this.btnObj)&&(!n||e.isNullOrUndefined(n.element)))){var o=this.element.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');if(o.length>0){for(var s=[],l=0;l<o.length;l++)o[l].hasAttribute("tabindex")&&"-1"===o[l].getAttribute("tabindex")||s.push(o[l]);s.length>0&&document.activeElement===s[s.length-1]&&(t.preventDefault(),this.focusableElements(this.element).focus())}}e.isNullOrUndefined(this.btnObj)&&e.isNullOrUndefined(this.ftrTemplateContent)&&!e.isNullOrUndefined(this.contentEle)&&(n=this.getFocusElement(this.contentEle)),e.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(),e.isNullOrUndefined(n)||n.element.focus())}var r=document.activeElement,a=["input","textarea"].indexOf(r.tagName.toLowerCase())>-1,h=!1;if(a||(h=r.hasAttribute("contenteditable")&&"true"===r.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape){this.dlgClosedBy="escape";var d=document.querySelector(".e-popup-open:not(.e-dialog)");(e.isNullOrUndefined(d)||d.classList.contains("e-toolbar-pop")||d.classList.contains("e-slider-tooltip"))&&this.hide(t)}if(13===t.keyCode&&!t.ctrlKey&&"textarea"!==r.tagName.toLowerCase()&&a&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===r.tagName.toLowerCase()||h)&&!e.isNullOrUndefined(this.primaryButtonEle)){var p;this.buttons.some(function(t,i){p=i;var n=t.buttonModel;return!e.isNullOrUndefined(n)&&!0===n.isPrimary})&&"function"==typeof this.buttons[p].click&&!this.primaryButtonEle.disabled&&setTimeout(function(){i.buttons[p].click.call(i,t)})}},n.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||e.addClass([this.element],_e),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},n.prototype.initRender=function(){var t=this;if(this.initialRender=!0,this.isBlazorServerRender()||e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.setTargetContent(),""===this.header||e.isNullOrUndefined(this.header)||this.setHeader(),this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?e.isNullOrUndefined(this.buttons[0])||e.isNullOrUndefined(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate(),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging(),e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),!0!==this.element.classList.contains($e)&&!0!==this.element.classList.contains(ti)&&!e.isNullOrUndefined(this.element.parentElement)){var i=this.isModal?this.dlgContainer.parentElement:this.element.parentElement;this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),i.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)}if(e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new Ce(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(e){var i={container:t.isModal?t.dlgContainer:t.element,element:t.element,target:t.target,preventFocus:!1};t.enableResize&&t.resetResizeIcon(),t.trigger("open",i,function(e){e.preventFocus||t.focusContent()})},close:function(i){t.isModal&&e.addClass([t.dlgOverlay],"e-fade"),t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closeArgs);var n=document.activeElement;e.isNullOrUndefined(n)||e.isNullOrUndefined(n.blur)||n.blur(),e.isNullOrUndefined(t.storeActiveElement)||e.isNullOrUndefined(t.storeActiveElement.focus)||t.closeArgs.preventFocus||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||(e.addClass([this.element],"e-popup-close"),this.is