diff --git a/netbox_reorder_rack/static/netbox_reorder_rack/css/rack.css b/netbox_reorder_rack/static/netbox_reorder_rack/css/rack.css index e4b0758..e5c0c79 100644 --- a/netbox_reorder_rack/static/netbox_reorder_rack/css/rack.css +++ b/netbox_reorder_rack/static/netbox_reorder_rack/css/rack.css @@ -1 +1 @@ -:root{--nbx-rack-bg: #e9ecef;--nbx-rack-border: #000;--nbx-rack-slot-bg: #e9ecef;--nbx-rack-slot-border: #adb5bd;--nbx-rack-slot-hover-bg: #ced4da;--nbx-rack-link-color: #0d6efd;--nbx-rack-unit-color: #6c757d }:root[data-netbox-color-mode=dark]{--nbx-rack-bg: #343a40;--nbx-rack-border: #6c757d;--nbx-rack-slot-bg: #343a40;--nbx-rack-slot-border: #495057;--nbx-rack-slot-hover-bg: #212529;--nbx-rack-link-color: #9ec5fe;--nbx-rack-unit-color: #6c757d }.device_rear{background:repeating-linear-gradient(45deg,#f7f7f7,#f7f7f7 12.5px,#ffc0c0 12.5px 25px)}ul.unit_numbers{list-style-type:none;font-size:.7em;color:var(--nbx-rack-unit-color);float:left}ul.unit_numbers li{width:20px;margin-bottom:2px;line-height:20px}.rack{width:217px;background:var(--nbx-rack-slot-bg) repeating-linear-gradient(to bottom,var(--nbx-rack-slot-bg) 0px,var(--nbx-rack-slot-bg) 20px,var(--nbx-rack-slot-border) 20px,var(--nbx-rack-slot-border) 22px);border:2px solid var(--nbx-rack-unit-color);float:left}.grid-stack>.grid-stack-item[gs-w="2"]{width:100%}.grid-stack-item>.grid-stack-item-content{border:1px solid var(--nbx-rack-slot-border);border-radius:3px}.grid-stack-placeholder>.placeholder-content{border:1px dashed #8a8a8a;background-color:#f3f3f329} +:root{--nbx-rack-bg: var(--tblr-bg-surface-secondary);--nbx-rack-border: #000;--nbx-rack-slot-bg: #e9ecef;--nbx-rack-slot-border: #adb5bd;--nbx-rack-slot-hover-bg: #ced4da;--nbx-rack-link-color: #0d6efd;--nbx-rack-unit-color: #6c757d}:root[data-bs-theme=dark]{--nbx-rack-bg: rgb(27, 41, 58);--nbx-rack-border: #6c757d;--nbx-rack-slot-bg: #343a40;--nbx-rack-slot-border: #495057;--nbx-rack-slot-hover-bg: #212529;--nbx-rack-link-color: #9ec5fe;--nbx-rack-unit-color: #adb5bd}.device_rear{background:repeating-linear-gradient(45deg,#f7f7f7,#f7f7f7 12.5px,#ffc0c0 12.5px 25px)}ul.unit_numbers{list-style-type:none;font-size:.7em;color:var(--nbx-rack-unit-color);float:left}ul.unit_numbers li{width:20px;margin-bottom:2px;line-height:20px}.rack{width:217px;background:var(--nbx-rack-slot-bg) repeating-linear-gradient(to bottom,var(--nbx-rack-slot-bg) 0px,var(--nbx-rack-slot-bg) 20px,var(--nbx-rack-slot-border) 20px,var(--nbx-rack-slot-border) 22px);border:2px solid var(--nbx-rack-unit-color);float:left}.grid-stack>.grid-stack-item[gs-w="2"]{width:100%}.grid-stack-item>.grid-stack-item-content{border:1px solid var(--nbx-rack-slot-border);border-radius:3px}.grid-stack-placeholder>.placeholder-content{border:1px dashed #8a8a8a;background-color:#f3f3f329} diff --git a/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js b/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js index b6aff08..bd7233d 100644 --- a/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js +++ b/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js @@ -1,11 +1,11 @@ -(()=>{var Lt=Object.create;var xt=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Tt=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var b=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports);var Bt=(a,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pt(t))!Gt.call(a,s)&&s!==e&&xt(a,s,{get:()=>t[s],enumerable:!(i=At(t,s))||i.enumerable});return a};var It=(a,t,e)=>(e=a!=null?Lt(Tt(a)):{},Bt(t||!a||!a.__esModule?xt(e,"default",{value:a,enumerable:!0}):e,a));var k=b(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.Utils=x.obsoleteAttr=x.obsoleteOptsDel=x.obsoleteOpts=x.obsolete=void 0;function jt(a,t,e,i,s){let r=(...n)=>(console.warn("gridstack.js: Function `"+e+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),t.apply(a,n));return r.prototype=t.prototype,r}x.obsolete=jt;function Wt(a,t,e,i){a[t]!==void 0&&(a[e]=a[t],console.warn("gridstack.js: Option `"+t+"` is deprecated in "+i+" and has been replaced with `"+e+"`. It will be **removed** in a future release"))}x.obsoleteOpts=Wt;function qt(a,t,e,i){a[t]!==void 0&&console.warn("gridstack.js: Option `"+t+"` is deprecated in "+e+i)}x.obsoleteOptsDel=qt;function $t(a,t,e,i){let s=a.getAttribute(t);s!==null&&(a.setAttribute(e,s),console.warn("gridstack.js: attribute `"+t+"`="+s+" is deprecated on this object in "+i+" and has been replaced with `"+e+"`. It will be **removed** in a future release"))}x.obsoleteAttr=$t;var ut=class a{static getElements(t){if(typeof t=="string"){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(typeof t=="string"){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 a.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,s=t.x+t.we.y?t.y:e.y,n=t.y+t.hMath.max(r.x+r.w,s),0)||12,e===-1?t.sort((s,r)=>r.x+r.y*i-(s.x+s.y*i)):t.sort((s,r)=>s.x+s.y*i-(r.x+r.y*i))}static createStylesheet(t,e,i){let s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",t),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),e?e.insertBefore(s,e.firstChild):(e=document.getElementsByTagName("head")[0],e.appendChild(s)),s.sheet}static removeStylesheet(t){let e=document.querySelector("STYLE[gs-style-id="+t+"]");e&&e.parentNode&&e.remove()}static addCSSRule(t,e,i){typeof t.addRule=="function"?t.addRule(e,i):typeof t.insertRule=="function"&&t.insertRule(`${e}{${i}}`)}static toBool(t){return typeof t=="boolean"?t:typeof t=="string"?(t=t.toLowerCase(),!(t===""||t==="no"||t==="false"||t==="0")):!!t}static toNumber(t){return t===null||t.length===0?void 0:Number(t)}static parseHeight(t){let e,i="px";if(typeof t=="string"){let s=t.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);if(!s)throw new Error("Invalid height");i=s[2]||"px",e=parseFloat(s[1])}else e=t;return{h:e,unit:i}}static defaults(t,...e){return e.forEach(i=>{for(let s in i){if(!i.hasOwnProperty(s))return;t[s]===null||t[s]===void 0?t[s]=i[s]:typeof i[s]=="object"&&typeof t[s]=="object"&&this.defaults(t[s],i[s])}}),t}static same(t,e){if(typeof t!="object")return t==e;if(typeof t!=typeof e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let 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(!(typeof t!="object"||typeof e!="object"))for(let i in t){let s=t[i];if(i[0]==="_"||s===e[i])delete t[i];else if(s&&typeof s=="object"&&e[i]!==void 0){for(let r in s)(s[r]===e[i][r]||r[0]==="_")&&delete s[r];Object.keys(s).length||delete t[i]}}}static removeInternalForSave(t,e=!0){for(let i in t)(i[0]==="_"||t[i]===null||t[i]===void 0)&&delete t[i];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,(t.w===1||t.w===t.minW)&&delete t.w,(t.h===1||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(...s)=>{i||(i=!0,setTimeout(()=>{t(...s),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;let e=getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowY)?t:this.getScrollElement(t.parentElement)}static updateScrollPosition(t,e,i){let s=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){let n=s.bottom-r,o=s.top,l=this.getScrollElement(t);if(l!==null){let h=l.scrollTop;s.top<0&&i<0?t.offsetHeight>r?l.scrollTop+=i:l.scrollTop+=Math.abs(o)>Math.abs(i)?i:o:i>0&&(t.offsetHeight>r?l.scrollTop+=i:l.scrollTop+=n>i?i:n),e.top+=l.scrollTop-h}}}static updateScrollResize(t,e,i){let s=this.getScrollElement(e),r=s.clientHeight,n=s===this.getScrollElement()?0:s.getBoundingClientRect().top,o=t.clientY-n,l=or-i;l?s.scrollBy({behavior:"smooth",top:o-i}):h&&s.scrollBy({behavior:"smooth",top:i-(r-o)})}static clone(t){return t==null||typeof t!="object"?t:t instanceof Array?[...t]:Object.assign({},t)}static cloneDeep(t){let e=["parentGrid","el","grid","subGrid","engine"],i=a.clone(t);for(let s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!e.find(r=>r===s)&&(i[s]=a.cloneDeep(t[s]));return i}static cloneNode(t){let e=t.cloneNode(!0);return e.removeAttribute("id"),e}static appendTo(t,e){let i;typeof e=="string"?i=document.querySelector(e):i=e,i&&i.appendChild(t)}static addElStyles(t,e){if(e instanceof Object)for(let i in e)e.hasOwnProperty(i)&&(Array.isArray(e[i])?e[i].forEach(s=>{t.style[i]=s}):t.style[i]=e[i])}static initEvent(t,e){let i={type:e.type},s={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(r=>i[r]=t[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=t[r]),Object.assign(Object.assign({},i),s)}static simulateMouseEvent(t,e,i){let s=document.createEvent("MouseEvents");s.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(s)}};x.Utils=ut});var gt=b(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.GridStackEngine=void 0;var f=k(),j=class a{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:(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.batchMode&&!this._prevFloat)&&!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),!i)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 n=!1,o={nested:!0,pack:!1};for(;i=i||this.collide(t,r,s.skip);){let l;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,l=this.moveNode(t,Object.assign(Object.assign(Object.assign({},e),{y:i.y+i.h}),o)),i.locked&&l?f.Utils.copyPos(e,t):!i.locked&&l&&s.pack&&(this._packNodes(),e.y=i.y+i.h,f.Utils.copyPos(t,e)),n=n||l):l=this.moveNode(i,Object.assign(Object.assign(Object.assign({},i),{y:e.y+e.h,skip:t}),o)),!l)return n;i=void 0}return n}collide(t,e=t,i){return this.nodes.find(s=>s!==t&&s!==i&&f.Utils.isIntercepted(s,e))}collideAll(t,e=t,i){return this.nodes.filter(s=>s!==t&&s!==i&&f.Utils.isIntercepted(s,e))}directionCollideCoverage(t,e,i){if(!e.rect||!t._rect)return;let s=t._rect,r=Object.assign({},e.rect);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;let n;return i.forEach(o=>{if(o.locked||!o._rect)return;let l=o._rect,h=Number.MAX_VALUE,d=Number.MAX_VALUE,g=.5;s.yl.y+l.h&&(h=(l.y+l.h-r.y)/l.h),s.xl.x+l.w&&(d=(l.x+l.w-r.x)/l.w);let c=Math.min(d,h);c>g&&(g=c,n=o)}),e.collide=n,n}cacheRects(t,e,i,s,r,n){return this.nodes.forEach(o=>o._rect={y:o.y*e+i,x:o.x*t+n,w:o.w*t-n-s,h:o.h*e-i-r}),this}swap(t,e){if(!e||e.locked||!t||t.locked)return!1;function i(){let r=e.x,n=e.y;return e.x=t.x,e.y=t.y,t.h!=e.h?(t.x=r,t.y=e.y+e.h):t.w!=e.w?(t.x=e.x+e.w,t.y=n):(t.x=r,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=f.Utils.isTouching(t,e)))return i();if(s!==!1){if(t.w===e.w&&t.x===e.x&&(s||(s=f.Utils.isTouching(t,e)))){if(e.y{e.locked||(e.autoPosition=!0),this.addNode(e,!1),e._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=f.Utils.sort(this.nodes,t,this.column),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(t=>{if(t._updating||t._orig===void 0||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=e===0?0:t.y-1;if(!(e===0||!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||{},t._id=t._id||a._idSeq++,(t.x===void 0||t.y===void 0||t.x===null||t.y===null)&&(t.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return f.Utils.defaults(t,i),t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,typeof t.x=="string"&&(t.x=Number(t.x)),typeof t.y=="string"&&(t.y=Number(t.y)),typeof t.w=="string"&&(t.w=Number(t.w)),typeof t.h=="string"&&(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||f.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)),(this.column===1||t.x+t.w>this.column)&&this.column<12&&!this._inColumnResize&&t._id&&this.findCacheLayout(t,12)===-1){let r=Object.assign({},t);r.autoPosition?(delete r.x,delete r.y):r.x=Math.min(11,r.x),r.w=Math.min(12,r.w),this.cacheOneLayout(r,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),f.Utils.samePos(t,i)||(t._dirty=!0),t}getDirtyNodes(t){return t?this.nodes.filter(e=>e._dirty&&!f.Utils.samePos(e,e._orig)):this.nodes.filter(e=>e._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:(this.nodes.forEach(t=>{delete t._dirty,delete t._lastTried}),this)}saveInitial(){return this.nodes.forEach(t=>{t._orig=f.Utils.copyPos({},t),delete t._dirty}),this._hasLocked=this.nodes.some(t=>t.locked),this}restoreInitial(){return this.nodes.forEach(t=>{f.Utils.samePos(t,t._orig)||(f.Utils.copyPos(t,t._orig),t._dirty=!0)}),this._notify(),this}findEmptyPosition(t,e=this.nodes,i=this.column){e=f.Utils.sort(e,-1,i);let s=!1;for(let r=0;!s;++r){let n=r%i,o=Math.floor(r/i);if(n+t.w>i)continue;let l={x:n,y:o,w:t.w,h:t.h};e.find(h=>f.Utils.isIntercepted(l,h))||(t.x=n,t.y=o,delete t.autoPosition,s=!0)}return s}addNode(t,e=!1){let i=this.nodes.find(s=>s._id===t._id);return i||(t=this._inColumnResize?this.nodeBoundFix(t):this.prepareNode(t),delete 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(s=>s===t)?(i&&this.removedNodes.push(t),e&&(t._removeDOM=!0),this.nodes=this.nodes.filter(s=>s!==t),this._packNodes()._notify([t])):this}removeAll(t=!0){return delete this._layouts,this.nodes.length===0?this:(t&&this.nodes.forEach(e=>e._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,s=new a({column:this.column,float:this.float,nodes:this.nodes.map(n=>n===t?(i=Object.assign({},n),i):Object.assign({},n))});if(!i)return!1;let r=s.moveNode(i,e)&&s.getRow()<=this.maxRow;if(!r&&!e.resizing&&e.collide){let n=e.collide.el.gridstackNode;if(this.swap(t,n))return this._notify(),!0}return r?(s.nodes.filter(n=>n._dirty).forEach(n=>{let o=this.nodes.find(l=>l._id===n._id);o&&(f.Utils.copyPos(o,n),o._dirty=!0)}),this._notify(),!0):!1}willItFit(t){if(delete t._willFitPos,!this.maxRow)return!0;let e=new a({column:this.column,float:this.float,nodes:this.nodes.map(s=>Object.assign({},s))}),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=f.Utils.copyPos({},i),!0):!1}changedPosConstrain(t,e){return e.w=e.w||t.w,e.h=e.h||t.h,t.x!==e.x||t.y!==e.y?!0:(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;e.pack===void 0&&(r=e.pack=!0),typeof e.x!="number"&&(e.x=t.x),typeof e.y!="number"&&(e.y=t.y),typeof e.w!="number"&&(e.w=t.w),typeof e.h!="number"&&(e.h=t.h);let n=t.w!==e.w||t.h!==e.h,o=f.Utils.copyPos({},t,!0);if(f.Utils.copyPos(o,e),o=this.nodeBoundFix(o,n),f.Utils.copyPos(e,o),f.Utils.samePos(t,e))return!1;let l=f.Utils.copyPos({},t),h=this.collideAll(t,o,e.skip),d=!0;if(h.length){let g=t._moving&&!e.nested,c=g?this.directionCollideCoverage(t,e,h):h[0];if(g&&c&&(!((s=(i=t.grid)===null||i===void 0?void 0:i.opts)===null||s===void 0)&&s.subGridDynamic)&&!t.grid._isTemp){let p=f.Utils.areaIntercept(e.rect,c._rect),D=f.Utils.area(e.rect),H=f.Utils.area(c._rect);p/(D.8&&(c.grid.makeSubGrid(c.el,void 0,t),c=void 0)}c?d=!this._fixCollisions(t,o,c,e):(d=!1,r&&delete e.pack)}return d&&(t._dirty=!0,f.Utils.copyPos(t,o)),e.pack&&this._packNodes()._notify(),!f.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(e=>e._updating);return t&&(delete t._updating,delete t._skipDown),this}save(t=!0){var e;let i=(e=this._layouts)===null||e===void 0?void 0:e.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(n=>{let o=s==null?void 0:s.find(h=>h._id===n._id),l=Object.assign({},n);o&&(l.x=o.x,l.y=o.y,l.w=o.w),f.Utils.removeInternalForSave(l,!t),r.push(l)}),r}layoutsNodesChange(t){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((e,i)=>{if(!e||i===this.column)return this;if(i{if(!r._orig)return;let n=e.find(o=>o._id===r._id);n&&(r.y!==r._orig.y&&(n.y+=r.y-r._orig.y),r.x!==r._orig.x&&(n.x=Math.round(r.x*s)),r.w!==r._orig.w&&(n.w=Math.round(r.w*s)))})}}),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 n=[],o=!1;if(e===1&&(i!=null&&i.length)){o=!0;let h=0;i.forEach(d=>{d.x=0,d.w=1,d.y=Math.max(d.y,h),h=d.y+d.h}),n=i,i=[]}else i=f.Utils.sort(this.nodes,-1,t);let l=[];if(e>t){l=this._layouts[e]||[];let h=this._layouts.length-1;!l.length&&t!==h&&(!((r=this._layouts[h])===null||r===void 0)&&r.length)&&(t=h,this._layouts[h].forEach(d=>{let g=i.find(c=>c._id===d._id);g&&(g.x=d.x,g.y=d.y,g.w=d.w)}))}if(l.forEach(h=>{let d=i.findIndex(g=>g._id===h._id);d!==-1&&((h.autoPosition||isNaN(h.x)||isNaN(h.y))&&this.findEmptyPosition(h,n),h.autoPosition||(i[d].x=h.x,i[d].y=h.y,i[d].w=h.w,n.push(i[d])),i.splice(d,1))}),i.length){if(typeof s=="function")s(e,t,n,i);else if(!o){let h=e/t,d=s==="move"||s==="moveScale",g=s==="scale"||s==="moveScale";i.forEach(c=>{c.x=e===1?0:d?Math.round(c.x*h):Math.min(c.x,e-1),c.w=e===1||t===1?1:g?Math.round(c.w*h)||1:Math.min(c.w,e),n.push(c)}),i=[]}}return o||(n=f.Utils.sort(n,-1,e)),this._inColumnResize=!0,this.nodes=[],n.forEach(h=>{this.addNode(h,!1),delete h._orig}),this.batchUpdate(!1),delete this._inColumnResize,this}cacheLayout(t,e,i=!1){let s=[];return t.forEach((r,n)=>{r._id=r._id||a._idSeq++,s[n]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[e]=s,this}cacheOneLayout(t,e){t._id=t._id||a._idSeq++;let i={x:t.x,y:t.y,w:t.w,_id:t._id};t.autoPosition&&(delete i.x,delete i.y,i.autoPosition=!0),this._layouts=this._layouts||[],this._layouts[e]=this._layouts[e]||[];let s=this.findCacheLayout(t,e);return s===-1?this._layouts[e].push(i):this._layouts[e][s]=i,this}findCacheLayout(t,e){var i,s,r;return(r=(s=(i=this._layouts)===null||i===void 0?void 0:i[e])===null||s===void 0?void 0:s.findIndex(n=>n._id===t._id))!==null&&r!==void 0?r:-1}cleanupNode(t){for(let e in t)e[0]==="_"&&e!=="_id"&&delete t[e];return this}};W.GridStackEngine=j;j._idSeq=1});var ct=b(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.dragInDefaultOptions=O.gridDefaults=void 0;O.gridDefaults={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},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"};O.dragInDefaultOptions={handle:".grid-stack-item-content",appendTo:"body"}});var z=b(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.DDManager=void 0;var ft=class{};q.DDManager=ft});var G=b(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.pointerleave=v.pointerenter=v.pointerdown=v.touchend=v.touchmove=v.touchstart=v.isTouch=void 0;var pt=z();v.isTouch=typeof window!="undefined"&&typeof document!="undefined"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);var R=class{};function $(a,t){if(a.touches.length>1)return;a.cancelable&&a.preventDefault();let e=a.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(i)}function Rt(a,t){a.cancelable&&a.preventDefault();let e=document.createEvent("MouseEvents");e.initMouseEvent(t,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(e)}function Ft(a){R.touchHandled||(R.touchHandled=!0,$(a,"mousedown"))}v.touchstart=Ft;function Yt(a){R.touchHandled&&$(a,"mousemove")}v.touchmove=Yt;function Xt(a){if(!R.touchHandled)return;R.pointerLeaveTimeout&&(window.clearTimeout(R.pointerLeaveTimeout),delete R.pointerLeaveTimeout);let t=!!pt.DDManager.dragElement;$(a,"mouseup"),t||$(a,"click"),R.touchHandled=!1}v.touchend=Xt;function Kt(a){a.target.releasePointerCapture(a.pointerId)}v.pointerdown=Kt;function Vt(a){pt.DDManager.dragElement&&Rt(a,"mouseenter")}v.pointerenter=Vt;function Jt(a){pt.DDManager.dragElement&&(R.pointerLeaveTimeout=window.setTimeout(()=>{delete R.pointerLeaveTimeout,Rt(a,"mouseleave")},10))}v.pointerleave=Jt});var Mt=b(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.DDResizableHandle=void 0;var M=G(),F=class a{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(){let t=document.createElement("div");return t.classList.add("ui-resizable-handle"),t.classList.add(`${a.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),M.isTouch&&(this.el.addEventListener("touchstart",M.touchstart),this.el.addEventListener("pointerdown",M.pointerdown)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),M.isTouch&&(this.el.removeEventListener("touchstart",M.touchstart),this.el.removeEventListener("pointerdown",M.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),M.isTouch&&(this.el.addEventListener("touchmove",M.touchmove),this.el.addEventListener("touchend",M.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),M.isTouch&&(this.el.removeEventListener("touchmove",M.touchmove),this.el.removeEventListener("touchend",M.touchend)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_triggerEvent(t,e){return this.option[t]&&this.option[t](e),this}};Y.DDResizableHandle=F;F.prefix="ui-resizable-"});var K=b(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.DDBaseImplement=void 0;var mt=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)}};X.DDBaseImplement=mt});var Ct=b(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.DDResizable=void 0;var Qt=Mt(),Zt=K(),V=k(),N=z(),J=class a extends Zt.DDBaseImplement{constructor(t,e={}){super(),this._ui=()=>{let s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},n=this.temporalRect||r;return{position:{left:n.left-s.left,top:n.top-s.top},size:{width:n.width,height:n.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(s=>this.option[s]=t[s]),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),N.DDManager.overResizeElement===this&&delete N.DDManager.overResizeElement),this}_mouseOver(t){N.DDManager.overResizeElement||N.DDManager.dragElement||(N.DDManager.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){N.DDManager.overResizeElement===this&&(delete N.DDManager.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){let t=this.option.handles||"e,s,se";return t==="all"&&(t="n,e,s,w,se,sw,ne,nw"),this.handlers=t.split(",").map(e=>e.trim()).map(e=>new Qt.DDResizableHandle(this.el,e,{start:i=>{this._resizeStart(i)},stop:i=>{this._resizeStop(i)},move:i=>{this._resizing(i,e)}})),this}_resizeStart(t){this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=V.Utils.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();let e=V.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();let i=V.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){let e=V.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){let i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=t.clientX-i.clientX,n=t.clientY-i.clientY;e.indexOf("e")>-1?s.width+=r:e.indexOf("w")>-1&&(s.width-=r,s.left+=r),e.indexOf("s")>-1?s.height+=n:e.indexOf("n")>-1&&(s.height-=n,s.top+=n);let o=this._constrainSize(s.width,s.height);return Math.round(s.width)!==Math.round(o.width)&&(e.indexOf("w")>-1&&(s.left+=s.width-o.width),s.width=o.width),Math.round(s.height)!==Math.round(o.height)&&(e.indexOf("n")>-1&&(s.top+=s.height-o.height),s.height=o.height),s}_constrainSize(t,e){let i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,s=this.option.minWidth||t,r=this.option.maxHeight||Number.MAX_SAFE_INTEGER,n=this.option.minHeight||e,o=Math.min(i,Math.max(s,t)),l=Math.min(r,Math.max(n,e));return{width:o,height:l}}_applyChange(){let t={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let e=this.el.parentElement,{left:i,top:s}=e.getBoundingClientRect();t={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(e=>{let 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}};Q.DDResizable=J;J._originStyleProp=["width","height","position","left","top","opacity","zIndex"]});var St=b(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.DDDraggable=void 0;var m=z(),L=k(),te=K(),C=G(),Z=class a extends te.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(){this.disabled!==!1&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),C.isTouch&&(this.dragEl.addEventListener("touchstart",C.touchstart),this.dragEl.addEventListener("pointerdown",C.pointerdown)),this.el.classList.remove("ui-draggable-disabled"),this.el.classList.add("ui-draggable"))}disable(t=!1){this.disabled!==!0&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),C.isTouch&&(this.dragEl.removeEventListener("touchstart",C.touchstart),this.dragEl.removeEventListener("pointerdown",C.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(m.DDManager.mouseHandled)return;if(t.button!==0)return!0;let e=["input","textarea","button","select","option"],i=t.target.nodeName.toLowerCase();return e.find(s=>s===i)||t.target.closest('[contenteditable="true"]')||(this.mouseDownEvent=t,delete this.dragging,delete m.DDManager.dragElement,delete m.DDManager.dropElement,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),C.isTouch&&(this.dragEl.addEventListener("touchmove",C.touchmove),this.dragEl.addEventListener("touchend",C.touchend)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),m.DDManager.mouseHandled=!0),!0}_callDrag(t){if(!this.dragging)return;let e=L.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),m.DDManager.pauseDrag){let s=Number.isInteger(m.DDManager.pauseDrag)?m.DDManager.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(t),s)}else this._callDrag(t);else if(Math.abs(t.x-i.x)+Math.abs(t.y-i.y)>3){this.dragging=!0,m.DDManager.dragElement=this;let s=(e=this.el.gridstackNode)===null||e===void 0?void 0:e.grid;s?m.DDManager.dropElement=s.el.ddElement.ddDroppable:delete m.DDManager.dropElement,this.helper=this._createHelper(t),this._setupHelperContainmentStyle(),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment);let r=L.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),C.isTouch&&(this.dragEl.removeEventListener("touchmove",C.touchmove,!0),this.dragEl.removeEventListener("touchend",C.touchend,!0)),this.dragging){delete this.dragging,((e=m.DDManager.dropElement)===null||e===void 0?void 0:e.el)===this.el.parentElement&&delete m.DDManager.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();let i=L.Utils.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),m.DDManager.dropElement&&m.DDManager.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete m.DDManager.dragElement,delete m.DDManager.dropElement,delete m.DDManager.mouseHandled,t.preventDefault()}_createHelper(t){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(t):this.option.helper==="clone"&&(e=L.Utils.cloneNode(this.el)),document.body.contains(e)||L.Utils.appendTo(e,this.option.appendTo==="parent"?this.el.parentNode:this.option.appendTo),e===this.el&&(this.dragElementOriginStyle=a.originStyleProp.map(i=>this.el.style[i])),e}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging");let 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=(t=this.helper)===null||t===void 0?void 0:t.gridstackNode;if(!(e!=null&&e._isAboutToRemove)&&this.dragElementOriginStyle){let i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",a.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){let e={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=t.clientX+s.offsetLeft-e.left+"px",i.top=t.clientY+s.offsetTop-e.top+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,window.getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,e,i){let s=0,r=0;if(i){let o=document.createElement("div");L.Utils.addElStyles(o,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),i.appendChild(o);let l=o.getBoundingClientRect();i.removeChild(o),s=l.left,r=l.top}let n=e.getBoundingClientRect();return{left:n.left,top:n.top,offsetLeft:-t.clientX+n.left-s,offsetTop:-t.clientY+n.top-r,width:n.width,height:n.height}}ui(){let e=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:i.top-e.top,left:i.left-e.left}}}};tt.DDDraggable=Z;Z.originStyleProp=["transition","pointerEvents","position","left","top","minWidth","willChange"]});var Ht=b(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.DDDroppable=void 0;var w=z(),ee=K(),_t=k(),A=G(),vt=class extends ee.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(){this.disabled!==!1&&(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),A.isTouch&&(this.el.addEventListener("pointerenter",A.pointerenter),this.el.addEventListener("pointerleave",A.pointerleave)))}disable(t=!1){this.disabled!==!0&&(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),A.isTouch&&(this.el.removeEventListener("pointerenter",A.pointerenter),this.el.removeEventListener("pointerleave",A.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(!w.DDManager.dragElement||!this._canDrop(w.DDManager.dragElement.el))return;t.preventDefault(),t.stopPropagation(),w.DDManager.dropElement&&w.DDManager.dropElement!==this&&w.DDManager.dropElement._mouseLeave(t),w.DDManager.dropElement=this;let e=_t.Utils.initEvent(t,{target:this.el,type:"dropover"});this.option.over&&this.option.over(e,this._ui(w.DDManager.dragElement)),this.triggerEvent("dropover",e),this.el.classList.add("ui-droppable-over")}_mouseLeave(t){var e;if(!w.DDManager.dragElement||w.DDManager.dropElement!==this)return;t.preventDefault(),t.stopPropagation();let i=_t.Utils.initEvent(t,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(w.DDManager.dragElement)),this.triggerEvent("dropout",i),w.DDManager.dropElement===this){delete w.DDManager.dropElement;let s,r=this.el.parentElement;for(;!s&&r;)s=(e=r.ddElement)===null||e===void 0?void 0:e.ddDroppable,r=r.parentElement;s&&s._mouseEnter(t)}}drop(t){t.preventDefault();let e=_t.Utils.initEvent(t,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(e,this._ui(w.DDManager.dragElement)),this.triggerEvent("drop",e)}_canDrop(t){return t&&(!this.accept||this.accept(t))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?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())}};et.DDDroppable=vt});var Ut=b(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.DDElement=void 0;var ie=Ct(),se=St(),re=Ht(),yt=class a{constructor(t){this.el=t}static init(t){return t.ddElement||(t.ddElement=new a(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 se.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 ie.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 re.DDDroppable(this.el,t),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}};it.DDElement=yt});var wt=b(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.DDGridStack=void 0;var oe=k(),st=z(),ne=Ut(),bt=class{resizable(t,e,i,s){return this._getDDElements(t).forEach(r=>{if(e==="disable"||e==="enable")r.ddResizable&&r.ddResizable[e]();else if(e==="destroy")r.ddResizable&&r.cleanResizable();else if(e==="option")r.setupResizable({[i]:s});else{let n=r.el.gridstackNode.grid,o=r.el.getAttribute("gs-resize-handles")?r.el.getAttribute("gs-resize-handles"):n.opts.resizable.handles,l=!n.opts.alwaysShowResizeHandle;r.setupResizable(Object.assign(Object.assign(Object.assign({},n.opts.resizable),{handles:o,autoHide:l}),{start:e.start,stop:e.stop,resize:e.resize}))}}),this}draggable(t,e,i,s){return this._getDDElements(t).forEach(r=>{if(e==="disable"||e==="enable")r.ddDraggable&&r.ddDraggable[e]();else if(e==="destroy")r.ddDraggable&&r.cleanDraggable();else if(e==="option")r.setupDraggable({[i]:s});else{let n=r.el.gridstackNode.grid;r.setupDraggable(Object.assign(Object.assign({},n.opts.draggable),{start:e.start,stop:e.stop,drag:e.drag}))}}),this}dragIn(t,e){return this._getDDElements(t).forEach(i=>i.setupDraggable(e)),this}droppable(t,e,i,s){return typeof e.accept=="function"&&!e._accept&&(e._accept=e.accept,e.accept=r=>e._accept(r)),this._getDDElements(t).forEach(r=>{e==="disable"||e==="enable"?r.ddDroppable&&r.ddDroppable[e]():e==="destroy"?r.ddDroppable&&r.cleanDroppable():e==="option"?r.setupDroppable({[i]:s}):r.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(s=>s.on(e,r=>{i(r,st.DDManager.dragElement?st.DDManager.dragElement.el:r.target,st.DDManager.dragElement?st.DDManager.dragElement.helper:null)})),this}off(t,e){return this._getDDElements(t).forEach(i=>i.off(e)),this}_getDDElements(t,e=!0){let i=oe.Utils.getElements(t);if(!i.length)return[];let s=i.map(r=>r.ddElement||(e?ne.DDElement.init(r):null));return e||s.filter(r=>r),s}};rt.DDGridStack=bt});var kt=b(S=>{"use strict";var le=S&&S.__createBinding||(Object.create?function(a,t,e,i){i===void 0&&(i=e),Object.defineProperty(a,i,{enumerable:!0,get:function(){return t[e]}})}:function(a,t,e,i){i===void 0&&(i=e),a[i]=t[e]}),nt=S&&S.__exportStar||function(a,t){for(var e in a)e!=="default"&&!t.hasOwnProperty(e)&&le(t,a,e)};Object.defineProperty(S,"__esModule",{value:!0});S.GridStack=void 0;var Et=gt(),u=k(),E=ct(),ae=wt(),he=G(),ot=z(),_=new ae.DDGridStack;nt(ct(),S);nt(k(),S);nt(gt(),S);nt(wt(),S);var P=class a{constructor(t,e={}){var i,s;this._gsEventHandler={},this._extraDragRow=0,this.el=t,e=e||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),e.row&&(e.minRow=e.maxRow=e.row,delete e.row);let r=u.Utils.toNumber(t.getAttribute("gs-row"));e.column==="auto"&&delete e.column;let n=e;n.minWidth!==void 0&&(e.oneColumnSize=e.oneColumnSize||n.minWidth,delete n.minWidth),e.alwaysShowResizeHandle!==void 0&&(e._alwaysShowResizeHandle=e.alwaysShowResizeHandle);let o=Object.assign(Object.assign({},u.Utils.cloneDeep(E.gridDefaults)),{column:u.Utils.toNumber(t.getAttribute("gs-column"))||E.gridDefaults.column,minRow:r||u.Utils.toNumber(t.getAttribute("gs-min-row"))||E.gridDefaults.minRow,maxRow:r||u.Utils.toNumber(t.getAttribute("gs-max-row"))||E.gridDefaults.maxRow,staticGrid:u.Utils.toBool(t.getAttribute("gs-static"))||E.gridDefaults.staticGrid,draggable:{handle:(e.handleClass?"."+e.handleClass:e.handle?e.handle:"")||E.gridDefaults.draggable.handle},removableOptions:{accept:e.itemClass?"."+e.itemClass:E.gridDefaults.removableOptions.accept}});t.getAttribute("gs-animate")&&(o.animate=u.Utils.toBool(t.getAttribute("gs-animate"))),this.opts=u.Utils.defaults(e,o),e=null,this._initMargin(),this.opts.column!==1&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),this.opts.rtl==="auto"&&(this.opts.rtl=t.style.direction==="rtl"),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");let l=(i=u.Utils.closestUpByClass(this.el,E.gridDefaults.itemClass))===null||i===void 0?void 0:i.gridstackNode;l&&(l.subGrid=this,this.parentGridItem=l,this.el.classList.add("grid-stack-nested"),l.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=this.opts.cellHeight==="auto",this._isAutoCellHeight||this.opts.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof this.opts.cellHeight=="number"&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==E.gridDefaults.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),this.opts.alwaysShowResizeHandle==="mobile"&&(this.opts.alwaysShowResizeHandle=he.isTouch),this._styleSheetClass="grid-stack-instance-"+Et.GridStackEngine._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let h=this.opts.engineClass||a.engineClass||Et.GridStackEngine;if(this.engine=new h({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:d=>{let g=0;this.engine.nodes.forEach(c=>{g=Math.max(g,c.y+c.h)}),d.forEach(c=>{let p=c.el;p&&(c._removeDOM?(p&&p.remove(),delete c._removeDOM):this._writePosAttr(p,c))}),this._updateStyles(!1,g)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach(d=>this._prepareElement(d)),this.batchUpdate(!1)),this.opts.children){let d=this.opts.children;delete this.opts.children,d.length&&this.load(d)}this.setAnimation(this.opts.animate),this._updateStyles(),this.opts.column!=12&&this.el.classList.add("grid-stack-"+this.opts.column),this.opts.dragIn&&a.setupDragIn(this.opts.dragIn,this.opts.dragInOptions),delete this.opts.dragIn,delete this.opts.dragInOptions,this.opts.subGridDynamic&&!ot.DDManager.pauseDrag&&(ot.DDManager.pauseDrag=!0),((s=this.opts.draggable)===null||s===void 0?void 0:s.pause)!==void 0&&(ot.DDManager.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateWindowResizeEvent()}static init(t={},e=".grid-stack"){let i=a.getGridElement(e);return i?(i.gridstack||(i.gridstack=new a(i,u.Utils.cloneDeep(t))),i.gridstack):(console.error(typeof e=="string"?'GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ? -Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(t={},e=".grid-stack"){let i=[];return a.getGridElements(e).forEach(s=>{s.gridstack||(s.gridstack=new a(s,u.Utils.cloneDeep(t)),delete t.dragIn,delete t.dragInOptions),i.push(s.gridstack)}),i.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ? -Note: ".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")||e.addRemoveCB)if(e.addRemoveCB)i=e.addRemoveCB(t,e,!0,!0);else{let n=document.implementation.createHTMLDocument("");n.body.innerHTML=`
`,i=n.body.children[0],t.appendChild(i)}return a.init(e,i)}static registerEngine(t){a.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,E.gridDefaults.itemClass,this.opts.itemClass),this.placeholder.appendChild(t)}return this._placeholder}addWidget(t,e){function i(o){return o.el!==void 0||o.x!==void 0||o.y!==void 0||o.w!==void 0||o.h!==void 0||o.content!==void 0}let s,r;if(typeof t=="string"){let o=document.implementation.createHTMLDocument("");o.body.innerHTML=t,s=o.body.children[0]}else if(arguments.length===0||arguments.length===1&&i(t))if(r=e=t,r!=null&&r.el)s=r.el;else if(this.opts.addRemoveCB)s=this.opts.addRemoveCB(this.el,e,!0,!1);else{let o=(e==null?void 0:e.content)||"",l=document.implementation.createHTMLDocument("");l.body.innerHTML=`
${o}
`,s=l.body.children[0]}else s=t;if(!s)return;let n=this._readAttr(s);return e=u.Utils.cloneDeep(e)||{},u.Utils.defaults(e,n),r=this.engine.prepareNode(e),this._writeAttr(s,e),this._insertNotAppend?this.el.prepend(s):this.el.appendChild(s),this._prepareElement(s,!0,e),this._updateContainerHeight(),r.subGrid&&this.makeSubGrid(r.el,void 0,void 0,!1),this._prevColumn&&this.opts.column===1&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,s}makeSubGrid(t,e,i,s=!0){var r,n,o;let l=t.gridstackNode;if(l||(l=this.makeWidget(t).gridstackNode),!((r=l.subGrid)===null||r===void 0)&&r.el)return l.subGrid;let h,d=this;for(;d&&!h;)h=(n=d.opts)===null||n===void 0?void 0:n.subGrid,d=(o=d.parentGridItem)===null||o===void 0?void 0:o.grid;e=u.Utils.cloneDeep(Object.assign(Object.assign(Object.assign({},h||{}),{children:void 0}),e||l.subGrid)),l.subGrid=e;let g;e.column==="auto"&&(g=!0,e.column=Math.max(l.w||1,(i==null?void 0:i.w)||1),e.disableOneColumnMode=!0);let c=l.el.querySelector(".grid-stack-item-content"),p,D;if(s){if(this._removeDD(l.el),D=Object.assign(Object.assign({},l),{x:0,y:0}),u.Utils.removeInternalForSave(D),delete D.subGrid,l.content&&(D.content=l.content,delete l.content),this.opts.addRemoveCB)p=this.opts.addRemoveCB(this.el,D,!0,!1);else{let y=document.implementation.createHTMLDocument("");y.body.innerHTML='
',p=y.body.children[0],p.appendChild(c),y.body.innerHTML='
',c=y.body.children[0],l.el.appendChild(c)}this._prepareDragDropByNode(l)}if(i){let y=g?e.column:l.w,T=l.h+i.h,I=l.el.style;I.transition="none",this.update(l.el,{w:y,h:T}),setTimeout(()=>I.transition=null)}this.opts.addRemoveCB&&(e.addRemoveCB=e.addRemoveCB||this.opts.addRemoveCB);let H=l.subGrid=a.addGrid(c,e);return i!=null&&i._moving&&(H._isTemp=!0),g&&(H._autoColumn=!0),s&&H.addWidget(p,D),i&&(i._moving?window.setTimeout(()=>u.Utils.simulateMouseEvent(i._event,"mouseenter",H.el),0):H.addWidget(l.el,l)),H}removeAsSubGrid(t){var e;let i=(e=this.parentGridItem)===null||e===void 0?void 0:e.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridItem.x,s.y+=this.parentGridItem.y,i.addWidget(s.el,s)}),i.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,t&&window.setTimeout(()=>u.Utils.simulateMouseEvent(t._event,"mouseenter",i.el),0))}save(t=!0,e=!1){let i=this.engine.save(t);if(i.forEach(s=>{var r;if(t&&s.el&&!s.subGrid){let n=s.el.querySelector(".grid-stack-item-content");s.content=n?n.innerHTML:void 0,s.content||delete s.content}else if(t||delete s.content,!((r=s.subGrid)===null||r===void 0)&&r.el){let n=s.subGrid.save(t,e);s.subGrid=e?n:{children:n}}delete s.el}),e){let s=u.Utils.cloneDeep(this.opts);s.marginBottom===s.marginTop&&s.marginRight===s.marginLeft&&s.marginTop===s.marginRight&&(s.margin=s.marginTop,delete s.marginTop,delete s.marginRight,delete s.marginBottom,delete s.marginLeft),s.rtl===(this.el.style.direction==="rtl")&&(s.rtl="auto"),this._isAutoCellHeight&&(s.cellHeight="auto"),this._autoColumn&&(s.column="auto",delete s.disableOneColumnMode);let r=s._alwaysShowResizeHandle;return delete s._alwaysShowResizeHandle,r!==void 0?s.alwaysShowResizeHandle=r:delete s.alwaysShowResizeHandle,u.Utils.removeInternalAndSame(s,E.gridDefaults),s.children=i,s}return i}load(t,e=this.opts.addRemoveCB||!0){let i=a.Utils.sort([...t],-1,this._prevColumn||this.getColumn());this._insertNotAppend=!0,this._prevColumn&&this._prevColumn!==this.opts.column&&i.some(n=>n.x+n.w>this.opts.column)&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(i,this._prevColumn,!0));let s=this.opts.addRemoveCB;typeof e=="function"&&(this.opts.addRemoveCB=e);let r=[];return this.batchUpdate(),e&&[...this.engine.nodes].forEach(o=>{i.find(h=>o.id===h.id)||(this.opts.addRemoveCB&&this.opts.addRemoveCB(this.el,o,!1,!1),r.push(o),this.removeWidget(o.el,!0,!1))}),i.forEach(n=>{let o=n.id||n.id===0?this.engine.nodes.find(l=>l.id===n.id):void 0;if(o){if(this.update(o.el,n),n.subGrid&&n.subGrid.children){let l=o.el.querySelector(".grid-stack");l&&l.gridstack&&(l.gridstack.load(n.subGrid.children),this._insertNotAppend=!0)}}else e&&this.addWidget(n)}),this.engine.removedNodes=r,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,s?this.opts.addRemoveCB=s:delete this.opts.addRemoveCB,this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;let e=this.el.querySelector("."+this.opts.itemClass);if(e){let s=u.Utils.toNumber(e.getAttribute("gs-h"));return Math.round(e.offsetHeight/s)}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&&t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateWindowResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+s}let i=u.Utils.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(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=this.getColumn();t===1?this._prevColumn=i:delete this._prevColumn,this.el.classList.remove("grid-stack-"+i),this.el.classList.add("grid-stack-"+t),this.opts.column=this.engine.column=t;let s;return t===1&&this.opts.oneColumnModeDomSort&&(s=[],this.getGridItems().forEach(r=>{r.gridstackNode&&s.push(r.gridstackNode)}),s.length||(s=void 0)),this.engine.updateNodeWidths(i,t,s,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"),this.parentGridItem&&delete this.parentGridItem.subGrid,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=this.el.getBoundingClientRect(),s;e?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};let r=t.left-s.left,n=t.top-s.top,o=i.width/this.getColumn(),l=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/o),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(t,e,i,s){return this.engine.isAreaEmpty(t,e,i,s)}makeWidget(t){let e=a.getElement(t);return this._prepareElement(e,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),e}on(t,e){return t.indexOf(" ")!==-1?(t.split(" ").forEach(s=>this.on(s,e)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=s=>e(s):this._gsEventHandler[t]=s=>e(s,s.detail),this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"?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.'),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}removeWidget(t,e=!0,i=!0){return a.getElements(t).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(n=>s===n.el)),r&&(delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,e,i),e&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(t=!0){return this.engine.nodes.forEach(e=>{delete e.el.gridstackNode,this._removeDD(e.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,i=!0){return this.opts.staticGrid===t?this:(this.opts.staticGrid=t,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(t,e,i)}),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,s=1;return e={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(t,e)}return a.getElements(t).forEach(i=>{if(!i||!i.gridstackNode)return;let s=i.gridstackNode,r=u.Utils.cloneDeep(e);delete r.autoPosition;let n=["x","y","w","h"],o;if(n.some(d=>r[d]!==void 0&&r[d]!==s[d])&&(o={},n.forEach(d=>{o[d]=r[d]!==void 0?r[d]:s[d],delete r[d]})),!o&&(r.minW||r.minH||r.maxW||r.maxH)&&(o={}),r.content){let d=i.querySelector(".grid-stack-item-content");d&&d.innerHTML!==r.content&&(d.innerHTML=r.content),delete r.content}let l=!1,h=!1;for(let d in r)d[0]!=="_"&&s[d]!==r[d]&&(s[d]=r[d],l=!0,h=h||!this.opts.staticGrid&&(d==="noResize"||d==="noMove"||d==="locked"));o&&(this.engine.cleanNodes().beginUpdate(s).moveNode(s,o),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()),l&&this._writeAttr(i,s),h&&this._prepareDragDropByNode(s)}),this}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=u.Utils.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.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 e=arguments,i=0,s={x:e[i++],y:e[i++],w:e[i++],h:e[i++],autoPosition:e[i++]};return this.willItFit(s)}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:(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:(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&&(u.Utils.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(t=!1,e){if(t&&this._removeStylesheet(),e||(e=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let n=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=u.Utils.createStylesheet(this._styleSheetClass,n,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,u.Utils.addCSSRule(this._styles,r,`min-height: ${i}${s}`);let o=this.opts.marginTop+this.opts.marginUnit,l=this.opts.marginBottom+this.opts.marginUnit,h=this.opts.marginRight+this.opts.marginUnit,d=this.opts.marginLeft+this.opts.marginUnit,g=`${r} > .grid-stack-item-content`,c=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;u.Utils.addCSSRule(this._styles,g,`top: ${o}; right: ${h}; bottom: ${l}; left: ${d};`),u.Utils.addCSSRule(this._styles,c,`top: ${o}; right: ${h}; bottom: ${l}; left: ${d};`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${h}`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${h}`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${h}; bottom: ${l}`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${d}`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${d}`),u.Utils.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${d}; bottom: ${l}`)}if(e=e||this._styles._max,e>this._styles._max){let n=o=>i*o+s;for(let o=this._styles._max+1;o<=e;o++){let l=n(o);u.Utils.addCSSRule(this._styles,`${r}[gs-y="${o-1}"]`,`top: ${n(o-1)}`),u.Utils.addCSSRule(this._styles,`${r}[gs-h="${o}"]`,`height: ${l}`),u.Utils.addCSSRule(this._styles,`${r}[gs-min-h="${o}"]`,`min-height: ${l}`),u.Utils.addCSSRule(this._styles,`${r}[gs-max-h="${o}"]`,`max-height: ${l}`)}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)),t===0)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){t.classList.add(this.opts.itemClass),i=i||this._readAttr(t),t.gridstackNode=i,i.el=t,i.grid=this;let s=Object.assign({},i);return i=this.engine.addNode(i,e),u.Utils.same(i,s)||this._writeAttr(t,i),this._prepareDragDropByNode(i),this}_writePosAttr(t,e){return e.x!==void 0&&e.x!==null&&t.setAttribute("gs-x",String(e.x)),e.y!==void 0&&e.y!==null&&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"};for(let s in i)e[s]?t.setAttribute(i[s],String(e[s])):t.removeAttribute(i[s]);return this}_readAttr(t){let e={};e.x=u.Utils.toNumber(t.getAttribute("gs-x")),e.y=u.Utils.toNumber(t.getAttribute("gs-y")),e.w=u.Utils.toNumber(t.getAttribute("gs-w")),e.h=u.Utils.toNumber(t.getAttribute("gs-h")),e.maxW=u.Utils.toNumber(t.getAttribute("gs-max-w")),e.minW=u.Utils.toNumber(t.getAttribute("gs-min-w")),e.maxH=u.Utils.toNumber(t.getAttribute("gs-max-h")),e.minH=u.Utils.toNumber(t.getAttribute("gs-min-h")),e.autoPosition=u.Utils.toBool(t.getAttribute("gs-auto-position")),e.noResize=u.Utils.toBool(t.getAttribute("gs-no-resize")),e.noMove=u.Utils.toBool(t.getAttribute("gs-no-move")),e.locked=u.Utils.toBool(t.getAttribute("gs-locked")),e.id=t.getAttribute("gs-id");for(let i in e){if(!e.hasOwnProperty(i))return;!e[i]&&e[i]!==0&&delete e[i]}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;this.opts.column===1!==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=u.Utils.throttle(()=>this.cellHeight(),this.opts.cellHeightThrottle)),this._cellHeightThrottle()):this.cellHeight()),this.engine.nodes.forEach(e=>{e.subGrid&&e.subGrid.onParentResize()}),this}_updateWindowResizeEvent(t=!1){let e=(this._isAutoCellHeight||!this.opts.disableOneColumnMode)&&!this.parentGridItem;return!t&&e&&!this._windowResizeBind?(this._windowResizeBind=this.onParentResize.bind(this),window.addEventListener("resize",this._windowResizeBind)):(t||!e)&&this._windowResizeBind&&(window.removeEventListener("resize",this._windowResizeBind),delete this._windowResizeBind),this}static getElement(t=".grid-stack-item"){return u.Utils.getElement(t)}static getElements(t=".grid-stack-item"){return u.Utils.getElements(t)}static getGridElement(t){return a.getElement(t)}static getGridElements(t){return u.Utils.getElements(t)}_initMargin(){let t,e=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(t=u.Utils.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,e=this.opts.margin=t.h),this.opts.marginTop===void 0?this.opts.marginTop=e:(t=u.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=t.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=e:(t=u.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=t.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=e:(t=u.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=t.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=e:(t=u.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 getDD(){return _}static setupDragIn(t,e){(e==null?void 0:e.pause)!==void 0&&(ot.DDManager.pauseDrag=e.pause),typeof t=="string"&&(e=Object.assign(Object.assign({},E.dragInDefaultOptions),e||{}),u.Utils.getElements(t).forEach(i=>{_.isDraggable(i)||_.dragIn(i,e)}))}movable(t,e){return this.opts.staticGrid?this:(a.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(t,e){return this.opts.staticGrid?this:(a.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this}enable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this}enableMove(t,e=!0){return this.opts.staticGrid?this:(this.opts.disableDrag=!t,this.engine.nodes.forEach(i=>{this.movable(i.el,t),i.subGrid&&e&&i.subGrid.enableMove(t,e)}),this)}enableResize(t,e=!0){return this.opts.staticGrid?this:(this.opts.disableResize=!t,this.engine.nodes.forEach(i=>{this.resizable(i.el,t),i.subGrid&&e&&i.subGrid.enableResize(t,e)}),this)}_removeDD(t){return _.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return _.droppable(this.el,"destroy"),this;let t,e,i=(s,r,n)=>{let o=r.gridstackNode;if(!o)return;n=n||r;let l=this.el.getBoundingClientRect(),{top:h,left:d}=n.getBoundingClientRect();d-=l.left,h-=l.top;let g={position:{top:h,left:d}};if(o._temporaryRemoved){if(o.x=Math.max(0,Math.round(d/e)),o.y=Math.max(0,Math.round(h/t)),delete o.autoPosition,this.engine.nodeBoundFix(o),!this.engine.willItFit(o)){if(o.autoPosition=!0,!this.engine.willItFit(o)){_.off(r,"drag");return}o._willFitPos&&(u.Utils.copyPos(o,o._willFitPos),delete o._willFitPos)}this._onStartMoving(n,s,g,o,e,t)}else this._dragOrResize(n,s,g,o,e,t)};return _.droppable(this.el,{accept:s=>{let r=s.gridstackNode;if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let n=!0;if(typeof this.opts.acceptWidgets=="function")n=this.opts.acceptWidgets(s);else{let o=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;n=s.matches(o)}if(n&&r&&this.opts.maxRow){let o={w:r.w,h:r.h,minW:r.minW,minH:r.minH};n=this.engine.willItFit(o)}return n}}).on(this.el,"dropover",(s,r,n)=>{let o=r.gridstackNode;if((o==null?void 0:o.grid)===this&&!o._temporaryRemoved)return!1;o!=null&&o.grid&&o.grid!==this&&!o._temporaryRemoved&&o.grid._leave(r,n),e=this.cellWidth(),t=this.getCellHeight(!0),o||(o=this._readAttr(r)),o.grid||(o._isExternal=!0,r.gridstackNode=o),n=n||r;let l=o.w||Math.round(n.offsetWidth/e)||1,h=o.h||Math.round(n.offsetHeight/t)||1;return o.grid&&o.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=o),r.gridstackNode=o=Object.assign(Object.assign({},o),{w:l,h,grid:this}),this.engine.cleanupNode(o).nodeBoundFix(o),o._initDD=o._isExternal=o._temporaryRemoved=!0):(o.w=l,o.h=h,o._temporaryRemoved=!0),this._itemRemoving(o.el,!1),_.on(r,"drag",i),i(s,r,n),!1}).on(this.el,"dropout",(s,r,n)=>{let o=r.gridstackNode;return o&&(!o.grid||o.grid===this)&&(this._leave(r,n),this._isTemp&&this.removeAsSubGrid(o)),!1}).on(this.el,"drop",(s,r,n)=>{var o,l;let h=r.gridstackNode;if((h==null?void 0:h.grid)===this&&!h._isExternal)return!1;let d=!!this.placeholder.parentElement;this.placeholder.remove();let g=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,d&&(g!=null&&g.grid)&&g.grid!==this){let p=g.grid;p.engine.removedNodes.push(g),p._triggerRemoveEvent()._triggerChangeEvent(),p.parentGridItem&&!p.engine.nodes.length&&p.opts.subGridDynamic&&p.removeAsSubGrid()}if(!h||(d&&(this.engine.cleanupNode(h),h.grid=this),_.off(r,"drag"),n!==r?(n.remove(),r.gridstackNode=g,d&&(r=r.cloneNode(!0))):(r.remove(),this._removeDD(r)),!d))return!1;r.gridstackNode=h,h.el=r;let c=(l=(o=h.subGrid)===null||o===void 0?void 0:o.el)===null||l===void 0?void 0:l.gridstack;return u.Utils.copyPos(h,this._readAttr(this.placeholder)),u.Utils.removePositioningStyles(r),this._writeAttr(r,h),r.classList.add(E.gridDefaults.itemClass,this.opts.itemClass),this.el.appendChild(r),c&&(c.parentGridItem=h,c.opts.styleInHead||c._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(h),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Object.assign(Object.assign({},s),{type:"dropped"}),g&&g.grid?g:void 0,h),window.setTimeout(()=>{h.el&&h.el.parentElement?this._prepareDragDropByNode(h):this.engine.removeNode(h),delete h.grid._isTemp}),!1}),this}_itemRemoving(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"))}_setupRemoveDrop(){if(!this.opts.staticGrid&&typeof this.opts.removable=="string"){let t=document.querySelector(this.opts.removable);if(!t)return this;_.isDroppable(t)||_.droppable(t,this.opts.removableOptions).on(t,"dropover",(e,i)=>this._itemRemoving(i,!0)).on(t,"dropout",(e,i)=>this._itemRemoving(i,!1))}return this}_prepareDragDropByNode(t){let e=t.el,i=t.noMove||this.opts.disableDrag,s=t.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return t._initDD&&(this._removeDD(e),delete t._initDD),e.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!t._initDD){let r,n,o=(d,g)=>{this._gsEventHandler[d.type]&&this._gsEventHandler[d.type](d,d.target),r=this.cellWidth(),n=this.getCellHeight(!0),this._onStartMoving(e,d,g,t,r,n)},l=(d,g)=>{this._dragOrResize(e,d,g,t,r,n)},h=d=>{this.placeholder.remove(),delete t._moving,delete t._event,delete t._lastTried;let g=d.target;if(!(!g.gridstackNode||g.gridstackNode.grid!==this)){if(t.el=g,t._isAboutToRemove){let c=e.gridstackNode.grid;c._gsEventHandler[d.type]&&c._gsEventHandler[d.type](d,g),this._removeDD(e),c.engine.removedNodes.push(t),c._triggerRemoveEvent(),delete e.gridstackNode,delete t.el,e.remove()}else u.Utils.removePositioningStyles(g),t._temporaryRemoved?(u.Utils.copyPos(t,t._orig),this._writePosAttr(g,t),this.engine.addNode(t)):this._writePosAttr(g,t),this._gsEventHandler[d.type]&&this._gsEventHandler[d.type](d,g);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}};_.draggable(e,{start:o,stop:h,drag:l}).resizable(e,{start:o,stop:h,resize:l}),t._initDD=!0}return _.draggable(e,i?"disable":"enable").resizable(e,s?"disable":"enable"),this}_onStartMoving(t,e,i,s,r,n){this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=e.type==="dragstart",delete s._lastTried,e.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),e.type==="resizestart"&&(_.resizable(t,"option","minWidth",r*(s.minW||1)).resizable(t,"option","minHeight",n*(s.minH||1)),s.maxW&&_.resizable(t,"option","maxWidth",r*s.maxW),s.maxH&&_.resizable(t,"option","maxHeight",n*s.maxH))}_dragOrResize(t,e,i,s,r,n){let o=Object.assign({},s._orig),l,h=this.opts.marginLeft,d=this.opts.marginRight,g=this.opts.marginTop,c=this.opts.marginBottom,p=Math.round(n*.1),D=Math.round(r*.1);if(h=Math.min(h,D),d=Math.min(d,D),g=Math.min(g,p),c=Math.min(c,p),e.type==="drag"){if(s._temporaryRemoved)return;let y=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&u.Utils.updateScrollPosition(t,i.position,y);let T=i.position.left+(i.position.left>s._lastUiPosition.left?-d:h),I=i.position.top+(i.position.top>s._lastUiPosition.top?-c:g);o.x=Math.round(T/r),o.y=Math.round(I/n);let Ot=this._extraDragRow;if(this.engine.collide(s,o)){let ht=this.getRow(),dt=Math.max(0,o.y+s.h-ht);this.opts.maxRow&&ht+dt>this.opts.maxRow&&(dt=Math.max(0,this.opts.maxRow-ht)),this._extraDragRow=dt}else this._extraDragRow=0;if(this._extraDragRow!==Ot&&this._updateContainerHeight(),s.x===o.x&&s.y===o.y)return}else if(e.type==="resize"){if(o.x<0||(u.Utils.updateScrollResize(e,t,n),o.w=Math.round((i.size.width-h)/r),o.h=Math.round((i.size.height-g)/n),s.w===o.w&&s.h===o.h)||s._lastTried&&s._lastTried.w===o.w&&s._lastTried.h===o.h)return;let y=i.position.left+h,T=i.position.top+g;o.x=Math.round(y/r),o.y=Math.round(T/n),l=!0}s._event=e,s._lastTried=o;let H={x:i.position.left+h,y:i.position.top+g,w:(i.size?i.size.width:s.w*r)-h-d,h:(i.size?i.size.height:s.h*n)-g-c};if(this.engine.moveNodeCheck(s,Object.assign(Object.assign({},o),{cellWidth:r,cellHeight:n,rect:H,resizing:l}))){s._lastUiPosition=i.position,this.engine.cacheRects(r,n,g,d,c,h),delete s._skipDown,l&&s.subGrid&&s.subGrid.onParentResize(),this._extraDragRow=0,this._updateContainerHeight();let y=e.target;this._writePosAttr(y,s),this._gsEventHandler[e.type]&&this._gsEventHandler[e.type](e,y)}}_leave(t,e){let i=t.gridstackNode;i&&(_.off(t,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&e?e:t,this.opts.removable===!0&&this._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):i._isExternal&&(delete i.el,delete t.gridstackNode,this.engine.restoreInitial())))}commit(){return u.obsolete(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}};S.GridStack=P;P.Utils=u.Utils;P.Engine=Et.GridStackEngine;P.GDRev="7.3.0"});var zt=It(kt()),lt=!1,B=[],U=[];function at(a){a.forEach(function(t,e){var i=t.getGridItems();B[e]={},i.forEach(function(s){B[e][s.gridstackNode.id]=s})})}function Nt(a){var t=a.gridstackNode.grid.el.getAttribute("data-grid-id");return t==="2"?!0:a.getAttribute("data-full-depth")==="False"}function de(a){return!0}function Dt(a,t){return zt.GridStack.init(options={cellHeight:11,margin:0,marginBottom:1,float:!0,disableOneColumnMode:!0,animate:!0,removeTimeout:100,disableResize:!0,acceptWidgets:t},a)}function ue(a,t){at(U),console.log(t);var e={};B.forEach((i,s)=>{let r=[];for(let n in i){let o=i[n];if(o.getAttribute("data-item-face")!=="back"){let l=parseInt(o.getAttribute("gs-y"))/2,h=parseInt(o.getAttribute("gs-h"))/2,d=o.gridstackNode.grid.el.getAttribute("gs-max-row")/2,g;t?g=l+1:g=h>1?d-l-h+1:d-l,r.push({id:parseInt(o.getAttribute("gs-id")),x:parseInt(o.getAttribute("gs-x")),y:g,is_full_depth:o.getAttribute("data-full-depth"),face:o.getAttribute("data-item-face")})}}names={0:"front",1:"rear",2:"other"},e[names[s]]=r,e.rack_id=a});try{fetch("/"+basePath+"api/plugins/reorder/save/"+a+"/",{method:"PUT",headers:{"Content-Type":"application/json","X-CSRFToken":netbox_csrf_token},body:JSON.stringify(e)}).then(s=>{if(s.ok){lt=!1;var r=document.getElementById("saveButton");r.setAttribute("disabled","disabled"),s.json().then(n=>{console.log(n)}),window.location.href=returnUrl}})}catch(i){console.error("Error:",i)}}var ge=Dt("#grid-front",Nt),ce=Dt("#grid-rear",Nt),fe=Dt("#grid-other",de);U=[ge,ce,fe];at(U);U.forEach(function(a,t){a.on("change",function(e,i){lt=!0;var s=document.getElementById("saveButton");s.removeAttribute("disabled"),i.forEach(function(r){var n=t===0?1:0,o=B[n];if(o&&o[r.id]){var l=o[r.id],h=U[n];h.update(l,{x:r.x,y:r.y})}})}),a.on("dropped",function(e,i,s){lt=!0;var r=document.getElementById("saveButton");r.removeAttribute("disabled");var n=U.indexOf(i.grid);if(t===0?s.el.setAttribute("data-item-face","front"):t===1&&s.el.setAttribute("data-item-face","rear"),n===2){var o=t===0?1:0,l=U[o];if(l&&s.el.getAttribute("data-full-depth")==="True"){var h=s.el.cloneNode(!0),d=h.querySelector(".grid-stack-item-content");d.removeAttribute("style"),d.classList.add("device_rear"),h.setAttribute("data-item-face","back"),l.addWidget(h)}at(U)}else if((n===0||n===1)&&t===2){if(s.el.getAttribute("data-full-depth")==="True"){var h=s.el.querySelector(".grid-stack-item-content");h.removeAttribute("style"),h.classList.remove("device_rear"),h.setAttribute("data-item-face","front");var g=s.el.getAttribute("data-item-color"),c=s.el.getAttribute("data-item-text-color");h.style="background-color: #"+g+"; color: #"+c+";";var o=n===0?1:0,l=U[o],p=B[o][i.el.getAttribute("gs-id")];l.removeWidget(p)}at(U)}})});var pe=document.getElementById("saveButton");pe.addEventListener("click",function(a){ue(rackId,descUnits)});window.addEventListener("beforeunload",function(a){lt&&(a.returnValue="Are you sure you want to leave? Changes you made may not be saved.")});})(); +(()=>{var st=Object.defineProperty,rt=Object.defineProperties;var nt=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable;var J=(h,t,e)=>t in h?st(h,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):h[t]=e,m=(h,t)=>{for(var e in t||(t={}))ot.call(t,e)&&J(h,e,t[e]);if(K)for(var e of K(t))lt.call(t,e)&&J(h,e,t[e]);return h},w=(h,t)=>rt(h,nt(t));function Q(h,t,e,i,s){let r=(...o)=>(console.warn("gridstack.js: Function `"+e+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"),t.apply(h,o));return r.prototype=t.prototype,r}var l=class h{static getElements(t,e=document){if(typeof t=="string"){let i="getElementById"in e?e:void 0;if(i&&!isNaN(+t[0])){let r=i.getElementById(t);return r?[r]:[]}let s=e.querySelectorAll(t);return!s.length&&t[0]!=="."&&t[0]!=="#"&&(s=e.querySelectorAll("."+t),s.length||(s=e.querySelectorAll("#"+t))),Array.from(s)}return[t]}static getElement(t,e=document){if(typeof t=="string"){let i="getElementById"in e?e:void 0;if(!t.length)return null;if(i&&t[0]==="#")return i.getElementById(t.substring(1));if(t[0]==="#"||t[0]==="."||t[0]==="[")return e.querySelector(t);if(i&&!isNaN(+t[0]))return i.getElementById(t);let s=e.querySelector(t);return i&&!s&&(s=i.getElementById(t)),s||(s=e.querySelector("."+t)),s}return t}static shouldSizeToContent(t,e=!1){return(t==null?void 0:t.grid)&&(e?t.sizeToContent===!0||t.grid.opts.sizeToContent===!0&&t.sizeToContent===void 0:!!t.sizeToContent||t.grid.opts.sizeToContent&&t.sizeToContent!==!1)}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 h.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,s=t.x+t.we.y?t.y:e.y,o=t.y+t.h{var n,d,u,f;let o=e*(((n=s.y)!=null?n:1e4)-((d=r.y)!=null?d:1e4));return o===0?e*(((u=s.x)!=null?u:1e4)-((f=r.x)!=null?f:1e4)):o})}static find(t,e){return e?t.find(i=>i.id===e):void 0}static createStylesheet(t,e,i){let s=document.createElement("style"),r=i==null?void 0:i.nonce;return r&&(s.nonce=r),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",t),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),e?e.insertBefore(s,e.firstChild):(e=document.getElementsByTagName("head")[0],e.appendChild(s)),s.sheet}static removeStylesheet(t,e){let s=(e||document).querySelector("STYLE[gs-style-id="+t+"]");s&&s.parentNode&&s.remove()}static addCSSRule(t,e,i){typeof t.addRule=="function"?t.addRule(e,i):typeof t.insertRule=="function"&&t.insertRule(`${e}{${i}}`)}static toBool(t){return typeof t=="boolean"?t:typeof t=="string"?(t=t.toLowerCase(),!(t===""||t==="no"||t==="false"||t==="0")):!!t}static toNumber(t){return t===null||t.length===0?void 0:Number(t)}static parseHeight(t){let e,i="px";if(typeof t=="string")if(t==="auto"||t==="")e=0;else{let s=t.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!s)throw new Error(`Invalid height val = ${t}`);i=s[2]||"px",e=parseFloat(s[1])}else e=t;return{h:e,unit:i}}static defaults(t,...e){return e.forEach(i=>{for(let s in i){if(!i.hasOwnProperty(s))return;t[s]===null||t[s]===void 0?t[s]=i[s]:typeof i[s]=="object"&&typeof t[s]=="object"&&this.defaults(t[s],i[s])}}),t}static same(t,e){if(typeof t!="object")return t==e;if(typeof t!=typeof e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(t[i]!==e[i])return!1;return!0}static copyPos(t,e,i=!1){return e.x!==void 0&&(t.x=e.x),e.y!==void 0&&(t.y=e.y),e.w!==void 0&&(t.w=e.w),e.h!==void 0&&(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||1)===(e.w||1)&&(t.h||1)===(e.h||1)}static sanitizeMinMax(t){t.minW||delete t.minW,t.minH||delete t.minH,t.maxW||delete t.maxW,t.maxH||delete t.maxH}static removeInternalAndSame(t,e){if(!(typeof t!="object"||typeof e!="object"))for(let i in t){let s=t[i];if(i[0]==="_"||s===e[i])delete t[i];else if(s&&typeof s=="object"&&e[i]!==void 0){for(let r in s)(s[r]===e[i][r]||r[0]==="_")&&delete s[r];Object.keys(s).length||delete t[i]}}}static removeInternalForSave(t,e=!0){for(let i in t)(i[0]==="_"||t[i]===null||t[i]===void 0)&&delete t[i];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,(t.w===1||t.w===t.minW)&&delete t.w,(t.h===1||t.h===t.minH)&&delete t.h}static throttle(t,e){let i=!1;return(...s)=>{i||(i=!0,setTimeout(()=>{t(...s),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;let e=getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowY)?t:this.getScrollElement(t.parentElement)}static updateScrollPosition(t,e,i){let s=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>r){let o=s.bottom-r,n=s.top,d=this.getScrollElement(t);if(d!==null){let u=d.scrollTop;s.top<0&&i<0?t.offsetHeight>r?d.scrollTop+=i:d.scrollTop+=Math.abs(n)>Math.abs(i)?i:n:i>0&&(t.offsetHeight>r?d.scrollTop+=i:d.scrollTop+=o>i?i:o),e.top+=d.scrollTop-u}}}static updateScrollResize(t,e,i){let s=this.getScrollElement(e),r=s.clientHeight,o=s===this.getScrollElement()?0:s.getBoundingClientRect().top,n=t.clientY-o,d=nr-i;d?s.scrollBy({behavior:"smooth",top:n-i}):u&&s.scrollBy({behavior:"smooth",top:i-(r-n)})}static clone(t){return t==null||typeof t!="object"?t:t instanceof Array?[...t]:m({},t)}static cloneDeep(t){let e=["parentGrid","el","grid","subGrid","engine"],i=h.clone(t);for(let s in i)i.hasOwnProperty(s)&&typeof i[s]=="object"&&s.substring(0,2)!=="__"&&!e.find(r=>r===s)&&(i[s]=h.cloneDeep(t[s]));return i}static cloneNode(t){let e=t.cloneNode(!0);return e.removeAttribute("id"),e}static appendTo(t,e){let i;typeof e=="string"?i=h.getElement(e):i=e,i&&i.appendChild(t)}static addElStyles(t,e){if(e instanceof Object)for(let i in e)e.hasOwnProperty(i)&&(Array.isArray(e[i])?e[i].forEach(s=>{t.style[i]=s}):t.style[i]=e[i])}static initEvent(t,e){let i={type:e.type},s={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(r=>i[r]=t[r]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(r=>i[r]=t[r]),m(m({},i),s)}static simulateMouseEvent(t,e,i){let s=document.createEvent("MouseEvents");s.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(s)}static getValuesFromTransformedElement(t){let e=document.createElement("div");h.addElStyles(e,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),t.appendChild(e);let i=e.getBoundingClientRect();return t.removeChild(e),e.remove(),{xScale:1/i.width,yScale:1/i.height,xOffset:i.left,yOffset:i.top}}};var k=class h{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,e=!0){return!!this.batchMode===t?this:(this.batchMode=t,t?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,e&&this._packNodes(),this._notify()),this)}_useEntireRowArea(t,e){return(!this.float||this.batchMode&&!this._prevFloat)&&!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),!i)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,n={nested:!0,pack:!1};for(;i=i||this.collide(t,r,s.skip);){let d;if(i.locked||t._moving&&!t._skipDown&&e.y>t.y&&!this.float&&(!this.collide(i,w(m({},i),{y:t.y}),t)||!this.collide(i,w(m({},i),{y:e.y-i.h}),t))?(t._skipDown=t._skipDown||e.y>t.y,d=this.moveNode(t,m(w(m({},e),{y:i.y+i.h}),n)),i.locked&&d?l.copyPos(e,t):!i.locked&&d&&s.pack&&(this._packNodes(),e.y=i.y+i.h,l.copyPos(t,e)),o=o||d):d=this.moveNode(i,m(w(m({},i),{y:e.y+e.h,skip:t}),n)),!d)return o;i=void 0}return o}collide(t,e=t,i){let s=t._id,r=i==null?void 0:i._id;return this.nodes.find(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,e))}collideAll(t,e=t,i){let s=t._id,r=i==null?void 0:i._id;return this.nodes.filter(o=>o._id!==s&&o._id!==r&&l.isIntercepted(o,e))}directionCollideCoverage(t,e,i){if(!e.rect||!t._rect)return;let s=t._rect,r=m({},e.rect);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;let o,n=.5;for(let d of i){if(d.locked||!d._rect)break;let u=d._rect,f=Number.MAX_VALUE,a=Number.MAX_VALUE;s.yu.y+u.h&&(f=(u.y+u.h-r.y)/u.h),s.xu.x+u.w&&(a=(u.x+u.w-r.x)/u.w);let c=Math.min(a,f);c>n&&(n=c,o=d)}return e.collide=o,o}cacheRects(t,e,i,s,r,o){return this.nodes.forEach(n=>n._rect={y:n.y*e+i,x:n.x*t+o,w:n.w*t-o-s,h:n.h*e-i-r}),this}swap(t,e){if(!e||e.locked||!t||t.locked)return!1;function i(){let r=e.x,o=e.y;return e.x=t.x,e.y=t.y,t.h!=e.h?(t.x=r,t.y=e.y+e.h):t.w!=e.w?(t.x=e.x+e.w,t.y=o):(t.x=r,t.y=o),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=l.isTouching(t,e)))return i();if(s!==!1){if(t.w===e.w&&t.x===e.x&&(s||(s=l.isTouching(t,e)))){if(e.y{let u;o.locked||(o.autoPosition=!0,t==="list"&&n&&(u=d[n-1])),this.addNode(o,!1,u)}),s||delete this._inColumnResize,i||this.batchUpdate(!1),this}set float(t){this._float!==t&&(this._float=t||!1,t||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(t=1){return this.nodes=l.sort(this.nodes,t),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(t=>{if(t._updating||t._orig===void 0||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=e===0?0:t.y-1;if(!(e===0||!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){var s;t._id=(s=t._id)!=null?s:h._idSeq++,(t.x===void 0||t.y===void 0||t.x===null||t.y===null)&&(t.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return l.defaults(t,i),t.autoPosition||delete t.autoPosition,t.noResize||delete t.noResize,t.noMove||delete t.noMove,l.sanitizeMinMax(t),typeof t.x=="string"&&(t.x=Number(t.x)),typeof t.y=="string"&&(t.y=Number(t.y)),typeof t.w=="string"&&(t.w=Number(t.w)),typeof t.h=="string"&&(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),t}nodeBoundFix(t,e){let i=t._orig||l.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)),(t.x||0)+(t.w||1)>this.column&&this.column<12&&!this._inColumnResize&&t._id&&this.findCacheLayout(t,12)===-1){let r=m({},t);r.autoPosition||r.x===void 0?(delete r.x,delete r.y):r.x=Math.min(11,r.x),r.w=Math.min(12,r.w||1),this.cacheOneLayout(r,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),l.samePos(t,i)||(t._dirty=!0),this}getDirtyNodes(t){return t?this.nodes.filter(e=>e._dirty&&!l.samePos(e,e._orig)):this.nodes.filter(e=>e._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:(this.nodes.forEach(t=>{delete t._dirty,delete t._lastTried}),this)}saveInitial(){return this.nodes.forEach(t=>{t._orig=l.copyPos({},t),delete t._dirty}),this._hasLocked=this.nodes.some(t=>t.locked),this}restoreInitial(){return this.nodes.forEach(t=>{l.samePos(t,t._orig)||(l.copyPos(t,t._orig),t._dirty=!0)}),this._notify(),this}findEmptyPosition(t,e=this.nodes,i=this.column,s){let r=s?s.y*i+(s.x+s.w):0,o=!1;for(let n=r;!o;++n){let d=n%i,u=Math.floor(n/i);if(d+t.w>i)continue;let f={x:d,y:u,w:t.w,h:t.h};e.find(a=>l.isIntercepted(f,a))||((t.x!==d||t.y!==u)&&(t._dirty=!0),t.x=d,t.y=u,delete t.autoPosition,o=!0)}return o}addNode(t,e=!1,i){let s=this.nodes.find(o=>o._id===t._id);if(s)return s;this._inColumnResize?this.nodeBoundFix(t):this.prepareNode(t),delete t._temporaryRemoved,delete t._removeDOM;let r;return t.autoPosition&&this.findEmptyPosition(t,this.nodes,this.column,i)&&(delete t.autoPosition,r=!0),this.nodes.push(t),e&&this.addedNodes.push(t),r||this._fixCollisions(t),this.batchMode||this._packNodes()._notify(),t}removeNode(t,e=!0,i=!1){return this.nodes.find(s=>s._id===t._id)?(i&&this.removedNodes.push(t),e&&(t._removeDOM=!0),this.nodes=this.nodes.filter(s=>s._id!==t._id),t._isAboutToRemove||this._packNodes(),this._notify([t]),this):this}removeAll(t=!0,e=!0){if(delete this._layouts,!this.nodes.length)return this;t&&this.nodes.forEach(s=>s._removeDOM=!0);let i=this.nodes;return this.removedNodes=e?i:[],this.nodes=[],this._notify(i)}moveNodeCheck(t,e){if(!this.changedPosConstrain(t,e))return!1;if(e.pack=!0,!this.maxRow)return this.moveNode(t,e);let i,s=new h({column:this.column,float:this.float,nodes:this.nodes.map(o=>o._id===t._id?(i=m({},o),i):m({},o))});if(!i)return!1;let r=s.moveNode(i,e)&&s.getRow()<=Math.max(this.getRow(),this.maxRow);if(!r&&!e.resizing&&e.collide){let o=e.collide.el.gridstackNode;if(this.swap(t,o))return this._notify(),!0}return r?(s.nodes.filter(o=>o._dirty).forEach(o=>{let n=this.nodes.find(d=>d._id===o._id);n&&(l.copyPos(n,o),n._dirty=!0)}),this._notify(),!0):!1}willItFit(t){if(delete t._willFitPos,!this.maxRow)return!0;let e=new h({column:this.column,float:this.float,nodes:this.nodes.map(s=>m({},s))}),i=m({},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=l.copyPos({},i),!0):!1}changedPosConstrain(t,e){return e.w=e.w||t.w,e.h=e.h||t.h,t.x!==e.x||t.y!==e.y?!0:(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 u,f;if(!t||!e)return!1;let i;e.pack===void 0&&!this.batchMode&&(i=e.pack=!0),typeof e.x!="number"&&(e.x=t.x),typeof e.y!="number"&&(e.y=t.y),typeof e.w!="number"&&(e.w=t.w),typeof e.h!="number"&&(e.h=t.h);let s=t.w!==e.w||t.h!==e.h,r=l.copyPos({},t,!0);if(l.copyPos(r,e),this.nodeBoundFix(r,s),l.copyPos(e,r),!e.forceCollide&&l.samePos(t,e))return!1;let o=l.copyPos({},t),n=this.collideAll(t,r,e.skip),d=!0;if(n.length){let a=t._moving&&!e.nested,c=a?this.directionCollideCoverage(t,e,n):n[0];if(a&&c&&((f=(u=t.grid)==null?void 0:u.opts)!=null&&f.subGridDynamic)&&!t.grid._isTemp){let p=l.areaIntercept(e.rect,c._rect),_=l.area(e.rect),y=l.area(c._rect);p/(_.8&&(c.grid.makeSubGrid(c.el,void 0,t),c=void 0)}c?d=!this._fixCollisions(t,r,c,e):(d=!1,i&&delete e.pack)}return d&&(t._dirty=!0,l.copyPos(t,r)),e.pack&&this._packNodes()._notify(),!l.samePos(t,o)}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(e=>e._updating);return t&&(delete t._updating,delete t._skipDown),this}save(t=!0,e){var o;let i=(o=this._layouts)==null?void 0:o.length,s=i&&this.column!==i-1?this._layouts[i-1]:null,r=[];return this.sortNodes(),this.nodes.forEach(n=>{let d=s==null?void 0:s.find(f=>f._id===n._id),u=m(m({},n),d||{});l.removeInternalForSave(u,!t),e&&e(n,u),r.push(u)}),r}layoutsNodesChange(t){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((e,i)=>{if(!e||i===this.column)return this;if(i{if(!r._orig)return;let o=e.find(n=>n._id===r._id);o&&(o.y>=0&&r.y!==r._orig.y&&(o.y+=r.y-r._orig.y),r.x!==r._orig.x&&(o.x=Math.round(r.x*s)),r.w!==r._orig.w&&(o.w=Math.round(r.w*s)))})}}),this)}columnChanged(t,e,i="moveScale"){var n;if(!this.nodes.length||!e||t===e)return this;if(i==="none")return this;let s=i==="compact"||i==="list";s&&this.sortNodes(1),et&&this._layouts){let d=this._layouts[e]||[],u=this._layouts.length-1;!d.length&&t!==u&&((n=this._layouts[u])!=null&&n.length)&&(t=u,this._layouts[u].forEach(f=>{var c,p,_;let a=o.find(y=>y._id===f._id);a&&(!s&&!f.autoPosition&&(a.x=(c=f.x)!=null?c:a.x,a.y=(p=f.y)!=null?p:a.y),a.w=(_=f.w)!=null?_:a.w,(f.x==null||f.y===void 0)&&(a.autoPosition=!0))})),d.forEach(f=>{var c,p,_;let a=o.findIndex(y=>y._id===f._id);if(a!==-1){let y=o[a];if(s){y.w=f.w;return}(f.autoPosition||isNaN(f.x)||isNaN(f.y))&&this.findEmptyPosition(f,r),f.autoPosition||(y.x=(c=f.x)!=null?c:y.x,y.y=(p=f.y)!=null?p:y.y,y.w=(_=f.w)!=null?_:y.w,r.push(y)),o.splice(a,1)}})}if(s)this.compact(i,!1);else{if(o.length)if(typeof i=="function")i(e,t,r,o);else{let d=s?1:e/t,u=i==="move"||i==="moveScale",f=i==="scale"||i==="moveScale";o.forEach(a=>{a.x=e===1?0:u?Math.round(a.x*d):Math.min(a.x,e-1),a.w=e===1||t===1?1:f?Math.round(a.w*d)||1:Math.min(a.w,e),r.push(a)}),o=[]}r=l.sort(r,-1),this._inColumnResize=!0,this.nodes=[],r.forEach(d=>{this.addNode(d,!1),delete d._orig})}return this.nodes.forEach(d=>delete d._orig),this.batchUpdate(!1,!s),delete this._inColumnResize,this}cacheLayout(t,e,i=!1){let s=[];return t.forEach((r,o)=>{var n;if(r._id===void 0){let d=r.id?this.nodes.find(u=>u.id===r.id):void 0;r._id=(n=d==null?void 0:d._id)!=null?n:h._idSeq++}s[o]={x:r.x,y:r.y,w:r.w,_id:r._id}}),this._layouts=i?[]:this._layouts||[],this._layouts[e]=s,this}cacheOneLayout(t,e){var r;t._id=(r=t._id)!=null?r:h._idSeq++;let i={x:t.x,y:t.y,w:t.w,_id:t._id};(t.autoPosition||t.x===void 0)&&(delete i.x,delete i.y,t.autoPosition&&(i.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[e]=this._layouts[e]||[];let s=this.findCacheLayout(t,e);return s===-1?this._layouts[e].push(i):this._layouts[e][s]=i,this}findCacheLayout(t,e){var i,s,r;return(r=(s=(i=this._layouts)==null?void 0:i[e])==null?void 0:s.findIndex(o=>o._id===t._id))!=null?r:-1}removeNodeFromLayoutCache(t){if(this._layouts)for(let e=0;e0||navigator.msMaxTouchPoints>0),R=class{};function B(h,t){if(h.touches.length>1)return;h.cancelable&&h.preventDefault();let e=h.changedTouches[0],i=document.createEvent("MouseEvents");i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),h.target.dispatchEvent(i)}function tt(h,t){h.cancelable&&h.preventDefault();let e=document.createEvent("MouseEvents");e.initMouseEvent(t,!0,!0,window,1,h.screenX,h.screenY,h.clientX,h.clientY,!1,!1,!1,!1,0,null),h.target.dispatchEvent(e)}function T(h){R.touchHandled||(R.touchHandled=!0,B(h,"mousedown"))}function M(h){R.touchHandled&&B(h,"mousemove")}function N(h){if(!R.touchHandled)return;R.pointerLeaveTimeout&&(window.clearTimeout(R.pointerLeaveTimeout),delete R.pointerLeaveTimeout);let t=!!g.dragElement;B(h,"mouseup"),t||B(h,"click"),R.touchHandled=!1}function L(h){h.pointerType!=="mouse"&&h.target.releasePointerCapture(h.pointerId)}function X(h){g.dragElement&&h.pointerType!=="mouse"&&tt(h,"mouseenter")}function j(h){g.dragElement&&h.pointerType!=="mouse"&&(R.pointerLeaveTimeout=window.setTimeout(()=>{delete R.pointerLeaveTimeout,tt(h,"mouseleave")},10))}var A=class h{constructor(t,e,i){this.host=t,this.dir=e,this.option=i,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._init()}_init(){let t=this.el=document.createElement("div");return t.classList.add("ui-resizable-handle"),t.classList.add(`${h.prefix}${this.dir}`),t.style.zIndex="100",t.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),x&&(this.el.addEventListener("touchstart",T),this.el.addEventListener("pointerdown",L)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),x&&(this.el.removeEventListener("touchstart",T),this.el.removeEventListener("pointerdown",L)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(t){this.mouseDownEvent=t,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),x&&(this.el.addEventListener("touchmove",M),this.el.addEventListener("touchend",N)),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()}_mouseUp(t){this.moving&&this._triggerEvent("stop",t),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),x&&(this.el.removeEventListener("touchmove",M),this.el.removeEventListener("touchend",N)),delete this.moving,delete this.mouseDownEvent,t.stopPropagation(),t.preventDefault()}_triggerEvent(t,e){return this.option[t]&&this.option[t](e),this}};A.prefix="ui-resizable-";var D=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)}};var O=class h extends D{constructor(t,e={}){super(),this.el=t,this.option=e,this.rectScale={x:1,y:1},this._ui=()=>{let s=this.el.parentElement.getBoundingClientRect(),r={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=this.temporalRect||r;return{position:{left:(o.left-s.left)*this.rectScale.x,top:(o.top-s.top)*this.rectScale.y},size:{width:o.width*this.rectScale.x,height:o.height*this.rectScale.y}}},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.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),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(s=>this.option[s]=t[s]),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),g.overResizeElement===this&&delete g.overResizeElement),this}_mouseOver(t){g.overResizeElement||g.dragElement||(g.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(t){g.overResizeElement===this&&(delete g.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(t=>t.trim()).map(t=>new A(this.el,t,{start:e=>{this._resizeStart(e)},stop:e=>{this._resizeStop(e)},move:e=>{this._resizing(e,t)}})),this}_resizeStart(t){this.sizeToContent=l.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=l.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=t,this._setupHelper(),this._applyChange();let e=l.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();let i=l.initEvent(t,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(t){let e=l.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(){this.elOriginStyleVal=h._originStyleProp.map(i=>this.el.style[i]),this.parentOriginStylePosition=this.el.parentElement.style.position;let t=this.el.parentElement,e=l.getValuesFromTransformedElement(t);return this.rectScale={x:e.xScale,y:e.yScale},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 h._originStyleProp.forEach((t,e)=>{this.el.style[t]=this.elOriginStyleVal[e]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(t,e){let i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},r=t.clientX-i.clientX,o=this.sizeToContent?0:t.clientY-i.clientY;e.indexOf("e")>-1?s.width+=r:e.indexOf("w")>-1&&(s.width-=r,s.left+=r),e.indexOf("s")>-1?s.height+=o:e.indexOf("n")>-1&&(s.height-=o,s.top+=o);let n=this._constrainSize(s.width,s.height);return Math.round(s.width)!==Math.round(n.width)&&(e.indexOf("w")>-1&&(s.left+=s.width-n.width),s.width=n.width),Math.round(s.height)!==Math.round(n.height)&&(e.indexOf("n")>-1&&(s.top+=s.height-n.height),s.height=n.height),s}_constrainSize(t,e){let i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,s=this.option.minWidth/this.rectScale.x||t,r=this.option.maxHeight||Number.MAX_SAFE_INTEGER,o=this.option.minHeight/this.rectScale.y||e,n=Math.min(i,Math.max(s,t)),d=Math.min(r,Math.max(o,e));return{width:n,height:d}}_applyChange(){let t={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let e=this.el.parentElement,{left:i,top:s}=e.getBoundingClientRect();t={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(e=>{let i=this.temporalRect[e],s=e==="width"||e==="left"?this.rectScale.x:e==="height"||e==="top"?this.rectScale.y:1;this.el.style[e]=(i-t[e])*s+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(t=>t.destroy()),delete this.handlers,this}};O._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var at='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',P=class h extends D{constructor(t,e={}){super(),this.el=t,this.option=e,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};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(){this.disabled!==!1&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),x&&(this.dragEl.addEventListener("touchstart",T),this.dragEl.addEventListener("pointerdown",L)),this.el.classList.remove("ui-draggable-disabled"))}disable(t=!1){this.disabled!==!0&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),x&&(this.dragEl.removeEventListener("touchstart",T),this.dragEl.removeEventListener("pointerdown",L)),t||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&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(!g.mouseHandled)return t.button!==0||t.target.closest(at)||this.option.cancel&&t.target.closest(this.option.cancel)||(this.mouseDownEvent=t,delete this.dragging,delete g.dragElement,delete g.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),x&&(this.dragEl.addEventListener("touchmove",M),this.dragEl.addEventListener("touchend",N)),t.preventDefault(),document.activeElement&&document.activeElement.blur(),g.mouseHandled=!0),!0}_callDrag(t){if(!this.dragging)return;let e=l.initEvent(t,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(e,this.ui()),this.triggerEvent("drag",e)}_mouseMove(t){var i;let e=this.mouseDownEvent;if(this.dragging)if(this._dragFollow(t),g.pauseDrag){let s=Number.isInteger(g.pauseDrag)?g.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(t),s)}else this._callDrag(t);else if(Math.abs(t.x-e.x)+Math.abs(t.y-e.y)>3){this.dragging=!0,g.dragElement=this;let s=(i=this.el.gridstackNode)==null?void 0:i.grid;s?g.dropElement=s.el.ddElement.ddDroppable:delete g.dropElement,this.helper=this._createHelper(t),this._setupHelperContainmentStyle(),this.dragTransform=l.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(t,this.el,this.helperContainment);let r=l.initEvent(t,{target:this.el,type:"dragstart"});this._setupHelperStyle(t),this.option.start&&this.option.start(r,this.ui()),this.triggerEvent("dragstart",r)}return!0}_mouseUp(t){var e;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),x&&(this.dragEl.removeEventListener("touchmove",M,!0),this.dragEl.removeEventListener("touchend",N,!0)),this.dragging){delete this.dragging,((e=g.dropElement)==null?void 0:e.el)===this.el.parentElement&&delete g.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();let i=l.initEvent(t,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),g.dropElement&&g.dropElement.drop(t)}delete this.helper,delete this.mouseDownEvent,delete g.dragElement,delete g.dropElement,delete g.mouseHandled,t.preventDefault()}_createHelper(t){let e=this.el;return typeof this.option.helper=="function"?e=this.option.helper(t):this.option.helper==="clone"&&(e=l.cloneNode(this.el)),document.body.contains(e)||l.appendTo(e,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),e===this.el&&(this.dragElementOriginStyle=h.originStyleProp.map(i=>this.el.style[i])),e}_setupHelperStyle(t){this.helper.classList.add("ui-draggable-dragging");let e=this.helper.style;return e.pointerEvents="none",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 e;this.helper.classList.remove("ui-draggable-dragging");let t=(e=this.helper)==null?void 0:e.gridstackNode;if(!(t!=null&&t._isAboutToRemove)&&this.dragElementOriginStyle){let i=this.helper,s=this.dragElementOriginStyle.transition||null;i.style.transition=this.dragElementOriginStyle.transition="none",h.originStyleProp.forEach(r=>i.style[r]=this.dragElementOriginStyle[r]||null),setTimeout(()=>i.style.transition=s,50)}return delete this.dragElementOriginStyle,this}_dragFollow(t){let e={left:0,top:0},i=this.helper.style,s=this.dragOffset;i.left=(t.clientX+s.offsetLeft-e.left)*this.dragTransform.xScale+"px",i.top=(t.clientY+s.offsetTop-e.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(t,e,i){let s=0,r=0;i&&(s=this.dragTransform.xOffset,r=this.dragTransform.yOffset);let o=e.getBoundingClientRect();return{left:o.left,top:o.top,offsetLeft:-t.clientX+o.left-s,offsetTop:-t.clientY+o.top-r,width:o.width*this.dragTransform.xScale,height:o.height*this.dragTransform.yScale}}ui(){let e=this.el.parentElement.getBoundingClientRect(),i=this.helper.getBoundingClientRect();return{position:{top:(i.top-e.top)*this.dragTransform.yScale,left:(i.left-e.left)*this.dragTransform.xScale}}}};P.originStyleProp=["transition","pointerEvents","position","left","top","minWidth","willChange"];var I=class extends D{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(){this.disabled!==!1&&(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),x&&(this.el.addEventListener("pointerenter",X),this.el.addEventListener("pointerleave",j)))}disable(t=!1){this.disabled!==!0&&(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),x&&(this.el.removeEventListener("pointerenter",X),this.el.removeEventListener("pointerleave",j)))}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(!g.dragElement||!this._canDrop(g.dragElement.el))return;t.preventDefault(),t.stopPropagation(),g.dropElement&&g.dropElement!==this&&g.dropElement._mouseLeave(t,!0),g.dropElement=this;let e=l.initEvent(t,{target:this.el,type:"dropover"});this.option.over&&this.option.over(e,this._ui(g.dragElement)),this.triggerEvent("dropover",e),this.el.classList.add("ui-droppable-over")}_mouseLeave(t,e=!1){var s;if(!g.dragElement||g.dropElement!==this)return;t.preventDefault(),t.stopPropagation();let i=l.initEvent(t,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(g.dragElement)),this.triggerEvent("dropout",i),g.dropElement===this&&(delete g.dropElement,!e)){let r,o=this.el.parentElement;for(;!r&&o;)r=(s=o.ddElement)==null?void 0:s.ddDroppable,o=o.parentElement;r&&r._mouseEnter(t)}}drop(t){t.preventDefault();let e=l.initEvent(t,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(e,this._ui(g.dragElement)),this.triggerEvent("drop",e)}_canDrop(t){return t&&(!this.accept||this.accept(t))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=t=>t.classList.contains(this.option.accept)||t.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(t){return m({draggable:t.el},t.ui())}};var U=class h{static init(t){return t.ddElement||(t.ddElement=new h(t)),t.ddElement}constructor(t){this.el=t}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 P(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 O(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 I(this.el,t),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}};var W=class{resizable(t,e,i,s){return this._getDDElements(t).forEach(r=>{if(e==="disable"||e==="enable")r.ddResizable&&r.ddResizable[e]();else if(e==="destroy")r.ddResizable&&r.cleanResizable();else if(e==="option")r.setupResizable({[i]:s});else{let n=r.el.gridstackNode.grid,d=r.el.getAttribute("gs-resize-handles")||n.opts.resizable.handles||"e,s,se";d==="all"&&(d="n,e,s,w,se,sw,ne,nw");let u=!n.opts.alwaysShowResizeHandle;r.setupResizable(w(m({},n.opts.resizable),{handles:d,autoHide:u,start:e.start,stop:e.stop,resize:e.resize}))}}),this}draggable(t,e,i,s){return this._getDDElements(t).forEach(r=>{if(e==="disable"||e==="enable")r.ddDraggable&&r.ddDraggable[e]();else if(e==="destroy")r.ddDraggable&&r.cleanDraggable();else if(e==="option")r.setupDraggable({[i]:s});else{let o=r.el.gridstackNode.grid;r.setupDraggable(w(m({},o.opts.draggable),{start:e.start,stop:e.stop,drag:e.drag}))}}),this}dragIn(t,e){return this._getDDElements(t).forEach(i=>i.setupDraggable(e)),this}droppable(t,e,i,s){return typeof e.accept=="function"&&!e._accept&&(e._accept=e.accept,e.accept=r=>e._accept(r)),this._getDDElements(t).forEach(r=>{e==="disable"||e==="enable"?r.ddDroppable&&r.ddDroppable[e]():e==="destroy"?r.ddDroppable&&r.cleanDroppable():e==="option"?r.setupDroppable({[i]:s}):r.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(s=>s.on(e,r=>{i(r,g.dragElement?g.dragElement.el:r.target,g.dragElement?g.dragElement.helper:null)})),this}off(t,e){return this._getDDElements(t).forEach(i=>i.off(e)),this}_getDDElements(t,e=!0){let i=l.getElements(t);if(!i.length)return[];let s=i.map(r=>r.ddElement||(e?U.init(r):null));return e||s.filter(r=>r),s}};var b=new W,H=class h{static init(t={},e=".grid-stack"){if(typeof document=="undefined")return null;let i=h.getGridElement(e);return i?(i.gridstack||(i.gridstack=new h(i,l.cloneDeep(t))),i.gridstack):(console.error(typeof e=="string"?'GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ? +Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(t={},e=".grid-stack"){let i=[];return typeof document=="undefined"||(h.getGridElements(e).forEach(s=>{s.gridstack||(s.gridstack=new h(s,l.cloneDeep(t))),i.push(s.gridstack)}),i.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+e+`" - element missing or wrong selector ? +Note: ".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(i.gridstack){let o=i.gridstack;return e&&(o.opts=m(m({},o.opts),e)),e.children!==void 0&&o.load(e.children),o}if(!t.classList.contains("grid-stack")||h.addRemoveCB)if(h.addRemoveCB)i=h.addRemoveCB(t,e,!0,!0);else{let o=document.implementation.createHTMLDocument("");o.body.innerHTML=`
`,i=o.body.children[0],t.appendChild(i)}return h.init(e,i)}static registerEngine(t){h.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,C.itemClass,this.opts.itemClass),this.placeholder.appendChild(t)}return this._placeholder}constructor(t,e={}){var a,c,p,_;this.el=t,this.opts=e,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},t.gridstack=this,e=e||{},t.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),e.row&&(e.minRow=e.maxRow=e.row,delete e.row);let i=l.toNumber(t.getAttribute("gs-row"));e.column==="auto"&&delete e.column,e.alwaysShowResizeHandle!==void 0&&(e._alwaysShowResizeHandle=e.alwaysShowResizeHandle);let s=(a=e.columnOpts)==null?void 0:a.breakpoints,r=e;if(r.oneColumnModeDomSort&&(delete r.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),r.oneColumnSize||r.disableOneColumnMode===!1){let y=r.oneColumnSize||768;delete r.oneColumnSize,delete r.disableOneColumnMode,e.columnOpts=e.columnOpts||{},s=e.columnOpts.breakpoints=e.columnOpts.breakpoints||[];let v=s.find(E=>E.c===1);v?v.w=y:(v={c:1,w:y},s.push(v,{c:12,w:y+1}))}let o=e.columnOpts;o&&(!o.columnWidth&&!((c=o.breakpoints)!=null&&c.length)?(delete e.columnOpts,s=void 0):o.columnMax=o.columnMax||12),(s==null?void 0:s.length)>1&&s.sort((y,v)=>(v.w||0)-(y.w||0));let n=w(m({},l.cloneDeep(C)),{column:l.toNumber(t.getAttribute("gs-column"))||C.column,minRow:i||l.toNumber(t.getAttribute("gs-min-row"))||C.minRow,maxRow:i||l.toNumber(t.getAttribute("gs-max-row"))||C.maxRow,staticGrid:l.toBool(t.getAttribute("gs-static"))||C.staticGrid,draggable:{handle:(e.handleClass?"."+e.handleClass:e.handle?e.handle:"")||C.draggable.handle},removableOptions:{accept:e.itemClass||C.removableOptions.accept,decline:C.removableOptions.decline}});t.getAttribute("gs-animate")&&(n.animate=l.toBool(t.getAttribute("gs-animate"))),e=l.defaults(e,n),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+e.column),e.rtl==="auto"&&(e.rtl=t.style.direction==="rtl"),e.rtl&&this.el.classList.add("grid-stack-rtl");let d=(p=this.el.parentElement)==null?void 0:p.parentElement,u=d!=null&&d.classList.contains(C.itemClass)?d.gridstackNode:void 0;u&&(u.subGrid=this,this.parentGridItem=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=e.cellHeight==="auto",this._isAutoCellHeight||e.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof e.cellHeight=="number"&&e.cellHeightUnit&&e.cellHeightUnit!==C.cellHeightUnit&&(e.cellHeight=e.cellHeight+e.cellHeightUnit,delete e.cellHeightUnit),this.cellHeight(e.cellHeight,!1)),e.alwaysShowResizeHandle==="mobile"&&(e.alwaysShowResizeHandle=x),this._styleSheetClass="gs-id-"+k._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let f=e.engineClass||h.engineClass||k;if(this.engine=new f({column:this.getColumn(),float:e.float,maxRow:e.maxRow,onChange:y=>{let v=0;this.engine.nodes.forEach(E=>{v=Math.max(v,E.y+E.h)}),y.forEach(E=>{let z=E.el;z&&(E._removeDOM?(z&&z.remove(),delete E._removeDOM):this._writePosAttr(z,E))}),this._updateStyles(!1,v)}}),this._updateStyles(!1,0),e.auto&&(this.batchUpdate(),this.getGridItems().forEach(y=>this._prepareElement(y)),this.batchUpdate(!1)),e.children){let y=e.children;delete e.children,y.length&&this.load(y)}this.setAnimation(e.animate),e.subGridDynamic&&!g.pauseDrag&&(g.pauseDrag=!0),((_=e.draggable)==null?void 0:_.pause)!==void 0&&(g.pauseDrag=e.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(t,e){function i(n){return n.el!==void 0||n.x!==void 0||n.y!==void 0||n.w!==void 0||n.h!==void 0||n.content!==void 0}let s,r;if(typeof t=="string"){let n=document.implementation.createHTMLDocument("");n.body.innerHTML=t,s=n.body.children[0]}else if(arguments.length===0||arguments.length===1&&i(t))if(r=e=t,r!=null&&r.el)s=r.el;else if(h.addRemoveCB)s=h.addRemoveCB(this.el,e,!0,!1);else{let n=(e==null?void 0:e.content)||"",d=document.implementation.createHTMLDocument("");d.body.innerHTML=`
${n}
`,s=d.body.children[0]}else s=t;if(!s)return;if(r=s.gridstackNode,r&&s.parentElement===this.el&&this.engine.nodes.find(n=>n._id===r._id))return s;let o=this._readAttr(s);return e=l.cloneDeep(e)||{},l.defaults(e,o),r=this.engine.prepareNode(e),this._writeAttr(s,e),this._insertNotAppend?this.el.prepend(s):this.el.appendChild(s),this.makeWidget(s,e),s}makeSubGrid(t,e,i,s=!0){var p,_,y;let r=t.gridstackNode;if(r||(r=this.makeWidget(t).gridstackNode),(p=r.subGrid)!=null&&p.el)return r.subGrid;let o,n=this;for(;n&&!o;)o=(_=n.opts)==null?void 0:_.subGridOpts,n=(y=n.parentGridItem)==null?void 0:y.grid;e=l.cloneDeep(m(w(m({},o||{}),{children:void 0}),e||r.subGridOpts||{})),r.subGridOpts=e;let d;e.column==="auto"&&(d=!0,e.column=Math.max(r.w||1,(i==null?void 0:i.w)||1),delete e.columnOpts);let u=r.el.querySelector(".grid-stack-item-content"),f,a;if(s){if(this._removeDD(r.el),a=w(m({},r),{x:0,y:0}),l.removeInternalForSave(a),delete a.subGridOpts,r.content&&(a.content=r.content,delete r.content),h.addRemoveCB)f=h.addRemoveCB(this.el,a,!0,!1);else{let v=document.implementation.createHTMLDocument("");v.body.innerHTML='
',f=v.body.children[0],f.appendChild(u),v.body.innerHTML='
',u=v.body.children[0],r.el.appendChild(u)}this._prepareDragDropByNode(r)}if(i){let v=d?e.column:r.w,E=r.h+i.h,z=r.el.style;z.transition="none",this.update(r.el,{w:v,h:E}),setTimeout(()=>z.transition=null)}let c=r.subGrid=h.addGrid(u,e);return i!=null&&i._moving&&(c._isTemp=!0),d&&(c._autoColumn=!0),s&&c.addWidget(f,a),i&&(i._moving?window.setTimeout(()=>l.simulateMouseEvent(i._event,"mouseenter",c.el),0):c.addWidget(r.el,r)),c}removeAsSubGrid(t){var i;let e=(i=this.parentGridItem)==null?void 0:i.grid;e&&(e.batchUpdate(),e.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach(s=>{s.x+=this.parentGridItem.x,s.y+=this.parentGridItem.y,e.addWidget(s.el,s)}),e.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,t&&window.setTimeout(()=>l.simulateMouseEvent(t._event,"mouseenter",e.el),0))}save(t=!0,e=!1,i=h.saveCB){let s=this.engine.save(t,i);if(s.forEach(r=>{var o;if(t&&r.el&&!r.subGrid&&!i){let n=r.el.querySelector(".grid-stack-item-content");r.content=n?n.innerHTML:void 0,r.content||delete r.content}else if(!t&&!i&&delete r.content,(o=r.subGrid)!=null&&o.el){let n=r.subGrid.save(t,e,i);r.subGridOpts=e?n:{children:n},delete r.subGrid}delete r.el}),e){let r=l.cloneDeep(this.opts);r.marginBottom===r.marginTop&&r.marginRight===r.marginLeft&&r.marginTop===r.marginRight&&(r.margin=r.marginTop,delete r.marginTop,delete r.marginRight,delete r.marginBottom,delete r.marginLeft),r.rtl===(this.el.style.direction==="rtl")&&(r.rtl="auto"),this._isAutoCellHeight&&(r.cellHeight="auto"),this._autoColumn&&(r.column="auto");let o=r._alwaysShowResizeHandle;return delete r._alwaysShowResizeHandle,o!==void 0?r.alwaysShowResizeHandle=o:delete r.alwaysShowResizeHandle,l.removeInternalAndSame(r,C),r.children=s,r}return s}load(t,e=h.addRemoveCB||!0){var f;t=l.cloneDeep(t);let i=this.getColumn(),s=t.filter(a=>(a.x===void 0||a.y===void 0)&&!l.find(this.engine.nodes,a.id));s.length&&s.length!==t.length?t=t.filter(a=>!l.find(s,a.id)):s=[];let r=t.some(a=>a.x!==void 0||a.y!==void 0);r&&(t=l.sort(t,-1)),this._insertNotAppend=r,t.some(a=>(a.x||0)+(a.w||1)>i)&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(t,12,!0));let o=h.addRemoveCB;typeof e=="function"&&(h.addRemoveCB=e);let n=[];this.batchUpdate();let d=!this.engine.nodes.length;d&&this.setAnimation(!1),e&&[...this.engine.nodes].forEach(c=>{if(!c.id)return;l.find(t,c.id)||(h.addRemoveCB&&h.addRemoveCB(this.el,c,!1,!1),n.push(c),this.removeWidget(c.el,!0,!1))});let u=[];return this.engine.nodes=this.engine.nodes.filter(a=>l.find(t,a.id)?(u.push(a),!1):!0),t.forEach(a=>{var p;let c=l.find(u,a.id);if(c){if(l.shouldSizeToContent(c)&&(a.h=c.h),this.engine.nodeBoundFix(a),(a.autoPosition||a.x===void 0||a.y===void 0)&&(a.w=a.w||c.w,a.h=a.h||c.h,this.engine.findEmptyPosition(a)),this.engine.nodes.push(c),l.samePos(c,a)&&this.moveNode(c,w(m({},a),{forceCollide:!0})),this.update(c.el,a),(p=a.subGridOpts)!=null&&p.children){let _=c.el.querySelector(".grid-stack");_&&_.gridstack&&(_.gridstack.load(a.subGridOpts.children),this._insertNotAppend=!0)}}else e&&this.addWidget(a)}),e&&s.forEach(a=>this.addWidget(a)),this.engine.removedNodes=n,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,o?h.addRemoveCB=o:delete h.addRemoveCB,d&&((f=this.opts)!=null&&f.animate)&&setTimeout(()=>{this.opts&&this.setAnimation(this.opts.animate)}),this}batchUpdate(t=!0){return this.engine.batchUpdate(t),t||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(t=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!t||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let e=this.el.querySelector("."+this.opts.itemClass);if(e){let s=l.toNumber(e.getAttribute("gs-h"))||1;return Math.round(e.offsetHeight/s)}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&&t!==void 0&&this._isAutoCellHeight!==(t==="auto")&&(this._isAutoCellHeight=t==="auto",this._updateResizeEvent()),(t==="initial"||t==="auto")&&(t=void 0),t===void 0){let s=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;t=this.cellWidth()+s}let i=l.parseHeight(t);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h?this:(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,this.resizeToContentCheck(),e&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(t=!1){var e;return t&&((e=this.opts.columnOpts)!=null&&e.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var r,o;let t=this.opts.columnOpts;if(!t||!t.columnWidth&&!((r=t.breakpoints)!=null&&r.length))return!1;let e=this.getColumn(),i=e,s=this._widthOrContainer(!0);if(t.columnWidth)i=Math.min(Math.round(s/t.columnWidth)||1,t.columnMax);else{i=t.columnMax;let n=0;for(;nd.c===i);return this.column(i,(n==null?void 0:n.layout)||t.layout),!0}return!1}compact(t="compact",e=!0){return this.engine.compact(t,e),this._triggerChangeEvent(),this}column(t,e="moveScale"){if(!t||t<1||this.opts.column===t)return this;let i=this.getColumn();return this.opts.column=t,this.engine?(this.engine.column=t,this.el.classList.remove("gs-"+i),this.el.classList.add("gs-"+t),this.engine.columnChanged(i,t,e),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):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.offAll(),this._updateResizeEvent(!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.el.removeAttribute("gs-current-row")),this._removeStylesheet(),this.parentGridItem&&delete this.parentGridItem.subGrid,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=this.el.getBoundingClientRect(),s;e?s={top:i.top+document.documentElement.scrollTop,left:i.left}:s={top:this.el.offsetTop,left:this.el.offsetLeft};let r=t.left-s.left,o=t.top-s.top,n=i.width/this.getColumn(),d=i.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(r/n),y:Math.floor(o/d)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(t,e,i,s){return this.engine.isAreaEmpty(t,e,i,s)}makeWidget(t,e){let i=h.getElement(t);this._prepareElement(i,!0,e);let s=i.gridstackNode;return this._updateContainerHeight(),s.subGridOpts&&this.makeSubGrid(i,s.subGridOpts,void 0,!1),this.opts.column===1&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,i}on(t,e){return t.indexOf(" ")!==-1?(t.split(" ").forEach(s=>this.on(s,e)),this):(t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable"?(t==="enable"||t==="disable"?this._gsEventHandler[t]=s=>e(s):this._gsEventHandler[t]=s=>e(s,s.detail),this.el.addEventListener(t,this._gsEventHandler[t])):t==="drag"||t==="dragstart"||t==="dragstop"||t==="resizestart"||t==="resize"||t==="resizestop"||t==="dropped"||t==="resizecontent"?this._gsEventHandler[t]=e:console.error("GridStack.on("+t+") event not supported"),this)}off(t){return t.indexOf(" ")!==-1?(t.split(" ").forEach(i=>this.off(i)),this):((t==="change"||t==="added"||t==="removed"||t==="enable"||t==="disable")&&this._gsEventHandler[t]&&this.el.removeEventListener(t,this._gsEventHandler[t]),delete this._gsEventHandler[t],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(t=>this.off(t)),this}removeWidget(t,e=!0,i=!0){return h.getElements(t).forEach(s=>{if(s.parentElement&&s.parentElement!==this.el)return;let r=s.gridstackNode;r||(r=this.engine.nodes.find(o=>s===o.el)),r&&(e&&h.addRemoveCB&&h.addRemoveCB(this.el,r,!1,!1),delete s.gridstackNode,this._removeDD(s),this.engine.removeNode(r,e,i),e&&s.parentElement&&s.remove())}),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(t=!0,e=!0){return this.engine.nodes.forEach(i=>{t&&h.addRemoveCB&&h.addRemoveCB(this.el,i,!1,!1),delete i.el.gridstackNode,this.opts.staticGrid||this._removeDD(i.el)}),this.engine.removeAll(t,e),e&&this._triggerRemoveEvent(),this}setAnimation(t){return t?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(t,e=!0,i=!0){return!!this.opts.staticGrid===t?this:(t?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(t,e,i)}),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,s=1;return e={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(t,e)}return h.getElements(t).forEach(i=>{var f;let s=i==null?void 0:i.gridstackNode;if(!s)return;let r=l.cloneDeep(e);this.engine.nodeBoundFix(r),delete r.autoPosition,delete r.id;let o=["x","y","w","h"],n;if(o.some(a=>r[a]!==void 0&&r[a]!==s[a])&&(n={},o.forEach(a=>{n[a]=r[a]!==void 0?r[a]:s[a],delete r[a]})),!n&&(r.minW||r.minH||r.maxW||r.maxH)&&(n={}),r.content!==void 0){let a=i.querySelector(".grid-stack-item-content");a&&a.innerHTML!==r.content&&(a.innerHTML=r.content,(f=s.subGrid)!=null&&f.el&&(a.appendChild(s.subGrid.el),s.subGrid.opts.styleInHead||s.subGrid._updateStyles(!0))),delete r.content}let d=!1,u=!1;for(let a in r)a[0]!=="_"&&s[a]!==r[a]&&(s[a]=r[a],d=!0,u=u||!this.opts.staticGrid&&(a==="noResize"||a==="noMove"||a==="locked"));if(l.sanitizeMinMax(s),n){let a=n.w!==void 0&&n.w!==s.w;this.moveNode(s,n),this.resizeToContentCheck(a,s)}(n||d)&&this._writeAttr(i,s),u&&this._prepareDragDropByNode(s)}),this}moveNode(t,e){this.engine.cleanNodes().beginUpdate(t).moveNode(t,e),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}resizeToContent(t){if(!t||(t.classList.remove("size-to-content-max"),!t.clientHeight))return;let e=t.gridstackNode;if(!e)return;let i=e.grid;if(!i||t.parentElement!==i.el)return;let s=i.getCellHeight(!0);if(!s)return;let r=e.h?e.h*s:t.clientHeight,o;if(e.resizeToContentParent&&(o=t.querySelector(e.resizeToContentParent)),o||(o=t.querySelector(h.resizeToContentParent)),!o)return;let n=t.clientHeight-o.clientHeight,d=e.h?e.h*s-n:o.clientHeight,u;if(e.subGrid)u=e.subGrid.getRow()*e.subGrid.getCellHeight(!0);else{let c=o.firstElementChild;if(!c){console.error(`Error: GridStack.resizeToContent() widget id:${e.id} '${h.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}u=c.getBoundingClientRect().height||d}if(d===u)return;r+=u-d;let f=Math.ceil(r/s),a=Number.isInteger(e.sizeToContent)?e.sizeToContent:0;a&&f>a&&(f=a,t.classList.add("size-to-content-max")),e.minH&&fe.maxH&&(f=e.maxH),f!==e.h&&(i._ignoreLayoutsNodeChange=!0,i.moveNode(e,{h:f}),delete i._ignoreLayoutsNodeChange)}resizeToContentCBCheck(t){h.resizeToContentCB?h.resizeToContentCB(t):this.resizeToContent(t)}margin(t){if(!(typeof t=="string"&&t.split(" ").length>1)){let i=l.parseHeight(t);if(this.opts.marginUnit===i.unit&&this.opts.margin===i.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 e=arguments,i=0,s={x:e[i++],y:e[i++],w:e[i++],h:e[i++],autoPosition:e[i++]};return this.willItFit(s)}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(){var t;if(this.engine.batchMode)return this;if((t=this.engine.addedNodes)!=null&&t.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(i=>{delete i._dirty});let e=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",e)}return this}_triggerRemoveEvent(){var t;if(this.engine.batchMode)return this;if((t=this.engine.removedNodes)!=null&&t.length){let e=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",e)}return this}_triggerEvent(t,e){let i=e?new CustomEvent(t,{bubbles:!1,detail:e}):new Event(t);return this.el.dispatchEvent(i),this}_removeStylesheet(){if(this._styles){let t=this.opts.styleInHead?void 0:this.el.parentNode;l.removeStylesheet(this._styleSheetClass,t),delete this._styles}return this}_updateStyles(t=!1,e){if(t&&this._removeStylesheet(),e===void 0&&(e=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,r=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let o=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=l.createStylesheet(this._styleSheetClass,o,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,l.addCSSRule(this._styles,r,`height: ${i}${s}`);let n=this.opts.marginTop+this.opts.marginUnit,d=this.opts.marginBottom+this.opts.marginUnit,u=this.opts.marginRight+this.opts.marginUnit,f=this.opts.marginLeft+this.opts.marginUnit,a=`${r} > .grid-stack-item-content`,c=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;l.addCSSRule(this._styles,a,`top: ${n}; right: ${u}; bottom: ${d}; left: ${f};`),l.addCSSRule(this._styles,c,`top: ${n}; right: ${u}; bottom: ${d}; left: ${f};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-n`,`top: ${n};`),l.addCSSRule(this._styles,`${r} > .ui-resizable-s`,`bottom: ${d}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-ne`,`right: ${u}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-e`,`right: ${u}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-se`,`right: ${u}; bottom: ${d}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-nw`,`left: ${f}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-w`,`left: ${f}`),l.addCSSRule(this._styles,`${r} > .ui-resizable-sw`,`left: ${f}; bottom: ${d}`)}if(e=e||this._styles._max,e>this._styles._max){let o=n=>i*n+s;for(let n=this._styles._max+1;n<=e;n++)l.addCSSRule(this._styles,`${r}[gs-y="${n}"]`,`top: ${o(n)}`),l.addCSSRule(this._styles,`${r}[gs-h="${n+1}"]`,`height: ${o(n+1)}`);this._styles._max=e}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let t=this.parentGridItem,e=this.getRow()+this._extraDragRow,i=this.opts.cellHeight,s=this.opts.cellHeightUnit;if(!i)return this;if(!t){let r=l.parseHeight(getComputedStyle(this.el).minHeight);if(r.h>0&&r.unit===s){let o=Math.floor(r.h/i);e1?t.setAttribute("gs-w",String(e.w)):t.removeAttribute("gs-w"),e.h>1?t.setAttribute("gs-h",String(e.h)):t.removeAttribute("gs-h"),this}_writeAttr(t,e){if(!e)return this;this._writePosAttr(t,e);let i={autoPosition:"gs-auto-position",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(let s in i)e[s]?t.setAttribute(i[s],String(e[s])):t.removeAttribute(i[s]);return this}_readAttr(t,e=!0){let i={};i.x=l.toNumber(t.getAttribute("gs-x")),i.y=l.toNumber(t.getAttribute("gs-y")),i.w=l.toNumber(t.getAttribute("gs-w")),i.h=l.toNumber(t.getAttribute("gs-h")),i.autoPosition=l.toBool(t.getAttribute("gs-auto-position")),i.noResize=l.toBool(t.getAttribute("gs-no-resize")),i.noMove=l.toBool(t.getAttribute("gs-no-move")),i.locked=l.toBool(t.getAttribute("gs-locked")),i.id=t.getAttribute("gs-id"),i.maxW=l.toNumber(t.getAttribute("gs-max-w")),i.minW=l.toNumber(t.getAttribute("gs-min-w")),i.maxH=l.toNumber(t.getAttribute("gs-max-h")),i.minH=l.toNumber(t.getAttribute("gs-min-h")),e&&(i.w===1&&t.removeAttribute("gs-w"),i.h===1&&t.removeAttribute("gs-h"),i.maxW&&t.removeAttribute("gs-max-w"),i.minW&&t.removeAttribute("gs-min-w"),i.maxH&&t.removeAttribute("gs-max-h"),i.minH&&t.removeAttribute("gs-min-h"));for(let s in i){if(!i.hasOwnProperty(s))return;!i[s]&&i[s]!==0&&delete i[s]}return i}_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}onResize(){var e;if(!((e=this.el)!=null&&e.clientWidth)||this.prevWidth===this.el.clientWidth)return;this.prevWidth=this.el.clientWidth,this.batchUpdate();let t=!1;return this._autoColumn&&this.parentGridItem?this.opts.column!==this.parentGridItem.w&&(this.column(this.parentGridItem.w,"none"),t=!0):t=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(i=>{i.subGrid&&i.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(t),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(t=!1,e=void 0){if(this.engine){if(t&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,e),310);if(e)l.shouldSizeToContent(e)&&this.resizeToContentCBCheck(e.el);else if(this.engine.nodes.some(i=>l.shouldSizeToContent(i))){let i=[...this.engine.nodes];this.batchUpdate(),i.forEach(s=>{l.shouldSizeToContent(s)&&this.resizeToContentCBCheck(s.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,e?[e]:this.engine.nodes)}}_updateResizeEvent(t=!1){let e=!this.parentGridItem&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(i=>i.sizeToContent));return!t&&e&&!this.resizeObserver?(this._sizeThrottle=l.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(t||!e)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(t=".grid-stack-item"){return l.getElement(t)}static getElements(t=".grid-stack-item"){return l.getElements(t)}static getGridElement(t){return h.getElement(t)}static getGridElements(t){return l.getElements(t)}_initMargin(){let t,e=0,i=[];return typeof this.opts.margin=="string"&&(i=this.opts.margin.split(" ")),i.length===2?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):i.length===4?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(t=l.parseHeight(this.opts.margin),this.opts.marginUnit=t.unit,e=this.opts.margin=t.h),this.opts.marginTop===void 0?this.opts.marginTop=e:(t=l.parseHeight(this.opts.marginTop),this.opts.marginTop=t.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=e:(t=l.parseHeight(this.opts.marginBottom),this.opts.marginBottom=t.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=e:(t=l.parseHeight(this.opts.marginRight),this.opts.marginRight=t.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=e:(t=l.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 getDD(){return b}static setupDragIn(t,e,i=document){(e==null?void 0:e.pause)!==void 0&&(g.pauseDrag=e.pause),e=m(m({},Z),e||{});let s=typeof t=="string"?l.getElements(t,i):t;s.length&&(s==null||s.forEach(r=>{b.isDraggable(r)||b.dragIn(r,e)}))}movable(t,e){return this.opts.staticGrid?this:(h.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noMove:s.noMove=!0,this._prepareDragDropByNode(s))}),this)}resizable(t,e){return this.opts.staticGrid?this:(h.getElements(t).forEach(i=>{let s=i.gridstackNode;s&&(e?delete s.noResize:s.noResize=!0,this._prepareDragDropByNode(s))}),this)}disable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!1,t),this.enableResize(!1,t),this._triggerEvent("disable"),this}enable(t=!0){if(!this.opts.staticGrid)return this.enableMove(!0,t),this.enableResize(!0,t),this._triggerEvent("enable"),this}enableMove(t,e=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&e&&i.subGrid.enableMove(t,e)}),this)}enableResize(t,e=!0){return this.opts.staticGrid?this:(t?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(i=>{this._prepareDragDropByNode(i),i.subGrid&&e&&i.subGrid.enableResize(t,e)}),this)}_removeDD(t){return b.draggable(t,"destroy").resizable(t,"destroy"),t.gridstackNode&&delete t.gridstackNode._initDD,delete t.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return b.droppable(this.el,"destroy"),this;let t,e,i=(s,r,o)=>{var c;let n=r.gridstackNode;if(!n)return;if(o=o||r,!((c=n.grid)!=null&&c.el)){o.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let p=o.getBoundingClientRect();o.style.left=p.x+(this.dragTransform.xScale-1)*(s.clientX-p.x)/this.dragTransform.xScale+"px",o.style.top=p.y+(this.dragTransform.yScale-1)*(s.clientY-p.y)/this.dragTransform.yScale+"px",o.style.transformOrigin="0px 0px"}let d=this.el.getBoundingClientRect(),{top:u,left:f}=o.getBoundingClientRect();f-=d.left,u-=d.top;let a={position:{top:u*this.dragTransform.xScale,left:f*this.dragTransform.yScale}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(f/e)),n.y=Math.max(0,Math.round(u/t)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n)){b.off(r,"drag");return}n._willFitPos&&(l.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,s,a,n,e,t)}else this._dragOrResize(o,s,a,n,e,t)};return b.droppable(this.el,{accept:s=>{let r=s.gridstackNode||this._readAttr(s,!1);if((r==null?void 0:r.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let o=!0;if(typeof this.opts.acceptWidgets=="function")o=this.opts.acceptWidgets(s);else{let n=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;o=s.matches(n)}if(o&&r&&this.opts.maxRow){let n={w:r.w,h:r.h,minW:r.minW,minH:r.minH};o=this.engine.willItFit(n)}return o}}).on(this.el,"dropover",(s,r,o)=>{let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._temporaryRemoved)return!1;n!=null&&n.grid&&n.grid!==this&&!n._temporaryRemoved&&n.grid._leave(r,o),e=this.cellWidth(),t=this.getCellHeight(!0),n||(n=this._readAttr(r,!1)),n.grid||(n._isExternal=!0,r.gridstackNode=n),o=o||r;let d=n.w||Math.round(o.offsetWidth/e)||1,u=n.h||Math.round(o.offsetHeight/t)||1;return n.grid&&n.grid!==this?(r._gridstackNodeOrig||(r._gridstackNodeOrig=n),r.gridstackNode=n=w(m({},n),{w:d,h:u,grid:this}),delete n.x,delete n.y,this.engine.cleanupNode(n).nodeBoundFix(n),n._initDD=n._isExternal=n._temporaryRemoved=!0):(n.w=d,n.h=u,n._temporaryRemoved=!0),h._itemRemoving(n.el,!1),b.on(r,"drag",i),i(s,r,o),!1}).on(this.el,"dropout",(s,r,o)=>{let n=r.gridstackNode;return n&&(!n.grid||n.grid===this)&&(this._leave(r,o),this._isTemp&&this.removeAsSubGrid(n)),!1}).on(this.el,"drop",(s,r,o)=>{var c,p;let n=r.gridstackNode;if((n==null?void 0:n.grid)===this&&!n._isExternal)return!1;let d=!!this.placeholder.parentElement;this.placeholder.remove();let u=d&&this.opts.animate;u&&this.setAnimation(!1);let f=r._gridstackNodeOrig;if(delete r._gridstackNodeOrig,d&&(f!=null&&f.grid)&&f.grid!==this){let _=f.grid;_.engine.removeNodeFromLayoutCache(f),_.engine.removedNodes.push(f),_._triggerRemoveEvent()._triggerChangeEvent(),_.parentGridItem&&!_.engine.nodes.length&&_.opts.subGridDynamic&&_.removeAsSubGrid()}if(!n||(d&&(this.engine.cleanupNode(n),n.grid=this),delete n.grid._isTemp,b.off(r,"drag"),o!==r?(o.remove(),r.gridstackNode=f,d&&(r=r.cloneNode(!0))):(r.remove(),this._removeDD(r)),!d))return!1;r.gridstackNode=n,n.el=r;let a=(p=(c=n.subGrid)==null?void 0:c.el)==null?void 0:p.gridstack;return l.copyPos(n,this._readAttr(this.placeholder)),l.removePositioningStyles(r),this.el.appendChild(r),this._prepareElement(r,!0,n),a&&(a.parentGridItem=n,a.opts.styleInHead||a._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(w(m({},s),{type:"dropped"}),f&&f.grid?f:void 0,n),u&&setTimeout(()=>{this.opts&&this.setAnimation(this.opts.animate)}),!1}),this}static _itemRemoving(t,e){let i=t?t.gridstackNode:void 0;!(i!=null&&i.grid)||t.classList.contains(i.grid.opts.removableOptions.decline)||(e?i._isAboutToRemove=!0:delete i._isAboutToRemove,e?t.classList.add("grid-stack-item-removing"):t.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let t=document.querySelector(this.opts.removable);return t?(!this.opts.staticGrid&&!b.isDroppable(t)&&b.droppable(t,this.opts.removableOptions).on(t,"dropover",(e,i)=>h._itemRemoving(i,!0)).on(t,"dropout",(e,i)=>h._itemRemoving(i,!1)),this):this}_prepareDragDropByNode(t){let e=t.el,i=t.noMove||this.opts.disableDrag,s=t.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return t._initDD&&(this._removeDD(e),delete t._initDD),e.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!t._initDD){let r,o,n=(f,a)=>{this._gsEventHandler[f.type]&&this._gsEventHandler[f.type](f,f.target),r=this.cellWidth(),o=this.getCellHeight(!0),this._onStartMoving(e,f,a,t,r,o)},d=(f,a)=>{this._dragOrResize(e,f,a,t,r,o)},u=f=>{this.placeholder.remove(),delete t._moving,delete t._event,delete t._lastTried;let a=t.w!==t._orig.w,c=f.target;if(!(!c.gridstackNode||c.gridstackNode.grid!==this)){if(t.el=c,t._isAboutToRemove){let p=e.gridstackNode.grid;p._gsEventHandler[f.type]&&p._gsEventHandler[f.type](f,c),p.engine.nodes.push(t),p.removeWidget(e,!0,!0)}else l.removePositioningStyles(c),t._temporaryRemoved?(l.copyPos(t,t._orig),this._writePosAttr(c,t),this.engine.addNode(t)):this._writePosAttr(c,t),this._gsEventHandler[f.type]&&this._gsEventHandler[f.type](f,c);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),f.type==="resizestop"&&(Number.isInteger(t.sizeToContent)&&(t.sizeToContent=t.h),this.resizeToContentCheck(a,t))}};b.draggable(e,{start:n,stop:u,drag:d}).resizable(e,{start:n,stop:u,resize:d}),t._initDD=!0}return b.draggable(e,i?"disable":"enable").resizable(e,s?"disable":"enable"),this}_onStartMoving(t,e,i,s,r,o){var n;if(this.engine.cleanNodes().beginUpdate(s),this._writePosAttr(this.placeholder,s),this.el.appendChild(this.placeholder),(n=s.grid)!=null&&n.el)this.dragTransform=l.getValuesFromTransformedElement(t);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let d=this.placeholder.closest(".grid-stack");this.dragTransform=l.getValuesFromTransformedElement(d)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};s.el=this.placeholder,s._lastUiPosition=i.position,s._prevYPix=i.position.top,s._moving=e.type==="dragstart",delete s._lastTried,e.type==="dropover"&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(r,o,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),e.type==="resizestart"&&(b.resizable(t,"option","minWidth",r*(s.minW||1)).resizable(t,"option","minHeight",o*(s.minH||1)),s.maxW&&b.resizable(t,"option","maxWidth",r*s.maxW),s.maxH&&b.resizable(t,"option","maxHeight",o*s.maxH))}_dragOrResize(t,e,i,s,r,o){let n=m({},s._orig),d,u=this.opts.marginLeft,f=this.opts.marginRight,a=this.opts.marginTop,c=this.opts.marginBottom,p=Math.round(o*.1),_=Math.round(r*.1);if(u=Math.min(u,_),f=Math.min(f,_),a=Math.min(a,p),c=Math.min(c,p),e.type==="drag"){if(s._temporaryRemoved)return;let v=i.position.top-s._prevYPix;s._prevYPix=i.position.top,this.opts.draggable.scroll!==!1&&l.updateScrollPosition(t,i.position,v);let E=i.position.left+(i.position.left>s._lastUiPosition.left?-f:u),z=i.position.top+(i.position.top>s._lastUiPosition.top?-c:a);n.x=Math.round(E/r),n.y=Math.round(z/o);let it=this._extraDragRow;if(this.engine.collide(s,n)){let Y=this.getRow(),q=Math.max(0,n.y+s.h-Y);this.opts.maxRow&&Y+q>this.opts.maxRow&&(q=Math.max(0,this.opts.maxRow-Y)),this._extraDragRow=q}else this._extraDragRow=0;if(this._extraDragRow!==it&&this._updateContainerHeight(),s.x===n.x&&s.y===n.y)return}else if(e.type==="resize"){if(n.x<0||(l.updateScrollResize(e,t,o),n.w=Math.round((i.size.width-u)/r),n.h=Math.round((i.size.height-a)/o),s.w===n.w&&s.h===n.h)||s._lastTried&&s._lastTried.w===n.w&&s._lastTried.h===n.h)return;let v=i.position.left+u,E=i.position.top+a;n.x=Math.round(v/r),n.y=Math.round(E/o),d=!0}s._event=e,s._lastTried=n;let y={x:i.position.left+u,y:i.position.top+a,w:(i.size?i.size.width:s.w*r)-u-f,h:(i.size?i.size.height:s.h*o)-a-c};if(this.engine.moveNodeCheck(s,w(m({},n),{cellWidth:r,cellHeight:o,rect:y,resizing:d}))){s._lastUiPosition=i.position,this.engine.cacheRects(r,o,a,f,c,u),delete s._skipDown,d&&s.subGrid&&s.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let v=e.target;this._writePosAttr(v,s),this._gsEventHandler[e.type]&&this._gsEventHandler[e.type](e,v)}}_leave(t,e){let i=t.gridstackNode;i&&(e=e||t,e.style.transform="scale(1)",b.off(t,"drag"),!i._temporaryRemoved&&(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&e?e:t,this.opts.removable===!0&&h._itemRemoving(t,!0),t._gridstackNodeOrig?(t.gridstackNode=t._gridstackNodeOrig,delete t._gridstackNodeOrig):i._isExternal&&(delete i.el,delete t.gridstackNode,this.engine.restoreInitial())))}commit(){return Q(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}};H.resizeToContentParent=".grid-stack-item-content";H.Utils=l;H.Engine=k;H.GDRev="10.1.2";var F=!1,G=[],S=[];function $(h){h.forEach(function(t,e){var i=t.getGridItems();G[e]={},i.forEach(function(s){G[e][s.gridstackNode.id]=s})})}function et(h){var t=h.gridstackNode.grid.el.getAttribute("data-grid-id");return t==="2"?!0:h.getAttribute("data-full-depth")==="False"}function ht(h){return!0}function V(h,t){return H.init(options={cellHeight:11,margin:0,marginBottom:1,float:!0,disableOneColumnMode:!0,animate:!0,removeTimeout:100,disableResize:!0,acceptWidgets:t},h)}function dt(h,t){$(S),console.log(t);var e={};G.forEach((i,s)=>{let r=[];for(let o in i){let n=i[o];if(n.getAttribute("data-item-face")!=="back"){let d=parseInt(n.getAttribute("gs-y"))/2,u=parseInt(n.getAttribute("gs-h"))/2,f=n.gridstackNode.grid.el.getAttribute("gs-max-row")/2,a;t?a=d+1:a=u>1?f-d-u+1:f-d,r.push({id:parseInt(n.getAttribute("gs-id")),x:parseInt(n.getAttribute("gs-x")),y:a,is_full_depth:n.getAttribute("data-full-depth"),face:n.getAttribute("data-item-face")})}}names={0:"front",1:"rear",2:"other"},e[names[s]]=r,e.rack_id=h});try{fetch("/"+basePath+"api/plugins/reorder/save/"+h+"/",{method:"PUT",headers:{"Content-Type":"application/json","X-CSRFToken":netbox_csrf_token},body:JSON.stringify(e)}).then(s=>{if(s.ok){F=!1;var r=document.getElementById("saveButton");r.setAttribute("disabled","disabled"),s.json().then(o=>{console.log(o)}),window.location.href=returnUrl}})}catch(i){console.error("Error:",i)}}var ut=V("#grid-front",et),ft=V("#grid-rear",et),ct=V("#grid-other",ht);S=[ut,ft,ct];$(S);S.forEach(function(h,t){h.on("change",function(e,i){F=!0;var s=document.getElementById("saveButton");s.removeAttribute("disabled"),i.forEach(function(r){var o=t===0?1:0,n=G[o];if(n&&n[r.id]){var d=n[r.id],u=S[o];u.update(d,{x:r.x,y:r.y})}})}),h.on("dropped",function(e,i,s){F=!0;var r=document.getElementById("saveButton");r.removeAttribute("disabled");var o=S.indexOf(i.grid);if(t===0?s.el.setAttribute("data-item-face","front"):t===1&&s.el.setAttribute("data-item-face","rear"),o===2){var n=t===0?1:0,d=S[n];if(d&&s.el.getAttribute("data-full-depth")==="True"){var u=s.el.cloneNode(!0),f=u.querySelector(".grid-stack-item-content");f.removeAttribute("style"),f.classList.add("device_rear"),u.setAttribute("data-item-face","back"),d.addWidget(u)}$(S)}else if((o===0||o===1)&&t===2){if(s.el.getAttribute("data-full-depth")==="True"){var u=s.el.querySelector(".grid-stack-item-content");u.removeAttribute("style"),u.classList.remove("device_rear"),u.setAttribute("data-item-face","front");var a=s.el.getAttribute("data-item-color"),c=s.el.getAttribute("data-item-text-color");u.style="background-color: #"+a+"; color: #"+c+";";var n=o===0?1:0,d=S[n],p=G[n][i.el.getAttribute("gs-id")];d.removeWidget(p)}$(S)}})});var gt=document.getElementById("saveButton");gt.addEventListener("click",function(h){dt(rackId,descUnits)});window.addEventListener("beforeunload",function(h){F&&(h.returnValue="Are you sure you want to leave? Changes you made may not be saved.")});})(); /*! Bundled license information: gridstack/dist/gridstack.js: (*! - * GridStack 7.3.0 + * GridStack 10.1.2 * https://gridstackjs.com/ * * Copyright (c) 2021-2022 Alain Dumesny diff --git a/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js.map b/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js.map index d38f9da..9ff9956 100644 --- a/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js.map +++ b/netbox_reorder_rack/static/netbox_reorder_rack/js/rack.js.map @@ -1,6 +1,6 @@ { "version": 3, "sources": ["../../../static_dev/node_modules/gridstack/src/utils.ts", "../../../static_dev/node_modules/gridstack/src/gridstack-engine.ts", "../../../static_dev/node_modules/gridstack/src/types.ts", "../../../static_dev/node_modules/gridstack/src/dd-manager.ts", "../../../static_dev/node_modules/gridstack/src/dd-touch.ts", "../../../static_dev/node_modules/gridstack/src/dd-resizable-handle.ts", "../../../static_dev/node_modules/gridstack/src/dd-base-impl.ts", "../../../static_dev/node_modules/gridstack/src/dd-resizable.ts", "../../../static_dev/node_modules/gridstack/src/dd-draggable.ts", "../../../static_dev/node_modules/gridstack/src/dd-droppable.ts", "../../../static_dev/node_modules/gridstack/src/dd-element.ts", "../../../static_dev/node_modules/gridstack/src/dd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1CH,EAAYnC,EAAMgC,CAAc,EAGhCW,EAAS5C,EAAaiC,CAAc,EAAEI,EAAe,GAAG,aAAa,OAAO,CAAC,EAGjFD,EAAU,aAAaQ,CAAM,CAC/B,CAEA1C,GAASD,CAAK,CAChB,CACF,CAAC,CACH,CAAC,EAGD,IAAM4C,GAAa,SAAS,eAAe,YAAY,EAGvDA,GAAW,iBAAiB,QAAS,SAAUd,EAAO,CAEpDjB,GAAS,OAAQ,SAAS,CAC5B,CAAC,EAGD,OAAO,iBAAiB,eAAgB,SAAUiB,EAAO,CAEnDhC,KAEFgC,EAAM,YAAc,qEAExB,CAAC", - "names": ["obsolete", "self", "f", "oldName", "newName", "rev", "wrapper", "args", "exports", "obsoleteOpts", "opts", "obsoleteOptsDel", "info", "obsoleteAttr", "el", "oldAttr", "Utils", "_Utils", "els", "list", "a", "b", "x0", "x1", "y0", "y1", "nodes", "dir", "column", "col", "n", "id", "parent", "options", "style", "nonce", "sheet", "selector", "rules", "v", "value", "val", "h", "unit", "match", "target", "sources", "source", "key", "doMinMax", "i", "removeEl", "name", "func", "delay", "isWaiting", "position", "distance", "rect", "innerHeightOrClientHeight", "offsetDiffDown", "offsetDiffUp", "scrollEl", "prevScroll", "event", "height", "offsetTop", "pointerPosY", "top", "bottom", "obj", "skipFields", "ret", "k", "node", "parentNode", "styles", "s", "e", "evt", "p", "simulatedType", "simulatedEvent", "utils_1", "GridStackEngine", "_GridStackEngine", "opts", "flag", "node", "nn", "collide", "opt", "area", "didMove", "newOpt", "moved", "skip", "skip2", "n", "o", "collides", "r0", "r2", "yOver", "xOver", "overMax", "over", "w", "h", "top", "right", "bottom", "left", "a", "b", "_doSwap", "x", "y", "touching", "t", "copyNodes", "val", "dir", "newY", "i", "resizing", "defaults", "before", "copy", "verify", "removedNodes", "dirtyNodes", "nodeList", "column", "found", "box", "triggerAddEvent", "dup", "removeDOM", "triggerEvent", "clonedNode", "clone", "canMove", "c", "p", "wasUndefinedPack", "prevPos", "needToMove", "activeDrag", "_b", "_a", "a1", "a2", "row", "saveElement", "len", "layout", "list", "wl", "l", "nodes", "ratio", "prevColumn", "newNodes", "domOrder", "cacheNodes", "lastIndex", "cacheNode", "j", "move", "scale", "clear", "index", "_c", "prop", "exports", "exports", "DDManager", "exports", "dd_manager_1", "exports", "DDTouch", "simulateMouseEvent", "e", "simulatedType", "touch", "simulatedEvent", "simulatePointerMouseEvent", "touchstart", "touchmove", "touchend", "wasDragging", "pointerdown", "pointerenter", "pointerleave", "dd_touch_1", "DDResizableHandle", "_DDResizableHandle", "host", "direction", "option", "el", "e", "s", "name", "event", "exports", "DDBaseImplement", "event", "callback", "eventName", "exports", "dd_resizable_handle_1", "dd_base_impl_1", "utils_1", "dd_manager_1", "DDResizable", "_DDResizable", "el", "opts", "containmentRect", "newRect", "rect", "event", "callback", "updateHandles", "updateAutoHide", "key", "auto", "e", "handlerDirection", "dir", "ev", "prop", "i", "oEvent", "offsetX", "offsetY", "constrain", "oWidth", "oHeight", "maxWidth", "minWidth", "maxHeight", "minHeight", "width", "height", "containmentEl", "left", "top", "value", "handle", "exports", "dd_manager_1", "utils_1", "dd_base_impl_1", "dd_touch_1", "DDDraggable", "_DDDraggable", "el", "option", "handleName", "event", "callback", "forDestroy", "opts", "key", "e", "skipMouseDown", "name", "skip", "ev", "s", "pause", "grid", "_a", "helper", "prop", "style", "node", "transition", "containmentRect", "offset", "parent", "xformOffsetX", "xformOffsetY", "testEl", "testElPosition", "targetOffset", "exports", "dd_manager_1", "dd_base_impl_1", "utils_1", "dd_touch_1", "DDDroppable", "el", "opts", "event", "callback", "forDestroy", "key", "e", "ev", "parentDrop", "parent", "_a", "drag", "exports", "dd_resizable_1", "dd_draggable_1", "dd_droppable_1", "DDElement", "_DDElement", "el", "eventName", "callback", "opts", "exports", "utils_1", "dd_manager_1", "dd_element_1", "DDGridStack", "el", "opts", "key", "value", "dEl", "grid", "handles", "autoHide", "name", "callback", "event", "els", "create", "hosts", "list", "e", "d", "exports", "gridstack_engine_1", "utils_1", "types_1", "dd_gridstack_1", "dd_touch_1", "dd_manager_1", "dd", "__exportStar", "exports", "GridStack", "_GridStack", "el", "opts", "rowAttr", "anyOpts", "defaults", "parentGridItem", "_a", "engineClass", "cbNodes", "maxH", "n", "children", "_b", "options", "elOrString", "selector", "grids", "parent", "opt", "doc", "placeholderChild", "els", "isGridStackWidget", "w", "node", "content", "domAttr", "ops", "nodeToAdd", "saveContent", "subGridTemplate", "grid", "_c", "autoColumn", "newItem", "newItemOpt", "h", "style", "subGrid", "nodeThatRemoved", "pGrid", "saveGridOpt", "list", "sub", "listOrOpt", "o", "origShow", "layout", "addRemove", "items", "prevCB", "removed", "item", "flag", "forcePixel", "height", "rows", "val", "update", "marginDiff", "data", "column", "oldColumn", "domNodes", "removeDOM", "position", "useDocRelative", "box", "containerPos", "relativeLeft", "relativeTop", "columnWidth", "rowHeight", "x", "y", "name", "callback", "event", "triggerEvent", "doAnimate", "updateClass", "recurse", "a", "i", "keys", "m", "k", "changed", "ddChanged", "key", "value", "elements", "type", "forceUpdate", "cellHeight", "cellHeightUnit", "prefix", "styleLocation", "top", "bottom", "right", "left", "placeholder", "getHeight", "row", "unit", "triggerAddEvent", "copy", "attrs", "classes", "changedColumn", "oneColumn", "forceRemove", "workTodo", "margin", "margins", "dragIn", "dragInOptions", "doEnable", "cellWidth", "onDrag", "helper", "ui", "canAccept", "wasAdded", "origNode", "oGrid", "remove", "trashEl", "noMove", "noResize", "onStartMoving", "dragOrResize", "onEndMoving", "target", "gridToNotify", "p", "resizing", "mLeft", "mRight", "mTop", "mBottom", "mHeight", "mWidth", "distance", "prev", "extra", "rect", "import_gridstack", "changesMade", "gridItemsMap", "grids", "getItems", "grid", "gridIndex", "gridItems", "item", "acceptWidgets", "el", "gridId", "acceptOtherWidgets", "e", "initializeGrid", "element", "saveRack", "rack_id", "desc_units", "data", "gridData", "key", "y", "u_height", "rack_height", "u_position", "response", "button", "jsonData", "error", "frontGrid", "rearGrid", "nonRackedGrid", "event", "items", "otherGridIndex", "otherGridItemsMap", "otherItem", "otherGrid", "previousWidget", "newWidget", "originGrid", "itemContent", "subDiv", "backgroundColor", "textColor", "widget", "saveButton"] + "mappings": "6bAqBM,SAAUA,EAASC,EAAMC,EAAGC,EAAiBC,EAAiBC,EAAW,CAC7E,IAAIC,EAAU,IAAIC,KAChB,QAAQ,KAAK,2BAA6BJ,EAAU,sBAAwBE,EAAM,gCACvED,EAAU,+CAA+C,EAC7DF,EAAE,MAAMD,EAAMM,CAAI,GAE3B,OAAAD,EAAQ,UAAYJ,EAAE,UACfI,CACT,CA+BM,IAAOE,EAAP,MAAOC,CAAK,CAGhB,OAAO,YAAYC,EAAuBC,EAA+B,SAAQ,CAC/E,GAAI,OAAOD,GAAQ,SAAU,CAC3B,IAAME,EAAO,mBAAoBD,EAAQA,EAAmB,OAK5D,GAAIC,GAAO,CAAC,MAAM,CAACF,EAAI,CAAC,CAAC,EAAG,CAC1B,IAAMG,EAAKD,EAAI,eAAeF,CAAG,EACjC,OAAOG,EAAK,CAACA,CAAE,EAAI,CAAA,EAGrB,IAAIC,EAAOH,EAAK,iBAAiBD,CAAG,EACpC,MAAI,CAACI,EAAK,QAAUJ,EAAI,CAAC,IAAM,KAAOA,EAAI,CAAC,IAAM,MAC/CI,EAAOH,EAAK,iBAAiB,IAAMD,CAAG,EACjCI,EAAK,SAAUA,EAAOH,EAAK,iBAAiB,IAAMD,CAAG,IAErD,MAAM,KAAKI,CAAI,EAExB,MAAO,CAACJ,CAAG,CACb,CAGA,OAAO,WAAWA,EAAuBC,EAA+B,SAAQ,CAC9E,GAAI,OAAOD,GAAQ,SAAU,CAC3B,IAAME,EAAO,mBAAoBD,EAAQA,EAAmB,OAC5D,GAAI,CAACD,EAAI,OAAQ,OAAO,KACxB,GAAIE,GAAOF,EAAI,CAAC,IAAM,IACpB,OAAOE,EAAI,eAAeF,EAAI,UAAU,CAAC,CAAC,EAE5C,GAAIA,EAAI,CAAC,IAAM,KAAOA,EAAI,CAAC,IAA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I,EAGzCG,EAASD,EAAY,cAAc,0BAA0B,EACjEC,EAAO,gBAAgB,OAAO,EAE9BA,EAAO,UAAU,IAAI,aAAa,EAClCD,EAAY,aAAa,iBAAkB,MAAM,EAGjDJ,EAAU,UAAUI,CAAW,CACjC,CAIFvC,EAASD,CAAK,CAGhB,UAAYuC,IAAe,GAAKA,IAAe,IAAMpC,IAAc,EAAG,CAEpE,GAAImC,EAAU,GAAG,aAAa,iBAAiB,IAAM,OAAQ,CAE3D,IAAIE,EAAcF,EAAU,GAAG,cAAc,0BAA0B,EAGvEE,EAAY,gBAAgB,OAAO,EACnCA,EAAY,UAAU,OAAO,aAAa,EAC1CA,EAAY,aAAa,iBAAkB,OAAO,EAGlD,IAAIE,EAAkBJ,EAAU,GAAG,aAAa,iBAAiB,EAC7DK,EAAYL,EAAU,GAAG,aAAa,sBAAsB,EAGhEE,EAAY,MAAQ,sBAAwBE,EAAkB,aAAeC,EAAY,IAGzF,IAAIV,EAAkBM,IAAe,EAAK,EAAI,EAC1CH,EAAYpC,EAAMiC,CAAc,EAGhCW,EAAS7C,EAAakC,CAAc,EAAEI,EAAe,GAAG,aAAa,OAAO,CAAC,EAGjFD,EAAU,aAAaQ,CAAM,CAC/B,CAEA3C,EAASD,CAAK,CAChB,CACF,CAAC,CACH,CAAC,EAGD,IAAM6C,GAAa,SAAS,eAAe,YAAY,EAGvDA,GAAW,iBAAiB,QAAS,SAAUd,EAAO,CAEpDjB,GAAS,OAAQ,SAAS,CAC5B,CAAC,EAGD,OAAO,iBAAiB,eAAgB,SAAUiB,EAAO,CAEnDjC,IAEFiC,EAAM,YAAc,qEAExB,CAAC", + "names": ["obsolete", "self", "f", "oldName", "newName", "rev", "wrapper", "args", "Utils", "_Utils", "els", "root", "doc", "el", "list", "n", "strict", "a", "b", "x0", "x1", "y0", "y1", "nodes", "dir", "_a", "_b", "_c", "_d", "diffY", "id", "parent", "options", "style", "nonce", "sheet", "selector", "rules", "v", "value", "val", "h", "unit", "match", "target", "sources", "source", "key", "doMinMax", "node", "i", "removeEl", "func", "delay", "isWaiting", "args", "position", "distance", "rect", "innerHeightOrClientHeight", "offsetDiffDown", "offsetDiffUp", "scrollEl", "prevScroll", "event", "height", "offsetTop", "pointerPosY", "top", "bottom", "obj", "__spreadValues", "skipFields", "ret", "k", "parentNode", "styles", "s", "e", "info", "evt", "p", "simulatedType", "simulatedEvent", "transformReference", "transformValues", "GridStackEngine", "_GridStackEngine", "opts", "flag", "doPack", "node", "nn", "collide", "opt", "area", "didMove", "newOpt", "moved", "__spreadProps", "__spreadValues", "Utils", "skip", "skip2", "skipId", "skip2Id", "n", "o", "collides", "r0", "overMax", "r2", "yOver", "xOver", "over", "w", "h", "top", "right", "bottom", "left", "a", "b", "_doSwap", "x", "y", "touching", "t", "layout", "doSort", "wasBatch", "wasColumnResize", "copyNodes", "index", "list", "after", "val", "dir", "newY", "i", "resizing", "_a", "defaults", "before", "copy", "verify", "removedNodes", "dirtyNodes", "nodeList", "column", "start", "found", "box", "triggerAddEvent", "dup", "skipCollision", "removeDOM", "triggerEvent", "clonedNode", "clone", "canMove", "c", "p", "_b", "wasUndefinedPack", "prevPos", "needToMove", "activeDrag", "a1", "a2", "row", "saveElement", "saveCB", "len", "wl", "l", "nodes", "ratio", "prevColumn", "doCompact", "newNodes", "cacheNodes", "lastIndex", "cacheNode", "_c", "j", "move", "scale", "clear", "existing", "n2", "prop", "gridDefaults", "dragInDefaultOptions", "DDManager", "isTouch", "DDTouch", "simulateMouseEvent", "e", "simulatedType", "touch", "simulatedEvent", "simulatePointerMouseEvent", "touchstart", "touchmove", "touchend", "wasDragging", "DDManager", "pointerdown", "pointerenter", "pointerleave", "DDResizableHandle", "_DDResizableHandle", "host", "dir", "option", "el", "isTouch", "touchstart", "pointerdown", "e", "touchmove", "touchend", "s", "name", "event", "DDBaseImplement", "event", "callback", "eventName", "DDResizable", "_DDResizable", "DDBaseImplement", "el", "option", "containmentRect", "newRect", "rect", "event", "callback", "opts", "updateHandles", "updateAutoHide", "key", "auto", "DDManager", "e", "dir", "DDResizableHandle", "Utils", "ev", "prop", "parent", "dragTransform", "i", "oEvent", "offsetX", "offsetY", "constrain", "oWidth", "oHeight", "maxWidth", "minWidth", "maxHeight", "minHeight", "width", "height", "containmentEl", "left", "top", "value", "scaleReciprocal", "handle", "skipMouseDown", "DDDraggable", "_DDDraggable", "DDBaseImplement", "el", "option", "handleName", "event", "callback", "isTouch", "touchstart", "pointerdown", "forDestroy", "opts", "key", "e", "DDManager", "touchmove", "touchend", "ev", "Utils", "_a", "s", "pause", "grid", "helper", "prop", "style", "node", "transition", "containmentRect", "offset", "parent", "xformOffsetX", "xformOffsetY", "targetOffset", "DDDroppable", "DDBaseImplement", "el", "option", "event", "callback", "isTouch", "pointerenter", "pointerleave", "forDestroy", "opts", "key", "e", "DDManager", "ev", "Utils", "calledByEnter", "_a", "parentDrop", "parent", "drag", "__spreadValues", "DDElement", "_DDElement", "el", "eventName", "callback", "opts", "DDDraggable", "DDResizable", "DDDroppable", "DDGridStack", "el", "opts", "key", "value", "dEl", "grid", "handles", "autoHide", "__spreadProps", "__spreadValues", "name", "callback", "event", "DDManager", "els", "create", "hosts", "Utils", "list", "e", "DDElement", "d", "dd", "DDGridStack", "GridStack", "_GridStack", "options", "elOrString", "el", "Utils", "selector", "grids", "parent", "opt", "grid", "__spreadValues", "doc", "engineClass", "placeholderChild", "gridDefaults", "opts", "_a", "_b", "_c", "_d", "rowAttr", "bk", "oldOpts", "oneSize", "oneColumn", "b", "resp", "a", "defaults", "__spreadProps", "grandParent", "parentGridItem", "isTouch", "GridStackEngine", "cbNodes", "maxH", "n", "children", "DDManager", "els", "isGridStackWidget", "w", "node", "content", "domAttr", "ops", "nodeToAdd", "saveContent", "subGridTemplate", "autoColumn", "newItem", "newItemOpt", "h", "style", "subGrid", "nodeThatRemoved", "pGrid", "saveGridOpt", "saveCB", "list", "sub", "listOrOpt", "o", "origShow", "items", "addRemove", "column", "addAfter", "haveCoord", "prevCB", "removed", "noAnim", "updateNodes", "item", "flag", "forcePixel", "rows", "val", "update", "marginDiff", "data", "forBreakpoint", "newColumn", "i", "layout", "doSort", "oldColumn", "removeDOM", "position", "useDocRelative", "box", "containerPos", "relativeLeft", "relativeTop", "columnWidth", "rowHeight", "x", "y", "name", "callback", "event", "key", "triggerEvent", "doAnimate", "updateClass", "recurse", "keys", "m", "k", "itemContent", "changed", "ddChanged", "widthChanged", "cell", "height", "padding", "itemH", "wantedH", "child", "softMax", "value", "elements", "addedNodes", "removedNodes", "type", "styleLocation", "forceUpdate", "cellHeight", "cellHeightUnit", "prefix", "top", "bottom", "right", "left", "placeholder", "getHeight", "row", "unit", "cssMinHeight", "minRow", "triggerAddEvent", "sizeToContent", "attrs", "clearDefaultAttr", "classes", "columnChanged", "delay", "nodes", "forceRemove", "trackSize", "margin", "margins", "dragIn", "dragInOptions", "root", "dragInDefaultOptions", "doEnable", "cellWidth", "onDrag", "helper", "helperRect", "ui", "canAccept", "wasAdded", "origNode", "oGrid", "remove", "trashEl", "noMove", "noResize", "onStartMoving", "dragOrResize", "onEndMoving", "target", "gridEl", "p", "resizing", "mLeft", "mRight", "mTop", "mBottom", "mHeight", "mWidth", "distance", "prev", "extra", "rect", "obsolete", "changesMade", "gridItemsMap", "grids", "getItems", "grid", "gridIndex", "gridItems", "item", "acceptWidgets", "el", "gridId", "acceptOtherWidgets", "e", "initializeGrid", "element", "GridStack", "saveRack", "rack_id", "desc_units", "data", "gridData", "key", "y", "u_height", "rack_height", "u_position", "response", "button", "jsonData", "error", "frontGrid", "rearGrid", "nonRackedGrid", "event", "items", "otherGridIndex", "otherGridItemsMap", "otherItem", "otherGrid", "previousWidget", "newWidget", "originGrid", "itemContent", "subDiv", "backgroundColor", "textColor", "widget", "saveButton"] } diff --git a/netbox_reorder_rack/static_dev/css/rack.css b/netbox_reorder_rack/static_dev/css/rack.css index 69d363a..4c12694 100644 --- a/netbox_reorder_rack/static_dev/css/rack.css +++ b/netbox_reorder_rack/static_dev/css/rack.css @@ -1,21 +1,21 @@ :root { - --nbx-rack-bg: #e9ecef; + --nbx-rack-bg: var(--tblr-bg-surface-secondary); --nbx-rack-border: #000; --nbx-rack-slot-bg: #e9ecef; --nbx-rack-slot-border: #adb5bd; --nbx-rack-slot-hover-bg: #ced4da; --nbx-rack-link-color: #0d6efd; - --nbx-rack-unit-color: #6c757d + --nbx-rack-unit-color: #6c757d; } -:root[data-netbox-color-mode=dark] { - --nbx-rack-bg: #343a40; +:root[data-bs-theme=dark] { + --nbx-rack-bg: rgb(27, 41, 58); --nbx-rack-border: #6c757d; --nbx-rack-slot-bg: #343a40; --nbx-rack-slot-border: #495057; --nbx-rack-slot-hover-bg: #212529; --nbx-rack-link-color: #9ec5fe; - --nbx-rack-unit-color: #6c757d + --nbx-rack-unit-color: #adb5bd; } .device_rear { diff --git a/netbox_reorder_rack/static_dev/package.json b/netbox_reorder_rack/static_dev/package.json index 5db2f6e..bc3aae2 100644 --- a/netbox_reorder_rack/static_dev/package.json +++ b/netbox_reorder_rack/static_dev/package.json @@ -8,8 +8,8 @@ "bundle:scripts": "node bundle.js --scripts" }, "dependencies": { - "bootstrap": "~5.0.2", - "gridstack": "^7.2.3" + "bootstrap": "5.3.3", + "gridstack": "10.1.2" }, "devDependencies": { "esbuild": "^0.20.1", diff --git a/netbox_reorder_rack/static_dev/yarn.lock b/netbox_reorder_rack/static_dev/yarn.lock index a912adc..d097471 100644 --- a/netbox_reorder_rack/static_dev/yarn.lock +++ b/netbox_reorder_rack/static_dev/yarn.lock @@ -130,10 +130,10 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bootstrap@~5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.2.tgz#aff23d5e0e03c31255ad437530ee6556e78e728e" - integrity sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q== +bootstrap@5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" + integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg== braces@~3.0.2: version "3.0.2" @@ -218,10 +218,10 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -gridstack@^7.2.3: - version "7.3.0" - resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-7.3.0.tgz#7b32395edcd885bc39b84068ac86f2831f7a2451" - integrity sha512-JKZgsHzm1ljkn1NnBZpf8j4NDOBCXTuw0m1ZC0sr6NKUh0BFWzXAONIxtX1hWGUVeKLj5l1VcmnTwCXw5ypDNw== +gridstack@10.1.2: + version "10.1.2" + resolved "https://registry.yarnpkg.com/gridstack/-/gridstack-10.1.2.tgz#58b5ae0057a8aa5e4f6563041c4ca2def3aa4268" + integrity sha512-Nn27XGQ68WtBC513cKQQ4t/dA2uuN/xnNUU50puXEJv6IFk5SzT0Dnsq68GpopO1n0tXUKZKm1Rw7uOUMDz1KQ== hasown@^2.0.0: version "2.0.2"