text: (function (define) {
    'use strict';
  
    (function (root, factory) {
      if (typeof define === 'function' && define.amd) {
        define(jetpannel,factory);
      } else if (typeof exports === 'object') {
        module.exports = factory();
      } else {
        root.jetpannel = factory();
      }
    }(window, function () {
      return (function () {
  
  
  
          var jetpannel = function()
          {
              function jetpannel(ObjectToApend,JSONSetup)
              {
                  //    console.log(ObjectToApend);
                  this.ObjectToApend = ObjectToApend;
                  this.JSONSetup = JSONSetup;
                  this.container = jetpannel.getElement(ObjectToApend);
                  jetpannel.DoLayout(this.container,JSONSetup);
                  //jetpannel.DoLayout();
                  //R
                  const selector = '.rz-demo'
                   const selector2 = '.rz-demo2'
  
                  let resizer = new Resizer(selector)
  
                  let resizer2 = new Resizer_h(selector2)
                  jetpannel.closeNav();
              }
              jetpannel.createMenuBar = function(container,menuHeight){
                  //console.log('menubar');
                  //console.log(container);
                  var menuDiv = document.createElement("div");
                  menuDiv.classList.add("header");
                  //console.log(menuHeight);
                  document.documentElement.style.setProperty('--menuHeight', menuHeight);
                  container.appendChild(menuDiv);
  
  
              }
              jetpannel.CreateSelector = function(container){
                  //console.log('selector');
                  var Selector = document.createElement("div");
                  var rz_demo = document.createElement("div");
                  Selector.style.overflow= "hidden";
                  Selector.classList.add("foomagic");
                  rz_demo.classList.add("columns");
                  rz_demo.classList.add("rz-demo");
                  container.appendChild(Selector);
                  Selector.appendChild(rz_demo);
                  return rz_demo;
              }
              jetpannel.createLeftPanel = function(rz){
                  //console.log('left');
                  //console.log(rz);
                  var sidenav = document.createElement("div");
                  sidenav.classList.add("sidenav");
                  sidenav.classList.add("column");
                  sidenav.classList.add("notification");
                  sidenav.classList.add("hiding");
                  sidenav.classList.add("has-text-centered");
                  sidenav.setAttribute("id","mySidenav");
                  rz.appendChild(sidenav);
  
                  var contentDiv = document.createElement("div");
                  contentDiv.style.overflow= "hidden";
                  sidenav.appendChild(contentDiv);
  
                  var activezone = document.createElement("div");
                  activezone.classList.add("activezone");
                  sidenav.appendChild(activezone);
  
                  var button = document.createElement("div");
                  button.classList.add("dock-toggle-button");
                  button.classList.add("left");
                  button.classList.add("hiding");
                  button.classList.add("is-hidden");
                  button.setAttribute('id','toggleButton1');
                  button.setAttribute("onclick", "jetpannel.togglePanelLeft()");
                  sidenav.appendChild(button);
  
                  var trigger = document.createElement("div");
                  trigger.classList.add("trigger");
                  button.appendChild(trigger);
  
  
  
              }
              jetpannel.createMainPanel = function(rz)
              {
                  //console.log('main');
                  var main = document.createElement("div");
                  main.setAttribute("id","main");
                  main.classList.add("main");
                  main.classList.add("row");
                  main.classList.add("column");
                  main.classList.add("notification");
                  main.classList.add("has-text-centered");
                  //main.classList.add("rz-demo2");
  
                  rz.appendChild(main);
  
                  var mainNav = document.createElement("div");
                  mainNav.setAttribute("id","MainNav");
                  mainNav.classList.add("MainNav");
                  mainNav.classList.add("row");
                  main.appendChild(mainNav);
                  //
                  // //here is the main inner content page
                  // //
                  var mainNavContent = document.createElement("div");
                  mainNavContent.style.overflow= "hidden" ;   // height: 99vh;
              //    mainNavContent.style.height= "99vh" ; //for use with electrons viewport
                  mainNav.appendChild(mainNavContent);
  
                  return main;
              }
  
              jetpannel.createBottomPanel = function(main){
                  //console.log('bottom');
                  main.classList.add("rz-demo2");
  
                  var bottomNav = document.createElement("div");
                  bottomNav.setAttribute("id","bottomNav");
                  bottomNav.classList.add("bottomNav");
                  bottomNav.classList.add("row");
                  main.appendChild(bottomNav);
  
  let bottomNavContent,bottomNaAvtiveZone,bottomNavButton ,bottomNavtrigger  = '';
                  bottomNavContent = document.createElement("div");
                  bottomNavContent.style.overflow= "hidden" ;
                  bottomNav.appendChild(bottomNavContent);
  
                  bottomNaAvtiveZone = document.createElement("div");
                  bottomNaAvtiveZone.classList.add("activezone2");
                  bottomNav.appendChild(bottomNaAvtiveZone);
  
                  bottomNavButton = document.createElement("div");
                  bottomNavButton.classList.add("dock-toggle-button2");
                  bottomNavButton.classList.add("left");
                  bottomNavButton.classList.add("hiding");
                  bottomNavButton.classList.add("is-hidden");
  
                  bottomNavButton.setAttribute("id", "toggleButton2");
                  bottomNavButton.setAttribute("onclick", "jetpannel.togglePanelBottom()");
                  bottomNav.appendChild(bottomNavButton);
  
                  bottomNavtrigger = document.createElement("div");
                  bottomNavtrigger.classList.add("trigger2")
                  bottomNavButton.appendChild(bottomNavtrigger);
              }
              jetpannel.createFooterBar = function(container,footerHeight){
                  //console.log('menubar');
                  var footerDiv = document.createElement("div");
                  footerDiv.classList.add("footer");
                  document.documentElement.style.setProperty('--footerHeight', footerHeight);
                  container.appendChild(footerDiv);
  
              }
              jetpannel.getElement = function (input) {
                  var el;
                  if (!input) {
                      throw new Error('Missing param, should be an element or selector');
                  }
                  if (typeof input === 'string') {
                      el = document.querySelector(input);
                      if (!el) {
                          throw new Error("Can not find element from selector " + input);
                      }
                  } else {
                      el = input;
                  }
                  return el;
              };
              jetpannel.DoLayout = function(container,JSONSetup)
              {
                  //console.log(JSONSetup);
                  if (JSONSetup.hasMenu==true){
                      jetpannel.createMenuBar(container,JSONSetup.menuSize);
                  }
  
                  let rz = jetpannel.CreateSelector(container);
  
                  jetpannel.createLeftPanel(rz);
                  let mainpan =jetpannel.createMainPanel(rz);
  
                  if(JSONSetup.hasBottomSlider==true){
                  jetpannel.createBottomPanel(mainpan);
              }
                  if (JSONSetup.hasFooter==true){
                  jetpannel.createFooterBar(container,JSONSetup.footerSize);
                      }
  
              }
  
  
              jetpannel.togglePanelLeft =function () {
                  var x = document.getElementById("mySidenav");
  
                  if (!x.classList.contains("hiding")) {
  
                      x.style.flex = "0 0 5px";
                      x.classList.add("hiding");
                  } else {
  
                      x.style.flex = "0 0 335px";
                      x.classList.remove("hiding");
                  }
  
  
  
  
  
              }
              jetpannel.togglePanelBottom = function() {
                  var y = document.getElementById("bottomNav");
                  var m = document.getElementById("MainNav");
                  if (!y.classList.contains("hiding")) {
  
                      m.style.flex = "0 0 80%";
  
                      y.classList.add("hiding");
                  } else {
  
                      m.style.flex = "0 0 100%";
                      y.classList.remove("hiding");
                  }
              }
  
              jetpannel.closeNav =function() {
                  //document.getElementById("mySidenav").style.width = "20px";//flex: 0 0 294px;
                  document.getElementById("mySidenav").style.flex = "0 0 5px";
  //===========================================================================
  
  //===========================================================================
  
              //
                  document.getElementById("MainNav").style.flex = "0 0 100%";//flex: 0 0 294px;
                  //    document.getElementById("main").style.marginLeft= "0";
              }
  
  
              return jetpannel;
          }();
  
  
  
  
          var Resizer = function () {
              function Resizer(containerSelector, resizerOptions) {
                  if (resizerOptions === void 0) {
                      resizerOptions = {};
                  }
                  this.containerSelector = containerSelector;
                  this.resizerOptions = resizerOptions;
                  this.offsetX = 0;
                  this.dragging = false;
                  //this.options = _extends(Resizer.defaultOptions, this.resizerOptions, {});
                  this.container = Resizer.getElement(containerSelector);
                  this.target = this.container.firstElementChild;
                  if (this.container.Resizer) {
                      this.remove();
                  }
                  this.setup();
              }
              Resizer.removeBySelector = function (input) {
              //    console.log(input);
                  var container = Resizer.getElement(input);
                  if (container.hasOwnProperty('Resizer')) {
                      container.Resizer.remove();
                  } else {
                      throw new Error('Resizer doesn\'t exist on element');
                  }
              };
              Resizer.getElement = function (input) {
                  var el;
                  if (!input) {
                      throw new Error('Missing param, should be an element or selector');
                  }
                  if (typeof input === 'string') {
                      el = document.querySelector(input);
                      if (!el) {
                          throw new Error("Can not find element from selector " + input);
                      }
                  } else {
                      el = input;
                  }
                  return el;
              };
              Resizer.createHandle = function (handleClass) {
                  var el = document.createElement('div');
                  el.dataset.rzHandle = handleClass || '';
                  el.style.cursor = 'col-resize';
  
                  return el;
              };
              Resizer.createGhost = function () {
                  var el = document.createElement('div');
                  el.style.position = 'absolute';
                  el.style.top = '0';
                  el.style.bottom = '0';
                  el.style.display = 'none';
                  el.style.zIndex = '999999';
                  return el;
              };
              Resizer.prototype.remove = function () {
                  delete this.container.Resizer;
                  this.container.style.position = null;
                  this.container.querySelector('[data-rz-handle]').remove();
                  this.target.style.flex = null;
              };
              Resizer.prototype.setup = function () {
                  var _this = this;
                  this.setupDom();
                  this.handle.addEventListener('mousedown', function (e) {
                      return _this.onDown(e);
                  });
                  this.container.addEventListener('mouseup', function (e) {
                      return _this.onUp(e);
                  });
                  this.container.addEventListener('mousemove', function (e) {
                      return _this.onMove(e);
                  });
                  this.container.querySelector('.sidenav').addEventListener('mouseover', function (e) {
                      return _this.onOver(e);
                  });
                  this.container.querySelector('[data-rz-handle]').addEventListener('mouseover', function (e) {
                      return _this.onOver(e);
                  });
                  // this.container.querySelector('[data-rz-handle]').addEventListener('mouseleave', function (e) {
                  //     return _this.onOut(e);
                  // });
                  this.container.querySelector('.main').addEventListener('mouseover', function (e) {
                      return _this.onOut(e);
                  });
                  this.container.Resizer = this;
              };
              Resizer.prototype.setupDom = function () {
                  this.container.style.position = 'relative';
                  this.handle = Resizer.createHandle();
                  this.ghost = Resizer.createGhost();
                  this.handle.appendChild(this.ghost);
                  this.container.insertBefore(this.handle, this.target.nextElementSibling);
              };
              Resizer.prototype.setDragging = function (value) {
                  if (value === void 0) {
                      value = true;
                  }
                  if (this.dragging) {
                      this.ghost.style.display = 'none';
                      this.target.style.flex = "0 0 " + this.handleX + "px";
                  } else {
                      this.ghost.style.display = 'block';
                  }
                  return this.dragging = value;
              };
              Resizer.prototype.setHandleX = function (value) {
                  if (value < 0) {
                      value = 0;
                  }
                  if (value > this.container.clientWidth) {
                      value = this.container.clientWidth;
                  }
                  this.ghost.style.left = value + "px";
                  return this.handleX = value;
              };
              Resizer.prototype.onDown = function (e) {
                  e.preventDefault();
                  if (!this.dragging) {
                      this.offsetX = e.offsetX;
                      this.setHandleX(e.pageX - this.container.getBoundingClientRect().left - this.offsetX);
                      this.setDragging(true);
                  }
              };
              Resizer.prototype.onUp = function (e) {
                  e.preventDefault();
                  if (this.dragging) {
                      this.setHandleX(e.pageX - this.container.getBoundingClientRect().left - this.offsetX);
                      this.setDragging(false);
                  }
              };
              Resizer.prototype.onMove = function (e) {
                  e.preventDefault();
                  if (this.dragging) {
                      var x = e.pageX - this.container.getBoundingClientRect().left - this.offsetX;
                      if (e.shiftKey) {
                          x = Math.ceil(x / 20) * 20;
                      }
                      this.setHandleX(x);
                  }
              };
              Resizer.prototype.onOver = function (e) {
                  e.preventDefault();
                  var handle = document.querySelector(".dock-toggle-button");
  
          //handle.classList.remove("dock-toggle-button");
                  handle.classList.remove("is-hidden");
  
              //    console.log(handle);
              };
              Resizer.prototype.onOut = function (e) {
                  e.preventDefault();
                  var handle = document.querySelector(".dock-toggle-button");
  
          //handle.classList.remove("dock-toggle-button");
          handle.classList.add("is-hidden");
          //setTimeout((function(){}), 1000);
                  //console.log(handle);
              };
  
              return Resizer;
          }();
          Resizer.defaultOptions = {
              width: 6
          };
  
          var Resizer_h = function () {
              function Resizer_h(containerSelector, Resizer_hOptions) {
                  if (Resizer_hOptions === void 0) {
                      Resizer_hOptions = {};
                  }
                  this.containerSelector = containerSelector;
                  this.Resizer_hOptions = Resizer_hOptions;
                  this.offsetY = 0;
                  this.dragging = false;
                  //this.options = _extends(Resizer_h.defaultOptions, this.Resizer_hOptions, {});
                  this.container = Resizer_h.getElement(containerSelector);
                  this.target = this.container.firstElementChild;
                  if (this.container.Resizer_h) {
                      this.remove();
                  }
                  this.setup();
              }
              Resizer_h.removeBySelector = function (input) {
                  var container = Resizer_h.getElement(input);
                  if (container.hasOwnProperty('Resizer_h')) {
                      container.Resizer_h.remove();
                  } else {
                      throw new Error('Resizer_h doesn\'t exist on element');
                  }
              };
              Resizer_h.getElement = function (input) {
                  var el;
                  if (!input) {
                      throw new Error('Missing param, should be an element or selector');
                  }
                  if (typeof input === 'string') {
                      el = document.querySelector(input);
                      if (!el) {
                          throw new Error("Can not find element from selector " + input);
                      }
                  } else {
                      el = input;
                  }
                  return el;
              };
              Resizer_h.createHandle = function (handleClass) {
                  var el = document.createElement('div');
                  el.dataset.rzHandle2 = handleClass || '';
                  el.style.cursor = 'row-resize';
          //console.log("Making handle");
                  return el;
              };
              Resizer_h.createGhost = function () {
                  var el = document.createElement('div');
                  el.style.position = 'absolute';
                  el.style.top = '0';
                  el.style.bottom = '0';
                  el.style.display = 'none';
                  el.style.zIndex = '999999';
                  return el;
              };
              Resizer_h.prototype.remove = function () {
                  delete this.container.Resizer_h;
                  this.container.style.position = null;
                  this.container.querySelector('[data-rz-handle2]').remove();
                  this.target.style.flex = null;
              };
              Resizer_h.prototype.setup = function () {
                  var _this = this;
                  this.setupDom();
                  this.handle.addEventListener('mousedown', function (e) {
                      return _this.onDown(e);
                  });
                  this.container.addEventListener('mouseup', function (e) {
                      return _this.onUp(e);
                  });
                  this.container.addEventListener('mousemove', function (e) {
                      return _this.onMove(e);
                  });
                  this.container.querySelector('.bottomNav').addEventListener('mouseover', function (e) {
                      return _this.onOver(e);
                  });
              //    this.container.querySelector('[data-rz-handle2]').addEventListener('mouseover', function (e) {
              //        return _this.onOver(e);
              //    });
                  // this.container.querySelector('[data-rz-handle]').addEventListener('mouseleave', function (e) {
                  //     return _this.onOut(e);
                  // });
                  this.container.querySelector('.MainNav').addEventListener('mouseover', function (e) {
                      return _this.onOut(e);
                  });
                  this.container.Resizer_h = this;
              };
              Resizer_h.prototype.setupDom = function () {
                  this.container.style.position = 'relative';
                  this.handle = Resizer_h.createHandle();
                  this.ghost = Resizer_h.createGhost();
                  this.handle.appendChild(this.ghost);
                  this.container.insertBefore(this.handle, this.target.nextElementSibling);
              };
              Resizer_h.prototype.setDragging = function (value) {
                  if (value === void 0) {
                      value = true;
                  }
                  if (this.dragging) {
                      this.ghost.style.display = 'none';
                      this.target.style.flex = "0 0 " + this.handleY + "px";
                  } else {
                      this.ghost.style.display = 'block';
                  }
                  return this.dragging = value;
              };
              Resizer_h.prototype.setHandleY = function (value) {
                  if (value < 0) {
                      value = 0;
                  }
                  if (value > this.container.clientHeight) {
                      value = this.container.clientHeight;
                  }
                  this.ghost.style.top = value + "px";
                  return this.handleY = value;
              };
              Resizer_h.prototype.onDown = function (e) {
                  e.preventDefault();
                  if (!this.dragging) {
                      this.offsetY = e.offsetY;
                      this.setHandleY(e.pageY - this.container.getBoundingClientRect().top - this.offsetY);
                      this.setDragging(true);
                  }
              };
              Resizer_h.prototype.onUp = function (e) {
                  e.preventDefault();
                  if (this.dragging) {
                      this.setHandleY(e.pageY - this.container.getBoundingClientRect().top - this.offsetY);
                      this.setDragging(false);
                  }
              };
              Resizer_h.prototype.onMove = function (e) {
                  e.preventDefault();
                  if (this.dragging) {
                      var x = e.pageY - this.container.getBoundingClientRect().top - this.offsetY;
                      if (e.shiftKey) {
                          x = Math.ceil(x / 20) * 20;
                      }
                      this.setHandleY(x);
                  }
              };
              Resizer_h.prototype.onOver = function (e) {
                  e.preventDefault();
                  var handle = document.querySelector(".dock-toggle-button2");
  
          //handle.classList.remove("dock-toggle-button");
                  handle.classList.remove("is-hidden");
  
              //    console.log(handle);
              };
              Resizer_h.prototype.onOut = function (e) {
                  e.preventDefault();
                  var handle = document.querySelector(".dock-toggle-button2");
  
          //handle.classList.remove("dock-toggle-button");
          handle.classList.add("is-hidden");
          //setTimeout((function(){}), 1000);
                  //console.log(handle);
              };
  
              return Resizer_h;
          }();
  
    return jetpannel;
  
  
  
      }());
    }));
  }(window.define));
  