var LayoutController=function(){function n(){var n=this;this.$menuToggle=document.getElementById("Menu-Toggle");this.$mainMenu=document.getElementById("MainMenuBar");this.$mainMenuPlaceholder=document.getElementById("MainMenuBarPlaceHolder");this.$previewBanner=document.getElementById("PreviewBanner");this.$bottomFooter=document.getElementById("FooterBottom");this.$feedbackPopup=document.getElementById("feedback-ticket .feedback");this.$sidebarSwitcher=document.getElementById("sidebar-switcher");this.$header=document.querySelector("header");this.$menuToggle!=null&&this.$menuToggle.addEventListener("click",function(){n.$mainMenu.classList.toggle("opened");n.setMainMenuPlaceholderHeight()});window.addEventListener("resize",function(){n.setMainMenuPlaceholderHeight();n.setMainMenuPosition();n.setFooterMarginForPreview();n.setPositionOfCookiesMsg();n.setFeedbackPopupPosition();n.setSidebarSwitcherPosition()});this.$mainMenu!=null&&this.$mainMenu.classList.add("fixed");this.setMainMenuPlaceholderHeight();this.setMainMenuPosition();this.setFooterMarginForPreview();this.setPositionOfCookiesMsg();this.setFeedbackPopupPosition();this.setSidebarSwitcherPosition()}return n.prototype.setMainMenuPosition=function(){this.$mainMenu!=null&&this.$header!=null&&(this.$mainMenu.style.top=getComputedStyle(this.$header).position=="fixed"?this.$header.offsetHeight+"px":"")},n.prototype.setMainMenuPlaceholderHeight=function(){this.$mainMenuPlaceholder!=null&&this.$mainMenu!=null&&(this.$mainMenuPlaceholder.style.height=this.$mainMenu.offsetHeight+"px")},n.prototype.setFooterMarginForPreview=function(){this.$previewBanner!=null&&this.$bottomFooter!=null&&(this.$bottomFooter.style.marginBottom=this.$previewBanner.offsetHeight+"px")},n.prototype.setFeedbackPopupPosition=function(){this.$previewBanner!=null&&this.$feedbackPopup!=null&&(this.$feedbackPopup.style.bottom=this.$previewBanner.offsetHeight+5+"px")},n.prototype.setSidebarSwitcherPosition=function(){this.$previewBanner!=null&&this.$sidebarSwitcher!=null&&(this.$sidebarSwitcher.style.bottom=this.$previewBanner.offsetHeight+10+"px")},n.prototype.setPositionOfCookiesMsg=function(){var n=document.getElementById("wsMsgWnd");n!=null&&(n.style.bottom=10+(this.$previewBanner!=null?this.$previewBanner.offsetHeight:0)+"px")},n}();document.addEventListener("DOMContentLoaded",function(){new LayoutController})