@syncfusion/ej2-layouts 29.1.38 → 29.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,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-layouts.min.js
3
- * version : 29.1.38
3
+ * version : 29.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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&&"object"==typeof module?module.exports=t(require("SyncfusionBase")):"function"==typeof define&&define.amd?define(["SyncfusionBase"],t):"object"==typeof exports?exports.SyncfusionLayouts=t(require("SyncfusionBase")):e.SyncfusionLayouts=t(e.SyncfusionBase)}(self,(e=>(()=>{"use strict";var t={766:t=>{t.exports=e}},i={};function s(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,s),a.exports}s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{s.r(n),s.d(n,{DashboardLayout:()=>J,PaneProperties:()=>T,Panel:()=>G,Splitter:()=>Y,Timeline:()=>he,TimelineAlign:()=>i,TimelineItem:()=>oe,TimelineOrientation:()=>t});var e,t,i,a=s(766),l=(e=function(t,i){return e=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,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}),r=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},o="e-splitter",h="e-splitter-horizontal",d="e-splitter-vertical",p="e-pane",c="e-pane-horizontal",u="e-pane-vertical",g="e-split-bar",m="e-split-bar-horizontal",f="e-split-bar-vertical",v="e-static-pane",y="e-scrollable",P="e-resize-handler",C="e-resizable-split-bar",S="e-split-bar-hover",x="e-split-bar-active",b="e-hide-handler",w="e-disabled",z="e-rtl",A="e-collapsible",I="e-navigate-arrow",E="e-arrow-right",O="e-arrow-left",R="e-arrow-up",H="e-arrow-down",B="e-icon-hidden",M="e-expanded",L="e-collapsed",k="e-pane-hidden",W="e-resizable",N="e-last-bar",T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),r([(0,a.Property)()],t.prototype,"size",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsible",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsed",void 0),r([(0,a.Property)(!0)],t.prototype,"resizable",void 0),r([(0,a.Property)(null)],t.prototype,"min",void 0),r([(0,a.Property)(null)],t.prototype,"max",void 0),r([(0,a.Property)()],t.prototype,"content",void 0),r([(0,a.Property)("")],t.prototype,"cssClass",void 0),t}(a.ChildProperty),Y=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.needsID=!0,s}return l(t,e),t.prototype.onPropertyChanged=function(e,t){if(this.element.classList.contains(o))for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(this.element,e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(e.paneSettings instanceof Array&&t.paneSettings instanceof Array)this.clearTemplate(),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(e.paneSettings),l=n.some((function(t){return!(0,a.isNullOrUndefined)(e.paneSettings[t].content)}));if(this.isReact&&l){for(var r=0,h=0;h<this.paneSettings.length;h++)"function"==typeof this.paneSettings[h].content&&(r+=1);r===this.paneSettings.length&&this.clearTemplate()}for(var d=0;d<n.length;d++)for(var p=parseInt(Object.keys(e.paneSettings)[d],10),c=Object.keys(e.paneSettings[p]).length,u=0;u<c;u++){var g=Object.keys(e.paneSettings[p])[u];switch(g){case"content":var m=Object(e.paneSettings[p])[""+g];(0,a.isNullOrUndefined)(m)||(this.allPanes[p].innerHTML="",this.setTemplate(m,this.allPanes[p]));break;case"resizable":var f=Object(e.paneSettings[p])[""+g];this.resizableModel(p,f);break;case"collapsible":this.collapsibleModelUpdate(p);break;case"collapsed":e.paneSettings[p].collapsed?this.isCollapsed(p):this.collapsedOnchange(p);break;case"cssClass":this.setCssClass(this.allPanes[p],e.paneSettings[p].cssClass);break;case"size":var v=Object(e.paneSettings[p])[""+g];""===v||(0,a.isNullOrUndefined)(v)||this.updatePaneSize(v,p)}}}break;case"enableRtl":this.setRTL(e.enableRtl)}}},t.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i,s=[],n=0,a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText?this.paneSettings[a].size&&(i="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(s[n]=a,n++);i="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+i:this.allBars[0].offsetHeight*this.allBars.length+i;for(var l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-i-2*this.border)/s.length,r=0;r<s.length;r++)""!==this.allPanes[s[r]].style.flexBasis&&(this.allPanes[s[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(v)},t.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},t.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,(0,a.removeClass)([this.wrapper],["e-control","e-lib",o]);var e="Horizontal"===this.orientation?h:d;(0,a.addClass)([this.element],e);var t="msie"===a.Browser.info.name?"e-ie":"";this.setCssClass(this.element,t),a.Browser.isDevice&&(0,a.addClass)([this.element],"e-splitter-touch")},t.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},t.prototype.getModuleName=function(){return"splitter"},t.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,a.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),a.EventHandler.add(this.element,"keydown",this.onMove,this)},t.prototype.onDocumentClick=function(e){e.target.classList.contains(g)||(0,a.isNullOrUndefined)(this.currentSeparator)||(this.currentSeparator.classList.remove(S),this.currentSeparator.classList.remove(x))},t.prototype.checkPaneSize=function(e){var t="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,i="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,s=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;if(this.previousPane.style.flexBasis.indexOf("%")>0||this.previousPane.style.flexBasis.indexOf("p")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var n=this.updatePaneFlexBasis(this.previousPane),l=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=n+l,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(l-1+"%")?(this.previousPane.style.flexBasis=n+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(n-1+"%")&&(this.previousPane.style.flexBasis=n-1+"%",this.nextPane.style.flexBasis=l+1+"%"))}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<i+s?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t+s+"px",this.nextPane.style.flexBasis=i<s?"0px":i-s+"px"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<t-s&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t<s?"0px":t-s+"px",this.nextPane.style.flexBasis=i+s+"px"))},t.prototype.onMove=function(e){if(this.allPanes.length>1){var t=this.getSeparatorIndex(this.currentSeparator),i=this.previousPane.classList.contains(L),s=this.previousPane.classList.contains(M),n=this.nextPane.classList.contains(L);("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(g)&&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(g)&&this.currentSeparator.classList.contains(x)&&(this.previousPane.classList.contains(L)?(this.expand(t),(0,a.addClass)([this.currentSeparator],x)):(this.collapse(t),(0,a.addClass)([this.currentSeparator],x)))}},t.prototype.getMinInPixel=function(e){if((0,a.isNullOrUndefined)(e))return 0;var t=this.convertPixelToNumber(e.toString());return e.indexOf("%")>0&&(t=this.convertPercentageToPixel(e)),this.convertPixelToNumber(t.toString())},t.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var t=a.SanitizeHtmlHelper.beforeSanitize();(0,a.extend)(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!(0,a.isNullOrUndefined)(t.helper)?e=t.helper(e):t.cancel||(e=a.SanitizeHtmlHelper.serializeValue(t,e))}return e},t.prototype.checkDataAttributes=function(){for(var e,t,i=0;i<this.validElementAttributes.length;i++)t=this.element.getAttribute(this.validElementAttributes[i]),(0,a.isNullOrUndefined)(t)||(this[e=this.removeDataPrefix(this.validElementAttributes[i])]=t);for(var s=0;s<this.element.children.length;s++)for(var n=0;n<this.validDataAttributes.length;n++)if(t=this.element.children[s].getAttribute(this.validDataAttributes[n]),!(0,a.isNullOrUndefined)(t)){t="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[n]))||"resizable"===e?"true"===t:t,(0,a.isNullOrUndefined)(this.paneSettings[s])&&(this.paneSettings[s]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1});var l=this.paneSettings[s][e];"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[s][e]=t),((0,a.isNullOrUndefined)(l)||""===l)&&(this.paneSettings[s][e]=t)}},t.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach((function(e){(0,a.detach)(e)})),this.restoreElem()},t.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++)(0,a.isNullOrUndefined)(this.paneSettings[s])?t[s]=i:t[s]=this.paneSettings[s];this.setProperties({paneSettings:t},!0)},t.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector("."+I+"."+t)},t.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},t.prototype.setRTL=function(e){e?(0,a.addClass)([this.element],z):(0,a.removeClass)([this.element],z)},t.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),(0,a.addClass)([this.allBars[this.allBars.length-1]],N),(0,a.removeClass)([this.allBars[0]],N),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},t.prototype.setSplitterSize=function(e,t,i){var s="width"===i?{width:(0,a.formatUnit)(t)}:{height:(0,a.formatUnit)(t)};(0,a.setStyleAttribute)(e,s)},t.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)},t.prototype.setCssClass=function(e,t){t&&(0,a.addClass)([e],t.split(t.indexOf(",")>-1?",":" "))},t.prototype.hideResizer=function(e){(0,a.addClass)([(0,a.select)("."+P,e)],b)},t.prototype.showResizer=function(e){!(0,a.isNullOrUndefined)(this.previousPane)&&this.previousPane.classList.contains(W)&&!(0,a.isNullOrUndefined)(this.nextPane)&&this.nextPane.classList.contains(W)&&(0,a.removeClass)([(0,a.select)("."+P,e)],b)},t.prototype.resizableModel=function(e,t){var i=e===this.allBars.length?e-1:e,s=e;a.EventHandler.remove(this.allBars[i],"mousedown",this.onMouseDown),t?(a.EventHandler.add(this.allBars[i],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[i]),(0,a.removeClass)([(0,a.select)("."+P,this.allBars[i])],b),this.allBars[i].classList.add(C),e===this.allBars.length?this.allPanes[e].classList.add(W):this.allPanes[i].classList.add(W),this.updateResizablePanes(s))):(this.updateResizablePanes(s),this.hideResizer(this.allBars[i]),this.allBars[i].classList.remove(C),e===this.allBars.length?this.allPanes[e].classList.remove(W):this.allPanes[i].classList.remove(W))},t.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,O):this.checkArrow(t,R),s="Horizontal"===this.orientation?this.checkArrow(t,E):this.checkArrow(t,H);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},t.prototype.collapseArrow=function(e,t){return(0,a.selectAll)("."+t,this.allBars[e])[0]},t.prototype.updateIsCollapsed=function(e,t,i){if(!(0,a.isNullOrUndefined)(e)){var s=e===this.allBars.length,n=s?e-1:e;(!s&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(n-1,i):s?this.collapseArrow(n,i):this.collapseArrow(n,t)).click()}},t.prototype.isCollapsed=function(e){var t=this;if((0,a.isNullOrUndefined)(e)||!this.paneSettings[e].collapsed||!(0,a.isNullOrUndefined)(this.allPanes[e].classList.contains(L))){if(this.expandFlag=!1,(0,a.isNullOrUndefined)(e)){for(var i=0;i<this.allPanes.length;i++)!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&this.updateIsCollapsed(i,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(i=this.allPanes.length-1;i>=0;i--)if(!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&!this.allPanes[i].classList.contains(L)){var s="Horizontal"===this.orientation?E:H;if(0!==i)this.collapseArrow(i-1,s).click();if(!this.nextPane.classList.contains(L))this.collapseArrow(i-1,s).click()}}else{this.collapseFlag=!0;var n=e===this.allBars.length,l=n?e-1:e,r={target:!n&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(l-1,this.targetArrows().lastBarArrow):n?this.collapseArrow(l,this.targetArrows().lastBarArrow):this.collapseArrow(l,this.targetArrows().collapseArrow)},o=this.beforeAction(r);this.trigger("beforeCollapse",o,(function(i){if(!i.cancel){var s=[];s[0]=e;for(var n=1,a=0;a<t.allPanes.length;a++)t.allPanes[a].classList.contains(L)&&(s[n]=a,n++);s=s.sort(),t.updateIsCollapsed(e,t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=0;a<s.length;a++)t.allPanes[s[a]].classList.contains(L)||t.updateIsCollapsed(s[a],t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=s.length;a>0;a--)if(!t.allPanes[s[a-1]].classList.contains(L)){var l=t.targetArrows();t.updateIsCollapsed(s[a-1],l.collapseArrow,l.lastBarArrow)}var o=t.afterAction(r);t.trigger("collapsed",o),t.collapseFlag=!1}}))}this.expandFlag=!0}},t.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?O:R,lastBarArrow:"Vertical"===this.orientation?H:E}},t.prototype.collapsedOnchange=function(e){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains(L)||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},t.prototype.isEnabled=function(e){e?(0,a.removeClass)([this.element],w):(0,a.addClass)([this.element],w)},t.prototype.setSeparatorSize=function(e){for(var t=(0,a.isNullOrUndefined)(e)?"auto":e+"px",i="Horizontal"===this.orientation?m:f,s=0;s<this.allBars.length;s++){var n=(0,a.selectAll)("."+i,this.element)[s],l=(0,a.selectAll)("."+P,n)[0];"Horizontal"===this.orientation?(n.style.width=t,(0,a.isNullOrUndefined)(l)||(l.style.width=t)):(n.style.height=t,(0,a.isNullOrUndefined)(l)||(l.style.height=t))}},t.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?h:d),this.element.classList.add(t?d:h);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?c:u),this.allPanes[i].classList.add(t?u:c);for(i=0;i<this.allBars.length;i++)(0,a.detach)(this.allBars[i]);this.allBars=[],this.addSeparator(this.element)},t.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},t.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(p)&&t.push(e[i]);return t},t.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},t.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},t.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},t.prototype.getOrderIndex=function(e,t){var i,s;s="pane"===t?this.allPanes:this.allBars;for(var n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},t.prototype.updateSeparatorSize=function(e){var t=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=t:e.style.height=t},t.prototype.addResizeHandler=function(e){var t=this.createElement("div");(0,a.addClass)([t],[P,"e-icons"]),this.updateSeparatorSize(t),e.appendChild(t)},t.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},t.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},t.prototype.setDimension=function(e,t){(0,a.setStyleAttribute)(this.element,{height:e,width:t})},t.prototype.updateCollapseIcons=function(e,t,i){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?(0,a.removeClass)([i],[B]):(0,a.addClass)([i],[B]),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])))},t.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=O,this.rightArrow=E):(this.leftArrow=R,this.rightArrow=H)},t.prototype.createSeparator=function(e){var t=this.createElement("div");this.allBars.push(t);var i=this.createElement("button"),s=this.createElement("button");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");var n=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px",l=this;return"Horizontal"===this.orientation?(this.updateIconClass(),(0,a.addClass)([s],[I,O,B]),(0,a.addClass)([i],[I,E,B]),(0,a.addClass)([t],[g,m]),t.style.width=n):((0,a.addClass)([i],[I,H,B]),(0,a.addClass)([s],[I,R,B]),(0,a.addClass)([t],[g,f]),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(x),l.currentSeparator=t,l.getPaneDetails()})),t.addEventListener("blur",(function(){t.classList.remove(x)})),t},t.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add(W):this.allPanes[e].classList.remove(W)},t.prototype.addSeparator=function(e){for(var t,i=this.allPanes.length,s=e.children,n=0;n<i;n++)if(n<i-1){if(t=this.createSeparator(n),(0,a.setStyleAttribute)(t,{order:2*n+1}),this.separatorOrder.push(2*n+1),s[n].parentNode.appendChild(t),this.currentSeparator=t,t.setAttribute("role","separator"),t.setAttribute("aria-valuenow",n.toString()),(0,a.isNullOrUndefined)(this.orientation)||t.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),!(0,a.isNullOrUndefined)(t))if(this.isResizable()){a.EventHandler.add(t,"mousedown",this.onMouseDown,this);var l="msie"===a.Browser.info.name?"pointerdown":"touchstart";a.EventHandler.add(t,l,this.onMouseDown,this),t.classList.add(C),this.updateResizablePanes(n)}else(0,a.addClass)([(0,a.select)("."+P,t)],b)}else t&&(0,a.addClass)([t],N),i>1&&this.updateResizablePanes(n);if("msie"===a.Browser.info.name){var r=this.element.querySelectorAll(".e-splitter .e-resize-handler");for(n=0;n<r.length;n++){var o=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;r[n].style.paddingLeft=o/2+"px",r[n].style.paddingRight=o/2+"px"}}},t.prototype.isResizable=function(){var e=!1;return(!(0,a.isNullOrUndefined)(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},t.prototype.addMouseActions=function(e){var t,i,s=this;e.addEventListener("mouseenter",(function(){t=setTimeout((function(){(0,a.addClass)([e],[S])}),s.iconsDelay)})),e.addEventListener("mouseleave",(function(){clearTimeout(t),(0,a.removeClass)([e],[S])})),e.addEventListener("mouseout",(function(){clearTimeout(i)})),e.addEventListener("mouseover",(function(){i=setTimeout((function(){(0,a.addClass)([e],[S])}))}))},t.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},t.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},t.prototype.isSeparator=function(e){return!e.classList.contains(g)},t.prototype.isMouseEvent=function(e){var t=!1;return("mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(t=!0),t},t.prototype.updateCursorPosition=function(e,t){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},t);else{var i="msie"!==a.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:i.pageX,y:i.pageY},t)}},t.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},t.prototype.reportWindowSize=function(){var e=this,t=this.allPanes.length;if(document.body.contains(this.element)){for(var i=0;i<t;i++){if((0,a.isNullOrUndefined)(this.paneSettings[i].size)&&this.allPanes[i].classList.remove(v),t-1===i)this.element.querySelectorAll("."+v).length===t&&""===this.allPanes[i].style.flexBasis&&(0,a.removeClass)([this.allPanes[i]],v)}t>0&&setTimeout((function(){e.updateSplitterSize(!0)}),200)}else document.defaultView.removeEventListener("resize",this.onReportWindowSize)},t.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,l=0,r=n.length;l<r;l++)t+="Horizontal"===this.orientation?n[l].offsetWidth:n[l].offsetHeight;var o=0;for(r=this.allBars.length;o<r;o++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[o]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[o]).marginLeft,10):parseInt(getComputedStyle(this.allBars[o]).marginTop,10)+parseInt(getComputedStyle(this.allBars[o]).marginBottom,10);var h="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t);for(l=0,r=this.allPanes.length;l<r;l++)(""===this.allPanes[l].innerText?this.paneSettings[l].size&&""===this.allPanes[l].innerText:this.paneSettings[l].size||""===this.allPanes[l].innerText)||(i[s]=l,s++);var d=h/i.length;for(o=0,r=i.length;o<r;o++)""!==this.allPanes[i[o]].style.flexBasis&&(this.allPanes[i[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[o]].offsetWidth+d+"px":this.allPanes[i[o]].offsetHeight+d+"px");if(2===this.allPanes.length&&e){var p=this.allPanes.length,c=void 0,u=void 0,g=void 0,m=void 0;for(l=0;l<p;l++)if(!(0,a.isNullOrUndefined)(this.paneSettings[l].min)&&(u=this.convertPixelToNumber(this.paneSettings[l].min.toString()),this.paneSettings[l].min.indexOf("%")>0&&(u=this.convertPercentageToPixel(this.paneSettings[l].min)),c=this.convertPixelToNumber(u.toString()),("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight)<c)){0===l?(g=this.allPanes[l],m=this.allPanes[l+1]):(g=this.allPanes[l],m=this.allPanes[l-1]);var f=c-("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight),y=g.style.flexBasis.indexOf("%")>-1,P="Horizontal"===this.orientation?g.offsetWidth:g.offsetHeight;!(0,a.isNullOrUndefined)(g)&&""!==g.style.flexBasis&&g.classList.contains(v)&&(g.style.flexBasis=y?this.convertPixelToPercentage(P+f)+"%":P+f+"px");var C="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight;(0,a.isNullOrUndefined)(m)||""===m.style.flexBasis||m.classList.contains(v)||(m.style.flexBasis=m.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(C-f)+"%":C-f+"px")}}},t.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(t,this.onTouchEndHandler,!0)},t.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.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)},t.prototype.wireClickEvents=function(){a.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},t.prototype.clickHandler=function(e){if(!e.target.classList.contains(I)){var t=(0,a.selectAll)("."+o+" > ."+g+"."+S);t.length>0&&(0,a.removeClass)(t,S),e.target.classList.add(S)}this.splitterDetails(e);var i=e.target;(i.classList.contains(O)||i.classList.contains(E)||i.classList.contains(H)||i.classList.contains(R))&&(this.nextPane.classList.contains(k)||this.previousPane.classList.contains(k)?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},t.prototype.expandAction=function(e){var t=this,i=this.beforeAction(e);this.expandFlag?this.trigger("beforeExpand",i,(function(i){i.cancel||t.expandPane(e);var s=t.afterAction(e);t.trigger("expanded",s)})):this.expandPane(e)},t.prototype.getIcon=function(e){return e.target.className.split(" ").filter((function(e){return e!==I&&e!==B}))[0]},t.prototype.expandPane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=!this.previousPane.classList.contains(L)&&this.previousPane.classList.contains(v)&&!this.nextPane.classList.contains(L)&&!this.nextPane.classList.contains(M)&&this.nextPane.nextElementSibling.classList.contains(p)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!(t===this.allPanes.length-2),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.nextPane:this.previousPane,o=l?this.previousPane:this.nextPane,h=l?this.nextPaneIndex:this.prevPaneIndex;(0,a.removeClass)([r],s),r.setAttribute("aria-hidden","false");var d=this.element.querySelectorAll("."+L).length;if(d>0)o.classList.contains(L)||((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"));else if(0===d)for(var c=0;c<this.allPanes.length;c++)this.allPanes[c].classList.contains(L)||((0,a.removeClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(h,!1),this.updateIconsOnExpand(e,n),this.updateFlexGrow(),i&&(this.previousPane.classList.remove(M),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},t.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains(L)&&(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(L)&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains(M)?s[n].style.flexGrow="1":s[n].classList.contains(L)&&(s[n].style.flexGrow="0")},t.prototype.hideTargetBarIcon=function(e,t){(0,a.addClass)([(0,a.select)("."+t,e)],B)},t.prototype.showTargetBarIcon=function(e,t){(0,a.removeClass)([(0,a.select)("."+t,e)],B)},t.prototype.updateIconsOnCollapse=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.resizableModel(this.currentBarIndex,!1),(0,a.isNullOrUndefined)(s)||this.resizableModel(n,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,i),this.showTargetBarIcon(this.currentSeparator,i)):((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,t),this.hideTargetBarIcon(this.currentSeparator,i));else if(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,t),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(1===o?(this.hideTargetBarIcon(s,i),this.resizableModel(n,!1)):2===o&&(this.hideBarIcons(s),this.resizableModel(n,!1)),this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible||this.hideTargetBarIcon(s,t))}}else this.showTargetBarIcon(this.currentSeparator,i),this.hideTargetBarIcon(this.currentSeparator,t),this.resizableModel(this.currentBarIndex,!1)},t.prototype.collapseAction=function(e){var t=this,i=this.beforeAction(e);this.collapseFlag?this.collapsePane(e):this.trigger("beforeCollapse",i,(function(i){if(!i.cancel){t.collapsePane(e);var s=t.afterAction(e);t.trigger("collapsed",s)}}))},t.prototype.collapsePane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=this.previousPane.classList.contains(v)&&!this.previousPane.classList.contains(L)&&!this.nextPane.classList.contains(L)&&this.nextPane.nextElementSibling.classList.contains(p)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!this.nextPane.nextElementSibling.classList.contains(L)&&!(t===this.allPanes.length-2)||this.nextPane.classList.contains(L)&&!this.previousPane.classList.contains(v)&&this.nextPane.classList.contains(v),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.previousPane:this.nextPane,o=l?this.nextPane:this.previousPane,h=l?this.prevPaneIndex:this.nextPaneIndex;if((0,a.removeClass)([r],M),r.setAttribute("aria-expanded","false"),(0,a.addClass)([r],s),r.setAttribute("aria-hidden","true"),""===r.style.flexBasis)(0,a.addClass)([o],M),o.setAttribute("aria-expanded","true");else{for(var d=!0,c=0;c<this.allPanes.length;c++)if(!this.allPanes[c].classList.contains(L)&&""===this.allPanes[c].style.flexBasis&&!this.allPanes[c].classList.contains(L)&&!this.allPanes[c].classList.contains(M)){(0,a.addClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","true"),d=!1;break}d&&((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(h,!0),this.updateIconsOnCollapse(e,n),this.updateFlexGrow(),i&&(this.nextPane.classList.remove(M),this.nextPane.style.flexGrow="")},t.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(v)},t.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}},t.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},t.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains(A),prevPaneCollapsible:this.previousPane.classList.contains(A),prevPaneExpanded:this.previousPane.classList.contains(M),nextPaneExpanded:this.nextPane.classList.contains(M),nextPaneCollapsed:this.nextPane.classList.contains(L),prevPaneCollapsed:this.previousPane.classList.contains(L),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},t.prototype.showCurrentBarIcons=function(){(0,a.removeClass)([(0,a.select)("."+this.arrow,this.currentSeparator)],B)},t.prototype.hideBarIcons=function(e){(0,a.addClass)([(0,a.select)("."+this.arrow,e)],B)},t.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains(L)&&(i+=1),this.allPanes[t].classList.contains(L)&&(i+=1),i},t.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},t.prototype.updateIconsOnExpand=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0);else if(!this.splitInstance.prevPaneCollapsed&&!this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(0===o?(this.showTargetBarIcon(s,t),this.showTargetBarIcon(s,i),this.checkResizableProp(l,r)&&this.resizableModel(n,!0)):1===o&&(this.hideBarIcons(s),this.allPanes[l].classList.contains(M)||this.allPanes[r].classList.contains(M)?this.showTargetBarIcon(s,i):this.showTargetBarIcon(s,t),this.resizableModel(n,!1)))}}else this.hideTargetBarIcon(this.currentSeparator,t),this.showTargetBarIcon(this.currentSeparator,i),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)},t.prototype.afterAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},t.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},t.prototype.getSeparatorIndex=function(e){var t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).indexOf(e)},t.prototype.getPrevBar=function(e){return this.allBars[e-1]},t.prototype.getNextBar=function(e){return this.allBars[e+1]},t.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},t.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(O)?E:O:this.arrow=e.target.classList.contains(R)?H:R,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},t.prototype.triggerResizing=function(e){var t={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",t)},t.prototype.onMouseDown=function(e){var t=this;e.preventDefault();var i=e.target;if(!i.classList.contains(I)){this.updateCurrentSeparator(i),(0,a.addClass)([this.currentSeparator],x),this.updateCursorPosition(e,"previous"),this.getPaneDetails();for(var s={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},n=0;n<this.element.querySelectorAll("iframe").length;n++)this.element.querySelectorAll("iframe")[n].style.pointerEvents="none";this.trigger("resizeStart",s,(function(i){i.cancel||(t.wireResizeEvents(),t.checkPaneSize(e))}))}},t.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},t.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},t.prototype.convertPercentageToPixel=function(e,t){var i,s=e.toString();if(s.indexOf("%")>-1){i=parseFloat(s.slice(0,s.indexOf("%")));var n=void 0;n=(0,a.isNullOrUndefined)(t)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(t)],i=Math.ceil(n*(i/100))}else i=parseInt(s,10);return i},t.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},t.prototype.convertPixelToNumber=function(e){return(e=e.toString()).indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},t.prototype.calcDragPosition=function(e,t){var i;return(i=(i=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t)>1?1:i<0?0:i)*t},t.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+window.scrollX:this.element.getBoundingClientRect().top+window.scrollY,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},t.prototype.getMinMax=function(e,t,i){var s="min"===i?0:null,n=null;return"min"===i?(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min):(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max),this.paneSettings.length>0&&!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(n)?(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),this.convertPixelToNumber(n)):s},t.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")},t.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")},t.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),this.allPanes.length>1&&(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())},t.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},t.prototype.isValidSize=function(e){var t=!1;return!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(t=!0),t},t.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())},t.prototype.checkCoordinates=function(e,t){var i=!0;return e===this.previousCoordinates.x&&t===this.previousCoordinates.y&&(i=!1),i},t.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==a.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},t.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"!==a.Browser.info.name?this.border:e},t.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);var t,i=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+i-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+i-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&this.previousPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=t+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-t,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){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass();for(var n=0,l=0;l<this.paneSettings.length;l++)""===this.paneSettings[l].size?n+=1:""!==this.allPanes[l].style.flexBasis&&(this.paneSettings[l].size=this.allPanes[l].style.flexBasis);var r=n===this.allPanes.length;if(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||r)r?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(v)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(v)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth));else{var o=this.allPanes.length%this.allBars.length;this.prevPaneIndex===o?(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):this.nextPaneIndex===o?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v))}var h=""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis;this.allPanes.length>2||!h||this.updateSplitterSize()}},t.prototype.validateMinRange=function(e,t){var i,s,n=null,l=0;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t<(i=this.convertPixelToNumber(n))&&(l=t-i<=0?0:t-i,this.totalWidth=this.totalWidth-l,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.prototype.validateMaxRange=function(e,t){var i,s,n=null;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t>(i=this.convertPixelToNumber(n))&&(this.totalWidth=this.totalWidth-(t-i),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.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)},t.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+"%")},t.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")},t.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(v)||""===this.previousPane.style.flexBasis||this.previousPane.classList.contains(M)||this.previousPane.classList.add(v),this.nextPane.classList.contains(v)||""===this.nextPane.style.flexBasis||this.nextPane.classList.contains(M)||this.nextPane.classList.add(v)},t.prototype.validateDraggedPosition=function(e,t,i){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,n=s-t,l=i+s,r=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),o=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),h=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),d=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),p=e;return e>l-o?p=l-o:e<n+r&&(p=n+r),(0,a.isNullOrUndefined)(h)?(0,a.isNullOrUndefined)(d)||e<l-d&&(p=l-d):e>n+h&&(p=n+h),p},t.prototype.onMouseUp=function(e){(0,a.removeClass)([this.currentSeparator],x),this.unwireResizeEvents();for(var t={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},i=0;i<this.element.querySelectorAll("iframe").length;i++)this.element.querySelectorAll("iframe")[i].style.pointerEvents="auto";if(this.trigger("resizeStop",t),this.enablePersistence){var s=this.paneSettings;s[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,s[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:s},!0)}},t.prototype.panesDimension=function(e,t){var i,s=t.length;parseInt(this.getHeight(this.element),10),(0,a.isNullOrUndefined)(this.paneSettings[e])?(0,a.setStyleAttribute)(t[e],{order:2*e}):(0,a.isNullOrUndefined)(this.paneSettings[e].size)?(this.sizeFlag=!0,(0,a.setStyleAttribute)(t[e],{order:2*e})):(i=this.paneSettings[e].size,e<s&&((0,a.setStyleAttribute)(t[e],{"flex-basis":i,order:2*e}),e<s-1&&""!==this.paneSettings[e].size?(0,a.addClass)([t[e]],v):this.sizeFlag||(t[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&""!==this.paneSettings[e].size&&(0,a.addClass)([t[e]],v))),this.paneOrder.push(2*e)},t.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},t.prototype.templateCompile=function(e,t){Object.keys(window);var i=this.createElement("div");this.compileElement(i,t,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach((function(t){e.appendChild(t)}))},t.prototype.compileElement=function(e,t,i){var s,n;Object.keys(window);if("string"==typeof t)if("."===t[0]||"#"===t[0]){var l=document.querySelector(t);if(!(0,a.isNullOrUndefined)(l))return this.templateElement.push(l),"none"===l.style.display&&l.style.removeProperty("display"),""===l.getAttribute("style")&&l.removeAttribute("style"),void e.appendChild(l);t=t.trim()}else t=t.trim();s=(0,a.isNullOrUndefined)(t.outerHTML)?(0,a.compile)(t):(0,a.compile)(t.outerHTML),(0,a.isNullOrUndefined)(s)||(n=s({},this,i,this.element.id+"content"+this.allPanes.length.toString(),!0)),!(0,a.isNullOrUndefined)(s)&&n&&n.length>0&&[].slice.call(n).forEach((function(t){e.appendChild(t)}))},t.prototype.paneCollapsible=function(e,t){this.paneSettings[t].collapsible?(0,a.addClass)([e],A):(0,a.removeClass)([e],A)},t.prototype.createSplitPane=function(e){for(var t=e.children.length,i=0;i<this.paneSettings.length;i++)if(t<this.paneSettings.length){var s=this.createElement("div");this.element.appendChild(s),t+=1}t=e.children.length;var n=[].slice.call(e.children);if(this.sizeFlag=!1,t>0)for(i=0;i<t;i++)"DIV"!==n[i].nodeName&&"SPAN"!==n[i].nodeName||(this.allPanes.push(n[i]),"Horizontal"===this.orientation?((0,a.addClass)([n[i]],[p,c,y]),this.panesDimension(i,n)):((0,a.addClass)([n[i]],[p,u,y]),this.panesDimension(i,n)),(0,a.isNullOrUndefined)(this.paneSettings[i])||(0,a.isNullOrUndefined)(this.paneSettings[i].content)||this.setTemplate(this.paneSettings[i].content,n[i]),!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].cssClass&&this.setCssClass(n[i],this.paneSettings[i].cssClass),(0,a.isNullOrUndefined)(this.paneSettings[i])||this.paneCollapsible(n[i],i))},t.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},t.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},t.prototype.destroy=function(){if(!this.isDestroyed){for(e.prototype.destroy.call(this),a.EventHandler.remove(document,"touchstart click",this.onDocumentClick),a.EventHandler.remove(this.element,"keydown",this.onMove),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize,!0);this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);for(var t=0;t<this.wrapper.attributes.length;t++)this.element.setAttribute(this.wrapper.attributes[t].name,this.wrapper.attributes[t].value);this.refreshing&&((0,a.addClass)([this.element],["e-control","e-lib",o]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate();var i=this.element.querySelectorAll(".e-split-bar");if(i.length>0)for(t=0;t<i.length;t++)a.EventHandler.remove(i[t],"touchstart",this.clickHandler),a.EventHandler.remove(i[t],"touchstart",this.onMouseDown),a.EventHandler.remove(i[t],"click",this.clickHandler),a.EventHandler.remove(i[t],"mousedown",this.onMouseDown),i[t].parentNode.removeChild(i[t]);var s=this.element.querySelectorAll(".e-pane");if(s.length>0)for(t=0;t<s.length;t++)for(s[t].classList.remove(c,u,v,y,p,W,b,A,M,k);s[t].attributes.length>0;)s[t].removeAttribute(s[t].attributes[0].name);this.allBars=[],this.allBars=null,this.allPanes=[],this.allPanes=null,this.previousPane=null,this.nextPane=null,this.currentSeparator=null,this.wrapper=null,this.prevBar=null,this.nextBar=null,this.templateElement=null}},t.prototype.restoreElem=function(){if(this.templateElement.length>0)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},t.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?(0,a.addClass)([e],[p,c,y]):(0,a.addClass)([e],[p,u,y]),e},t.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")},t.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},t.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)(0,a.detach)(this.allBars[e]);this.allBars=[]},t.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},t.prototype.addPane=function(e,t){var i=this.createElement("div");i=this.addPaneClass(i),t=t>this.allPanes.length+1?this.allPanes.length:t;var s={size:(0,a.isNullOrUndefined)(e.size)?"":e.size,min:(0,a.isNullOrUndefined)(e.min)?null:e.min,max:(0,a.isNullOrUndefined)(e.max)?null:e.max,content:(0,a.isNullOrUndefined)(e.content)?"":e.content,resizable:!!(0,a.isNullOrUndefined)(e.resizable)||e.resizable,collapsible:!(0,a.isNullOrUndefined)(e.collapsible)&&e.collapsible,collapsed:!(0,a.isNullOrUndefined)(e.collapsed)&&e.collapsed,cssClass:(0,a.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("."+c)[t]),this.removePaneOrders(c)):(this.element.insertBefore(i,this.element.querySelectorAll("."+u)[t]),this.removePaneOrders(u)),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(v)},t.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var t="Horizontal"===this.orientation?c:u;(0,a.isNullOrUndefined)(this.element.querySelectorAll("."+t)[e])||((0,a.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),this.allPanes.length>0&&this.allPanes[this.allPanes.length-1].classList.remove(v))},r([(0,a.Property)("100%")],t.prototype,"height",void 0),r([(0,a.Property)(!1)],t.prototype,"enableReversePanes",void 0),r([(0,a.Property)("100%")],t.prototype,"width",void 0),r([(0,a.Property)(!1)],t.prototype,"enablePersistence",void 0),r([(0,a.Collection)([],T)],t.prototype,"paneSettings",void 0),r([(0,a.Property)("Horizontal")],t.prototype,"orientation",void 0),r([(0,a.Property)("")],t.prototype,"cssClass",void 0),r([(0,a.Property)(!0)],t.prototype,"enabled",void 0),r([(0,a.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),r([(0,a.Property)(null)],t.prototype,"separatorSize",void 0),r([(0,a.Event)()],t.prototype,"beforeSanitizeHtml",void 0),r([(0,a.Event)()],t.prototype,"created",void 0),r([(0,a.Event)()],t.prototype,"resizeStart",void 0),r([(0,a.Event)()],t.prototype,"resizing",void 0),r([(0,a.Event)()],t.prototype,"resizeStop",void 0),r([(0,a.Event)()],t.prototype,"beforeCollapse",void 0),r([(0,a.Event)()],t.prototype,"beforeExpand",void 0),r([(0,a.Event)()],t.prototype,"collapsed",void 0),r([(0,a.Event)()],t.prototype,"expanded",void 0),t=r([a.NotifyPropertyChanges],t)}(a.Component),U=function(){var e=function(t,i){return e=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,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),X=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},D="e-prevent",j="e-dragging",V="e-drag",q="e-responsive",F="e-panel-content",Q="e-panel-container",_="e-panel-header",G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),X([(0,a.Property)("")],t.prototype,"id",void 0),X([(0,a.Property)("")],t.prototype,"cssClass",void 0),X([(0,a.Property)("")],t.prototype,"header",void 0),X([(0,a.Property)("")],t.prototype,"content",void 0),X([(0,a.Property)(!0)],t.prototype,"enabled",void 0),X([(0,a.Property)(0)],t.prototype,"row",void 0),X([(0,a.Property)(0)],t.prototype,"col",void 0),X([(0,a.Property)(1)],t.prototype,"sizeX",void 0),X([(0,a.Property)(1)],t.prototype,"sizeY",void 0),X([(0,a.Property)(1)],t.prototype,"minSizeY",void 0),X([(0,a.Property)(1)],t.prototype,"minSizeX",void 0),X([(0,a.Property)(null)],t.prototype,"maxSizeY",void 0),X([(0,a.Property)(null)],t.prototype,"maxSizeX",void 0),X([(0,a.Property)(1e3)],t.prototype,"zIndex",void 0),t}(a.ChildProperty),J=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.rows=1,s.panelID=0,s.movePanelCalled=!1,s.resizeCalled=!1,s.mOffX=0,s.mOffY=0,s.maxTop=9999,s.maxRows=100,s.mouseX=0,s.mouseY=0,s.minTop=0,s.minLeft=0,s.isInlineRendering=!1,s.removeAllCalled=!1,s.isPanelRemoved=!1,s.panelsSizeY=0,s.resizeHeight=!1,s.eventVar=!1,(0,a.setValue)("mergePersistData",s.mergePersistPanelData,s),s}return U(t,e),t.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)},t.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}},t.prototype.createPanelElement=function(e,t){var i=this.createElement("div");return e&&e.length>0&&(0,a.addClass)([i],e),t&&i.setAttribute("id",t),i},t.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()},t.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()},t.prototype.initialize=function(){if(this.updateRowHeight(),this.element.childElementCount>0&&this.element.querySelectorAll(".e-panel").length>0){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&&(0,a.addClass)([i],"e-rtl"),this.getInlinePanels(i),this.maxCol(),this.maxRow()}for(t=0;t<this.panels.length;t++){i=this.element.querySelector("#"+this.panels[t].id);if(this.setMinMaxValues(this.panels[t]),this.maxColumnValue<this.panels[t].col||this.maxColumnValue<this.panels[t].col+this.panels[t].sizeX){var s=this.maxColumnValue-this.panels[t].sizeX;this.panelPropertyChange(this.panels[t],{col:s<0?0:s})}this.setXYAttributes(i,this.panels[t]);var n=this.renderPanels(i,this.panels[t],this.panels[t].id,!1);this.panelCollection.push(n),this.setHeightAndWidth(i,this.panels[t]),this.tempObject=this,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()},t.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},t.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,(0,a.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)},t.prototype.maxRow=function(e){var t=1;if(this.rows>1&&(0,a.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 0===this.panels.length&&(t=this.columns),t},t.prototype.maxCol=function(){var e;return e=this.columns,this.maxColumnValue=e,e},t.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t=this.panels[e].id;if(this.element.querySelector("[id='"+t+"']")){var i=parseInt(this.element.querySelector("[id='"+t+"']").getAttribute("data-row"),10),s=parseInt(this.element.querySelector("[id='"+t+"']").getAttribute("data-col"),10);this.oldRowCol[this.panels[e].id]={row:i,col:s}}}},t.prototype.createSubElement=function(e,t,i){var s=this.createElement("div");return i&&(0,a.addClass)([s],[i]),e&&e.length>0&&(0,a.addClass)([s],e),t&&s.setAttribute("id",t),s},t.prototype.templateParser=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,a.compile)(document.querySelector(e).innerHTML.trim()):(0,a.compile)(e)}catch(i){var t=a.SanitizeHtmlHelper.sanitize(e);return(0,a.compile)(this.enableHtmlSanitizer&&"string"==typeof e?t:e)}},t.prototype.renderTemplate=function(e,t,i,s,n){var l=this.templateParser(e),r=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){var o=l({},this,n,i,s,null,t);if(o){for(var h=0,d=o;h<d.length;h++){var p=d[h];r.push(p)}(0,a.append)([].slice.call(r),t)}}else{var c=document.querySelector(e);if(!(0,a.isNullOrUndefined)(c))return"none"===c.style.display&&c.style.removeProperty("display"),""===c.getAttribute("style")&&c.removeAttribute("style"),void t.appendChild(c);e=e.trim()}},t.prototype.renderPanels=function(e,t,i,s){(0,a.addClass)([e],["e-panel","e-panel-transition"]),e.setAttribute("role","listitem"),this.allowDragging&&e.setAttribute("aria-grabbed","false");var n=t.cssClass?t.cssClass.split(" "):null;if(this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(n,e.id+"_content",Q),e.appendChild(this.panelContent),t.enabled||this.disablePanel(e),t.header){var l=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template","");if((0,a.addClass)([l],[_]),!e.querySelector(".e-panel-header")){var r=this.element.id+"HeaderTemplate"+i;this.renderTemplate(t.header,l,r,s,"header"),this.panelContent.appendChild(l),this.renderReactTemplates()}}if(t.content){var o=t.cssClass?t.cssClass.split(" "):null;this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(o,e.id+"_body",F);var h="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";if((0,a.setStyleAttribute)(this.panelBody,{height:h}),!e.querySelector(".e-panel-content")){r=this.element.id+"ContentTemplate"+i;this.renderTemplate(t.content,this.panelBody,r,s,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}}return e},t.prototype.disablePanel=function(e){(0,a.addClass)([e],["e-disabled"])},t.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"};t.id||(t.id="layout_"+this.panelID.toString(),e.setAttribute("id",t.id),this.panelID=this.panelID+1),(0,a.isUndefined)(t.enabled)&&(t.enabled=!0),e.style.zIndex=""+t.zIndex;var i=new G(this,"panels",t,!0);this.panels.push(i),this.oldRowCol[t.id]={row:t.row,col:t.col}},t.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"===a.Browser.info.name?"mousedown pointerdown":"mousedown";a.EventHandler.add(e[t],i,this.downResizeHandler,this),"msie"!==a.Browser.info.name&&a.EventHandler.add(e[t],"touchstart",this.touchDownResizeHandler,this)}},t.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),a.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},t.prototype.downResizeHandler=function(e){for(var t=(0,a.closest)(e.currentTarget,".e-panel"),i=0;this.panels.length>i;i++)if(this.panels[i].enabled&&this.panels[i].id===t.id){this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY;var s="msie"===a.Browser.info.name?"mousemove pointermove":"mousemove",n="msie"===a.Browser.info.name?"mouseup pointerup":"mouseup";this.isMouseMoveBound||(a.EventHandler.add(document,s,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(a.EventHandler.add(document,n,this.upResizeHandler,this),this.isMouseUpBound=!0)}},t.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var t=(0,a.closest)(e.currentTarget,".e-panel"),i={event:e,element:t,isInteracted:!0};this.trigger("resizeStart",i),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),(0,a.addClass)([this.element],[D]),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},t.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(a.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(a.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},t.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},t.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var t={event:e,element:(0,a.closest)(this.moveTarget,".e-panel"),isInteracted:!0};this.trigger("resize",t)},t.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,(0,a.removeClass)([e],"e-panel-transition"),(0,a.addClass)([e],[j]);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])},t.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var t=(0,a.closest)(this.moveTarget,".e-panel");if(this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY){this.updateResizeElement(t);var i=this.getCellInstance(t.getAttribute("id"));this.mouseX=e.pageX,this.mouseY=e.pageY;var s=this.mouseY-this.lastMouseY+this.mOffY,n=this.mouseX-this.lastMouseX+this.mOffX;this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(t,i,n,s)}},t.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var t=(0,a.closest)(this.moveTarget,".e-panel");if(this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY){this.updateResizeElement(t);var i=this.getCellInstance(t.getAttribute("id"));this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY;var s=this.mouseX-this.lastMouseX+this.mOffX,n=this.mouseY-this.lastMouseY+this.mOffY;this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(t,i,s,n)}},t.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i;if(this.handleClass.indexOf("north")>=0&&(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),this.handleClass.indexOf("south")>=0&&(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),this.handleClass.indexOf("west")>=0&&(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),this.handleClass.indexOf("east")>=0){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);var o=this.elementWidth;this.elementWidth+=i;var h=this.pixelsToColumns(this.elementWidth-t.sizeX*this.cellSpacing[1],!0);this.columns<t.col+h&&(this.elementWidth=o)}e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px";var d=this.getResizeRowColumn(t);if(d.col+d.sizeX>this.columns&&this.panelPropertyChange(d,{sizeX:d.sizeX-1}),this.shadowEle.style.top=d.row*this.getCellSize()[1]+d.row*this.cellSpacing[1]+"px",this.handleClass.indexOf("west")>=0?this.shadowEle.style.left=d.col*this.getCellSize()[0]+(d.col-1)*this.cellSpacing[0]+"px":this.shadowEle.style.left=d.col*this.getCellSize()[0]+d.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=d.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=d.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n!==d.sizeX||a!==d.sizeY){n=d.sizeX,a=d.sizeY;var p=this.getCellInstance(e.id),c={attributes:{row:p.row.toString(),col:p.col.toString(),sizeX:p.sizeX.toString(),sizeY:p.sizeY.toString()}};this.setAttributes(c,e),this.mainElement=e,this.checkCollision=[],this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel()}},t.prototype.upResizeHandler=function(e){if(!(0,a.isNullOrUndefined)(this.downTarget)){this.upTarget=this.downTarget;var t=(0,a.closest)(this.upTarget,".e-panel"),i={event:e,element:t,isInteracted:!0};if(t){(0,a.addClass)([t],"e-panel-transition");var s="msie"===a.Browser.info.name?"mousemove pointermove":"mousemove",n="msie"===a.Browser.info.name?"mouseup pointerup":"mouseup";a.EventHandler.remove(document,s,this.moveResizeHandler),a.EventHandler.remove(document,n,this.upResizeHandler),"msie"!==a.Browser.info.name&&(a.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),a.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&(0,a.detach)(this.shadowEle),this.shadowEle=null;var l=this.getCellInstance(t.getAttribute("id"));this.setPanelPosition(t,l.row,l.col),this.setHeightAndWidth(t,l)}(0,a.removeClass)([t],[j]),this.trigger("resizeStop",i),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)}},t.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col;-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1));var s=e.row;-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s&&(this.previousRow=s,t=!0));var n=e.sizeX;-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0));var a=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),(s>-1&&i>-1&&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},t.prototype.pixelsToColumns=function(e,t){return t?Math.ceil(e/this.cellSize[0]):Math.floor(e/(this.cellSize[0]+this.cellSpacing[0]))},t.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},t.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]+(e.minSizeX-1)*this.cellSpacing[0]},t.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},t.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]+(e.minSizeY-1)*this.cellSpacing[1]},t.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},t.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},t.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()}},t.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;l>-1;){if(0!==this.collisions(l,t,s,i,e).length)break;n=l,a=t,--l}null!==n&&this.sortItem(e,n,a)}},t.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-row"),10);if(this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,void 0!==e&&void 0!==t&&void 0!==i){if(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col){var a=this.sortedArray[this.oldRowCol[e.id].row];this.oldRowCol[e.id]&&a[this.oldRowCol[e.id].col]===e&&(delete a[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel())}this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i});var l=this.getCellInstance(e.id);this.setAttributes({value:{col:l.col.toString(),row:l.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id))}},t.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},t.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains(q)){(0,a.removeClass)([this.element],[q]);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),l=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:l}),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,l),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}(0,a.isNullOrUndefined)(this.panelCollection)||(this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection)),this.resizeEvents(),(0,a.isNullOrUndefined)(this.panelCollection)||this.checkDragging(this.dragCollection)},t.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&(0,a.detach)(this.table),this.initGridLines())},t.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)}},t.prototype.sortPanels=function(){for(var e=[],t=function(t){for(var s=function(s){i.panels.filter((function(i){i.row===t&&i.col===s&&e.push(i)}))},n=0;n<i.columns;n++)s(n)},i=this,s=0;s<=this.rows;s++)t(s);return e},t.prototype.checkMediaQuerySizing=function(){var e;(0,a.addClass)([this.element],[q]),e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var t=0;t<e.length;t++){var i=document.getElementById(e[t].id),s=void 0;i&&((0,a.setStyleAttribute)(i,{width:"100%"}),i.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+"px",e[t].sizeY>1&&(s=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+parseInt((Math.round(e[t].sizeY/2)*this.cellSpacing[1]).toString(),10),i.style.height=s+"px"),this.resizeHeight=!0,this.panelPropertyChange(e[t],{row:t,col:0}),this.setPanelPosition(i,e[t].row,e[t].col),this.panelsSizeY=this.panelsSizeY+e[t].sizeY,(0,a.isNullOrUndefined)(this.panelCollection)||(this.setClasses(this.panelCollection),this.removeResizeClasses(this.panelCollection)),(0,a.isNullOrUndefined)(this.dragCollection)||this.checkDragging(this.dragCollection))}this.updateRowHeight()},t.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()},t.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},t.prototype.setHeightWidth=function(){var e;if(!((0,a.isNullOrUndefined)(this.cellSpacing)||0===this.panels.length&&this.panelCollection&&0===this.panelCollection.length)){if(this.checkMediaQuery()){for(var t=0,i=0;i<this.panels.length;i++)this.panels[i].sizeY&&(t+=this.panels[i].sizeY);e=t*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(t-1)*this.cellSpacing[1]+"px"}else e=this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px";(0,a.setStyleAttribute)(this.element,{height:e});var s=window.getComputedStyle(this.element).width;(0,a.setStyleAttribute)(this.element,{width:s})}},t.prototype.setEmptyLayoutHeight=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width")},t.prototype.setHeightAndWidth=function(e,t){(0,a.setStyleAttribute)(e,{height:(0,a.formatUnit)(this.setXYDimensions(t)[0])}),(0,a.setStyleAttribute)(e,{width:(0,a.formatUnit)(this.setXYDimensions(t)[1])})},t.prototype.renderCell=function(e,t,i){var s;this.dimensions=this.setXYDimensions(e),(0,a.isUndefined)(e.enabled)&&(e.enabled=!0),this.contentTemplateChild.length>0&&!(0,a.isNullOrUndefined)(i)?(s=this.contentTemplateChild[i],e.cssClass&&(0,a.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 n=this.renderPanels(s,e,e.id,t);return this.panelCollection.push(n),this.setXYAttributes(s,e),this.setHeightAndWidth(s,e),s},t.prototype.setPanelPosition=function(e,t,i){if(e){this.checkMediaQuery()&&this.calculateCellSize();var s=this.getCellSize()[1],n=this.getCellSize()[0],l=0===i?0:i*(n+this.cellSpacing[0]),r=0===t?0:t*(s+this.cellSpacing[1]);this.checkMediaQuery()&&(r=0===t?0:this.panelsSizeY*(s+this.cellSpacing[1])),(0,a.setStyleAttribute)(e,{left:l+"px",top:r+"px"})}},t.prototype.getRowColumn=function(){if(this.rows=null,this.element.querySelectorAll(".e-panel").length>0&&!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),n=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+n)}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)}},t.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})},t.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},t.prototype.panelPropertyChange=function(e,t){e.setProperties(t,!0)},t.prototype.renderDashBoardCells=function(e){if(this.element.querySelectorAll(".e-panel").length>0||this.panels.length>0)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&&(0,a.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)},t.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},t.prototype.rightWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach((function(e){var i=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-sizeX"),10);if(t<s.columns&&i>=t)if(a>1)for(var l=i;l<i+a;l++)n.push(l);else n.push(i)})),n.length>0)for(var l=t+1;l<=this.columns-1;l++)-1===n.indexOf(l)&&l!==t&&-1===a.indexOf(l)&&a.push(l);var r=this.getOccupiedColumns(i);return r.forEach((function(e){e>t&&-1!==a.indexOf(e)&&a.splice(a.indexOf(e),1)})),this.getOccupiedColumns(this.checkingElement).forEach((function(e){e>parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&a.push(e)})),a=a.sort((function(e,t){return e-t}))},t.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},t.prototype.leftWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach((function(e){var i=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-sizeX"),10);if(t<=s.columns&&i<=t)if(n>1)for(var l=i;l<i+n;l++)a.push(l);else a.push(i)})),a.length>0)for(var l=0;l<=t;l++)-1===a.indexOf(l)&&l!==t&&-1===n.indexOf(l)&&n.push(l);var r=this.getOccupiedColumns(i);return r.forEach((function(e){e<t&&-1!==n.indexOf(e)&&n.splice(n.indexOf(e),1)})),this.getOccupiedColumns(this.checkingElement).forEach((function(e){e<parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===n.indexOf(e)&&n.push(e)})),n=(n=n.sort((function(e,t){return e-t}))).reverse()},t.prototype.adjustmentAvailable=function(e,t,i,s,n){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var l,r=!1,o=[];this.topAdjustable=void 0;var h=parseInt(n.getAttribute("data-sizeX"),10),d=parseInt(n.getAttribute("data-col"),10);-1===(o=this.getRowElements(this.collisions(e,0,this.columns,i,[]))).indexOf(n)&&o.push(n);var p=this.leftWardsSpaceChecking(o,t,n);if(p.length>0?(this.leftAdjustable=this.isLeftAdjustable(p,n,e,t,s,i),this.spacedColumnValue!==d-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),this.leftAdjustable?this.rightAdjustable=!1:(this.leftAdjustable=!1,l=this.rightWardsSpaceChecking(o,t,n),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,n,e,t,s,i),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable||(this.rightAdjustable=!1))):(l=this.rightWardsSpaceChecking(o,t,n),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,n,e,t,s,i),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&e>0){var c=this.getCellInstance(n.id).row,u=!1;this.startRow!==c&&(u=!0);for(var g=e;g>=0;g--){var m=this.getCellInstance(n.id).sizeY>1&&u?this.checkingElement:n;g!==c&&g===c-i&&0===this.collisions(g,t,s,i,m).length&&(u=!1,this.topAdjustable=!0,this.spacedRowValue=(0,a.isNullOrUndefined)(this.spacedRowValue)?g:this.spacedRowValue,this.spacedColumnValue=t)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(r=!0,(0,a.isNullOrUndefined)(this.spacedRowValue)&&(this.spacedRowValue=e)),r},t.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){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}else s=[];return i},t.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},t.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!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},t.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!0),r)for(var o=0;o<e.length;o++){for(var h=this.collisions(i,e[o],n,a,this.checkingElement),d=0;d<h.length;d++)parseInt(t.getAttribute("data-col"),10)!==e[o]&&h.splice(h.indexOf(h[d]),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},t.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},t.prototype.sortCollisionItems=function(e){for(var t,i=[],s=function(s){t=[],e.forEach((function(e){e&&e.getAttribute("data-row")===s.toString()&&t.push(e)}));for(var a=function(e){t.forEach((function(t){t&&t.getAttribute("data-col")===e.toString()&&i.push(t)}))},l=n.columns-1;l>=0;l--)a(l)},n=this,a=this.rows-1;a>=0;a--)s(a);return i},t.prototype.updatedModels=function(e,t,i){var s=this,n=[];return this.mainElement||this.sortedPanel(),e.forEach((function(a){s.checkingElement=a;var l=s.getCellInstance(a.id),r=!s.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,i);if(l.sizeX>1&&r)for(var o=l.row;o<t.row+t.sizeY;o++){s.collisions(o,l.col,l.sizeX,l.sizeY,a).forEach((function(t){e.indexOf(t)>=0&&-1===n.indexOf(t)&&n.push(t)}))}})),n.forEach((function(t){n.indexOf(t)>=0&&e.splice(e.indexOf(t),1)})),e},t.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)return t;if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s=this.element.querySelector("[id='"+this.panels[i].id+"']");if(s!==this.mainElement){var n=this.cloneObject[s.id].row,a=this.cloneObject[s.id].col;this.setPanelPosition(s,n,a),this.panelPropertyChange(this.getCellInstance(s.id),{row:n,col:a}),this.setAttributes({value:{col:a.toString(),row:n.toString()}},s),this.updateOldRowColumn()}}return this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&this.checkCollision.length>0&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0]),t},t.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]),this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length>0)return i=!1,!1}return i},t.prototype.checkForSwapping=function(e,t){if(0===Object.keys(this.cloneObject).length||!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(e.length>=1&&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),d=[];if(1===o.sizeY&&-1===d.indexOf(e[r]))d.push(e[r]);else if(o.sizeY>1&&-1===d.indexOf(e[r]))if(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1)d.push(e[r]);else{if(0!==i||h.row!==this.cloneObject[o.id].row)return!1;d.push(e[r])}if(o.sizeY<=h.sizeY&&-1===d.indexOf(e[r])&&d.push(e[r]),d.push(this.mainElement),this.collisions(l,o.col,o.sizeX,o.sizeY,d).length>0)return n=!1;r===e.length-1&&(n=!0)}return n},t.prototype.swapItems=function(e,t,i){var s,n=this,a=[];a.push(t);var l=parseInt(e[0].getAttribute("data-row"),10);this.startRow<l?s=1:this.startRow>l&&(s=0);var r=0===s?l+i.sizeY:this.startRow;if(!this.movePanelCalled){var o=this.getCellInstance(e[0].id);this.panelPropertyChange(i,{row:0===s?l:r+o.sizeY})}for(var h=0;h<e.length;h++)a.push(e[h]),this.setPanelPosition(e[h],r,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:r}),e[h].setAttribute("data-row",r.toString());t.setAttribute("data-row",i.row.toString()),this.setPanelPosition(this.shadowEle,i.row,i.col);for(var d=0;d<this.panels.length;d++)this.oldRowCol[this.panels[d].id]={row:this.panels[d].row,col:this.panels[d].col};this.startRow=i.row,this.updateOldRowColumn(),a.forEach((function(e){n.cloneObject[e.id]=n.oldRowCol[e.id];for(var t=n.getCellInstance(e.id),i=0;i<n.sortedArray.length;i++)if(n.sortedArray[i])for(var s=0;s<n.sortedArray[i].length;s++)n.sortedArray[i][s]===e&&(n.sortedArray[i][s]=void 0);n.sortedArray[t.row]||(n.sortedArray[t.row]=[]),n.sortedArray[t.row][t.col]=e,n.cloneArray=n.sortedArray}))},t.prototype.updatePanelLayout=function(e,t){var i=this;this.collisionChecker={};var s=[],n=[];if((s=this.mainElement&&this.isRenderComplete?this.resetLayout(t):this.collisions(t.row,t.col,t.sizeX,t.sizeY,e)).length>0)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,t,e),!(0,a.isNullOrUndefined)(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,t);else for(var l=0;l<s.length;l++){var r=this.getCellInstance(s[l].id);if(this.checkingElement=s[l],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(r.row,r.col,r.sizeY,r.sizeX,e)&&!(0,a.isNullOrUndefined)(this.spacedColumnValue)){this.setPanelPosition(s[l],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[l].id]={row:this.spacedRowValue,col:this.spacedColumnValue};var o={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}};if(this.setAttributes(o,s[l]),this.panelPropertyChange(r,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,l<s.length)continue}else n.push(s[l])}n.length>0&&(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),n.length>0&&(this.updateRowColumn(t.row,this.overlapElement,e),this.checkForCompletePushing())),this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},t.prototype.checkForCompletePushing=function(){for(var e=0;e<this.panels.length;e++)if(this.collisionChecker[this.panels[e].id]&&null!==this.collisionChecker[this.panels[e].id]){this.overlapElement=[this.collisionChecker[this.panels[e].id].ele];var t=this.panels[e].id;this.updateRowColumn(this.collisionChecker[""+t].row,this.overlapElement,this.collisionChecker[""+t].srcEle)}},t.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},t.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),d=parseInt(this.overlapElementClone[a].getAttribute("data-sizeX"),10),p=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]),o>1||d>1){var u=this.getCellInstance(this.overlapElementClone[a].id);p=u.col;for(var 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,p),this.updateCollisionChecked(g),this.oldRowCol[g.id]={row:u.row,col:p};var f=this.getCellInstance(g.id);this.panelPropertyChange(f,{col:p,row:u.row});var v=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=[];x.push(this.overlapElementClone[a]),x.push(i),c=this.collisions(r,h,d,o,x),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),p=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),this.setPanelPosition(this.overlapElementClone[a],r,p),this.updateCollisionChecked(this.overlapElementClone[a]),this.oldRowCol[this.overlapElementClone[a].id]={row:r,col:p};f=this.getCellInstance(this.overlapElementClone[a].id);this.panelPropertyChange(f,{col:p,row:r}),this.collisionPanel(c,p,r,this.overlapElementClone[a])}}}},t.prototype.collisionPanel=function(e,t,i,s){var n=this,a=this.getCellInstance(s.id);if(this.panelPropertyChange(a,{row:i,col:t}),e.length>0){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(),this.overlapSubElementClone.length>0)for(var o=0;o<this.overlapSubElementClone.length;o++){var h=parseInt(this.overlapSubElementClone[o].getAttribute("data-row"),10),d=parseInt(this.overlapSubElementClone[o].getAttribute("data-col"),10),p=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeX"),10),c=parseInt(this.overlapSubElementClone[o].getAttribute("data-sizeY"),10),u=this.collisions(h,d,p,c,this.overlapSubElementClone);this.mainElement&&-1!==u.indexOf(this.mainElement)&&u.splice(u.indexOf(this.mainElement),1),u.forEach((function(e){n.overlapElement.push(e)})),u.length>0&&this.updateRowColumn(h,this.overlapElement,this.overlapSubElementClone[o])}this.overlapSubElementClone=[]}},t.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++)(0,a.detach)(i[s])},t.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+V);(0,a.removeClass)(e,[V]),this.setClasses(this.panelCollection)},t.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]?(0,a.addClass)([i.querySelectorAll(this.draggableHandle)[0]],[V]):(0,a.addClass)([i],[V])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(i,s)}},t.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",(0,a.addClass)([s],[n,this.availableClasses[i],"e-resize","e-dl-icon"])}},t.prototype.setXYAttributes=function(e,t){var i={value:{sizeX:(0,a.isNullOrUndefined)(t.sizeX)?void 0:t.sizeX.toString(),sizeY:(0,a.isNullOrUndefined)(t.sizeY)?void 0:t.sizeY.toString(),minSizeX:(0,a.isNullOrUndefined)(t.minSizeX)?void 0:t.minSizeX.toString(),minSizeY:(0,a.isNullOrUndefined)(t.minSizeY)?void 0:t.minSizeY.toString(),maxSizeX:(0,a.isNullOrUndefined)(t.maxSizeX)?void 0:t.maxSizeX.toString(),maxSizeY:(0,a.isNullOrUndefined)(t.maxSizeY)?void 0:t.maxSizeY.toString(),row:(0,a.isNullOrUndefined)(t.row)?void 0:t.row.toString(),col:(0,a.isNullOrUndefined)(t.col)?void 0:t.col.toString()}};this.setAttributes(i,e)},t.prototype.setXYDimensions=function(e){var t,i=this.getCellSize()[1],s=this.getCellSize()[0];return t=e&&"number"==typeof s&&"number"==typeof e.sizeX&&e.sizeX>1?e.sizeX*s+(e.sizeX-1)*this.cellSpacing[0]:s,[e&&"number"==typeof i&&e.sizeY>1&&"number"==typeof e.sizeY?e.sizeY*i+(e.sizeY-1)*this.cellSpacing[1]:(0,a.formatUnit)(i),t]},t.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),i=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(i/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},t.prototype.checkForChanges=function(e,t,i){var s=[];if(this.removeAllCalled)s=[];else for(var n=0;n<this.panels.length;n++)!(0,a.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]);if(s.length>0||this.removeAllCalled){var l={changedPanels:s,isInteracted:e,addedPanels:(0,a.isNullOrUndefined)(t)?[]:t,removedPanels:(0,a.isNullOrUndefined)(i)?[]:i};this.trigger("change",l)}},t.prototype.enableDraggingContent=function(e){for(var t,i=this,s=function(s){var l=[".e-resize",".e-drag-restrict"],r=e[s];n.dragobj=new a.Draggable(r,{preventDefault:!1,clone:!1,dragArea:n.element,isDragScroll:!0,handle:n.draggableHandle?n.draggableHandle:".e-panel",abort:l,dragStart:n.onDraggingStart.bind(n),dragStop:function(e){if(i.trigger("dragStop",e),(0,a.isNullOrUndefined)(e.cancel)&&(e.cancel=!1),e.cancel){var t=i.getCellInstance(i.mainElement.id);for(s=0;s<i.panels.length;s++)i.panels[s].id===t.id&&(e.element.setAttribute("data-col",i.panelsInitialModel[s].col.toString()),e.element.setAttribute("data-row",i.panelsInitialModel[s].row.toString()),t.col=i.panelsInitialModel[s].col,t.row=i.panelsInitialModel[s].row,i.setPanelPosition(i.mainElement,i.panelsInitialModel[s].row,i.panelsInitialModel[s].col),i.updatePanelLayout(i.mainElement,t));i.shadowEle&&(0,a.detach)(i.shadowEle)}else{var n=i.getCellInstance(i.mainElement.id);i.allowPushing&&i.collisions(n.row,n.col,n.sizeX,n.sizeY,i.mainElement).length>0?(i.setHolderPosition(e),i.setPanelPosition(i.mainElement,n.row,n.col),i.updatePanelLayout(i.mainElement,n)):i.setPanelPosition(i.mainElement,n.row,n.col),i.mainElement=null;var l=i.getPanelBase(e);i.shadowEle&&(0,a.detach)(i.shadowEle),(0,a.removeClass)([i.element],[D]),(0,a.removeClass)([e.element],[j]),i.shadowEle=null,e.element.classList.remove("e-dragging");var r=i.getRowColumnDragValues(e)[0],o=i.getRowColumnDragValues(e)[1],h=i.getCellInstance(e.element.id);i.allowPushing&&0===i.collisions(r,o,h.sizeX,h.sizeY,document.getElementById(l.id)).length?(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:r,col:o}),i.oldRowCol[e.element.id].row=r,i.oldRowCol[e.element.id].col=o,i.setAttributes({value:{col:o.toString(),row:r.toString()}},e.element),i.sortedPanel()):(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:i.oldRowCol[e.element.id].row,col:i.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",i.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",i.getCellInstance(e.element.id).row.toString()),i.sortedPanel());var d=i.getCellInstance(e.element.id);i.setPanelPosition(e.element,d.row,d.col),i.updatePanels(),i.updateCloneArrayObject(),i.checkForChanges(!0),i.dragStopEventArgs={event:e.event,element:e.element},i.resizeEvents(),i.rows=i.maxRow(!0),i.setHeightWidth(),i.updateDragArea()}},drag:function(e){i.draggedEventArgs={event:e.event,element:e.element,target:(0,a.closest)(e.target,".e-panel")},i.trigger("drag",i.draggedEventArgs),i.onDragStart(e)}}),-1===n.dragCollection.indexOf(n.dragobj)&&n.dragCollection.push(n.dragobj),t=s},n=this,l=0;l<e.length;l++)s(l),l=t},t.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},t.prototype.updateDragArea=function(){this.dragCollection.forEach((function(e){e.setDragArea()}))},t.prototype.refreshDraggableHandle=function(){if(this.dragCollection&&this.dragCollection.length>0){for(var e=0;e<this.dragCollection.length;e++)this.dragCollection[e].destroy(),a.EventHandler.clearEvents(this.dragCollection[e].element);this.ensureDrag()}},t.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},t.prototype.onDraggingStart=function(e){var t=e;if(this.trigger("dragStart",t,(function(){(0,a.isNullOrUndefined)(e.cancel)&&(e.cancel=!1)})),this.eventVar=e.cancel,e.cancel)(0,a.removeClass)([this.element],[D]),(0,a.removeClass)([e.element],[j]);else{this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject));var i=this.startRow=parseInt(e.element.getAttribute("data-row"),10);this.startCol=parseInt(e.element.getAttribute("data-col"),10);var s=parseInt(e.element.getAttribute("data-sizeY"),10);this.updateRowsHeight(i,s,s),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder","e-holder-transition"),(0,a.setStyleAttribute)(this.shadowEle,{position:"absolute"}),(0,a.addClass)([this.element],[D]),(0,a.addClass)([e.element],[j]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder");var n=this.getCellInstance(e.element.id),l=this.calculateShadowElementSize(n.sizeX,n.sizeY);this.shadowEle.style.height=l.height,this.shadowEle.style.width=l.width;var r=this.getCellInstance(e.element.id);this.setPanelPosition(this.shadowEle,r.row,r.col)}},t.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},t.prototype.onDragStart=function(e){var t,i,s;if(this.eventVar)this.dragobj.intDestroy(e.event),(0,a.removeClass)([this.element],[D]),(0,a.removeClass)([e.element],[j]);else{var n=s=this.getRowColumnDragValues(e)[1],l=this.getRowColumnDragValues(e)[0];if(n<0||l<0)return;this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n});var r=this.getCellInstance(e.element.id);if(this.updateRowsHeight(r.row,r.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:l.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:l,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;var o=r;this.checkCollision=this.collisions(o.row,o.col,o.sizeX,o.sizeY,e.element),(r.col>=0||r.col>=this.checkColumnValue)&&(this.checkCollision=[]),this.updatePanelLayout(e.element,r),this.moveItemsUpwards()}if(!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),this.oldRowCol[e.element.id].row===l&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),this.setAttributes({value:{col:n.toString(),row:l.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),!1===this.allowPushing)return}},t.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},t.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;e>-1;){for(var n=1,a=t;a>-1;){var l=this.sortedArray[e];if(l){var r=l[a];if(r&&(!i||-1===i.indexOf(r))&&parseInt(r.getAttribute("data-sizeX"),10)>=n&&parseInt(r.getAttribute("data-sizeY"),10)>=s)return r}++n,--a}--e,++s}return null},t.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),n=parseInt(e.element.getAttribute("data-sizeX"),10),a=this.getCellSize()[0],l=this.getCellSize()[1],r=0===s?0:s*(l+this.cellSpacing[1]),o=0===i?0:i*(a+this.cellSpacing[0]);this.elementRef.top=this.shadowEle.style.top=r+"px",this.elementRef.left=this.shadowEle.style.left=o+"px";var h=this.calculateShadowElementSize(n,t);this.elementRef.height=this.shadowEle.style.height=h.height,this.elementRef.width=this.shadowEle.style.width=h.width},t.prototype.calculateShadowElementSize=function(e,t){return{width:e*this.cellSize[0]+(e-1)*this.cellSpacing[0]+"px",height:t*this.cellSize[1]+(t-1)*this.cellSpacing[1]+"px"}},t.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},t.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 t=new G(this,"panels",e,!0);this.panels.push(t),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(t),(this.maxColumnValue<t.col||this.maxColumnValue<t.col+t.sizeX)&&this.panelPropertyChange(t,{col:this.maxColumnValue-t.sizeX});var i=this.renderCell(t,!0,null);if(this.oldRowCol[t.id]={row:t.row,col:t.col},this.cloneObject[t.id]={row:t.row,col:t.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",i),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.removeResizeClasses(this.panelCollection)):(this.mainElement=i,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(i,t.row,t.col),this.addPanelCalled=!1,this.updatePanelLayout(i,t)),this.addPanelCalled&&(this.addPanelCalled=!1),this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(t.id)]),this.setClasses([i]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var s=0;s<i.querySelectorAll(".e-resize").length;s++){var n="msie"===a.Browser.info.name?"mousedown pointerdown":"mousedown";a.EventHandler.add(i.querySelectorAll(".e-resize")[s],n,this.downResizeHandler,this),"msie"!==a.Browser.info.name&&a.EventHandler.add(i.querySelectorAll(".e-resize")[s],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[t])},t.prototype.updatePanel=function(e){if(this.panelsSizeY=0,e.id){var t=this.getCellInstance(e.id);if(t){this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,(0,a.isNullOrUndefined)(e.col)&&(e.col=t.col),this.panelPropertyChange(t,e),this.setMinMaxValues(t);var i=document.getElementById(e.id);this.mainElement=i;var s=t.cssClass?t.cssClass.split(" "):null;if(this.panelContent=i.querySelector(".e-panel-container")?i.querySelector(".e-panel-container"):this.createSubElement(s,i.id+"_content",Q),i.appendChild(this.panelContent),t.header){var n=i.querySelector(".e-panel-header")?i.querySelector(".e-panel-header"):this.createSubElement([],i.id+"template","");(0,a.addClass)([n],[_]),n.innerHTML="";var l=this.element.id+"HeaderTemplate"+t.id;this.renderTemplate(t.header,n,l,!0,"header"),this.panelContent.appendChild(n),this.renderReactTemplates()}else i.querySelector(".e-panel-header")&&(0,a.detach)(i.querySelector(".e-panel-header"));if(t.content){var r=t.cssClass?t.cssClass.split(" "):null;this.panelBody=i.querySelector(".e-panel-content")?i.querySelector(".e-panel-content"):this.createSubElement(r,i.id+"_body",F),this.panelBody.innerHTML="";var o="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";(0,a.setStyleAttribute)(this.panelBody,{height:o});l=this.element.id+"ContentTemplate"+t.id;this.renderTemplate(t.content,this.panelBody,l,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}else i.querySelector(".e-panel-content")&&(0,a.detach)(i.querySelector(".e-panel-content"));this.setXYAttributes(i,t),this.setHeightAndWidth(i,t),this.setPanelPosition(i,t.row,t.col),this.updatePanelLayout(i,t),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject()}}},t.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},t.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},t.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)(0,a.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,this.setEmptyLayoutHeight()},t.prototype.removePanel=function(e){var t,i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s=0;s<this.panelCollection.length;s++)this.panelCollection[s].id===e&&((0,a.detach)(this.panelCollection[s]),this.panelCollection.splice(s,1)),this.panels[s].id===e&&(t=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(t){t.id===e&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(t),1)})),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[t]),0===this.panels.length&&0===this.panelCollection.length&&this.setEmptyLayoutHeight()},t.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);if(!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});var n=document.getElementById(e);this.mainElement=n,this.startRow=parseInt(n.getAttribute("data-row"),10),this.startCol=parseInt(n.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},n),this.updateOldRowColumn(),this.setPanelPosition(n,t,i),this.updatePanelLayout(n,s),this.updateRowHeight(),this.updatePanels(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1)}},t.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()))},t.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);this.resizeCalled=!0;var n=document.getElementById(e),a={event:null,element:n,isInteracted:!1};this.trigger("resizeStart",a),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=n,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},n),this.setHeightAndWidth(n,s),this.updatePanelLayout(n,s),this.updatePanels(),this.updateRowHeight(),this.resizeCalled=!1,this.trigger("resizeStop",a),this.checkForChanges(!1)},t.prototype.destroy=function(){a.EventHandler.remove(window,"resize",this.refreshListener),(0,a.removeClass)([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var t=0;t<this.dragCollection.length;t++)this.dragCollection[t].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,e.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},t.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)(0,a.detach)(this.element.firstElementChild),this.clearTemplate()},t.prototype.setEnableRtl=function(){!0===this.enableRtl?(0,a.addClass)([this.element],"e-rtl"):(0,a.removeClass)([this.element],"e-rtl")},t.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)}},t.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()},t.prototype.checkForIDValues=function(e){var t=this;!(0,a.isNullOrUndefined)(e)&&e.length>0?(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},t.prototype.onPropertyChanged=function(e){var t=this;e.panels&&e.panels.length>0&&e.panels[0]instanceof G&&this.checkForIDValues(e.panels);for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){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"),l=0;l<n.length;l++){var r="msie"===a.Browser.info.name?"mousedown pointerdown":"mousedown",o=n[l];a.EventHandler.remove(o,r,this.downResizeHandler),"msie"!==a.Browser.info.name&&a.EventHandler.remove(o,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.checkMediaQuery()||(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&&(0,a.detach)(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&e.panels.length>0?(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){if(t.setMinMaxValues(e),t.maxColumnValue<e.col||t.maxColumnValue<e.col+e.sizeX){var i=t.maxColumnValue-e.sizeX;t.panelPropertyChange(e,{col:i<0?0:i}),t.setXYAttributes(document.getElementById(e.id),e)}t.setHeightAndWidth(document.getElementById(e.id),e),t.panelCollection.push(document.getElementById(e.id)),t.setPanelPosition(document.getElementById(e.id),e.row,e.col),t.mainElement=document.getElementById(e.id),t.updatePanelLayout(document.getElementById(e.id),e),t.mainElement=null})),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}}},t.prototype.getPersistData=function(){return this.addOnPersist(["panels"])},t.prototype.mergePersistPanelData=function(e){var t=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!(0,a.isNullOrUndefined)(t)&&""!==t||!(0,a.isNullOrUndefined)(e)){var i=(0,a.isNullOrUndefined)(e)?JSON.parse(t):e,s=Object.keys(i);this.isProtectedOnChange=!0;for(var n=0,l=s;n<l.length;n++){var r=l[n];"object"!=typeof(0,a.getValue)(r,this)||(0,a.isNullOrUndefined)((0,a.getValue)(r,this))||Array.isArray((0,a.getValue)(r,this))&&"panels"===r&&(this.mergePanels(i[r],this[r]),this[r]=i[r])}this.isProtectedOnChange=!1}},t.prototype.mergePanels=function(e,t){for(var i=e,s=function(e){n.checkForIDValues(t);var s=t.filter((function(t){return t.id===i[e].id}))[0];(0,a.isNullOrUndefined)(s)||(i[e]=(0,a.extend)(s,i[e],{},!0))},n=this,l=0;l<i.length;l++)s(l)},t.prototype.getModuleName=function(){return"DashboardLayout"},X([(0,a.Property)(!0)],t.prototype,"allowDragging",void 0),X([(0,a.Property)(!1)],t.prototype,"allowResizing",void 0),X([(0,a.Property)(!0)],t.prototype,"allowPushing",void 0),X([(0,a.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),X([(0,a.Property)(!0)],t.prototype,"allowFloating",void 0),X([(0,a.Property)(1)],t.prototype,"cellAspectRatio",void 0),X([(0,a.Property)([5,5])],t.prototype,"cellSpacing",void 0),X([(0,a.Property)(1)],t.prototype,"columns",void 0),X([(0,a.Property)(!1)],t.prototype,"showGridLines",void 0),X([(0,a.Property)(null)],t.prototype,"draggableHandle",void 0),X([(0,a.Property)("en-US")],t.prototype,"locale",void 0),X([(0,a.Property)("max-width: 600px")],t.prototype,"mediaQuery",void 0),X([(0,a.Collection)([],G)],t.prototype,"panels",void 0),X([(0,a.Property)(["e-south-east"])],t.prototype,"resizableHandles",void 0),X([(0,a.Event)()],t.prototype,"change",void 0),X([(0,a.Event)()],t.prototype,"dragStart",void 0),X([(0,a.Event)()],t.prototype,"drag",void 0),X([(0,a.Event)()],t.prototype,"dragStop",void 0),X([(0,a.Event)()],t.prototype,"resizeStart",void 0),X([(0,a.Event)()],t.prototype,"resize",void 0),X([(0,a.Event)()],t.prototype,"resizeStop",void 0),X([(0,a.Event)()],t.prototype,"created",void 0),X([(0,a.Event)()],t.prototype,"destroyed",void 0),t=X([a.NotifyPropertyChanges],t)}(a.Component),K=function(){var e=function(t,i){return e=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,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Z=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},$="e-opposite-content",ee="e-dot",te="e-content",ie="e-vertical",se="e-horizontal",ne="e-timeline-reverse",ae="e-rtl",le="e-item-disabled",re="e-item-template";!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(t||(t={})),function(e){e.Before="Before",e.After="After",e.Alternate="Alternate",e.AlternateReverse="AlternateReverse"}(i||(i={}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return K(t,e),Z([(0,a.Property)("")],t.prototype,"dotCss",void 0),Z([(0,a.Property)("")],t.prototype,"content",void 0),Z([(0,a.Property)("")],t.prototype,"oppositeContent",void 0),Z([(0,a.Property)(!1)],t.prototype,"disabled",void 0),Z([(0,a.Property)("")],t.prototype,"cssClass",void 0),t}(a.ChildProperty),he=function(e){function s(t,i){return e.call(this,t,i)||this}return K(s,e),s.prototype.preRender=function(){this.element.id||(this.element.id=(0,a.getUniqueID)("e-"+this.getModuleName()))},s.prototype.getModuleName=function(){return"timeline"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.render=function(){(0,a.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)},s.prototype.updateOrientation=function(){if(!(0,a.isNullOrUndefined)(this.orientation)){var e=this.orientation.toLowerCase();"horizontal"!==e&&"vertical"!==e||(this.element.classList.remove(se,ie),this.element.classList.add("e-"+e))}},s.prototype.updateCssClass=function(e,t){var i,s,n;void 0===t&&(t=""),t&&(n=t.trim().split(" "),(i=this.element.classList).remove.apply(i,n)),e&&(n=e.trim().split(" "),(s=this.element.classList).add.apply(s,n))},s.prototype.updateRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](ae)},s.prototype.updateAlign=function(){if(!(0,a.isNullOrUndefined)(this.align)){var e=this.align.toLowerCase();"before"!==e&&"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))}},s.prototype.updateReverse=function(){this.element.classList[this.reverse?"add":"remove"](ne)},s.prototype.renderItems=function(){var e,t=this;this.haveOneSidecontent();for(var i=0;i<this.items.length;i++){var s=this.items[parseInt(i.toString(),10)],n=this.createElement("li",{className:"e-timeline-item e-connector"});if(this.template)this.renderItemContent(i,!1,n);else{var a=this.createElement("div",{className:$});s.oppositeContent&&this.updateItemContent(!1,s,i,a),n.appendChild(a);var l=this.createElement("div",{className:"e-dot-item"}),r=s.dotCss?ee+" "+s.dotCss.trim():ee,o=this.createElement("div",{className:r});l.appendChild(o),n.appendChild(l);var h=this.createElement("div",{className:te});s.content&&this.updateItemContent(!0,s,i,h),n.appendChild(h),s.cssClass&&(e=n.classList).add.apply(e,s.cssClass.trim().split(" ")),s.disabled&&n.classList.add(le)}var d={element:n,index:i};this.trigger("beforeItemRender",d,(function(e){t.timelineListEle.appendChild(e.element)}))}},s.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=s.content.length>0||!(0,a.isNullOrUndefined)(s.content)),t||(t=s.oppositeContent.length>0||!(0,a.isNullOrUndefined)(s.content))}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")},s.prototype.updateItemContent=function(e,t,i,s){var n=!(this.isReact||this.isVue),l=this.getTemplateFunction(e?t.content:t.oppositeContent,n);"string"==typeof l?s.innerText=l:(0,a.append)(l({item:t,itemIndex:i},this),s)},s.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template,!1):null},s.prototype.renderItemContent=function(e,t,i){var s=this.timelineListEle.querySelectorAll("li");if(t&&this.removeItemContent(s[parseInt(e.toString(),10)]),this.template){t?s[parseInt(e.toString(),10)].classList.add(re):i.classList.add(re);var n=this.items[parseInt(e.toString(),10)];(0,a.append)(this.templateFunction({item:n,itemIndex:e},this,"timelineTemplate",this.element.id+"_timelineTemplate",this.isStringTemplate),t?s[parseInt(e.toString(),10)]:i)}this.renderReactTemplates()},s.prototype.removeItemContent=function(e){e.classList.remove(re);for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},s.prototype.getTemplateFunction=function(e,t){if(void 0===t&&(t=!0),"string"==typeof e){var i="";try{var s=(0,a.select)(e);s?(i="SCRIPT"===s.tagName?s.innerHTML:s.outerHTML,t=!1):i=e}catch(t){i=e}return t?i:(0,a.compile)(i)}return(0,a.compile)(e)},s.prototype.removeItemElements=function(){for(var e=this.timelineListEle.querySelectorAll("li"),t=0;t<e.length;t++)(0,a.remove)(e[parseInt(t.toString(),10)])},s.prototype.updateElementClassArray=function(){var e=[ae,"e-align-before","e-align-after","e-outline","e-fill","e-align-alternate","e-align-alternatereverse",ne,se,ie];(0,a.removeClass)([this.element],e)},s.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["timelineTemplate"]);for(var e=0;e<this.items.length;e++)this.renderItemContent(e,!0)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.removeItemElements(),this.element.removeAttribute("role"),this.element.removeAttribute("aria-label"),this.clearTemplate(),this.timelineListEle&&(0,a.remove)(this.timelineListEle),this.timelineListEle=null,this.updateElementClassArray()},s.prototype.updateItems=function(e,t,i,s){var n,a,l,r,o,h,d,p=this.timelineListEle.querySelectorAll("li");switch(e){case"dotCss":o=p[parseInt(i.toString(),10)].querySelector("."+ee),""!==t.dotCss&&(n=o.classList).remove.apply(n,t.dotCss.trim().split(" ")),""!==s.dotCss&&(a=o.classList).add.apply(a,this.items[parseInt(i.toString(),10)].dotCss.trim().split(" "));break;case"content":(h=p[parseInt(i.toString(),10)].querySelector("."+te)).innerText="",this.updateItemContent(!0,s,i,h),this.haveOneSidecontent();break;case"oppositeContent":(d=p[parseInt(i.toString(),10)].querySelector("."+$)).innerText="",this.updateItemContent(!1,s,i,d),this.haveOneSidecontent();break;case"disabled":p[parseInt(i.toString(),10)].classList[this.items[parseInt(i.toString(),10)].disabled?"add":"remove"](le);break;case"cssClass":""!==t.cssClass&&(l=p[parseInt(i.toString(),10)].classList).remove.apply(l,t.cssClass.trim().split(" ")),""!==s.cssClass&&(r=p[parseInt(i.toString(),10)].classList).add.apply(r,s.cssClass.trim().split(" "))}},s.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"](ne);break;case"template":this.updateTemplateFunction(),this.updateContent()}}},Z([(0,a.Property)(t.Vertical)],s.prototype,"orientation",void 0),Z([(0,a.Property)(i.After)],s.prototype,"align",void 0),Z([(0,a.Collection)([],oe)],s.prototype,"items",void 0),Z([(0,a.Property)("")],s.prototype,"cssClass",void 0),Z([(0,a.Property)(!1)],s.prototype,"reverse",void 0),Z([(0,a.Property)("")],s.prototype,"template",void 0),Z([(0,a.Event)()],s.prototype,"created",void 0),Z([(0,a.Event)()],s.prototype,"beforeItemRender",void 0),s=Z([a.NotifyPropertyChanges],s)}(a.Component)})(),n})()));
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase")):"function"==typeof define&&define.amd?define(["SyncfusionBase"],t):"object"==typeof exports?exports.SyncfusionLayouts=t(require("SyncfusionBase")):e.SyncfusionLayouts=t(e.SyncfusionBase)}(self,(e=>(()=>{"use strict";var t={766:t=>{t.exports=e}},i={};function s(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,s),a.exports}s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{s.r(n),s.d(n,{DashboardLayout:()=>J,PaneProperties:()=>T,Panel:()=>G,Splitter:()=>Y,Timeline:()=>he,TimelineAlign:()=>i,TimelineItem:()=>oe,TimelineOrientation:()=>t});var e,t,i,a=s(766),l=(e=function(t,i){return e=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,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}),r=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},o="e-splitter",h="e-splitter-horizontal",p="e-splitter-vertical",d="e-pane",c="e-pane-horizontal",u="e-pane-vertical",g="e-split-bar",m="e-split-bar-horizontal",f="e-split-bar-vertical",v="e-static-pane",y="e-scrollable",P="e-resize-handler",C="e-resizable-split-bar",S="e-split-bar-hover",x="e-split-bar-active",b="e-hide-handler",w="e-disabled",z="e-rtl",A="e-collapsible",I="e-navigate-arrow",E="e-arrow-right",O="e-arrow-left",R="e-arrow-up",H="e-arrow-down",B="e-icon-hidden",M="e-expanded",L="e-collapsed",k="e-pane-hidden",W="e-resizable",N="e-last-bar",T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),r([(0,a.Property)()],t.prototype,"size",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsible",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsed",void 0),r([(0,a.Property)(!0)],t.prototype,"resizable",void 0),r([(0,a.Property)(null)],t.prototype,"min",void 0),r([(0,a.Property)(null)],t.prototype,"max",void 0),r([(0,a.Property)()],t.prototype,"content",void 0),r([(0,a.Property)("")],t.prototype,"cssClass",void 0),t}(a.ChildProperty),Y=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.needsID=!0,s}return l(t,e),t.prototype.onPropertyChanged=function(e,t){if(this.element.classList.contains(o))for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(this.element,e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(e.paneSettings instanceof Array&&t.paneSettings instanceof Array)this.clearTemplate(),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(e.paneSettings),l=n.some((function(t){return!(0,a.isNullOrUndefined)(e.paneSettings[t].content)}));if(this.isReact&&l){for(var r=0,h=0;h<this.paneSettings.length;h++)"function"==typeof this.paneSettings[h].content&&(r+=1);r===this.paneSettings.length&&this.clearTemplate()}for(var p=0;p<n.length;p++)for(var d=parseInt(Object.keys(e.paneSettings)[p],10),c=Object.keys(e.paneSettings[d]).length,u=0;u<c;u++){var g=Object.keys(e.paneSettings[d])[u];switch(g){case"content":var m=Object(e.paneSettings[d])[""+g];(0,a.isNullOrUndefined)(m)||(this.allPanes[d].innerHTML="",this.setTemplate(m,this.allPanes[d]));break;case"resizable":var f=Object(e.paneSettings[d])[""+g];this.resizableModel(d,f);break;case"collapsible":this.collapsibleModelUpdate(d);break;case"collapsed":e.paneSettings[d].collapsed?this.isCollapsed(d):this.collapsedOnchange(d);break;case"cssClass":this.setCssClass(this.allPanes[d],e.paneSettings[d].cssClass);break;case"size":var v=Object(e.paneSettings[d])[""+g];""===v||(0,a.isNullOrUndefined)(v)||this.updatePaneSize(v,d)}}}break;case"enableRtl":this.setRTL(e.enableRtl)}}},t.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i,s=[],n=0,a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText?this.paneSettings[a].size&&(i="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(s[n]=a,n++);i="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+i:this.allBars[0].offsetHeight*this.allBars.length+i;for(var l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-i-2*this.border)/s.length,r=0;r<s.length;r++)""!==this.allPanes[s[r]].style.flexBasis&&(this.allPanes[s[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(v)},t.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},t.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,(0,a.removeClass)([this.wrapper],["e-control","e-lib",o]);var e="Horizontal"===this.orientation?h:p;(0,a.addClass)([this.element],e);var t="msie"===a.Browser.info.name?"e-ie":"";this.setCssClass(this.element,t),a.Browser.isDevice&&(0,a.addClass)([this.element],"e-splitter-touch")},t.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},t.prototype.getModuleName=function(){return"splitter"},t.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,a.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),a.EventHandler.add(this.element,"keydown",this.onMove,this)},t.prototype.onDocumentClick=function(e){e.target.classList.contains(g)||(0,a.isNullOrUndefined)(this.currentSeparator)||(this.currentSeparator.classList.remove(S),this.currentSeparator.classList.remove(x))},t.prototype.checkPaneSize=function(e){var t="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,i="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,s=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;if(this.previousPane.style.flexBasis.indexOf("%")>0||this.previousPane.style.flexBasis.indexOf("p")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var n=this.updatePaneFlexBasis(this.previousPane),l=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=n+l,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(l-1+"%")?(this.previousPane.style.flexBasis=n+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(n-1+"%")&&(this.previousPane.style.flexBasis=n-1+"%",this.nextPane.style.flexBasis=l+1+"%"))}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<i+s?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t+s+"px",this.nextPane.style.flexBasis=i<s?"0px":i-s+"px"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<t-s&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t<s?"0px":t-s+"px",this.nextPane.style.flexBasis=i+s+"px"))},t.prototype.onMove=function(e){if(this.allPanes.length>1){var t=this.getSeparatorIndex(this.currentSeparator),i=this.previousPane.classList.contains(L),s=this.previousPane.classList.contains(M),n=this.nextPane.classList.contains(L);("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(g)&&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(g)&&this.currentSeparator.classList.contains(x)&&(this.previousPane.classList.contains(L)?(this.expand(t),(0,a.addClass)([this.currentSeparator],x)):(this.collapse(t),(0,a.addClass)([this.currentSeparator],x)))}},t.prototype.getMinInPixel=function(e){if((0,a.isNullOrUndefined)(e))return 0;var t=this.convertPixelToNumber(e.toString());return e.indexOf("%")>0&&(t=this.convertPercentageToPixel(e)),this.convertPixelToNumber(t.toString())},t.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var t=a.SanitizeHtmlHelper.beforeSanitize();(0,a.extend)(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!(0,a.isNullOrUndefined)(t.helper)?e=t.helper(e):t.cancel||(e=a.SanitizeHtmlHelper.serializeValue(t,e))}return e},t.prototype.checkDataAttributes=function(){for(var e,t,i=0;i<this.validElementAttributes.length;i++)t=this.element.getAttribute(this.validElementAttributes[i]),(0,a.isNullOrUndefined)(t)||(this[e=this.removeDataPrefix(this.validElementAttributes[i])]=t);for(var s=0;s<this.element.children.length;s++)for(var n=0;n<this.validDataAttributes.length;n++)if(t=this.element.children[s].getAttribute(this.validDataAttributes[n]),!(0,a.isNullOrUndefined)(t)){t="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[n]))||"resizable"===e?"true"===t:t,(0,a.isNullOrUndefined)(this.paneSettings[s])&&(this.paneSettings[s]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1});var l=this.paneSettings[s][e];"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[s][e]=t),((0,a.isNullOrUndefined)(l)||""===l)&&(this.paneSettings[s][e]=t)}},t.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach((function(e){(0,a.detach)(e)})),this.restoreElem()},t.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++)(0,a.isNullOrUndefined)(this.paneSettings[s])?t[s]=i:t[s]=this.paneSettings[s];this.setProperties({paneSettings:t},!0)},t.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector("."+I+"."+t)},t.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},t.prototype.setRTL=function(e){e?(0,a.addClass)([this.element],z):(0,a.removeClass)([this.element],z)},t.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),(0,a.addClass)([this.allBars[this.allBars.length-1]],N),(0,a.removeClass)([this.allBars[0]],N),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},t.prototype.setSplitterSize=function(e,t,i){var s="width"===i?{width:(0,a.formatUnit)(t)}:{height:(0,a.formatUnit)(t)};(0,a.setStyleAttribute)(e,s)},t.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)},t.prototype.setCssClass=function(e,t){t&&(0,a.addClass)([e],t.split(t.indexOf(",")>-1?",":" "))},t.prototype.hideResizer=function(e){(0,a.addClass)([(0,a.select)("."+P,e)],b)},t.prototype.showResizer=function(e){!(0,a.isNullOrUndefined)(this.previousPane)&&this.previousPane.classList.contains(W)&&!(0,a.isNullOrUndefined)(this.nextPane)&&this.nextPane.classList.contains(W)&&(0,a.removeClass)([(0,a.select)("."+P,e)],b)},t.prototype.resizableModel=function(e,t){var i=e===this.allBars.length?e-1:e,s=e;a.EventHandler.remove(this.allBars[i],"mousedown",this.onMouseDown),t?(a.EventHandler.add(this.allBars[i],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[i]),(0,a.removeClass)([(0,a.select)("."+P,this.allBars[i])],b),this.allBars[i].classList.add(C),e===this.allBars.length?this.allPanes[e].classList.add(W):this.allPanes[i].classList.add(W),this.updateResizablePanes(s))):(this.updateResizablePanes(s),this.hideResizer(this.allBars[i]),this.allBars[i].classList.remove(C),e===this.allBars.length?this.allPanes[e].classList.remove(W):this.allPanes[i].classList.remove(W))},t.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,O):this.checkArrow(t,R),s="Horizontal"===this.orientation?this.checkArrow(t,E):this.checkArrow(t,H);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},t.prototype.collapseArrow=function(e,t){return(0,a.selectAll)("."+t,this.allBars[e])[0]},t.prototype.updateIsCollapsed=function(e,t,i){if(!(0,a.isNullOrUndefined)(e)){var s=e===this.allBars.length,n=s?e-1:e;(!s&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(n-1,i):s?this.collapseArrow(n,i):this.collapseArrow(n,t)).click()}},t.prototype.isCollapsed=function(e){var t=this;if((0,a.isNullOrUndefined)(e)||!this.paneSettings[e].collapsed||!(0,a.isNullOrUndefined)(this.allPanes[e].classList.contains(L))){if(this.expandFlag=!1,(0,a.isNullOrUndefined)(e)){for(var i=0;i<this.allPanes.length;i++)!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&this.updateIsCollapsed(i,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(i=this.allPanes.length-1;i>=0;i--)if(!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&!this.allPanes[i].classList.contains(L)){var s="Horizontal"===this.orientation?E:H;if(0!==i)this.collapseArrow(i-1,s).click();if(!this.nextPane.classList.contains(L))this.collapseArrow(i-1,s).click()}}else{this.collapseFlag=!0;var n=e===this.allBars.length,l=n?e-1:e,r={target:!n&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(l-1,this.targetArrows().lastBarArrow):n?this.collapseArrow(l,this.targetArrows().lastBarArrow):this.collapseArrow(l,this.targetArrows().collapseArrow)},o=this.beforeAction(r);this.trigger("beforeCollapse",o,(function(i){if(!i.cancel){var s=[];s[0]=e;for(var n=1,a=0;a<t.allPanes.length;a++)t.allPanes[a].classList.contains(L)&&(s[n]=a,n++);s=s.sort(),t.updateIsCollapsed(e,t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=0;a<s.length;a++)t.allPanes[s[a]].classList.contains(L)||t.updateIsCollapsed(s[a],t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=s.length;a>0;a--)if(!t.allPanes[s[a-1]].classList.contains(L)){var l=t.targetArrows();t.updateIsCollapsed(s[a-1],l.collapseArrow,l.lastBarArrow)}var o=t.afterAction(r);t.trigger("collapsed",o),t.collapseFlag=!1}}))}this.expandFlag=!0}},t.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?O:R,lastBarArrow:"Vertical"===this.orientation?H:E}},t.prototype.collapsedOnchange=function(e){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains(L)||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},t.prototype.isEnabled=function(e){e?(0,a.removeClass)([this.element],w):(0,a.addClass)([this.element],w)},t.prototype.setSeparatorSize=function(e){for(var t=(0,a.isNullOrUndefined)(e)?"auto":e+"px",i="Horizontal"===this.orientation?m:f,s=0;s<this.allBars.length;s++){var n=(0,a.selectAll)("."+i,this.element)[s],l=(0,a.selectAll)("."+P,n)[0];"Horizontal"===this.orientation?(n.style.width=t,(0,a.isNullOrUndefined)(l)||(l.style.width=t)):(n.style.height=t,(0,a.isNullOrUndefined)(l)||(l.style.height=t))}},t.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?h:p),this.element.classList.add(t?p:h);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?c:u),this.allPanes[i].classList.add(t?u:c);for(i=0;i<this.allBars.length;i++)(0,a.detach)(this.allBars[i]);this.allBars=[],this.addSeparator(this.element)},t.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},t.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(d)&&t.push(e[i]);return t},t.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},t.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},t.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},t.prototype.getOrderIndex=function(e,t){var i,s;s="pane"===t?this.allPanes:this.allBars;for(var n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},t.prototype.updateSeparatorSize=function(e){var t=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=t:e.style.height=t},t.prototype.addResizeHandler=function(e){var t=this.createElement("div");(0,a.addClass)([t],[P,"e-icons"]),this.updateSeparatorSize(t),e.appendChild(t)},t.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},t.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},t.prototype.setDimension=function(e,t){(0,a.setStyleAttribute)(this.element,{height:e,width:t})},t.prototype.updateCollapseIcons=function(e,t,i){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?(0,a.removeClass)([i],[B]):(0,a.addClass)([i],[B]),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])))},t.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=O,this.rightArrow=E):(this.leftArrow=R,this.rightArrow=H)},t.prototype.createSeparator=function(e){var t=this.createElement("div");this.allBars.push(t);var i=this.createElement("button"),s=this.createElement("button");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");var n=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px",l=this;return"Horizontal"===this.orientation?(this.updateIconClass(),(0,a.addClass)([s],[I,O,B]),(0,a.addClass)([i],[I,E,B]),(0,a.addClass)([t],[g,m]),t.style.width=n):((0,a.addClass)([i],[I,H,B]),(0,a.addClass)([s],[I,R,B]),(0,a.addClass)([t],[g,f]),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(x),l.currentSeparator=t,l.getPaneDetails()})),t.addEventListener("blur",(function(){t.classList.remove(x)})),t},t.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add(W):this.allPanes[e].classList.remove(W)},t.prototype.addSeparator=function(e){for(var t,i=this.allPanes.length,s=e.children,n=0;n<i;n++)if(n<i-1){if(t=this.createSeparator(n),(0,a.setStyleAttribute)(t,{order:2*n+1}),this.separatorOrder.push(2*n+1),s[n].parentNode.appendChild(t),this.currentSeparator=t,t.setAttribute("role","separator"),t.setAttribute("aria-valuenow",n.toString()),(0,a.isNullOrUndefined)(this.orientation)||t.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),!(0,a.isNullOrUndefined)(t))if(this.isResizable()){a.EventHandler.add(t,"mousedown",this.onMouseDown,this);var l="msie"===a.Browser.info.name?"pointerdown":"touchstart";a.EventHandler.add(t,l,this.onMouseDown,this),t.classList.add(C),this.updateResizablePanes(n)}else(0,a.addClass)([(0,a.select)("."+P,t)],b)}else t&&(0,a.addClass)([t],N),i>1&&this.updateResizablePanes(n);if("msie"===a.Browser.info.name){var r=this.element.querySelectorAll(".e-splitter .e-resize-handler");for(n=0;n<r.length;n++){var o=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;r[n].style.paddingLeft=o/2+"px",r[n].style.paddingRight=o/2+"px"}}},t.prototype.isResizable=function(){var e=!1;return(!(0,a.isNullOrUndefined)(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},t.prototype.addMouseActions=function(e){var t,i,s=this;e.addEventListener("mouseenter",(function(){t=setTimeout((function(){(0,a.addClass)([e],[S])}),s.iconsDelay)})),e.addEventListener("mouseleave",(function(){clearTimeout(t),(0,a.removeClass)([e],[S])})),e.addEventListener("mouseout",(function(){clearTimeout(i)})),e.addEventListener("mouseover",(function(){i=setTimeout((function(){(0,a.addClass)([e],[S])}))}))},t.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},t.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},t.prototype.isSeparator=function(e){return!e.classList.contains(g)},t.prototype.isMouseEvent=function(e){var t=!1;return("mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(t=!0),t},t.prototype.updateCursorPosition=function(e,t){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},t);else{var i="msie"!==a.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:i.pageX,y:i.pageY},t)}},t.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},t.prototype.reportWindowSize=function(){var e=this,t=this.allPanes.length;if(document.body.contains(this.element)){for(var i=0;i<t;i++){if((0,a.isNullOrUndefined)(this.paneSettings[i].size)&&this.allPanes[i].classList.remove(v),t-1===i)this.element.querySelectorAll("."+v).length===t&&""===this.allPanes[i].style.flexBasis&&(0,a.removeClass)([this.allPanes[i]],v)}t>0&&setTimeout((function(){e.updateSplitterSize(!0)}),200)}else document.defaultView.removeEventListener("resize",this.onReportWindowSize)},t.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,l=0,r=n.length;l<r;l++)t+="Horizontal"===this.orientation?n[l].offsetWidth:n[l].offsetHeight;var o=0;for(r=this.allBars.length;o<r;o++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[o]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[o]).marginLeft,10):parseInt(getComputedStyle(this.allBars[o]).marginTop,10)+parseInt(getComputedStyle(this.allBars[o]).marginBottom,10);var h="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t);for(l=0,r=this.allPanes.length;l<r;l++)(""===this.allPanes[l].innerText?this.paneSettings[l].size&&""===this.allPanes[l].innerText:this.paneSettings[l].size||""===this.allPanes[l].innerText)||(i[s]=l,s++);var p=h/i.length;for(o=0,r=i.length;o<r;o++)""!==this.allPanes[i[o]].style.flexBasis&&(this.allPanes[i[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[o]].offsetWidth+p+"px":this.allPanes[i[o]].offsetHeight+p+"px");if(2===this.allPanes.length&&e){var d=this.allPanes.length,c=void 0,u=void 0,g=void 0,m=void 0;for(l=0;l<d;l++)if(!(0,a.isNullOrUndefined)(this.paneSettings[l].min)&&(u=this.convertPixelToNumber(this.paneSettings[l].min.toString()),this.paneSettings[l].min.indexOf("%")>0&&(u=this.convertPercentageToPixel(this.paneSettings[l].min)),c=this.convertPixelToNumber(u.toString()),("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight)<c)){0===l?(g=this.allPanes[l],m=this.allPanes[l+1]):(g=this.allPanes[l],m=this.allPanes[l-1]);var f=c-("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight),y=g.style.flexBasis.indexOf("%")>-1,P="Horizontal"===this.orientation?g.offsetWidth:g.offsetHeight;!(0,a.isNullOrUndefined)(g)&&""!==g.style.flexBasis&&g.classList.contains(v)&&(g.style.flexBasis=y?this.convertPixelToPercentage(P+f)+"%":P+f+"px");var C="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight;(0,a.isNullOrUndefined)(m)||""===m.style.flexBasis||m.classList.contains(v)||(m.style.flexBasis=m.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(C-f)+"%":C-f+"px")}}},t.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(t,this.onTouchEndHandler,!0)},t.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.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)},t.prototype.wireClickEvents=function(){a.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},t.prototype.clickHandler=function(e){if(!e.target.classList.contains(I)){var t=(0,a.selectAll)("."+o+" > ."+g+"."+S);t.length>0&&(0,a.removeClass)(t,S),e.target.classList.add(S)}this.splitterDetails(e);var i=e.target;(i.classList.contains(O)||i.classList.contains(E)||i.classList.contains(H)||i.classList.contains(R))&&(this.nextPane.classList.contains(k)||this.previousPane.classList.contains(k)?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},t.prototype.expandAction=function(e){var t=this,i=this.beforeAction(e);this.expandFlag?this.trigger("beforeExpand",i,(function(i){i.cancel||t.expandPane(e);var s=t.afterAction(e);t.trigger("expanded",s)})):this.expandPane(e)},t.prototype.getIcon=function(e){return e.target.className.split(" ").filter((function(e){return e!==I&&e!==B}))[0]},t.prototype.expandPane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=!this.previousPane.classList.contains(L)&&this.previousPane.classList.contains(v)&&!this.nextPane.classList.contains(L)&&!this.nextPane.classList.contains(M)&&this.nextPane.nextElementSibling.classList.contains(d)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!(t===this.allPanes.length-2),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.nextPane:this.previousPane,o=l?this.previousPane:this.nextPane,h=l?this.nextPaneIndex:this.prevPaneIndex;(0,a.removeClass)([r],s),r.setAttribute("aria-hidden","false");var p=this.element.querySelectorAll("."+L).length;if(p>0)o.classList.contains(L)||((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"));else if(0===p)for(var c=0;c<this.allPanes.length;c++)this.allPanes[c].classList.contains(L)||((0,a.removeClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(h,!1),this.updateIconsOnExpand(e,n),this.updateFlexGrow(),i&&(this.previousPane.classList.remove(M),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},t.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains(L)&&(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(L)&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains(M)?s[n].style.flexGrow="1":s[n].classList.contains(L)&&(s[n].style.flexGrow="0")},t.prototype.hideTargetBarIcon=function(e,t){(0,a.addClass)([(0,a.select)("."+t,e)],B)},t.prototype.showTargetBarIcon=function(e,t){(0,a.removeClass)([(0,a.select)("."+t,e)],B)},t.prototype.updateIconsOnCollapse=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.resizableModel(this.currentBarIndex,!1),(0,a.isNullOrUndefined)(s)||this.resizableModel(n,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,i),this.showTargetBarIcon(this.currentSeparator,i)):((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,t),this.hideTargetBarIcon(this.currentSeparator,i));else if(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,t),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(1===o?(this.hideTargetBarIcon(s,i),this.resizableModel(n,!1)):2===o&&(this.hideBarIcons(s),this.resizableModel(n,!1)),this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible||this.hideTargetBarIcon(s,t))}}else this.showTargetBarIcon(this.currentSeparator,i),this.hideTargetBarIcon(this.currentSeparator,t),this.resizableModel(this.currentBarIndex,!1)},t.prototype.collapseAction=function(e){var t=this,i=this.beforeAction(e);this.collapseFlag?this.collapsePane(e):this.trigger("beforeCollapse",i,(function(i){if(!i.cancel){t.collapsePane(e);var s=t.afterAction(e);t.trigger("collapsed",s)}}))},t.prototype.collapsePane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=this.previousPane.classList.contains(v)&&!this.previousPane.classList.contains(L)&&!this.nextPane.classList.contains(L)&&this.nextPane.nextElementSibling.classList.contains(d)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!this.nextPane.nextElementSibling.classList.contains(L)&&!(t===this.allPanes.length-2)||this.nextPane.classList.contains(L)&&!this.previousPane.classList.contains(v)&&this.nextPane.classList.contains(v),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.previousPane:this.nextPane,o=l?this.nextPane:this.previousPane,h=l?this.prevPaneIndex:this.nextPaneIndex;if((0,a.removeClass)([r],M),r.setAttribute("aria-expanded","false"),(0,a.addClass)([r],s),r.setAttribute("aria-hidden","true"),""===r.style.flexBasis)(0,a.addClass)([o],M),o.setAttribute("aria-expanded","true");else{for(var p=!0,c=0;c<this.allPanes.length;c++)if(!this.allPanes[c].classList.contains(L)&&""===this.allPanes[c].style.flexBasis&&!this.allPanes[c].classList.contains(L)&&!this.allPanes[c].classList.contains(M)){(0,a.addClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","true"),p=!1;break}p&&((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(h,!0),this.updateIconsOnCollapse(e,n),this.updateFlexGrow(),i&&(this.nextPane.classList.remove(M),this.nextPane.style.flexGrow="")},t.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(v)},t.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}},t.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},t.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains(A),prevPaneCollapsible:this.previousPane.classList.contains(A),prevPaneExpanded:this.previousPane.classList.contains(M),nextPaneExpanded:this.nextPane.classList.contains(M),nextPaneCollapsed:this.nextPane.classList.contains(L),prevPaneCollapsed:this.previousPane.classList.contains(L),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},t.prototype.showCurrentBarIcons=function(){(0,a.removeClass)([(0,a.select)("."+this.arrow,this.currentSeparator)],B)},t.prototype.hideBarIcons=function(e){(0,a.addClass)([(0,a.select)("."+this.arrow,e)],B)},t.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains(L)&&(i+=1),this.allPanes[t].classList.contains(L)&&(i+=1),i},t.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},t.prototype.updateIconsOnExpand=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0);else if(!this.splitInstance.prevPaneCollapsed&&!this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(0===o?(this.showTargetBarIcon(s,t),this.showTargetBarIcon(s,i),this.checkResizableProp(l,r)&&this.resizableModel(n,!0)):1===o&&(this.hideBarIcons(s),this.allPanes[l].classList.contains(M)||this.allPanes[r].classList.contains(M)?this.showTargetBarIcon(s,i):this.showTargetBarIcon(s,t),this.resizableModel(n,!1)))}}else this.hideTargetBarIcon(this.currentSeparator,t),this.showTargetBarIcon(this.currentSeparator,i),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)},t.prototype.afterAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},t.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},t.prototype.getSeparatorIndex=function(e){var t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).indexOf(e)},t.prototype.getPrevBar=function(e){return this.allBars[e-1]},t.prototype.getNextBar=function(e){return this.allBars[e+1]},t.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},t.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(O)?E:O:this.arrow=e.target.classList.contains(R)?H:R,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},t.prototype.triggerResizing=function(e){var t={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",t)},t.prototype.onMouseDown=function(e){var t=this;e.preventDefault();var i=e.target;if(!i.classList.contains(I)){this.updateCurrentSeparator(i),(0,a.addClass)([this.currentSeparator],x),this.updateCursorPosition(e,"previous"),this.getPaneDetails();for(var s={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},n=0;n<this.element.querySelectorAll("iframe").length;n++)this.element.querySelectorAll("iframe")[n].style.pointerEvents="none";this.trigger("resizeStart",s,(function(i){i.cancel||(t.wireResizeEvents(),t.checkPaneSize(e))}))}},t.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},t.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},t.prototype.convertPercentageToPixel=function(e,t){var i,s=e.toString();if(s.indexOf("%")>-1){i=parseFloat(s.slice(0,s.indexOf("%")));var n=void 0;n=(0,a.isNullOrUndefined)(t)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(t)],i=Math.ceil(n*(i/100))}else i=parseInt(s,10);return i},t.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},t.prototype.convertPixelToNumber=function(e){return(e=e.toString()).indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},t.prototype.calcDragPosition=function(e,t){var i;return(i=(i=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t)>1?1:i<0?0:i)*t},t.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+window.scrollX:this.element.getBoundingClientRect().top+window.scrollY,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},t.prototype.getMinMax=function(e,t,i){var s="min"===i?0:null,n=null;return"min"===i?(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min):(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max),this.paneSettings.length>0&&!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(n)?(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),this.convertPixelToNumber(n)):s},t.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")},t.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")},t.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),this.allPanes.length>1&&(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())},t.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},t.prototype.isValidSize=function(e){var t=!1;return!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(t=!0),t},t.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())},t.prototype.checkCoordinates=function(e,t){var i=!0;return e===this.previousCoordinates.x&&t===this.previousCoordinates.y&&(i=!1),i},t.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==a.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},t.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"!==a.Browser.info.name?this.border:e},t.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);var t,i=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+i-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+i-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&this.previousPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=t+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-t,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){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass();for(var n=0,l=0;l<this.paneSettings.length;l++)""===this.paneSettings[l].size?n+=1:""!==this.allPanes[l].style.flexBasis&&(this.paneSettings[l].size=this.allPanes[l].style.flexBasis);var r=n===this.allPanes.length;if(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||r)r?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(v)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(v)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth));else{var o=this.allPanes.length%this.allBars.length;this.prevPaneIndex===o?(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):this.nextPaneIndex===o?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v))}var h=""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis;this.allPanes.length>2||!h||this.updateSplitterSize()}},t.prototype.validateMinRange=function(e,t){var i,s,n=null,l=0;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t<(i=this.convertPixelToNumber(n))&&(l=t-i<=0?0:t-i,this.totalWidth=this.totalWidth-l,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.prototype.validateMaxRange=function(e,t){var i,s,n=null;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t>(i=this.convertPixelToNumber(n))&&(this.totalWidth=this.totalWidth-(t-i),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.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)},t.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+"%")},t.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")},t.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(v)||""===this.previousPane.style.flexBasis||this.previousPane.classList.contains(M)||this.previousPane.classList.add(v),this.nextPane.classList.contains(v)||""===this.nextPane.style.flexBasis||this.nextPane.classList.contains(M)||this.nextPane.classList.add(v)},t.prototype.validateDraggedPosition=function(e,t,i){var s="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,n=s-t,l=i+s,r=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),o=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),h=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),p=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),d=e;return e>l-o?d=l-o:e<n+r&&(d=n+r),(0,a.isNullOrUndefined)(h)?(0,a.isNullOrUndefined)(p)||e<l-p&&(d=l-p):e>n+h&&(d=n+h),d},t.prototype.onMouseUp=function(e){(0,a.removeClass)([this.currentSeparator],x),this.unwireResizeEvents();for(var t={event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},i=0;i<this.element.querySelectorAll("iframe").length;i++)this.element.querySelectorAll("iframe")[i].style.pointerEvents="auto";if(this.trigger("resizeStop",t),this.enablePersistence){var s=this.paneSettings;s[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,s[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:s},!0)}},t.prototype.panesDimension=function(e,t){var i,s=t.length;parseInt(this.getHeight(this.element),10),(0,a.isNullOrUndefined)(this.paneSettings[e])?(0,a.setStyleAttribute)(t[e],{order:2*e}):(0,a.isNullOrUndefined)(this.paneSettings[e].size)?(this.sizeFlag=!0,(0,a.setStyleAttribute)(t[e],{order:2*e})):(i=this.paneSettings[e].size,e<s&&((0,a.setStyleAttribute)(t[e],{"flex-basis":i,order:2*e}),e<s-1&&""!==this.paneSettings[e].size?(0,a.addClass)([t[e]],v):this.sizeFlag||(t[e].style.flexBasis=null),e===s-1&&this.sizeFlag&&""!==this.paneSettings[e].size&&(0,a.addClass)([t[e]],v))),this.paneOrder.push(2*e)},t.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},t.prototype.templateCompile=function(e,t){Object.keys(window);var i=this.createElement("div");this.compileElement(i,t,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach((function(t){e.appendChild(t)}))},t.prototype.compileElement=function(e,t,i){var s,n;Object.keys(window);if("string"==typeof t)if("."===t[0]||"#"===t[0]){var l=document.querySelector(t);if(!(0,a.isNullOrUndefined)(l))return this.templateElement.push(l),"none"===l.style.display&&l.style.removeProperty("display"),""===l.getAttribute("style")&&l.removeAttribute("style"),void e.appendChild(l);t=t.trim()}else t=t.trim();s=(0,a.isNullOrUndefined)(t.outerHTML)?(0,a.compile)(t):(0,a.compile)(t.outerHTML),(0,a.isNullOrUndefined)(s)||(n=s({},this,i,this.element.id+"content"+this.allPanes.length.toString(),!0)),!(0,a.isNullOrUndefined)(s)&&n&&n.length>0&&[].slice.call(n).forEach((function(t){e.appendChild(t)}))},t.prototype.paneCollapsible=function(e,t){this.paneSettings[t].collapsible?(0,a.addClass)([e],A):(0,a.removeClass)([e],A)},t.prototype.createSplitPane=function(e){for(var t=e.children.length,i=0;i<this.paneSettings.length;i++)if(t<this.paneSettings.length){var s=this.createElement("div");this.element.appendChild(s),t+=1}t=e.children.length;var n=[].slice.call(e.children);if(this.sizeFlag=!1,t>0)for(i=0;i<t;i++)"DIV"!==n[i].nodeName&&"SPAN"!==n[i].nodeName||(this.allPanes.push(n[i]),"Horizontal"===this.orientation?((0,a.addClass)([n[i]],[d,c,y]),this.panesDimension(i,n)):((0,a.addClass)([n[i]],[d,u,y]),this.panesDimension(i,n)),(0,a.isNullOrUndefined)(this.paneSettings[i])||(0,a.isNullOrUndefined)(this.paneSettings[i].content)||this.setTemplate(this.paneSettings[i].content,n[i]),!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].cssClass&&this.setCssClass(n[i],this.paneSettings[i].cssClass),(0,a.isNullOrUndefined)(this.paneSettings[i])||this.paneCollapsible(n[i],i))},t.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},t.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},t.prototype.destroy=function(){if(!this.isDestroyed){for(e.prototype.destroy.call(this),a.EventHandler.remove(document,"touchstart click",this.onDocumentClick),a.EventHandler.remove(this.element,"keydown",this.onMove),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize,!0);this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);for(var t=0;t<this.wrapper.attributes.length;t++)this.element.setAttribute(this.wrapper.attributes[t].name,this.wrapper.attributes[t].value);this.refreshing&&((0,a.addClass)([this.element],["e-control","e-lib",o]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate();var i=this.element.querySelectorAll(".e-split-bar");if(i.length>0)for(t=0;t<i.length;t++)a.EventHandler.remove(i[t],"touchstart",this.clickHandler),a.EventHandler.remove(i[t],"touchstart",this.onMouseDown),a.EventHandler.remove(i[t],"click",this.clickHandler),a.EventHandler.remove(i[t],"mousedown",this.onMouseDown),i[t].parentNode.removeChild(i[t]);var s=this.element.querySelectorAll(".e-pane");if(s.length>0)for(t=0;t<s.length;t++)for(s[t].classList.remove(c,u,v,y,d,W,b,A,M,k);s[t].attributes.length>0;)s[t].removeAttribute(s[t].attributes[0].name);this.allBars=[],this.allBars=null,this.allPanes=[],this.allPanes=null,this.previousPane=null,this.nextPane=null,this.currentSeparator=null,this.wrapper=null,this.prevBar=null,this.nextBar=null,this.templateElement=null}},t.prototype.restoreElem=function(){if(this.templateElement.length>0)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},t.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?(0,a.addClass)([e],[d,c,y]):(0,a.addClass)([e],[d,u,y]),e},t.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")},t.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},t.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)(0,a.detach)(this.allBars[e]);this.allBars=[]},t.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},t.prototype.addPane=function(e,t){var i=this.createElement("div");i=this.addPaneClass(i),t=t>this.allPanes.length+1?this.allPanes.length:t;var s={size:(0,a.isNullOrUndefined)(e.size)?"":e.size,min:(0,a.isNullOrUndefined)(e.min)?null:e.min,max:(0,a.isNullOrUndefined)(e.max)?null:e.max,content:(0,a.isNullOrUndefined)(e.content)?"":e.content,resizable:!!(0,a.isNullOrUndefined)(e.resizable)||e.resizable,collapsible:!(0,a.isNullOrUndefined)(e.collapsible)&&e.collapsible,collapsed:!(0,a.isNullOrUndefined)(e.collapsed)&&e.collapsed,cssClass:(0,a.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("."+c)[t]),this.removePaneOrders(c)):(this.element.insertBefore(i,this.element.querySelectorAll("."+u)[t]),this.removePaneOrders(u)),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(v)},t.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var t="Horizontal"===this.orientation?c:u;(0,a.isNullOrUndefined)(this.element.querySelectorAll("."+t)[e])||((0,a.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),this.allPanes.length>0&&this.allPanes[this.allPanes.length-1].classList.remove(v))},r([(0,a.Property)("100%")],t.prototype,"height",void 0),r([(0,a.Property)(!1)],t.prototype,"enableReversePanes",void 0),r([(0,a.Property)("100%")],t.prototype,"width",void 0),r([(0,a.Property)(!1)],t.prototype,"enablePersistence",void 0),r([(0,a.Collection)([],T)],t.prototype,"paneSettings",void 0),r([(0,a.Property)("Horizontal")],t.prototype,"orientation",void 0),r([(0,a.Property)("")],t.prototype,"cssClass",void 0),r([(0,a.Property)(!0)],t.prototype,"enabled",void 0),r([(0,a.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),r([(0,a.Property)(null)],t.prototype,"separatorSize",void 0),r([(0,a.Event)()],t.prototype,"beforeSanitizeHtml",void 0),r([(0,a.Event)()],t.prototype,"created",void 0),r([(0,a.Event)()],t.prototype,"resizeStart",void 0),r([(0,a.Event)()],t.prototype,"resizing",void 0),r([(0,a.Event)()],t.prototype,"resizeStop",void 0),r([(0,a.Event)()],t.prototype,"beforeCollapse",void 0),r([(0,a.Event)()],t.prototype,"beforeExpand",void 0),r([(0,a.Event)()],t.prototype,"collapsed",void 0),r([(0,a.Event)()],t.prototype,"expanded",void 0),t=r([a.NotifyPropertyChanges],t)}(a.Component),U=function(){var e=function(t,i){return e=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,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),X=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},D="e-prevent",j="e-dragging",V="e-drag",q="e-responsive",F="e-panel-content",Q="e-panel-container",_="e-panel-header",G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return U(t,e),X([(0,a.Property)("")],t.prototype,"id",void 0),X([(0,a.Property)("")],t.prototype,"cssClass",void 0),X([(0,a.Property)("")],t.prototype,"header",void 0),X([(0,a.Property)("")],t.prototype,"content",void 0),X([(0,a.Property)(!0)],t.prototype,"enabled",void 0),X([(0,a.Property)(0)],t.prototype,"row",void 0),X([(0,a.Property)(0)],t.prototype,"col",void 0),X([(0,a.Property)(1)],t.prototype,"sizeX",void 0),X([(0,a.Property)(1)],t.prototype,"sizeY",void 0),X([(0,a.Property)(1)],t.prototype,"minSizeY",void 0),X([(0,a.Property)(1)],t.prototype,"minSizeX",void 0),X([(0,a.Property)(null)],t.prototype,"maxSizeY",void 0),X([(0,a.Property)(null)],t.prototype,"maxSizeX",void 0),X([(0,a.Property)(1e3)],t.prototype,"zIndex",void 0),t}(a.ChildProperty),J=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.rows=1,s.panelID=0,s.movePanelCalled=!1,s.resizeCalled=!1,s.mOffX=0,s.mOffY=0,s.maxTop=9999,s.maxRows=100,s.mouseX=0,s.mouseY=0,s.minTop=0,s.minLeft=0,s.isInlineRendering=!1,s.removeAllCalled=!1,s.isPanelRemoved=!1,s.panelsSizeY=0,s.resizeHeight=!1,s.eventVar=!1,(0,a.setValue)("mergePersistData",s.mergePersistPanelData,s),s}return U(t,e),t.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)},t.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}},t.prototype.createPanelElement=function(e,t){var i=this.createElement("div");return e&&e.length>0&&(0,a.addClass)([i],e),t&&i.setAttribute("id",t),i},t.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()},t.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()},t.prototype.initialize=function(){if(this.updateRowHeight(),this.element.childElementCount>0&&this.element.querySelectorAll(".e-panel").length>0){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&&(0,a.addClass)([i],"e-rtl"),this.getInlinePanels(i),this.maxCol(),this.maxRow()}for(t=0;t<this.panels.length;t++){i=this.element.querySelector("#"+this.panels[t].id);if(this.setMinMaxValues(this.panels[t]),this.maxColumnValue<this.panels[t].col||this.maxColumnValue<this.panels[t].col+this.panels[t].sizeX){var s=this.maxColumnValue-this.panels[t].sizeX;this.panelPropertyChange(this.panels[t],{col:s<0?0:s})}this.setXYAttributes(i,this.panels[t]);var n=this.renderPanels(i,this.panels[t],this.panels[t].id,!1);this.panelCollection.push(n),this.setHeightAndWidth(i,this.panels[t]),this.tempObject=this,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()},t.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},t.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,(0,a.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)},t.prototype.maxRow=function(e){var t=1;if(this.rows>1&&(0,a.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 0===this.panels.length&&(t=this.columns),t},t.prototype.maxCol=function(){var e;return e=this.columns,this.maxColumnValue=e,e},t.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t=this.panels[e].id;if(this.element.querySelector("[id='"+t+"']")){var i=parseInt(this.element.querySelector("[id='"+t+"']").getAttribute("data-row"),10),s=parseInt(this.element.querySelector("[id='"+t+"']").getAttribute("data-col"),10);this.oldRowCol[this.panels[e].id]={row:i,col:s}}}},t.prototype.createSubElement=function(e,t,i){var s=this.createElement("div");return i&&(0,a.addClass)([s],[i]),e&&e.length>0&&(0,a.addClass)([s],e),t&&s.setAttribute("id",t),s},t.prototype.templateParser=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,a.compile)(document.querySelector(e).innerHTML.trim()):(0,a.compile)(e)}catch(i){var t=a.SanitizeHtmlHelper.sanitize(e);return(0,a.compile)(this.enableHtmlSanitizer&&"string"==typeof e?t:e)}},t.prototype.renderTemplate=function(e,t,i,s,n){var l=this.templateParser(e),r=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){var o=l({},this,n,i,s,null,t);if(o){for(var h=0,p=o;h<p.length;h++){var d=p[h];r.push(d)}(0,a.append)([].slice.call(r),t)}}else{var c=document.querySelector(e);if(!(0,a.isNullOrUndefined)(c))return"none"===c.style.display&&c.style.removeProperty("display"),""===c.getAttribute("style")&&c.removeAttribute("style"),void t.appendChild(c);e=e.trim()}},t.prototype.renderPanels=function(e,t,i,s){(0,a.addClass)([e],["e-panel","e-panel-transition"]),e.setAttribute("role","listitem"),this.allowDragging&&e.setAttribute("aria-grabbed","false");var n=t.cssClass?t.cssClass.split(" "):null;if(this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(n,e.id+"_content",Q),e.appendChild(this.panelContent),t.enabled||this.disablePanel(e),t.header){var l=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template","");if((0,a.addClass)([l],[_]),!e.querySelector(".e-panel-header")){var r=this.element.id+"HeaderTemplate"+i;this.renderTemplate(t.header,l,r,s,"header"),this.panelContent.appendChild(l),this.renderReactTemplates()}}if(t.content){var o=t.cssClass?t.cssClass.split(" "):null;this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(o,e.id+"_body",F);var h="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";if((0,a.setStyleAttribute)(this.panelBody,{height:h}),!e.querySelector(".e-panel-content")){r=this.element.id+"ContentTemplate"+i;this.renderTemplate(t.content,this.panelBody,r,s,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}}return e},t.prototype.disablePanel=function(e){(0,a.addClass)([e],["e-disabled"])},t.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"};t.id||(t.id="layout_"+this.panelID.toString(),e.setAttribute("id",t.id),this.panelID=this.panelID+1),(0,a.isUndefined)(t.enabled)&&(t.enabled=!0),e.style.zIndex=""+t.zIndex;var i=new G(this,"panels",t,!0);this.panels.push(i),this.oldRowCol[t.id]={row:t.row,col:t.col}},t.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"===a.Browser.info.name?"mousedown pointerdown":"mousedown";a.EventHandler.add(e[t],i,this.downResizeHandler,this),"msie"!==a.Browser.info.name&&a.EventHandler.add(e[t],"touchstart",this.touchDownResizeHandler,this)}},t.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),a.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},t.prototype.downResizeHandler=function(e){for(var t=(0,a.closest)(e.currentTarget,".e-panel"),i=0;this.panels.length>i;i++)if(this.panels[i].enabled&&this.panels[i].id===t.id){this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY;var s="msie"===a.Browser.info.name?"mousemove pointermove":"mousemove",n="msie"===a.Browser.info.name?"mouseup pointerup":"mouseup";this.isMouseMoveBound||(a.EventHandler.add(document,s,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(a.EventHandler.add(document,n,this.upResizeHandler,this),this.isMouseUpBound=!0)}},t.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var t=(0,a.closest)(e.currentTarget,".e-panel"),i={event:e,element:t,isInteracted:!0};this.trigger("resizeStart",i),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),(0,a.addClass)([this.element],[D]),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},t.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(a.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(a.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},t.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},t.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var t={event:e,element:(0,a.closest)(this.moveTarget,".e-panel"),isInteracted:!0};this.trigger("resize",t)},t.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,(0,a.removeClass)([e],"e-panel-transition"),(0,a.addClass)([e],[j]);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])},t.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var t=(0,a.closest)(this.moveTarget,".e-panel");if(this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY){this.updateResizeElement(t);var i=this.getCellInstance(t.getAttribute("id"));this.mouseX=e.pageX,this.mouseY=e.pageY;var s=this.mouseY-this.lastMouseY+this.mOffY,n=this.mouseX-this.lastMouseX+this.mOffX;this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(t,i,n,s)}},t.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var t=(0,a.closest)(this.moveTarget,".e-panel");if(this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY){this.updateResizeElement(t);var i=this.getCellInstance(t.getAttribute("id"));this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY;var s=this.mouseX-this.lastMouseX+this.mOffX,n=this.mouseY-this.lastMouseY+this.mOffY;this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(t,i,s,n)}},t.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i;if(this.handleClass.indexOf("north")>=0&&(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),this.handleClass.indexOf("south")>=0&&(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),this.handleClass.indexOf("west")>=0&&(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),this.handleClass.indexOf("east")>=0){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);var o=this.elementWidth;this.elementWidth+=i;var h=this.pixelsToColumns(this.elementWidth-t.sizeX*this.cellSpacing[1],!0);this.columns<t.col+h&&(this.elementWidth=o)}e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px";var p=this.getResizeRowColumn(t);if(p.col+p.sizeX>this.columns&&this.panelPropertyChange(p,{sizeX:p.sizeX-1}),this.shadowEle.style.top=p.row*this.getCellSize()[1]+p.row*this.cellSpacing[1]+"px",this.handleClass.indexOf("west")>=0?this.shadowEle.style.left=p.col*this.getCellSize()[0]+(p.col-1)*this.cellSpacing[0]+"px":this.shadowEle.style.left=p.col*this.getCellSize()[0]+p.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=p.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=p.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n!==p.sizeX||a!==p.sizeY){n=p.sizeX,a=p.sizeY;var d=this.getCellInstance(e.id),c={attributes:{row:d.row.toString(),col:d.col.toString(),sizeX:d.sizeX.toString(),sizeY:d.sizeY.toString()}};this.setAttributes(c,e),this.mainElement=e,this.checkCollision=[],this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel()}},t.prototype.upResizeHandler=function(e){if(!(0,a.isNullOrUndefined)(this.downTarget)){this.upTarget=this.downTarget;var t=(0,a.closest)(this.upTarget,".e-panel"),i={event:e,element:t,isInteracted:!0};if(t){(0,a.addClass)([t],"e-panel-transition");var s="msie"===a.Browser.info.name?"mousemove pointermove":"mousemove",n="msie"===a.Browser.info.name?"mouseup pointerup":"mouseup";a.EventHandler.remove(document,s,this.moveResizeHandler),a.EventHandler.remove(document,n,this.upResizeHandler),"msie"!==a.Browser.info.name&&(a.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),a.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&(0,a.detach)(this.shadowEle),this.shadowEle=null;var l=this.getCellInstance(t.getAttribute("id"));this.setPanelPosition(t,l.row,l.col),this.setHeightAndWidth(t,l)}(0,a.removeClass)([t],[j]),i.panels=this.getChangingPanels(),this.trigger("resizeStop",i),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)}},t.prototype.getChangingPanels=function(){return this.resizeCalled||this.updatePanels(),this.getChangedPanels()},t.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col;-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1));var s=e.row;-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s&&(this.previousRow=s,t=!0));var n=e.sizeX;-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0));var a=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),(s>-1&&i>-1&&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},t.prototype.pixelsToColumns=function(e,t){return t?Math.ceil(e/this.cellSize[0]):Math.floor(e/(this.cellSize[0]+this.cellSpacing[0]))},t.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},t.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]+(e.minSizeX-1)*this.cellSpacing[0]},t.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},t.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]+(e.minSizeY-1)*this.cellSpacing[1]},t.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},t.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},t.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()}},t.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;l>-1;){if(0!==this.collisions(l,t,s,i,e).length)break;n=l,a=t,--l}null!==n&&this.sortItem(e,n,a)}},t.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-row"),10);if(this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,void 0!==e&&void 0!==t&&void 0!==i){if(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col){var a=this.sortedArray[this.oldRowCol[e.id].row];this.oldRowCol[e.id]&&a[this.oldRowCol[e.id].col]===e&&(delete a[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel())}this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i});var l=this.getCellInstance(e.id);this.setAttributes({value:{col:l.col.toString(),row:l.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id))}},t.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},t.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains(q)){(0,a.removeClass)([this.element],[q]);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),l=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:l}),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,l),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}(0,a.isNullOrUndefined)(this.panelCollection)||(this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection)),this.resizeEvents(),(0,a.isNullOrUndefined)(this.panelCollection)||this.checkDragging(this.dragCollection)},t.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&(0,a.detach)(this.table),this.initGridLines())},t.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)}},t.prototype.sortPanels=function(){for(var e=[],t=function(t){for(var s=function(s){i.panels.filter((function(i){i.row===t&&i.col===s&&e.push(i)}))},n=0;n<i.columns;n++)s(n)},i=this,s=0;s<=this.rows;s++)t(s);return e},t.prototype.checkMediaQuerySizing=function(){var e;(0,a.addClass)([this.element],[q]),e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var t=0;t<e.length;t++){var i=document.getElementById(e[t].id),s=void 0;i&&((0,a.setStyleAttribute)(i,{width:"100%"}),i.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+"px",e[t].sizeY>1&&(s=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[t].sizeY+parseInt((Math.round(e[t].sizeY/2)*this.cellSpacing[1]).toString(),10),i.style.height=s+"px"),this.resizeHeight=!0,this.panelPropertyChange(e[t],{row:t,col:0}),this.setPanelPosition(i,e[t].row,e[t].col),this.panelsSizeY=this.panelsSizeY+e[t].sizeY,(0,a.isNullOrUndefined)(this.panelCollection)||(this.setClasses(this.panelCollection),this.removeResizeClasses(this.panelCollection)),(0,a.isNullOrUndefined)(this.dragCollection)||this.checkDragging(this.dragCollection))}this.updateRowHeight()},t.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()},t.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},t.prototype.setHeightWidth=function(){var e;if(!((0,a.isNullOrUndefined)(this.cellSpacing)||0===this.panels.length&&this.panelCollection&&0===this.panelCollection.length)){if(this.checkMediaQuery()){for(var t=0,i=0;i<this.panels.length;i++)this.panels[i].sizeY&&(t+=this.panels[i].sizeY);e=t*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(t-1)*this.cellSpacing[1]+"px"}else e=this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px";(0,a.setStyleAttribute)(this.element,{height:e});var s=window.getComputedStyle(this.element).width;(0,a.setStyleAttribute)(this.element,{width:s})}},t.prototype.setEmptyLayoutHeight=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width")},t.prototype.setHeightAndWidth=function(e,t){(0,a.setStyleAttribute)(e,{height:(0,a.formatUnit)(this.setXYDimensions(t)[0])}),(0,a.setStyleAttribute)(e,{width:(0,a.formatUnit)(this.setXYDimensions(t)[1])})},t.prototype.renderCell=function(e,t,i){var s;this.dimensions=this.setXYDimensions(e),(0,a.isUndefined)(e.enabled)&&(e.enabled=!0),this.contentTemplateChild.length>0&&!(0,a.isNullOrUndefined)(i)?(s=this.contentTemplateChild[i],e.cssClass&&(0,a.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 n=this.renderPanels(s,e,e.id,t);return this.panelCollection.push(n),this.setXYAttributes(s,e),this.setHeightAndWidth(s,e),s},t.prototype.setPanelPosition=function(e,t,i){if(e){this.checkMediaQuery()&&this.calculateCellSize();var s=this.getCellSize()[1],n=this.getCellSize()[0],l=0===i?0:i*(n+this.cellSpacing[0]),r=0===t?0:t*(s+this.cellSpacing[1]);this.checkMediaQuery()&&(r=0===t?0:this.panelsSizeY*(s+this.cellSpacing[1])),(0,a.setStyleAttribute)(e,{left:l+"px",top:r+"px"})}},t.prototype.getRowColumn=function(){if(this.rows=null,this.element.querySelectorAll(".e-panel").length>0&&!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),n=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+n)}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)}},t.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})},t.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},t.prototype.panelPropertyChange=function(e,t){e.setProperties(t,!0)},t.prototype.renderDashBoardCells=function(e){if(this.element.querySelectorAll(".e-panel").length>0||this.panels.length>0)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&&(0,a.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)},t.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},t.prototype.rightWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach((function(e){var i=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-sizeX"),10);if(t<s.columns&&i>=t)if(a>1)for(var l=i;l<i+a;l++)n.push(l);else n.push(i)})),n.length>0)for(var l=t+1;l<=this.columns-1;l++)-1===n.indexOf(l)&&l!==t&&-1===a.indexOf(l)&&a.push(l);var r=this.getOccupiedColumns(i);return r.forEach((function(e){e>t&&-1!==a.indexOf(e)&&a.splice(a.indexOf(e),1)})),this.getOccupiedColumns(this.checkingElement).forEach((function(e){e>parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&a.push(e)})),a=a.sort((function(e,t){return e-t}))},t.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},t.prototype.leftWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach((function(e){var i=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-sizeX"),10);if(t<=s.columns&&i<=t)if(n>1)for(var l=i;l<i+n;l++)a.push(l);else a.push(i)})),a.length>0)for(var l=0;l<=t;l++)-1===a.indexOf(l)&&l!==t&&-1===n.indexOf(l)&&n.push(l);var r=this.getOccupiedColumns(i);return r.forEach((function(e){e<t&&-1!==n.indexOf(e)&&n.splice(n.indexOf(e),1)})),this.getOccupiedColumns(this.checkingElement).forEach((function(e){e<parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===n.indexOf(e)&&n.push(e)})),n=(n=n.sort((function(e,t){return e-t}))).reverse()},t.prototype.adjustmentAvailable=function(e,t,i,s,n){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var l,r=!1,o=[];this.topAdjustable=void 0;var h=parseInt(n.getAttribute("data-sizeX"),10),p=parseInt(n.getAttribute("data-col"),10);-1===(o=this.getRowElements(this.collisions(e,0,this.columns,i,[]))).indexOf(n)&&o.push(n);var d=this.leftWardsSpaceChecking(o,t,n);if(d.length>0?(this.leftAdjustable=this.isLeftAdjustable(d,n,e,t,s,i),this.spacedColumnValue!==p-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),this.leftAdjustable?this.rightAdjustable=!1:(this.leftAdjustable=!1,l=this.rightWardsSpaceChecking(o,t,n),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,n,e,t,s,i),this.spacedColumnValue!==h+p&&(this.rightAdjustable=!1),this.rightAdjustable||(this.rightAdjustable=!1))):(l=this.rightWardsSpaceChecking(o,t,n),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,n,e,t,s,i),this.spacedColumnValue!==h+p&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&e>0){var c=this.getCellInstance(n.id).row,u=!1;this.startRow!==c&&(u=!0);for(var g=e;g>=0;g--){var m=this.getCellInstance(n.id).sizeY>1&&u?this.checkingElement:n;g!==c&&g===c-i&&0===this.collisions(g,t,s,i,m).length&&(u=!1,this.topAdjustable=!0,this.spacedRowValue=(0,a.isNullOrUndefined)(this.spacedRowValue)?g:this.spacedRowValue,this.spacedColumnValue=t)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(r=!0,(0,a.isNullOrUndefined)(this.spacedRowValue)&&(this.spacedRowValue=e)),r},t.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){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}else s=[];return i},t.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},t.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!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},t.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!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},t.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},t.prototype.sortCollisionItems=function(e){for(var t,i=[],s=function(s){t=[],e.forEach((function(e){e&&e.getAttribute("data-row")===s.toString()&&t.push(e)}));for(var a=function(e){t.forEach((function(t){t&&t.getAttribute("data-col")===e.toString()&&i.push(t)}))},l=n.columns-1;l>=0;l--)a(l)},n=this,a=this.rows-1;a>=0;a--)s(a);return i},t.prototype.updatedModels=function(e,t,i){var s=this,n=[];return this.mainElement||this.sortedPanel(),e.forEach((function(a){s.checkingElement=a;var l=s.getCellInstance(a.id),r=!s.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,i);if(l.sizeX>1&&r)for(var o=l.row;o<t.row+t.sizeY;o++){s.collisions(o,l.col,l.sizeX,l.sizeY,a).forEach((function(t){e.indexOf(t)>=0&&-1===n.indexOf(t)&&n.push(t)}))}})),n.forEach((function(t){n.indexOf(t)>=0&&e.splice(e.indexOf(t),1)})),e},t.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)return t;if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s=this.element.querySelector("[id='"+this.panels[i].id+"']");if(s!==this.mainElement){var n=this.cloneObject[s.id].row,a=this.cloneObject[s.id].col;this.setPanelPosition(s,n,a),this.panelPropertyChange(this.getCellInstance(s.id),{row:n,col:a}),this.setAttributes({value:{col:a.toString(),row:n.toString()}},s),this.updateOldRowColumn()}}return this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&this.checkCollision.length>0&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0]),t},t.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]),this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length>0)return i=!1,!1}return i},t.prototype.checkForSwapping=function(e,t){if(0===Object.keys(this.cloneObject).length||!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(e.length>=1&&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(o.sizeY>1&&-1===p.indexOf(e[r]))if(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1)p.push(e[r]);else{if(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),this.collisions(l,o.col,o.sizeX,o.sizeY,p).length>0)return n=!1;r===e.length-1&&(n=!0)}return n},t.prototype.swapItems=function(e,t,i){var s,n=this,a=[];a.push(t);var l=parseInt(e[0].getAttribute("data-row"),10);this.startRow<l?s=1:this.startRow>l&&(s=0);var r=0===s?l+i.sizeY:this.startRow;if(!this.movePanelCalled){var o=this.getCellInstance(e[0].id);this.panelPropertyChange(i,{row:0===s?l:r+o.sizeY})}for(var h=0;h<e.length;h++)a.push(e[h]),this.setPanelPosition(e[h],r,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:r}),e[h].setAttribute("data-row",r.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(),a.forEach((function(e){n.cloneObject[e.id]=n.oldRowCol[e.id];for(var t=n.getCellInstance(e.id),i=0;i<n.sortedArray.length;i++)if(n.sortedArray[i])for(var s=0;s<n.sortedArray[i].length;s++)n.sortedArray[i][s]===e&&(n.sortedArray[i][s]=void 0);n.sortedArray[t.row]||(n.sortedArray[t.row]=[]),n.sortedArray[t.row][t.col]=e,n.cloneArray=n.sortedArray}))},t.prototype.updatePanelLayout=function(e,t){var i=this;this.collisionChecker={};var s=[],n=[];if((s=this.mainElement&&this.isRenderComplete?this.resetLayout(t):this.collisions(t.row,t.col,t.sizeX,t.sizeY,e)).length>0)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,t,e),!(0,a.isNullOrUndefined)(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,t);else for(var l=0;l<s.length;l++){var r=this.getCellInstance(s[l].id);if(this.checkingElement=s[l],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(r.row,r.col,r.sizeY,r.sizeX,e)&&!(0,a.isNullOrUndefined)(this.spacedColumnValue)){this.setPanelPosition(s[l],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[l].id]={row:this.spacedRowValue,col:this.spacedColumnValue};var o={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}};if(this.setAttributes(o,s[l]),this.panelPropertyChange(r,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,l<s.length)continue}else n.push(s[l])}n.length>0&&(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),n.length>0&&(this.updateRowColumn(t.row,this.overlapElement,e),this.checkForCompletePushing())),this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},t.prototype.checkForCompletePushing=function(){for(var e=0;e<this.panels.length;e++)if(this.collisionChecker[this.panels[e].id]&&null!==this.collisionChecker[this.panels[e].id]){this.overlapElement=[this.collisionChecker[this.panels[e].id].ele];var t=this.panels[e].id;this.updateRowColumn(this.collisionChecker[""+t].row,this.overlapElement,this.collisionChecker[""+t].srcEle)}},t.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},t.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]),o>1||p>1){var u=this.getCellInstance(this.overlapElementClone[a].id);d=u.col;for(var 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);this.panelPropertyChange(f,{col:d,row:u.row});var v=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=[];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};f=this.getCellInstance(this.overlapElementClone[a].id);this.panelPropertyChange(f,{col:d,row:r}),this.collisionPanel(c,d,r,this.overlapElementClone[a])}}}},t.prototype.collisionPanel=function(e,t,i,s){var n=this,a=this.getCellInstance(s.id);if(this.panelPropertyChange(a,{row:i,col:t}),e.length>0){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(),this.overlapSubElementClone.length>0)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),u=this.collisions(h,p,d,c,this.overlapSubElementClone);this.mainElement&&-1!==u.indexOf(this.mainElement)&&u.splice(u.indexOf(this.mainElement),1),u.forEach((function(e){n.overlapElement.push(e)})),u.length>0&&this.updateRowColumn(h,this.overlapElement,this.overlapSubElementClone[o])}this.overlapSubElementClone=[]}},t.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++)(0,a.detach)(i[s])},t.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+V);(0,a.removeClass)(e,[V]),this.setClasses(this.panelCollection)},t.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]?(0,a.addClass)([i.querySelectorAll(this.draggableHandle)[0]],[V]):(0,a.addClass)([i],[V])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(i,s)}},t.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",(0,a.addClass)([s],[n,this.availableClasses[i],"e-resize","e-dl-icon"])}},t.prototype.setXYAttributes=function(e,t){var i={value:{sizeX:(0,a.isNullOrUndefined)(t.sizeX)?void 0:t.sizeX.toString(),sizeY:(0,a.isNullOrUndefined)(t.sizeY)?void 0:t.sizeY.toString(),minSizeX:(0,a.isNullOrUndefined)(t.minSizeX)?void 0:t.minSizeX.toString(),minSizeY:(0,a.isNullOrUndefined)(t.minSizeY)?void 0:t.minSizeY.toString(),maxSizeX:(0,a.isNullOrUndefined)(t.maxSizeX)?void 0:t.maxSizeX.toString(),maxSizeY:(0,a.isNullOrUndefined)(t.maxSizeY)?void 0:t.maxSizeY.toString(),row:(0,a.isNullOrUndefined)(t.row)?void 0:t.row.toString(),col:(0,a.isNullOrUndefined)(t.col)?void 0:t.col.toString()}};this.setAttributes(i,e)},t.prototype.setXYDimensions=function(e){var t,i=this.getCellSize()[1],s=this.getCellSize()[0];return t=e&&"number"==typeof s&&"number"==typeof e.sizeX&&e.sizeX>1?e.sizeX*s+(e.sizeX-1)*this.cellSpacing[0]:s,[e&&"number"==typeof i&&e.sizeY>1&&"number"==typeof e.sizeY?e.sizeY*i+(e.sizeY-1)*this.cellSpacing[1]:(0,a.formatUnit)(i),t]},t.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),i=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(i/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},t.prototype.checkForChanges=function(e,t,i){var s=this.getChangedPanels(i);if(s.length>0||this.removeAllCalled){var n={changedPanels:s,isInteracted:e,addedPanels:(0,a.isNullOrUndefined)(t)?[]:t,removedPanels:(0,a.isNullOrUndefined)(i)?[]:i};this.trigger("change",n)}},t.prototype.getChangedPanels=function(e){var t=[];if(this.removeAllCalled)t=[];else for(var i=0;i<this.panels.length;i++)!(0,a.isNullOrUndefined)(e)&&this.panels[i].id===e[0].id||this.panels[i].row===this.panelsInitialModel[i].row&&this.panels[i].col===this.panelsInitialModel[i].col||t.push(this.panels[i]);return t},t.prototype.enableDraggingContent=function(e){for(var t,i=this,s=function(s){var l=[".e-resize",".e-drag-restrict"],r=e[s];n.dragobj=new a.Draggable(r,{preventDefault:!1,clone:!1,dragArea:n.element,isDragScroll:!0,handle:n.draggableHandle?n.draggableHandle:".e-panel",abort:l,dragStart:n.onDraggingStart.bind(n),dragStop:function(e){var t=e;if(t.panels=i.getChangingPanels(),i.trigger("dragStop",t),(0,a.isNullOrUndefined)(e.cancel)&&(e.cancel=!1),e.cancel){var n=i.getCellInstance(i.mainElement.id);for(s=0;s<i.panels.length;s++)i.panels[s].id===n.id&&(e.element.setAttribute("data-col",i.panelsInitialModel[s].col.toString()),e.element.setAttribute("data-row",i.panelsInitialModel[s].row.toString()),n.col=i.panelsInitialModel[s].col,n.row=i.panelsInitialModel[s].row,i.setPanelPosition(i.mainElement,i.panelsInitialModel[s].row,i.panelsInitialModel[s].col),i.updatePanelLayout(i.mainElement,n));i.shadowEle&&(0,a.detach)(i.shadowEle)}else{var l=i.getCellInstance(i.mainElement.id);i.allowPushing&&i.collisions(l.row,l.col,l.sizeX,l.sizeY,i.mainElement).length>0?(i.setHolderPosition(e),i.setPanelPosition(i.mainElement,l.row,l.col),i.updatePanelLayout(i.mainElement,l)):i.setPanelPosition(i.mainElement,l.row,l.col),i.mainElement=null;var r=i.getPanelBase(e);i.shadowEle&&(0,a.detach)(i.shadowEle),(0,a.removeClass)([i.element],[D]),(0,a.removeClass)([e.element],[j]),i.shadowEle=null,e.element.classList.remove("e-dragging");var o=i.getRowColumnDragValues(e)[0],h=i.getRowColumnDragValues(e)[1],p=i.getCellInstance(e.element.id);i.allowPushing&&0===i.collisions(o,h,p.sizeX,p.sizeY,document.getElementById(r.id)).length?(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:o,col:h}),i.oldRowCol[e.element.id].row=o,i.oldRowCol[e.element.id].col=h,i.setAttributes({value:{col:h.toString(),row:o.toString()}},e.element),i.sortedPanel()):(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:i.oldRowCol[e.element.id].row,col:i.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",i.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",i.getCellInstance(e.element.id).row.toString()),i.sortedPanel());var d=i.getCellInstance(e.element.id);i.setPanelPosition(e.element,d.row,d.col),i.updatePanels(),i.updateCloneArrayObject(),i.checkForChanges(!0),i.dragStopEventArgs={event:e.event,element:e.element},i.resizeEvents(),i.rows=i.maxRow(!0),i.setHeightWidth(),i.updateDragArea()}},drag:function(e){i.draggedEventArgs={event:e.event,element:e.element,target:(0,a.closest)(e.target,".e-panel")},i.trigger("drag",i.draggedEventArgs),i.onDragStart(e)}}),-1===n.dragCollection.indexOf(n.dragobj)&&n.dragCollection.push(n.dragobj),t=s},n=this,l=0;l<e.length;l++)s(l),l=t},t.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},t.prototype.updateDragArea=function(){this.dragCollection.forEach((function(e){e.setDragArea()}))},t.prototype.refreshDraggableHandle=function(){if(this.dragCollection&&this.dragCollection.length>0){for(var e=0;e<this.dragCollection.length;e++)this.dragCollection[e].destroy(),a.EventHandler.clearEvents(this.dragCollection[e].element);this.ensureDrag()}},t.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},t.prototype.onDraggingStart=function(e){var t=e;if(this.trigger("dragStart",t,(function(){(0,a.isNullOrUndefined)(e.cancel)&&(e.cancel=!1)})),this.eventVar=e.cancel,e.cancel)(0,a.removeClass)([this.element],[D]),(0,a.removeClass)([e.element],[j]);else{this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject));var i=this.startRow=parseInt(e.element.getAttribute("data-row"),10);this.startCol=parseInt(e.element.getAttribute("data-col"),10);var s=parseInt(e.element.getAttribute("data-sizeY"),10);this.updateRowsHeight(i,s,s),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder","e-holder-transition"),(0,a.setStyleAttribute)(this.shadowEle,{position:"absolute"}),(0,a.addClass)([this.element],[D]),(0,a.addClass)([e.element],[j]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder");var n=this.getCellInstance(e.element.id),l=this.calculateShadowElementSize(n.sizeX,n.sizeY);this.shadowEle.style.height=l.height,this.shadowEle.style.width=l.width;var r=this.getCellInstance(e.element.id);this.setPanelPosition(this.shadowEle,r.row,r.col)}},t.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},t.prototype.onDragStart=function(e){var t,i,s;if(this.eventVar)this.dragobj.intDestroy(e.event),(0,a.removeClass)([this.element],[D]),(0,a.removeClass)([e.element],[j]);else{var n=s=this.getRowColumnDragValues(e)[1],l=this.getRowColumnDragValues(e)[0];if(n<0||l<0)return;this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n});var r=this.getCellInstance(e.element.id);if(this.updateRowsHeight(r.row,r.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:l.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:l,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;var o=r;this.checkCollision=this.collisions(o.row,o.col,o.sizeX,o.sizeY,e.element),(r.col>=0||r.col>=this.checkColumnValue)&&(this.checkCollision=[]),this.updatePanelLayout(e.element,r),this.moveItemsUpwards()}if(!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),this.oldRowCol[e.element.id].row===l&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:l,col:n}),this.setAttributes({value:{col:n.toString(),row:l.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),!1===this.allowPushing)return}},t.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},t.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;e>-1;){for(var n=1,a=t;a>-1;){var l=this.sortedArray[e];if(l){var r=l[a];if(r&&(!i||-1===i.indexOf(r))&&parseInt(r.getAttribute("data-sizeX"),10)>=n&&parseInt(r.getAttribute("data-sizeY"),10)>=s)return r}++n,--a}--e,++s}return null},t.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),n=parseInt(e.element.getAttribute("data-sizeX"),10),a=this.getCellSize()[0],l=this.getCellSize()[1],r=0===s?0:s*(l+this.cellSpacing[1]),o=0===i?0:i*(a+this.cellSpacing[0]);this.elementRef.top=this.shadowEle.style.top=r+"px",this.elementRef.left=this.shadowEle.style.left=o+"px";var h=this.calculateShadowElementSize(n,t);this.elementRef.height=this.shadowEle.style.height=h.height,this.elementRef.width=this.shadowEle.style.width=h.width},t.prototype.calculateShadowElementSize=function(e,t){return{width:e*this.cellSize[0]+(e-1)*this.cellSpacing[0]+"px",height:t*this.cellSize[1]+(t-1)*this.cellSpacing[1]+"px"}},t.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},t.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 t=new G(this,"panels",e,!0);this.panels.push(t),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(t),(this.maxColumnValue<t.col||this.maxColumnValue<t.col+t.sizeX)&&this.panelPropertyChange(t,{col:this.maxColumnValue-t.sizeX});var i=this.renderCell(t,!0,null);if(this.oldRowCol[t.id]={row:t.row,col:t.col},this.cloneObject[t.id]={row:t.row,col:t.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",i),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.removeResizeClasses(this.panelCollection)):(this.mainElement=i,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(i,t.row,t.col),this.addPanelCalled=!1,this.updatePanelLayout(i,t)),this.addPanelCalled&&(this.addPanelCalled=!1),this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(t.id)]),this.setClasses([i]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var s=0;s<i.querySelectorAll(".e-resize").length;s++){var n="msie"===a.Browser.info.name?"mousedown pointerdown":"mousedown";a.EventHandler.add(i.querySelectorAll(".e-resize")[s],n,this.downResizeHandler,this),"msie"!==a.Browser.info.name&&a.EventHandler.add(i.querySelectorAll(".e-resize")[s],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[t])},t.prototype.updatePanel=function(e){if(this.panelsSizeY=0,e.id){var t=this.getCellInstance(e.id);if(t){this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,(0,a.isNullOrUndefined)(e.col)&&(e.col=t.col),this.panelPropertyChange(t,e),this.setMinMaxValues(t);var i=document.getElementById(e.id);this.mainElement=i;var s=t.cssClass?t.cssClass.split(" "):null;if(this.panelContent=i.querySelector(".e-panel-container")?i.querySelector(".e-panel-container"):this.createSubElement(s,i.id+"_content",Q),i.appendChild(this.panelContent),t.header){var n=i.querySelector(".e-panel-header")?i.querySelector(".e-panel-header"):this.createSubElement([],i.id+"template","");(0,a.addClass)([n],[_]),n.innerHTML="";var l=this.element.id+"HeaderTemplate"+t.id;this.renderTemplate(t.header,n,l,!0,"header"),this.panelContent.appendChild(n),this.renderReactTemplates()}else i.querySelector(".e-panel-header")&&(0,a.detach)(i.querySelector(".e-panel-header"));if(t.content){var r=t.cssClass?t.cssClass.split(" "):null;this.panelBody=i.querySelector(".e-panel-content")?i.querySelector(".e-panel-content"):this.createSubElement(r,i.id+"_body",F),this.panelBody.innerHTML="";var o="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";(0,a.setStyleAttribute)(this.panelBody,{height:o});l=this.element.id+"ContentTemplate"+t.id;this.renderTemplate(t.content,this.panelBody,l,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}else i.querySelector(".e-panel-content")&&(0,a.detach)(i.querySelector(".e-panel-content"));this.setXYAttributes(i,t),this.setHeightAndWidth(i,t),this.setPanelPosition(i,t.row,t.col),this.updatePanelLayout(i,t),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject()}}},t.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},t.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},t.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)(0,a.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,this.setEmptyLayoutHeight()},t.prototype.removePanel=function(e){var t,i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s=0;s<this.panelCollection.length;s++)this.panelCollection[s].id===e&&((0,a.detach)(this.panelCollection[s]),this.panelCollection.splice(s,1)),this.panels[s].id===e&&(t=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(t){t.id===e&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(t),1)})),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[t]),0===this.panels.length&&0===this.panelCollection.length&&this.setEmptyLayoutHeight()},t.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);if(!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});var n=document.getElementById(e);this.mainElement=n,this.startRow=parseInt(n.getAttribute("data-row"),10),this.startCol=parseInt(n.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},n),this.updateOldRowColumn(),this.setPanelPosition(n,t,i),this.updatePanelLayout(n,s),this.updateRowHeight(),this.updatePanels(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1)}},t.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()))},t.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);this.resizeCalled=!0;var n=document.getElementById(e),a={event:null,element:n,isInteracted:!1};this.trigger("resizeStart",a),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=n,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},n),this.setHeightAndWidth(n,s),this.updatePanelLayout(n,s),this.updatePanels(),this.updateRowHeight(),a.panels=this.getChangingPanels(),this.resizeCalled=!1,this.trigger("resizeStop",a),this.checkForChanges(!1)},t.prototype.destroy=function(){a.EventHandler.remove(window,"resize",this.refreshListener),(0,a.removeClass)([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var t=0;t<this.dragCollection.length;t++)this.dragCollection[t].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,e.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},t.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)(0,a.detach)(this.element.firstElementChild),this.clearTemplate()},t.prototype.setEnableRtl=function(){!0===this.enableRtl?(0,a.addClass)([this.element],"e-rtl"):(0,a.removeClass)([this.element],"e-rtl")},t.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)}},t.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()},t.prototype.checkForIDValues=function(e){var t=this;!(0,a.isNullOrUndefined)(e)&&e.length>0?(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},t.prototype.onPropertyChanged=function(e){var t=this;e.panels&&e.panels.length>0&&e.panels[0]instanceof G&&this.checkForIDValues(e.panels);for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){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"),l=0;l<n.length;l++){var r="msie"===a.Browser.info.name?"mousedown pointerdown":"mousedown",o=n[l];a.EventHandler.remove(o,r,this.downResizeHandler),"msie"!==a.Browser.info.name&&a.EventHandler.remove(o,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.checkMediaQuery()||(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&&(0,a.detach)(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&e.panels.length>0?(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){if(t.setMinMaxValues(e),t.maxColumnValue<e.col||t.maxColumnValue<e.col+e.sizeX){var i=t.maxColumnValue-e.sizeX;t.panelPropertyChange(e,{col:i<0?0:i}),t.setXYAttributes(document.getElementById(e.id),e)}t.setHeightAndWidth(document.getElementById(e.id),e),t.panelCollection.push(document.getElementById(e.id)),t.setPanelPosition(document.getElementById(e.id),e.row,e.col),t.mainElement=document.getElementById(e.id),t.updatePanelLayout(document.getElementById(e.id),e),t.mainElement=null})),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}}},t.prototype.getPersistData=function(){return this.addOnPersist(["panels"])},t.prototype.mergePersistPanelData=function(e){var t=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!(0,a.isNullOrUndefined)(t)&&""!==t||!(0,a.isNullOrUndefined)(e)){var i=(0,a.isNullOrUndefined)(e)?JSON.parse(t):e,s=Object.keys(i);this.isProtectedOnChange=!0;for(var n=0,l=s;n<l.length;n++){var r=l[n];"object"!=typeof(0,a.getValue)(r,this)||(0,a.isNullOrUndefined)((0,a.getValue)(r,this))||Array.isArray((0,a.getValue)(r,this))&&"panels"===r&&(this.mergePanels(i[r],this[r]),this[r]=i[r])}this.isProtectedOnChange=!1}},t.prototype.mergePanels=function(e,t){for(var i=e,s=function(e){n.checkForIDValues(t);var s=t.filter((function(t){return t.id===i[e].id}))[0];(0,a.isNullOrUndefined)(s)||(i[e]=(0,a.extend)(s,i[e],{},!0))},n=this,l=0;l<i.length;l++)s(l)},t.prototype.getModuleName=function(){return"DashboardLayout"},X([(0,a.Property)(!0)],t.prototype,"allowDragging",void 0),X([(0,a.Property)(!1)],t.prototype,"allowResizing",void 0),X([(0,a.Property)(!0)],t.prototype,"allowPushing",void 0),X([(0,a.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),X([(0,a.Property)(!0)],t.prototype,"allowFloating",void 0),X([(0,a.Property)(1)],t.prototype,"cellAspectRatio",void 0),X([(0,a.Property)([5,5])],t.prototype,"cellSpacing",void 0),X([(0,a.Property)(1)],t.prototype,"columns",void 0),X([(0,a.Property)(!1)],t.prototype,"showGridLines",void 0),X([(0,a.Property)(null)],t.prototype,"draggableHandle",void 0),X([(0,a.Property)("en-US")],t.prototype,"locale",void 0),X([(0,a.Property)("max-width: 600px")],t.prototype,"mediaQuery",void 0),X([(0,a.Collection)([],G)],t.prototype,"panels",void 0),X([(0,a.Property)(["e-south-east"])],t.prototype,"resizableHandles",void 0),X([(0,a.Event)()],t.prototype,"change",void 0),X([(0,a.Event)()],t.prototype,"dragStart",void 0),X([(0,a.Event)()],t.prototype,"drag",void 0),X([(0,a.Event)()],t.prototype,"dragStop",void 0),X([(0,a.Event)()],t.prototype,"resizeStart",void 0),X([(0,a.Event)()],t.prototype,"resize",void 0),X([(0,a.Event)()],t.prototype,"resizeStop",void 0),X([(0,a.Event)()],t.prototype,"created",void 0),X([(0,a.Event)()],t.prototype,"destroyed",void 0),t=X([a.NotifyPropertyChanges],t)}(a.Component),K=function(){var e=function(t,i){return e=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,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Z=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;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},$="e-opposite-content",ee="e-dot",te="e-content",ie="e-vertical",se="e-horizontal",ne="e-timeline-reverse",ae="e-rtl",le="e-item-disabled",re="e-item-template";!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(t||(t={})),function(e){e.Before="Before",e.After="After",e.Alternate="Alternate",e.AlternateReverse="AlternateReverse"}(i||(i={}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return K(t,e),Z([(0,a.Property)("")],t.prototype,"dotCss",void 0),Z([(0,a.Property)("")],t.prototype,"content",void 0),Z([(0,a.Property)("")],t.prototype,"oppositeContent",void 0),Z([(0,a.Property)(!1)],t.prototype,"disabled",void 0),Z([(0,a.Property)("")],t.prototype,"cssClass",void 0),t}(a.ChildProperty),he=function(e){function s(t,i){return e.call(this,t,i)||this}return K(s,e),s.prototype.preRender=function(){this.element.id||(this.element.id=(0,a.getUniqueID)("e-"+this.getModuleName()))},s.prototype.getModuleName=function(){return"timeline"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.render=function(){(0,a.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)},s.prototype.updateOrientation=function(){if(!(0,a.isNullOrUndefined)(this.orientation)){var e=this.orientation.toLowerCase();"horizontal"!==e&&"vertical"!==e||(this.element.classList.remove(se,ie),this.element.classList.add("e-"+e))}},s.prototype.updateCssClass=function(e,t){var i,s,n;void 0===t&&(t=""),t&&(n=t.trim().split(" "),(i=this.element.classList).remove.apply(i,n)),e&&(n=e.trim().split(" "),(s=this.element.classList).add.apply(s,n))},s.prototype.updateRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](ae)},s.prototype.updateAlign=function(){if(!(0,a.isNullOrUndefined)(this.align)){var e=this.align.toLowerCase();"before"!==e&&"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))}},s.prototype.updateReverse=function(){this.element.classList[this.reverse?"add":"remove"](ne)},s.prototype.renderItems=function(){var e,t=this;this.haveOneSidecontent();for(var i=0;i<this.items.length;i++){var s=this.items[parseInt(i.toString(),10)],n=this.createElement("li",{className:"e-timeline-item e-connector"});if(this.template)this.renderItemContent(i,!1,n);else{var a=this.createElement("div",{className:$});s.oppositeContent&&this.updateItemContent(!1,s,i,a),n.appendChild(a);var l=this.createElement("div",{className:"e-dot-item"}),r=s.dotCss?ee+" "+s.dotCss.trim():ee,o=this.createElement("div",{className:r});l.appendChild(o),n.appendChild(l);var h=this.createElement("div",{className:te});s.content&&this.updateItemContent(!0,s,i,h),n.appendChild(h),s.cssClass&&(e=n.classList).add.apply(e,s.cssClass.trim().split(" ")),s.disabled&&n.classList.add(le)}var p={element:n,index:i};this.trigger("beforeItemRender",p,(function(e){t.timelineListEle.appendChild(e.element)}))}},s.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=s.content.length>0||!(0,a.isNullOrUndefined)(s.content)),t||(t=s.oppositeContent.length>0||!(0,a.isNullOrUndefined)(s.content))}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")},s.prototype.updateItemContent=function(e,t,i,s){var n=!(this.isReact||this.isVue),l=this.getTemplateFunction(e?t.content:t.oppositeContent,n);"string"==typeof l?s.innerText=l:(0,a.append)(l({item:t,itemIndex:i},this),s)},s.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template,!1):null},s.prototype.renderItemContent=function(e,t,i){var s=this.timelineListEle.querySelectorAll("li");if(t&&this.removeItemContent(s[parseInt(e.toString(),10)]),this.template){t?s[parseInt(e.toString(),10)].classList.add(re):i.classList.add(re);var n=this.items[parseInt(e.toString(),10)];(0,a.append)(this.templateFunction({item:n,itemIndex:e},this,"timelineTemplate",this.element.id+"_timelineTemplate",this.isStringTemplate),t?s[parseInt(e.toString(),10)]:i)}this.renderReactTemplates()},s.prototype.removeItemContent=function(e){e.classList.remove(re);for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},s.prototype.getTemplateFunction=function(e,t){if(void 0===t&&(t=!0),"string"==typeof e){var i="";try{var s=(0,a.select)(e);s?(i="SCRIPT"===s.tagName?s.innerHTML:s.outerHTML,t=!1):i=e}catch(t){i=e}return t?i:(0,a.compile)(i)}return(0,a.compile)(e)},s.prototype.removeItemElements=function(){for(var e=this.timelineListEle.querySelectorAll("li"),t=0;t<e.length;t++)(0,a.remove)(e[parseInt(t.toString(),10)])},s.prototype.updateElementClassArray=function(){var e=[ae,"e-align-before","e-align-after","e-outline","e-fill","e-align-alternate","e-align-alternatereverse",ne,se,ie];(0,a.removeClass)([this.element],e)},s.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["timelineTemplate"]);for(var e=0;e<this.items.length;e++)this.renderItemContent(e,!0)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.removeItemElements(),this.element.removeAttribute("role"),this.element.removeAttribute("aria-label"),this.clearTemplate(),this.timelineListEle&&(0,a.remove)(this.timelineListEle),this.timelineListEle=null,this.updateElementClassArray()},s.prototype.updateItems=function(e,t,i,s){var n,a,l,r,o,h,p,d=this.timelineListEle.querySelectorAll("li");switch(e){case"dotCss":o=d[parseInt(i.toString(),10)].querySelector("."+ee),""!==t.dotCss&&(n=o.classList).remove.apply(n,t.dotCss.trim().split(" ")),""!==s.dotCss&&(a=o.classList).add.apply(a,this.items[parseInt(i.toString(),10)].dotCss.trim().split(" "));break;case"content":(h=d[parseInt(i.toString(),10)].querySelector("."+te)).innerText="",this.updateItemContent(!0,s,i,h),this.haveOneSidecontent();break;case"oppositeContent":(p=d[parseInt(i.toString(),10)].querySelector("."+$)).innerText="",this.updateItemContent(!1,s,i,p),this.haveOneSidecontent();break;case"disabled":d[parseInt(i.toString(),10)].classList[this.items[parseInt(i.toString(),10)].disabled?"add":"remove"](le);break;case"cssClass":""!==t.cssClass&&(l=d[parseInt(i.toString(),10)].classList).remove.apply(l,t.cssClass.trim().split(" ")),""!==s.cssClass&&(r=d[parseInt(i.toString(),10)].classList).add.apply(r,s.cssClass.trim().split(" "))}},s.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"](ne);break;case"template":this.updateTemplateFunction(),this.updateContent()}}},Z([(0,a.Property)(t.Vertical)],s.prototype,"orientation",void 0),Z([(0,a.Property)(i.After)],s.prototype,"align",void 0),Z([(0,a.Collection)([],oe)],s.prototype,"items",void 0),Z([(0,a.Property)("")],s.prototype,"cssClass",void 0),Z([(0,a.Property)(!1)],s.prototype,"reverse",void 0),Z([(0,a.Property)("")],s.prototype,"template",void 0),Z([(0,a.Event)()],s.prototype,"created",void 0),Z([(0,a.Event)()],s.prototype,"beforeItemRender",void 0),s=Z([a.NotifyPropertyChanges],s)}(a.Component)})(),n})()));