@syncfusion/ej2-layouts 26.1.35 → 26.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-layouts.umd.min.js
3
- * version : 26.1.35
3
+ * version : 26.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Base)}(this,function(e,v){"use strict";W=function(e,t){return(W=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var W,t,T=function(e,t){function i(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},i=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},m="e-splitter",N="e-splitter-horizontal",Y="e-splitter-vertical",h="e-pane",a="e-pane-horizontal",l="e-pane-vertical",r="e-split-bar",X="e-split-bar-horizontal",U="e-split-bar-vertical",y="e-static-pane",o="e-scrollable",p="e-resize-handler",D="e-resizable-split-bar",n="e-split-bar-hover",d="e-split-bar-active",c="e-hide-handler",j="e-disabled",V="e-rtl",q="e-collapsible",u="e-navigate-arrow",g="e-arrow-right",f="e-arrow-left",P="e-arrow-up",C="e-arrow-down",S="e-icon-hidden",x="e-expanded",b="e-collapsed",F="e-pane-hidden",w="e-resizable",Q="e-last-bar",_=(t=v.ChildProperty,T(s,t),i([v.Property()],s.prototype,"size",void 0),i([v.Property(!1)],s.prototype,"collapsible",void 0),i([v.Property(!1)],s.prototype,"collapsed",void 0),i([v.Property(!0)],s.prototype,"resizable",void 0),i([v.Property(null)],s.prototype,"min",void 0),i([v.Property(null)],s.prototype,"max",void 0),i([v.Property()],s.prototype,"content",void 0),i([v.Property("")],s.prototype,"cssClass",void 0),s);function s(){return null!==t&&t.apply(this,arguments)||this}G=v.Component,T(z,G),z.prototype.onPropertyChanged=function(t,e){if(this.element.classList.contains(m))for(var i=0,s=Object.keys(t);i<s.length;i++)switch(s[i]){case"height":this.setSplitterSize(this.element,t.height,"height");break;case"width":this.setSplitterSize(this.element,t.width,"width");break;case"cssClass":this.setCssClass(this.element,t.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(t.separatorSize);break;case"orientation":this.changeOrientation(t.orientation);break;case"paneSettings":if(t.paneSettings instanceof Array&&e.paneSettings instanceof Array)this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else{var n=Object.keys(t.paneSettings),a=n.some(function(e){return!v.isNullOrUndefined(t.paneSettings[e].content)});if(this.isReact&&a){for(var l=0,r=0;r<this.paneSettings.length;r++)"function"==typeof this.paneSettings[r].content&&(l+=1);l===this.paneSettings.length&&this.clearTemplate()}for(var o=0;o<n.length;o++)for(var h=parseInt(Object.keys(t.paneSettings)[o],10),p=Object.keys(t.paneSettings[h]).length,d=0;d<p;d++){var c=Object.keys(t.paneSettings[h])[d];switch(c){case"content":var u=Object(t.paneSettings[h])[""+c];v.isNullOrUndefined(u)||(this.allPanes[h].innerHTML="",this.setTemplate(u,this.allPanes[h]));break;case"resizable":u=Object(t.paneSettings[h])[""+c];this.resizableModel(h,u);break;case"collapsible":this.collapsibleModelUpdate(h);break;case"collapsed":t.paneSettings[h].collapsed?this.isCollapsed(h):this.collapsedOnchange(h);break;case"cssClass":this.setCssClass(this.allPanes[h],t.paneSettings[h].cssClass);break;case"size":var g=Object(t.paneSettings[h])[""+c];""===g||v.isNullOrUndefined(g)||this.updatePaneSize(g,h)}}}break;case"enableRtl":this.setRTL(t.enableRtl)}},z.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i=[],s=0,n=0;n<this.allPanes.length;n++)this.paneSettings[n].size||""===this.allPanes[n].innerText?this.paneSettings[n].size&&(a="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(i[s]=n,s++);for(var a="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+a:this.allBars[0].offsetHeight*this.allBars.length+a,l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-a-2*this.border)/i.length,r=0;r<i.length;r++)""!==this.allPanes[i[r]].style.flexBasis&&(this.allPanes[i[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(y)},z.prototype.initializeValues=function(){this.allPanes=[],this.paneOrder=[],this.separatorOrder=[],this.allBars=[],this.previousCoordinates={},this.currentCoordinates={},this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1,this.panesDimensions=[],this.border=0,this.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],this.validElementAttributes=["data-orientation","data-width","data-height"],this.iconsDelay=300,this.templateElement=[],this.collapseFlag=!1,this.expandFlag=!0},z.prototype.preRender=function(){this.initializeValues(),this.onReportWindowSize=this.reportWindowSize.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onTouchMoveHandler=this.onMouseMove.bind(this),this.onTouchEndHandler=this.onMouseUp.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,v.removeClass([this.wrapper],["e-control","e-lib",m]);var e="Horizontal"===this.orientation?N:Y,e=(v.addClass([this.element],e),v.Browser.info.name);this.setCssClass(this.element,"msie"===e?"e-ie":""),v.Browser.isDevice&&v.addClass([this.element],"e-splitter-touch")},z.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},z.prototype.getModuleName=function(){return"splitter"},z.prototype.render=function(){this.checkDataAttributes(),this.setCssClass(this.element,this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setPaneSettings(),this.setRTL(this.enableRtl),this.enableReversePanes&&this.setReversePane(),this.collapseFlag=!0,this.isCollapsed(),this.collapseFlag=!1,v.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),v.EventHandler.add(this.element,"keydown",this.onMove,this)},z.prototype.onDocumentClick=function(e){e.target.classList.contains(r)||v.isNullOrUndefined(this.currentSeparator)||(this.currentSeparator.classList.remove(n),this.currentSeparator.classList.remove(d))},z.prototype.checkPaneSize=function(e){var t,i,s="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,n="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,a=v.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;0<this.previousPane.style.flexBasis.indexOf("%")||0<this.previousPane.style.flexBasis.indexOf("p")||0<this.nextPane.style.flexBasis.indexOf("%")?(t=this.updatePaneFlexBasis(this.previousPane),i=this.updatePaneFlexBasis(this.nextPane),this.totalPercent=t+i,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||v.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&0<n&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(i-1+"%")?(this.previousPane.style.flexBasis=t+1+"%",this.nextPane.style.flexBasis=i-1+"%"):(37===e.keyCode||38===e.keyCode)&&0<s&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(t-1+"%")&&(this.previousPane.style.flexBasis=t-1+"%",this.nextPane.style.flexBasis=i+1+"%"))):(this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||v.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&0<n&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<n+a?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=s+a+"px",this.nextPane.style.flexBasis=n<a?"0px":n-a+"px"):(37===e.keyCode||38===e.keyCode)&&0<s&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<s-a&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=s<a?"0px":s-a+"px",this.nextPane.style.flexBasis=n+a+"px")))},z.prototype.onMove=function(e){var t,i,s,n;1<this.allPanes.length&&(t=this.getSeparatorIndex(this.currentSeparator),i=this.previousPane.classList.contains(b),s=this.previousPane.classList.contains(x),n=this.nextPane.classList.contains(b),("Horizontal"!==this.orientation&&38===e.keyCode||"Horizontal"===this.orientation&&39===e.keyCode||"Horizontal"===this.orientation&&37===e.keyCode||"Horizontal"!==this.orientation&&40===e.keyCode)&&(!s&&!n&&!i||s&&!n)&&document.activeElement.classList.contains(r)&&this.paneSettings[t].resizable&&this.paneSettings[t+1].resizable?(e.preventDefault(),this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[t].collapsible&&document.activeElement.classList.contains(r)&&this.currentSeparator.classList.contains(d)&&(this.previousPane.classList.contains(b)?this.expand(t):this.collapse(t),v.addClass([this.currentSeparator],d)))},z.prototype.getMinInPixel=function(e){var t;return v.isNullOrUndefined(e)?0:(t=this.convertPixelToNumber(e.toString()),0<e.indexOf("%")&&(t=this.convertPercentageToPixel(e)),this.convertPixelToNumber(t.toString()))},z.prototype.sanitizeHelper=function(e){var t;return this.enableHtmlSanitizer&&(t=v.SanitizeHtmlHelper.beforeSanitize(),v.extend(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!v.isNullOrUndefined(t.helper)?e=t.helper(e):t.cancel||(e=v.SanitizeHtmlHelper.serializeValue(t,e))),e},z.prototype.checkDataAttributes=function(){for(var e,t=0;t<this.validElementAttributes.length;t++)a=this.element.getAttribute(this.validElementAttributes[t]),v.isNullOrUndefined(a)||(e=this.removeDataPrefix(this.validElementAttributes[t]),this[e]=a);for(var i=0;i<this.element.children.length;i++)for(var s=0;s<this.validDataAttributes.length;s++){var n,a=this.element.children[i].getAttribute(this.validDataAttributes[s]);!v.isNullOrUndefined(a)&&(a="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[s]))||"resizable"===e?"true"===a:a,v.isNullOrUndefined(this.paneSettings[i])&&(this.paneSettings[i]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1}),n=this.paneSettings[i][e],"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[i][e]=a),v.isNullOrUndefined(n)||""===n)&&(this.paneSettings[i][e]=a)}},z.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach(function(e){v.detach(e)}),this.restoreElem()},z.prototype.setPaneSettings=function(){for(var e=this.allPanes.length,t=[],i={size:"",min:null,max:null,content:"",resizable:!0,collapsed:!1,collapsible:!1,cssClass:""},s=0;s<e;s++)v.isNullOrUndefined(this.paneSettings[s])?t[s]=i:t[s]=this.paneSettings[s];this.setProperties({paneSettings:t},!0)},z.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector("."+u+"."+t)},z.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},z.prototype.setRTL=function(e){e?v.addClass([this.element],V):v.removeClass([this.element],V)},z.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),v.addClass([this.allBars[this.allBars.length-1]],Q),v.removeClass([this.allBars[0]],Q),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},z.prototype.setSplitterSize=function(e,t,i){i="width"===i?{width:v.formatUnit(t)}:{height:v.formatUnit(t)};v.setStyleAttribute(e,i)},z.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},z.prototype.setCssClass=function(e,t){t&&v.addClass([e],t.split(-1<t.indexOf(",")?",":" "))},z.prototype.hideResizer=function(e){v.addClass([v.select("."+p,e)],c)},z.prototype.showResizer=function(e){!v.isNullOrUndefined(this.previousPane)&&this.previousPane.classList.contains(w)&&!v.isNullOrUndefined(this.nextPane)&&this.nextPane.classList.contains(w)&&v.removeClass([v.select("."+p,e)],c)},z.prototype.resizableModel=function(e,t){var i=e===this.allBars.length?e-1:e,s=e;v.EventHandler.remove(this.allBars[i],"mousedown",this.onMouseDown),t?(v.EventHandler.add(this.allBars[i],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[i]),v.removeClass([v.select("."+p,this.allBars[i])],c),this.allBars[i].classList.add(D),(e===this.allBars.length?this.allPanes[e]:this.allPanes[i]).classList.add(w),this.updateResizablePanes(s))):(this.updateResizablePanes(s),this.hideResizer(this.allBars[i]),this.allBars[i].classList.remove(D),(e===this.allBars.length?this.allPanes[e]:this.allPanes[i]).classList.remove(w))},z.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,f):this.checkArrow(t,P),s="Horizontal"===this.orientation?this.checkArrow(t,g):this.checkArrow(t,C);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},z.prototype.collapseArrow=function(e,t){return v.selectAll("."+t,this.allBars[e])[0]},z.prototype.updateIsCollapsed=function(e,t,i){var s,n;v.isNullOrUndefined(e)||(n=(s=e===this.allBars.length)?e-1:e,(!s&&this.allPanes[e+1].classList.contains(b)&&0!==e?this.collapseArrow(n-1,i):s?this.collapseArrow(n,i):this.collapseArrow(n,t)).click())},z.prototype.isCollapsed=function(a){var l=this;if(v.isNullOrUndefined(a)||!this.paneSettings[a].collapsed||!v.isNullOrUndefined(this.allPanes[a].classList.contains(b))){if(this.expandFlag=!1,v.isNullOrUndefined(a)){for(var e=0;e<this.allPanes.length;e++)!v.isNullOrUndefined(this.paneSettings[e])&&this.paneSettings[e].collapsed&&this.updateIsCollapsed(e,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(var t,e=this.allPanes.length-1;0<=e;e--)v.isNullOrUndefined(this.paneSettings[e])||!this.paneSettings[e].collapsed||this.allPanes[e].classList.contains(b)||(t="Horizontal"===this.orientation?g:C,0!==e&&this.collapseArrow(e-1,t).click(),this.nextPane.classList.contains(b))||this.collapseArrow(e-1,t).click()}else{this.collapseFlag=!0;var i=a===this.allBars.length,s=i?a-1:a,r={target:!i&&this.allPanes[a+1].classList.contains(b)&&0!==a?this.collapseArrow(s-1,this.targetArrows().lastBarArrow):i?this.collapseArrow(s,this.targetArrows().lastBarArrow):this.collapseArrow(s,this.targetArrows().collapseArrow)},i=this.beforeAction(r);this.trigger("beforeCollapse",i,function(e){if(!e.cancel){for(var t=[],i=(t[0]=a,1),s=0;s<l.allPanes.length;s++)l.allPanes[s].classList.contains(b)&&(t[i]=s,i++);t=t.sort(),l.updateIsCollapsed(a,l.targetArrows().collapseArrow,l.targetArrows().lastBarArrow);for(s=0;s<t.length;s++)l.allPanes[t[s]].classList.contains(b)||l.updateIsCollapsed(t[s],l.targetArrows().collapseArrow,l.targetArrows().lastBarArrow);for(var n,s=t.length;0<s;s--)l.allPanes[t[s-1]].classList.contains(b)||(n=l.targetArrows(),l.updateIsCollapsed(t[s-1],n.collapseArrow,n.lastBarArrow));e=l.afterAction(r);l.trigger("collapsed",e),l.collapseFlag=!1}})}this.expandFlag=!0}},z.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?f:P,lastBarArrow:"Vertical"===this.orientation?C:g}},z.prototype.collapsedOnchange=function(e){v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains(b)||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},z.prototype.isEnabled=function(e){e?v.removeClass([this.element],j):v.addClass([this.element],j)},z.prototype.setSeparatorSize=function(e){for(var t=v.isNullOrUndefined(e)?"auto":e+"px",i="Horizontal"===this.orientation?X:U,s=0;s<this.allBars.length;s++){var n=v.selectAll("."+i,this.element)[s],a=v.selectAll("."+p,n)[0];"Horizontal"===this.orientation?(n.style.width=t,v.isNullOrUndefined(a)||(a.style.width=t)):(n.style.height=t,v.isNullOrUndefined(a)||(a.style.height=t))}},z.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?N:Y),this.element.classList.add(t?Y:N);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?a:l),this.allPanes[i].classList.add(t?l:a);for(i=0;i<this.allBars.length;i++)v.detach(this.allBars[i]);this.allBars=[],this.addSeparator(this.element)},z.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},z.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(h)&&t.push(e[i]);return t},z.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},z.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},z.prototype.getOrderPane=function(e){for(var t,i=0;i<this.element.children.length;i++)parseInt(this.element.children[i].style.order,10)===e&&(t=this.element.children[i]);return t},z.prototype.getOrderIndex=function(e,t){for(var i,s="pane"===t?this.allPanes:this.allBars,n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},z.prototype.updateSeparatorSize=function(e){var t=v.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=t:e.style.height=t},z.prototype.addResizeHandler=function(e){var t=this.createElement("div");v.addClass([t],[p,"e-icons"]),this.updateSeparatorSize(t),e.appendChild(t)},z.prototype.getHeight=function(e){this.height;return(""!==e.style.height&&"100%"===this.height?e.style:this).height},z.prototype.getWidth=function(e){this.width;return(""!==e.style.width&&"100%"===this.width?e.style:this).width},z.prototype.setDimension=function(e,t){v.setStyleAttribute(this.element,{height:e,width:t})},z.prototype.updateCollapseIcons=function(e,t,i){v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?v.removeClass([i],[S]):v.addClass([i],[S]),v.isNullOrUndefined(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?v.removeClass([t],[S]):v.addClass([t],[S])),v.isNullOrUndefined(this.paneSettings[e+1]))||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?v.removeClass([t],[S]):v.addClass([t],[S]))},z.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=f,this.rightArrow=g):(this.leftArrow=P,this.rightArrow=C)},z.prototype.createSeparator=function(e){var t=this.createElement("div"),i=(this.allBars.push(t),this.createElement("button")),s=this.createElement("button"),n=(i.setAttribute("tabindex","-1"),s.setAttribute("tabindex","-1"),i.setAttribute("aria-label","Toggle navigation"),s.setAttribute("aria-label","Toggle navigation"),i.setAttribute("type","button"),s.setAttribute("type","button"),v.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px"),a=this;return"Horizontal"===this.orientation?(this.updateIconClass(),v.addClass([s],[u,f,S]),v.addClass([i],[u,g,S]),v.addClass([t],[r,X]),t.style.width=n):(v.addClass([i],[u,C,S]),v.addClass([s],[u,P,S]),v.addClass([t],[r,U]),this.updateIconClass(),t.style.height=n),this.addMouseActions(t),t.appendChild(s),this.addResizeHandler(t),t.appendChild(i),this.updateCollapseIcons(e,i,s),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),this.enableReversePanes?t.setAttribute("dir","ltr"):t.removeAttribute("dir"),t.addEventListener("focus",function(){t.classList.add(d),a.currentSeparator=t,a.getPaneDetails()}),t.addEventListener("blur",function(){t.classList.remove(d)}),t},z.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add(w):this.allPanes[e].classList.remove(w)},z.prototype.addSeparator=function(e){for(var t,i,s=this.allPanes.length,n=e.children,a=0;a<s;a++)a<s-1?(i=this.createSeparator(a),v.setStyleAttribute(i,{order:2*a+1}),this.separatorOrder.push(2*a+1),n[a].parentNode.appendChild(i),(this.currentSeparator=i).setAttribute("role","separator"),i.setAttribute("aria-valuenow",a.toString()),i.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),v.isNullOrUndefined(i)||(this.isResizable()?(v.EventHandler.add(i,"mousedown",this.onMouseDown,this),t="msie"===v.Browser.info.name?"pointerdown":"touchstart",v.EventHandler.add(i,t,this.onMouseDown,this),i.classList.add(D),this.updateResizablePanes(a)):v.addClass([v.select("."+p,i)],c))):(i&&v.addClass([i],Q),1<s&&this.updateResizablePanes(a));if("msie"===v.Browser.info.name)for(var l=this.element.querySelectorAll(".e-splitter .e-resize-handler"),a=0;a<l.length;a++){var r=v.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;l[a].style.paddingLeft=r/2+"px",l[a].style.paddingRight=r/2+"px"}},z.prototype.isResizable=function(){var e=!1;return e=!v.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!v.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||v.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])?!0:e},z.prototype.addMouseActions=function(e){var t,i,s=this;e.addEventListener("mouseenter",function(){t=setTimeout(function(){v.addClass([e],[n])},s.iconsDelay)}),e.addEventListener("mouseleave",function(){clearTimeout(t),v.removeClass([e],[n])}),e.addEventListener("mouseout",function(){clearTimeout(i)}),e.addEventListener("mouseover",function(){i=setTimeout(function(){v.addClass([e],[n])})})},z.prototype.getEventType=function(e){return-1<e.indexOf("mouse")?"mouse":"touch"},z.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},z.prototype.isSeparator=function(e){return!e.classList.contains(r)},z.prototype.isMouseEvent=function(e){var t=!1;return t="mouse"!==this.getEventType(e.type)&&(v.isNullOrUndefined(e.pointerType)||"mouse"!==this.getEventType(e.pointerType))?t:!0},z.prototype.updateCursorPosition=function(e,t){this.isMouseEvent(e)?this.changeCoordinates({x:e.pageX,y:e.pageY},t):(e="msie"!==v.Browser.info.name?e.touches[0]:e,this.changeCoordinates({x:e.pageX,y:e.pageY},t))},z.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},z.prototype.reportWindowSize=function(){var e=this,t=this.allPanes.length;if(document.body.contains(this.element)){for(var i=0;i<t;i++)v.isNullOrUndefined(this.paneSettings[i].size)&&this.allPanes[i].classList.remove(y),t-1===i&&this.element.querySelectorAll("."+y).length===t&&""===this.allPanes[i].style.flexBasis&&v.removeClass([this.allPanes[i]],y);0<t&&setTimeout(function(){e.updateSplitterSize(!0)},200)}else document.defaultView.removeEventListener("resize",this.onReportWindowSize)},z.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,a=0,l=n.length;a<l;a++)t+="Horizontal"===this.orientation?n[a].offsetWidth:n[a].offsetHeight;for(var r=0,l=this.allBars.length;r<l;r++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[r]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[r]).marginLeft,10):parseInt(getComputedStyle(this.allBars[r]).marginTop,10)+parseInt(getComputedStyle(this.allBars[r]).marginBottom,10);for(var o="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t),a=0,l=this.allPanes.length;a<l;a++)(""===this.allPanes[a].innerText?this.paneSettings[a].size&&""===this.allPanes[a].innerText:this.paneSettings[a].size||""===this.allPanes[a].innerText)||(i[s]=a,s++);for(var h=o/i.length,r=0,l=i.length;r<l;r++)""!==this.allPanes[i[r]].style.flexBasis&&(this.allPanes[i[r]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[r]].offsetWidth+h+"px":this.allPanes[i[r]].offsetHeight+h+"px");if(2===this.allPanes.length&&e)for(var p,d,c,u=this.allPanes.length,g=void 0,m=void 0,f=void 0,a=0;a<u;a++)v.isNullOrUndefined(this.paneSettings[a].min)||(g=this.convertPixelToNumber(this.paneSettings[a].min.toString()),0<this.paneSettings[a].min.indexOf("%")&&(g=this.convertPercentageToPixel(this.paneSettings[a].min)),p=this.convertPixelToNumber(g.toString()),("Horizontal"===this.orientation?this.allPanes[a].offsetWidth:this.allPanes[a].offsetHeight)<p&&(f=0===a?(m=this.allPanes[a],this.allPanes[a+1]):(m=this.allPanes[a],this.allPanes[a-1]),p=p-("Horizontal"===this.orientation?this.allPanes[a].offsetWidth:this.allPanes[a].offsetHeight),c=-1<m.style.flexBasis.indexOf("%"),d="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight,!v.isNullOrUndefined(m)&&""!==m.style.flexBasis&&m.classList.contains(y)&&(m.style.flexBasis=c?this.convertPixelToPercentage(d+p)+"%":d+p+"px"),c="Horizontal"===this.orientation?f.offsetWidth:f.offsetHeight,v.isNullOrUndefined(f)||""===f.style.flexBasis||f.classList.contains(y)||(f.style.flexBasis=-1<f.style.flexBasis.indexOf("%")?this.convertPixelToPercentage(c-p)+"%":c-p+"px")))},z.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===v.Browser.info.name?"pointermove":"touchmove",t="msie"===v.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(t,this.onTouchEndHandler,!0)},z.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===v.Browser.info.name?"pointermove":"touchmove",t="msie"===v.Browser.info.name?"pointerup":"touchend";document.removeEventListener("mousemove",this.onMouseMoveHandler,!0),document.removeEventListener("mouseup",this.onMouseUpHandler,!0),document.removeEventListener(e,this.onTouchMoveHandler,!0),document.removeEventListener(t,this.onTouchEndHandler,!0)},z.prototype.wireClickEvents=function(){v.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},z.prototype.clickHandler=function(e){e.target.classList.contains(u)||(0<(t=v.selectAll("."+m+" > ."+r+"."+n)).length&&v.removeClass(t,n),e.target.classList.add(n)),this.splitterDetails(e);var t=e.target;(t.classList.contains(f)||t.classList.contains(g)||t.classList.contains(C)||t.classList.contains(P))&&(this.nextPane.classList.contains(F)||this.previousPane.classList.contains(F)?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},z.prototype.expandAction=function(t){var i=this,e=this.beforeAction(t);this.expandFlag?this.trigger("beforeExpand",e,function(e){e.cancel||i.expandPane(t);e=i.afterAction(t);i.trigger("expanded",e)}):this.expandPane(t)},z.prototype.getIcon=function(e){return e.target.className.split(" ").filter(function(e){return e!==u&&e!==S})[0]},z.prototype.expandPane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+b).length,t=!this.previousPane.classList.contains(b)&&this.previousPane.classList.contains(y)&&!this.nextPane.classList.contains(b)&&!this.nextPane.classList.contains(x)&&this.nextPane.nextElementSibling.classList.contains(h)&&!this.nextPane.nextElementSibling.classList.contains(y)&&!(t===this.allPanes.length-2),i=[b,F],s=this.getIcon(e),n=s===f||s===P,a=n?this.nextPane:this.previousPane,l=n?this.previousPane:this.nextPane,n=n?this.nextPaneIndex:this.prevPaneIndex,i=(v.removeClass([a],i),a.setAttribute("aria-hidden","false"),this.element.querySelectorAll("."+b).length);if(0<i)l.classList.contains(b)||(v.addClass([l],x),l.setAttribute("aria-expanded","true"));else if(0===i)for(var r=0;r<this.allPanes.length;r++)this.allPanes[r].classList.contains(b)||(v.removeClass([this.allPanes[r]],x),this.allPanes[r].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(n,!1),this.updateIconsOnExpand(e,s),this.updateFlexGrow(),t&&(this.previousPane.classList.remove(x),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},z.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains(b)&&(e+=1);for(var i=e===this.allPanes.length-2,s=this.allPanes,n=0;n<s.length;n++)s[n].style.flexGrow="",i&&this.allPanes[n].classList.contains(b)&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains(x)?s[n].style.flexGrow="1":s[n].classList.contains(b)&&(s[n].style.flexGrow="0")},z.prototype.hideTargetBarIcon=function(e,t){v.addClass([v.select("."+t,e)],S)},z.prototype.showTargetBarIcon=function(e,t){v.removeClass([v.select("."+t,e)],S)},z.prototype.updateIconsOnCollapse=function(e,t){this.splitterProperty();var i,s,n=this.arrow,a=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,l=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;e.target.classList.contains(S)?(this.resizableModel(this.currentBarIndex,!1),v.isNullOrUndefined(a)||this.resizableModel(l,!1),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(v.isNullOrUndefined(a)||this.hideTargetBarIcon(a,n),this.showTargetBarIcon(this.currentSeparator,n)):(v.isNullOrUndefined(a)||this.hideTargetBarIcon(a,t),this.hideTargetBarIcon(this.currentSeparator,n))):(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)&&(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,t),v.isNullOrUndefined(a)||(s=this.getCollapseCount(e=l,i=l+1),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible&&(1===s?(this.hideTargetBarIcon(a,n),this.resizableModel(l,!1)):2===s&&(this.hideBarIcons(a),this.resizableModel(l,!1)),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible||this.hideTargetBarIcon(a,t)))):(this.showTargetBarIcon(this.currentSeparator,n),this.hideTargetBarIcon(this.currentSeparator,t),this.resizableModel(this.currentBarIndex,!1)))},z.prototype.collapseAction=function(t){var i=this,e=this.beforeAction(t);this.collapseFlag?this.collapsePane(t):this.trigger("beforeCollapse",e,function(e){e.cancel||(i.collapsePane(t),e=i.afterAction(t),i.trigger("collapsed",e))})},z.prototype.collapsePane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+b).length,t=this.previousPane.classList.contains(y)&&!this.previousPane.classList.contains(b)&&!this.nextPane.classList.contains(b)&&this.nextPane.nextElementSibling.classList.contains(h)&&!this.nextPane.nextElementSibling.classList.contains(y)&&!this.nextPane.nextElementSibling.classList.contains(b)&&!(t===this.allPanes.length-2)||this.nextPane.classList.contains(b)&&!this.previousPane.classList.contains(y)&&this.nextPane.classList.contains(y),i=[b,F],s=this.getIcon(e),n=s===f||s===P,a=n?this.previousPane:this.nextPane,l=n?this.nextPane:this.previousPane,n=n?this.prevPaneIndex:this.nextPaneIndex;if(v.removeClass([a],x),a.setAttribute("aria-expanded","false"),v.addClass([a],i),a.setAttribute("aria-hidden","true"),""===a.style.flexBasis)v.addClass([l],x),l.setAttribute("aria-expanded","true");else{for(var r=!0,o=0;o<this.allPanes.length;o++)if(!this.allPanes[o].classList.contains(b)&&""===this.allPanes[o].style.flexBasis&&!this.allPanes[o].classList.contains(b)&&!this.allPanes[o].classList.contains(x)){v.addClass([this.allPanes[o]],x),this.allPanes[o].setAttribute("aria-expanded","true"),r=!1;break}r&&(v.addClass([l],x),l.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(n,!0),this.updateIconsOnCollapse(e,s),this.updateFlexGrow(),t&&(this.nextPane.classList.remove(x),this.nextPane.style.flexGrow="")},z.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)v.isNullOrUndefined(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(y)},z.prototype.beforeAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}},z.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},z.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains(q),prevPaneCollapsible:this.previousPane.classList.contains(q),prevPaneExpanded:this.previousPane.classList.contains(x),nextPaneExpanded:this.nextPane.classList.contains(x),nextPaneCollapsed:this.nextPane.classList.contains(b),prevPaneCollapsed:this.previousPane.classList.contains(b),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},z.prototype.showCurrentBarIcons=function(){v.removeClass([v.select("."+this.arrow,this.currentSeparator)],S)},z.prototype.hideBarIcons=function(e){v.addClass([v.select("."+this.arrow,e)],S)},z.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains(b)&&(i+=1),this.allPanes[t].classList.contains(b)&&(i+=1),i},z.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},z.prototype.updateIconsOnExpand=function(e,t){this.splitterProperty();var i,s,n=this.arrow,a=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,l=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;e.target.classList.contains(S)?this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0):this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed||(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),v.isNullOrUndefined(a)||(s=this.getCollapseCount(e=l,i=l+1),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible&&(0===s?(this.showTargetBarIcon(a,t),this.showTargetBarIcon(a,n),this.checkResizableProp(e,i)&&this.resizableModel(l,!0)):1===s&&(this.hideBarIcons(a),this.allPanes[e].classList.contains(x)||this.allPanes[i].classList.contains(x)?this.showTargetBarIcon(a,n):this.showTargetBarIcon(a,t),this.resizableModel(l,!1))))):(this.hideTargetBarIcon(this.currentSeparator,t),this.showTargetBarIcon(this.currentSeparator,n),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)))},z.prototype.afterAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},z.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},z.prototype.getSeparatorIndex=function(e){var t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).indexOf(e)},z.prototype.getPrevBar=function(e){return this.allBars[e-1]},z.prototype.getNextBar=function(e){return this.allBars[e+1]},z.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},z.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(f)?g:f:this.arrow=e.target.classList.contains(P)?C:P,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},z.prototype.triggerResizing=function(e){e={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",e)},z.prototype.onMouseDown=function(t){var i=this,e=(t.preventDefault(),t.target);if(!e.classList.contains(u)){this.updateCurrentSeparator(e),v.addClass([this.currentSeparator],d),this.updateCursorPosition(t,"previous"),this.getPaneDetails();for(var e={element:this.element,event:t,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},s=0;s<this.element.querySelectorAll("iframe").length;s++)this.element.querySelectorAll("iframe")[s].style.pointerEvents="none";this.trigger("resizeStart",e,function(e){e.cancel||(i.wireResizeEvents(),i.checkPaneSize(t))})}},z.prototype.updatePaneFlexBasis=function(e){return 0<e.style.flexBasis.indexOf("%")?this.removePercentageUnit(e.style.flexBasis):""!==e.style.flexBasis?this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis)):(e="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight,this.convertPixelToPercentage(e))},z.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},z.prototype.convertPercentageToPixel=function(e,t){var i,s,e=e.toString();return i=-1<e.indexOf("%")?(i=parseFloat(e.slice(0,e.indexOf("%"))),s=void 0,s=v.isNullOrUndefined(t)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(t)],Math.ceil(s*(i/100))):parseInt(e,10)},z.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},z.prototype.convertPixelToNumber=function(e){return-1<(e=e.toString()).indexOf("p")?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},z.prototype.calcDragPosition=function(e,t){e=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t;return(1<e?1:e<0?0:e)*t},z.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var e="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+window.scrollX:this.element.getBoundingClientRect().top+window.scrollY,t="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(e,t)},z.prototype.getMinMax=function(e,t,i){var s="min"===i?0:null,n=null;return"min"===i?v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].min)||(n=this.paneSettings[e].min):v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].max)||(n=this.paneSettings[e].max),0<this.paneSettings.length&&!v.isNullOrUndefined(this.paneSettings[e])&&!v.isNullOrUndefined(n)?(0<n.indexOf("%")&&(n=this.convertPercentageToPixel(n).toString()),this.convertPixelToNumber(n)):s},z.prototype.getPreviousPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)+1:parseInt(this.currentSeparator.style.order,10)-1;return this.getOrderIndex(e,"pane")},z.prototype.getNextPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)-1:parseInt(this.currentSeparator.style.order,10)+1;return this.getOrderIndex(e,"pane")},z.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),1<this.allPanes.length&&(e=this.getPrevPane(this.order),t=this.getNextPane(this.order)),e&&t&&(this.previousPane=e,this.nextPane=t,this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex())},z.prototype.getPaneHeight=function(e){return("Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight).toString()},z.prototype.isValidSize=function(e){var t=!1;return t=!v.isNullOrUndefined(this.paneSettings[e])&&!v.isNullOrUndefined(this.paneSettings[e].size)&&-1<this.paneSettings[e].size.indexOf("%")?!0:t},z.prototype.getPaneDimensions=function(){this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},z.prototype.checkCoordinates=function(e,t){var i=!0;return i=e===this.previousCoordinates.x&&t===this.previousCoordinates.y?!1:i},z.prototype.isCursorMoved=function(e){return"mouse"!==this.getEventType(e.type)&&(v.isNullOrUndefined(e.pointerType)||"mouse"!==this.getEventType(e.pointerType))&&"msie"!==v.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},z.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==v.Browser.info.name?this.border:e},z.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);for(var e=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension),t=(this.getBorder(),e="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+e-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+e-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&-1<this.nextPaneHeightWidth.indexOf("p")?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&-1<this.previousPaneHeightWidth.indexOf("p")?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=e+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-e,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth&&(e=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e),this.calculateCurrentDimensions(),this.addStaticPaneClass(),0),i=0;i<this.paneSettings.length;i++)""===this.paneSettings[i].size?t+=1:""!==this.allPanes[i].style.flexBasis&&(this.paneSettings[i].size=this.allPanes[i].style.flexBasis);e=t===this.allPanes.length,e=(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||e?e?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,v.addClass([this.previousPane],y),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,v.addClass([this.nextPane],y)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(y)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(y)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth)):(e=this.allPanes.length%this.allBars.length,this.prevPaneIndex!==e&&this.nextPaneIndex===e?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,v.addClass([this.previousPane],y)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,v.addClass([this.nextPane],y))),""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis);2<this.allPanes.length||!e||this.updateSplitterSize()}},z.prototype.validateMinRange=function(e,t){var i,s=null;return v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].min)||(s=this.paneSettings[e].min.toString()),v.isNullOrUndefined(s)||(0<s.indexOf("%")&&(s=this.convertPercentageToPixel(s).toString()),t<(e=this.convertPixelToNumber(s))&&(this.totalWidth=this.totalWidth-(t-e<=0?0:t-e),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),i=e)),v.isNullOrUndefined(i)?t:i},z.prototype.validateMaxRange=function(e,t){var i,s=null;return v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].max)||(s=this.paneSettings[e].max.toString()),v.isNullOrUndefined(s)||(0<s.indexOf("%")&&(s=this.convertPercentageToPixel(s).toString()),(e=this.convertPixelToNumber(s))<t&&(this.totalWidth=this.totalWidth-(t-e),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),i=e)),v.isNullOrUndefined(i)?t:i},z.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth)},z.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},z.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},z.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(y)||""===this.previousPane.style.flexBasis||this.previousPane.classList.contains(x)||this.previousPane.classList.add(y),this.nextPane.classList.contains(y)||""===this.nextPane.style.flexBasis||this.nextPane.classList.contains(x)||this.nextPane.classList.add(y)},z.prototype.validateDraggedPosition=function(e,t,i){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,t=s-t,i=i+s,s=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),n=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),a=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),l=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),r=e;return i-n<e?r=i-n:e<t+s&&(r=t+s),v.isNullOrUndefined(a)?v.isNullOrUndefined(l)||e<i-l&&(r=i-l):t+a<e&&(r=t+a),r},z.prototype.onMouseUp=function(e){v.removeClass([this.currentSeparator],d),this.unwireResizeEvents();for(var e={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},t=0;t<this.element.querySelectorAll("iframe").length;t++)this.element.querySelectorAll("iframe")[t].style.pointerEvents="auto";this.trigger("resizeStop",e),this.enablePersistence&&((e=this.paneSettings)[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,e[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:e},!0))},z.prototype.panesDimension=function(e,t){var i,s=t.length;parseInt(this.getHeight(this.element),10),v.isNullOrUndefined(this.paneSettings[e])?v.setStyleAttribute(t[e],{order:2*e}):v.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,v.setStyleAttribute(t[e],{order:2*e})):(i=this.paneSettings[e].size,e<s&&(v.setStyleAttribute(t[e],{"flex-basis":i,order:2*e}),e<s-1&&""!==this.paneSettings[e].size?v.addClass([t[e]],y):this.sizeFlag||(t[e].style.flexBasis=null),e===s-1)&&this.sizeFlag&&""!==this.paneSettings[e].size&&v.addClass([t[e]],y)),this.paneOrder.push(2*e)},z.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},z.prototype.templateCompile=function(t,e){var i=this.createElement("div");this.compileElement(i,e,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach(function(e){t.appendChild(e)})},z.prototype.compileElement=function(t,e,i){if("string"==typeof e){if("."===e[0]||"#"===e[0]){var s=document.querySelector(e);if(!v.isNullOrUndefined(s))return this.templateElement.push(s),"none"===s.style.display&&s.style.removeProperty("display"),""===s.getAttribute("style")&&s.removeAttribute("style"),void t.appendChild(s)}e=e.trim()}var n,s=v.isNullOrUndefined(e.outerHTML)?v.compile(e):v.compile(e.outerHTML);v.isNullOrUndefined(s)||(n=s({},this,i,this.element.id+"content"+this.allPanes.length.toString(),!0)),!v.isNullOrUndefined(s)&&n&&0<n.length&&[].slice.call(n).forEach(function(e){t.appendChild(e)})},z.prototype.paneCollapsible=function(e,t){this.paneSettings[t].collapsible?v.addClass([e],q):v.removeClass([e],q)},z.prototype.createSplitPane=function(e){for(var t,i=e.children.length,s=0;s<this.paneSettings.length;s++)i<this.paneSettings.length&&(t=this.createElement("div"),this.element.appendChild(t),i+=1);var i=e.children.length,n=[].slice.call(e.children);if(this.sizeFlag=!1,0<i)for(s=0;s<i;s++)"DIV"!==n[s].nodeName&&"SPAN"!==n[s].nodeName||(this.allPanes.push(n[s]),"Horizontal"===this.orientation?v.addClass([n[s]],[h,a,o]):v.addClass([n[s]],[h,l,o]),this.panesDimension(s,n),v.isNullOrUndefined(this.paneSettings[s])||v.isNullOrUndefined(this.paneSettings[s].content)||this.setTemplate(this.paneSettings[s].content,n[s]),!v.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].cssClass&&this.setCssClass(n[s],this.paneSettings[s].cssClass),v.isNullOrUndefined(this.paneSettings[s]))||this.paneCollapsible(n[s],s)},z.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},z.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},z.prototype.destroy=function(){if(!this.isDestroyed){for(G.prototype.destroy.call(this),v.EventHandler.remove(document,"touchstart click",this.onDocumentClick),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize,!0);0<this.element.attributes.length;)this.element.removeAttribute(this.element.attributes[0].name);this.element.innerHTML=this.wrapper.innerHTML;for(var e=0;e<this.wrapper.attributes.length;e++)this.element.setAttribute(this.wrapper.attributes[e].name,this.wrapper.attributes[e].value);this.refreshing&&(v.addClass([this.element],["e-control","e-lib",m]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate(),this.allBars=[],this.allPanes=[],this.previousPane=null,this.nextPane=null,this.currentSeparator=null}},z.prototype.restoreElem=function(){if(0<this.templateElement.length)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},z.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?v.addClass([e],[h,a,o]):v.addClass([e],[h,l,o]),e},z.prototype.removePaneOrders=function(e){for(var t=this.element.childNodes,i=[],s=0;t.length<0;s++)t[s].classList.contains(e)&&i.push(t[s]);for(s=0;s<i.length;s++)i[s].style.removeProperty("order")},z.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},z.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)v.detach(this.allBars[e]);this.allBars=[]},z.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},z.prototype.addPane=function(e,t){var i=this.createElement("div"),i=this.addPaneClass(i),s=(t=t>this.allPanes.length+1?this.allPanes.length:t,{size:v.isNullOrUndefined(e.size)?"":e.size,min:v.isNullOrUndefined(e.min)?null:e.min,max:v.isNullOrUndefined(e.max)?null:e.max,content:v.isNullOrUndefined(e.content)?"":e.content,resizable:!!v.isNullOrUndefined(e.resizable)||e.resizable,collapsible:!v.isNullOrUndefined(e.collapsible)&&e.collapsible,collapsed:!v.isNullOrUndefined(e.collapsed)&&e.collapsed,cssClass:v.isNullOrUndefined(e.cssClass)?"":e.cssClass});this.paneSettings.splice(t,0,s),this.setProperties({paneSettings:this.paneSettings},!0),"Horizontal"===this.orientation?(this.element.insertBefore(i,this.element.querySelectorAll("."+a)[t]),this.removePaneOrders(a)):(this.element.insertBefore(i,this.element.querySelectorAll("."+l)[t]),this.removePaneOrders(l)),this.allPanes.splice(t,0,i),this.updatePanes(),this.setTemplate(this.paneSettings[t].content,i),this.setCssClass(this.allPanes[t],e.cssClass),this.allPanes[this.allPanes.length-1].classList.remove(y)},z.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var t="Horizontal"===this.orientation?a:l;v.isNullOrUndefined(this.element.querySelectorAll("."+t)[e])||(v.detach(this.element.querySelectorAll("."+t)[e]),this.allPanes.splice(e,1),this.removePaneOrders(t),this.updatePanes(),this.paneSettings.splice(e,1),this.setProperties({paneSettings:this.paneSettings},!0),0<this.allPanes.length&&this.allPanes[this.allPanes.length-1].classList.remove(y))},i([v.Property("100%")],z.prototype,"height",void 0),i([v.Property(!1)],z.prototype,"enableReversePanes",void 0),i([v.Property("100%")],z.prototype,"width",void 0),i([v.Property(!1)],z.prototype,"enablePersistence",void 0),i([v.Collection([],_)],z.prototype,"paneSettings",void 0),i([v.Property("Horizontal")],z.prototype,"orientation",void 0),i([v.Property("")],z.prototype,"cssClass",void 0),i([v.Property(!0)],z.prototype,"enabled",void 0),i([v.Property(!0)],z.prototype,"enableHtmlSanitizer",void 0),i([v.Property(null)],z.prototype,"separatorSize",void 0),i([v.Event()],z.prototype,"beforeSanitizeHtml",void 0),i([v.Event()],z.prototype,"created",void 0),i([v.Event()],z.prototype,"resizeStart",void 0),i([v.Event()],z.prototype,"resizing",void 0),i([v.Event()],z.prototype,"resizeStop",void 0),i([v.Event()],z.prototype,"beforeCollapse",void 0),i([v.Event()],z.prototype,"beforeExpand",void 0),i([v.Event()],z.prototype,"collapsed",void 0),i([v.Event()],z.prototype,"expanded",void 0);var G,T=i([v.NotifyPropertyChanges],z);function z(e,t){e=G.call(this,e,t)||this;return e.needsID=!0,e}J=function(e,t){return(J=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var J,K,i=function(e,t){function i(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},A=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},I="e-prevent",E="e-dragging",Z="e-drag",$="e-responsive",ee="e-panel-content",te="e-panel-container",ie="e-panel-header",O=(K=v.ChildProperty,i(R,K),A([v.Property("")],R.prototype,"id",void 0),A([v.Property("")],R.prototype,"cssClass",void 0),A([v.Property("")],R.prototype,"header",void 0),A([v.Property("")],R.prototype,"content",void 0),A([v.Property(!0)],R.prototype,"enabled",void 0),A([v.Property(0)],R.prototype,"row",void 0),A([v.Property(0)],R.prototype,"col",void 0),A([v.Property(1)],R.prototype,"sizeX",void 0),A([v.Property(1)],R.prototype,"sizeY",void 0),A([v.Property(1)],R.prototype,"minSizeY",void 0),A([v.Property(1)],R.prototype,"minSizeX",void 0),A([v.Property(null)],R.prototype,"maxSizeY",void 0),A([v.Property(null)],R.prototype,"maxSizeX",void 0),A([v.Property(1e3)],R.prototype,"zIndex",void 0),R);function R(){return null!==K&&K.apply(this,arguments)||this}se=v.Component,i(H,se),H.prototype.preRender=function(){this.panelCollection=[],this.sortedArray=[],this.gridPanelCollection=[],this.overlapElement=[],this.overlapElementClone=[],this.overlapSubElementClone=[],this.collisionChecker={},this.dragCollection=[],this.elementRef={top:"",left:"",height:"",width:""},this.dimensions=[],this.allItems=[],this.oldRowCol={},this.availableClasses=[],this.setOldRowCol(),this.calculateCellSize(),this.contentTemplateChild=[].slice.call(this.element.children)},H.prototype.setOldRowCol=function(){for(var e=0;e<this.panels.length;e++)this.panels[e].id||(this.panelPropertyChange(this.panels[e],{id:"layout_"+this.panelID.toString()}),this.panelID=this.panelID+1),this.oldRowCol[this.panels[e].id]={row:this.panels[e].row,col:this.panels[e].col}},H.prototype.createPanelElement=function(e,t){var i=this.createElement("div");return e&&0<e.length&&v.addClass([i],e),t&&i.setAttribute("id",t),i},H.prototype.render=function(){this.element.setAttribute("role","list"),this.initialize(),this.isRenderComplete=!0,this.showGridLines&&!this.checkMediaQuery()&&this.initGridLines(),this.updateDragArea(),this.renderComplete(),this.renderReactTemplates()},H.prototype.initGridLines=function(){this.table=document.createElement("table");var e=document.createElement("tbody");this.table.classList.add("e-dashboard-gridline-table"),this.table.setAttribute("role","presentation");for(var t=0;t<this.maxRow();t++){for(var i=document.createElement("tr"),s=0;s<this.columns;s++){var n=document.createElement("td");n.classList.add("e-dashboard-gridline"),this.setAttributes({value:{row:t.toString(),col:s.toString(),sizeX:"1",sizeY:"1"}},n),this.setPanelPosition(n,t,s),this.setHeightAndWidth(n,{row:t,col:s,sizeX:1,sizeY:1}),i.appendChild(n)}e.appendChild(i)}this.table.appendChild(e),this.element.appendChild(this.table),this.renderReactTemplates()},H.prototype.initialize=function(){if(this.updateRowHeight(),0<this.element.childElementCount&&0<this.element.querySelectorAll(".e-panel").length){var e=[];this.setProperties({panels:[]},!0),this.isInlineRendering=!0;for(var t=0;t<this.element.querySelectorAll(".e-panel").length;t++)e.push(this.element.querySelectorAll(".e-panel")[t]);for(t=0;t<e.length;t++){var i=e[t];this.enableRtl&&v.addClass([i],"e-rtl"),this.getInlinePanels(i),this.maxCol(),this.maxRow()}for(t=0;t<this.panels.length;t++){var i=this.element.querySelector("#"+this.panels[t].id),s=(this.setMinMaxValues(this.panels[t]),(this.maxColumnValue<this.panels[t].col||this.maxColumnValue<this.panels[t].col+this.panels[t].sizeX)&&(s=this.maxColumnValue-this.panels[t].sizeX,this.panelPropertyChange(this.panels[t],{col:s<0?0:s})),this.setXYAttributes(i,this.panels[t]),this.renderPanels(i,this.panels[t],this.panels[t].id,!1));this.panelCollection.push(s),this.setHeightAndWidth(i,this.panels[t]),(this.tempObject=this).mediaQuery&&!window.matchMedia("("+this.mediaQuery+")").matches&&(this.setPanelPosition(i,this.panels[t].row,this.panels[t].col),this.mainElement=i,this.updatePanelLayout(i,this.panels[t]),this.mainElement=null),this.setClasses([i])}this.updateOldRowColumn(),this.checkMediaQuery()&&this.checkMediaQuerySizing()}else this.renderDashBoardCells(this.panels);!this.allowDragging||this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches||this.enableDraggingContent(this.panelCollection),this.sortedPanel(),this.bindEvents(),this.updatePanels(),this.updateCloneArrayObject(),this.checkColumnValue=this.maxColumnValue,this.checkMediaQuery()||this.panelResponsiveUpdate(),this.setEnableRtl()},H.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},H.prototype.calculateCellSize=function(){this.cellSize=[],this.checkMediaQuery()?this.cellSize[1]=this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio:(this.cellSize[0]=this.element.parentElement&&this.element.parentElement.offsetWidth,v.isNullOrUndefined(this.cellSpacing)||(this.cellSize[0]=this.element.parentElement&&(this.element.parentElement.offsetWidth-(this.maxCol()-1)*this.cellSpacing[0])/this.maxCol()),this.cellSize[1]=this.cellSize[0]/this.cellAspectRatio)},H.prototype.maxRow=function(e){var t=1;if(1<this.rows&&v.isNullOrUndefined(e))return t=this.rows;for(var i=0;i<this.panels.length;i++)this.panels[i].sizeY+this.panels[i].row>t&&(t=this.panels[i].sizeY+this.panels[i].row);return t=0===this.panels.length?this.columns:t},H.prototype.maxCol=function(){var e=this.columns;return this.maxColumnValue=e},H.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t,i=this.panels[e].id;this.element.querySelector("[id='"+i+"']")&&(t=parseInt(this.element.querySelector("[id='"+i+"']").getAttribute("data-row"),10),i=parseInt(this.element.querySelector("[id='"+i+"']").getAttribute("data-col"),10),this.oldRowCol[this.panels[e].id]={row:t,col:i})}},H.prototype.createSubElement=function(e,t,i){var s=this.createElement("div");return i&&v.addClass([s],[i]),e&&0<e.length&&v.addClass([s],e),t&&s.setAttribute("id",t),s},H.prototype.templateParser=function(t){if(t)try{return"function"!=typeof t&&document.querySelectorAll(t).length?v.compile(document.querySelector(t).innerHTML.trim()):v.compile(t)}catch(e){var i=v.SanitizeHtmlHelper.sanitize(t);return v.compile(this.enableHtmlSanitizer&&"string"==typeof t?i:t)}},H.prototype.renderTemplate=function(e,t,i,s,n){var a=this.templateParser(e),l=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){a=a({},this,n,i,s,null,t);if(a){for(var r=0,o=a;r<o.length;r++){var h=o[r];l.push(h)}v.append([].slice.call(l),t)}}else{n=document.querySelector(e);v.isNullOrUndefined(n)?e.trim():("none"===n.style.display&&n.style.removeProperty("display"),""===n.getAttribute("style")&&n.removeAttribute("style"),t.appendChild(n))}},H.prototype.renderPanels=function(e,t,i,s){v.addClass([e],["e-panel","e-panel-transition"]),e.setAttribute("role","listitem"),this.allowDragging&&e.setAttribute("aria-grabbed","false");var n,a=t.cssClass?t.cssClass.split(" "):null;return this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(a,e.id+"_content",te),e.appendChild(this.panelContent),t.enabled||this.disablePanel(e),t.header&&(a=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template",""),v.addClass([a],[ie]),e.querySelector(".e-panel-header")||(n=this.element.id+"HeaderTemplate"+i,this.renderTemplate(t.header,a,n,s,"header"),this.panelContent.appendChild(a),this.renderReactTemplates())),t.content&&(a=t.cssClass?t.cssClass.split(" "):null,this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(a,e.id+"_body",ee),a=this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px",v.setStyleAttribute(this.panelBody,{height:"calc( 100% - "+a+")"}),e.querySelector(".e-panel-content")||(n=this.element.id+"ContentTemplate"+i,this.renderTemplate(t.content,this.panelBody,n,s,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates())),e},H.prototype.disablePanel=function(e){v.addClass([e],["e-disabled"])},H.prototype.getInlinePanels=function(e){var t={sizeX:e.hasAttribute("data-sizex")?parseInt(e.getAttribute("data-sizex"),10):1,sizeY:e.hasAttribute("data-sizey")?parseInt(e.getAttribute("data-sizey"),10):1,minSizeX:e.hasAttribute("data-minsizex")?parseInt(e.getAttribute("data-minsizex"),10):1,minSizeY:e.hasAttribute("data-minsizey")?parseInt(e.getAttribute("data-minsizey"),10):1,maxSizeX:e.hasAttribute("data-maxsizex")?parseInt(e.getAttribute("data-maxsizex"),10):null,maxSizeY:e.hasAttribute("data-maxsizey")?parseInt(e.getAttribute("data-maxsizey"),10):null,row:e.hasAttribute("data-row")?parseInt(e.getAttribute("data-row"),10):0,col:e.hasAttribute("data-col")?parseInt(e.getAttribute("data-col"),10):0,id:e.getAttribute("id"),zIndex:e.hasAttribute("data-zindex")?parseInt(e.getAttribute("data-zIndex"),10):1e3,header:e.querySelector(".e-panel-header")&&".e-panel-header",content:e.querySelector(".e-panel-content")&&".e-panel-content"},e=(t.id||(t.id="layout_"+this.panelID.toString(),e.setAttribute("id",t.id),this.panelID=this.panelID+1),v.isUndefined(t.enabled)&&(t.enabled=!0),e.style.zIndex=""+t.zIndex,new O(this,"panels",t,!0));this.panels.push(e),this.oldRowCol[t.id]={row:t.row,col:t.col}},H.prototype.resizeEvents=function(){if(this.allowResizing)for(var e=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),t=0;t<e.length;t++){var i="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown";v.EventHandler.add(e[t],i,this.downResizeHandler,this),"msie"!==v.Browser.info.name&&v.EventHandler.add(e[t],"touchstart",this.touchDownResizeHandler,this)}},H.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),v.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},H.prototype.downResizeHandler=function(e){for(var t,i,s=v.closest(e.currentTarget,".e-panel"),n=0;this.panels.length>n;n++)this.panels[n].enabled&&this.panels[n].id===s.id&&(this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY,t="msie"===v.Browser.info.name?"mousemove pointermove":"mousemove",i="msie"===v.Browser.info.name?"mouseup pointerup":"mouseup",this.isMouseMoveBound||(v.EventHandler.add(document,t,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(v.EventHandler.add(document,i,this.upResizeHandler,this),this.isMouseUpBound=!0))},H.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var t=v.closest(e.currentTarget,".e-panel");this.trigger("resizeStart",{event:e,element:t,isInteracted:!0}),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),v.addClass([this.element],[I]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.elementX=parseFloat(t.style.left),this.elementY=parseFloat(t.style.top),this.elementWidth=t.offsetWidth,this.elementHeight=t.offsetHeight,this.originalWidth=this.getCellInstance(t.id).sizeX,this.originalHeight=this.getCellInstance(t.id).sizeY,this.previousRow=this.getCellInstance(t.id).row},H.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(v.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(v.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},H.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},H.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var t=v.closest(this.moveTarget,".e-panel");this.trigger("resize",{event:e,element:t,isInteracted:!0})},H.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,v.removeClass([e],"e-panel-transition"),v.addClass([e],[E]);for(var t=["e-east","e-west","e-north","e-south","e-south-east","e-north-east","e-north-west","e-south-west"],i=0;i<this.moveTarget.classList.length;i++)-1!==t.indexOf(this.moveTarget.classList[i])&&(this.handleClass=this.moveTarget.classList[i])},H.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var t,i,s=v.closest(this.moveTarget,".e-panel");this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY&&(this.updateResizeElement(s),t=this.getCellInstance(s.getAttribute("id")),this.mouseX=e.pageX,this.mouseY=e.pageY,e=this.mouseY-this.lastMouseY+this.mOffY,i=this.mouseX-this.lastMouseX+this.mOffX,this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(s,t,i,e))},H.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var t,i,s=v.closest(this.moveTarget,".e-panel");this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY&&(this.updateResizeElement(s),t=this.getCellInstance(s.getAttribute("id")),this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY,e=this.mouseX-this.lastMouseX+this.mOffX,i=this.mouseY-this.lastMouseY+this.mOffY,this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(s,t,e,i))},H.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i,r=(0<=this.handleClass.indexOf("north")&&(this.elementHeight-l<this.getMinHeight(t)?(s=this.elementHeight-this.getMinHeight(t),this.mOffY=l-s):t.maxSizeY&&this.elementHeight-l>this.getMaxHeight(t)?(s=this.elementHeight-this.getMaxHeight(t),this.mOffY=l-s):this.elementY+l<this.minTop&&(s=this.minTop-this.elementY,this.mOffY=l-s),this.elementY+=s,this.elementHeight-=s),0<=this.handleClass.indexOf("south")&&(this.elementHeight+l<this.getMinHeight(t)?(s=this.getMinHeight(t)-this.elementHeight,this.mOffY=l-s):t.maxSizeY&&this.elementHeight+l>this.getMaxHeight(t)&&(s=this.getMaxHeight(t)-this.elementHeight,this.mOffY=l-s),this.elementHeight+=s),0<=this.handleClass.indexOf("west")&&(this.elementWidth-r<this.getMinWidth(t)?(i=this.elementWidth-this.getMinWidth(t),this.mOffX=r-i):t.maxSizeX&&this.elementWidth-r>this.getMaxWidth(t)?(i=this.elementWidth-this.getMaxWidth(t),this.mOffX=r-i):this.elementX+r<this.minLeft&&(i=this.minLeft-this.elementX,this.mOffX=r-i),this.elementX+=i,this.elementWidth-=i),0<=this.handleClass.indexOf("east")&&(this.elementWidth+r<this.getMinWidth(t)?(i=this.getMinWidth(t)-this.elementWidth,this.mOffX=r-i):t.maxSizeX&&this.elementWidth+r>this.getMaxWidth(t)&&(i=this.getMaxWidth(t)-this.elementWidth,this.mOffX=r-i),l=this.elementWidth,this.elementWidth+=i,s=this.pixelsToColumns(this.elementWidth-t.sizeX*this.cellSpacing[1],!0),this.columns<t.col+s)&&(this.elementWidth=l),e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px",this.getResizeRowColumn(t));r.col+r.sizeX>this.columns&&this.panelPropertyChange(r,{sizeX:r.sizeX-1}),this.shadowEle.style.top=r.row*this.getCellSize()[1]+r.row*this.cellSpacing[1]+"px",0<=this.handleClass.indexOf("west")?this.shadowEle.style.left=r.col*this.getCellSize()[0]+(r.col-1)*this.cellSpacing[0]+"px":this.shadowEle.style.left=r.col*this.getCellSize()[0]+r.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=r.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=r.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n===r.sizeX&&a===r.sizeY||(n=r.sizeX,a=r.sizeY,s={attributes:{row:(i=this.getCellInstance(e.id)).row.toString(),col:i.col.toString(),sizeX:i.sizeX.toString(),sizeY:i.sizeY.toString()}},this.setAttributes(s,e),this.mainElement=e,this.checkCollision=[],this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel())},H.prototype.upResizeHandler=function(e){var t,i,s;v.isNullOrUndefined(this.downTarget)||(this.upTarget=this.downTarget,t={event:e,element:e=v.closest(this.upTarget,".e-panel"),isInteracted:!0},e&&(v.addClass([e],"e-panel-transition"),s="msie"===v.Browser.info.name?"mousemove pointermove":"mousemove",i="msie"===v.Browser.info.name?"mouseup pointerup":"mouseup",v.EventHandler.remove(document,s,this.moveResizeHandler),v.EventHandler.remove(document,i,this.upResizeHandler),"msie"!==v.Browser.info.name&&(v.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),v.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&v.detach(this.shadowEle),this.shadowEle=null,s=this.getCellInstance(e.getAttribute("id")),this.setPanelPosition(e,s.row,s.col),this.setHeightAndWidth(e,s)),v.removeClass([e],[E]),this.trigger("resizeStop",t),this.resizeCalled=!1,this.lastMouseX=this.lastMouseY=void 0,this.mOffX=this.mOffY=0,this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!0))},H.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col,s=(-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1)),e.row),n=(-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s)&&(this.previousRow=s,t=!0),e.sizeX),a=(-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0)),e.sizeY);return-1!==["e-east","e-west"].indexOf(this.handleClass)||"e-north"===this.handleClass&&!t||(a=this.pixelsToRows(this.elementHeight-a*this.cellSpacing[0],!0)),e.col+n>this.columns&&(e.sizeX=n-1),(-1<s&&-1<i&&n+i<=this.maxCol()&&a+s<=this.maxRow()&&0===this.collisions(s,i,n,a,this.getPanelBase(e.id)).length||!1!==this.allowPushing)&&this.panelPropertyChange(e,{row:s,col:i,sizeX:n,sizeY:a}),e},H.prototype.pixelsToColumns=function(e,t){return t?Math.ceil(e/this.cellSize[0]):Math.floor(e/(this.cellSize[0]+this.cellSpacing[0]))},H.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},H.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]+(e.minSizeX-1)*this.cellSpacing[0]},H.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},H.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]+(e.minSizeY-1)*this.cellSpacing[1]},H.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},H.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},H.prototype.moveItemsUpwards=function(){if(!1!==this.allowFloating){for(var e=0,t=this.sortedArray.length;e<t;++e){var i=this.sortedArray[e];if(i)for(var s=0,n=i.length;s<n;++s){var a=i[s];a&&this.moveItemUpwards(a)}}this.updateGridLines()}},H.prototype.moveItemUpwards=function(e){if(!1!==this.allowFloating&&e!==this.mainElement){for(var t=this.getCellInstance(e.id).col,i=parseInt(e.getAttribute("data-sizeY"),10),s=parseInt(e.getAttribute("data-sizeX"),10),n=null,a=null,l=parseInt(e.getAttribute("data-row"),10)-1;-1<l;){if(0!==this.collisions(l,t,s,i,e).length)break;n=l,a=t,--l}null!==n&&this.sortItem(e,n,a)}},H.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s,n=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-row"),10);this.sortedArray[a]||(this.sortedArray[a]=[]),void 0!==(this.sortedArray[a][n]=e)&&void 0!==t&&void 0!==i&&(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col&&(s=this.sortedArray[this.oldRowCol[e.id].row],this.oldRowCol[e.id])&&s[this.oldRowCol[e.id].col]===e&&(delete s[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel()),this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[a]||(this.sortedArray[a]=[]),this.sortedArray[a][n]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i}),s=this.getCellInstance(e.id),this.setAttributes({value:{col:s.col.toString(),row:s.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id)))},H.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},H.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains($)){v.removeClass([this.element],[$]);for(var e=this.element.querySelectorAll((this.element.id?"#"+this.element.id+" > ":"")+".e-panel"),t=0;t<e.length;t++){var i=e[t],s=this.getCellInstance(i.id),n=parseInt(i.getAttribute("data-row"),10),a=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:a}),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,a),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}v.isNullOrUndefined(this.panelCollection)||(this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection)),this.resizeEvents(),v.isNullOrUndefined(this.panelCollection)||this.checkDragging(this.dragCollection)},H.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&v.detach(this.table),this.initGridLines())},H.prototype.checkDragging=function(e){if(this.checkMediaQuery()||!this.allowDragging)for(var t=0;t<e.length;t++)e[t].destroy();else{for(t=0;t<e.length;t++)e[t].destroy();this.enableDraggingContent(this.panelCollection)}},H.prototype.sortPanels=function(){for(var s=[],e=function(i){for(var e=0;e<n.columns;e++)!function(t){n.panels.filter(function(e){e.row===i&&e.col===t&&s.push(e)})}(e)},n=this,t=0;t<=this.rows;t++)e(t);return s},H.prototype.checkMediaQuerySizing=function(){var e;v.addClass([this.element],[$]),e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var t=0;t<e.length;t++){var i,s=document.getElementById(e[t].id);s&&(v.setStyleAttribute(s,{width:"100%"}),s.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+"px",1<e[t].sizeY&&(i=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+parseInt((Math.round(e[t].sizeY/2)*this.cellSpacing[1]).toString(),10),s.style.height=i+"px"),this.resizeHeight=!0,this.panelPropertyChange(e[t],{row:t,col:0}),this.setPanelPosition(s,e[t].row,e[t].col),this.panelsSizeY=this.panelsSizeY+e[t].sizeY,v.isNullOrUndefined(this.panelCollection)||(this.setClasses(this.panelCollection),this.removeResizeClasses(this.panelCollection)),v.isNullOrUndefined(this.dragCollection)||this.checkDragging(this.dragCollection))}this.updateRowHeight()},H.prototype.panelResponsiveUpdate=function(){this.element.classList.add("e-responsive"),this.calculateCellSize();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i)}for(e=0;e<this.panels.length;e++)this.setPanelPosition(document.getElementById(this.panels[e].id),this.panels[e].row,this.panels[e].col);this.updateRowHeight()},H.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},H.prototype.setHeightWidth=function(){if(!v.isNullOrUndefined(this.cellSpacing)){if(this.checkMediaQuery()){for(var e=0,t=0;t<this.panels.length;t++)this.panels[t].sizeY&&(e+=this.panels[t].sizeY);i=e*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(e-1)*this.cellSpacing[1]+"px"}else i=this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px";v.setStyleAttribute(this.element,{height:i});var i=window.getComputedStyle(this.element).width;v.setStyleAttribute(this.element,{width:i})}},H.prototype.setHeightAndWidth=function(e,t){v.setStyleAttribute(e,{height:v.formatUnit(this.setXYDimensions(t)[0])}),v.setStyleAttribute(e,{width:v.formatUnit(this.setXYDimensions(t)[1])})},H.prototype.renderCell=function(e,t,i){this.dimensions=this.setXYDimensions(e),v.isUndefined(e.enabled)&&(e.enabled=!0),0<this.contentTemplateChild.length&&!v.isNullOrUndefined(i)?(s=this.contentTemplateChild[i],e.cssClass&&v.addClass([s],[e.cssClass]),e.id&&s.setAttribute("id",e.id)):s=this.createPanelElement(e.cssClass?e.cssClass.split(" "):null,e.id),s.style.zIndex=""+e.zIndex,this.element.appendChild(s),this.renderReactTemplates();var s,i=this.renderPanels(s,e,e.id,t);return this.panelCollection.push(i),this.setXYAttributes(s,e),this.setHeightAndWidth(s,e),s},H.prototype.setPanelPosition=function(e,t,i){var s,n;e&&(this.checkMediaQuery()&&this.calculateCellSize(),s=this.getCellSize()[1],n=this.getCellSize()[0],i=0===i?0:i*(n+this.cellSpacing[0]),n=0===t?0:t*(s+this.cellSpacing[1]),this.checkMediaQuery()&&(n=0===t?0:this.panelsSizeY*(s+this.cellSpacing[1])),v.setStyleAttribute(e,{left:i+"px",top:n+"px"}))},H.prototype.getRowColumn=function(){if(this.rows=null,0<this.element.querySelectorAll(".e-panel").length&&!this.updatedRows)for(var e=this.element.querySelectorAll(".e-panel"),t=0;t<e.length;t++){var i=e[t],s=parseInt(i.getAttribute("data-row"),10),i=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+i)}else{this.updatedRows&&(this.rows=this.updatedRows,this.updatedRows=null);for(t=0;t<this.panels.length;t++)this.rows=Math.max(this.rows,this.panels[t].row)}},H.prototype.setMinMaxValues=function(e){!e.sizeX||e.sizeX<e.minSizeX?this.panelPropertyChange(e,{sizeX:e.minSizeX}):e.maxSizeX&&e.sizeX>e.maxSizeX?this.panelPropertyChange(e,{sizeX:e.maxSizeX}):e.sizeX>this.columns?this.panelPropertyChange(e,{sizeX:this.columns}):this.panelPropertyChange(e,{sizeX:e.sizeX}),!e.sizeY||e.sizeY<e.minSizeY?this.panelPropertyChange(e,{sizeY:e.minSizeY}):e.maxSizeY&&e.sizeY>e.maxSizeY?this.panelPropertyChange(e,{sizeY:e.maxSizeY}):this.panelPropertyChange(e,{sizeY:e.sizeY})},H.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},H.prototype.panelPropertyChange=function(e,t){e.setProperties(t,!0)},H.prototype.renderDashBoardCells=function(e){if(0<this.element.querySelectorAll(".e-panel").length||0<this.panels.length)for(var t=0;t<e.length;t++){this.gridPanelCollection.push(e[t]),this.setMinMaxValues(e[t]),(this.maxColumnValue<e[t].col||this.maxColumnValue<e[t].col+e[t].sizeX)&&this.panelPropertyChange(e[t],{col:this.maxColumnValue-e[t].sizeX});var i=this.renderCell(e[t],!1,t);this.enableRtl&&v.addClass([i],"e-rtl"),this.element.appendChild(i),this.renderReactTemplates(),this.checkMediaQuery()&&t===e.length-1?this.checkMediaQuerySizing():(this.setPanelPosition(i,e[t].row,e[t].col),this.mainElement=i,this.updatePanelLayout(i,e[t]),this.mainElement=null)}this.setClasses(this.panelCollection)},H.prototype.collisions=function(e,t,i,s,n){var a,l=[];i&&s||(i=s=1),!n||n instanceof Array||(n=[n]);for(var r=0;r<s;++r)for(var o=0;o<i;++o)!(a=this.getPanel(e+r,t+o,n))||n&&-1!==n.indexOf(this.element.querySelector("[id='"+a.id+"']"))||-1!==l.indexOf(this.element.querySelector("[id='"+a.id+"']"))||l.push(this.element.querySelector("[id='"+a.id+"']"));return l},H.prototype.rightWardsSpaceChecking=function(e,n,t){var a=this,l=[],i=[];if(e.forEach(function(e){var t=parseInt(e.getAttribute("data-col"),10),i=parseInt(e.getAttribute("data-sizeX"),10);if(n<a.columns&&n<=t)if(1<i)for(var s=t;s<t+i;s++)l.push(s);else l.push(t)}),0<l.length)for(var s=n+1;s<=this.columns-1;s++)-1===l.indexOf(s)&&s!==n&&-1===i.indexOf(s)&&i.push(s);var r=this.getOccupiedColumns(t);return r.forEach(function(e){n<e&&-1!==i.indexOf(e)&&i.splice(i.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e>parseInt(t.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===i.indexOf(e)&&i.push(e)}),i=i.sort(function(e,t){return e-t})},H.prototype.getOccupiedColumns=function(e){for(var t=[],i=parseInt(e.getAttribute("data-sizeX"),10),s=parseInt(e.getAttribute("data-col"),10),n=s;n<s+i&&n<=this.columns;n++)t.push(n);return t},H.prototype.leftWardsSpaceChecking=function(e,n,t){var a=this,i=[],l=[];if(e.forEach(function(e){var t=parseInt(e.getAttribute("data-col"),10),i=parseInt(e.getAttribute("data-sizeX"),10);if(n<=a.columns&&t<=n)if(1<i)for(var s=t;s<t+i;s++)l.push(s);else l.push(t)}),0<l.length)for(var s=0;s<=n;s++)-1===l.indexOf(s)&&s!==n&&-1===i.indexOf(s)&&i.push(s);var r=this.getOccupiedColumns(t);return r.forEach(function(e){e<n&&-1!==i.indexOf(e)&&i.splice(i.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e<parseInt(t.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===i.indexOf(e)&&i.push(e)}),i=(i=i.sort(function(e,t){return e-t})).reverse()},H.prototype.adjustmentAvailable=function(e,t,i,s,n){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var a,l=!1,r=[],o=(this.topAdjustable=void 0,parseInt(n.getAttribute("data-sizeX"),10)),h=parseInt(n.getAttribute("data-col"),10),p=(-1===(r=this.getRowElements(this.collisions(e,0,this.columns,i,[]))).indexOf(n)&&r.push(n),this.leftWardsSpaceChecking(r,t,n));if(0<p.length?(this.leftAdjustable=this.isLeftAdjustable(p,n,e,t,s,i),this.spacedColumnValue!==h-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),!this.leftAdjustable&&(this.leftAdjustable=!1,a=this.rightWardsSpaceChecking(r,t,n),this.rightAdjustable=0<a.length&&this.isRightAdjustable(a,n,e,t,s,i),this.spacedColumnValue!==o+h&&(this.rightAdjustable=!1),this.rightAdjustable)||(this.rightAdjustable=!1)):(a=this.rightWardsSpaceChecking(r,t,n),this.rightAdjustable=0<a.length&&this.isRightAdjustable(a,n,e,t,s,i),this.spacedColumnValue!==o+h&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&0<e){var d=this.getCellInstance(n.id).row,c=!1;this.startRow!==d&&(c=!0);for(var u=e;0<=u;u--){var g=1<this.getCellInstance(n.id).sizeY&&c?this.checkingElement:n;u!==d&&u===d-i&&0===this.collisions(u,t,s,i,g).length&&(this.topAdjustable=!(c=!1),this.spacedRowValue=v.isNullOrUndefined(this.spacedRowValue)?u:this.spacedRowValue,this.spacedColumnValue=t)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(l=!0,v.isNullOrUndefined(this.spacedRowValue))&&(this.spacedRowValue=e),l},H.prototype.isXSpacingAvailable=function(e,t){for(var i=!1,s=[],n=0;n<e.length;n++)if(e[n+1]-e[n]!=1&&e[n+1]-e[n]!=-1)s=[];else if(s.push(e[n]),2===t&&s.push(e[n+1]),n===e.length-2&&(s.push(e[n+1]),s.length>t)&&s.splice(-1),s.length===t)return i=!0,this.spacedColumnValue=s.sort(function(e,t){return e-t})[0],this.spacedColumnValue<0&&(this.spacedColumnValue=1),i;return i},H.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},H.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&0<e.length)this.spacedColumnValue=e[0],l=!0;else if(1<n&&1===a)l=this.isXSpacingAvailable(e,n);else if(1<a)if(1===n){var r=void 0;if(r=1<=e.length?!0:r)for(var o=0;o<e.length;o++){if(0===this.collisions(i,e[o],n,a,this.checkingElement).length)return this.spacedColumnValue=e[o],l=!0;l=!1}}else l=this.replacable(e,n,i,a,t);return l},H.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&0<e.length)this.spacedColumnValue=e[0],l=!0;else if(1<n&&1===a)l=this.isXSpacingAvailable(e,n);else if(1<a)if(1===n){var r=void 0;if(r=1<=e.length?!0:r)for(var o=0;o<e.length;o++){for(var h=this.collisions(i,e[o],n,a,this.checkingElement),p=0;p<h.length;p++)parseInt(t.getAttribute("data-col"),10)!==e[o]&&h.splice(h.indexOf(h[p]),1);if(0===h.length)return l=!0,this.spacedColumnValue=e[o],l;l=!1}}else l=this.replacable(e,n,i,a,t);return l},H.prototype.replacable=function(e,t,i,s,n){for(var a,l=[],r=0;r<e.length;r++)if(this.isXSpacingAvailable(e,t)){var o=[];if(o.push(this.checkingElement),o.push(n),0===l.length)return a=!0;a=!1}return a},H.prototype.sortCollisionItems=function(i){for(var s,n=[],e=function(t){s=[],i.forEach(function(e){e&&e.getAttribute("data-row")===t.toString()&&s.push(e)});for(var e=a.columns-1;0<=e;e--)!function(t){s.forEach(function(e){e&&e.getAttribute("data-col")===t.toString()&&n.push(e)})}(e)},a=this,t=this.rows-1;0<=t;t--)e(t);return n},H.prototype.updatedModels=function(n,a,l){var r=this,o=[];return this.mainElement||this.sortedPanel(),n.forEach(function(e){r.checkingElement=e;var t=r.getCellInstance(e.id),i=!r.adjustmentAvailable(t.row,t.col,t.sizeY,t.sizeX,l);if(1<t.sizeX&&i)for(var s=t.row;s<a.row+a.sizeY;s++)r.collisions(s,t.col,t.sizeX,t.sizeY,e).forEach(function(e){0<=n.indexOf(e)&&-1===o.indexOf(e)&&o.push(e)})}),o.forEach(function(e){0<=o.indexOf(e)&&n.splice(n.indexOf(e),1)}),n},H.prototype.resetLayout=function(e){var t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement);if(this.mainElement&&!this.addPanelCalled&&!this.resizeCalled&&!this.movePanelCalled){if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s,n,a=this.element.querySelector("[id='"+this.panels[i].id+"']");a!==this.mainElement&&(s=this.cloneObject[a.id].row,n=this.cloneObject[a.id].col,this.setPanelPosition(a,s,n),this.panelPropertyChange(this.getCellInstance(a.id),{row:s,col:n}),this.setAttributes({value:{col:n.toString(),row:s.toString()}},a),this.updateOldRowColumn())}this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&0<this.checkCollision.length&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0])}return t},H.prototype.swapAvailability=function(e,t){for(var i=!0,s=this.getCellInstance(t.id),n=0;n<e.length;n++)for(var a=this.getCellInstance(e[n].id),l=1;l<s.sizeY;l++){var r=[];if(r.push(t),r.push(e[n]),0<this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length)return i=!1}return i},H.prototype.checkForSwapping=function(e,t){if(!this.mainElement||0===e.length)return!1;var i,s=parseInt(e[0].getAttribute("data-row"),10);if(this.startRow<s?i=1:this.startRow>s&&(i=0),!this.swapAvailability(e,t))return!1;for(var n=!1,a=0;a<e.length;a++)if(1<=e.length&&this.cloneObject[this.mainElement.id]&&this.cloneObject[this.mainElement.id].row===this.oldRowCol[this.mainElement.id].row)return!1;for(var l=0===i?this.getCellInstance(this.mainElement.id).row+this.getCellInstance(this.mainElement.id).sizeY:this.startRow,r=0;r<e.length;r++){var o=this.getCellInstance(e[r].id),h=this.getCellInstance(t.id),p=[];if(1===o.sizeY&&-1===p.indexOf(e[r]))p.push(e[r]);else if(1<o.sizeY&&-1===p.indexOf(e[r])){if(!(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1||0===i&&h.row===this.cloneObject[o.id].row))return!1;p.push(e[r])}if(o.sizeY<=h.sizeY&&-1===p.indexOf(e[r])&&p.push(e[r]),p.push(this.mainElement),0<this.collisions(l,o.col,o.sizeX,o.sizeY,p).length)return n=!1;r===e.length-1&&(n=!0)}return n},H.prototype.swapItems=function(e,t,i){var s,n,a=this,l=[],r=(l.push(t),parseInt(e[0].getAttribute("data-row"),10)),o=(this.startRow<r?s=1:this.startRow>r&&(s=0),0===s?r+i.sizeY:this.startRow);this.movePanelCalled||(n=this.getCellInstance(e[0].id),this.panelPropertyChange(i,{row:0===s?r:o+n.sizeY}));for(var h=0;h<e.length;h++)l.push(e[h]),this.setPanelPosition(e[h],o,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:o}),e[h].setAttribute("data-row",o.toString());t.setAttribute("data-row",i.row.toString()),this.setPanelPosition(this.shadowEle,i.row,i.col);for(var p=0;p<this.panels.length;p++)this.oldRowCol[this.panels[p].id]={row:this.panels[p].row,col:this.panels[p].col};this.startRow=i.row,this.updateOldRowColumn(),l.forEach(function(e){a.cloneObject[e.id]=a.oldRowCol[e.id];for(var t=a.getCellInstance(e.id),i=0;i<a.sortedArray.length;i++)if(a.sortedArray[i])for(var s=0;s<a.sortedArray[i].length;s++)a.sortedArray[i][s]===e&&(a.sortedArray[i][s]=void 0);a.sortedArray[t.row]||(a.sortedArray[t.row]=[]),a.sortedArray[t.row][t.col]=e,a.cloneArray=a.sortedArray})},H.prototype.updatePanelLayout=function(e,t){var i=this,s=(this.collisionChecker={},[]),n=[];if(0<(s=this.mainElement&&this.isRenderComplete?this.resetLayout(t):this.collisions(t.row,t.col,t.sizeX,t.sizeY,e)).length)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,t,e),!v.isNullOrUndefined(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,t);else for(var a=0;a<s.length;a++){var l,r=this.getCellInstance(s[a].id);this.checkingElement=s[a],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(r.row,r.col,r.sizeY,r.sizeX,e)&&!v.isNullOrUndefined(this.spacedColumnValue)?(this.setPanelPosition(s[a],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[a].id]={row:this.spacedRowValue,col:this.spacedColumnValue},l={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}},this.setAttributes(l,s[a]),this.panelPropertyChange(r,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,s.length):n.push(s[a])}0<n.length&&(n.forEach(function(e){-1===i.overlapElement.indexOf(e)&&i.overlapElement.push(e)}),this.overlapElement&&-1!==this.overlapElement.indexOf(e)&&this.overlapElement.splice(this.overlapElement.indexOf(e),1),0<n.length)&&(this.updateRowColumn(t.row,this.overlapElement,e),this.checkForCompletePushing()),this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},H.prototype.checkForCompletePushing=function(){for(var e,t=0;t<this.panels.length;t++)this.collisionChecker[this.panels[t].id]&&null!==this.collisionChecker[this.panels[t].id]&&(this.overlapElement=[this.collisionChecker[this.panels[t].id].ele],e=this.panels[t].id,this.updateRowColumn(this.collisionChecker[""+e].row,this.overlapElement,this.collisionChecker[""+e].srcEle))},H.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},H.prototype.updateRowColumn=function(e,t,i){if(i){var s=parseInt(i.getAttribute("data-sizeY"),10),n=parseInt(i.getAttribute("data-row"),10);this.overlapElementClone=(this.overlapElement&&this.shouldRestrict,this.overlapElement);for(var a=0;a<this.overlapElementClone.length;a++){if(0===this.overlapElementClone.length)return;for(var l=0;l<this.overlapElementClone.length;l++)this.collisionChecker[this.overlapElementClone[l].id]={ele:this.overlapElementClone[l],row:e,srcEle:i};var r=n+s,o=parseInt(this.overlapElementClone[a].getAttribute("data-sizeY"),10),h=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),p=parseInt(this.overlapElementClone[a].getAttribute("data-sizeX"),10),d=void 0,c=void 0;if(-1===this.overlapSubElementClone.indexOf(i)&&this.overlapSubElementClone.push(i),-1===this.overlapSubElementClone.indexOf(this.overlapElementClone[a])&&this.overlapSubElementClone.push(this.overlapElementClone[a]),1<o||1<p){for(var u=this.getCellInstance(this.overlapElementClone[a].id),d=u.col,g=document.getElementById(u.id),m=u.row;m<n+s;m++){this.isSubValue=!0,this.panelPropertyChange(u,{row:u.row+1}),g.setAttribute("data-row",u.row.toString()),this.setPanelPosition(g,u.row,d),this.updateCollisionChecked(g),this.oldRowCol[g.id]={row:u.row,col:d};var f=this.getCellInstance(g.id),v=(this.panelPropertyChange(f,{col:d,row:u.row}),parseInt(g.getAttribute("data-row"),10)),y=parseInt(g.getAttribute("data-col"),10),P=parseInt(g.getAttribute("data-sizeX"),10),C=parseInt(g.getAttribute("data-sizeY"),10),S=[];S.push(g),S.push(i),c=this.collisions(v,y,P,C,S),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),this.collisionPanel(c,y,v,g)}this.isSubValue=!1}else{this.addPanelCalled&&(this.addPanelCalled=!1),this.overlapElementClone[a].setAttribute("data-row",r.toString());var x=[],f=(x.push(this.overlapElementClone[a]),x.push(i),c=this.collisions(r,h,p,o,x),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),d=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),this.setPanelPosition(this.overlapElementClone[a],r,d),this.updateCollisionChecked(this.overlapElementClone[a]),this.oldRowCol[this.overlapElementClone[a].id]={row:r,col:d},this.getCellInstance(this.overlapElementClone[a].id));this.panelPropertyChange(f,{col:d,row:r}),this.collisionPanel(c,d,r,this.overlapElementClone[a])}}}},H.prototype.collisionPanel=function(e,t,i,s){var n=this,a=this.getCellInstance(s.id);if(this.panelPropertyChange(a,{row:i,col:t}),0<e.length){this.overlapElement=[],this.shouldRestrict=!0,e.forEach(function(e){n.overlapElement.push(e)});for(var l=parseInt(s.getAttribute("data-row"),10),r=0;r<this.overlapElement.length;r++)this.updateRowColumn(l,this.overlapElement,s);this.shouldRestrict=!1}else{if(this.addPanelCalled||this.sortedPanel(),0<this.overlapSubElementClone.length)for(var o=0;o<this.overlapSubElementClone.length;o++){var h=parseInt(this.overlapSubElementClone[o].getAttribute("data-row"),10),p=parseInt(this.overlapSubElementClone[o].getAttribute("data-col"),10),d=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeX"),10),c=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeY"),10),p=this.collisions(h,p,d,c,this.overlapSubElementClone);this.mainElement&&-1!==p.indexOf(this.mainElement)&&p.splice(p.indexOf(this.mainElement),1),p.forEach(function(e){n.overlapElement.push(e)}),0<p.length&&this.updateRowColumn(h,this.overlapElement,this.overlapSubElementClone[o])}this.overlapSubElementClone=[]}},H.prototype.removeResizeClasses=function(e){for(var t=0;t<e.length;t++)for(var i=e[t].querySelectorAll(".e-resize"),s=0;s<i.length;s++)v.detach(i[s])},H.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+Z);v.removeClass(e,[Z]),this.setClasses(this.panelCollection)},H.prototype.setClasses=function(e){for(var t=0;t<e.length;t++){var i=e[t],s=e[t].querySelector(".e-panel-container");this.allowDragging&&(this.draggableHandle&&i.querySelectorAll(this.draggableHandle)[0]?v.addClass([i.querySelectorAll(this.draggableHandle)[0]],[Z]):v.addClass([i],[Z])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(i,s)}},H.prototype.setResizingClass=function(e,t){if(this.availableClasses=this.resizableHandles,!e.querySelector(".e-resize"))for(var i=0;i<this.availableClasses.length;i++){var s=this.createElement("span"),n=void 0;t.appendChild(s),n="e-east"===this.availableClasses[i]||"e-west"===this.availableClasses[i]||"e-north"===this.availableClasses[i]||"e-south"===this.availableClasses[i]?"e-single":"e-double",v.addClass([s],[n,this.availableClasses[i],"e-resize","e-dl-icon"])}},H.prototype.setXYAttributes=function(e,t){t={value:{sizeX:v.isNullOrUndefined(t.sizeX)?void 0:t.sizeX.toString(),sizeY:v.isNullOrUndefined(t.sizeY)?void 0:t.sizeY.toString(),minSizeX:v.isNullOrUndefined(t.minSizeX)?void 0:t.minSizeX.toString(),minSizeY:v.isNullOrUndefined(t.minSizeY)?void 0:t.minSizeY.toString(),maxSizeX:v.isNullOrUndefined(t.maxSizeX)?void 0:t.maxSizeX.toString(),maxSizeY:v.isNullOrUndefined(t.maxSizeY)?void 0:t.maxSizeY.toString(),row:v.isNullOrUndefined(t.row)?void 0:t.row.toString(),col:v.isNullOrUndefined(t.col)?void 0:t.col.toString()}};this.setAttributes(t,e)},H.prototype.setXYDimensions=function(e){var t=this.getCellSize()[1],i=this.getCellSize()[0],i=e&&"number"==typeof i&&"number"==typeof e.sizeX&&1<e.sizeX?e.sizeX*i+(e.sizeX-1)*this.cellSpacing[0]:i,e=e&&"number"==typeof t&&1<e.sizeY&&"number"==typeof e.sizeY?e.sizeY*t+(e.sizeY-1)*this.cellSpacing[1]:v.formatUnit(t);return[e,i]},H.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),e=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(e/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},H.prototype.checkForChanges=function(e,t,i){var s=[];if(this.removeAllCalled)s=[];else for(var n=0;n<this.panels.length;n++)!v.isNullOrUndefined(t)&&this.panels[n].id===t[0].id||!v.isNullOrUndefined(i)&&this.panels[n].id===i[0].id||this.panels[n].row===this.panelsInitialModel[n].row&&this.panels[n].col===this.panelsInitialModel[n].col||s.push(this.panels[n]);(0<s.length||this.removeAllCalled)&&(e={changedPanels:s,isInteracted:e,addedPanels:v.isNullOrUndefined(t)?[]:t,removedPanels:v.isNullOrUndefined(i)?[]:i},this.trigger("change",e))},H.prototype.enableDraggingContent=function(t){for(var i,r=this,s=this,e=0;e<t.length;e++)!function(l){var e=t[l];s.dragobj=new v.Draggable(e,{preventDefault:!1,clone:!1,dragArea:s.element,isDragScroll:!0,handle:s.draggableHandle||".e-panel",abort:[".e-resize",".e-drag-restrict"],dragStart:s.onDraggingStart.bind(s),dragStop:function(e){if(r.trigger("dragStop",e),v.isNullOrUndefined(e.cancel)&&(e.cancel=!1),e.cancel){var t=r.getCellInstance(r.mainElement.id);for(l=0;l<r.panels.length;l++)r.panels[l].id===t.id&&(e.element.setAttribute("data-col",r.panelsInitialModel[l].col.toString()),e.element.setAttribute("data-row",r.panelsInitialModel[l].row.toString()),t.col=r.panelsInitialModel[l].col,t.row=r.panelsInitialModel[l].row,r.setPanelPosition(r.mainElement,r.panelsInitialModel[l].row,r.panelsInitialModel[l].col),r.updatePanelLayout(r.mainElement,t));r.shadowEle&&v.detach(r.shadowEle)}else{var i=r.getCellInstance(r.mainElement.id),i=(r.allowPushing&&0<r.collisions(i.row,i.col,i.sizeX,i.sizeY,r.mainElement).length?(r.setHolderPosition(e),r.setPanelPosition(r.mainElement,i.row,i.col),r.updatePanelLayout(r.mainElement,i)):r.setPanelPosition(r.mainElement,i.row,i.col),r.mainElement=null,r.getPanelBase(e)),s=(r.shadowEle&&v.detach(r.shadowEle),v.removeClass([r.element],[I]),v.removeClass([e.element],[E]),r.shadowEle=null,e.element.classList.remove("e-dragging"),r.getRowColumnDragValues(e)[0]),n=r.getRowColumnDragValues(e)[1],a=r.getCellInstance(e.element.id),a=(r.allowPushing&&0===r.collisions(s,n,a.sizeX,a.sizeY,document.getElementById(i.id)).length?(r.panelPropertyChange(r.getCellInstance(e.element.id),{row:s,col:n}),r.oldRowCol[e.element.id].row=s,r.oldRowCol[e.element.id].col=n,r.setAttributes({value:{col:n.toString(),row:s.toString()}},e.element)):(r.panelPropertyChange(r.getCellInstance(e.element.id),{row:r.oldRowCol[e.element.id].row,col:r.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",r.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",r.getCellInstance(e.element.id).row.toString())),r.sortedPanel(),r.getCellInstance(e.element.id));r.setPanelPosition(e.element,a.row,a.col),r.updatePanels(),r.updateCloneArrayObject(),r.checkForChanges(!0),r.dragStopEventArgs={event:e.event,element:e.element},r.resizeEvents(),r.rows=r.maxRow(!0),r.setHeightWidth(),r.updateDragArea()}},drag:function(e){r.draggedEventArgs={event:e.event,element:e.element,target:v.closest(e.target,".e-panel")},r.trigger("drag",r.draggedEventArgs),r.onDragStart(e)}}),-1===s.dragCollection.indexOf(s.dragobj)&&s.dragCollection.push(s.dragobj),i=l}(e),e=i},H.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},H.prototype.updateDragArea=function(){this.dragCollection.forEach(function(e){e.setDragArea()})},H.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},H.prototype.onDraggingStart=function(e){var t,i;this.trigger("dragStart",e,function(){v.isNullOrUndefined(e.cancel)&&(e.cancel=!1)}),this.eventVar=e.cancel,e.cancel?(v.removeClass([this.element],[I]),v.removeClass([e.element],[E])):(this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject)),i=this.startRow=parseInt(e.element.getAttribute("data-row"),10),this.startCol=parseInt(e.element.getAttribute("data-col"),10),t=parseInt(e.element.getAttribute("data-sizeY"),10),this.updateRowsHeight(i,t,t),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),this.shadowEle.classList.add("e-holder-transition"),v.setStyleAttribute(this.shadowEle,{position:"absolute"}),v.addClass([this.element],[I]),v.addClass([e.element],[E]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder"),this.shadowEle.style.height=this.getCellInstance(e.element.id).sizeY*this.cellSize[1]+"px",this.shadowEle.style.width=this.getCellInstance(e.element.id).sizeX*this.cellSize[0]+"px",i=this.getCellInstance(e.element.id),this.setPanelPosition(this.shadowEle,i.row,i.col))},H.prototype.cloneModels=function(e,t){void 0===t&&(t=[]);for(var i=0;i<e.length;i++)for(var s in t[i]||(t[i]={}),e[i])t[i][""+s]=e[i][""+s];return t},H.prototype.onDragStart=function(e){var t,i,s,n,a,l;this.eventVar?(this.dragobj.intDestroy(e.event),v.removeClass([this.element],[I]),v.removeClass([e.element],[E])):(n=s=this.getRowColumnDragValues(e)[1],a=this.getRowColumnDragValues(e)[0],n<0||a<0||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),l=this.getCellInstance(e.element.id),this.updateRowsHeight(l.row,l.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:a,col:n},this.updateOldRowColumn(),this.startCol===t&&this.startRow===i||(this.setHolderPosition(e),this.startCol!==t&&(this.startRow=i),this.startRow!==i&&(this.startCol=t),this.allowPushing&&(this.mainElement=e.element,this.checkCollision=this.collisions(l.row,l.col,l.sizeX,l.sizeY,e.element),(0<=l.col||l.col>=this.checkColumnValue)&&(this.checkCollision=[]),this.updatePanelLayout(e.element,l),this.moveItemsUpwards()))),!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.oldRowCol[e.element.id].row===a&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.allowPushing))},H.prototype.getPanelBase=function(e){for(var t,i=0;i<this.panelCollection.length;i++)this.panelCollection[i].id===(e.element&&e.element.id||e)&&(t=this.panelCollection[i]);return t},H.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;-1<e;){for(var n=1,a=t;-1<a;){var l=this.sortedArray[e];if(l){l=l[a];if(l&&(!i||-1===i.indexOf(l))&&parseInt(l.getAttribute("data-sizeX"),10)>=n&&parseInt(l.getAttribute("data-sizeY"),10)>=s)return l}++n,--a}--e,++s}return null},H.prototype.setHolderPosition=function(e){var t=parseInt(e.element.getAttribute("data-sizeY"),10),i=parseInt(e.element.getAttribute("data-col"),10),s=parseInt(e.element.getAttribute("data-row"),10),e=parseInt(e.element.getAttribute("data-sizeX"),10),n=this.getCellSize()[0],a=this.getCellSize()[1],s=0===s?0:s*(a+this.cellSpacing[1]),a=0===i?0:i*(n+this.cellSpacing[0]),i=this.getCellSize()[1],n=this.getCellSize()[0];this.elementRef.top=this.shadowEle.style.top=s+"px",this.elementRef.left=this.shadowEle.style.left=a+"px",this.elementRef.height=this.shadowEle.style.height=t*i+(t-1)*this.cellSpacing[1]+"px",this.elementRef.width=this.shadowEle.style.width=e*n+(e-1)*this.cellSpacing[0]+"px"},H.prototype.getCellInstance=function(e){for(var t,i=0;i<this.panels.length;i++)this.panels[i].id===e&&(t=this.panels[i]);return t},H.prototype.addPanel=function(e){this.panelsSizeY=0,this.maxCol(),e.minSizeX||(e.minSizeX=1),e.minSizeY||(e.minSizeY=1),e.id||(e.id="layout_"+this.panelID.toString(),this.panelID=this.panelID+1);var e=new O(this,"panels",e,!0),t=(this.panels.push(e),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(e),(this.maxColumnValue<e.col||this.maxColumnValue<e.col+e.sizeX)&&this.panelPropertyChange(e,{col:this.maxColumnValue-e.sizeX}),this.renderCell(e,!0,null));if(this.oldRowCol[e.id]={row:e.row,col:e.col},this.cloneObject[e.id]={row:e.row,col:e.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",t),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.removeResizeClasses(this.panelCollection)):(this.mainElement=t,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(t,e.row,e.col),this.updatePanelLayout(t,e)),this.addPanelCalled=!1,this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(e.id)]),this.setClasses([t]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var i=0;i<t.querySelectorAll(".e-resize").length;i++){var s="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown";v.EventHandler.add(t.querySelectorAll(".e-resize")[i],s,this.downResizeHandler,this),"msie"!==v.Browser.info.name&&v.EventHandler.add(t.querySelectorAll(".e-resize")[i],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[e])},H.prototype.updatePanel=function(e){var t,i,s;this.panelsSizeY=0,e.id&&(t=this.getCellInstance(e.id))&&(this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,v.isNullOrUndefined(e.col)&&(e.col=t.col),this.panelPropertyChange(t,e),this.setMinMaxValues(t),e=document.getElementById(e.id),this.mainElement=e,i=t.cssClass?t.cssClass.split(" "):null,this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(i,e.id+"_content",te),e.appendChild(this.panelContent),t.header?(i=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template",""),v.addClass([i],[ie]),i.innerHTML="",s=this.element.id+"HeaderTemplate"+t.id,this.renderTemplate(t.header,i,s,!0,"header"),this.panelContent.appendChild(i),this.renderReactTemplates()):e.querySelector(".e-panel-header")&&v.detach(e.querySelector(".e-panel-header")),t.content?(i=t.cssClass?t.cssClass.split(" "):null,this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(i,e.id+"_body",ee),this.panelBody.innerHTML="",i=this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px",v.setStyleAttribute(this.panelBody,{height:"calc( 100% - "+i+")"}),s=this.element.id+"ContentTemplate"+t.id,this.renderTemplate(t.content,this.panelBody,s,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()):e.querySelector(".e-panel-content")&&v.detach(e.querySelector(".e-panel-content")),this.setXYAttributes(e,t),this.setHeightAndWidth(e,t),this.setPanelPosition(e,t.row,t.col),this.updatePanelLayout(e,t),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject())},H.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},H.prototype.serialize=function(){for(var e=this.cloneModels(this.panels),t=[],i=0;i<e.length;i++)t.push({id:e[i].id,row:e[i].row,col:e[i].col,sizeX:e[i].sizeX,sizeY:e[i].sizeY,minSizeX:e[i].minSizeX,minSizeY:e[i].minSizeY,maxSizeX:e[i].maxSizeX,maxSizeY:e[i].maxSizeY});return t},H.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)v.detach(this.panelCollection[e]),this.clearTemplate();this.removeAllPanel(),this.rows=0,this.gridPanelCollection=[],this.setHeightWidth(),this.sortedPanel(),this.sortedArray=[],this.overlapElementClone=[],this.overlapElement=[],this.overlapSubElementClone=[],this.panelCollection=[],this.oldRowCol={},this.cloneObject={};var t=this.cloneModels(this.panels);this.setProperties({panels:[]},!0),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!1,null,t),this.removeAllCalled=!1},H.prototype.removePanel=function(t){var e,i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s=0;s<this.panelCollection.length;s++)this.panelCollection[s].id===t&&(v.detach(this.panelCollection[s]),this.panelCollection.splice(s,1)),this.panels[s].id===t&&(e=this.panels[s],this.panels.splice(s,1),this.panelsInitialModel.splice(s,1),this.updateOldRowColumn(),this.sortedPanel());this.updatePanels(),this.checkMediaQuery()&&(this.isPanelRemoved=!0,this.checkMediaQuerySizing(),this.isPanelRemoved=!1),this.gridPanelCollection.forEach(function(e){e.id===t&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(e),1)}),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[e])},H.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);isNaN(t)||null===t||isNaN(i)||null===i||!s||(i<0?i=0:i>this.columns&&(i=this.columns-s.sizeX),this.panelPropertyChange(s,{row:t,col:i}),e=document.getElementById(e),this.mainElement=e,this.startRow=parseInt(e.getAttribute("data-row"),10),this.startCol=parseInt(e.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},e),this.updateOldRowColumn(),this.setPanelPosition(e,t,i),this.updatePanelLayout(e,s),this.updateRowHeight(),this.updatePanels(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1))},H.prototype.setAttributes=function(e,t){for(var i=0;i<Object.keys(e).length;i++)Object.keys(e)&&(e[Object.keys(e)[i]].col&&t.setAttribute("data-col",e[Object.keys(e)[i]].col.toString()),e[Object.keys(e)[i]].row&&t.setAttribute("data-row",e[Object.keys(e)[i]].row.toString()),e[Object.keys(e)[i]].sizeX&&t.setAttribute("data-sizeX",e[Object.keys(e)[i]].sizeX.toString()),e[Object.keys(e)[i]].sizeY&&t.setAttribute("data-sizeY",e[Object.keys(e)[i]].sizeY.toString()),e[Object.keys(e)[i]].minSizeX&&t.setAttribute("data-minSizeX",e[Object.keys(e)[i]].minSizeX.toString()),e[Object.keys(e)[i]].minSizeY&&t.setAttribute("data-minSizeY",e[Object.keys(e)[i]].minSizeY.toString()),e[Object.keys(e)[i]].maxSizeX&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeX.toString()),e[Object.keys(e)[i]].maxSizeY)&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeY.toString())},H.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e),e=(this.resizeCalled=!0,document.getElementById(e)),n={event:null,element:e,isInteracted:!1};this.trigger("resizeStart",n),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=e,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},e),this.setHeightAndWidth(e,s),this.updatePanelLayout(e,s),this.updatePanels(),this.updateRowHeight(),this.resizeCalled=!1,this.trigger("resizeStop",n),this.checkForChanges(!1)},H.prototype.destroy=function(){v.EventHandler.remove(window,"resize",this.refreshListener),v.removeClass([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var e=0;e<this.dragCollection.length;e++)this.dragCollection[e].destroy();this.removeAllPanel(),this.panelCollection=null,this.checkCollision=null,this.mainElement=null,this.dragobj=null,this.dragStartArgs=null,this.dragStopEventArgs=null,this.draggedEventArgs=null,this.sortedArray=null,this.cloneArray=null,this.overlapElement=null,this.overlapElementClone=null,this.dragCollection=[],this.allItems=null,this.moveTarget=null,this.upTarget=null,this.downTarget=null,this.checkingElement=null,this.panelHeaderElement=null,this.panelContent=null,this.panelBody=null,this.table=null,se.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},H.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)v.detach(this.element.firstElementChild),this.clearTemplate()},H.prototype.setEnableRtl=function(){!0===this.enableRtl?v.addClass([this.element],"e-rtl"):v.removeClass([this.element],"e-rtl")},H.prototype.updateCellSizeAndSpacing=function(){this.panelResponsiveUpdate(),this.setHeightWidth(),this.getRowColumn();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i),this.setPanelPosition(t,i.row,i.col)}},H.prototype.updatePanelsDynamically=function(e){this.removeAll(),this.setProperties({panels:e},!0),this.setOldRowCol(),this.table&&this.table.remove(),this.initialize(),this.checkMediaQuery()&&this.refresh(),this.showGridLines&&this.initGridLines()},H.prototype.checkForIDValues=function(e){var t=this;!v.isNullOrUndefined(e)&&0<e.length?(this.panelID=0,e.forEach(function(e){e.id||(t.panelPropertyChange(e,{id:"layout_"+t.panelID.toString()}),t.panelID=t.panelID+1)})):this.restrictDynamicUpdate=!0},H.prototype.onPropertyChanged=function(e){var i=this;e.panels&&0<e.panels.length&&e.panels[0]instanceof O&&this.checkForIDValues(e.panels);for(var t=0,s=Object.keys(e);t<s.length;t++)switch(s[t]){case"enableRtl":this.setProperties({enableRtl:e.enableRtl},!0),this.setEnableRtl();break;case"mediaQuery":this.setProperties({mediaQuery:e.mediaQuery},!0),this.checkMediaQuery()&&this.checkMediaQuerySizing();break;case"allowDragging":this.setProperties({allowDragging:e.allowDragging},!0),this.ensureDrag();break;case"allowResizing":if(this.setProperties({allowResizing:e.allowResizing},!0),this.allowResizing)this.setClasses(this.panelCollection),this.resizeEvents();else{for(var n=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),a=0;a<n.length;a++){var l="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown",r=n[a];v.EventHandler.remove(r,l,this.downResizeHandler),"msie"!==v.Browser.info.name&&v.EventHandler.remove(r,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.updateCellSizeAndSpacing(),this.updateGridLines();break;case"draggableHandle":this.setProperties({draggableHandle:e.draggableHandle},!0),this.ensureDrag();break;case"allowFloating":this.setProperties({allowFloating:e.allowFloating},!0),this.moveItemsUpwards();break;case"showGridLines":this.showGridLines?(this.setProperties({showGridLines:e.showGridLines},!0),this.initGridLines()):this.table&&v.detach(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&0<e.panels.length?(this.isRenderComplete=!1,this.updatePanelsDynamically(e.panels),this.isRenderComplete=!0):e.panels[0]&&e.panels.length?this.restrictDynamicUpdate=!1:(this.isRenderComplete=!1,this.updatePanelsDynamically(this.panels),this.isRenderComplete=!0);break;case"columns":this.isRenderComplete=!1,e.panels&&this.updatePanelsDynamically(e.panels),this.setProperties({columns:e.columns},!0),this.panelCollection=[],this.maxColumnValue=this.columns,this.calculateCellSize(),this.panels.forEach(function(e){var t;i.setMinMaxValues(e),(i.maxColumnValue<e.col||i.maxColumnValue<e.col+e.sizeX)&&(t=i.maxColumnValue-e.sizeX,i.panelPropertyChange(e,{col:t<0?0:t}),i.setXYAttributes(document.getElementById(e.id),e)),i.setHeightAndWidth(document.getElementById(e.id),e),i.panelCollection.push(document.getElementById(e.id)),i.setPanelPosition(document.getElementById(e.id),e.row,e.col),i.mainElement=document.getElementById(e.id),i.updatePanelLayout(document.getElementById(e.id),e),i.mainElement=null}),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}},H.prototype.getPersistData=function(){return this.addOnPersist(["panels"])},H.prototype.mergePersistPanelData=function(e){var t=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!v.isNullOrUndefined(t)&&""!==t||!v.isNullOrUndefined(e)){var i=v.isNullOrUndefined(e)?JSON.parse(t):e,t=Object.keys(i);this.isProtectedOnChange=!0;for(var s=0,n=t;s<n.length;s++){var a=n[s];"object"!=typeof v.getValue(a,this)||v.isNullOrUndefined(v.getValue(a,this))||Array.isArray(v.getValue(a,this))&&"panels"===a&&(this.mergePanels(i[a],this[a]),this[a]=i[a])}this.isProtectedOnChange=!1}},H.prototype.mergePanels=function(e,i){for(var s=e,n=this,t=0;t<s.length;t++)!function(t){n.checkForIDValues(i);var e=i.filter(function(e){return e.id===s[t].id})[0];v.isNullOrUndefined(e)||(s[t]=v.extend(e,s[t],{},!0))}(t)},H.prototype.getModuleName=function(){return"DashboardLayout"},A([v.Property(!0)],H.prototype,"allowDragging",void 0),A([v.Property(!1)],H.prototype,"allowResizing",void 0),A([v.Property(!0)],H.prototype,"allowPushing",void 0),A([v.Property(!0)],H.prototype,"enableHtmlSanitizer",void 0),A([v.Property(!0)],H.prototype,"allowFloating",void 0),A([v.Property(1)],H.prototype,"cellAspectRatio",void 0),A([v.Property([5,5])],H.prototype,"cellSpacing",void 0),A([v.Property(1)],H.prototype,"columns",void 0),A([v.Property(!1)],H.prototype,"showGridLines",void 0),A([v.Property(null)],H.prototype,"draggableHandle",void 0),A([v.Property("en-US")],H.prototype,"locale",void 0),A([v.Property("max-width: 600px")],H.prototype,"mediaQuery",void 0),A([v.Collection([],O)],H.prototype,"panels",void 0),A([v.Property(["e-south-east"])],H.prototype,"resizableHandles",void 0),A([v.Event()],H.prototype,"change",void 0),A([v.Event()],H.prototype,"dragStart",void 0),A([v.Event()],H.prototype,"drag",void 0),A([v.Event()],H.prototype,"dragStop",void 0),A([v.Event()],H.prototype,"resizeStart",void 0),A([v.Event()],H.prototype,"resize",void 0),A([v.Event()],H.prototype,"resizeStop",void 0),A([v.Event()],H.prototype,"created",void 0),A([v.Event()],H.prototype,"destroyed",void 0);var se,i=A([v.NotifyPropertyChanges],H);function H(e,t){e=se.call(this,e,t)||this;return e.rows=1,e.panelID=0,e.movePanelCalled=!1,e.resizeCalled=!1,e.mOffX=0,e.mOffY=0,e.maxTop=9999,e.maxRows=100,e.mouseX=0,e.mouseY=0,e.minTop=0,e.minLeft=0,e.isInlineRendering=!1,e.removeAllCalled=!1,e.isPanelRemoved=!1,e.panelsSizeY=0,e.resizeHeight=!1,e.eventVar=!1,v.setValue("mergePersistData",e.mergePersistPanelData,e),e}ne=function(e,t){return(ne=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ne,ae,A=function(e,t){function i(){this.constructor=e}ne(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},B=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},le="e-opposite-content",re="e-dot",oe="e-content",he="e-vertical",pe="e-horizontal",de="e-timeline-reverse",ce="e-item-disabled",ue="e-item-template",M=((M=e.TimelineOrientation||(e.TimelineOrientation={})).Horizontal="Horizontal",M.Vertical="Vertical",(M=e.TimelineAlign||(e.TimelineAlign={})).Before="Before",M.After="After",M.Alternate="Alternate",M.AlternateReverse="AlternateReverse",ae=v.ChildProperty,A(L,ae),B([v.Property("")],L.prototype,"dotCss",void 0),B([v.Property("")],L.prototype,"content",void 0),B([v.Property("")],L.prototype,"oppositeContent",void 0),B([v.Property(!1)],L.prototype,"disabled",void 0),B([v.Property("")],L.prototype,"cssClass",void 0),L);function L(){return null!==ae&&ae.apply(this,arguments)||this}ge=v.Component,A(k,ge),k.prototype.preRender=function(){this.element.id||(this.element.id=v.getUniqueID("e-"+this.getModuleName()))},k.prototype.getModuleName=function(){return"timeline"},k.prototype.getPersistData=function(){return this.addOnPersist([])},k.prototype.render=function(){v.attributes(this.element,{role:"navigation","aria-label":this.element.id}),this.timelineListEle=this.createElement("ol",{className:"e-timeline-items"}),this.updateOrientation(),this.updateCssClass(this.cssClass),this.updateAlign(),this.updateReverse(),this.updateRtl(),this.updateTemplateFunction(),this.renderItems(),this.element.appendChild(this.timelineListEle)},k.prototype.updateOrientation=function(){var e;v.isNullOrUndefined(this.orientation)||"horizontal"!==(e=this.orientation.toLowerCase())&&"vertical"!==e||(this.element.classList.remove(pe,he),this.element.classList.add("e-"+e))},k.prototype.updateCssClass=function(e,t){var i;(t=void 0===t?"":t)&&(i=t.trim().split(" "),(t=this.element.classList).remove.apply(t,i)),e&&(i=e.trim().split(" "),(t=this.element.classList).add.apply(t,i))},k.prototype.updateRtl=function(){this.element.classList[this.enableRtl?"add":"remove"]("e-rtl")},k.prototype.updateAlign=function(){var e;v.isNullOrUndefined(this.align)||"before"!==(e=this.align.toLowerCase())&&"after"!==e&&"alternate"!==e&&"alternatereverse"!==e||(this.element.classList.remove("e-align-before","e-align-after","e-align-alternate","e-align-alternatereverse"),this.element.classList.add("e-align-"+e))},k.prototype.updateReverse=function(){this.element.classList[this.reverse?"add":"remove"](de)},k.prototype.renderItems=function(){var t=this;this.haveOneSidecontent();for(var e=0;e<this.items.length;e++){var i,s=this.items[parseInt(e.toString(),10)],n=this.createElement("li",{className:"e-timeline-item e-connector"}),a=(this.template?this.renderItemContent(e,!1,n):(i=this.createElement("div",{className:le}),s.oppositeContent&&this.updateItemContent(!1,s,e,i),n.appendChild(i),i=this.createElement("div",{className:"e-dot-item"}),a=s.dotCss?re+" "+s.dotCss.trim():re,a=this.createElement("div",{className:a}),i.appendChild(a),n.appendChild(i),a=this.createElement("div",{className:oe}),s.content&&this.updateItemContent(!0,s,e,a),n.appendChild(a),s.cssClass&&(i=n.classList).add.apply(i,s.cssClass.trim().split(" ")),s.disabled&&n.classList.add(ce)),{element:n,index:e});this.trigger("beforeItemRender",a,function(e){t.timelineListEle.appendChild(e.element)})}},k.prototype.haveOneSidecontent=function(){for(var e=!1,t=!1,i=0;i<this.items.length;i++)var s=this.items[parseInt(i.toString(),10)],e=e||0<s.content.length,t=t||0<s.oppositeContent.length;this.element.classList.remove("e-content-only","e-opposite-content-only"),e&&!t&&this.element.classList.add("e-content-only"),t&&!e&&this.element.classList.add("e-opposite-content-only")},k.prototype.updateItemContent=function(e,t,i,s){var n=!(this.isReact||this.isVue),e=this.getTemplateFunction(e?t.content:t.oppositeContent,n);"string"==typeof e?s.innerText=e:v.append(e({item:t,itemIndex:i},this),s)},k.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template,!1):null},k.prototype.renderItemContent=function(e,t,i){var s,n=this.timelineListEle.querySelectorAll("li");t&&this.removeItemContent(n[parseInt(e.toString(),10)]),this.template&&((t?n[parseInt(e.toString(),10)]:i).classList.add(ue),s=this.items[parseInt(e.toString(),10)],v.append(this.templateFunction({item:s,itemIndex:e},this,"timelineTemplate",this.element.id+"_timelineTemplate",this.isStringTemplate),t?n[parseInt(e.toString(),10)]:i)),this.renderReactTemplates()},k.prototype.removeItemContent=function(e){e.classList.remove(ue);for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},k.prototype.getTemplateFunction=function(t,e){if(void 0===e&&(e=!0),"string"!=typeof t)return v.compile(t);var i="";try{var s=v.select(t);s?(i="SCRIPT"===s.tagName?s.innerHTML:s.outerHTML,e=!1):i=t}catch(e){i=t}return e?i:v.compile(i)},k.prototype.removeItemElements=function(){for(var e=this.timelineListEle.querySelectorAll("li"),t=0;t<e.length;t++)v.remove(e[parseInt(t.toString(),10)])},k.prototype.updateElementClassArray=function(){v.removeClass([this.element],["e-rtl","e-align-before","e-align-after","e-outline","e-fill","e-align-alternate","e-align-alternatereverse",de,pe,he])},k.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["timelineTemplate"]);for(var e=0;e<this.items.length;e++)this.renderItemContent(e,!0)},k.prototype.destroy=function(){ge.prototype.destroy.call(this),this.removeItemElements(),this.element.removeAttribute("role"),this.element.removeAttribute("aria-label"),this.clearTemplate(),this.timelineListEle&&v.remove(this.timelineListEle),this.timelineListEle=null,this.updateElementClassArray()},k.prototype.updateItems=function(e,t,i,s){var n,a,l=this.timelineListEle.querySelectorAll("li");switch(e){case"dotCss":n=l[parseInt(i.toString(),10)].querySelector("."+re),""!==t.dotCss&&(a=n.classList).remove.apply(a,t.dotCss.trim().split(" ")),(a=n.classList).add.apply(a,this.items[parseInt(i.toString(),10)].dotCss.trim().split(" "));break;case"content":(n=l[parseInt(i.toString(),10)].querySelector("."+oe)).innerText="",this.updateItemContent(!0,s,i,n),this.haveOneSidecontent();break;case"oppositeContent":(a=l[parseInt(i.toString(),10)].querySelector("."+le)).innerText="",this.updateItemContent(!1,s,i,a),this.haveOneSidecontent();break;case"disabled":l[parseInt(i.toString(),10)].classList[this.items[parseInt(i.toString(),10)].disabled?"add":"remove"](ce);break;case"cssClass":""!==t.cssClass&&(n=l[parseInt(i.toString(),10)].classList).remove.apply(n,t.cssClass.trim().split(" ")),(a=l[parseInt(i.toString(),10)].classList).add.apply(a,s.cssClass.trim().split(" "))}},k.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"items":if(Array.isArray(e.items))this.removeItemElements(),this.renderItems();else for(var n=Object.keys(e.items),a=0;a<n.length;a++){var l=parseInt(Object.keys(e.items)[a],10),r=Object.keys(e.items[l])[0];this.updateItems(r,t.items[l],l,e.items[l])}break;case"orientation":this.updateOrientation();break;case"align":this.updateAlign();break;case"enableRtl":this.updateRtl();break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"reverse":this.element.classList[this.reverse?"add":"remove"](de);break;case"template":this.updateTemplateFunction(),this.updateContent()}},B([v.Property(e.TimelineOrientation.Vertical)],k.prototype,"orientation",void 0),B([v.Property(e.TimelineAlign.After)],k.prototype,"align",void 0),B([v.Collection([],M)],k.prototype,"items",void 0),B([v.Property("")],k.prototype,"cssClass",void 0),B([v.Property(!1)],k.prototype,"reverse",void 0),B([v.Property("")],k.prototype,"template",void 0),B([v.Event()],k.prototype,"created",void 0),B([v.Event()],k.prototype,"beforeItemRender",void 0);var ge,A=B([v.NotifyPropertyChanges],k);function k(e,t){return ge.call(this,e,t)||this}e.DashboardLayout=i,e.PaneProperties=_,e.Panel=O,e.Splitter=T,e.Timeline=A,e.TimelineItem=M,Object.defineProperty(e,"__esModule",{value:!0})});
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base"],t):t((e=e||self).ej={},e.ej2Base)}(this,function(e,v){"use strict";W=function(e,t){return(W=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var W,t,T=function(e,t){function i(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},i=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},m="e-splitter",N="e-splitter-horizontal",Y="e-splitter-vertical",h="e-pane",a="e-pane-horizontal",l="e-pane-vertical",r="e-split-bar",X="e-split-bar-horizontal",U="e-split-bar-vertical",y="e-static-pane",o="e-scrollable",p="e-resize-handler",D="e-resizable-split-bar",n="e-split-bar-hover",d="e-split-bar-active",c="e-hide-handler",j="e-disabled",V="e-rtl",q="e-collapsible",u="e-navigate-arrow",g="e-arrow-right",f="e-arrow-left",P="e-arrow-up",C="e-arrow-down",S="e-icon-hidden",x="e-expanded",b="e-collapsed",F="e-pane-hidden",w="e-resizable",Q="e-last-bar",_=(t=v.ChildProperty,T(s,t),i([v.Property()],s.prototype,"size",void 0),i([v.Property(!1)],s.prototype,"collapsible",void 0),i([v.Property(!1)],s.prototype,"collapsed",void 0),i([v.Property(!0)],s.prototype,"resizable",void 0),i([v.Property(null)],s.prototype,"min",void 0),i([v.Property(null)],s.prototype,"max",void 0),i([v.Property()],s.prototype,"content",void 0),i([v.Property("")],s.prototype,"cssClass",void 0),s);function s(){return null!==t&&t.apply(this,arguments)||this}G=v.Component,T(z,G),z.prototype.onPropertyChanged=function(t,e){if(this.element.classList.contains(m))for(var i=0,s=Object.keys(t);i<s.length;i++)switch(s[i]){case"height":this.setSplitterSize(this.element,t.height,"height");break;case"width":this.setSplitterSize(this.element,t.width,"width");break;case"cssClass":this.setCssClass(this.element,t.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(t.separatorSize);break;case"orientation":this.changeOrientation(t.orientation);break;case"paneSettings":if(t.paneSettings instanceof Array&&e.paneSettings instanceof Array)this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else{var n=Object.keys(t.paneSettings),a=n.some(function(e){return!v.isNullOrUndefined(t.paneSettings[e].content)});if(this.isReact&&a){for(var l=0,r=0;r<this.paneSettings.length;r++)"function"==typeof this.paneSettings[r].content&&(l+=1);l===this.paneSettings.length&&this.clearTemplate()}for(var o=0;o<n.length;o++)for(var h=parseInt(Object.keys(t.paneSettings)[o],10),p=Object.keys(t.paneSettings[h]).length,d=0;d<p;d++){var c=Object.keys(t.paneSettings[h])[d];switch(c){case"content":var u=Object(t.paneSettings[h])[""+c];v.isNullOrUndefined(u)||(this.allPanes[h].innerHTML="",this.setTemplate(u,this.allPanes[h]));break;case"resizable":u=Object(t.paneSettings[h])[""+c];this.resizableModel(h,u);break;case"collapsible":this.collapsibleModelUpdate(h);break;case"collapsed":t.paneSettings[h].collapsed?this.isCollapsed(h):this.collapsedOnchange(h);break;case"cssClass":this.setCssClass(this.allPanes[h],t.paneSettings[h].cssClass);break;case"size":var g=Object(t.paneSettings[h])[""+c];""===g||v.isNullOrUndefined(g)||this.updatePaneSize(g,h)}}}break;case"enableRtl":this.setRTL(t.enableRtl)}},z.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i=[],s=0,n=0;n<this.allPanes.length;n++)this.paneSettings[n].size||""===this.allPanes[n].innerText?this.paneSettings[n].size&&(a="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(i[s]=n,s++);for(var a="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+a:this.allBars[0].offsetHeight*this.allBars.length+a,l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-a-2*this.border)/i.length,r=0;r<i.length;r++)""!==this.allPanes[i[r]].style.flexBasis&&(this.allPanes[i[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(y)},z.prototype.initializeValues=function(){this.allPanes=[],this.paneOrder=[],this.separatorOrder=[],this.allBars=[],this.previousCoordinates={},this.currentCoordinates={},this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1,this.panesDimensions=[],this.border=0,this.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],this.validElementAttributes=["data-orientation","data-width","data-height"],this.iconsDelay=300,this.templateElement=[],this.collapseFlag=!1,this.expandFlag=!0},z.prototype.preRender=function(){this.initializeValues(),this.onReportWindowSize=this.reportWindowSize.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onTouchMoveHandler=this.onMouseMove.bind(this),this.onTouchEndHandler=this.onMouseUp.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,v.removeClass([this.wrapper],["e-control","e-lib",m]);var e="Horizontal"===this.orientation?N:Y,e=(v.addClass([this.element],e),v.Browser.info.name);this.setCssClass(this.element,"msie"===e?"e-ie":""),v.Browser.isDevice&&v.addClass([this.element],"e-splitter-touch")},z.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},z.prototype.getModuleName=function(){return"splitter"},z.prototype.render=function(){this.checkDataAttributes(),this.setCssClass(this.element,this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setPaneSettings(),this.setRTL(this.enableRtl),this.enableReversePanes&&this.setReversePane(),this.collapseFlag=!0,this.isCollapsed(),this.collapseFlag=!1,v.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),v.EventHandler.add(this.element,"keydown",this.onMove,this)},z.prototype.onDocumentClick=function(e){e.target.classList.contains(r)||v.isNullOrUndefined(this.currentSeparator)||(this.currentSeparator.classList.remove(n),this.currentSeparator.classList.remove(d))},z.prototype.checkPaneSize=function(e){var t,i,s="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,n="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,a=v.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;0<this.previousPane.style.flexBasis.indexOf("%")||0<this.previousPane.style.flexBasis.indexOf("p")||0<this.nextPane.style.flexBasis.indexOf("%")?(t=this.updatePaneFlexBasis(this.previousPane),i=this.updatePaneFlexBasis(this.nextPane),this.totalPercent=t+i,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||v.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&0<n&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(i-1+"%")?(this.previousPane.style.flexBasis=t+1+"%",this.nextPane.style.flexBasis=i-1+"%"):(37===e.keyCode||38===e.keyCode)&&0<s&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(t-1+"%")&&(this.previousPane.style.flexBasis=t-1+"%",this.nextPane.style.flexBasis=i+1+"%"))):(this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||v.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&0<n&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<n+a?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=s+a+"px",this.nextPane.style.flexBasis=n<a?"0px":n-a+"px"):(37===e.keyCode||38===e.keyCode)&&0<s&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<s-a&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=s<a?"0px":s-a+"px",this.nextPane.style.flexBasis=n+a+"px")))},z.prototype.onMove=function(e){var t,i,s,n;1<this.allPanes.length&&(t=this.getSeparatorIndex(this.currentSeparator),i=this.previousPane.classList.contains(b),s=this.previousPane.classList.contains(x),n=this.nextPane.classList.contains(b),("Horizontal"!==this.orientation&&38===e.keyCode||"Horizontal"===this.orientation&&39===e.keyCode||"Horizontal"===this.orientation&&37===e.keyCode||"Horizontal"!==this.orientation&&40===e.keyCode)&&(!s&&!n&&!i||s&&!n)&&document.activeElement.classList.contains(r)&&this.paneSettings[t].resizable&&this.paneSettings[t+1].resizable?(e.preventDefault(),this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[t].collapsible&&document.activeElement.classList.contains(r)&&this.currentSeparator.classList.contains(d)&&(this.previousPane.classList.contains(b)?this.expand(t):this.collapse(t),v.addClass([this.currentSeparator],d)))},z.prototype.getMinInPixel=function(e){var t;return v.isNullOrUndefined(e)?0:(t=this.convertPixelToNumber(e.toString()),0<e.indexOf("%")&&(t=this.convertPercentageToPixel(e)),this.convertPixelToNumber(t.toString()))},z.prototype.sanitizeHelper=function(e){var t;return this.enableHtmlSanitizer&&(t=v.SanitizeHtmlHelper.beforeSanitize(),v.extend(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!v.isNullOrUndefined(t.helper)?e=t.helper(e):t.cancel||(e=v.SanitizeHtmlHelper.serializeValue(t,e))),e},z.prototype.checkDataAttributes=function(){for(var e,t=0;t<this.validElementAttributes.length;t++)a=this.element.getAttribute(this.validElementAttributes[t]),v.isNullOrUndefined(a)||(e=this.removeDataPrefix(this.validElementAttributes[t]),this[e]=a);for(var i=0;i<this.element.children.length;i++)for(var s=0;s<this.validDataAttributes.length;s++){var n,a=this.element.children[i].getAttribute(this.validDataAttributes[s]);!v.isNullOrUndefined(a)&&(a="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[s]))||"resizable"===e?"true"===a:a,v.isNullOrUndefined(this.paneSettings[i])&&(this.paneSettings[i]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1}),n=this.paneSettings[i][e],"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[i][e]=a),v.isNullOrUndefined(n)||""===n)&&(this.paneSettings[i][e]=a)}},z.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach(function(e){v.detach(e)}),this.restoreElem()},z.prototype.setPaneSettings=function(){for(var e=this.allPanes.length,t=[],i={size:"",min:null,max:null,content:"",resizable:!0,collapsed:!1,collapsible:!1,cssClass:""},s=0;s<e;s++)v.isNullOrUndefined(this.paneSettings[s])?t[s]=i:t[s]=this.paneSettings[s];this.setProperties({paneSettings:t},!0)},z.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector("."+u+"."+t)},z.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},z.prototype.setRTL=function(e){e?v.addClass([this.element],V):v.removeClass([this.element],V)},z.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),v.addClass([this.allBars[this.allBars.length-1]],Q),v.removeClass([this.allBars[0]],Q),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},z.prototype.setSplitterSize=function(e,t,i){i="width"===i?{width:v.formatUnit(t)}:{height:v.formatUnit(t)};v.setStyleAttribute(e,i)},z.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},z.prototype.setCssClass=function(e,t){t&&v.addClass([e],t.split(-1<t.indexOf(",")?",":" "))},z.prototype.hideResizer=function(e){v.addClass([v.select("."+p,e)],c)},z.prototype.showResizer=function(e){!v.isNullOrUndefined(this.previousPane)&&this.previousPane.classList.contains(w)&&!v.isNullOrUndefined(this.nextPane)&&this.nextPane.classList.contains(w)&&v.removeClass([v.select("."+p,e)],c)},z.prototype.resizableModel=function(e,t){var i=e===this.allBars.length?e-1:e,s=e;v.EventHandler.remove(this.allBars[i],"mousedown",this.onMouseDown),t?(v.EventHandler.add(this.allBars[i],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[i]),v.removeClass([v.select("."+p,this.allBars[i])],c),this.allBars[i].classList.add(D),(e===this.allBars.length?this.allPanes[e]:this.allPanes[i]).classList.add(w),this.updateResizablePanes(s))):(this.updateResizablePanes(s),this.hideResizer(this.allBars[i]),this.allBars[i].classList.remove(D),(e===this.allBars.length?this.allPanes[e]:this.allPanes[i]).classList.remove(w))},z.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,f):this.checkArrow(t,P),s="Horizontal"===this.orientation?this.checkArrow(t,g):this.checkArrow(t,C);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},z.prototype.collapseArrow=function(e,t){return v.selectAll("."+t,this.allBars[e])[0]},z.prototype.updateIsCollapsed=function(e,t,i){var s,n;v.isNullOrUndefined(e)||(n=(s=e===this.allBars.length)?e-1:e,(!s&&this.allPanes[e+1].classList.contains(b)&&0!==e?this.collapseArrow(n-1,i):s?this.collapseArrow(n,i):this.collapseArrow(n,t)).click())},z.prototype.isCollapsed=function(a){var l=this;if(v.isNullOrUndefined(a)||!this.paneSettings[a].collapsed||!v.isNullOrUndefined(this.allPanes[a].classList.contains(b))){if(this.expandFlag=!1,v.isNullOrUndefined(a)){for(var e=0;e<this.allPanes.length;e++)!v.isNullOrUndefined(this.paneSettings[e])&&this.paneSettings[e].collapsed&&this.updateIsCollapsed(e,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(var t,e=this.allPanes.length-1;0<=e;e--)v.isNullOrUndefined(this.paneSettings[e])||!this.paneSettings[e].collapsed||this.allPanes[e].classList.contains(b)||(t="Horizontal"===this.orientation?g:C,0!==e&&this.collapseArrow(e-1,t).click(),this.nextPane.classList.contains(b))||this.collapseArrow(e-1,t).click()}else{this.collapseFlag=!0;var i=a===this.allBars.length,s=i?a-1:a,r={target:!i&&this.allPanes[a+1].classList.contains(b)&&0!==a?this.collapseArrow(s-1,this.targetArrows().lastBarArrow):i?this.collapseArrow(s,this.targetArrows().lastBarArrow):this.collapseArrow(s,this.targetArrows().collapseArrow)},i=this.beforeAction(r);this.trigger("beforeCollapse",i,function(e){if(!e.cancel){for(var t=[],i=(t[0]=a,1),s=0;s<l.allPanes.length;s++)l.allPanes[s].classList.contains(b)&&(t[i]=s,i++);t=t.sort(),l.updateIsCollapsed(a,l.targetArrows().collapseArrow,l.targetArrows().lastBarArrow);for(s=0;s<t.length;s++)l.allPanes[t[s]].classList.contains(b)||l.updateIsCollapsed(t[s],l.targetArrows().collapseArrow,l.targetArrows().lastBarArrow);for(var n,s=t.length;0<s;s--)l.allPanes[t[s-1]].classList.contains(b)||(n=l.targetArrows(),l.updateIsCollapsed(t[s-1],n.collapseArrow,n.lastBarArrow));e=l.afterAction(r);l.trigger("collapsed",e),l.collapseFlag=!1}})}this.expandFlag=!0}},z.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?f:P,lastBarArrow:"Vertical"===this.orientation?C:g}},z.prototype.collapsedOnchange=function(e){v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains(b)||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},z.prototype.isEnabled=function(e){e?v.removeClass([this.element],j):v.addClass([this.element],j)},z.prototype.setSeparatorSize=function(e){for(var t=v.isNullOrUndefined(e)?"auto":e+"px",i="Horizontal"===this.orientation?X:U,s=0;s<this.allBars.length;s++){var n=v.selectAll("."+i,this.element)[s],a=v.selectAll("."+p,n)[0];"Horizontal"===this.orientation?(n.style.width=t,v.isNullOrUndefined(a)||(a.style.width=t)):(n.style.height=t,v.isNullOrUndefined(a)||(a.style.height=t))}},z.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?N:Y),this.element.classList.add(t?Y:N);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?a:l),this.allPanes[i].classList.add(t?l:a);for(i=0;i<this.allBars.length;i++)v.detach(this.allBars[i]);this.allBars=[],this.addSeparator(this.element)},z.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},z.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(h)&&t.push(e[i]);return t},z.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},z.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},z.prototype.getOrderPane=function(e){for(var t,i=0;i<this.element.children.length;i++)parseInt(this.element.children[i].style.order,10)===e&&(t=this.element.children[i]);return t},z.prototype.getOrderIndex=function(e,t){for(var i,s="pane"===t?this.allPanes:this.allBars,n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},z.prototype.updateSeparatorSize=function(e){var t=v.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=t:e.style.height=t},z.prototype.addResizeHandler=function(e){var t=this.createElement("div");v.addClass([t],[p,"e-icons"]),this.updateSeparatorSize(t),e.appendChild(t)},z.prototype.getHeight=function(e){this.height;return(""!==e.style.height&&"100%"===this.height?e.style:this).height},z.prototype.getWidth=function(e){this.width;return(""!==e.style.width&&"100%"===this.width?e.style:this).width},z.prototype.setDimension=function(e,t){v.setStyleAttribute(this.element,{height:e,width:t})},z.prototype.updateCollapseIcons=function(e,t,i){v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?v.removeClass([i],[S]):v.addClass([i],[S]),v.isNullOrUndefined(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?v.removeClass([t],[S]):v.addClass([t],[S])),v.isNullOrUndefined(this.paneSettings[e+1]))||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?v.removeClass([t],[S]):v.addClass([t],[S]))},z.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=f,this.rightArrow=g):(this.leftArrow=P,this.rightArrow=C)},z.prototype.createSeparator=function(e){var t=this.createElement("div"),i=(this.allBars.push(t),this.createElement("button")),s=this.createElement("button"),n=(i.setAttribute("tabindex","-1"),s.setAttribute("tabindex","-1"),i.setAttribute("aria-label","Toggle navigation"),s.setAttribute("aria-label","Toggle navigation"),i.setAttribute("type","button"),s.setAttribute("type","button"),v.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px"),a=this;return"Horizontal"===this.orientation?(this.updateIconClass(),v.addClass([s],[u,f,S]),v.addClass([i],[u,g,S]),v.addClass([t],[r,X]),t.style.width=n):(v.addClass([i],[u,C,S]),v.addClass([s],[u,P,S]),v.addClass([t],[r,U]),this.updateIconClass(),t.style.height=n),this.addMouseActions(t),t.appendChild(s),this.addResizeHandler(t),t.appendChild(i),this.updateCollapseIcons(e,i,s),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),this.enableReversePanes?t.setAttribute("dir","ltr"):t.removeAttribute("dir"),t.addEventListener("focus",function(){t.classList.add(d),a.currentSeparator=t,a.getPaneDetails()}),t.addEventListener("blur",function(){t.classList.remove(d)}),t},z.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add(w):this.allPanes[e].classList.remove(w)},z.prototype.addSeparator=function(e){for(var t,i,s=this.allPanes.length,n=e.children,a=0;a<s;a++)a<s-1?(i=this.createSeparator(a),v.setStyleAttribute(i,{order:2*a+1}),this.separatorOrder.push(2*a+1),n[a].parentNode.appendChild(i),(this.currentSeparator=i).setAttribute("role","separator"),i.setAttribute("aria-valuenow",a.toString()),i.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),v.isNullOrUndefined(i)||(this.isResizable()?(v.EventHandler.add(i,"mousedown",this.onMouseDown,this),t="msie"===v.Browser.info.name?"pointerdown":"touchstart",v.EventHandler.add(i,t,this.onMouseDown,this),i.classList.add(D),this.updateResizablePanes(a)):v.addClass([v.select("."+p,i)],c))):(i&&v.addClass([i],Q),1<s&&this.updateResizablePanes(a));if("msie"===v.Browser.info.name)for(var l=this.element.querySelectorAll(".e-splitter .e-resize-handler"),a=0;a<l.length;a++){var r=v.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;l[a].style.paddingLeft=r/2+"px",l[a].style.paddingRight=r/2+"px"}},z.prototype.isResizable=function(){var e=!1;return e=!v.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!v.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||v.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])?!0:e},z.prototype.addMouseActions=function(e){var t,i,s=this;e.addEventListener("mouseenter",function(){t=setTimeout(function(){v.addClass([e],[n])},s.iconsDelay)}),e.addEventListener("mouseleave",function(){clearTimeout(t),v.removeClass([e],[n])}),e.addEventListener("mouseout",function(){clearTimeout(i)}),e.addEventListener("mouseover",function(){i=setTimeout(function(){v.addClass([e],[n])})})},z.prototype.getEventType=function(e){return-1<e.indexOf("mouse")?"mouse":"touch"},z.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},z.prototype.isSeparator=function(e){return!e.classList.contains(r)},z.prototype.isMouseEvent=function(e){var t=!1;return t="mouse"!==this.getEventType(e.type)&&(v.isNullOrUndefined(e.pointerType)||"mouse"!==this.getEventType(e.pointerType))?t:!0},z.prototype.updateCursorPosition=function(e,t){this.isMouseEvent(e)?this.changeCoordinates({x:e.pageX,y:e.pageY},t):(e="msie"!==v.Browser.info.name?e.touches[0]:e,this.changeCoordinates({x:e.pageX,y:e.pageY},t))},z.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},z.prototype.reportWindowSize=function(){var e=this,t=this.allPanes.length;if(document.body.contains(this.element)){for(var i=0;i<t;i++)v.isNullOrUndefined(this.paneSettings[i].size)&&this.allPanes[i].classList.remove(y),t-1===i&&this.element.querySelectorAll("."+y).length===t&&""===this.allPanes[i].style.flexBasis&&v.removeClass([this.allPanes[i]],y);0<t&&setTimeout(function(){e.updateSplitterSize(!0)},200)}else document.defaultView.removeEventListener("resize",this.onReportWindowSize)},z.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,a=0,l=n.length;a<l;a++)t+="Horizontal"===this.orientation?n[a].offsetWidth:n[a].offsetHeight;for(var r=0,l=this.allBars.length;r<l;r++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[r]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[r]).marginLeft,10):parseInt(getComputedStyle(this.allBars[r]).marginTop,10)+parseInt(getComputedStyle(this.allBars[r]).marginBottom,10);for(var o="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t),a=0,l=this.allPanes.length;a<l;a++)(""===this.allPanes[a].innerText?this.paneSettings[a].size&&""===this.allPanes[a].innerText:this.paneSettings[a].size||""===this.allPanes[a].innerText)||(i[s]=a,s++);for(var h=o/i.length,r=0,l=i.length;r<l;r++)""!==this.allPanes[i[r]].style.flexBasis&&(this.allPanes[i[r]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[r]].offsetWidth+h+"px":this.allPanes[i[r]].offsetHeight+h+"px");if(2===this.allPanes.length&&e)for(var p,d,c,u=this.allPanes.length,g=void 0,m=void 0,f=void 0,a=0;a<u;a++)v.isNullOrUndefined(this.paneSettings[a].min)||(g=this.convertPixelToNumber(this.paneSettings[a].min.toString()),0<this.paneSettings[a].min.indexOf("%")&&(g=this.convertPercentageToPixel(this.paneSettings[a].min)),p=this.convertPixelToNumber(g.toString()),("Horizontal"===this.orientation?this.allPanes[a].offsetWidth:this.allPanes[a].offsetHeight)<p&&(f=0===a?(m=this.allPanes[a],this.allPanes[a+1]):(m=this.allPanes[a],this.allPanes[a-1]),p=p-("Horizontal"===this.orientation?this.allPanes[a].offsetWidth:this.allPanes[a].offsetHeight),c=-1<m.style.flexBasis.indexOf("%"),d="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight,!v.isNullOrUndefined(m)&&""!==m.style.flexBasis&&m.classList.contains(y)&&(m.style.flexBasis=c?this.convertPixelToPercentage(d+p)+"%":d+p+"px"),c="Horizontal"===this.orientation?f.offsetWidth:f.offsetHeight,v.isNullOrUndefined(f)||""===f.style.flexBasis||f.classList.contains(y)||(f.style.flexBasis=-1<f.style.flexBasis.indexOf("%")?this.convertPixelToPercentage(c-p)+"%":c-p+"px")))},z.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===v.Browser.info.name?"pointermove":"touchmove",t="msie"===v.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(t,this.onTouchEndHandler,!0)},z.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===v.Browser.info.name?"pointermove":"touchmove",t="msie"===v.Browser.info.name?"pointerup":"touchend";document.removeEventListener("mousemove",this.onMouseMoveHandler,!0),document.removeEventListener("mouseup",this.onMouseUpHandler,!0),document.removeEventListener(e,this.onTouchMoveHandler,!0),document.removeEventListener(t,this.onTouchEndHandler,!0)},z.prototype.wireClickEvents=function(){v.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},z.prototype.clickHandler=function(e){e.target.classList.contains(u)||(0<(t=v.selectAll("."+m+" > ."+r+"."+n)).length&&v.removeClass(t,n),e.target.classList.add(n)),this.splitterDetails(e);var t=e.target;(t.classList.contains(f)||t.classList.contains(g)||t.classList.contains(C)||t.classList.contains(P))&&(this.nextPane.classList.contains(F)||this.previousPane.classList.contains(F)?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},z.prototype.expandAction=function(t){var i=this,e=this.beforeAction(t);this.expandFlag?this.trigger("beforeExpand",e,function(e){e.cancel||i.expandPane(t);e=i.afterAction(t);i.trigger("expanded",e)}):this.expandPane(t)},z.prototype.getIcon=function(e){return e.target.className.split(" ").filter(function(e){return e!==u&&e!==S})[0]},z.prototype.expandPane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+b).length,t=!this.previousPane.classList.contains(b)&&this.previousPane.classList.contains(y)&&!this.nextPane.classList.contains(b)&&!this.nextPane.classList.contains(x)&&this.nextPane.nextElementSibling.classList.contains(h)&&!this.nextPane.nextElementSibling.classList.contains(y)&&!(t===this.allPanes.length-2),i=[b,F],s=this.getIcon(e),n=s===f||s===P,a=n?this.nextPane:this.previousPane,l=n?this.previousPane:this.nextPane,n=n?this.nextPaneIndex:this.prevPaneIndex,i=(v.removeClass([a],i),a.setAttribute("aria-hidden","false"),this.element.querySelectorAll("."+b).length);if(0<i)l.classList.contains(b)||(v.addClass([l],x),l.setAttribute("aria-expanded","true"));else if(0===i)for(var r=0;r<this.allPanes.length;r++)this.allPanes[r].classList.contains(b)||(v.removeClass([this.allPanes[r]],x),this.allPanes[r].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(n,!1),this.updateIconsOnExpand(e,s),this.updateFlexGrow(),t&&(this.previousPane.classList.remove(x),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},z.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains(b)&&(e+=1);for(var i=e===this.allPanes.length-2,s=this.allPanes,n=0;n<s.length;n++)s[n].style.flexGrow="",i&&this.allPanes[n].classList.contains(b)&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains(x)?s[n].style.flexGrow="1":s[n].classList.contains(b)&&(s[n].style.flexGrow="0")},z.prototype.hideTargetBarIcon=function(e,t){v.addClass([v.select("."+t,e)],S)},z.prototype.showTargetBarIcon=function(e,t){v.removeClass([v.select("."+t,e)],S)},z.prototype.updateIconsOnCollapse=function(e,t){this.splitterProperty();var i,s,n=this.arrow,a=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,l=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;e.target.classList.contains(S)?(this.resizableModel(this.currentBarIndex,!1),v.isNullOrUndefined(a)||this.resizableModel(l,!1),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(v.isNullOrUndefined(a)||this.hideTargetBarIcon(a,n),this.showTargetBarIcon(this.currentSeparator,n)):(v.isNullOrUndefined(a)||this.hideTargetBarIcon(a,t),this.hideTargetBarIcon(this.currentSeparator,n))):(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)&&(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,t),v.isNullOrUndefined(a)||(s=this.getCollapseCount(e=l,i=l+1),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible&&(1===s?(this.hideTargetBarIcon(a,n),this.resizableModel(l,!1)):2===s&&(this.hideBarIcons(a),this.resizableModel(l,!1)),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible||this.hideTargetBarIcon(a,t)))):(this.showTargetBarIcon(this.currentSeparator,n),this.hideTargetBarIcon(this.currentSeparator,t),this.resizableModel(this.currentBarIndex,!1)))},z.prototype.collapseAction=function(t){var i=this,e=this.beforeAction(t);this.collapseFlag?this.collapsePane(t):this.trigger("beforeCollapse",e,function(e){e.cancel||(i.collapsePane(t),e=i.afterAction(t),i.trigger("collapsed",e))})},z.prototype.collapsePane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+b).length,t=this.previousPane.classList.contains(y)&&!this.previousPane.classList.contains(b)&&!this.nextPane.classList.contains(b)&&this.nextPane.nextElementSibling.classList.contains(h)&&!this.nextPane.nextElementSibling.classList.contains(y)&&!this.nextPane.nextElementSibling.classList.contains(b)&&!(t===this.allPanes.length-2)||this.nextPane.classList.contains(b)&&!this.previousPane.classList.contains(y)&&this.nextPane.classList.contains(y),i=[b,F],s=this.getIcon(e),n=s===f||s===P,a=n?this.previousPane:this.nextPane,l=n?this.nextPane:this.previousPane,n=n?this.prevPaneIndex:this.nextPaneIndex;if(v.removeClass([a],x),a.setAttribute("aria-expanded","false"),v.addClass([a],i),a.setAttribute("aria-hidden","true"),""===a.style.flexBasis)v.addClass([l],x),l.setAttribute("aria-expanded","true");else{for(var r=!0,o=0;o<this.allPanes.length;o++)if(!this.allPanes[o].classList.contains(b)&&""===this.allPanes[o].style.flexBasis&&!this.allPanes[o].classList.contains(b)&&!this.allPanes[o].classList.contains(x)){v.addClass([this.allPanes[o]],x),this.allPanes[o].setAttribute("aria-expanded","true"),r=!1;break}r&&(v.addClass([l],x),l.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(n,!0),this.updateIconsOnCollapse(e,s),this.updateFlexGrow(),t&&(this.nextPane.classList.remove(x),this.nextPane.style.flexGrow="")},z.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)v.isNullOrUndefined(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(y)},z.prototype.beforeAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}},z.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},z.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains(q),prevPaneCollapsible:this.previousPane.classList.contains(q),prevPaneExpanded:this.previousPane.classList.contains(x),nextPaneExpanded:this.nextPane.classList.contains(x),nextPaneCollapsed:this.nextPane.classList.contains(b),prevPaneCollapsed:this.previousPane.classList.contains(b),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},z.prototype.showCurrentBarIcons=function(){v.removeClass([v.select("."+this.arrow,this.currentSeparator)],S)},z.prototype.hideBarIcons=function(e){v.addClass([v.select("."+this.arrow,e)],S)},z.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains(b)&&(i+=1),this.allPanes[t].classList.contains(b)&&(i+=1),i},z.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},z.prototype.updateIconsOnExpand=function(e,t){this.splitterProperty();var i,s,n=this.arrow,a=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,l=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;e.target.classList.contains(S)?this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0):this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed||(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),v.isNullOrUndefined(a)||(s=this.getCollapseCount(e=l,i=l+1),this.paneSettings[e].collapsible&&this.paneSettings[i].collapsible&&(0===s?(this.showTargetBarIcon(a,t),this.showTargetBarIcon(a,n),this.checkResizableProp(e,i)&&this.resizableModel(l,!0)):1===s&&(this.hideBarIcons(a),this.allPanes[e].classList.contains(x)||this.allPanes[i].classList.contains(x)?this.showTargetBarIcon(a,n):this.showTargetBarIcon(a,t),this.resizableModel(l,!1))))):(this.hideTargetBarIcon(this.currentSeparator,t),this.showTargetBarIcon(this.currentSeparator,n),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)))},z.prototype.afterAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},z.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},z.prototype.getSeparatorIndex=function(e){var t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).indexOf(e)},z.prototype.getPrevBar=function(e){return this.allBars[e-1]},z.prototype.getNextBar=function(e){return this.allBars[e+1]},z.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},z.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(f)?g:f:this.arrow=e.target.classList.contains(P)?C:P,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},z.prototype.triggerResizing=function(e){e={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",e)},z.prototype.onMouseDown=function(t){var i=this,e=(t.preventDefault(),t.target);if(!e.classList.contains(u)){this.updateCurrentSeparator(e),v.addClass([this.currentSeparator],d),this.updateCursorPosition(t,"previous"),this.getPaneDetails();for(var e={element:this.element,event:t,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},s=0;s<this.element.querySelectorAll("iframe").length;s++)this.element.querySelectorAll("iframe")[s].style.pointerEvents="none";this.trigger("resizeStart",e,function(e){e.cancel||(i.wireResizeEvents(),i.checkPaneSize(t))})}},z.prototype.updatePaneFlexBasis=function(e){return 0<e.style.flexBasis.indexOf("%")?this.removePercentageUnit(e.style.flexBasis):""!==e.style.flexBasis?this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis)):(e="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight,this.convertPixelToPercentage(e))},z.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},z.prototype.convertPercentageToPixel=function(e,t){var i,s,e=e.toString();return i=-1<e.indexOf("%")?(i=parseFloat(e.slice(0,e.indexOf("%"))),s=void 0,s=v.isNullOrUndefined(t)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(t)],Math.ceil(s*(i/100))):parseInt(e,10)},z.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},z.prototype.convertPixelToNumber=function(e){return-1<(e=e.toString()).indexOf("p")?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},z.prototype.calcDragPosition=function(e,t){e=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t;return(1<e?1:e<0?0:e)*t},z.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var e="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+window.scrollX:this.element.getBoundingClientRect().top+window.scrollY,t="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(e,t)},z.prototype.getMinMax=function(e,t,i){var s="min"===i?0:null,n=null;return"min"===i?v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].min)||(n=this.paneSettings[e].min):v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].max)||(n=this.paneSettings[e].max),0<this.paneSettings.length&&!v.isNullOrUndefined(this.paneSettings[e])&&!v.isNullOrUndefined(n)?(0<n.indexOf("%")&&(n=this.convertPercentageToPixel(n).toString()),this.convertPixelToNumber(n)):s},z.prototype.getPreviousPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)+1:parseInt(this.currentSeparator.style.order,10)-1;return this.getOrderIndex(e,"pane")},z.prototype.getNextPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)-1:parseInt(this.currentSeparator.style.order,10)+1;return this.getOrderIndex(e,"pane")},z.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),1<this.allPanes.length&&(e=this.getPrevPane(this.order),t=this.getNextPane(this.order)),e&&t&&(this.previousPane=e,this.nextPane=t,this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex())},z.prototype.getPaneHeight=function(e){return("Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight).toString()},z.prototype.isValidSize=function(e){var t=!1;return t=!v.isNullOrUndefined(this.paneSettings[e])&&!v.isNullOrUndefined(this.paneSettings[e].size)&&-1<this.paneSettings[e].size.indexOf("%")?!0:t},z.prototype.getPaneDimensions=function(){this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},z.prototype.checkCoordinates=function(e,t){var i=!0;return i=e===this.previousCoordinates.x&&t===this.previousCoordinates.y?!1:i},z.prototype.isCursorMoved=function(e){return"mouse"!==this.getEventType(e.type)&&(v.isNullOrUndefined(e.pointerType)||"mouse"!==this.getEventType(e.pointerType))&&"msie"!==v.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},z.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==v.Browser.info.name?this.border:e},z.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);for(var e=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension),t=(this.getBorder(),e="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+e-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+e-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&-1<this.nextPaneHeightWidth.indexOf("p")?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&-1<this.previousPaneHeightWidth.indexOf("p")?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=e+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-e,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth&&(e=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e),this.calculateCurrentDimensions(),this.addStaticPaneClass(),0),i=0;i<this.paneSettings.length;i++)""===this.paneSettings[i].size?t+=1:""!==this.allPanes[i].style.flexBasis&&(this.paneSettings[i].size=this.allPanes[i].style.flexBasis);e=t===this.allPanes.length,e=(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||e?e?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,v.addClass([this.previousPane],y),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,v.addClass([this.nextPane],y)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(y)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(y)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth)):(e=this.allPanes.length%this.allBars.length,this.prevPaneIndex!==e&&this.nextPaneIndex===e?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,v.addClass([this.previousPane],y)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,v.addClass([this.nextPane],y))),""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis);2<this.allPanes.length||!e||this.updateSplitterSize()}},z.prototype.validateMinRange=function(e,t){var i,s=null;return v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].min)||(s=this.paneSettings[e].min.toString()),v.isNullOrUndefined(s)||(0<s.indexOf("%")&&(s=this.convertPercentageToPixel(s).toString()),t<(e=this.convertPixelToNumber(s))&&(this.totalWidth=this.totalWidth-(t-e<=0?0:t-e),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),i=e)),v.isNullOrUndefined(i)?t:i},z.prototype.validateMaxRange=function(e,t){var i,s=null;return v.isNullOrUndefined(this.paneSettings[e])||v.isNullOrUndefined(this.paneSettings[e].max)||(s=this.paneSettings[e].max.toString()),v.isNullOrUndefined(s)||(0<s.indexOf("%")&&(s=this.convertPercentageToPixel(s).toString()),(e=this.convertPixelToNumber(s))<t&&(this.totalWidth=this.totalWidth-(t-e),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),i=e)),v.isNullOrUndefined(i)?t:i},z.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth)},z.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},z.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},z.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(y)||""===this.previousPane.style.flexBasis||this.previousPane.classList.contains(x)||this.previousPane.classList.add(y),this.nextPane.classList.contains(y)||""===this.nextPane.style.flexBasis||this.nextPane.classList.contains(x)||this.nextPane.classList.add(y)},z.prototype.validateDraggedPosition=function(e,t,i){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,t=s-t,i=i+s,s=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),n=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),a=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),l=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),r=e;return i-n<e?r=i-n:e<t+s&&(r=t+s),v.isNullOrUndefined(a)?v.isNullOrUndefined(l)||e<i-l&&(r=i-l):t+a<e&&(r=t+a),r},z.prototype.onMouseUp=function(e){v.removeClass([this.currentSeparator],d),this.unwireResizeEvents();for(var e={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},t=0;t<this.element.querySelectorAll("iframe").length;t++)this.element.querySelectorAll("iframe")[t].style.pointerEvents="auto";this.trigger("resizeStop",e),this.enablePersistence&&((e=this.paneSettings)[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,e[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:e},!0))},z.prototype.panesDimension=function(e,t){var i,s=t.length;parseInt(this.getHeight(this.element),10),v.isNullOrUndefined(this.paneSettings[e])?v.setStyleAttribute(t[e],{order:2*e}):v.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,v.setStyleAttribute(t[e],{order:2*e})):(i=this.paneSettings[e].size,e<s&&(v.setStyleAttribute(t[e],{"flex-basis":i,order:2*e}),e<s-1&&""!==this.paneSettings[e].size?v.addClass([t[e]],y):this.sizeFlag||(t[e].style.flexBasis=null),e===s-1)&&this.sizeFlag&&""!==this.paneSettings[e].size&&v.addClass([t[e]],y)),this.paneOrder.push(2*e)},z.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},z.prototype.templateCompile=function(t,e){var i=this.createElement("div");this.compileElement(i,e,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach(function(e){t.appendChild(e)})},z.prototype.compileElement=function(t,e,i){if("string"==typeof e){if("."===e[0]||"#"===e[0]){var s=document.querySelector(e);if(!v.isNullOrUndefined(s))return this.templateElement.push(s),"none"===s.style.display&&s.style.removeProperty("display"),""===s.getAttribute("style")&&s.removeAttribute("style"),void t.appendChild(s)}e=e.trim()}var n,s=v.isNullOrUndefined(e.outerHTML)?v.compile(e):v.compile(e.outerHTML);v.isNullOrUndefined(s)||(n=s({},this,i,this.element.id+"content"+this.allPanes.length.toString(),!0)),!v.isNullOrUndefined(s)&&n&&0<n.length&&[].slice.call(n).forEach(function(e){t.appendChild(e)})},z.prototype.paneCollapsible=function(e,t){this.paneSettings[t].collapsible?v.addClass([e],q):v.removeClass([e],q)},z.prototype.createSplitPane=function(e){for(var t,i=e.children.length,s=0;s<this.paneSettings.length;s++)i<this.paneSettings.length&&(t=this.createElement("div"),this.element.appendChild(t),i+=1);var i=e.children.length,n=[].slice.call(e.children);if(this.sizeFlag=!1,0<i)for(s=0;s<i;s++)"DIV"!==n[s].nodeName&&"SPAN"!==n[s].nodeName||(this.allPanes.push(n[s]),"Horizontal"===this.orientation?v.addClass([n[s]],[h,a,o]):v.addClass([n[s]],[h,l,o]),this.panesDimension(s,n),v.isNullOrUndefined(this.paneSettings[s])||v.isNullOrUndefined(this.paneSettings[s].content)||this.setTemplate(this.paneSettings[s].content,n[s]),!v.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].cssClass&&this.setCssClass(n[s],this.paneSettings[s].cssClass),v.isNullOrUndefined(this.paneSettings[s]))||this.paneCollapsible(n[s],s)},z.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},z.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},z.prototype.destroy=function(){if(!this.isDestroyed){for(G.prototype.destroy.call(this),v.EventHandler.remove(document,"touchstart click",this.onDocumentClick),v.EventHandler.remove(this.element,"keydown",this.onMove),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize,!0);0<this.element.attributes.length;)this.element.removeAttribute(this.element.attributes[0].name);this.element.innerHTML=this.wrapper.innerHTML;for(var e=0;e<this.wrapper.attributes.length;e++)this.element.setAttribute(this.wrapper.attributes[e].name,this.wrapper.attributes[e].value);this.refreshing&&(v.addClass([this.element],["e-control","e-lib",m]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate(),this.allBars=[],this.allPanes=[],this.previousPane=null,this.nextPane=null,this.currentSeparator=null}},z.prototype.restoreElem=function(){if(0<this.templateElement.length)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},z.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?v.addClass([e],[h,a,o]):v.addClass([e],[h,l,o]),e},z.prototype.removePaneOrders=function(e){for(var t=this.element.childNodes,i=[],s=0;t.length<0;s++)t[s].classList.contains(e)&&i.push(t[s]);for(s=0;s<i.length;s++)i[s].style.removeProperty("order")},z.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},z.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)v.detach(this.allBars[e]);this.allBars=[]},z.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},z.prototype.addPane=function(e,t){var i=this.createElement("div"),i=this.addPaneClass(i),s=(t=t>this.allPanes.length+1?this.allPanes.length:t,{size:v.isNullOrUndefined(e.size)?"":e.size,min:v.isNullOrUndefined(e.min)?null:e.min,max:v.isNullOrUndefined(e.max)?null:e.max,content:v.isNullOrUndefined(e.content)?"":e.content,resizable:!!v.isNullOrUndefined(e.resizable)||e.resizable,collapsible:!v.isNullOrUndefined(e.collapsible)&&e.collapsible,collapsed:!v.isNullOrUndefined(e.collapsed)&&e.collapsed,cssClass:v.isNullOrUndefined(e.cssClass)?"":e.cssClass});this.paneSettings.splice(t,0,s),this.setProperties({paneSettings:this.paneSettings},!0),"Horizontal"===this.orientation?(this.element.insertBefore(i,this.element.querySelectorAll("."+a)[t]),this.removePaneOrders(a)):(this.element.insertBefore(i,this.element.querySelectorAll("."+l)[t]),this.removePaneOrders(l)),this.allPanes.splice(t,0,i),this.updatePanes(),this.setTemplate(this.paneSettings[t].content,i),this.setCssClass(this.allPanes[t],e.cssClass),this.allPanes[this.allPanes.length-1].classList.remove(y)},z.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var t="Horizontal"===this.orientation?a:l;v.isNullOrUndefined(this.element.querySelectorAll("."+t)[e])||(v.detach(this.element.querySelectorAll("."+t)[e]),this.allPanes.splice(e,1),this.removePaneOrders(t),this.updatePanes(),this.paneSettings.splice(e,1),this.setProperties({paneSettings:this.paneSettings},!0),0<this.allPanes.length&&this.allPanes[this.allPanes.length-1].classList.remove(y))},i([v.Property("100%")],z.prototype,"height",void 0),i([v.Property(!1)],z.prototype,"enableReversePanes",void 0),i([v.Property("100%")],z.prototype,"width",void 0),i([v.Property(!1)],z.prototype,"enablePersistence",void 0),i([v.Collection([],_)],z.prototype,"paneSettings",void 0),i([v.Property("Horizontal")],z.prototype,"orientation",void 0),i([v.Property("")],z.prototype,"cssClass",void 0),i([v.Property(!0)],z.prototype,"enabled",void 0),i([v.Property(!0)],z.prototype,"enableHtmlSanitizer",void 0),i([v.Property(null)],z.prototype,"separatorSize",void 0),i([v.Event()],z.prototype,"beforeSanitizeHtml",void 0),i([v.Event()],z.prototype,"created",void 0),i([v.Event()],z.prototype,"resizeStart",void 0),i([v.Event()],z.prototype,"resizing",void 0),i([v.Event()],z.prototype,"resizeStop",void 0),i([v.Event()],z.prototype,"beforeCollapse",void 0),i([v.Event()],z.prototype,"beforeExpand",void 0),i([v.Event()],z.prototype,"collapsed",void 0),i([v.Event()],z.prototype,"expanded",void 0);var G,T=i([v.NotifyPropertyChanges],z);function z(e,t){e=G.call(this,e,t)||this;return e.needsID=!0,e}J=function(e,t){return(J=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var J,K,i=function(e,t){function i(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},A=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},I="e-prevent",E="e-dragging",Z="e-drag",$="e-responsive",ee="e-panel-content",te="e-panel-container",ie="e-panel-header",O=(K=v.ChildProperty,i(R,K),A([v.Property("")],R.prototype,"id",void 0),A([v.Property("")],R.prototype,"cssClass",void 0),A([v.Property("")],R.prototype,"header",void 0),A([v.Property("")],R.prototype,"content",void 0),A([v.Property(!0)],R.prototype,"enabled",void 0),A([v.Property(0)],R.prototype,"row",void 0),A([v.Property(0)],R.prototype,"col",void 0),A([v.Property(1)],R.prototype,"sizeX",void 0),A([v.Property(1)],R.prototype,"sizeY",void 0),A([v.Property(1)],R.prototype,"minSizeY",void 0),A([v.Property(1)],R.prototype,"minSizeX",void 0),A([v.Property(null)],R.prototype,"maxSizeY",void 0),A([v.Property(null)],R.prototype,"maxSizeX",void 0),A([v.Property(1e3)],R.prototype,"zIndex",void 0),R);function R(){return null!==K&&K.apply(this,arguments)||this}se=v.Component,i(H,se),H.prototype.preRender=function(){this.panelCollection=[],this.sortedArray=[],this.gridPanelCollection=[],this.overlapElement=[],this.overlapElementClone=[],this.overlapSubElementClone=[],this.collisionChecker={},this.dragCollection=[],this.elementRef={top:"",left:"",height:"",width:""},this.dimensions=[],this.allItems=[],this.oldRowCol={},this.availableClasses=[],this.setOldRowCol(),this.calculateCellSize(),this.contentTemplateChild=[].slice.call(this.element.children)},H.prototype.setOldRowCol=function(){for(var e=0;e<this.panels.length;e++)this.panels[e].id||(this.panelPropertyChange(this.panels[e],{id:"layout_"+this.panelID.toString()}),this.panelID=this.panelID+1),this.oldRowCol[this.panels[e].id]={row:this.panels[e].row,col:this.panels[e].col}},H.prototype.createPanelElement=function(e,t){var i=this.createElement("div");return e&&0<e.length&&v.addClass([i],e),t&&i.setAttribute("id",t),i},H.prototype.render=function(){this.element.setAttribute("role","list"),this.initialize(),this.isRenderComplete=!0,this.showGridLines&&!this.checkMediaQuery()&&this.initGridLines(),this.updateDragArea(),this.renderComplete(),this.renderReactTemplates()},H.prototype.initGridLines=function(){this.table=document.createElement("table");var e=document.createElement("tbody");this.table.classList.add("e-dashboard-gridline-table"),this.table.setAttribute("role","presentation");for(var t=0;t<this.maxRow();t++){for(var i=document.createElement("tr"),s=0;s<this.columns;s++){var n=document.createElement("td");n.classList.add("e-dashboard-gridline"),this.setAttributes({value:{row:t.toString(),col:s.toString(),sizeX:"1",sizeY:"1"}},n),this.setPanelPosition(n,t,s),this.setHeightAndWidth(n,{row:t,col:s,sizeX:1,sizeY:1}),i.appendChild(n)}e.appendChild(i)}this.table.appendChild(e),this.element.appendChild(this.table),this.renderReactTemplates()},H.prototype.initialize=function(){if(this.updateRowHeight(),0<this.element.childElementCount&&0<this.element.querySelectorAll(".e-panel").length){var e=[];this.setProperties({panels:[]},!0),this.isInlineRendering=!0;for(var t=0;t<this.element.querySelectorAll(".e-panel").length;t++)e.push(this.element.querySelectorAll(".e-panel")[t]);for(t=0;t<e.length;t++){var i=e[t];this.enableRtl&&v.addClass([i],"e-rtl"),this.getInlinePanels(i),this.maxCol(),this.maxRow()}for(t=0;t<this.panels.length;t++){var i=this.element.querySelector("#"+this.panels[t].id),s=(this.setMinMaxValues(this.panels[t]),(this.maxColumnValue<this.panels[t].col||this.maxColumnValue<this.panels[t].col+this.panels[t].sizeX)&&(s=this.maxColumnValue-this.panels[t].sizeX,this.panelPropertyChange(this.panels[t],{col:s<0?0:s})),this.setXYAttributes(i,this.panels[t]),this.renderPanels(i,this.panels[t],this.panels[t].id,!1));this.panelCollection.push(s),this.setHeightAndWidth(i,this.panels[t]),(this.tempObject=this).mediaQuery&&!window.matchMedia("("+this.mediaQuery+")").matches&&(this.setPanelPosition(i,this.panels[t].row,this.panels[t].col),this.mainElement=i,this.updatePanelLayout(i,this.panels[t]),this.mainElement=null),this.setClasses([i])}this.updateOldRowColumn(),this.checkMediaQuery()&&this.checkMediaQuerySizing()}else this.renderDashBoardCells(this.panels);!this.allowDragging||this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches||this.enableDraggingContent(this.panelCollection),this.sortedPanel(),this.bindEvents(),this.updatePanels(),this.updateCloneArrayObject(),this.checkColumnValue=this.maxColumnValue,this.checkMediaQuery()||this.panelResponsiveUpdate(),this.setEnableRtl()},H.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},H.prototype.calculateCellSize=function(){this.cellSize=[],this.checkMediaQuery()?this.cellSize[1]=this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio:(this.cellSize[0]=this.element.parentElement&&this.element.parentElement.offsetWidth,v.isNullOrUndefined(this.cellSpacing)||(this.cellSize[0]=this.element.parentElement&&(this.element.parentElement.offsetWidth-(this.maxCol()-1)*this.cellSpacing[0])/this.maxCol()),this.cellSize[1]=this.cellSize[0]/this.cellAspectRatio)},H.prototype.maxRow=function(e){var t=1;if(1<this.rows&&v.isNullOrUndefined(e))return t=this.rows;for(var i=0;i<this.panels.length;i++)this.panels[i].sizeY+this.panels[i].row>t&&(t=this.panels[i].sizeY+this.panels[i].row);return t=0===this.panels.length?this.columns:t},H.prototype.maxCol=function(){var e=this.columns;return this.maxColumnValue=e},H.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t,i=this.panels[e].id;this.element.querySelector("[id='"+i+"']")&&(t=parseInt(this.element.querySelector("[id='"+i+"']").getAttribute("data-row"),10),i=parseInt(this.element.querySelector("[id='"+i+"']").getAttribute("data-col"),10),this.oldRowCol[this.panels[e].id]={row:t,col:i})}},H.prototype.createSubElement=function(e,t,i){var s=this.createElement("div");return i&&v.addClass([s],[i]),e&&0<e.length&&v.addClass([s],e),t&&s.setAttribute("id",t),s},H.prototype.templateParser=function(t){if(t)try{return"function"!=typeof t&&document.querySelectorAll(t).length?v.compile(document.querySelector(t).innerHTML.trim()):v.compile(t)}catch(e){var i=v.SanitizeHtmlHelper.sanitize(t);return v.compile(this.enableHtmlSanitizer&&"string"==typeof t?i:t)}},H.prototype.renderTemplate=function(e,t,i,s,n){var a=this.templateParser(e),l=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){a=a({},this,n,i,s,null,t);if(a){for(var r=0,o=a;r<o.length;r++){var h=o[r];l.push(h)}v.append([].slice.call(l),t)}}else{n=document.querySelector(e);v.isNullOrUndefined(n)?e.trim():("none"===n.style.display&&n.style.removeProperty("display"),""===n.getAttribute("style")&&n.removeAttribute("style"),t.appendChild(n))}},H.prototype.renderPanels=function(e,t,i,s){v.addClass([e],["e-panel","e-panel-transition"]),e.setAttribute("role","listitem"),this.allowDragging&&e.setAttribute("aria-grabbed","false");var n,a=t.cssClass?t.cssClass.split(" "):null;return this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(a,e.id+"_content",te),e.appendChild(this.panelContent),t.enabled||this.disablePanel(e),t.header&&(a=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template",""),v.addClass([a],[ie]),e.querySelector(".e-panel-header")||(n=this.element.id+"HeaderTemplate"+i,this.renderTemplate(t.header,a,n,s,"header"),this.panelContent.appendChild(a),this.renderReactTemplates())),t.content&&(a=t.cssClass?t.cssClass.split(" "):null,this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(a,e.id+"_body",ee),a=this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px",v.setStyleAttribute(this.panelBody,{height:"calc( 100% - "+a+")"}),e.querySelector(".e-panel-content")||(n=this.element.id+"ContentTemplate"+i,this.renderTemplate(t.content,this.panelBody,n,s,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates())),e},H.prototype.disablePanel=function(e){v.addClass([e],["e-disabled"])},H.prototype.getInlinePanels=function(e){var t={sizeX:e.hasAttribute("data-sizex")?parseInt(e.getAttribute("data-sizex"),10):1,sizeY:e.hasAttribute("data-sizey")?parseInt(e.getAttribute("data-sizey"),10):1,minSizeX:e.hasAttribute("data-minsizex")?parseInt(e.getAttribute("data-minsizex"),10):1,minSizeY:e.hasAttribute("data-minsizey")?parseInt(e.getAttribute("data-minsizey"),10):1,maxSizeX:e.hasAttribute("data-maxsizex")?parseInt(e.getAttribute("data-maxsizex"),10):null,maxSizeY:e.hasAttribute("data-maxsizey")?parseInt(e.getAttribute("data-maxsizey"),10):null,row:e.hasAttribute("data-row")?parseInt(e.getAttribute("data-row"),10):0,col:e.hasAttribute("data-col")?parseInt(e.getAttribute("data-col"),10):0,id:e.getAttribute("id"),zIndex:e.hasAttribute("data-zindex")?parseInt(e.getAttribute("data-zIndex"),10):1e3,header:e.querySelector(".e-panel-header")&&".e-panel-header",content:e.querySelector(".e-panel-content")&&".e-panel-content"},e=(t.id||(t.id="layout_"+this.panelID.toString(),e.setAttribute("id",t.id),this.panelID=this.panelID+1),v.isUndefined(t.enabled)&&(t.enabled=!0),e.style.zIndex=""+t.zIndex,new O(this,"panels",t,!0));this.panels.push(e),this.oldRowCol[t.id]={row:t.row,col:t.col}},H.prototype.resizeEvents=function(){if(this.allowResizing)for(var e=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),t=0;t<e.length;t++){var i="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown";v.EventHandler.add(e[t],i,this.downResizeHandler,this),"msie"!==v.Browser.info.name&&v.EventHandler.add(e[t],"touchstart",this.touchDownResizeHandler,this)}},H.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),v.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},H.prototype.downResizeHandler=function(e){for(var t,i,s=v.closest(e.currentTarget,".e-panel"),n=0;this.panels.length>n;n++)this.panels[n].enabled&&this.panels[n].id===s.id&&(this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY,t="msie"===v.Browser.info.name?"mousemove pointermove":"mousemove",i="msie"===v.Browser.info.name?"mouseup pointerup":"mouseup",this.isMouseMoveBound||(v.EventHandler.add(document,t,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(v.EventHandler.add(document,i,this.upResizeHandler,this),this.isMouseUpBound=!0))},H.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var t=v.closest(e.currentTarget,".e-panel");this.trigger("resizeStart",{event:e,element:t,isInteracted:!0}),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),v.addClass([this.element],[I]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.elementX=parseFloat(t.style.left),this.elementY=parseFloat(t.style.top),this.elementWidth=t.offsetWidth,this.elementHeight=t.offsetHeight,this.originalWidth=this.getCellInstance(t.id).sizeX,this.originalHeight=this.getCellInstance(t.id).sizeY,this.previousRow=this.getCellInstance(t.id).row},H.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(v.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(v.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},H.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},H.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var t=v.closest(this.moveTarget,".e-panel");this.trigger("resize",{event:e,element:t,isInteracted:!0})},H.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,v.removeClass([e],"e-panel-transition"),v.addClass([e],[E]);for(var t=["e-east","e-west","e-north","e-south","e-south-east","e-north-east","e-north-west","e-south-west"],i=0;i<this.moveTarget.classList.length;i++)-1!==t.indexOf(this.moveTarget.classList[i])&&(this.handleClass=this.moveTarget.classList[i])},H.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var t,i,s=v.closest(this.moveTarget,".e-panel");this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY&&(this.updateResizeElement(s),t=this.getCellInstance(s.getAttribute("id")),this.mouseX=e.pageX,this.mouseY=e.pageY,e=this.mouseY-this.lastMouseY+this.mOffY,i=this.mouseX-this.lastMouseX+this.mOffX,this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(s,t,i,e))},H.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var t,i,s=v.closest(this.moveTarget,".e-panel");this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY&&(this.updateResizeElement(s),t=this.getCellInstance(s.getAttribute("id")),this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY,e=this.mouseX-this.lastMouseX+this.mOffX,i=this.mouseY-this.lastMouseY+this.mOffY,this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(s,t,e,i))},H.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i,r=(0<=this.handleClass.indexOf("north")&&(this.elementHeight-l<this.getMinHeight(t)?(s=this.elementHeight-this.getMinHeight(t),this.mOffY=l-s):t.maxSizeY&&this.elementHeight-l>this.getMaxHeight(t)?(s=this.elementHeight-this.getMaxHeight(t),this.mOffY=l-s):this.elementY+l<this.minTop&&(s=this.minTop-this.elementY,this.mOffY=l-s),this.elementY+=s,this.elementHeight-=s),0<=this.handleClass.indexOf("south")&&(this.elementHeight+l<this.getMinHeight(t)?(s=this.getMinHeight(t)-this.elementHeight,this.mOffY=l-s):t.maxSizeY&&this.elementHeight+l>this.getMaxHeight(t)&&(s=this.getMaxHeight(t)-this.elementHeight,this.mOffY=l-s),this.elementHeight+=s),0<=this.handleClass.indexOf("west")&&(this.elementWidth-r<this.getMinWidth(t)?(i=this.elementWidth-this.getMinWidth(t),this.mOffX=r-i):t.maxSizeX&&this.elementWidth-r>this.getMaxWidth(t)?(i=this.elementWidth-this.getMaxWidth(t),this.mOffX=r-i):this.elementX+r<this.minLeft&&(i=this.minLeft-this.elementX,this.mOffX=r-i),this.elementX+=i,this.elementWidth-=i),0<=this.handleClass.indexOf("east")&&(this.elementWidth+r<this.getMinWidth(t)?(i=this.getMinWidth(t)-this.elementWidth,this.mOffX=r-i):t.maxSizeX&&this.elementWidth+r>this.getMaxWidth(t)&&(i=this.getMaxWidth(t)-this.elementWidth,this.mOffX=r-i),l=this.elementWidth,this.elementWidth+=i,s=this.pixelsToColumns(this.elementWidth-t.sizeX*this.cellSpacing[1],!0),this.columns<t.col+s)&&(this.elementWidth=l),e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px",this.getResizeRowColumn(t));r.col+r.sizeX>this.columns&&this.panelPropertyChange(r,{sizeX:r.sizeX-1}),this.shadowEle.style.top=r.row*this.getCellSize()[1]+r.row*this.cellSpacing[1]+"px",0<=this.handleClass.indexOf("west")?this.shadowEle.style.left=r.col*this.getCellSize()[0]+(r.col-1)*this.cellSpacing[0]+"px":this.shadowEle.style.left=r.col*this.getCellSize()[0]+r.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=r.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=r.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n===r.sizeX&&a===r.sizeY||(n=r.sizeX,a=r.sizeY,s={attributes:{row:(i=this.getCellInstance(e.id)).row.toString(),col:i.col.toString(),sizeX:i.sizeX.toString(),sizeY:i.sizeY.toString()}},this.setAttributes(s,e),this.mainElement=e,this.checkCollision=[],this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel())},H.prototype.upResizeHandler=function(e){var t,i,s;v.isNullOrUndefined(this.downTarget)||(this.upTarget=this.downTarget,t={event:e,element:e=v.closest(this.upTarget,".e-panel"),isInteracted:!0},e&&(v.addClass([e],"e-panel-transition"),s="msie"===v.Browser.info.name?"mousemove pointermove":"mousemove",i="msie"===v.Browser.info.name?"mouseup pointerup":"mouseup",v.EventHandler.remove(document,s,this.moveResizeHandler),v.EventHandler.remove(document,i,this.upResizeHandler),"msie"!==v.Browser.info.name&&(v.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),v.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&v.detach(this.shadowEle),this.shadowEle=null,s=this.getCellInstance(e.getAttribute("id")),this.setPanelPosition(e,s.row,s.col),this.setHeightAndWidth(e,s)),v.removeClass([e],[E]),this.trigger("resizeStop",t),this.resizeCalled=!1,this.lastMouseX=this.lastMouseY=void 0,this.mOffX=this.mOffY=0,this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!0))},H.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col,s=(-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1)),e.row),n=(-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s)&&(this.previousRow=s,t=!0),e.sizeX),a=(-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0)),e.sizeY);return-1!==["e-east","e-west"].indexOf(this.handleClass)||"e-north"===this.handleClass&&!t||(a=this.pixelsToRows(this.elementHeight-a*this.cellSpacing[0],!0)),e.col+n>this.columns&&(e.sizeX=n-1),(-1<s&&-1<i&&n+i<=this.maxCol()&&a+s<=this.maxRow()&&0===this.collisions(s,i,n,a,this.getPanelBase(e.id)).length||!1!==this.allowPushing)&&this.panelPropertyChange(e,{row:s,col:i,sizeX:n,sizeY:a}),e},H.prototype.pixelsToColumns=function(e,t){return t?Math.ceil(e/this.cellSize[0]):Math.floor(e/(this.cellSize[0]+this.cellSpacing[0]))},H.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},H.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]+(e.minSizeX-1)*this.cellSpacing[0]},H.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},H.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]+(e.minSizeY-1)*this.cellSpacing[1]},H.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},H.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},H.prototype.moveItemsUpwards=function(){if(!1!==this.allowFloating){for(var e=0,t=this.sortedArray.length;e<t;++e){var i=this.sortedArray[e];if(i)for(var s=0,n=i.length;s<n;++s){var a=i[s];a&&this.moveItemUpwards(a)}}this.updateGridLines()}},H.prototype.moveItemUpwards=function(e){if(!1!==this.allowFloating&&e!==this.mainElement){for(var t=this.getCellInstance(e.id).col,i=parseInt(e.getAttribute("data-sizeY"),10),s=parseInt(e.getAttribute("data-sizeX"),10),n=null,a=null,l=parseInt(e.getAttribute("data-row"),10)-1;-1<l;){if(0!==this.collisions(l,t,s,i,e).length)break;n=l,a=t,--l}null!==n&&this.sortItem(e,n,a)}},H.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s,n=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-row"),10);this.sortedArray[a]||(this.sortedArray[a]=[]),void 0!==(this.sortedArray[a][n]=e)&&void 0!==t&&void 0!==i&&(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col&&(s=this.sortedArray[this.oldRowCol[e.id].row],this.oldRowCol[e.id])&&s[this.oldRowCol[e.id].col]===e&&(delete s[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel()),this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[a]||(this.sortedArray[a]=[]),this.sortedArray[a][n]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i}),s=this.getCellInstance(e.id),this.setAttributes({value:{col:s.col.toString(),row:s.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id)))},H.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},H.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains($)){v.removeClass([this.element],[$]);for(var e=this.element.querySelectorAll((this.element.id?"#"+this.element.id+" > ":"")+".e-panel"),t=0;t<e.length;t++){var i=e[t],s=this.getCellInstance(i.id),n=parseInt(i.getAttribute("data-row"),10),a=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:a}),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,a),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}v.isNullOrUndefined(this.panelCollection)||(this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection)),this.resizeEvents(),v.isNullOrUndefined(this.panelCollection)||this.checkDragging(this.dragCollection)},H.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&v.detach(this.table),this.initGridLines())},H.prototype.checkDragging=function(e){if(this.checkMediaQuery()||!this.allowDragging)for(var t=0;t<e.length;t++)e[t].destroy();else{for(t=0;t<e.length;t++)e[t].destroy();this.enableDraggingContent(this.panelCollection)}},H.prototype.sortPanels=function(){for(var s=[],e=function(i){for(var e=0;e<n.columns;e++)!function(t){n.panels.filter(function(e){e.row===i&&e.col===t&&s.push(e)})}(e)},n=this,t=0;t<=this.rows;t++)e(t);return s},H.prototype.checkMediaQuerySizing=function(){var e;v.addClass([this.element],[$]),e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var t=0;t<e.length;t++){var i,s=document.getElementById(e[t].id);s&&(v.setStyleAttribute(s,{width:"100%"}),s.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+"px",1<e[t].sizeY&&(i=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+parseInt((Math.round(e[t].sizeY/2)*this.cellSpacing[1]).toString(),10),s.style.height=i+"px"),this.resizeHeight=!0,this.panelPropertyChange(e[t],{row:t,col:0}),this.setPanelPosition(s,e[t].row,e[t].col),this.panelsSizeY=this.panelsSizeY+e[t].sizeY,v.isNullOrUndefined(this.panelCollection)||(this.setClasses(this.panelCollection),this.removeResizeClasses(this.panelCollection)),v.isNullOrUndefined(this.dragCollection)||this.checkDragging(this.dragCollection))}this.updateRowHeight()},H.prototype.panelResponsiveUpdate=function(){this.element.classList.add("e-responsive"),this.calculateCellSize();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i)}for(e=0;e<this.panels.length;e++)this.setPanelPosition(document.getElementById(this.panels[e].id),this.panels[e].row,this.panels[e].col);this.updateRowHeight()},H.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},H.prototype.setHeightWidth=function(){if(!v.isNullOrUndefined(this.cellSpacing)){if(this.checkMediaQuery()){for(var e=0,t=0;t<this.panels.length;t++)this.panels[t].sizeY&&(e+=this.panels[t].sizeY);i=e*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(e-1)*this.cellSpacing[1]+"px"}else i=this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px";v.setStyleAttribute(this.element,{height:i});var i=window.getComputedStyle(this.element).width;v.setStyleAttribute(this.element,{width:i})}},H.prototype.setHeightAndWidth=function(e,t){v.setStyleAttribute(e,{height:v.formatUnit(this.setXYDimensions(t)[0])}),v.setStyleAttribute(e,{width:v.formatUnit(this.setXYDimensions(t)[1])})},H.prototype.renderCell=function(e,t,i){this.dimensions=this.setXYDimensions(e),v.isUndefined(e.enabled)&&(e.enabled=!0),0<this.contentTemplateChild.length&&!v.isNullOrUndefined(i)?(s=this.contentTemplateChild[i],e.cssClass&&v.addClass([s],[e.cssClass]),e.id&&s.setAttribute("id",e.id)):s=this.createPanelElement(e.cssClass?e.cssClass.split(" "):null,e.id),s.style.zIndex=""+e.zIndex,this.element.appendChild(s),this.renderReactTemplates();var s,i=this.renderPanels(s,e,e.id,t);return this.panelCollection.push(i),this.setXYAttributes(s,e),this.setHeightAndWidth(s,e),s},H.prototype.setPanelPosition=function(e,t,i){var s,n;e&&(this.checkMediaQuery()&&this.calculateCellSize(),s=this.getCellSize()[1],n=this.getCellSize()[0],i=0===i?0:i*(n+this.cellSpacing[0]),n=0===t?0:t*(s+this.cellSpacing[1]),this.checkMediaQuery()&&(n=0===t?0:this.panelsSizeY*(s+this.cellSpacing[1])),v.setStyleAttribute(e,{left:i+"px",top:n+"px"}))},H.prototype.getRowColumn=function(){if(this.rows=null,0<this.element.querySelectorAll(".e-panel").length&&!this.updatedRows)for(var e=this.element.querySelectorAll(".e-panel"),t=0;t<e.length;t++){var i=e[t],s=parseInt(i.getAttribute("data-row"),10),i=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+i)}else{this.updatedRows&&(this.rows=this.updatedRows,this.updatedRows=null);for(t=0;t<this.panels.length;t++)this.rows=Math.max(this.rows,this.panels[t].row)}},H.prototype.setMinMaxValues=function(e){!e.sizeX||e.sizeX<e.minSizeX?this.panelPropertyChange(e,{sizeX:e.minSizeX}):e.maxSizeX&&e.sizeX>e.maxSizeX?this.panelPropertyChange(e,{sizeX:e.maxSizeX}):e.sizeX>this.columns?this.panelPropertyChange(e,{sizeX:this.columns}):this.panelPropertyChange(e,{sizeX:e.sizeX}),!e.sizeY||e.sizeY<e.minSizeY?this.panelPropertyChange(e,{sizeY:e.minSizeY}):e.maxSizeY&&e.sizeY>e.maxSizeY?this.panelPropertyChange(e,{sizeY:e.maxSizeY}):this.panelPropertyChange(e,{sizeY:e.sizeY})},H.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},H.prototype.panelPropertyChange=function(e,t){e.setProperties(t,!0)},H.prototype.renderDashBoardCells=function(e){if(0<this.element.querySelectorAll(".e-panel").length||0<this.panels.length)for(var t=0;t<e.length;t++){this.gridPanelCollection.push(e[t]),this.setMinMaxValues(e[t]),(this.maxColumnValue<e[t].col||this.maxColumnValue<e[t].col+e[t].sizeX)&&this.panelPropertyChange(e[t],{col:this.maxColumnValue-e[t].sizeX});var i=this.renderCell(e[t],!1,t);this.enableRtl&&v.addClass([i],"e-rtl"),this.element.appendChild(i),this.renderReactTemplates(),this.checkMediaQuery()&&t===e.length-1?this.checkMediaQuerySizing():(this.setPanelPosition(i,e[t].row,e[t].col),this.mainElement=i,this.updatePanelLayout(i,e[t]),this.mainElement=null)}this.setClasses(this.panelCollection)},H.prototype.collisions=function(e,t,i,s,n){var a,l=[];i&&s||(i=s=1),!n||n instanceof Array||(n=[n]);for(var r=0;r<s;++r)for(var o=0;o<i;++o)!(a=this.getPanel(e+r,t+o,n))||n&&-1!==n.indexOf(this.element.querySelector("[id='"+a.id+"']"))||-1!==l.indexOf(this.element.querySelector("[id='"+a.id+"']"))||l.push(this.element.querySelector("[id='"+a.id+"']"));return l},H.prototype.rightWardsSpaceChecking=function(e,n,t){var a=this,l=[],i=[];if(e.forEach(function(e){var t=parseInt(e.getAttribute("data-col"),10),i=parseInt(e.getAttribute("data-sizeX"),10);if(n<a.columns&&n<=t)if(1<i)for(var s=t;s<t+i;s++)l.push(s);else l.push(t)}),0<l.length)for(var s=n+1;s<=this.columns-1;s++)-1===l.indexOf(s)&&s!==n&&-1===i.indexOf(s)&&i.push(s);var r=this.getOccupiedColumns(t);return r.forEach(function(e){n<e&&-1!==i.indexOf(e)&&i.splice(i.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e>parseInt(t.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===i.indexOf(e)&&i.push(e)}),i=i.sort(function(e,t){return e-t})},H.prototype.getOccupiedColumns=function(e){for(var t=[],i=parseInt(e.getAttribute("data-sizeX"),10),s=parseInt(e.getAttribute("data-col"),10),n=s;n<s+i&&n<=this.columns;n++)t.push(n);return t},H.prototype.leftWardsSpaceChecking=function(e,n,t){var a=this,i=[],l=[];if(e.forEach(function(e){var t=parseInt(e.getAttribute("data-col"),10),i=parseInt(e.getAttribute("data-sizeX"),10);if(n<=a.columns&&t<=n)if(1<i)for(var s=t;s<t+i;s++)l.push(s);else l.push(t)}),0<l.length)for(var s=0;s<=n;s++)-1===l.indexOf(s)&&s!==n&&-1===i.indexOf(s)&&i.push(s);var r=this.getOccupiedColumns(t);return r.forEach(function(e){e<n&&-1!==i.indexOf(e)&&i.splice(i.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e<parseInt(t.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===i.indexOf(e)&&i.push(e)}),i=(i=i.sort(function(e,t){return e-t})).reverse()},H.prototype.adjustmentAvailable=function(e,t,i,s,n){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var a,l=!1,r=[],o=(this.topAdjustable=void 0,parseInt(n.getAttribute("data-sizeX"),10)),h=parseInt(n.getAttribute("data-col"),10),p=(-1===(r=this.getRowElements(this.collisions(e,0,this.columns,i,[]))).indexOf(n)&&r.push(n),this.leftWardsSpaceChecking(r,t,n));if(0<p.length?(this.leftAdjustable=this.isLeftAdjustable(p,n,e,t,s,i),this.spacedColumnValue!==h-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),!this.leftAdjustable&&(this.leftAdjustable=!1,a=this.rightWardsSpaceChecking(r,t,n),this.rightAdjustable=0<a.length&&this.isRightAdjustable(a,n,e,t,s,i),this.spacedColumnValue!==o+h&&(this.rightAdjustable=!1),this.rightAdjustable)||(this.rightAdjustable=!1)):(a=this.rightWardsSpaceChecking(r,t,n),this.rightAdjustable=0<a.length&&this.isRightAdjustable(a,n,e,t,s,i),this.spacedColumnValue!==o+h&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&0<e){var d=this.getCellInstance(n.id).row,c=!1;this.startRow!==d&&(c=!0);for(var u=e;0<=u;u--){var g=1<this.getCellInstance(n.id).sizeY&&c?this.checkingElement:n;u!==d&&u===d-i&&0===this.collisions(u,t,s,i,g).length&&(this.topAdjustable=!(c=!1),this.spacedRowValue=v.isNullOrUndefined(this.spacedRowValue)?u:this.spacedRowValue,this.spacedColumnValue=t)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(l=!0,v.isNullOrUndefined(this.spacedRowValue))&&(this.spacedRowValue=e),l},H.prototype.isXSpacingAvailable=function(e,t){for(var i=!1,s=[],n=0;n<e.length;n++)if(e[n+1]-e[n]!=1&&e[n+1]-e[n]!=-1)s=[];else if(s.push(e[n]),2===t&&s.push(e[n+1]),n===e.length-2&&(s.push(e[n+1]),s.length>t)&&s.splice(-1),s.length===t)return i=!0,this.spacedColumnValue=s.sort(function(e,t){return e-t})[0],this.spacedColumnValue<0&&(this.spacedColumnValue=1),i;return i},H.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},H.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&0<e.length)this.spacedColumnValue=e[0],l=!0;else if(1<n&&1===a)l=this.isXSpacingAvailable(e,n);else if(1<a)if(1===n){var r=void 0;if(r=1<=e.length?!0:r)for(var o=0;o<e.length;o++){if(0===this.collisions(i,e[o],n,a,this.checkingElement).length)return this.spacedColumnValue=e[o],l=!0;l=!1}}else l=this.replacable(e,n,i,a,t);return l},H.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&0<e.length)this.spacedColumnValue=e[0],l=!0;else if(1<n&&1===a)l=this.isXSpacingAvailable(e,n);else if(1<a)if(1===n){var r=void 0;if(r=1<=e.length?!0:r)for(var o=0;o<e.length;o++){for(var h=this.collisions(i,e[o],n,a,this.checkingElement),p=0;p<h.length;p++)parseInt(t.getAttribute("data-col"),10)!==e[o]&&h.splice(h.indexOf(h[p]),1);if(0===h.length)return l=!0,this.spacedColumnValue=e[o],l;l=!1}}else l=this.replacable(e,n,i,a,t);return l},H.prototype.replacable=function(e,t,i,s,n){for(var a,l=[],r=0;r<e.length;r++)if(this.isXSpacingAvailable(e,t)){var o=[];if(o.push(this.checkingElement),o.push(n),0===l.length)return a=!0;a=!1}return a},H.prototype.sortCollisionItems=function(i){for(var s,n=[],e=function(t){s=[],i.forEach(function(e){e&&e.getAttribute("data-row")===t.toString()&&s.push(e)});for(var e=a.columns-1;0<=e;e--)!function(t){s.forEach(function(e){e&&e.getAttribute("data-col")===t.toString()&&n.push(e)})}(e)},a=this,t=this.rows-1;0<=t;t--)e(t);return n},H.prototype.updatedModels=function(n,a,l){var r=this,o=[];return this.mainElement||this.sortedPanel(),n.forEach(function(e){r.checkingElement=e;var t=r.getCellInstance(e.id),i=!r.adjustmentAvailable(t.row,t.col,t.sizeY,t.sizeX,l);if(1<t.sizeX&&i)for(var s=t.row;s<a.row+a.sizeY;s++)r.collisions(s,t.col,t.sizeX,t.sizeY,e).forEach(function(e){0<=n.indexOf(e)&&-1===o.indexOf(e)&&o.push(e)})}),o.forEach(function(e){0<=o.indexOf(e)&&n.splice(n.indexOf(e),1)}),n},H.prototype.resetLayout=function(e){var t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement);if(this.mainElement&&!this.addPanelCalled&&!this.resizeCalled&&!this.movePanelCalled){if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s,n,a=this.element.querySelector("[id='"+this.panels[i].id+"']");a!==this.mainElement&&(s=this.cloneObject[a.id].row,n=this.cloneObject[a.id].col,this.setPanelPosition(a,s,n),this.panelPropertyChange(this.getCellInstance(a.id),{row:s,col:n}),this.setAttributes({value:{col:n.toString(),row:s.toString()}},a),this.updateOldRowColumn())}this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&0<this.checkCollision.length&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0])}return t},H.prototype.swapAvailability=function(e,t){for(var i=!0,s=this.getCellInstance(t.id),n=0;n<e.length;n++)for(var a=this.getCellInstance(e[n].id),l=1;l<s.sizeY;l++){var r=[];if(r.push(t),r.push(e[n]),0<this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length)return i=!1}return i},H.prototype.checkForSwapping=function(e,t){if(!this.mainElement||0===e.length)return!1;var i,s=parseInt(e[0].getAttribute("data-row"),10);if(this.startRow<s?i=1:this.startRow>s&&(i=0),!this.swapAvailability(e,t))return!1;for(var n=!1,a=0;a<e.length;a++)if(1<=e.length&&this.cloneObject[this.mainElement.id]&&this.cloneObject[this.mainElement.id].row===this.oldRowCol[this.mainElement.id].row)return!1;for(var l=0===i?this.getCellInstance(this.mainElement.id).row+this.getCellInstance(this.mainElement.id).sizeY:this.startRow,r=0;r<e.length;r++){var o=this.getCellInstance(e[r].id),h=this.getCellInstance(t.id),p=[];if(1===o.sizeY&&-1===p.indexOf(e[r]))p.push(e[r]);else if(1<o.sizeY&&-1===p.indexOf(e[r])){if(!(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1||0===i&&h.row===this.cloneObject[o.id].row))return!1;p.push(e[r])}if(o.sizeY<=h.sizeY&&-1===p.indexOf(e[r])&&p.push(e[r]),p.push(this.mainElement),0<this.collisions(l,o.col,o.sizeX,o.sizeY,p).length)return n=!1;r===e.length-1&&(n=!0)}return n},H.prototype.swapItems=function(e,t,i){var s,n,a=this,l=[],r=(l.push(t),parseInt(e[0].getAttribute("data-row"),10)),o=(this.startRow<r?s=1:this.startRow>r&&(s=0),0===s?r+i.sizeY:this.startRow);this.movePanelCalled||(n=this.getCellInstance(e[0].id),this.panelPropertyChange(i,{row:0===s?r:o+n.sizeY}));for(var h=0;h<e.length;h++)l.push(e[h]),this.setPanelPosition(e[h],o,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:o}),e[h].setAttribute("data-row",o.toString());t.setAttribute("data-row",i.row.toString()),this.setPanelPosition(this.shadowEle,i.row,i.col);for(var p=0;p<this.panels.length;p++)this.oldRowCol[this.panels[p].id]={row:this.panels[p].row,col:this.panels[p].col};this.startRow=i.row,this.updateOldRowColumn(),l.forEach(function(e){a.cloneObject[e.id]=a.oldRowCol[e.id];for(var t=a.getCellInstance(e.id),i=0;i<a.sortedArray.length;i++)if(a.sortedArray[i])for(var s=0;s<a.sortedArray[i].length;s++)a.sortedArray[i][s]===e&&(a.sortedArray[i][s]=void 0);a.sortedArray[t.row]||(a.sortedArray[t.row]=[]),a.sortedArray[t.row][t.col]=e,a.cloneArray=a.sortedArray})},H.prototype.updatePanelLayout=function(e,t){var i=this,s=(this.collisionChecker={},[]),n=[];if(0<(s=this.mainElement&&this.isRenderComplete?this.resetLayout(t):this.collisions(t.row,t.col,t.sizeX,t.sizeY,e)).length)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,t,e),!v.isNullOrUndefined(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,t);else for(var a=0;a<s.length;a++){var l,r=this.getCellInstance(s[a].id);this.checkingElement=s[a],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(r.row,r.col,r.sizeY,r.sizeX,e)&&!v.isNullOrUndefined(this.spacedColumnValue)?(this.setPanelPosition(s[a],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[a].id]={row:this.spacedRowValue,col:this.spacedColumnValue},l={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}},this.setAttributes(l,s[a]),this.panelPropertyChange(r,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,s.length):n.push(s[a])}0<n.length&&(n.forEach(function(e){-1===i.overlapElement.indexOf(e)&&i.overlapElement.push(e)}),this.overlapElement&&-1!==this.overlapElement.indexOf(e)&&this.overlapElement.splice(this.overlapElement.indexOf(e),1),0<n.length)&&(this.updateRowColumn(t.row,this.overlapElement,e),this.checkForCompletePushing()),this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},H.prototype.checkForCompletePushing=function(){for(var e,t=0;t<this.panels.length;t++)this.collisionChecker[this.panels[t].id]&&null!==this.collisionChecker[this.panels[t].id]&&(this.overlapElement=[this.collisionChecker[this.panels[t].id].ele],e=this.panels[t].id,this.updateRowColumn(this.collisionChecker[""+e].row,this.overlapElement,this.collisionChecker[""+e].srcEle))},H.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},H.prototype.updateRowColumn=function(e,t,i){if(i){var s=parseInt(i.getAttribute("data-sizeY"),10),n=parseInt(i.getAttribute("data-row"),10);this.overlapElementClone=(this.overlapElement&&this.shouldRestrict,this.overlapElement);for(var a=0;a<this.overlapElementClone.length;a++){if(0===this.overlapElementClone.length)return;for(var l=0;l<this.overlapElementClone.length;l++)this.collisionChecker[this.overlapElementClone[l].id]={ele:this.overlapElementClone[l],row:e,srcEle:i};var r=n+s,o=parseInt(this.overlapElementClone[a].getAttribute("data-sizeY"),10),h=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),p=parseInt(this.overlapElementClone[a].getAttribute("data-sizeX"),10),d=void 0,c=void 0;if(-1===this.overlapSubElementClone.indexOf(i)&&this.overlapSubElementClone.push(i),-1===this.overlapSubElementClone.indexOf(this.overlapElementClone[a])&&this.overlapSubElementClone.push(this.overlapElementClone[a]),1<o||1<p){for(var u=this.getCellInstance(this.overlapElementClone[a].id),d=u.col,g=document.getElementById(u.id),m=u.row;m<n+s;m++){this.isSubValue=!0,this.panelPropertyChange(u,{row:u.row+1}),g.setAttribute("data-row",u.row.toString()),this.setPanelPosition(g,u.row,d),this.updateCollisionChecked(g),this.oldRowCol[g.id]={row:u.row,col:d};var f=this.getCellInstance(g.id),v=(this.panelPropertyChange(f,{col:d,row:u.row}),parseInt(g.getAttribute("data-row"),10)),y=parseInt(g.getAttribute("data-col"),10),P=parseInt(g.getAttribute("data-sizeX"),10),C=parseInt(g.getAttribute("data-sizeY"),10),S=[];S.push(g),S.push(i),c=this.collisions(v,y,P,C,S),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),this.collisionPanel(c,y,v,g)}this.isSubValue=!1}else{this.addPanelCalled&&(this.addPanelCalled=!1),this.overlapElementClone[a].setAttribute("data-row",r.toString());var x=[],f=(x.push(this.overlapElementClone[a]),x.push(i),c=this.collisions(r,h,p,o,x),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),d=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),this.setPanelPosition(this.overlapElementClone[a],r,d),this.updateCollisionChecked(this.overlapElementClone[a]),this.oldRowCol[this.overlapElementClone[a].id]={row:r,col:d},this.getCellInstance(this.overlapElementClone[a].id));this.panelPropertyChange(f,{col:d,row:r}),this.collisionPanel(c,d,r,this.overlapElementClone[a])}}}},H.prototype.collisionPanel=function(e,t,i,s){var n=this,a=this.getCellInstance(s.id);if(this.panelPropertyChange(a,{row:i,col:t}),0<e.length){this.overlapElement=[],this.shouldRestrict=!0,e.forEach(function(e){n.overlapElement.push(e)});for(var l=parseInt(s.getAttribute("data-row"),10),r=0;r<this.overlapElement.length;r++)this.updateRowColumn(l,this.overlapElement,s);this.shouldRestrict=!1}else{if(this.addPanelCalled||this.sortedPanel(),0<this.overlapSubElementClone.length)for(var o=0;o<this.overlapSubElementClone.length;o++){var h=parseInt(this.overlapSubElementClone[o].getAttribute("data-row"),10),p=parseInt(this.overlapSubElementClone[o].getAttribute("data-col"),10),d=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeX"),10),c=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeY"),10),p=this.collisions(h,p,d,c,this.overlapSubElementClone);this.mainElement&&-1!==p.indexOf(this.mainElement)&&p.splice(p.indexOf(this.mainElement),1),p.forEach(function(e){n.overlapElement.push(e)}),0<p.length&&this.updateRowColumn(h,this.overlapElement,this.overlapSubElementClone[o])}this.overlapSubElementClone=[]}},H.prototype.removeResizeClasses=function(e){for(var t=0;t<e.length;t++)for(var i=e[t].querySelectorAll(".e-resize"),s=0;s<i.length;s++)v.detach(i[s])},H.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+Z);v.removeClass(e,[Z]),this.setClasses(this.panelCollection)},H.prototype.setClasses=function(e){for(var t=0;t<e.length;t++){var i=e[t],s=e[t].querySelector(".e-panel-container");this.allowDragging&&(this.draggableHandle&&i.querySelectorAll(this.draggableHandle)[0]?v.addClass([i.querySelectorAll(this.draggableHandle)[0]],[Z]):v.addClass([i],[Z])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(i,s)}},H.prototype.setResizingClass=function(e,t){if(this.availableClasses=this.resizableHandles,!e.querySelector(".e-resize"))for(var i=0;i<this.availableClasses.length;i++){var s=this.createElement("span"),n=void 0;t.appendChild(s),n="e-east"===this.availableClasses[i]||"e-west"===this.availableClasses[i]||"e-north"===this.availableClasses[i]||"e-south"===this.availableClasses[i]?"e-single":"e-double",v.addClass([s],[n,this.availableClasses[i],"e-resize","e-dl-icon"])}},H.prototype.setXYAttributes=function(e,t){t={value:{sizeX:v.isNullOrUndefined(t.sizeX)?void 0:t.sizeX.toString(),sizeY:v.isNullOrUndefined(t.sizeY)?void 0:t.sizeY.toString(),minSizeX:v.isNullOrUndefined(t.minSizeX)?void 0:t.minSizeX.toString(),minSizeY:v.isNullOrUndefined(t.minSizeY)?void 0:t.minSizeY.toString(),maxSizeX:v.isNullOrUndefined(t.maxSizeX)?void 0:t.maxSizeX.toString(),maxSizeY:v.isNullOrUndefined(t.maxSizeY)?void 0:t.maxSizeY.toString(),row:v.isNullOrUndefined(t.row)?void 0:t.row.toString(),col:v.isNullOrUndefined(t.col)?void 0:t.col.toString()}};this.setAttributes(t,e)},H.prototype.setXYDimensions=function(e){var t=this.getCellSize()[1],i=this.getCellSize()[0],i=e&&"number"==typeof i&&"number"==typeof e.sizeX&&1<e.sizeX?e.sizeX*i+(e.sizeX-1)*this.cellSpacing[0]:i,e=e&&"number"==typeof t&&1<e.sizeY&&"number"==typeof e.sizeY?e.sizeY*t+(e.sizeY-1)*this.cellSpacing[1]:v.formatUnit(t);return[e,i]},H.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),e=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(e/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},H.prototype.checkForChanges=function(e,t,i){var s=[];if(this.removeAllCalled)s=[];else for(var n=0;n<this.panels.length;n++)!v.isNullOrUndefined(t)&&this.panels[n].id===t[0].id||!v.isNullOrUndefined(i)&&this.panels[n].id===i[0].id||this.panels[n].row===this.panelsInitialModel[n].row&&this.panels[n].col===this.panelsInitialModel[n].col||s.push(this.panels[n]);(0<s.length||this.removeAllCalled)&&(e={changedPanels:s,isInteracted:e,addedPanels:v.isNullOrUndefined(t)?[]:t,removedPanels:v.isNullOrUndefined(i)?[]:i},this.trigger("change",e))},H.prototype.enableDraggingContent=function(t){for(var i,r=this,s=this,e=0;e<t.length;e++)!function(l){var e=t[l];s.dragobj=new v.Draggable(e,{preventDefault:!1,clone:!1,dragArea:s.element,isDragScroll:!0,handle:s.draggableHandle||".e-panel",abort:[".e-resize",".e-drag-restrict"],dragStart:s.onDraggingStart.bind(s),dragStop:function(e){if(r.trigger("dragStop",e),v.isNullOrUndefined(e.cancel)&&(e.cancel=!1),e.cancel){var t=r.getCellInstance(r.mainElement.id);for(l=0;l<r.panels.length;l++)r.panels[l].id===t.id&&(e.element.setAttribute("data-col",r.panelsInitialModel[l].col.toString()),e.element.setAttribute("data-row",r.panelsInitialModel[l].row.toString()),t.col=r.panelsInitialModel[l].col,t.row=r.panelsInitialModel[l].row,r.setPanelPosition(r.mainElement,r.panelsInitialModel[l].row,r.panelsInitialModel[l].col),r.updatePanelLayout(r.mainElement,t));r.shadowEle&&v.detach(r.shadowEle)}else{var i=r.getCellInstance(r.mainElement.id),i=(r.allowPushing&&0<r.collisions(i.row,i.col,i.sizeX,i.sizeY,r.mainElement).length?(r.setHolderPosition(e),r.setPanelPosition(r.mainElement,i.row,i.col),r.updatePanelLayout(r.mainElement,i)):r.setPanelPosition(r.mainElement,i.row,i.col),r.mainElement=null,r.getPanelBase(e)),s=(r.shadowEle&&v.detach(r.shadowEle),v.removeClass([r.element],[I]),v.removeClass([e.element],[E]),r.shadowEle=null,e.element.classList.remove("e-dragging"),r.getRowColumnDragValues(e)[0]),n=r.getRowColumnDragValues(e)[1],a=r.getCellInstance(e.element.id),a=(r.allowPushing&&0===r.collisions(s,n,a.sizeX,a.sizeY,document.getElementById(i.id)).length?(r.panelPropertyChange(r.getCellInstance(e.element.id),{row:s,col:n}),r.oldRowCol[e.element.id].row=s,r.oldRowCol[e.element.id].col=n,r.setAttributes({value:{col:n.toString(),row:s.toString()}},e.element)):(r.panelPropertyChange(r.getCellInstance(e.element.id),{row:r.oldRowCol[e.element.id].row,col:r.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",r.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",r.getCellInstance(e.element.id).row.toString())),r.sortedPanel(),r.getCellInstance(e.element.id));r.setPanelPosition(e.element,a.row,a.col),r.updatePanels(),r.updateCloneArrayObject(),r.checkForChanges(!0),r.dragStopEventArgs={event:e.event,element:e.element},r.resizeEvents(),r.rows=r.maxRow(!0),r.setHeightWidth(),r.updateDragArea()}},drag:function(e){r.draggedEventArgs={event:e.event,element:e.element,target:v.closest(e.target,".e-panel")},r.trigger("drag",r.draggedEventArgs),r.onDragStart(e)}}),-1===s.dragCollection.indexOf(s.dragobj)&&s.dragCollection.push(s.dragobj),i=l}(e),e=i},H.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},H.prototype.updateDragArea=function(){this.dragCollection.forEach(function(e){e.setDragArea()})},H.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},H.prototype.onDraggingStart=function(e){var t,i;this.trigger("dragStart",e,function(){v.isNullOrUndefined(e.cancel)&&(e.cancel=!1)}),this.eventVar=e.cancel,e.cancel?(v.removeClass([this.element],[I]),v.removeClass([e.element],[E])):(this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject)),i=this.startRow=parseInt(e.element.getAttribute("data-row"),10),this.startCol=parseInt(e.element.getAttribute("data-col"),10),t=parseInt(e.element.getAttribute("data-sizeY"),10),this.updateRowsHeight(i,t,t),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),this.shadowEle.classList.add("e-holder-transition"),v.setStyleAttribute(this.shadowEle,{position:"absolute"}),v.addClass([this.element],[I]),v.addClass([e.element],[E]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder"),this.shadowEle.style.height=this.getCellInstance(e.element.id).sizeY*this.cellSize[1]+"px",this.shadowEle.style.width=this.getCellInstance(e.element.id).sizeX*this.cellSize[0]+"px",i=this.getCellInstance(e.element.id),this.setPanelPosition(this.shadowEle,i.row,i.col))},H.prototype.cloneModels=function(e,t){void 0===t&&(t=[]);for(var i=0;i<e.length;i++)for(var s in t[i]||(t[i]={}),e[i])t[i][""+s]=e[i][""+s];return t},H.prototype.onDragStart=function(e){var t,i,s,n,a,l;this.eventVar?(this.dragobj.intDestroy(e.event),v.removeClass([this.element],[I]),v.removeClass([e.element],[E])):(n=s=this.getRowColumnDragValues(e)[1],a=this.getRowColumnDragValues(e)[0],n<0||a<0||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),l=this.getCellInstance(e.element.id),this.updateRowsHeight(l.row,l.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:a,col:n},this.updateOldRowColumn(),this.startCol===t&&this.startRow===i||(this.setHolderPosition(e),this.startCol!==t&&(this.startRow=i),this.startRow!==i&&(this.startCol=t),this.allowPushing&&(this.mainElement=e.element,this.checkCollision=this.collisions(l.row,l.col,l.sizeX,l.sizeY,e.element),(0<=l.col||l.col>=this.checkColumnValue)&&(this.checkCollision=[]),this.updatePanelLayout(e.element,l),this.moveItemsUpwards()))),!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.oldRowCol[e.element.id].row===a&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.allowPushing))},H.prototype.getPanelBase=function(e){for(var t,i=0;i<this.panelCollection.length;i++)this.panelCollection[i].id===(e.element&&e.element.id||e)&&(t=this.panelCollection[i]);return t},H.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;-1<e;){for(var n=1,a=t;-1<a;){var l=this.sortedArray[e];if(l){l=l[a];if(l&&(!i||-1===i.indexOf(l))&&parseInt(l.getAttribute("data-sizeX"),10)>=n&&parseInt(l.getAttribute("data-sizeY"),10)>=s)return l}++n,--a}--e,++s}return null},H.prototype.setHolderPosition=function(e){var t=parseInt(e.element.getAttribute("data-sizeY"),10),i=parseInt(e.element.getAttribute("data-col"),10),s=parseInt(e.element.getAttribute("data-row"),10),e=parseInt(e.element.getAttribute("data-sizeX"),10),n=this.getCellSize()[0],a=this.getCellSize()[1],s=0===s?0:s*(a+this.cellSpacing[1]),a=0===i?0:i*(n+this.cellSpacing[0]),i=this.getCellSize()[1],n=this.getCellSize()[0];this.elementRef.top=this.shadowEle.style.top=s+"px",this.elementRef.left=this.shadowEle.style.left=a+"px",this.elementRef.height=this.shadowEle.style.height=t*i+(t-1)*this.cellSpacing[1]+"px",this.elementRef.width=this.shadowEle.style.width=e*n+(e-1)*this.cellSpacing[0]+"px"},H.prototype.getCellInstance=function(e){for(var t,i=0;i<this.panels.length;i++)this.panels[i].id===e&&(t=this.panels[i]);return t},H.prototype.addPanel=function(e){this.panelsSizeY=0,this.maxCol(),e.minSizeX||(e.minSizeX=1),e.minSizeY||(e.minSizeY=1),e.id||(e.id="layout_"+this.panelID.toString(),this.panelID=this.panelID+1);var e=new O(this,"panels",e,!0),t=(this.panels.push(e),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(e),(this.maxColumnValue<e.col||this.maxColumnValue<e.col+e.sizeX)&&this.panelPropertyChange(e,{col:this.maxColumnValue-e.sizeX}),this.renderCell(e,!0,null));if(this.oldRowCol[e.id]={row:e.row,col:e.col},this.cloneObject[e.id]={row:e.row,col:e.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",t),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.removeResizeClasses(this.panelCollection)):(this.mainElement=t,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(t,e.row,e.col),this.updatePanelLayout(t,e)),this.addPanelCalled=!1,this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(e.id)]),this.setClasses([t]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var i=0;i<t.querySelectorAll(".e-resize").length;i++){var s="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown";v.EventHandler.add(t.querySelectorAll(".e-resize")[i],s,this.downResizeHandler,this),"msie"!==v.Browser.info.name&&v.EventHandler.add(t.querySelectorAll(".e-resize")[i],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[e])},H.prototype.updatePanel=function(e){var t,i,s;this.panelsSizeY=0,e.id&&(t=this.getCellInstance(e.id))&&(this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,v.isNullOrUndefined(e.col)&&(e.col=t.col),this.panelPropertyChange(t,e),this.setMinMaxValues(t),e=document.getElementById(e.id),this.mainElement=e,i=t.cssClass?t.cssClass.split(" "):null,this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(i,e.id+"_content",te),e.appendChild(this.panelContent),t.header?(i=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template",""),v.addClass([i],[ie]),i.innerHTML="",s=this.element.id+"HeaderTemplate"+t.id,this.renderTemplate(t.header,i,s,!0,"header"),this.panelContent.appendChild(i),this.renderReactTemplates()):e.querySelector(".e-panel-header")&&v.detach(e.querySelector(".e-panel-header")),t.content?(i=t.cssClass?t.cssClass.split(" "):null,this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(i,e.id+"_body",ee),this.panelBody.innerHTML="",i=this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px",v.setStyleAttribute(this.panelBody,{height:"calc( 100% - "+i+")"}),s=this.element.id+"ContentTemplate"+t.id,this.renderTemplate(t.content,this.panelBody,s,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()):e.querySelector(".e-panel-content")&&v.detach(e.querySelector(".e-panel-content")),this.setXYAttributes(e,t),this.setHeightAndWidth(e,t),this.setPanelPosition(e,t.row,t.col),this.updatePanelLayout(e,t),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject())},H.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},H.prototype.serialize=function(){for(var e=this.cloneModels(this.panels),t=[],i=0;i<e.length;i++)t.push({id:e[i].id,row:e[i].row,col:e[i].col,sizeX:e[i].sizeX,sizeY:e[i].sizeY,minSizeX:e[i].minSizeX,minSizeY:e[i].minSizeY,maxSizeX:e[i].maxSizeX,maxSizeY:e[i].maxSizeY});return t},H.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)v.detach(this.panelCollection[e]),this.clearTemplate();this.removeAllPanel(),this.rows=0,this.gridPanelCollection=[],this.setHeightWidth(),this.sortedPanel(),this.sortedArray=[],this.overlapElementClone=[],this.overlapElement=[],this.overlapSubElementClone=[],this.panelCollection=[],this.oldRowCol={},this.cloneObject={};var t=this.cloneModels(this.panels);this.setProperties({panels:[]},!0),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!1,null,t),this.removeAllCalled=!1},H.prototype.removePanel=function(t){var e,i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s=0;s<this.panelCollection.length;s++)this.panelCollection[s].id===t&&(v.detach(this.panelCollection[s]),this.panelCollection.splice(s,1)),this.panels[s].id===t&&(e=this.panels[s],this.panels.splice(s,1),this.panelsInitialModel.splice(s,1),this.updateOldRowColumn(),this.sortedPanel());this.updatePanels(),this.checkMediaQuery()&&(this.isPanelRemoved=!0,this.checkMediaQuerySizing(),this.isPanelRemoved=!1),this.gridPanelCollection.forEach(function(e){e.id===t&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(e),1)}),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[e])},H.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);isNaN(t)||null===t||isNaN(i)||null===i||!s||(i<0?i=0:i>this.columns&&(i=this.columns-s.sizeX),this.panelPropertyChange(s,{row:t,col:i}),e=document.getElementById(e),this.mainElement=e,this.startRow=parseInt(e.getAttribute("data-row"),10),this.startCol=parseInt(e.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},e),this.updateOldRowColumn(),this.setPanelPosition(e,t,i),this.updatePanelLayout(e,s),this.updateRowHeight(),this.updatePanels(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1))},H.prototype.setAttributes=function(e,t){for(var i=0;i<Object.keys(e).length;i++)Object.keys(e)&&(e[Object.keys(e)[i]].col&&t.setAttribute("data-col",e[Object.keys(e)[i]].col.toString()),e[Object.keys(e)[i]].row&&t.setAttribute("data-row",e[Object.keys(e)[i]].row.toString()),e[Object.keys(e)[i]].sizeX&&t.setAttribute("data-sizeX",e[Object.keys(e)[i]].sizeX.toString()),e[Object.keys(e)[i]].sizeY&&t.setAttribute("data-sizeY",e[Object.keys(e)[i]].sizeY.toString()),e[Object.keys(e)[i]].minSizeX&&t.setAttribute("data-minSizeX",e[Object.keys(e)[i]].minSizeX.toString()),e[Object.keys(e)[i]].minSizeY&&t.setAttribute("data-minSizeY",e[Object.keys(e)[i]].minSizeY.toString()),e[Object.keys(e)[i]].maxSizeX&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeX.toString()),e[Object.keys(e)[i]].maxSizeY)&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeY.toString())},H.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e),e=(this.resizeCalled=!0,document.getElementById(e)),n={event:null,element:e,isInteracted:!1};this.trigger("resizeStart",n),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=e,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},e),this.setHeightAndWidth(e,s),this.updatePanelLayout(e,s),this.updatePanels(),this.updateRowHeight(),this.resizeCalled=!1,this.trigger("resizeStop",n),this.checkForChanges(!1)},H.prototype.destroy=function(){v.EventHandler.remove(window,"resize",this.refreshListener),v.removeClass([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var e=0;e<this.dragCollection.length;e++)this.dragCollection[e].destroy();this.removeAllPanel(),this.panelCollection=null,this.checkCollision=null,this.mainElement=null,this.dragobj=null,this.dragStartArgs=null,this.dragStopEventArgs=null,this.draggedEventArgs=null,this.sortedArray=null,this.cloneArray=null,this.overlapElement=null,this.overlapElementClone=null,this.dragCollection=[],this.allItems=null,this.moveTarget=null,this.upTarget=null,this.downTarget=null,this.checkingElement=null,this.panelHeaderElement=null,this.panelContent=null,this.panelBody=null,this.table=null,se.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},H.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)v.detach(this.element.firstElementChild),this.clearTemplate()},H.prototype.setEnableRtl=function(){!0===this.enableRtl?v.addClass([this.element],"e-rtl"):v.removeClass([this.element],"e-rtl")},H.prototype.updateCellSizeAndSpacing=function(){this.panelResponsiveUpdate(),this.setHeightWidth(),this.getRowColumn();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i),this.setPanelPosition(t,i.row,i.col)}},H.prototype.updatePanelsDynamically=function(e){this.removeAll(),this.setProperties({panels:e},!0),this.setOldRowCol(),this.table&&this.table.remove(),this.initialize(),this.checkMediaQuery()&&this.refresh(),this.showGridLines&&this.initGridLines()},H.prototype.checkForIDValues=function(e){var t=this;!v.isNullOrUndefined(e)&&0<e.length?(this.panelID=0,e.forEach(function(e){e.id||(t.panelPropertyChange(e,{id:"layout_"+t.panelID.toString()}),t.panelID=t.panelID+1)})):this.restrictDynamicUpdate=!0},H.prototype.onPropertyChanged=function(e){var i=this;e.panels&&0<e.panels.length&&e.panels[0]instanceof O&&this.checkForIDValues(e.panels);for(var t=0,s=Object.keys(e);t<s.length;t++)switch(s[t]){case"enableRtl":this.setProperties({enableRtl:e.enableRtl},!0),this.setEnableRtl();break;case"mediaQuery":this.setProperties({mediaQuery:e.mediaQuery},!0),this.checkMediaQuery()&&this.checkMediaQuerySizing();break;case"allowDragging":this.setProperties({allowDragging:e.allowDragging},!0),this.ensureDrag();break;case"allowResizing":if(this.setProperties({allowResizing:e.allowResizing},!0),this.allowResizing)this.setClasses(this.panelCollection),this.resizeEvents();else{for(var n=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),a=0;a<n.length;a++){var l="msie"===v.Browser.info.name?"mousedown pointerdown":"mousedown",r=n[a];v.EventHandler.remove(r,l,this.downResizeHandler),"msie"!==v.Browser.info.name&&v.EventHandler.remove(r,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.updateCellSizeAndSpacing(),this.updateGridLines();break;case"draggableHandle":this.setProperties({draggableHandle:e.draggableHandle},!0),this.ensureDrag();break;case"allowFloating":this.setProperties({allowFloating:e.allowFloating},!0),this.moveItemsUpwards();break;case"showGridLines":this.showGridLines?(this.setProperties({showGridLines:e.showGridLines},!0),this.initGridLines()):this.table&&v.detach(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&0<e.panels.length?(this.isRenderComplete=!1,this.updatePanelsDynamically(e.panels),this.isRenderComplete=!0):e.panels[0]&&e.panels.length?this.restrictDynamicUpdate=!1:(this.isRenderComplete=!1,this.updatePanelsDynamically(this.panels),this.isRenderComplete=!0);break;case"columns":this.isRenderComplete=!1,e.panels&&this.updatePanelsDynamically(e.panels),this.setProperties({columns:e.columns},!0),this.panelCollection=[],this.maxColumnValue=this.columns,this.calculateCellSize(),this.panels.forEach(function(e){var t;i.setMinMaxValues(e),(i.maxColumnValue<e.col||i.maxColumnValue<e.col+e.sizeX)&&(t=i.maxColumnValue-e.sizeX,i.panelPropertyChange(e,{col:t<0?0:t}),i.setXYAttributes(document.getElementById(e.id),e)),i.setHeightAndWidth(document.getElementById(e.id),e),i.panelCollection.push(document.getElementById(e.id)),i.setPanelPosition(document.getElementById(e.id),e.row,e.col),i.mainElement=document.getElementById(e.id),i.updatePanelLayout(document.getElementById(e.id),e),i.mainElement=null}),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}},H.prototype.getPersistData=function(){return this.addOnPersist(["panels"])},H.prototype.mergePersistPanelData=function(e){var t=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!v.isNullOrUndefined(t)&&""!==t||!v.isNullOrUndefined(e)){var i=v.isNullOrUndefined(e)?JSON.parse(t):e,t=Object.keys(i);this.isProtectedOnChange=!0;for(var s=0,n=t;s<n.length;s++){var a=n[s];"object"!=typeof v.getValue(a,this)||v.isNullOrUndefined(v.getValue(a,this))||Array.isArray(v.getValue(a,this))&&"panels"===a&&(this.mergePanels(i[a],this[a]),this[a]=i[a])}this.isProtectedOnChange=!1}},H.prototype.mergePanels=function(e,i){for(var s=e,n=this,t=0;t<s.length;t++)!function(t){n.checkForIDValues(i);var e=i.filter(function(e){return e.id===s[t].id})[0];v.isNullOrUndefined(e)||(s[t]=v.extend(e,s[t],{},!0))}(t)},H.prototype.getModuleName=function(){return"DashboardLayout"},A([v.Property(!0)],H.prototype,"allowDragging",void 0),A([v.Property(!1)],H.prototype,"allowResizing",void 0),A([v.Property(!0)],H.prototype,"allowPushing",void 0),A([v.Property(!0)],H.prototype,"enableHtmlSanitizer",void 0),A([v.Property(!0)],H.prototype,"allowFloating",void 0),A([v.Property(1)],H.prototype,"cellAspectRatio",void 0),A([v.Property([5,5])],H.prototype,"cellSpacing",void 0),A([v.Property(1)],H.prototype,"columns",void 0),A([v.Property(!1)],H.prototype,"showGridLines",void 0),A([v.Property(null)],H.prototype,"draggableHandle",void 0),A([v.Property("en-US")],H.prototype,"locale",void 0),A([v.Property("max-width: 600px")],H.prototype,"mediaQuery",void 0),A([v.Collection([],O)],H.prototype,"panels",void 0),A([v.Property(["e-south-east"])],H.prototype,"resizableHandles",void 0),A([v.Event()],H.prototype,"change",void 0),A([v.Event()],H.prototype,"dragStart",void 0),A([v.Event()],H.prototype,"drag",void 0),A([v.Event()],H.prototype,"dragStop",void 0),A([v.Event()],H.prototype,"resizeStart",void 0),A([v.Event()],H.prototype,"resize",void 0),A([v.Event()],H.prototype,"resizeStop",void 0),A([v.Event()],H.prototype,"created",void 0),A([v.Event()],H.prototype,"destroyed",void 0);var se,i=A([v.NotifyPropertyChanges],H);function H(e,t){e=se.call(this,e,t)||this;return e.rows=1,e.panelID=0,e.movePanelCalled=!1,e.resizeCalled=!1,e.mOffX=0,e.mOffY=0,e.maxTop=9999,e.maxRows=100,e.mouseX=0,e.mouseY=0,e.minTop=0,e.minLeft=0,e.isInlineRendering=!1,e.removeAllCalled=!1,e.isPanelRemoved=!1,e.panelsSizeY=0,e.resizeHeight=!1,e.eventVar=!1,v.setValue("mergePersistData",e.mergePersistPanelData,e),e}ne=function(e,t){return(ne=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var ne,ae,A=function(e,t){function i(){this.constructor=e}ne(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},B=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},le="e-opposite-content",re="e-dot",oe="e-content",he="e-vertical",pe="e-horizontal",de="e-timeline-reverse",ce="e-item-disabled",ue="e-item-template",M=((M=e.TimelineOrientation||(e.TimelineOrientation={})).Horizontal="Horizontal",M.Vertical="Vertical",(M=e.TimelineAlign||(e.TimelineAlign={})).Before="Before",M.After="After",M.Alternate="Alternate",M.AlternateReverse="AlternateReverse",ae=v.ChildProperty,A(L,ae),B([v.Property("")],L.prototype,"dotCss",void 0),B([v.Property("")],L.prototype,"content",void 0),B([v.Property("")],L.prototype,"oppositeContent",void 0),B([v.Property(!1)],L.prototype,"disabled",void 0),B([v.Property("")],L.prototype,"cssClass",void 0),L);function L(){return null!==ae&&ae.apply(this,arguments)||this}ge=v.Component,A(k,ge),k.prototype.preRender=function(){this.element.id||(this.element.id=v.getUniqueID("e-"+this.getModuleName()))},k.prototype.getModuleName=function(){return"timeline"},k.prototype.getPersistData=function(){return this.addOnPersist([])},k.prototype.render=function(){v.attributes(this.element,{role:"navigation","aria-label":this.element.id}),this.timelineListEle=this.createElement("ol",{className:"e-timeline-items"}),this.updateOrientation(),this.updateCssClass(this.cssClass),this.updateAlign(),this.updateReverse(),this.updateRtl(),this.updateTemplateFunction(),this.renderItems(),this.element.appendChild(this.timelineListEle)},k.prototype.updateOrientation=function(){var e;v.isNullOrUndefined(this.orientation)||"horizontal"!==(e=this.orientation.toLowerCase())&&"vertical"!==e||(this.element.classList.remove(pe,he),this.element.classList.add("e-"+e))},k.prototype.updateCssClass=function(e,t){var i;(t=void 0===t?"":t)&&(i=t.trim().split(" "),(t=this.element.classList).remove.apply(t,i)),e&&(i=e.trim().split(" "),(t=this.element.classList).add.apply(t,i))},k.prototype.updateRtl=function(){this.element.classList[this.enableRtl?"add":"remove"]("e-rtl")},k.prototype.updateAlign=function(){var e;v.isNullOrUndefined(this.align)||"before"!==(e=this.align.toLowerCase())&&"after"!==e&&"alternate"!==e&&"alternatereverse"!==e||(this.element.classList.remove("e-align-before","e-align-after","e-align-alternate","e-align-alternatereverse"),this.element.classList.add("e-align-"+e))},k.prototype.updateReverse=function(){this.element.classList[this.reverse?"add":"remove"](de)},k.prototype.renderItems=function(){var t=this;this.haveOneSidecontent();for(var e=0;e<this.items.length;e++){var i,s=this.items[parseInt(e.toString(),10)],n=this.createElement("li",{className:"e-timeline-item e-connector"}),a=(this.template?this.renderItemContent(e,!1,n):(i=this.createElement("div",{className:le}),s.oppositeContent&&this.updateItemContent(!1,s,e,i),n.appendChild(i),i=this.createElement("div",{className:"e-dot-item"}),a=s.dotCss?re+" "+s.dotCss.trim():re,a=this.createElement("div",{className:a}),i.appendChild(a),n.appendChild(i),a=this.createElement("div",{className:oe}),s.content&&this.updateItemContent(!0,s,e,a),n.appendChild(a),s.cssClass&&(i=n.classList).add.apply(i,s.cssClass.trim().split(" ")),s.disabled&&n.classList.add(ce)),{element:n,index:e});this.trigger("beforeItemRender",a,function(e){t.timelineListEle.appendChild(e.element)})}},k.prototype.haveOneSidecontent=function(){for(var e=!1,t=!1,i=0;i<this.items.length;i++)var s=this.items[parseInt(i.toString(),10)],e=e||0<s.content.length,t=t||0<s.oppositeContent.length;this.element.classList.remove("e-content-only","e-opposite-content-only"),e&&!t&&this.element.classList.add("e-content-only"),t&&!e&&this.element.classList.add("e-opposite-content-only")},k.prototype.updateItemContent=function(e,t,i,s){var n=!(this.isReact||this.isVue),e=this.getTemplateFunction(e?t.content:t.oppositeContent,n);"string"==typeof e?s.innerText=e:v.append(e({item:t,itemIndex:i},this),s)},k.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template,!1):null},k.prototype.renderItemContent=function(e,t,i){var s,n=this.timelineListEle.querySelectorAll("li");t&&this.removeItemContent(n[parseInt(e.toString(),10)]),this.template&&((t?n[parseInt(e.toString(),10)]:i).classList.add(ue),s=this.items[parseInt(e.toString(),10)],v.append(this.templateFunction({item:s,itemIndex:e},this,"timelineTemplate",this.element.id+"_timelineTemplate",this.isStringTemplate),t?n[parseInt(e.toString(),10)]:i)),this.renderReactTemplates()},k.prototype.removeItemContent=function(e){e.classList.remove(ue);for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},k.prototype.getTemplateFunction=function(t,e){if(void 0===e&&(e=!0),"string"!=typeof t)return v.compile(t);var i="";try{var s=v.select(t);s?(i="SCRIPT"===s.tagName?s.innerHTML:s.outerHTML,e=!1):i=t}catch(e){i=t}return e?i:v.compile(i)},k.prototype.removeItemElements=function(){for(var e=this.timelineListEle.querySelectorAll("li"),t=0;t<e.length;t++)v.remove(e[parseInt(t.toString(),10)])},k.prototype.updateElementClassArray=function(){v.removeClass([this.element],["e-rtl","e-align-before","e-align-after","e-outline","e-fill","e-align-alternate","e-align-alternatereverse",de,pe,he])},k.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["timelineTemplate"]);for(var e=0;e<this.items.length;e++)this.renderItemContent(e,!0)},k.prototype.destroy=function(){ge.prototype.destroy.call(this),this.removeItemElements(),this.element.removeAttribute("role"),this.element.removeAttribute("aria-label"),this.clearTemplate(),this.timelineListEle&&v.remove(this.timelineListEle),this.timelineListEle=null,this.updateElementClassArray()},k.prototype.updateItems=function(e,t,i,s){var n,a,l=this.timelineListEle.querySelectorAll("li");switch(e){case"dotCss":n=l[parseInt(i.toString(),10)].querySelector("."+re),""!==t.dotCss&&(a=n.classList).remove.apply(a,t.dotCss.trim().split(" ")),""!==s.dotCss&&(a=n.classList).add.apply(a,this.items[parseInt(i.toString(),10)].dotCss.trim().split(" "));break;case"content":(n=l[parseInt(i.toString(),10)].querySelector("."+oe)).innerText="",this.updateItemContent(!0,s,i,n),this.haveOneSidecontent();break;case"oppositeContent":(a=l[parseInt(i.toString(),10)].querySelector("."+le)).innerText="",this.updateItemContent(!1,s,i,a),this.haveOneSidecontent();break;case"disabled":l[parseInt(i.toString(),10)].classList[this.items[parseInt(i.toString(),10)].disabled?"add":"remove"](ce);break;case"cssClass":""!==t.cssClass&&(n=l[parseInt(i.toString(),10)].classList).remove.apply(n,t.cssClass.trim().split(" ")),""!==s.cssClass&&(a=l[parseInt(i.toString(),10)].classList).add.apply(a,s.cssClass.trim().split(" "))}},k.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"items":if(Array.isArray(e.items))this.removeItemElements(),this.renderItems();else for(var n=Object.keys(e.items).length,a=0;a<n;a++)for(var l=parseInt(Object.keys(e.items)[a],10),r=0;r<Object.keys(e.items[l]).length;r++){var o=Object.keys(e.items[l])[r];this.updateItems(o,t.items[l],l,e.items[l])}break;case"orientation":this.updateOrientation();break;case"align":this.updateAlign();break;case"enableRtl":this.updateRtl();break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"reverse":this.element.classList[this.reverse?"add":"remove"](de);break;case"template":this.updateTemplateFunction(),this.updateContent()}},B([v.Property(e.TimelineOrientation.Vertical)],k.prototype,"orientation",void 0),B([v.Property(e.TimelineAlign.After)],k.prototype,"align",void 0),B([v.Collection([],M)],k.prototype,"items",void 0),B([v.Property("")],k.prototype,"cssClass",void 0),B([v.Property(!1)],k.prototype,"reverse",void 0),B([v.Property("")],k.prototype,"template",void 0),B([v.Event()],k.prototype,"created",void 0),B([v.Event()],k.prototype,"beforeItemRender",void 0);var ge,A=B([v.NotifyPropertyChanges],k);function k(e,t){return ge.call(this,e,t)||this}e.DashboardLayout=i,e.PaneProperties=_,e.Panel=O,e.Splitter=T,e.Timeline=A,e.TimelineItem=M,Object.defineProperty(e,"__esModule",{value:!0})});
11
11
  //# sourceMappingURL=ej2-layouts.umd.min.js.map