diff --git a/.gitignore b/.gitignore
index cf1a1b821598d0919306314b29045a296cd5a0cd..8c95ecddc233d1f93d732be0f414cb11704327da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
 node_modules/
-dist/
 .idea
 /.idea
diff --git a/dist/bundle.js b/dist/bundle.js
new file mode 100644
index 0000000000000000000000000000000000000000..ada822131ad99ed4b9c2ed92a340c6264f9be5fc
--- /dev/null
+++ b/dist/bundle.js
@@ -0,0 +1,2 @@
+/*! For license information please see bundle.js.LICENSE.txt */
+(()=>{"use strict";var t={744:(t,e,i)=>{i.d(e,{Z:()=>c});var n=i(81),s=i.n(n),r=i(645),o=i.n(r),a=i(667),l=i.n(a),h=new URL(i(810),i.b),d=o()(s()),u=l()(h);d.push([t.id,":root .grid-stack-item>.ui-resizable-handle{filter:none}.grid-stack{position:relative}.grid-stack.grid-stack-rtl{direction:ltr}.grid-stack.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack .grid-stack-placeholder>.placeholder-content{background-color:rgba(0,0,0,0.1);margin:0;position:absolute;width:auto;z-index:0 !important;text-align:center}.grid-stack>.grid-stack-item{min-width:8.3333333333%;position:absolute;padding:0}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.grid-stack>.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle,.grid-stack>.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle{display:none}.grid-stack>.grid-stack-item>.ui-resizable-se,.grid-stack>.grid-stack-item>.ui-resizable-sw{background-image:url("+u+');background-repeat:no-repeat;background-position:center;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.grid-stack>.grid-stack-item>.ui-resizable-se{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.grid-stack>.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:0;left:25px;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:0}.grid-stack>.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:0;right:25px}.grid-stack>.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px}.grid-stack>.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px}.grid-stack>.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none !important}.grid-stack>.grid-stack-item[gs-w="0"]{width:0%}.grid-stack>.grid-stack-item[gs-x="0"]{left:0}.grid-stack>.grid-stack-item[gs-min-w="0"]{min-width:0}.grid-stack>.grid-stack-item[gs-max-w="0"]{max-width:0%}.grid-stack>.grid-stack-item[gs-w="1"]{width:8.3333333333%}.grid-stack>.grid-stack-item[gs-x="1"]{left:8.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="1"]{min-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="1"]{max-width:8.3333333333%}.grid-stack>.grid-stack-item[gs-w="2"]{width:16.6666666667%}.grid-stack>.grid-stack-item[gs-x="2"]{left:16.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="2"]{min-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="2"]{max-width:16.6666666667%}.grid-stack>.grid-stack-item[gs-w="3"]{width:25%}.grid-stack>.grid-stack-item[gs-x="3"]{left:25%}.grid-stack>.grid-stack-item[gs-min-w="3"]{min-width:25%}.grid-stack>.grid-stack-item[gs-max-w="3"]{max-width:25%}.grid-stack>.grid-stack-item[gs-w="4"]{width:33.3333333333%}.grid-stack>.grid-stack-item[gs-x="4"]{left:33.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="4"]{min-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="4"]{max-width:33.3333333333%}.grid-stack>.grid-stack-item[gs-w="5"]{width:41.6666666667%}.grid-stack>.grid-stack-item[gs-x="5"]{left:41.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="5"]{min-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="5"]{max-width:41.6666666667%}.grid-stack>.grid-stack-item[gs-w="6"]{width:50%}.grid-stack>.grid-stack-item[gs-x="6"]{left:50%}.grid-stack>.grid-stack-item[gs-min-w="6"]{min-width:50%}.grid-stack>.grid-stack-item[gs-max-w="6"]{max-width:50%}.grid-stack>.grid-stack-item[gs-w="7"]{width:58.3333333333%}.grid-stack>.grid-stack-item[gs-x="7"]{left:58.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="7"]{min-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="7"]{max-width:58.3333333333%}.grid-stack>.grid-stack-item[gs-w="8"]{width:66.6666666667%}.grid-stack>.grid-stack-item[gs-x="8"]{left:66.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="8"]{min-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="8"]{max-width:66.6666666667%}.grid-stack>.grid-stack-item[gs-w="9"]{width:75%}.grid-stack>.grid-stack-item[gs-x="9"]{left:75%}.grid-stack>.grid-stack-item[gs-min-w="9"]{min-width:75%}.grid-stack>.grid-stack-item[gs-max-w="9"]{max-width:75%}.grid-stack>.grid-stack-item[gs-w="10"]{width:83.3333333333%}.grid-stack>.grid-stack-item[gs-x="10"]{left:83.3333333333%}.grid-stack>.grid-stack-item[gs-min-w="10"]{min-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-max-w="10"]{max-width:83.3333333333%}.grid-stack>.grid-stack-item[gs-w="11"]{width:91.6666666667%}.grid-stack>.grid-stack-item[gs-x="11"]{left:91.6666666667%}.grid-stack>.grid-stack-item[gs-min-w="11"]{min-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-max-w="11"]{max-width:91.6666666667%}.grid-stack>.grid-stack-item[gs-w="12"]{width:100%}.grid-stack>.grid-stack-item[gs-x="12"]{left:100%}.grid-stack>.grid-stack-item[gs-min-w="12"]{min-width:100%}.grid-stack>.grid-stack-item[gs-max-w="12"]{max-width:100%}.grid-stack.grid-stack-1>.grid-stack-item{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-w="1"]{width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-x="1"]{left:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-min-w="1"]{min-width:100%}.grid-stack.grid-stack-1>.grid-stack-item[gs-max-w="1"]{max-width:100%}.grid-stack.grid-stack-animate,.grid-stack.grid-stack-animate .grid-stack-item{-webkit-transition:left .3s,top .3s,height .3s,width .3s;-moz-transition:left .3s,top .3s,height .3s,width .3s;-ms-transition:left .3s,top .3s,height .3s,width .3s;-o-transition:left .3s,top .3s,height .3s,width .3s;transition:left .3s,top .3s,height .3s,width .3s}.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder,.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing{-webkit-transition:left 0s,top 0s,height 0s,width 0s;-moz-transition:left 0s,top 0s,height 0s,width 0s;-ms-transition:left 0s,top 0s,height 0s,width 0s;-o-transition:left 0s,top 0s,height 0s,width 0s;transition:left 0s,top 0s,height 0s,width 0s}.ui-draggable-dragging,.ui-resizable-resizing{z-index:100}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px rgba(0,0,0,0.2);opacity:.8}.ui-draggable-dragging{will-change:left,top;cursor:move}.ui-resizable-resizing{will-change:width,height}\n',""]);const c=d},466:(t,e,i)=>{i.d(e,{Z:()=>a});var n=i(81),s=i.n(n),r=i(645),o=i.n(r)()(s());o.push([t.id,'.chart-title{font-size:20px;font-weight:bold}.chart-error-message{font-size:15px;font-style:italic}.chart-path{fill:none;stroke-width:1.5}.chart-area{stroke-width:1.5}.listening-rect{stroke:grey;fill:white}.question-mark{cursor:pointer;opacity:0.2;transform:scale(0.05);-ms-transform:scale(0.05);-webkit-transform:scale(0.05)}.question-mark:hover{opacity:0.5}.grid-stack-item-content{overflow:hidden !important;box-shadow:0 1px 3px rgba(0,0,0,0.12),0 1px 2px rgba(0,0,0,0.24);transition:all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);background:#fff}.grid-stack-item-removing{opacity:0.5}.subgrid{margin-right:20px}.grid-stack>.grid-stack-item.grid-stack-sub-grid>.grid-stack-item-content{background:rgba(0,0,0,0.05)}.grid-stack.grid-stack-nested{background:none;position:absolute;inset:0}body{height:100%;margin:0;padding:0}.wrapper{display:flex;font-family:"Roboto"}.grid{width:100%;height:100%}.grid .grid-stack{min-height:500px}.sidebar-hidden{visibility:hidden;display:none}.sidebar{visibility:visible;display:flex;flex-direction:column;gap:10px;padding:10px}.dropzone-remove{border:3px dashed red;opacity:0.5;height:100px;display:flex;justify-content:center;align-items:center}.dropzone-remove:hover{opacity:1}.available-widgets{border:3px dashed grey;padding:10px;display:flex;flex-direction:column;gap:10px}\n',""]);const a=o},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,s,r){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(o[l]=!0)}for(var h=0;h<t.length;h++){var d=[].concat(t[h]);n&&o[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),e.push(d))}},e}},667:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},81:t=>{t.exports=function(t){return t[1]}},249:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDBaseImplement=void 0,e.DDBaseImplement=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(t,e){this._eventRegister[t]=e}off(t){delete this._eventRegister[t]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(t,e){if(!this.disabled&&this._eventRegister&&this._eventRegister[t])return this._eventRegister[t](e)}}},529:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDDraggable=void 0;const n=i(427),s=i(284),r=i(249),o=i(168);class a extends r.DDBaseImplement{constructor(t,e={}){super(),this.el=t,this.option=e;let i=e.handle.substring(1);this.dragEl=t.classList.contains(i)?t:t.querySelector(e.handle)||t,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this.enable()}on(t,e){super.on(t,e)}off(t){super.off(t)}enable(){!1!==this.disabled&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),o.isTouch&&(this.dragEl.addEventListener("touchstart",o.touchstart),this.dragEl.addEventListener("pointerdown",o.pointerdown)),this.el.classList.remove("ui-draggable-disabled"),this.el.classList.add("ui-draggable"))}disable(t=!1){!0!==this.disabled&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),o.isTouch&&(this.dragEl.removeEventListener("touchstart",o.touchstart),this.dragEl.removeEventListener("pointerdown",o.pointerdown)),this.el.classList.remove("ui-draggable"),t||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.dragging&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(t){return Object.keys(t).forEach((e=>this.option[e]=t[e])),this}_mouseDown(t){if(n.DDManager.mouseHandled)return;if(0!==t.button)return!0;const e=t.target.nodeName.toLowerCase();return["input","textarea","button","select","option"].find((t=>t===e))||t.target.closest('[contenteditable="true"]')||(this.mouseDownEvent=t,delete this.dragging,delete n.DDManager.dragElement,delete n.DDManager.dropElement,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),o.isTouch&&(this.dragEl.addEventListener("touchmove",o.touchmove),this.dragEl.addEventListener("touchend",o.touchend)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),n.DDManager.mouseHandled=!0),!0}_callDrag(t){if(!this.dragging)return;const e=s.Utils.initEvent(t,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(e,this.ui()),this.triggerEvent("drag",e)}_mouseMove(t){var e;let i=this.mouseDownEvent;if(this.dragging)if(this._dragFollow(t),n.DDManager.pauseDrag){const e=Number.isInteger(n.DDManager.pauseDrag)?n.DDManager.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout((()=>this._callDrag(t)),e)}else this._callDrag(t);else if(Math.abs(t.x-i.x)+Math.abs(t.y-i.y)>3){this.dragging=!0,n.DDManager.dragElement=this;let i=null===(e=this.el.gridstackNode)||void 0===e?void 0:e.grid;i?n.DDManager.dropElement=i.el.ddElement.ddDroppable:delete n.DDManager.dropElement,this.helper=this._createHelper(t),this._setupHelperContainmentStyle(),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment);const r=s.Utils.initEvent(t,{target:this.el,type:"dragstart"});this._setupHelperStyle(t),this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r)}return t.preventDefault(),!0}_mouseUp(t){var e;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),o.isTouch&&(this.dragEl.removeEventListener("touchmove",o.touchmove,!0),this.dragEl.removeEventListener("touchend",o.touchend,!0)),this.dragging){delete this.dragging,(null===(e=n.DDManager.dropElement)||void 0===e?void 0:e.el)===this.el.parentElement&&delete n.DDManager.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();const i=s.Utils.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),n.DDManager.dropElement&&n.DDManager.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete n.DDManager.dragElement,delete n.DDManager.dropElement,delete n.DDManager.mouseHandled,t.preventDefault()}_createHelper(t){let e=this.el;return"function"==typeof this.option.helper?e=this.option.helper(t):"clone"===this.option.helper&&(e=s.Utils.cloneNode(this.el)),document.body.contains(e)||s.Utils.appendTo(e,"parent"===this.option.appendTo?this.el.parentNode:this.option.appendTo),e===this.el&&(this.dragElementOriginStyle=a.originStyleProp.map((t=>this.el.style[t]))),e}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging");const e=this.helper.style;return e.pointerEvents="none",e["min-width"]=0,e.width=this.dragOffset.width+"px",e.height=this.dragOffset.height+"px",e.willChange="left, top",e.position="fixed",this._dragFollow(t),e.transition="none",setTimeout((()=>{this.helper&&(e.transition=null)}),0),this}_removeHelperStyle(){var t;this.helper.classList.remove("ui-draggable-dragging");let e=null===(t=this.helper)||void 0===t?void 0:t.gridstackNode;if(this.dragElementOriginStyle&&(!e||!e._isAboutToRemove)){let t=this.helper,e=this.dragElementOriginStyle.transition||null;t.style.transition=this.dragElementOriginStyle.transition="none",a.originStyleProp.forEach((e=>t.style[e]=this.dragElementOriginStyle[e]||null)),setTimeout((()=>t.style.transition=e),50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){const e=this.helper.style,i=this.dragOffset;e.left=t.clientX+i.offsetLeft-0+"px",e.top=t.clientY+i.offsetTop-0+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,"fixed"!==this.helper.style.position&&(this.parentOriginStylePosition=this.helperContainment.style.position,window.getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,e,i){let n=0,r=0;if(i){const t=document.createElement("div");s.Utils.addElStyles(t,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),i.appendChild(t);const e=t.getBoundingClientRect();i.removeChild(t),n=e.left,r=e.top}const o=e.getBoundingClientRect();return{left:o.left,top:o.top,offsetLeft:-t.clientX+o.left-n,offsetTop:-t.clientY+o.top-r,width:o.width,height:o.height}}ui(){const t=this.el.parentElement.getBoundingClientRect(),e=this.helper.getBoundingClientRect();return{position:{top:e.top-t.top,left:e.left-t.left}}}}e.DDDraggable=a,a.originStyleProp=["transition","pointerEvents","position","left","top"]},514:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDDroppable=void 0;const n=i(427),s=i(249),r=i(284),o=i(168);class a extends s.DDBaseImplement{constructor(t,e={}){super(),this.el=t,this.option=e,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(t,e){super.on(t,e)}off(t){super.off(t)}enable(){!1!==this.disabled&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),o.isTouch&&(this.el.addEventListener("pointerenter",o.pointerenter),this.el.addEventListener("pointerleave",o.pointerleave)))}disable(t=!1){!0!==this.disabled&&(super.disable(),this.el.classList.remove("ui-droppable"),t||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),o.isTouch&&(this.el.removeEventListener("pointerenter",o.pointerenter),this.el.removeEventListener("pointerleave",o.pointerleave)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(t){return Object.keys(t).forEach((e=>this.option[e]=t[e])),this._setupAccept(),this}_mouseEnter(t){if(!n.DDManager.dragElement)return;if(!this._canDrop(n.DDManager.dragElement.el))return;t.preventDefault(),t.stopPropagation(),n.DDManager.dropElement&&n.DDManager.dropElement!==this&&n.DDManager.dropElement._mouseLeave(t),n.DDManager.dropElement=this;const e=r.Utils.initEvent(t,{target:this.el,type:"dropover"});this.option.over&&this.option.over(e,this._ui(n.DDManager.dragElement)),this.triggerEvent("dropover",e),this.el.classList.add("ui-droppable-over")}_mouseLeave(t){var e;if(!n.DDManager.dragElement||n.DDManager.dropElement!==this)return;t.preventDefault(),t.stopPropagation();const i=r.Utils.initEvent(t,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(n.DDManager.dragElement)),this.triggerEvent("dropout",i),n.DDManager.dropElement===this){let i;delete n.DDManager.dropElement;let s=this.el.parentElement;for(;!i&&s;)i=null===(e=s.ddElement)||void 0===e?void 0:e.ddDroppable,s=s.parentElement;i&&i._mouseEnter(t)}}drop(t){t.preventDefault();const e=r.Utils.initEvent(t,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(e,this._ui(n.DDManager.dragElement)),this.triggerEvent("drop",e)}_canDrop(t){return t&&(!this.accept||this.accept(t))}_setupAccept(){return this.option.accept?("string"==typeof this.option.accept?this.accept=t=>t.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(t){return Object.assign({draggable:t.el},t.ui())}}e.DDDroppable=a},474:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDElement=void 0;const n=i(945),s=i(529),r=i(514);class o{constructor(t){this.el=t}static init(t){return t.ddElement||(t.ddElement=new o(t)),t.ddElement}on(t,e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(t)>-1?this.ddDraggable.on(t,e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(t)>-1?this.ddDroppable.on(t,e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(t)>-1&&this.ddResizable.on(t,e),this}off(t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(t)>-1?this.ddDraggable.off(t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(t)>-1?this.ddDroppable.off(t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(t)>-1&&this.ddResizable.off(t),this}setupDraggable(t){return this.ddDraggable?this.ddDraggable.updateOption(t):this.ddDraggable=new s.DDDraggable(this.el,t),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(t){return this.ddResizable?this.ddResizable.updateOption(t):this.ddResizable=new n.DDResizable(this.el,t),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(t){return this.ddDroppable?this.ddDroppable.updateOption(t):this.ddDroppable=new r.DDDroppable(this.el,t),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}e.DDElement=o},470:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDGridStack=void 0;const n=i(523),s=i(929),r=i(284),o=i(427),a=i(474);class l{static get(){return h}resizable(t,e,i,n){return this._getDDElements(t).forEach((t=>{if("disable"===e||"enable"===e)t.ddResizable&&t.ddResizable[e]();else if("destroy"===e)t.ddResizable&&t.cleanResizable();else if("option"===e)t.setupResizable({[i]:n});else{const i=t.el.gridstackNode.grid;let n=t.el.getAttribute("gs-resize-handles")?t.el.getAttribute("gs-resize-handles"):i.opts.resizable.handles,s=!i.opts.alwaysShowResizeHandle;t.setupResizable(Object.assign(Object.assign(Object.assign({},i.opts.resizable),{handles:n,autoHide:s}),{start:e.start,stop:e.stop,resize:e.resize}))}})),this}draggable(t,e,i,n){return this._getDDElements(t).forEach((t=>{if("disable"===e||"enable"===e)t.ddDraggable&&t.ddDraggable[e]();else if("destroy"===e)t.ddDraggable&&t.cleanDraggable();else if("option"===e)t.setupDraggable({[i]:n});else{const i=t.el.gridstackNode.grid;t.setupDraggable(Object.assign(Object.assign({},i.opts.draggable),{start:e.start,stop:e.stop,drag:e.drag}))}})),this}dragIn(t,e){return this._getDDElements(t).forEach((t=>t.setupDraggable(e))),this}droppable(t,e,i,n){return"function"!=typeof e.accept||e._accept||(e._accept=e.accept,e.accept=t=>e._accept(t)),this._getDDElements(t).forEach((t=>{"disable"===e||"enable"===e?t.ddDroppable&&t.ddDroppable[e]():"destroy"===e?t.ddDroppable&&t.cleanDroppable():"option"===e?t.setupDroppable({[i]:n}):t.setupDroppable(e)})),this}isDroppable(t){return!(!(t&&t.ddElement&&t.ddElement.ddDroppable)||t.ddElement.ddDroppable.disabled)}isDraggable(t){return!(!(t&&t.ddElement&&t.ddElement.ddDraggable)||t.ddElement.ddDraggable.disabled)}isResizable(t){return!(!(t&&t.ddElement&&t.ddElement.ddResizable)||t.ddElement.ddResizable.disabled)}on(t,e,i){return this._getDDElements(t).forEach((t=>t.on(e,(t=>{i(t,o.DDManager.dragElement?o.DDManager.dragElement.el:t.target,o.DDManager.dragElement?o.DDManager.dragElement.helper:null)})))),this}off(t,e){return this._getDDElements(t).forEach((t=>t.off(e))),this}_getDDElements(t,e=!0){let i=r.Utils.getElements(t);if(!i.length)return[];let n=i.map((t=>t.ddElement||(e?a.DDElement.init(t):null)));return e||n.filter((t=>t)),n}}e.DDGridStack=l;const h=new l;function d(t,e){let i=t?t.gridstackNode:void 0;i&&i.grid&&(e?i._isAboutToRemove=!0:delete i._isAboutToRemove,e?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}s.GridStack.prototype._setupAcceptWidget=function(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return h.droppable(this.el,"destroy"),this;let t,e,i=(i,n,s)=>{let o=n.gridstackNode;if(!o)return;s=s||n;let a=this.el.getBoundingClientRect(),{top:l,left:d}=s.getBoundingClientRect();d-=a.left,l-=a.top;let u={position:{top:l,left:d}};if(o._temporaryRemoved){if(o.x=Math.max(0,Math.round(d/e)),o.y=Math.max(0,Math.round(l/t)),delete o.autoPosition,this.engine.nodeBoundFix(o),!this.engine.willItFit(o)){if(o.autoPosition=!0,!this.engine.willItFit(o))return void h.off(n,"drag");o._willFitPos&&(r.Utils.copyPos(o,o._willFitPos),delete o._willFitPos)}this._onStartMoving(s,i,u,o,e,t)}else this._dragOrResize(s,i,u,o,e,t)};return h.droppable(this.el,{accept:t=>{let e=t.gridstackNode;if((null==e?void 0:e.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let i=!0;if("function"==typeof this.opts.acceptWidgets)i=this.opts.acceptWidgets(t);else{let e=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;i=t.matches(e)}if(i&&e&&this.opts.maxRow){let t={w:e.w,h:e.h,minW:e.minW,minH:e.minH};i=this.engine.willItFit(t)}return i}}).on(this.el,"dropover",((n,s,r)=>{let o=s.gridstackNode;if((null==o?void 0:o.grid)===this&&!o._temporaryRemoved)return!1;(null==o?void 0:o.grid)&&o.grid!==this&&!o._temporaryRemoved&&o.grid._leave(s,r),e=this.cellWidth(),t=this.getCellHeight(!0),o||(o=this._readAttr(s)),o.grid||(o._isExternal=!0,s.gridstackNode=o),r=r||s;let a=o.w||Math.round(r.offsetWidth/e)||1,l=o.h||Math.round(r.offsetHeight/t)||1;return o.grid&&o.grid!==this?(s._gridstackNodeOrig||(s._gridstackNodeOrig=o),s.gridstackNode=o=Object.assign(Object.assign({},o),{w:a,h:l,grid:this}),this.engine.cleanupNode(o).nodeBoundFix(o),o._initDD=o._isExternal=o._temporaryRemoved=!0):(o.w=a,o.h=l,o._temporaryRemoved=!0),d(o.el,!1),h.on(s,"drag",i),i(n,s,r),!1})).on(this.el,"dropout",((t,e,i)=>{let n=e.gridstackNode;return!!n&&(n.grid&&n.grid!==this||(this._leave(e,i),this._isTemp&&this.removeAsSubGrid(n)),!1)})).on(this.el,"drop",((t,e,i)=>{var n,s;let o=e.gridstackNode;if((null==o?void 0:o.grid)===this&&!o._isExternal)return!1;let a=!!this.placeholder.parentElement;this.placeholder.remove();let l=e._gridstackNodeOrig;if(delete e._gridstackNodeOrig,a&&(null==l?void 0:l.grid)&&l.grid!==this){let t=l.grid;t.engine.removedNodes.push(l),t._triggerRemoveEvent(),t.parentGridItem&&!t.engine.nodes.length&&t.opts.subGridDynamic&&t.removeAsSubGrid()}if(!o)return!1;if(a&&(this.engine.cleanupNode(o),o.grid=this),h.off(e,"drag"),i!==e?(i.remove(),e.gridstackNode=l,a&&(e=e.cloneNode(!0))):(e.remove(),this._removeDD(e)),!a)return!1;e.gridstackNode=o,o.el=e;let d=null===(s=null===(n=o.subGrid)||void 0===n?void 0:n.el)||void 0===s?void 0:s.gridstack;return r.Utils.copyPos(o,this._readAttr(this.placeholder)),r.Utils.removePositioningStyles(e),this._writeAttr(e,o),this.el.appendChild(e),d&&(d.parentGridItem=o,d.opts.styleInHead||d._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(o),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Object.assign(Object.assign({},t),{type:"dropped"}),l&&l.grid?l:void 0,o),window.setTimeout((()=>{o.el&&o.el.parentElement?this._prepareDragDropByNode(o):this.engine.removeNode(o),delete o.grid._isTemp})),!1})),this},s.GridStack.prototype._setupRemoveDrop=function(){if(!this.opts.staticGrid&&"string"==typeof this.opts.removable){let t=document.querySelector(this.opts.removable);if(!t)return this;h.isDroppable(t)||h.droppable(t,this.opts.removableOptions).on(t,"dropover",((t,e)=>d(e,!0))).on(t,"dropout",((t,e)=>d(e,!1)))}return this},s.GridStack.setupDragIn=function(t,e){void 0!==(null==e?void 0:e.pause)&&(o.DDManager.pauseDrag=e.pause),"string"==typeof t&&(e=Object.assign(Object.assign({},n.dragInDefaultOptions),e||{}),r.Utils.getElements(t).forEach((t=>{h.isDraggable(t)||h.dragIn(t,e)})))},s.GridStack.prototype._prepareDragDropByNode=function(t){let e=t.el;const i=t.noMove||this.opts.disableDrag,n=t.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&n)return t._initDD&&(this._removeDD(e),delete t._initDD),e.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!t._initDD){let i,n,s=(s,r)=>{this._gsEventHandler[s.type]&&this._gsEventHandler[s.type](s,s.target),i=this.cellWidth(),n=this.getCellHeight(!0),this._onStartMoving(e,s,r,t,i,n)},o=(s,r)=>{this._dragOrResize(e,s,r,t,i,n)},a=i=>{this.placeholder.remove(),delete t._moving,delete t._event,delete t._lastTried;let n=i.target;if(n.gridstackNode&&n.gridstackNode.grid===this){if(t.el=n,t._isAboutToRemove){let s=e.gridstackNode.grid;s._gsEventHandler[i.type]&&s._gsEventHandler[i.type](i,n),this._removeDD(e),s.engine.removedNodes.push(t),s._triggerRemoveEvent(),delete e.gridstackNode,delete t.el,e.remove()}else r.Utils.removePositioningStyles(n),t._temporaryRemoved?(r.Utils.copyPos(t,t._orig),this._writePosAttr(n,t),this.engine.addNode(t)):this._writePosAttr(n,t),this._gsEventHandler[i.type]&&this._gsEventHandler[i.type](i,n);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}};h.draggable(e,{start:s,stop:a,drag:o}).resizable(e,{start:s,stop:a,resize:o}),t._initDD=!0}return h.draggable(e,i?"disable":"enable").resizable(e,n?"disable":"enable"),this},s.GridStack.prototype._onStartMoving=function(t,e,i,n,s,r){this.engine.cleanNodes().beginUpdate(n),this._writePosAttr(this.placeholder,n),this.el.appendChild(this.placeholder),n.el=this.placeholder,n._lastUiPosition=i.position,n._prevYPix=i.position.top,n._moving="dragstart"===e.type,delete n._lastTried,"dropover"===e.type&&n._temporaryRemoved&&(this.engine.addNode(n),n._moving=!0),this.engine.cacheRects(s,r,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),"resizestart"===e.type&&(h.resizable(t,"option","minWidth",s*(n.minW||1)).resizable(t,"option","minHeight",r*(n.minH||1)),n.maxW&&h.resizable(t,"option","maxWidth",s*n.maxW),n.maxH&&h.resizable(t,"option","maxHeight",r*n.maxH))},s.GridStack.prototype._leave=function(t,e){let i=t.gridstackNode;i&&(h.off(t,"drag"),i._temporaryRemoved||(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&e?e:t,!0===this.opts.removable&&d(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):i._isExternal&&(delete i.el,delete t.gridstackNode,this.engine.restoreInitial())))},s.GridStack.prototype._dragOrResize=function(t,e,i,n,s,o){let a,l=Object.assign({},n._orig),h=this.opts.marginLeft,d=this.opts.marginRight,u=this.opts.marginTop,c=this.opts.marginBottom,g=Math.round(.1*o),p=Math.round(.1*s);if(h=Math.min(h,p),d=Math.min(d,p),u=Math.min(u,g),c=Math.min(c,g),"drag"===e.type){if(n._temporaryRemoved)return;let e=i.position.top-n._prevYPix;n._prevYPix=i.position.top,r.Utils.updateScrollPosition(t,i.position,e);let a=i.position.left+(i.position.left>n._lastUiPosition.left?-d:h),g=i.position.top+(i.position.top>n._lastUiPosition.top?-c:u);l.x=Math.round(a/s),l.y=Math.round(g/o);let p=this._extraDragRow;if(this.engine.collide(n,l)){let t=this.getRow(),e=Math.max(0,l.y+n.h-t);this.opts.maxRow&&t+e>this.opts.maxRow&&(e=Math.max(0,this.opts.maxRow-t)),this._extraDragRow=e}else this._extraDragRow=0;if(this._extraDragRow!==p&&this._updateContainerHeight(),n.x===l.x&&n.y===l.y)return}else if("resize"===e.type){if(l.x<0)return;if(r.Utils.updateScrollResize(e,t,o),l.w=Math.round((i.size.width-h)/s),l.h=Math.round((i.size.height-u)/o),n.w===l.w&&n.h===l.h)return;if(n._lastTried&&n._lastTried.w===l.w&&n._lastTried.h===l.h)return;let d=i.position.left+h,c=i.position.top+u;l.x=Math.round(d/s),l.y=Math.round(c/o),a=!0}n._event=e,n._lastTried=l;let m={x:i.position.left+h,y:i.position.top+u,w:(i.size?i.size.width:n.w*s)-h-d,h:(i.size?i.size.height:n.h*o)-u-c};if(this.engine.moveNodeCheck(n,Object.assign(Object.assign({},l),{cellWidth:s,cellHeight:o,rect:m,resizing:a}))){n._lastUiPosition=i.position,this.engine.cacheRects(s,o,u,d,c,h),delete n._skipDown,a&&n.subGrid&&n.subGrid.onParentResize(),this._extraDragRow=0,this._updateContainerHeight();let t=e.target;this._writePosAttr(t,n),this._gsEventHandler[e.type]&&this._gsEventHandler[e.type](e,t)}},s.GridStack.prototype.movable=function(t,e){return this.opts.staticGrid||s.GridStack.getElements(t).forEach((t=>{let i=t.gridstackNode;i&&(e?delete i.noMove:i.noMove=!0,this._prepareDragDropByNode(i))})),this},s.GridStack.prototype.resizable=function(t,e){return this.opts.staticGrid||s.GridStack.getElements(t).forEach((t=>{let i=t.gridstackNode;i&&(e?delete i.noResize:i.noResize=!0,this._prepareDragDropByNode(i))})),this},s.GridStack.prototype.disable=function(){if(!this.opts.staticGrid)return this.enableMove(!1),this.enableResize(!1),this._triggerEvent("disable"),this},s.GridStack.prototype.enable=function(){if(!this.opts.staticGrid)return this.enableMove(!0),this.enableResize(!0),this._triggerEvent("enable"),this},s.GridStack.prototype.enableMove=function(t){return this.opts.staticGrid||(this.opts.disableDrag=!t,this.engine.nodes.forEach((e=>this.movable(e.el,t)))),this},s.GridStack.prototype.enableResize=function(t){return this.opts.staticGrid||(this.opts.disableResize=!t,this.engine.nodes.forEach((e=>this.resizable(e.el,t)))),this},s.GridStack.prototype._removeDD=function(t){return h.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}},427:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDManager=void 0,e.DDManager=class{}},952:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDResizableHandle=void 0;const n=i(168);class s{constructor(t,e,i){this.moving=!1,this.host=t,this.dir=e,this.option=i,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._init()}_init(){const t=document.createElement("div");return t.classList.add("ui-resizable-handle"),t.classList.add(`${s.prefix}${this.dir}`),t.style.zIndex="100",t.style.userSelect="none",this.el=t,this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),n.isTouch&&(this.el.addEventListener("touchstart",n.touchstart),this.el.addEventListener("pointerdown",n.pointerdown)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),n.isTouch&&(this.el.removeEventListener("touchstart",n.touchstart),this.el.removeEventListener("pointerdown",n.pointerdown)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(t){this.mouseDownEvent=t,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),n.isTouch&&(this.el.addEventListener("touchmove",n.touchmove),this.el.addEventListener("touchend",n.touchend)),t.stopPropagation(),t.preventDefault()}_mouseMove(t){let e=this.mouseDownEvent;this.moving?this._triggerEvent("move",t):Math.abs(t.x-e.x)+Math.abs(t.y-e.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",t)),t.stopPropagation(),t.preventDefault()}_mouseUp(t){this.moving&&this._triggerEvent("stop",t),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),n.isTouch&&(this.el.removeEventListener("touchmove",n.touchmove),this.el.removeEventListener("touchend",n.touchend)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_triggerEvent(t,e){return this.option[t]&&this.option[t](e),this}}e.DDResizableHandle=s,s.prefix="ui-resizable-"},945:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DDResizable=void 0;const n=i(952),s=i(249),r=i(284),o=i(427);class a extends s.DDBaseImplement{constructor(t,e={}){super(),this._ui=()=>{const t=this.el.parentElement.getBoundingClientRect(),e={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},i=this.temporalRect||e;return{position:{left:i.left-t.left,top:i.top-t.top},size:{width:i.width,height:i.height}}},this.el=t,this.option=e,this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(t,e){super.on(t,e)}off(t){super.off(t)}enable(){super.enable(),this.el.classList.add("ui-resizable"),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this.el.classList.remove("ui-resizable"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),this.el.classList.remove("ui-resizable"),delete this.el,super.destroy()}updateOption(t){let e=t.handles&&t.handles!==this.option.handles,i=t.autoHide&&t.autoHide!==this.option.autoHide;return Object.keys(t).forEach((e=>this.option[e]=t[e])),e&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(t){return t?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),o.DDManager.overResizeElement===this&&delete o.DDManager.overResizeElement),this}_mouseOver(t){o.DDManager.overResizeElement||o.DDManager.dragElement||(o.DDManager.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){o.DDManager.overResizeElement===this&&(delete o.DDManager.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){let t=this.option.handles||"e,s,se";return"all"===t&&(t="n,e,s,w,se,sw,ne,nw"),this.handlers=t.split(",").map((t=>t.trim())).map((t=>new n.DDResizableHandle(this.el,t,{start:t=>{this._resizeStart(t)},stop:t=>{this._resizeStop(t)},move:e=>{this._resizing(e,t)}}))),this}_resizeStart(t){this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=r.Utils.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();const e=r.Utils.initEvent(t,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(e,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",e),this}_resizing(t,e){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(t,e),this._applyChange();const i=r.Utils.initEvent(t,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(t){const e=r.Utils.initEvent(t,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(e),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",e),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){return this.elOriginStyleVal=a._originStyleProp.map((t=>this.el.style[t])),this.parentOriginStylePosition=this.el.parentElement.style.position,window.getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return a._originStyleProp.forEach(((t,e)=>{this.el.style[t]=this.elOriginStyleVal[e]||null})),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(t,e){const i=this.startEvent,n={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},s=t.clientX-i.clientX,r=t.clientY-i.clientY;e.indexOf("e")>-1?n.width+=s:e.indexOf("w")>-1&&(n.width-=s,n.left+=s),e.indexOf("s")>-1?n.height+=r:e.indexOf("n")>-1&&(n.height-=r,n.top+=r);const o=this._constrainSize(n.width,n.height);return Math.round(n.width)!==Math.round(o.width)&&(e.indexOf("w")>-1&&(n.left+=n.width-o.width),n.width=o.width),Math.round(n.height)!==Math.round(o.height)&&(e.indexOf("n")>-1&&(n.top+=n.height-o.height),n.height=o.height),n}_constrainSize(t,e){const i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,n=this.option.minWidth||t,s=this.option.maxHeight||Number.MAX_SAFE_INTEGER,r=this.option.minHeight||e;return{width:Math.min(i,Math.max(n,t)),height:Math.min(s,Math.max(r,e))}}_applyChange(){let t={left:0,top:0,width:0,height:0};if("absolute"===this.el.style.position){const e=this.el.parentElement,{left:i,top:n}=e.getBoundingClientRect();t={left:i,top:n,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach((e=>{const i=this.temporalRect[e];this.el.style[e]=i-t[e]+"px"})),this):this}_removeHandlers(){return this.handlers.forEach((t=>t.destroy())),delete this.handlers,this}}e.DDResizable=a,a._originStyleProp=["width","height","position","left","top","opacity","zIndex"]},168:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pointerleave=e.pointerenter=e.pointerdown=e.touchend=e.touchmove=e.touchstart=e.isTouch=void 0;const n=i(427);e.isTouch="undefined"!=typeof window&&"undefined"!=typeof document&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class s{}function r(t,e){if(t.touches.length>1)return;t.cancelable&&t.preventDefault();const i=t.changedTouches[0],n=document.createEvent("MouseEvents");n.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(n)}function o(t,e){t.cancelable&&t.preventDefault();const i=document.createEvent("MouseEvents");i.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(i)}e.touchstart=function(t){s.touchHandled||(s.touchHandled=!0,r(t,"mousedown"))},e.touchmove=function(t){s.touchHandled&&r(t,"mousemove")},e.touchend=function(t){if(!s.touchHandled)return;s.pointerLeaveTimeout&&(window.clearTimeout(s.pointerLeaveTimeout),delete s.pointerLeaveTimeout);const e=!!n.DDManager.dragElement;r(t,"mouseup"),e||r(t,"click"),s.touchHandled=!1},e.pointerdown=function(t){t.target.releasePointerCapture(t.pointerId)},e.pointerenter=function(t){n.DDManager.dragElement&&o(t,"mouseenter")},e.pointerleave=function(t){n.DDManager.dragElement&&(s.pointerLeaveTimeout=window.setTimeout((()=>{delete s.pointerLeaveTimeout,o(t,"mouseleave")}),10))}},935:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GridStackEngine=void 0;const n=i(284);class s{constructor(t={}){this.addedNodes=[],this.removedNodes=[],this.column=t.column||12,this.maxRow=t.maxRow,this._float=t.float,this.nodes=t.nodes||[],this.onChange=t.onChange}batchUpdate(t=!0){return!!this.batchMode===t||(this.batchMode=t,t?(this._prevFloat=this._float,this._float=!0,this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,this._packNodes()._notify())),this}_useEntireRowArea(t,e){return!this.float&&!this._hasLocked&&(!t._moving||t._skipDown||e.y<=t.y)}_fixCollisions(t,e=t,i,s={}){if(this.sortNodes(-1),!(i=i||this.collide(t,e)))return!1;if(t._moving&&!s.nested&&!this.float&&this.swap(t,i))return!0;let r=e;this._useEntireRowArea(t,e)&&(r={x:0,w:this.column,y:e.y,h:e.h},i=this.collide(t,r,s.skip));let o=!1,a={nested:!0,pack:!1};for(;i=i||this.collide(t,r,s.skip);){let r;if(i.locked||t._moving&&!t._skipDown&&e.y>t.y&&!this.float&&(!this.collide(i,Object.assign(Object.assign({},i),{y:t.y}),t)||!this.collide(i,Object.assign(Object.assign({},i),{y:e.y-i.h}),t))?(t._skipDown=t._skipDown||e.y>t.y,r=this.moveNode(t,Object.assign(Object.assign(Object.assign({},e),{y:i.y+i.h}),a)),i.locked&&r?n.Utils.copyPos(e,t):!i.locked&&r&&s.pack&&(this._packNodes(),e.y=i.y+i.h,n.Utils.copyPos(t,e)),o=o||r):r=this.moveNode(i,Object.assign(Object.assign(Object.assign({},i),{y:e.y+e.h,skip:t}),a)),!r)return o;i=void 0}return o}collide(t,e=t,i){return this.nodes.find((s=>s!==t&&s!==i&&n.Utils.isIntercepted(s,e)))}collideAll(t,e=t,i){return this.nodes.filter((s=>s!==t&&s!==i&&n.Utils.isIntercepted(s,e)))}directionCollideCoverage(t,e,i){if(!e.rect||!t._rect)return;let n,s=t._rect,r=Object.assign({},e.rect);return r.y>s.y?(r.h+=r.y-s.y,r.y=s.y):r.h+=s.y-r.y,r.x>s.x?(r.w+=r.x-s.x,r.x=s.x):r.w+=s.x-r.x,i.forEach((t=>{if(t.locked||!t._rect)return;let e=t._rect,i=Number.MAX_VALUE,o=Number.MAX_VALUE,a=.5;s.y<e.y?i=(r.y+r.h-e.y)/e.h:s.y+s.h>e.y+e.h&&(i=(e.y+e.h-r.y)/e.h),s.x<e.x?o=(r.x+r.w-e.x)/e.w:s.x+s.w>e.x+e.w&&(o=(e.x+e.w-r.x)/e.w);let l=Math.min(o,i);l>a&&(a=l,n=t)})),e.collide=n,n}cacheRects(t,e,i,n,s,r){return this.nodes.forEach((o=>o._rect={y:o.y*e+i,x:o.x*t+r,w:o.w*t-r-n,h:o.h*e-i-s})),this}swap(t,e){if(!e||e.locked||!t||t.locked)return!1;function i(){let i=e.x,n=e.y;return e.x=t.x,e.y=t.y,t.h!=e.h?(t.x=i,t.y=e.y+e.h):t.w!=e.w?(t.x=e.x+e.w,t.y=n):(t.x=i,t.y=n),t._dirty=e._dirty=!0,!0}let s;if(t.w===e.w&&t.h===e.h&&(t.x===e.x||t.y===e.y)&&(s=n.Utils.isTouching(t,e)))return i();if(!1!==s){if(t.w===e.w&&t.x===e.x&&(s||(s=n.Utils.isTouching(t,e)))){if(e.y<t.y){let i=t;t=e,e=i}return i()}if(!1!==s){if(t.h===e.h&&t.y===e.y&&(s||(s=n.Utils.isTouching(t,e)))){if(e.x<t.x){let i=t;t=e,e=i}return i()}return!1}}}isAreaEmpty(t,e,i,n){let s={x:t||0,y:e||0,w:i||1,h:n||1};return!this.collide(s)}compact(){if(0===this.nodes.length)return this;this.batchUpdate().sortNodes();let t=this.nodes;return this.nodes=[],t.forEach((t=>{t.locked||(t.autoPosition=!0),this.addNode(t,!1),t._dirty=!0})),this.batchUpdate(!1)}set float(t){this._float!==t&&(this._float=t||!1,t||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(t){return this.nodes=n.Utils.sort(this.nodes,t,this.column),this}_packNodes(){return this.batchMode||(this.sortNodes(),this.float?this.nodes.forEach((t=>{if(t._updating||void 0===t._orig||t.y===t._orig.y)return;let e=t.y;for(;e>t._orig.y;)--e,this.collide(t,{x:t.x,y:e,w:t.w,h:t.h})||(t._dirty=!0,t.y=e)})):this.nodes.forEach(((t,e)=>{if(!t.locked)for(;t.y>0;){let i=0===e?0:t.y-1;if(0!==e&&this.collide(t,{x:t.x,y:i,w:t.w,h:t.h}))break;t._dirty=t.y!==i,t.y=i}}))),this}prepareNode(t,e){(t=t||{})._id=t._id||s._idSeq++,void 0!==t.x&&void 0!==t.y&&null!==t.x&&null!==t.y||(t.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return n.Utils.defaults(t,i),t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,"string"==typeof t.x&&(t.x=Number(t.x)),"string"==typeof t.y&&(t.y=Number(t.y)),"string"==typeof t.w&&(t.w=Number(t.w)),"string"==typeof t.h&&(t.h=Number(t.h)),isNaN(t.x)&&(t.x=i.x,t.autoPosition=!0),isNaN(t.y)&&(t.y=i.y,t.autoPosition=!0),isNaN(t.w)&&(t.w=i.w),isNaN(t.h)&&(t.h=i.h),this.nodeBoundFix(t,e)}nodeBoundFix(t,e){let i=t._orig||n.Utils.copyPos({},t);if(t.maxW&&(t.w=Math.min(t.w,t.maxW)),t.maxH&&(t.h=Math.min(t.h,t.maxH)),t.minW&&t.minW<=this.column&&(t.w=Math.max(t.w,t.minW)),t.minH&&(t.h=Math.max(t.h,t.minH)),(1===this.column||t.x+t.w>this.column)&&this.column<12&&!this._inColumnResize&&!t.autoPosition&&t._id&&-1===this.findCacheLayout(t,12)){let e=Object.assign({},t);e.x=Math.min(11,e.x),e.w=Math.min(12,e.w),this.cacheOneLayout(e,12)}return t.w>this.column?t.w=this.column:t.w<1&&(t.w=1),this.maxRow&&t.h>this.maxRow?t.h=this.maxRow:t.h<1&&(t.h=1),t.x<0&&(t.x=0),t.y<0&&(t.y=0),t.x+t.w>this.column&&(e?t.w=this.column-t.x:t.x=this.column-t.w),this.maxRow&&t.y+t.h>this.maxRow&&(e?t.h=this.maxRow-t.y:t.y=this.maxRow-t.h),n.Utils.samePos(t,i)||(t._dirty=!0),t}getDirtyNodes(t){return t?this.nodes.filter((t=>t._dirty&&!n.Utils.samePos(t,t._orig))):this.nodes.filter((t=>t._dirty))}_notify(t){if(this.batchMode||!this.onChange)return this;let e=(t||[]).concat(this.getDirtyNodes());return this.onChange(e),this}cleanNodes(){return this.batchMode||this.nodes.forEach((t=>{delete t._dirty,delete t._lastTried})),this}saveInitial(){return this.nodes.forEach((t=>{t._orig=n.Utils.copyPos({},t),delete t._dirty})),this._hasLocked=this.nodes.some((t=>t.locked)),this}restoreInitial(){return this.nodes.forEach((t=>{n.Utils.samePos(t,t._orig)||(n.Utils.copyPos(t,t._orig),t._dirty=!0)})),this._notify(),this}findEmptyPosition(t){this.sortNodes();let e=!1;for(let i=0;!e;++i){let s=i%this.column,r=Math.floor(i/this.column);if(s+t.w>this.column)continue;let o={x:s,y:r,w:t.w,h:t.h};this.nodes.find((t=>n.Utils.isIntercepted(o,t)))||(t.x=s,t.y=r,e=!0)}return e}addNode(t,e=!1){return this.nodes.find((e=>e._id===t._id))||(delete(t=this._inColumnResize?this.nodeBoundFix(t):this.prepareNode(t))._temporaryRemoved,delete t._removeDOM,t.autoPosition&&this.findEmptyPosition(t)&&delete t.autoPosition,this.nodes.push(t),e&&this.addedNodes.push(t),this._fixCollisions(t),this.batchMode||this._packNodes()._notify(),t)}removeNode(t,e=!0,i=!1){return this.nodes.find((e=>e===t))?(i&&this.removedNodes.push(t),e&&(t._removeDOM=!0),this.nodes=this.nodes.filter((e=>e!==t)),this._packNodes()._notify([t])):this}removeAll(t=!0){return delete this._layouts,0===this.nodes.length?this:(t&&this.nodes.forEach((t=>t._removeDOM=!0)),this.removedNodes=this.nodes,this.nodes=[],this._notify(this.removedNodes))}moveNodeCheck(t,e){if(!this.changedPosConstrain(t,e))return!1;if(e.pack=!0,!this.maxRow)return this.moveNode(t,e);let i,r=new s({column:this.column,float:this.float,nodes:this.nodes.map((e=>e===t?(i=Object.assign({},e),i):Object.assign({},e)))});if(!i)return!1;let o=r.moveNode(i,e)&&r.getRow()<=this.maxRow;if(!o&&!e.resizing&&e.collide){let i=e.collide.el.gridstackNode;if(this.swap(t,i))return this._notify(),!0}return!!o&&(r.nodes.filter((t=>t._dirty)).forEach((t=>{let e=this.nodes.find((e=>e._id===t._id));e&&(n.Utils.copyPos(e,t),e._dirty=!0)})),this._notify(),!0)}willItFit(t){if(delete t._willFitPos,!this.maxRow)return!0;let e=new s({column:this.column,float:this.float,nodes:this.nodes.map((t=>Object.assign({},t)))}),i=Object.assign({},t);return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,e.addNode(i),e.getRow()<=this.maxRow&&(t._willFitPos=n.Utils.copyPos({},i),!0)}changedPosConstrain(t,e){return e.w=e.w||t.w,e.h=e.h||t.h,t.x!==e.x||t.y!==e.y||(t.maxW&&(e.w=Math.min(e.w,t.maxW)),t.maxH&&(e.h=Math.min(e.h,t.maxH)),t.minW&&(e.w=Math.max(e.w,t.minW)),t.minH&&(e.h=Math.max(e.h,t.minH)),t.w!==e.w||t.h!==e.h)}moveNode(t,e){var i,s;if(!t||!e)return!1;let r;void 0===e.pack&&(r=e.pack=!0),"number"!=typeof e.x&&(e.x=t.x),"number"!=typeof e.y&&(e.y=t.y),"number"!=typeof e.w&&(e.w=t.w),"number"!=typeof e.h&&(e.h=t.h);let o=t.w!==e.w||t.h!==e.h,a=n.Utils.copyPos({},t,!0);if(n.Utils.copyPos(a,e),a=this.nodeBoundFix(a,o),n.Utils.copyPos(e,a),n.Utils.samePos(t,e))return!1;let l=n.Utils.copyPos({},t),h=this.collideAll(t,a,e.skip),d=!0;if(h.length){let o=t._moving&&!e.nested,l=o?this.directionCollideCoverage(t,e,h):h[0];if(o&&l&&(null===(s=null===(i=t.grid)||void 0===i?void 0:i.opts)||void 0===s?void 0:s.subGridDynamic)&&!t.grid._isTemp){let i=n.Utils.areaIntercept(e.rect,l._rect),s=n.Utils.area(e.rect),r=n.Utils.area(l._rect);i/(s<r?s:r)>.8&&(l.grid.makeSubGrid(l.el,void 0,t),l=void 0)}l?d=!this._fixCollisions(t,a,l,e):(d=!1,r&&delete e.pack)}return d&&(t._dirty=!0,n.Utils.copyPos(t,a)),e.pack&&this._packNodes()._notify(),!n.Utils.samePos(t,l)}getRow(){return this.nodes.reduce(((t,e)=>Math.max(t,e.y+e.h)),0)}beginUpdate(t){return t._updating||(t._updating=!0,delete t._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let t=this.nodes.find((t=>t._updating));return t&&(delete t._updating,delete t._skipDown),this}save(t=!0){var e;let i=null===(e=this._layouts)||void 0===e?void 0:e.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach((e=>{let i=null==s?void 0:s.find((t=>t._id===e._id)),o=Object.assign({},e);i&&(o.x=i.x,o.y=i.y,o.w=i.w),n.Utils.removeInternalForSave(o,!t),r.push(o)})),r}layoutsNodesChange(t){return!this._layouts||this._inColumnResize||this._layouts.forEach(((e,i)=>{if(!e||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{let n=i/this.column;t.forEach((t=>{if(!t._orig)return;let i=e.find((e=>e._id===t._id));i&&(t.y!==t._orig.y&&(i.y+=t.y-t._orig.y),t.x!==t._orig.x&&(i.x=Math.round(t.x*n)),t.w!==t._orig.w&&(i.w=Math.round(t.w*n)))}))}})),this}updateNodeWidths(t,e,i,s="moveScale"){var r;if(!this.nodes.length||!e||t===e)return this;this.cacheLayout(this.nodes,t),this.batchUpdate();let o=[],a=!1;if(1===e&&(null==i?void 0:i.length)){a=!0;let t=0;i.forEach((e=>{e.x=0,e.w=1,e.y=Math.max(e.y,t),t=e.y+e.h})),o=i,i=[]}else i=n.Utils.sort(this.nodes,-1,t);let l=[];if(e>t){l=this._layouts[e]||[];let n=this._layouts.length-1;!l.length&&t!==n&&(null===(r=this._layouts[n])||void 0===r?void 0:r.length)&&(t=n,this._layouts[n].forEach((t=>{let e=i.find((e=>e._id===t._id));e&&(e.x=t.x,e.y=t.y,e.w=t.w)})))}if(l.forEach((t=>{let e=i.findIndex((e=>e._id===t._id));-1!==e&&(i[e].x=t.x,i[e].y=t.y,i[e].w=t.w,o.push(i[e]),i.splice(e,1))})),i.length)if("function"==typeof s)s(e,t,o,i);else if(!a){let n=e/t,r="move"===s||"moveScale"===s,a="scale"===s||"moveScale"===s;i.forEach((i=>{i.x=1===e?0:r?Math.round(i.x*n):Math.min(i.x,e-1),i.w=1===e||1===t?1:a?Math.round(i.w*n)||1:Math.min(i.w,e),o.push(i)})),i=[]}return a||(o=n.Utils.sort(o,-1,e)),this._inColumnResize=!0,this.nodes=[],o.forEach((t=>{this.addNode(t,!1),delete t._orig})),this.batchUpdate(!1),delete this._inColumnResize,this}cacheLayout(t,e,i=!1){let n=[];return t.forEach(((t,e)=>{t._id=t._id||s._idSeq++,n[e]={x:t.x,y:t.y,w:t.w,_id:t._id}})),this._layouts=i?[]:this._layouts||[],this._layouts[e]=n,this}cacheOneLayout(t,e){t._id=t._id||s._idSeq++;let i={x:t.x,y:t.y,w:t.w,_id:t._id};this._layouts=this._layouts||[],this._layouts[e]=this._layouts[e]||[];let n=this.findCacheLayout(t,e);return-1===n?this._layouts[e].push(i):this._layouts[e][n]=i,this}findCacheLayout(t,e){var i,n,s;return null!==(s=null===(n=null===(i=this._layouts)||void 0===i?void 0:i[e])||void 0===n?void 0:n.findIndex((e=>e._id===t._id)))&&void 0!==s?s:-1}cleanupNode(t){for(let e in t)"_"===e[0]&&"_id"!==e&&delete t[e];return this}}e.GridStackEngine=s,s._idSeq=1},929:function(t,e,i){var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),s=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),e.GridStack=void 0;const r=i(935),o=i(284),a=i(523);s(i(523),e),s(i(284),e),s(i(935),e);class l{constructor(t,e={}){var i,n;this._gsEventHandler={},this._extraDragRow=0,this.el=t,(e=e||{}).row&&(e.minRow=e.maxRow=e.row,delete e.row);let s=o.Utils.toNumber(t.getAttribute("gs-row"));"auto"===e.column&&delete e.column;let u=e;void 0!==u.minWidth&&(e.oneColumnSize=e.oneColumnSize||u.minWidth,delete u.minWidth),void 0!==e.alwaysShowResizeHandle&&(e._alwaysShowResizeHandle=e.alwaysShowResizeHandle);let c=Object.assign(Object.assign({},o.Utils.cloneDeep(a.gridDefaults)),{column:o.Utils.toNumber(t.getAttribute("gs-column"))||a.gridDefaults.column,minRow:s||o.Utils.toNumber(t.getAttribute("gs-min-row"))||a.gridDefaults.minRow,maxRow:s||o.Utils.toNumber(t.getAttribute("gs-max-row"))||a.gridDefaults.maxRow,staticGrid:o.Utils.toBool(t.getAttribute("gs-static"))||a.gridDefaults.staticGrid,draggable:{handle:(e.handleClass?"."+e.handleClass:e.handle?e.handle:"")||a.gridDefaults.draggable.handle},removableOptions:{accept:e.itemClass?"."+e.itemClass:a.gridDefaults.removableOptions.accept}});t.getAttribute("gs-animate")&&(c.animate=o.Utils.toBool(t.getAttribute("gs-animate"))),this.opts=o.Utils.defaults(e,c),e=null,this._initMargin(),1!==this.opts.column&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),"auto"===this.opts.rtl&&(this.opts.rtl="rtl"===t.style.direction),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");let g=null===(i=o.Utils.closestUpByClass(this.el,a.gridDefaults.itemClass))||void 0===i?void 0:i.gridstackNode;g&&(g.subGrid=this,this.parentGridItem=g,this.el.classList.add("grid-stack-nested"),g.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight="auto"===this.opts.cellHeight,this._isAutoCellHeight||"initial"===this.opts.cellHeight?this.cellHeight(void 0,!1):("number"==typeof this.opts.cellHeight&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==a.gridDefaults.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),"mobile"===this.opts.alwaysShowResizeHandle&&(this.opts.alwaysShowResizeHandle=h.isTouch),this._styleSheetClass="grid-stack-instance-"+r.GridStackEngine._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let p=this.opts.engineClass||l.engineClass||r.GridStackEngine;if(this.engine=new p({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:t=>{let e=0;this.engine.nodes.forEach((t=>{e=Math.max(e,t.y+t.h)})),t.forEach((t=>{let e=t.el;e&&(t._removeDOM?(e&&e.remove(),delete t._removeDOM):this._writePosAttr(e,t))})),this._updateStyles(!1,e)}}),this.opts.auto){this.batchUpdate();let t=[],e=this.getColumn();1===e&&this._prevColumn&&(e=this._prevColumn),this.getGridItems().forEach((i=>{let n=parseInt(i.getAttribute("gs-x")),s=parseInt(i.getAttribute("gs-y"));t.push({el:i,i:(Number.isNaN(n)?1e3:n)+(Number.isNaN(s)?1e3:s)*e})})),t.sort(((t,e)=>e.i-t.i)).forEach((t=>this._prepareElement(t.el))),this.batchUpdate(!1)}this.setAnimation(this.opts.animate),this._updateStyles(),12!=this.opts.column&&this.el.classList.add("grid-stack-"+this.opts.column),this.opts.dragIn&&l.setupDragIn(this.opts.dragIn,this.opts.dragInOptions),delete this.opts.dragIn,delete this.opts.dragInOptions,this.opts.subGridDynamic&&!d.DDManager.pauseDrag&&(d.DDManager.pauseDrag=!0),void 0!==(null===(n=this.opts.draggable)||void 0===n?void 0:n.pause)&&(d.DDManager.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateWindowResizeEvent()}static init(t={},e=".grid-stack"){let i=l.getGridElement(e);return i?(i.gridstack||(i.gridstack=new l(i,o.Utils.cloneDeep(t))),i.gridstack):("string"==typeof e?console.error('GridStack.initAll() no grid was found with selector "'+e+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'):console.error("GridStack.init() no grid element was passed."),null)}static initAll(t={},e=".grid-stack"){let i=[];return l.getGridElements(e).forEach((e=>{e.gridstack||(e.gridstack=new l(e,o.Utils.cloneDeep(t)),delete t.dragIn,delete t.dragInOptions),i.push(e.gridstack)})),0===i.length&&console.error('GridStack.initAll() no grid was found with selector "'+e+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'),i}static addGrid(t,e={}){if(!t)return null;let i=t;if(!t.classList.contains("grid-stack")){let n=document.implementation.createHTMLDocument("");n.body.innerHTML=`<div class="grid-stack ${e.class||""}"></div>`,i=n.body.children[0],t.appendChild(i)}let n=l.init(e,i);if(n.opts.children){let t=n.opts.children;delete n.opts.children,n.load(t)}return n}static registerEngine(t){l.engineClass=t}get placeholder(){if(!this._placeholder){let t=document.createElement("div");t.className="placeholder-content",this.opts.placeholderText&&(t.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,a.gridDefaults.itemClass,this.opts.itemClass),this.placeholder.appendChild(t)}return this._placeholder}addWidget(t,e){let i;if("string"==typeof t){let e=document.implementation.createHTMLDocument("");e.body.innerHTML=t,i=e.body.children[0]}else if(0===arguments.length||1===arguments.length&&(void 0!==(n=t).x||void 0!==n.y||void 0!==n.w||void 0!==n.h||void 0!==n.content)){let n=t&&t.content||"";e=t;let s=document.implementation.createHTMLDocument("");s.body.innerHTML=`<div class="grid-stack-item ${this.opts.itemClass||""}"><div class="grid-stack-item-content">${n}</div></div>`,i=s.body.children[0]}else i=t;var n;let s=this._readAttr(i);e=o.Utils.cloneDeep(e)||{},o.Utils.defaults(e,s);let r=this.engine.prepareNode(e);return this._writeAttr(i,e),this._insertNotAppend?this.el.prepend(i):this.el.appendChild(i),this._prepareElement(i,!0,e),this._updateContainerHeight(),r.subGrid&&this.makeSubGrid(r.el,void 0,void 0,!1),this._prevColumn&&1===this.opts.column&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,i}makeSubGrid(t,e,i,n=!0){var s;let r,a=t.gridstackNode;if(a||(a=this.makeWidget(t).gridstackNode),null===(s=a.subGrid)||void 0===s?void 0:s.el)return a.subGrid;(e=o.Utils.cloneDeep(e||a.subGrid||Object.assign(Object.assign({},this.opts.subGrid),{children:void 0}))).subGrid=o.Utils.cloneDeep(e),a.subGrid=e,"auto"===e.column&&(r=!0,e.column=Math.max(a.w||1,(null==i?void 0:i.w)||1),e.disableOneColumnMode=!0);let h,d,u=a.el.querySelector(".grid-stack-item-content");if(n){this._removeDD(a.el);let t=document.implementation.createHTMLDocument("");t.body.innerHTML='<div class="grid-stack-item"></div>',h=t.body.children[0],h.appendChild(u),d=Object.assign(Object.assign({},a),{x:0,y:0}),o.Utils.removeInternalForSave(d),delete d.subGrid,a.content&&(d.content=a.content,delete a.content),t.body.innerHTML='<div class="grid-stack-item-content"></div>',u=t.body.children[0],a.el.appendChild(u),this._prepareDragDropByNode(a)}if(i){let t=r?e.column:a.w,n=a.h+i.h,s=a.el.style;s.transition="none",this.update(a.el,{w:t,h:n}),setTimeout((()=>s.transition=null))}let c=a.subGrid=l.addGrid(u,e);return(null==i?void 0:i._moving)&&(c._isTemp=!0),r&&(c._autoColumn=!0),n&&c.addWidget(h,d),i&&(i._moving?window.setTimeout((()=>o.Utils.simulateMouseEvent(i._event,"mouseenter",c.el)),0):c.addWidget(a.el,a)),c}removeAsSubGrid(t){var e;let i=null===(e=this.parentGridItem)||void 0===e?void 0:e.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach((t=>{t.x+=this.parentGridItem.x,t.y+=this.parentGridItem.y,i.addWidget(t.el,t)})),i.batchUpdate(!1),delete this.parentGridItem,t&&window.setTimeout((()=>o.Utils.simulateMouseEvent(t._event,"mouseenter",i.el)),0))}save(t=!0,e=!1){let i=this.engine.save(t);if(i.forEach((e=>{if(t&&e.el&&!e.subGrid){let t=e.el.querySelector(".grid-stack-item-content");e.content=t?t.innerHTML:void 0,e.content||delete e.content}else t||delete e.content,e.subGrid&&(e.subGrid=e.subGrid.save(t,!0));delete e.el})),e){let t=o.Utils.cloneDeep(this.opts);t.marginBottom===t.marginTop&&t.marginRight===t.marginLeft&&t.marginTop===t.marginRight&&(t.margin=t.marginTop,delete t.marginTop,delete t.marginRight,delete t.marginBottom,delete t.marginLeft),t.rtl===("rtl"===this.el.style.direction)&&(t.rtl="auto"),this._isAutoCellHeight&&(t.cellHeight="auto"),this._autoColumn&&(t.column="auto",delete t.disableOneColumnMode);const e=t._alwaysShowResizeHandle;return delete t._alwaysShowResizeHandle,void 0!==e?t.alwaysShowResizeHandle=e:delete t.alwaysShowResizeHandle,o.Utils.removeInternalAndSame(t,a.gridDefaults),t.children=i,t}return i}load(t,e=!0){let i=l.Utils.sort([...t],-1,this._prevColumn||this.getColumn());this._insertNotAppend=!0,this._prevColumn&&this._prevColumn!==this.opts.column&&i.some((t=>t.x+t.w>this.opts.column))&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(i,this._prevColumn,!0));let n=[];return this.batchUpdate(),e&&[...this.engine.nodes].forEach((t=>{i.find((e=>t.id===e.id))||("function"==typeof e?e(this,t,!1):(n.push(t),this.removeWidget(t.el,!0,!1)))})),i.forEach((t=>{let i=t.id||0===t.id?this.engine.nodes.find((e=>e.id===t.id)):void 0;if(i){if(this.update(i.el,t),t.subGrid&&t.subGrid.children){let e=i.el.querySelector(".grid-stack");e&&e.gridstack&&(e.gridstack.load(t.subGrid.children),this._insertNotAppend=!0)}}else e&&(t="function"==typeof e?e(this,t,!0).gridstackNode:this.addWidget(t).gridstackNode)})),this.engine.removedNodes=n,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight&&(!t||!this.opts.cellHeightUnit||"px"===this.opts.cellHeightUnit))return this.opts.cellHeight;let e=this.el.querySelector("."+this.opts.itemClass);if(e){let t=o.Utils.toNumber(e.getAttribute("gs-h"));return Math.round(e.offsetHeight/t)}let i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(t,e=!0){if(e&&void 0!==t&&this._isAutoCellHeight!==("auto"===t)&&(this._isAutoCellHeight="auto"===t,this._updateWindowResizeEvent()),"initial"!==t&&"auto"!==t||(t=void 0),void 0===t){let e=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+e}let i=o.Utils.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h||(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,e&&this._updateStyles(!0)),this}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(){return this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}compact(){return this.engine.compact(),this._triggerChangeEvent(),this}column(t,e="moveScale"){if(t<1||this.opts.column===t)return this;let i,n=this.getColumn();return 1===t?this._prevColumn=n:delete this._prevColumn,this.el.classList.remove("grid-stack-"+n),this.el.classList.add("grid-stack-"+t),this.opts.column=this.engine.column=t,1===t&&this.opts.oneColumnModeDomSort&&(i=[],this.getGridItems().forEach((t=>{t.gridstackNode&&i.push(t.gridstackNode)})),i.length||(i=void 0)),this.engine.updateNodeWidths(n,t,i,e),this._isAutoCellHeight&&this.cellHeight(),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter((t=>t.matches("."+this.opts.itemClass)&&!t.matches("."+this.opts.placeholderClass)))}destroy(t=!0){if(this.el)return this._updateWindowResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),t?this.el.parentNode.removeChild(this.el):(this.removeAll(t),this.el.classList.remove(this._styleSheetClass)),this._removeStylesheet(),this.el.removeAttribute("gs-current-row"),delete this.parentGridItem,delete this.opts,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(t){return this.opts.float!==t&&(this.opts.float=this.engine.float=t,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(t,e=!1){let i,n=this.el.getBoundingClientRect();i=e?{top:n.top+document.documentElement.scrollTop,left:n.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};let s=t.left-i.left,r=t.top-i.top,o=n.width/this.getColumn(),a=n.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(s/o),y:Math.floor(r/a)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(t,e,i,n){return this.engine.isAreaEmpty(t,e,i,n)}makeWidget(t){let e=l.getElement(t);return this._prepareElement(e,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),e}on(t,e){if(-1!==t.indexOf(" "))return t.split(" ").forEach((t=>this.on(t,e))),this;if("change"===t||"added"===t||"removed"===t||"enable"===t||"disable"===t){let i="enable"===t||"disable"===t;this._gsEventHandler[t]=i?t=>e(t):t=>e(t,t.detail),this.el.addEventListener(t,this._gsEventHandler[t])}else"drag"===t||"dragstart"===t||"dragstop"===t||"resizestart"===t||"resize"===t||"resizestop"===t||"dropped"===t?this._gsEventHandler[t]=e:console.log("GridStack.on("+t+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.');return this}off(t){return-1!==t.indexOf(" ")?(t.split(" ").forEach((t=>this.off(t))),this):("change"!==t&&"added"!==t&&"removed"!==t&&"enable"!==t&&"disable"!==t||this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}removeWidget(t,e=!0,i=!0){return l.getElements(t).forEach((t=>{if(t.parentElement&&t.parentElement!==this.el)return;let n=t.gridstackNode;n||(n=this.engine.nodes.find((e=>t===e.el))),n&&(delete t.gridstackNode,this._removeDD(t),this.engine.removeNode(n,e,i),e&&t.parentElement&&t.remove())})),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(t=!0){return this.engine.nodes.forEach((t=>{delete t.el.gridstackNode,this._removeDD(t.el)})),this.engine.removeAll(t),this._triggerRemoveEvent(),this}setAnimation(t){return t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}setStatic(t,e=!0){return this.opts.staticGrid===t||(this.opts.staticGrid=t,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach((t=>this._prepareDragDropByNode(t))),e&&this._setStaticClass()),this}update(t,e){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");let i=arguments,n=1;return e={x:i[n++],y:i[n++],w:i[n++],h:i[n++]},this.update(t,e)}return l.getElements(t).forEach((t=>{if(!t||!t.gridstackNode)return;let i=t.gridstackNode,n=o.Utils.cloneDeep(e);delete n.autoPosition;let s,r=["x","y","w","h"];if(r.some((t=>void 0!==n[t]&&n[t]!==i[t]))&&(s={},r.forEach((t=>{s[t]=void 0!==n[t]?n[t]:i[t],delete n[t]}))),!s&&(n.minW||n.minH||n.maxW||n.maxH)&&(s={}),n.content){let e=t.querySelector(".grid-stack-item-content");e&&e.innerHTML!==n.content&&(e.innerHTML=n.content),delete n.content}let a=!1,l=!1;for(const t in n)"_"!==t[0]&&i[t]!==n[t]&&(i[t]=n[t],a=!0,l=l||!this.opts.staticGrid&&("noResize"===t||"noMove"===t||"locked"===t));s&&(this.engine.cleanNodes().beginUpdate(i).moveNode(i,s),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()),a&&this._writeAttr(t,i),l&&this._prepareDragDropByNode(i)})),this}margin(t){if(!("string"==typeof t&&t.split(" ").length>1)){let e=o.Utils.parseHeight(t);if(this.opts.marginUnit===e.unit&&this.opts.margin===e.h)return}return this.opts.margin=t,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(t){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");let t=arguments,e=0,i={x:t[e++],y:t[e++],w:t[e++],h:t[e++],autoPosition:t[e++]};return this.willItFit(i)}return this.engine.willItFit(t)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let t=this.engine.getDirtyNodes(!0);return t&&t.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(t),this._triggerEvent("change",t)),this.engine.saveInitial(),this}_triggerAddEvent(){return this.engine.batchMode||this.engine.addedNodes&&this.engine.addedNodes.length>0&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach((t=>{delete t._dirty})),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this}_triggerRemoveEvent(){return this.engine.batchMode||this.engine.removedNodes&&this.engine.removedNodes.length>0&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this}_triggerEvent(t,e){let i=e?new CustomEvent(t,{bubbles:!1,detail:e}):new Event(t);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(o.Utils.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(t=!1,e){if(t&&this._removeStylesheet(),e||(e=this.getRow()),this._updateContainerHeight(),0===this.opts.cellHeight)return this;let i=this.opts.cellHeight,n=this.opts.cellHeightUnit,s=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let t=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=o.Utils.createStylesheet(this._styleSheetClass,t),!this._styles)return this;this._styles._max=0,o.Utils.addCSSRule(this._styles,s,`min-height: ${i}${n}`);let e=this.opts.marginTop+this.opts.marginUnit,r=this.opts.marginBottom+this.opts.marginUnit,a=this.opts.marginRight+this.opts.marginUnit,l=this.opts.marginLeft+this.opts.marginUnit,h=`${s} > .grid-stack-item-content`,d=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;o.Utils.addCSSRule(this._styles,h,`top: ${e}; right: ${a}; bottom: ${r}; left: ${l};`),o.Utils.addCSSRule(this._styles,d,`top: ${e}; right: ${a}; bottom: ${r}; left: ${l};`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-ne`,`right: ${a}`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-e`,`right: ${a}`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-se`,`right: ${a}; bottom: ${r}`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-nw`,`left: ${l}`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-w`,`left: ${l}`),o.Utils.addCSSRule(this._styles,`${s} > .ui-resizable-sw`,`left: ${l}; bottom: ${r}`)}if((e=e||this._styles._max)>this._styles._max){let t=t=>i*t+n;for(let i=this._styles._max+1;i<=e;i++){let e=t(i);o.Utils.addCSSRule(this._styles,`${s}[gs-y="${i-1}"]`,`top: ${t(i-1)}`),o.Utils.addCSSRule(this._styles,`${s}[gs-h="${i}"]`,`height: ${e}`),o.Utils.addCSSRule(this._styles,`${s}[gs-min-h="${i}"]`,`min-height: ${e}`),o.Utils.addCSSRule(this._styles,`${s}[gs-max-h="${i}"]`,`max-height: ${e}`)}this._styles._max=e}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.getRow()+this._extraDragRow;if(this.el.setAttribute("gs-current-row",String(t)),0===t)return this.el.style.removeProperty("min-height"),this;let e=this.opts.cellHeight,i=this.opts.cellHeightUnit;return e?(this.el.style.minHeight=t*e+i,this):this}_prepareElement(t,e=!1,i){i||(t.classList.add(this.opts.itemClass),i=this._readAttr(t)),t.gridstackNode=i,i.el=t,i.grid=this;let n=Object.assign({},i);return i=this.engine.addNode(i,e),o.Utils.same(i,n)||this._writeAttr(t,i),this._prepareDragDropByNode(i),this}_writePosAttr(t,e){return void 0!==e.x&&null!==e.x&&t.setAttribute("gs-x",String(e.x)),void 0!==e.y&&null!==e.y&&t.setAttribute("gs-y",String(e.y)),e.w&&t.setAttribute("gs-w",String(e.w)),e.h&&t.setAttribute("gs-h",String(e.h)),this}_writeAttr(t,e){if(!e)return this;this._writePosAttr(t,e);let i={autoPosition:"gs-auto-position",minW:"gs-min-w",minH:"gs-min-h",maxW:"gs-max-w",maxH:"gs-max-h",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",resizeHandles:"gs-resize-handles"};for(const n in i)e[n]?t.setAttribute(i[n],String(e[n])):t.removeAttribute(i[n]);return this}_readAttr(t){let e={};e.x=o.Utils.toNumber(t.getAttribute("gs-x")),e.y=o.Utils.toNumber(t.getAttribute("gs-y")),e.w=o.Utils.toNumber(t.getAttribute("gs-w")),e.h=o.Utils.toNumber(t.getAttribute("gs-h")),e.maxW=o.Utils.toNumber(t.getAttribute("gs-max-w")),e.minW=o.Utils.toNumber(t.getAttribute("gs-min-w")),e.maxH=o.Utils.toNumber(t.getAttribute("gs-max-h")),e.minH=o.Utils.toNumber(t.getAttribute("gs-min-h")),e.autoPosition=o.Utils.toBool(t.getAttribute("gs-auto-position")),e.noResize=o.Utils.toBool(t.getAttribute("gs-no-resize")),e.noMove=o.Utils.toBool(t.getAttribute("gs-no-move")),e.locked=o.Utils.toBool(t.getAttribute("gs-locked")),e.resizeHandles=t.getAttribute("gs-resize-handles"),e.id=t.getAttribute("gs-id");for(const t in e){if(!e.hasOwnProperty(t))return;e[t]||0===e[t]||delete e[t]}return e}_setStaticClass(){let t=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...t),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...t),this.el.removeAttribute("gs-static")),this}onParentResize(){if(!this.el||!this.el.clientWidth)return;let t=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(t=!0,this.column(this.parentGridItem.w,"none"));else{let e=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize;1===this.opts.column!==e&&(t=!0,this.opts.animate&&this.setAnimation(!1),this.column(e?1:this._prevColumn),this.opts.animate&&this.setAnimation(!0))}return this._isAutoCellHeight&&(!t&&this.opts.cellHeightThrottle?(this._cellHeightThrottle||(this._cellHeightThrottle=o.Utils.throttle((()=>this.cellHeight()),this.opts.cellHeightThrottle)),this._cellHeightThrottle()):this.cellHeight()),this.engine.nodes.forEach((t=>{t.subGrid&&t.subGrid.onParentResize()})),this}_updateWindowResizeEvent(t=!1){const e=(this._isAutoCellHeight||!this.opts.disableOneColumnMode)&&!this.parentGridItem;return t||!e||this._windowResizeBind?!t&&e||!this._windowResizeBind||(window.removeEventListener("resize",this._windowResizeBind),delete this._windowResizeBind):(this._windowResizeBind=this.onParentResize.bind(this),window.addEventListener("resize",this._windowResizeBind)),this}static getElement(t=".grid-stack-item"){return o.Utils.getElement(t)}static getElements(t=".grid-stack-item"){return o.Utils.getElements(t)}static getGridElement(t){return l.getElement(t)}static getGridElements(t){return o.Utils.getElements(t)}_initMargin(){let t,e=0,i=[];return"string"==typeof this.opts.margin&&(i=this.opts.margin.split(" ")),2===i.length?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):4===i.length?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(t=o.Utils.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,e=this.opts.margin=t.h),void 0===this.opts.marginTop?this.opts.marginTop=e:(t=o.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=t.h,delete this.opts.margin),void 0===this.opts.marginBottom?this.opts.marginBottom=e:(t=o.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=t.h,delete this.opts.margin),void 0===this.opts.marginRight?this.opts.marginRight=e:(t=o.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=t.h,delete this.opts.margin),void 0===this.opts.marginLeft?this.opts.marginLeft=e:(t=o.Utils.parseHeight(this.opts.marginLeft),this.opts.marginLeft=t.h,delete this.opts.margin),this.opts.marginUnit=t.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static setupDragIn(t,e){}movable(t,e){return this}resizable(t,e){return this}disable(){return this}enable(){return this}enableMove(t){return this}enableResize(t){return this}_removeDD(t){return this}_setupAcceptWidget(){return this}_setupRemoveDrop(){return this}_prepareDragDropByNode(t){return this}_onStartMoving(t,e,i,n,s,r){}_dragOrResize(t,e,i,n,s,r){}_leave(t,e){}commit(){return o.obsolete(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}e.GridStack=l,l.Utils=o.Utils,l.Engine=r.GridStackEngine,l.GDRev="7.1.1";const h=i(168),d=i(427);s(i(470),e)},523:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dragInDefaultOptions=e.gridDefaults=void 0,e.gridDefaults={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body"},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,oneColumnSize:768,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:".grid-stack-item"},resizable:{handles:"se"},rtl:"auto"},e.dragInDefaultOptions={handle:".grid-stack-item-content",appendTo:"body"}},284:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.obsoleteAttr=e.obsoleteOptsDel=e.obsoleteOpts=e.obsolete=void 0,e.obsolete=function(t,e,i,n,s){let r=(...r)=>(console.warn("gridstack.js: Function `"+i+"` is deprecated in "+s+" and has been replaced with `"+n+"`. It will be **removed** in a future release"),e.apply(t,r));return r.prototype=e.prototype,r},e.obsoleteOpts=function(t,e,i,n){void 0!==t[e]&&(t[i]=t[e],console.warn("gridstack.js: Option `"+e+"` is deprecated in "+n+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))},e.obsoleteOptsDel=function(t,e,i,n){void 0!==t[e]&&console.warn("gridstack.js: Option `"+e+"` is deprecated in "+i+n)},e.obsoleteAttr=function(t,e,i,n){let s=t.getAttribute(e);null!==s&&(t.setAttribute(i,s),console.warn("gridstack.js: attribute `"+e+"`="+s+" is deprecated on this object in "+n+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))};class i{static getElements(t){if("string"==typeof t){let e=document.querySelectorAll(t);return e.length||"."===t[0]||"#"===t[0]||(e=document.querySelectorAll("."+t),e.length||(e=document.querySelectorAll("#"+t))),Array.from(e)}return[t]}static getElement(t){if("string"==typeof t){if(!t.length)return null;if("#"===t[0])return document.getElementById(t.substring(1));if("."===t[0]||"["===t[0])return document.querySelector(t);if(!isNaN(+t[0]))return document.getElementById(t);let e=document.querySelector(t);return e||(e=document.getElementById(t)),e||(e=document.querySelector("."+t)),e}return t}static isIntercepted(t,e){return!(t.y>=e.y+e.h||t.y+t.h<=e.y||t.x+t.w<=e.x||t.x>=e.x+e.w)}static isTouching(t,e){return i.isIntercepted(t,{x:e.x-.5,y:e.y-.5,w:e.w+1,h:e.h+1})}static areaIntercept(t,e){let i=t.x>e.x?t.x:e.x,n=t.x+t.w<e.x+e.w?t.x+t.w:e.x+e.w;if(n<=i)return 0;let s=t.y>e.y?t.y:e.y,r=t.y+t.h<e.y+e.h?t.y+t.h:e.y+e.h;return r<=s?0:(n-i)*(r-s)}static area(t){return t.w*t.h}static sort(t,e,i){return i=i||t.reduce(((t,e)=>Math.max(e.x+e.w,t)),0)||12,-1===e?t.sort(((t,e)=>e.x+e.y*i-(t.x+t.y*i))):t.sort(((t,e)=>t.x+t.y*i-(e.x+e.y*i)))}static createStylesheet(t,e){let i=document.createElement("style");return i.setAttribute("type","text/css"),i.setAttribute("gs-style-id",t),i.styleSheet?i.styleSheet.cssText="":i.appendChild(document.createTextNode("")),e?e.insertBefore(i,e.firstChild):(e=document.getElementsByTagName("head")[0]).appendChild(i),i.sheet}static removeStylesheet(t){let e=document.querySelector("STYLE[gs-style-id="+t+"]");e&&e.parentNode&&e.remove()}static addCSSRule(t,e,i){"function"==typeof t.addRule?t.addRule(e,i):"function"==typeof t.insertRule&&t.insertRule(`${e}{${i}}`)}static toBool(t){return"boolean"==typeof t?t:"string"==typeof t?!(""===(t=t.toLowerCase())||"no"===t||"false"===t||"0"===t):Boolean(t)}static toNumber(t){return null===t||0===t.length?void 0:Number(t)}static parseHeight(t){let e,i="px";if("string"==typeof t){let n=t.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!n)throw new Error("Invalid height");i=n[2]||"px",e=parseFloat(n[1])}else e=t;return{h:e,unit:i}}static defaults(t,...e){return e.forEach((e=>{for(const i in e){if(!e.hasOwnProperty(i))return;null===t[i]||void 0===t[i]?t[i]=e[i]:"object"==typeof e[i]&&"object"==typeof t[i]&&this.defaults(t[i],e[i])}})),t}static same(t,e){if("object"!=typeof t)return t==e;if(typeof t!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(t[i]!==e[i])return!1;return!0}static copyPos(t,e,i=!1){return t.x=e.x,t.y=e.y,t.w=e.w,t.h=e.h,i&&(e.minW&&(t.minW=e.minW),e.minH&&(t.minH=e.minH),e.maxW&&(t.maxW=e.maxW),e.maxH&&(t.maxH=e.maxH)),t}static samePos(t,e){return t&&e&&t.x===e.x&&t.y===e.y&&t.w===e.w&&t.h===e.h}static removeInternalAndSame(t,e){if("object"==typeof t&&"object"==typeof e)for(let i in t){let n=t[i];if("_"===i[0]||n===e[i])delete t[i];else if(n&&"object"==typeof n&&void 0!==e[i]){for(let t in n)n[t]!==e[i][t]&&"_"!==t[0]||delete n[t];Object.keys(n).length||delete t[i]}}}static removeInternalForSave(t,e=!0){for(let e in t)"_"!==e[0]&&null!==t[e]&&void 0!==t[e]||delete t[e];delete t.grid,e&&delete t.el,t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,t.locked||delete t.locked,1!==t.w&&t.w!==t.minW||delete t.w,1!==t.h&&t.h!==t.minH||delete t.h}static closestUpByClass(t,e){for(;t;){if(t.classList.contains(e))return t;t=t.parentElement}return null}static throttle(t,e){let i=!1;return(...n)=>{i||(i=!0,setTimeout((()=>{t(...n),i=!1}),e))}}static removePositioningStyles(t){let e=t.style;e.position&&e.removeProperty("position"),e.left&&e.removeProperty("left"),e.top&&e.removeProperty("top"),e.width&&e.removeProperty("width"),e.height&&e.removeProperty("height")}static getScrollElement(t){if(!t)return document.scrollingElement||document.documentElement;const e=getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowY)?t:this.getScrollElement(t.parentElement)}static updateScrollPosition(t,e,i){let n=t.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight;if(n.top<0||n.bottom>s){let r=n.bottom-s,o=n.top,a=this.getScrollElement(t);if(null!==a){let l=a.scrollTop;n.top<0&&i<0?t.offsetHeight>s?a.scrollTop+=i:a.scrollTop+=Math.abs(o)>Math.abs(i)?i:o:i>0&&(t.offsetHeight>s?a.scrollTop+=i:a.scrollTop+=r>i?i:r),e.top+=a.scrollTop-l}}}static updateScrollResize(t,e,i){const n=this.getScrollElement(e),s=n.clientHeight,r=n===this.getScrollElement()?0:n.getBoundingClientRect().top,o=t.clientY-r,a=o>s-i;o<i?n.scrollBy({behavior:"smooth",top:o-i}):a&&n.scrollBy({behavior:"smooth",top:i-(s-o)})}static clone(t){return null==t||"object"!=typeof t?t:t instanceof Array?[...t]:Object.assign({},t)}static cloneDeep(t){const e=["parentGrid","el","grid","subGrid","engine"],n=i.clone(t);for(const s in n)n.hasOwnProperty(s)&&"object"==typeof n[s]&&"__"!==s.substring(0,2)&&!e.find((t=>t===s))&&(n[s]=i.cloneDeep(t[s]));return n}static cloneNode(t){const e=t.cloneNode(!0);return e.removeAttribute("id"),e}static appendTo(t,e){let i;i="string"==typeof e?document.querySelector(e):e,i&&i.appendChild(t)}static addElStyles(t,e){if(e instanceof Object)for(const i in e)e.hasOwnProperty(i)&&(Array.isArray(e[i])?e[i].forEach((e=>{t.style[i]=e})):t.style[i]=e[i])}static initEvent(t,e){const i={type:e.type},n={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:e.target?e.target:t.target};return t.dataTransfer&&(i.dataTransfer=t.dataTransfer),["altKey","ctrlKey","metaKey","shiftKey"].forEach((e=>i[e]=t[e])),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach((e=>i[e]=t[e])),Object.assign(Object.assign({},i),n)}static simulateMouseEvent(t,e,i){const n=document.createEvent("MouseEvents");n.initMouseEvent(e,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,t.target),(i||t.target).dispatchEvent(n)}}e.Utils=i},379:t=>{var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var r={},o=[],a=0;a<t.length;a++){var l=t[a],h=n.base?l[0]+n.base:l[0],d=r[h]||0,u="".concat(h," ").concat(d);r[h]=d+1;var c=i(u),g={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==c)e[c].references++,e[c].updater(g);else{var p=s(g,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:p,references:1})}o.push(u)}return o}function s(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,s){var r=n(t=t||[],s=s||{});return function(t){t=t||[];for(var o=0;o<r.length;o++){var a=i(r[o]);e[a].references--}for(var l=n(t,s),h=0;h<r.length;h++){var d=i(r[h]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}r=l}}},569:t=>{var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},216:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,i)=>{t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,s&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var r=i.sourceMap;r&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},810:t=>{t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K"}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}i.m=t,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.b=document.baseURI||self.location.href,i.nc=void 0,(()=>{var t=i(379),e=i.n(t),n=i(795),s=i.n(n),r=i(569),o=i.n(r),a=i(565),l=i.n(a),h=i(216),d=i.n(h),u=i(589),c=i.n(u),g=i(466),p={};p.styleTagTransform=c(),p.setAttributes=l(),p.insert=o().bind(null,"head"),p.domAPI=s(),p.insertStyleElement=d(),e()(g.Z,p),g.Z&&g.Z.locals&&g.Z.locals;var m=i(744),f={};function v(){}function y(t){return null==t?v:function(){return this.querySelector(t)}}function _(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function b(t){return null==t?w:function(){return this.querySelectorAll(t)}}function x(t){return function(){return this.matches(t)}}function k(t){return function(e){return e.matches(t)}}f.styleTagTransform=c(),f.setAttributes=l(),f.insert=o().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=d(),e()(m.Z,f),m.Z&&m.Z.locals&&m.Z.locals,i(929);var E=Array.prototype.find;function D(){return this.firstElementChild}var M=Array.prototype.filter;function N(){return Array.from(this.children)}function z(t){return new Array(t.length)}function C(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function S(t){return function(){return t}}function R(t,e,i,n,s,r){for(var o,a=0,l=e.length,h=r.length;a<h;++a)(o=e[a])?(o.__data__=r[a],n[a]=o):i[a]=new C(t,r[a]);for(;a<l;++a)(o=e[a])&&(s[a]=o)}function L(t,e,i,n,s,r,o){var a,l,h,d=new Map,u=e.length,c=r.length,g=new Array(u);for(a=0;a<u;++a)(l=e[a])&&(g[a]=h=o.call(l,l.__data__,a,e)+"",d.has(h)?s[a]=l:d.set(h,l));for(a=0;a<c;++a)h=o.call(t,r[a],a,r)+"",(l=d.get(h))?(n[a]=l,l.__data__=r[a],d.delete(h)):i[a]=new C(t,r[a]);for(a=0;a<u;++a)(l=e[a])&&d.get(g[a])===l&&(s[a]=l)}function A(t){return t.__data__}function H(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function O(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}C.prototype={constructor:C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var T="http://www.w3.org/1999/xhtml";const U={svg:"http://www.w3.org/2000/svg",xhtml:T,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function P(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),U.hasOwnProperty(e)?{space:U[e],local:t}:t}function I(t){return function(){this.removeAttribute(t)}}function j(t){return function(){this.removeAttributeNS(t.space,t.local)}}function G(t,e){return function(){this.setAttribute(t,e)}}function $(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function B(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function W(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function Y(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function F(t){return function(){this.style.removeProperty(t)}}function q(t,e,i){return function(){this.style.setProperty(t,e,i)}}function X(t,e,i){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,i)}}function Z(t,e){return t.style.getPropertyValue(e)||Y(t).getComputedStyle(t,null).getPropertyValue(e)}function Q(t){return function(){delete this[t]}}function K(t,e){return function(){this[t]=e}}function V(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function J(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=J(t.getAttribute("class")||"")}function it(t,e){for(var i=tt(t),n=-1,s=e.length;++n<s;)i.add(e[n])}function nt(t,e){for(var i=tt(t),n=-1,s=e.length;++n<s;)i.remove(e[n])}function st(t){return function(){it(this,t)}}function rt(t){return function(){nt(this,t)}}function ot(t,e){return function(){(e.apply(this,arguments)?it:nt)(this,t)}}function at(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function dt(){this.innerHTML=""}function ut(t){return function(){this.innerHTML=t}}function ct(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function pt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===T&&e.documentElement.namespaceURI===T?e.createElement(t):e.createElementNS(i,t)}}function ft(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vt(t){var e=P(t);return(e.local?ft:mt)(e)}function yt(){return null}function _t(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}}))}function kt(t){return function(){var e=this.__on;if(e){for(var i,n=0,s=-1,r=e.length;n<r;++n)i=e[n],t.type&&i.type!==t.type||i.name!==t.name?e[++s]=i:this.removeEventListener(i.type,i.listener,i.options);++s?e.length=s:delete this.__on}}}function Et(t,e,i){return function(){var n,s=this.__on,r=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(s)for(var o=0,a=s.length;o<a;++o)if((n=s[o]).type===t.type&&n.name===t.name)return this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=i),void(n.value=e);this.addEventListener(t.type,r,i),n={type:t.type,name:t.name,value:e,listener:r,options:i},s?s.push(n):this.__on=[n]}}function Dt(t,e,i){var n=Y(t),s=n.CustomEvent;"function"==typeof s?s=new s(e,i):(s=n.document.createEvent("Event"),i?(s.initEvent(e,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function Mt(t,e){return function(){return Dt(this,t,e)}}function Nt(t,e){return function(){return Dt(this,t,e.apply(this,arguments))}}et.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var zt=[null];function Ct(t,e){this._groups=t,this._parents=e}function St(){return new Ct([[document.documentElement]],zt)}Ct.prototype=St.prototype={constructor:Ct,select:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,i=e.length,n=new Array(i),s=0;s<i;++s)for(var r,o,a=e[s],l=a.length,h=n[s]=new Array(l),d=0;d<l;++d)(r=a[d])&&(o=t.call(r,r.__data__,d,a))&&("__data__"in r&&(o.__data__=r.__data__),h[d]=o);return new Ct(n,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return _(t.apply(this,arguments))}}(t):b(t);for(var e=this._groups,i=e.length,n=[],s=[],r=0;r<i;++r)for(var o,a=e[r],l=a.length,h=0;h<l;++h)(o=a[h])&&(n.push(t.call(o,o.__data__,h,a)),s.push(o));return new Ct(n,s)},selectChild:function(t){return this.select(null==t?D:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:k(t)))},selectChildren:function(t){return this.selectAll(null==t?N:function(t){return function(){return M.call(this.children,t)}}("function"==typeof t?t:k(t)))},filter:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,i=e.length,n=new Array(i),s=0;s<i;++s)for(var r,o=e[s],a=o.length,l=n[s]=[],h=0;h<a;++h)(r=o[h])&&t.call(r,r.__data__,h,o)&&l.push(r);return new Ct(n,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,A);var i=e?L:R,n=this._parents,s=this._groups;"function"!=typeof t&&(t=S(t));for(var r=s.length,o=new Array(r),a=new Array(r),l=new Array(r),h=0;h<r;++h){var d=n[h],u=s[h],c=u.length,g=H(t.call(d,d&&d.__data__,h,n)),p=g.length,m=a[h]=new Array(p),f=o[h]=new Array(p),v=l[h]=new Array(c);i(d,u,m,f,v,g,e);for(var y,_,w=0,b=0;w<p;++w)if(y=m[w]){for(w>=b&&(b=w+1);!(_=f[b])&&++b<p;);y._next=_||null}}return(o=new Ct(o,n))._enter=a,o._exit=l,o},enter:function(){return new Ct(this._enter||this._groups.map(z),this._parents)},exit:function(){return new Ct(this._exit||this._groups.map(z),this._parents)},join:function(t,e,i){var n=this.enter(),s=this,r=this.exit();return"function"==typeof t?(n=t(n))&&(n=n.selection()):n=n.append(t+""),null!=e&&(s=e(s))&&(s=s.selection()),null==i?r.remove():i(r),n&&s?n.merge(s).order():s},merge:function(t){for(var e=t.selection?t.selection():t,i=this._groups,n=e._groups,s=i.length,r=n.length,o=Math.min(s,r),a=new Array(s),l=0;l<o;++l)for(var h,d=i[l],u=n[l],c=d.length,g=a[l]=new Array(c),p=0;p<c;++p)(h=d[p]||u[p])&&(g[p]=h);for(;l<s;++l)a[l]=i[l];return new Ct(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var n,s=t[e],r=s.length-1,o=s[r];--r>=0;)(n=s[r])&&(o&&4^n.compareDocumentPosition(o)&&o.parentNode.insertBefore(n,o),o=n);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=O);for(var i=this._groups,n=i.length,s=new Array(n),r=0;r<n;++r){for(var o,a=i[r],l=a.length,h=s[r]=new Array(l),d=0;d<l;++d)(o=a[d])&&(h[d]=o);h.sort(e)}return new Ct(s,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var n=t[e],s=0,r=n.length;s<r;++s){var o=n[s];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var s,r=e[i],o=0,a=r.length;o<a;++o)(s=r[o])&&t.call(s,s.__data__,o,r);return this},attr:function(t,e){var i=P(t);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((null==e?i.local?j:I:"function"==typeof e?i.local?W:B:i.local?$:G)(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?F:"function"==typeof e?X:q)(t,e,null==i?"":i)):Z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Q:"function"==typeof e?V:K)(t,e)):this.node()[t]},classed:function(t,e){var i=J(t+"");if(arguments.length<2){for(var n=tt(this.node()),s=-1,r=i.length;++s<r;)if(!n.contains(i[s]))return!1;return!0}return this.each(("function"==typeof e?ot:e?st:rt)(i,e))},text:function(t){return arguments.length?this.each(null==t?at:("function"==typeof t?ht:lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?ct:ut)(t)):this.node().innerHTML},raise:function(){return this.each(gt)},lower:function(){return this.each(pt)},append:function(t){var e="function"==typeof t?t:vt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var i="function"==typeof t?t:vt(t),n=null==e?yt:"function"==typeof e?e:y(e);return this.select((function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)}))},remove:function(){return this.each(_t)},clone:function(t){return this.select(t?bt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var n,s,r=xt(t+""),o=r.length;if(!(arguments.length<2)){for(a=e?Et:kt,n=0;n<o;++n)this.each(a(r[n],e,i));return this}var a=this.node().__on;if(a)for(var l,h=0,d=a.length;h<d;++h)for(n=0,l=a[h];n<o;++n)if((s=r[n]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Nt:Mt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var n,s=t[e],r=0,o=s.length;r<o;++r)(n=s[r])&&(yield n)}};const Rt=St;var Lt={value:()=>{}};function At(){for(var t,e=0,i=arguments.length,n={};e<i;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new Ht(n)}function Ht(t){this._=t}function Ot(t,e){return t.trim().split(/^|\s+/).map((function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}}))}function Tt(t,e){for(var i,n=0,s=t.length;n<s;++n)if((i=t[n]).name===e)return i.value}function Ut(t,e,i){for(var n=0,s=t.length;n<s;++n)if(t[n].name===e){t[n]=Lt,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=i&&t.push({name:e,value:i}),t}Ht.prototype=At.prototype={constructor:Ht,on:function(t,e){var i,n=this._,s=Ot(t+"",n),r=-1,o=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++r<o;)if(i=(t=s[r]).type)n[i]=Ut(n[i],t.name,e);else if(null==e)for(i in n)n[i]=Ut(n[i],t.name,null);return this}for(;++r<o;)if((i=(t=s[r]).type)&&(i=Tt(n[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new Ht(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,n,s=new Array(i),r=0;r<i;++r)s[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=0,i=(n=this._[t]).length;r<i;++r)n[r].value.apply(e,s)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],s=0,r=n.length;s<r;++s)n[s].value.apply(e,i)}};const Pt=At;var It,jt,Gt=0,$t=0,Bt=0,Wt=0,Yt=0,Ft=0,qt="object"==typeof performance&&performance.now?performance:Date,Xt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zt(){return Yt||(Xt(Qt),Yt=qt.now()+Ft)}function Qt(){Yt=0}function Kt(){this._call=this._time=this._next=null}function Vt(t,e,i){var n=new Kt;return n.restart(t,e,i),n}function Jt(){Yt=(Wt=qt.now())+Ft,Gt=$t=0;try{!function(){Zt(),++Gt;for(var t,e=It;e;)(t=Yt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gt}()}finally{Gt=0,function(){for(var t,e,i=It,n=1/0;i;)i._call?(n>i._time&&(n=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:It=e);jt=t,ee(n)}(),Yt=0}}function te(){var t=qt.now(),e=t-Wt;e>1e3&&(Ft-=e,Wt=t)}function ee(t){Gt||($t&&($t=clearTimeout($t)),t-Yt>24?(t<1/0&&($t=setTimeout(Jt,t-qt.now()-Ft)),Bt&&(Bt=clearInterval(Bt))):(Bt||(Wt=qt.now(),Bt=setInterval(te,1e3)),Gt=1,Xt(Jt)))}function ie(t,e,i){var n=new Kt;return e=null==e?0:+e,n.restart((i=>{n.stop(),t(i+e)}),e,i),n}Kt.prototype=Vt.prototype={constructor:Kt,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Zt():+i)+(null==e?0:+e),this._next||jt===this||(jt?jt._next=this:It=this,jt=this),this._call=t,this._time=i,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var ne=Pt("start","end","cancel","interrupt"),se=[];function re(t,e,i,n,s,r){var o=t.__transition;if(o){if(i in o)return}else t.__transition={};!function(t,e,i){var n,s=t.__transition;function r(l){var h,d,u,c;if(1!==i.state)return a();for(h in s)if((c=s[h]).name===i.name){if(3===c.state)return ie(r);4===c.state?(c.state=6,c.timer.stop(),c.on.call("interrupt",t,t.__data__,c.index,c.group),delete s[h]):+h<e&&(c.state=6,c.timer.stop(),c.on.call("cancel",t,t.__data__,c.index,c.group),delete s[h])}if(ie((function(){3===i.state&&(i.state=4,i.timer.restart(o,i.delay,i.time),o(l))})),i.state=2,i.on.call("start",t,t.__data__,i.index,i.group),2===i.state){for(i.state=3,n=new Array(u=i.tween.length),h=0,d=-1;h<u;++h)(c=i.tween[h].value.call(t,t.__data__,i.index,i.group))&&(n[++d]=c);n.length=d+1}}function o(e){for(var s=e<i.duration?i.ease.call(null,e/i.duration):(i.timer.restart(a),i.state=5,1),r=-1,o=n.length;++r<o;)n[r].call(t,s);5===i.state&&(i.on.call("end",t,t.__data__,i.index,i.group),a())}function a(){for(var n in i.state=6,i.timer.stop(),delete s[e],s)return;delete t.__transition}s[e]=i,i.timer=Vt((function(t){i.state=1,i.timer.restart(r,i.delay,i.time),i.delay<=t&&r(t-i.delay)}),0,i.time)}(t,i,{name:e,index:n,group:s,on:ne,tween:se,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:0})}function oe(t,e){var i=le(t,e);if(i.state>0)throw new Error("too late; already scheduled");return i}function ae(t,e){var i=le(t,e);if(i.state>3)throw new Error("too late; already running");return i}function le(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function he(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var de,ue=180/Math.PI,ce={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ge(t,e,i,n,s,r){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*i+e*n)&&(i-=t*l,n-=e*l),(a=Math.sqrt(i*i+n*n))&&(i/=a,n/=a,l/=a),t*n<e*i&&(t=-t,e=-e,l=-l,o=-o),{translateX:s,translateY:r,rotate:Math.atan2(e,t)*ue,skewX:Math.atan(l)*ue,scaleX:o,scaleY:a}}function pe(t,e,i,n){function s(t){return t.length?t.pop()+" ":""}return function(r,o){var a=[],l=[];return r=t(r),o=t(o),function(t,n,s,r,o,a){if(t!==s||n!==r){var l=o.push("translate(",null,e,null,i);a.push({i:l-4,x:he(t,s)},{i:l-2,x:he(n,r)})}else(s||r)&&o.push("translate("+s+e+r+i)}(r.translateX,r.translateY,o.translateX,o.translateY,a,l),function(t,e,i,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:i.push(s(i)+"rotate(",null,n)-2,x:he(t,e)})):e&&i.push(s(i)+"rotate("+e+n)}(r.rotate,o.rotate,a,l),function(t,e,i,r){t!==e?r.push({i:i.push(s(i)+"skewX(",null,n)-2,x:he(t,e)}):e&&i.push(s(i)+"skewX("+e+n)}(r.skewX,o.skewX,a,l),function(t,e,i,n,r,o){if(t!==i||e!==n){var a=r.push(s(r)+"scale(",null,",",null,")");o.push({i:a-4,x:he(t,i)},{i:a-2,x:he(e,n)})}else 1===i&&1===n||r.push(s(r)+"scale("+i+","+n+")")}(r.scaleX,r.scaleY,o.scaleX,o.scaleY,a,l),r=o=null,function(t){for(var e,i=-1,n=l.length;++i<n;)a[(e=l[i]).i]=e.x(t);return a.join("")}}}var me=pe((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ce:ge(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),fe=pe((function(t){return null==t?ce:(de||(de=document.createElementNS("http://www.w3.org/2000/svg","g")),de.setAttribute("transform",t),(t=de.transform.baseVal.consolidate())?ge((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ce)}),", ",")",")");function ve(t,e){var i,n;return function(){var s=ae(this,t),r=s.tween;if(r!==i)for(var o=0,a=(n=i=r).length;o<a;++o)if(n[o].name===e){(n=n.slice()).splice(o,1);break}s.tween=n}}function ye(t,e,i){var n,s;if("function"!=typeof i)throw new Error;return function(){var r=ae(this,t),o=r.tween;if(o!==n){s=(n=o).slice();for(var a={name:e,value:i},l=0,h=s.length;l<h;++l)if(s[l].name===e){s[l]=a;break}l===h&&s.push(a)}r.tween=s}}function _e(t,e,i){var n=t._id;return t.each((function(){var t=ae(this,n);(t.value||(t.value={}))[e]=i.apply(this,arguments)})),function(t){return le(t,n).value[e]}}function we(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function be(t,e){var i=Object.create(t.prototype);for(var n in e)i[n]=e[n];return i}function xe(){}var ke=.7,Ee=1/ke,De="\\s*([+-]?\\d+)\\s*",Me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ze=/^#([0-9a-f]{3,8})$/,Ce=new RegExp(`^rgb\\(${De},${De},${De}\\)$`),Se=new RegExp(`^rgb\\(${Ne},${Ne},${Ne}\\)$`),Re=new RegExp(`^rgba\\(${De},${De},${De},${Me}\\)$`),Le=new RegExp(`^rgba\\(${Ne},${Ne},${Ne},${Me}\\)$`),Ae=new RegExp(`^hsl\\(${Me},${Ne},${Ne}\\)$`),He=new RegExp(`^hsla\\(${Me},${Ne},${Ne},${Me}\\)$`),Oe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Te(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function Pe(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=ze.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?Ie(e):3===i?new Be(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?je(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?je(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ce.exec(t))?new Be(e[1],e[2],e[3],1):(e=Se.exec(t))?new Be(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?je(e[1],e[2],e[3],e[4]):(e=Le.exec(t))?je(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ae.exec(t))?Ze(e[1],e[2]/100,e[3]/100,1):(e=He.exec(t))?Ze(e[1],e[2]/100,e[3]/100,e[4]):Oe.hasOwnProperty(t)?Ie(Oe[t]):"transparent"===t?new Be(NaN,NaN,NaN,0):null}function Ie(t){return new Be(t>>16&255,t>>8&255,255&t,1)}function je(t,e,i,n){return n<=0&&(t=e=i=NaN),new Be(t,e,i,n)}function Ge(t){return t instanceof xe||(t=Pe(t)),t?new Be((t=t.rgb()).r,t.g,t.b,t.opacity):new Be}function $e(t,e,i,n){return 1===arguments.length?Ge(t):new Be(t,e,i,null==n?1:n)}function Be(t,e,i,n){this.r=+t,this.g=+e,this.b=+i,this.opacity=+n}function We(){return`#${Xe(this.r)}${Xe(this.g)}${Xe(this.b)}`}function Ye(){const t=Fe(this.opacity);return`${1===t?"rgb(":"rgba("}${qe(this.r)}, ${qe(this.g)}, ${qe(this.b)}${1===t?")":`, ${t})`}`}function Fe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function qe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Xe(t){return((t=qe(t))<16?"0":"")+t.toString(16)}function Ze(t,e,i,n){return n<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new Ke(t,e,i,n)}function Qe(t){if(t instanceof Ke)return new Ke(t.h,t.s,t.l,t.opacity);if(t instanceof xe||(t=Pe(t)),!t)return new Ke;if(t instanceof Ke)return t;var e=(t=t.rgb()).r/255,i=t.g/255,n=t.b/255,s=Math.min(e,i,n),r=Math.max(e,i,n),o=NaN,a=r-s,l=(r+s)/2;return a?(o=e===r?(i-n)/a+6*(i<n):i===r?(n-e)/a+2:(e-i)/a+4,a/=l<.5?r+s:2-r-s,o*=60):a=l>0&&l<1?0:o,new Ke(o,a,l,t.opacity)}function Ke(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function Ve(t){return(t=(t||0)%360)<0?t+360:t}function Je(t){return Math.max(0,Math.min(1,t||0))}function ti(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}function ei(t,e,i,n,s){var r=t*t,o=r*t;return((1-3*t+3*r-o)*e+(4-6*r+3*o)*i+(1+3*t+3*r-3*o)*n+o*s)/6}we(xe,Pe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Ue,toString:Ue}),we(Be,$e,be(xe,{brighter(t){return t=null==t?Ee:Math.pow(Ee,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ke:Math.pow(ke,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Be(qe(this.r),qe(this.g),qe(this.b),Fe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:We,formatHex:We,formatHex8:function(){return`#${Xe(this.r)}${Xe(this.g)}${Xe(this.b)}${Xe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ye,toString:Ye})),we(Ke,(function(t,e,i,n){return 1===arguments.length?Qe(t):new Ke(t,e,i,null==n?1:n)}),be(xe,{brighter(t){return t=null==t?Ee:Math.pow(Ee,t),new Ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ke:Math.pow(ke,t),new Ke(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,s=2*i-n;return new Be(ti(t>=240?t-240:t+120,s,n),ti(t,s,n),ti(t<120?t+240:t-120,s,n),this.opacity)},clamp(){return new Ke(Ve(this.h),Je(this.s),Je(this.l),Fe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Fe(this.opacity);return`${1===t?"hsl(":"hsla("}${Ve(this.h)}, ${100*Je(this.s)}%, ${100*Je(this.l)}%${1===t?")":`, ${t})`}`}}));const ii=t=>()=>t;function ni(t,e){var i=e-t;return i?function(t,e){return function(i){return t+i*e}}(t,i):ii(isNaN(t)?e:t)}const si=function t(e){var i=function(t){return 1==(t=+t)?ni:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(n){return Math.pow(t+n*e,i)}}(e,i,t):ii(isNaN(e)?i:e)}}(e);function n(t,e){var n=i((t=$e(t)).r,(e=$e(e)).r),s=i(t.g,e.g),r=i(t.b,e.b),o=ni(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=s(e),t.b=r(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function ri(t){return function(e){var i,n,s=e.length,r=new Array(s),o=new Array(s),a=new Array(s);for(i=0;i<s;++i)n=$e(e[i]),r[i]=n.r||0,o[i]=n.g||0,a[i]=n.b||0;return r=t(r),o=t(o),a=t(a),n.opacity=1,function(t){return n.r=r(t),n.g=o(t),n.b=a(t),n+""}}}ri((function(t){var e=t.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),s=t[n],r=t[n+1],o=n>0?t[n-1]:2*s-r,a=n<e-1?t[n+2]:2*r-s;return ei((i-n/e)*e,o,s,r,a)}})),ri((function(t){var e=t.length;return function(i){var n=Math.floor(((i%=1)<0?++i:i)*e),s=t[(n+e-1)%e],r=t[n%e],o=t[(n+1)%e],a=t[(n+2)%e];return ei((i-n/e)*e,s,r,o,a)}}));var oi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ai=new RegExp(oi.source,"g");function li(t,e){var i,n,s,r=oi.lastIndex=ai.lastIndex=0,o=-1,a=[],l=[];for(t+="",e+="";(i=oi.exec(t))&&(n=ai.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,l.push({i:o,x:he(i,n)})),r=ai.lastIndex;return r<e.length&&(s=e.slice(r),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var i,n=0;n<e;++n)a[(i=l[n]).i]=i.x(t);return a.join("")})}function hi(t,e){var i;return("number"==typeof e?he:e instanceof Pe?si:(i=Pe(e))?(e=i,si):li)(t,e)}function di(t){return function(){this.removeAttribute(t)}}function ui(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ci(t,e,i){var n,s,r=i+"";return function(){var o=this.getAttribute(t);return o===r?null:o===n?s:s=e(n=o,i)}}function gi(t,e,i){var n,s,r=i+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===n?s:s=e(n=o,i)}}function pi(t,e,i){var n,s,r;return function(){var o,a,l=i(this);if(null!=l)return(o=this.getAttribute(t))===(a=l+"")?null:o===n&&a===s?r:(s=a,r=e(n=o,l));this.removeAttribute(t)}}function mi(t,e,i){var n,s,r;return function(){var o,a,l=i(this);if(null!=l)return(o=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:o===n&&a===s?r:(s=a,r=e(n=o,l));this.removeAttributeNS(t.space,t.local)}}function fi(t,e){return function(i){this.setAttribute(t,e.call(this,i))}}function vi(t,e){return function(i){this.setAttributeNS(t.space,t.local,e.call(this,i))}}function yi(t,e){var i,n;function s(){var s=e.apply(this,arguments);return s!==n&&(i=(n=s)&&vi(t,s)),i}return s._value=e,s}function _i(t,e){var i,n;function s(){var s=e.apply(this,arguments);return s!==n&&(i=(n=s)&&fi(t,s)),i}return s._value=e,s}function wi(t,e){return function(){oe(this,t).delay=+e.apply(this,arguments)}}function bi(t,e){return e=+e,function(){oe(this,t).delay=e}}function xi(t,e){return function(){ae(this,t).duration=+e.apply(this,arguments)}}function ki(t,e){return e=+e,function(){ae(this,t).duration=e}}function Ei(t,e){if("function"!=typeof e)throw new Error;return function(){ae(this,t).ease=e}}function Di(t,e,i){var n,s,r=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?oe:ae;return function(){var o=r(this,t),a=o.on;a!==n&&(s=(n=a).copy()).on(e,i),o.on=s}}var Mi=Rt.prototype.constructor;function Ni(t){return function(){this.style.removeProperty(t)}}function zi(t,e,i){return function(n){this.style.setProperty(t,e.call(this,n),i)}}function Ci(t,e,i){var n,s;function r(){var r=e.apply(this,arguments);return r!==s&&(n=(s=r)&&zi(t,r,i)),n}return r._value=e,r}function Si(t){return function(e){this.textContent=t.call(this,e)}}function Ri(t){var e,i;function n(){var n=t.apply(this,arguments);return n!==i&&(e=(i=n)&&Si(n)),e}return n._value=t,n}var Li=0;function Ai(t,e,i,n){this._groups=t,this._parents=e,this._name=i,this._id=n}function Hi(){return++Li}var Oi=Rt.prototype;Ai.prototype=function(t){return Rt().transition(t)}.prototype={constructor:Ai,select:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=y(t));for(var n=this._groups,s=n.length,r=new Array(s),o=0;o<s;++o)for(var a,l,h=n[o],d=h.length,u=r[o]=new Array(d),c=0;c<d;++c)(a=h[c])&&(l=t.call(a,a.__data__,c,h))&&("__data__"in a&&(l.__data__=a.__data__),u[c]=l,re(u[c],e,i,c,u,le(a,i)));return new Ai(r,this._parents,e,i)},selectAll:function(t){var e=this._name,i=this._id;"function"!=typeof t&&(t=b(t));for(var n=this._groups,s=n.length,r=[],o=[],a=0;a<s;++a)for(var l,h=n[a],d=h.length,u=0;u<d;++u)if(l=h[u]){for(var c,g=t.call(l,l.__data__,u,h),p=le(l,i),m=0,f=g.length;m<f;++m)(c=g[m])&&re(c,e,i,m,g,p);r.push(g),o.push(l)}return new Ai(r,o,e,i)},selectChild:Oi.selectChild,selectChildren:Oi.selectChildren,filter:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,i=e.length,n=new Array(i),s=0;s<i;++s)for(var r,o=e[s],a=o.length,l=n[s]=[],h=0;h<a;++h)(r=o[h])&&t.call(r,r.__data__,h,o)&&l.push(r);return new Ai(n,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,i=t._groups,n=e.length,s=i.length,r=Math.min(n,s),o=new Array(n),a=0;a<r;++a)for(var l,h=e[a],d=i[a],u=h.length,c=o[a]=new Array(u),g=0;g<u;++g)(l=h[g]||d[g])&&(c[g]=l);for(;a<n;++a)o[a]=e[a];return new Ai(o,this._parents,this._name,this._id)},selection:function(){return new Mi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,i=Hi(),n=this._groups,s=n.length,r=0;r<s;++r)for(var o,a=n[r],l=a.length,h=0;h<l;++h)if(o=a[h]){var d=le(o,e);re(o,t,i,h,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ai(n,this._parents,t,i)},call:Oi.call,nodes:Oi.nodes,node:Oi.node,size:Oi.size,empty:Oi.empty,each:Oi.each,on:function(t,e){var i=this._id;return arguments.length<2?le(this.node(),i).on.on(t):this.each(Di(i,t,e))},attr:function(t,e){var i=P(t),n="transform"===i?fe:hi;return this.attrTween(t,"function"==typeof e?(i.local?mi:pi)(i,n,_e(this,"attr."+t,e)):null==e?(i.local?ui:di)(i):(i.local?gi:ci)(i,n,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var n=P(t);return this.tween(i,(n.local?yi:_i)(n,e))},style:function(t,e,i){var n="transform"==(t+="")?me:hi;return null==e?this.styleTween(t,function(t,e){var i,n,s;return function(){var r=Z(this,t),o=(this.style.removeProperty(t),Z(this,t));return r===o?null:r===i&&o===n?s:s=e(i=r,n=o)}}(t,n)).on("end.style."+t,Ni(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var n,s,r;return function(){var o=Z(this,t),a=i(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=Z(this,t)),o===l?null:o===n&&l===s?r:(s=l,r=e(n=o,a))}}(t,n,_e(this,"style."+t,e))).each(function(t,e){var i,n,s,r,o="style."+e,a="end."+o;return function(){var l=ae(this,t),h=l.on,d=null==l.value[o]?r||(r=Ni(e)):void 0;h===i&&s===d||(n=(i=h).copy()).on(a,s=d),l.on=n}}(this._id,t)):this.styleTween(t,function(t,e,i){var n,s,r=i+"";return function(){var o=Z(this,t);return o===r?null:o===n?s:s=e(n=o,i)}}(t,n,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,Ci(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(_e(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ri(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var n,s=le(this.node(),i).tween,r=0,o=s.length;r<o;++r)if((n=s[r]).name===t)return n.value;return null}return this.each((null==e?ve:ye)(i,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?wi:bi)(e,t)):le(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xi:ki)(e,t)):le(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ei(e,t)):le(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var i=e.apply(this,arguments);if("function"!=typeof i)throw new Error;ae(this,t).ease=i}}(this._id,t))},end:function(){var t,e,i=this,n=i._id,s=i.size();return new Promise((function(r,o){var a={value:o},l={value:function(){0==--s&&r()}};i.each((function(){var i=ae(this,n),s=i.on;s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),i.on=e})),0===s&&r()}))},[Symbol.iterator]:Oi[Symbol.iterator]};var Ti={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ui(t,e){for(var i;!(i=t.__transition)||!(i=i[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return i}Rt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var i,n,s,r=t.__transition,o=!0;if(r){for(s in e=null==e?null:e+"",r)(i=r[s]).name===e?(n=i.state>2&&i.state<5,i.state=6,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[s]):o=!1;o&&delete t.__transition}}(this,t)}))},Rt.prototype.transition=function(t){var e,i;t instanceof Ai?(e=t._id,t=t._name):(e=Hi(),(i=Ti).time=Zt(),t=null==t?null:t+"");for(var n=this._groups,s=n.length,r=0;r<s;++r)for(var o,a=n[r],l=a.length,h=0;h<l;++h)(o=a[h])&&re(o,t,e,h,a,i||Ui(o,e));return new Ai(n,this._parents,t,e)};const{abs:Pi,max:Ii,min:ji}=Math;function Gi(t){return{type:t}}function $i(t,e,i){this.k=t,this.x=e,this.y=i}["w","e"].map(Gi),["n","s"].map(Gi),["n","w","e","s","nw","ne","sw","se"].map(Gi),$i.prototype={constructor:$i,scale:function(t){return 1===t?this:new $i(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new $i(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new $i(1,0,0),$i.prototype})()})();
\ No newline at end of file
diff --git a/dist/bundle.js.LICENSE.txt b/dist/bundle.js.LICENSE.txt
new file mode 100644
index 0000000000000000000000000000000000000000..88919f1e76bfeab2cf0fdb9a33909dec01f85c6b
--- /dev/null
+++ b/dist/bundle.js.LICENSE.txt
@@ -0,0 +1,7 @@
+/*!
+ * GridStack 7.1.1
+ * https://gridstackjs.com/
+ *
+ * Copyright (c) 2021-2022 Alain Dumesny
+ * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
+ */