gridstack 7.3.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/dd-base-impl.d.ts +20 -20
- package/dist/dd-base-impl.js +31 -35
- package/dist/dd-base-impl.js.map +1 -1
- package/dist/dd-draggable.d.ts +28 -28
- package/dist/dd-draggable.js +336 -344
- package/dist/dd-draggable.js.map +1 -1
- package/dist/dd-droppable.d.ts +26 -26
- package/dist/dd-droppable.js +146 -148
- package/dist/dd-droppable.js.map +1 -1
- package/dist/dd-element.d.ts +27 -27
- package/dist/dd-element.js +90 -94
- package/dist/dd-element.js.map +1 -1
- package/dist/dd-gridstack.d.ts +34 -34
- package/dist/dd-gridstack.js +127 -124
- package/dist/dd-gridstack.js.map +1 -1
- package/dist/dd-manager.d.ts +22 -22
- package/dist/dd-manager.js +9 -13
- package/dist/dd-manager.js.map +1 -1
- package/dist/dd-resizable-handle.d.ts +14 -14
- package/dist/dd-resizable-handle.js +102 -105
- package/dist/dd-resizable-handle.js.map +1 -1
- package/dist/dd-resizable.d.ts +28 -28
- package/dist/dd-resizable.js +290 -296
- package/dist/dd-resizable.js.map +1 -1
- package/dist/dd-touch.d.ts +33 -33
- package/dist/dd-touch.js +173 -182
- package/dist/dd-touch.js.map +1 -1
- package/dist/es5/dd-base-impl.d.ts +20 -20
- package/dist/es5/dd-base-impl.js +40 -40
- package/dist/es5/dd-base-impl.js.map +1 -1
- package/dist/es5/dd-draggable.d.ts +28 -28
- package/dist/es5/dd-draggable.js +366 -367
- package/dist/es5/dd-draggable.js.map +1 -1
- package/dist/es5/dd-droppable.d.ts +26 -26
- package/dist/es5/dd-droppable.js +181 -179
- package/dist/es5/dd-droppable.js.map +1 -1
- package/dist/es5/dd-element.d.ts +27 -27
- package/dist/es5/dd-element.js +95 -95
- package/dist/es5/dd-element.js.map +1 -1
- package/dist/es5/dd-gridstack.d.ts +34 -34
- package/dist/es5/dd-gridstack.js +144 -144
- package/dist/es5/dd-gridstack.js.map +1 -1
- package/dist/es5/dd-manager.d.ts +22 -22
- package/dist/es5/dd-manager.js +16 -16
- package/dist/es5/dd-manager.js.map +1 -1
- package/dist/es5/dd-resizable-handle.d.ts +14 -14
- package/dist/es5/dd-resizable-handle.js +105 -106
- package/dist/es5/dd-resizable-handle.js.map +1 -1
- package/dist/es5/dd-resizable.d.ts +28 -28
- package/dist/es5/dd-resizable.js +317 -318
- package/dist/es5/dd-resizable.js.map +1 -1
- package/dist/es5/dd-touch.d.ts +33 -33
- package/dist/es5/dd-touch.js +185 -185
- package/dist/es5/dd-touch.js.map +1 -1
- package/dist/es5/gridstack-all.js +1 -1
- package/dist/es5/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/es5/gridstack-all.js.map +1 -1
- package/dist/es5/gridstack-engine.d.ts +102 -102
- package/dist/es5/gridstack-engine.js +1000 -995
- package/dist/es5/gridstack-engine.js.map +1 -1
- package/dist/es5/gridstack-poly.js +1 -1
- package/dist/es5/gridstack.d.ts +392 -376
- package/dist/es5/gridstack.js +2254 -2233
- package/dist/es5/gridstack.js.map +1 -1
- package/dist/es5/types.d.ts +279 -284
- package/dist/es5/types.js +47 -35
- package/dist/es5/types.js.map +1 -1
- package/dist/es5/utils.d.ts +95 -93
- package/dist/es5/utils.js +600 -569
- package/dist/es5/utils.js.map +1 -1
- package/dist/gridstack-all.js +1 -1
- package/dist/gridstack-all.js.LICENSE.txt +1 -1
- package/dist/gridstack-all.js.map +1 -1
- package/dist/gridstack-engine.d.ts +102 -102
- package/dist/gridstack-engine.js +950 -954
- package/dist/gridstack-engine.js.map +1 -1
- package/dist/gridstack-extra.css +0 -390
- package/dist/gridstack-extra.min.css +1 -1
- package/dist/gridstack.css +19 -97
- package/dist/gridstack.d.ts +392 -376
- package/dist/gridstack.js +2155 -2157
- package/dist/gridstack.js.map +1 -1
- package/dist/gridstack.min.css +1 -1
- package/dist/ng/README.md +154 -0
- package/dist/ng/gridstack-item.component.d.ts +29 -0
- package/dist/ng/gridstack-item.component.js +65 -0
- package/dist/ng/gridstack-item.component.js.map +1 -0
- package/dist/ng/gridstack.component.d.ts +118 -0
- package/dist/ng/gridstack.component.js +245 -0
- package/dist/ng/gridstack.component.js.map +1 -0
- package/dist/src/gridstack-extra.scss +0 -2
- package/dist/src/gridstack.scss +14 -9
- package/dist/types.d.ts +279 -284
- package/dist/types.js +44 -35
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +95 -93
- package/dist/utils.js +546 -527
- package/dist/utils.js.map +1 -1
- package/{dist → dist_save}/angular/gridstack-item.component.ts +5 -3
- package/{dist → dist_save}/angular/gridstack.component.ts +32 -18
- package/dist_save/dd-base-impl.d.ts +20 -0
- package/dist_save/dd-base-impl.js +36 -0
- package/dist_save/dd-base-impl.js.map +1 -0
- package/dist_save/dd-draggable.d.ts +28 -0
- package/dist_save/dd-draggable.js +343 -0
- package/dist_save/dd-draggable.js.map +1 -0
- package/dist_save/dd-droppable.d.ts +26 -0
- package/dist_save/dd-droppable.js +149 -0
- package/dist_save/dd-droppable.js.map +1 -0
- package/dist_save/dd-element.d.ts +27 -0
- package/dist_save/dd-element.js +95 -0
- package/dist_save/dd-element.js.map +1 -0
- package/dist_save/dd-gridstack.d.ts +34 -0
- package/dist_save/dd-gridstack.js +125 -0
- package/dist_save/dd-gridstack.js.map +1 -0
- package/dist_save/dd-manager.d.ts +22 -0
- package/dist_save/dd-manager.js +14 -0
- package/dist_save/dd-manager.js.map +1 -0
- package/dist_save/dd-resizable-handle.d.ts +14 -0
- package/dist_save/dd-resizable-handle.js +106 -0
- package/dist_save/dd-resizable-handle.js.map +1 -0
- package/dist_save/dd-resizable.d.ts +28 -0
- package/dist_save/dd-resizable.js +294 -0
- package/dist_save/dd-resizable.js.map +1 -0
- package/dist_save/dd-touch.d.ts +33 -0
- package/dist_save/dd-touch.js +183 -0
- package/dist_save/dd-touch.js.map +1 -0
- package/dist_save/es5/dd-base-impl.d.ts +20 -0
- package/dist_save/es5/dd-base-impl.js +41 -0
- package/dist_save/es5/dd-base-impl.js.map +1 -0
- package/dist_save/es5/dd-draggable.d.ts +28 -0
- package/dist_save/es5/dd-draggable.js +366 -0
- package/dist_save/es5/dd-draggable.js.map +1 -0
- package/dist_save/es5/dd-droppable.d.ts +26 -0
- package/dist_save/es5/dd-droppable.js +180 -0
- package/dist_save/es5/dd-droppable.js.map +1 -0
- package/dist_save/es5/dd-element.d.ts +27 -0
- package/dist_save/es5/dd-element.js +96 -0
- package/dist_save/es5/dd-element.js.map +1 -0
- package/dist_save/es5/dd-gridstack.d.ts +34 -0
- package/dist_save/es5/dd-gridstack.js +145 -0
- package/dist_save/es5/dd-gridstack.js.map +1 -0
- package/dist_save/es5/dd-manager.d.ts +22 -0
- package/dist_save/es5/dd-manager.js +17 -0
- package/dist_save/es5/dd-manager.js.map +1 -0
- package/dist_save/es5/dd-resizable-handle.d.ts +14 -0
- package/dist_save/es5/dd-resizable-handle.js +107 -0
- package/dist_save/es5/dd-resizable-handle.js.map +1 -0
- package/dist_save/es5/dd-resizable.d.ts +28 -0
- package/dist_save/es5/dd-resizable.js +316 -0
- package/dist_save/es5/dd-resizable.js.map +1 -0
- package/dist_save/es5/dd-touch.d.ts +33 -0
- package/dist_save/es5/dd-touch.js +186 -0
- package/dist_save/es5/dd-touch.js.map +1 -0
- package/dist_save/es5/gridstack-all.js +3 -0
- package/dist_save/es5/gridstack-all.js.LICENSE.txt +7 -0
- package/dist_save/es5/gridstack-all.js.map +1 -0
- package/dist_save/es5/gridstack-engine.d.ts +102 -0
- package/dist_save/es5/gridstack-engine.js +997 -0
- package/dist_save/es5/gridstack-engine.js.map +1 -0
- package/dist_save/es5/gridstack-poly.js +356 -0
- package/dist_save/es5/gridstack.d.ts +376 -0
- package/dist_save/es5/gridstack.js +2238 -0
- package/dist_save/es5/gridstack.js.map +1 -0
- package/dist_save/es5/types.d.ts +284 -0
- package/dist_save/es5/types.js +36 -0
- package/dist_save/es5/types.js.map +1 -0
- package/dist_save/es5/utils.d.ts +95 -0
- package/dist_save/es5/utils.js +590 -0
- package/dist_save/es5/utils.js.map +1 -0
- package/dist_save/gridstack-all.js +3 -0
- package/dist_save/gridstack-all.js.LICENSE.txt +7 -0
- package/dist_save/gridstack-all.js.map +1 -0
- package/dist_save/gridstack-engine.d.ts +102 -0
- package/dist_save/gridstack-engine.js +956 -0
- package/dist_save/gridstack-engine.js.map +1 -0
- package/dist_save/gridstack-extra.css +433 -0
- package/dist_save/gridstack-extra.min.css +1 -0
- package/dist_save/gridstack.css +226 -0
- package/dist_save/gridstack.d.ts +376 -0
- package/dist_save/gridstack.js +2162 -0
- package/dist_save/gridstack.js.map +1 -0
- package/dist_save/gridstack.min.css +1 -0
- package/dist_save/src/gridstack-extra.scss +27 -0
- package/dist_save/src/gridstack.scss +131 -0
- package/dist_save/types.d.ts +284 -0
- package/dist_save/types.js +36 -0
- package/dist_save/types.js.map +1 -0
- package/dist_save/utils.d.ts +95 -0
- package/dist_save/utils.js +548 -0
- package/dist_save/utils.js.map +1 -0
- package/doc/CHANGES.md +20 -0
- package/doc/README.md +21 -14
- package/package.json +25 -24
- /package/{dist → dist_save}/angular/README.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;AASH,uCAAuC;AACvC,2BAA2B;AAC3B,SAAgB,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,OAAe,EAAE,OAAe,EAAE,GAAW;IAC7E,IAAI,OAAO,GAAG;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACpB,OAAO,CAAC,IAAI,CAAC,0BAA0B,GAAG,OAAO,GAAG,qBAAqB,GAAG,GAAG,GAAG,yBAAyB;YAC3G,QAAQ,GAAG,OAAO,GAAG,+CAA+C,CAAC,CAAC;QACtE,OAAO,CAAC,CAA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AAC,cAAc,CAAC,CAAC;IACrD,CAAC;IAcH,YAAC;AAAD,CAAC,AA1eD,IA0eC;AA1eY,sBAAK","sourcesContent":["/**\r\n * utils.ts 7.3.0-dev\r\n * Copyright (c) 2021 Alain Dumesny - see GridStack root license\r\n */\r\n\r\nimport { GridStackElement, GridStackNode, GridStackOptions, numberOrString, GridStackPosition, GridStackWidget } from './types';\r\n\r\nexport interface HeightData {\r\n h: number;\r\n unit: string;\r\n}\r\n\r\n/** checks for obsolete method names */\r\n// eslint-disable-next-line\r\nexport function obsolete(self, f, oldName: string, newName: string, rev: string): (...args: any[]) => any {\r\n let wrapper = (...args) => {\r\n console.warn('gridstack.js: Function `' + oldName + '` is deprecated in ' + rev + ' and has been replaced ' +\r\n 'with `' + newName + '`. It will be **removed** in a future release');\r\n return f.apply(self, args);\r\n }\r\n wrapper.prototype = f.prototype;\r\n return wrapper;\r\n}\r\n\r\n/** checks for obsolete grid options (can be used for any fields, but msg is about options) */\r\nexport function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void {\r\n if (opts[oldName] !== undefined) {\r\n opts[newName] = opts[oldName];\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/** checks for obsolete grid options which are gone */\r\nexport function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void {\r\n if (opts[oldName] !== undefined) {\r\n console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + info);\r\n }\r\n}\r\n\r\n/** checks for obsolete Jquery element attributes */\r\nexport function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void {\r\n let oldAttr = el.getAttribute(oldName);\r\n if (oldAttr !== null) {\r\n el.setAttribute(newName, oldAttr);\r\n console.warn('gridstack.js: attribute `' + oldName + '`=' + oldAttr + ' is deprecated on this object in ' + rev + ' and has been replaced with `' +\r\n newName + '`. It will be **removed** in a future release');\r\n }\r\n}\r\n\r\n/**\r\n * Utility methods\r\n */\r\nexport class Utils {\r\n\r\n /** convert a potential selector into actual list of html elements */\r\n static getElements(els: GridStackElement): HTMLElement[] {\r\n if (typeof els === 'string') {\r\n let list = document.querySelectorAll(els);\r\n if (!list.length && els[0] !== '.' && els[0] !== '#') {\r\n list = document.querySelectorAll('.' + els);\r\n if (!list.length) { list = document.querySelectorAll('#' + els) }\r\n }\r\n return Array.from(list) as HTMLElement[];\r\n }\r\n return [els];\r\n }\r\n\r\n /** convert a potential selector into actual single element */\r\n static getElement(els: GridStackElement): HTMLElement {\r\n if (typeof els === 'string') {\r\n if (!els.length) return null;\r\n if (els[0] === '#') {\r\n return document.getElementById(els.substring(1));\r\n }\r\n if (els[0] === '.' || els[0] === '[') {\r\n return document.querySelector(els);\r\n }\r\n\r\n // if we start with a digit, assume it's an id (error calling querySelector('#1')) as class are not valid CSS\r\n if(!isNaN(+els[0])) { // start with digit\r\n return document.getElementById(els);\r\n }\r\n\r\n // finally try string, then id then class\r\n let el = document.querySelector(els);\r\n if (!el) { el = document.getElementById(els) }\r\n if (!el) { el = document.querySelector('.' + els) }\r\n return el as HTMLElement;\r\n }\r\n return els;\r\n }\r\n\r\n /** returns true if a and b overlap */\r\n static isIntercepted(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return !(a.y >= b.y + b.h || a.y + a.h <= b.y || a.x + a.w <= b.x || a.x >= b.x + b.w);\r\n }\r\n\r\n /** returns true if a and b touch edges or corners */\r\n static isTouching(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return Utils.isIntercepted(a, {x: b.x-0.5, y: b.y-0.5, w: b.w+1, h: b.h+1})\r\n }\r\n\r\n /** returns the area a and b overlap */\r\n static areaIntercept(a: GridStackPosition, b: GridStackPosition): number {\r\n let x0 = (a.x > b.x) ? a.x : b.x;\r\n let x1 = (a.x+a.w < b.x+b.w) ? a.x+a.w : b.x+b.w;\r\n if (x1 <= x0) return 0; // no overlap\r\n let y0 = (a.y > b.y) ? a.y : b.y;\r\n let y1 = (a.y+a.h < b.y+b.h) ? a.y+a.h : b.y+b.h;\r\n if (y1 <= y0) return 0; // no overlap\r\n return (x1-x0) * (y1-y0);\r\n }\r\n\r\n /** returns the area */\r\n static area(a: GridStackPosition): number {\r\n return a.w * a.h;\r\n }\r\n\r\n /**\r\n * Sorts array of nodes\r\n * @param nodes array to sort\r\n * @param dir 1 for asc, -1 for desc (optional)\r\n * @param width width of the grid. If undefined the width will be calculated automatically (optional).\r\n **/\r\n static sort(nodes: GridStackNode[], dir?: -1 | 1, column?: number): GridStackNode[] {\r\n column = column || nodes.reduce((col, n) => Math.max(n.x + n.w, col), 0) || 12;\r\n if (dir === -1)\r\n return nodes.sort((a, b) => (b.x + b.y * column)-(a.x + a.y * column));\r\n else\r\n return nodes.sort((b, a) => (b.x + b.y * column)-(a.x + a.y * column));\r\n }\r\n\r\n /**\r\n * creates a style sheet with style id under given parent\r\n * @param id will set the 'gs-style-id' attribute to that id\r\n * @param parent to insert the stylesheet as first child,\r\n * if none supplied it will be appended to the document head instead.\r\n */\r\n static createStylesheet(id: string, parent?: HTMLElement, options?: { nonce?: string }): CSSStyleSheet {\r\n let style: HTMLStyleElement = document.createElement('style');\r\n const nonce = options?.nonce\r\n if (nonce) style.nonce = nonce\r\n style.setAttribute('type', 'text/css');\r\n style.setAttribute('gs-style-id', id);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n if ((style as any).styleSheet) { // TODO: only CSSImportRule have that and different beast ??\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (style as any).styleSheet.cssText = '';\r\n } else {\r\n style.appendChild(document.createTextNode('')); // WebKit hack\r\n }\r\n if (!parent) {\r\n // default to head\r\n parent = document.getElementsByTagName('head')[0];\r\n parent.appendChild(style);\r\n } else {\r\n parent.insertBefore(style, parent.firstChild);\r\n }\r\n return style.sheet as CSSStyleSheet;\r\n }\r\n\r\n /** removed the given stylesheet id */\r\n static removeStylesheet(id: string): void {\r\n let el = document.querySelector('STYLE[gs-style-id=' + id + ']');\r\n if (el && el.parentNode) el.remove();\r\n }\r\n\r\n /** inserts a CSS rule */\r\n static addCSSRule(sheet: CSSStyleSheet, selector: string, rules: string): void {\r\n if (typeof sheet.addRule === 'function') {\r\n sheet.addRule(selector, rules);\r\n } else if (typeof sheet.insertRule === 'function') {\r\n sheet.insertRule(`${selector}{${rules}}`);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n static toBool(v: unknown): boolean {\r\n if (typeof v === 'boolean') {\r\n return v;\r\n }\r\n if (typeof v === 'string') {\r\n v = v.toLowerCase();\r\n return !(v === '' || v === 'no' || v === 'false' || v === '0');\r\n }\r\n return Boolean(v);\r\n }\r\n\r\n static toNumber(value: null | string): number {\r\n return (value === null || value.length === 0) ? undefined : Number(value);\r\n }\r\n\r\n static parseHeight(val: numberOrString): HeightData {\r\n let h: number;\r\n let unit = 'px';\r\n if (typeof val === 'string') {\r\n let match = val.match(/^(-[0-9]+\\.[0-9]+|[0-9]*\\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%)?$/);\r\n if (!match) {\r\n throw new Error('Invalid height');\r\n }\r\n unit = match[2] || 'px';\r\n h = parseFloat(match[1]);\r\n } else {\r\n h = val;\r\n }\r\n return { h, unit };\r\n }\r\n\r\n /** copies unset fields in target to use the given default sources values */\r\n // eslint-disable-next-line\r\n static defaults(target, ...sources): {} {\r\n\r\n sources.forEach(source => {\r\n for (const key in source) {\r\n if (!source.hasOwnProperty(key)) return;\r\n if (target[key] === null || target[key] === undefined) {\r\n target[key] = source[key];\r\n } else if (typeof source[key] === 'object' && typeof target[key] === 'object') {\r\n // property is an object, recursively add it's field over... #1373\r\n this.defaults(target[key], source[key]);\r\n }\r\n }\r\n });\r\n\r\n return target;\r\n }\r\n\r\n /** given 2 objects return true if they have the same values. Checks for Object {} having same fields and values (just 1 level down) */\r\n static same(a: unknown, b: unknown): boolean {\r\n if (typeof a !== 'object') return a == b;\r\n if (typeof a !== typeof b) return false;\r\n // else we have object, check just 1 level deep for being same things...\r\n if (Object.keys(a).length !== Object.keys(b).length) return false;\r\n for (const key in a) {\r\n if (a[key] !== b[key]) return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** copies over b size & position (GridStackPosition), and optionally min/max as well */\r\n static copyPos(a: GridStackWidget, b: GridStackWidget, doMinMax = false): GridStackWidget {\r\n if (b.x !== undefined) a.x = b.x;\r\n if (b.y !== undefined) a.y = b.y;\r\n if (b.w !== undefined) a.w = b.w;\r\n if (b.h !== undefined) a.h = b.h;\r\n if (doMinMax) {\r\n if (b.minW) a.minW = b.minW;\r\n if (b.minH) a.minH = b.minH;\r\n if (b.maxW) a.maxW = b.maxW;\r\n if (b.maxH) a.maxH = b.maxH;\r\n }\r\n return a;\r\n }\r\n\r\n /** true if a and b has same size & position */\r\n static samePos(a: GridStackPosition, b: GridStackPosition): boolean {\r\n return a && b && a.x === b.x && a.y === b.y && a.w === b.w && a.h === b.h;\r\n }\r\n\r\n /** given a node, makes sure it's min/max are valid */\r\n static sanitizeMinMax(node: GridStackNode) {\r\n // remove 0, undefine, null\r\n if (!node.minW) { delete node.minW; }\r\n if (!node.minH) { delete node.minH; }\r\n if (!node.maxW) { delete node.maxW; }\r\n if (!node.maxH) { delete node.maxH; }\r\n }\r\n\r\n /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */\r\n static removeInternalAndSame(a: unknown, b: unknown):void {\r\n if (typeof a !== 'object' || typeof b !== 'object') return;\r\n for (let key in a) {\r\n let val = a[key];\r\n if (key[0] === '_' || val === b[key]) {\r\n delete a[key]\r\n } else if (val && typeof val === 'object' && b[key] !== undefined) {\r\n for (let i in val) {\r\n if (val[i] === b[key][i] || i[0] === '_') { delete val[i] }\r\n }\r\n if (!Object.keys(val).length) { delete a[key] }\r\n }\r\n }\r\n }\r\n\r\n /** removes internal fields '_' and default values for saving */\r\n static removeInternalForSave(n: GridStackNode, removeEl = true): void {\r\n for (let key in n) { if (key[0] === '_' || n[key] === null || n[key] === undefined ) delete n[key]; }\r\n delete n.grid;\r\n if (removeEl) delete n.el;\r\n // delete default values (will be re-created on read)\r\n if (!n.autoPosition) delete n.autoPosition;\r\n if (!n.noResize) delete n.noResize;\r\n if (!n.noMove) delete n.noMove;\r\n if (!n.locked) delete n.locked;\r\n if (n.w === 1 || n.w === n.minW) delete n.w;\r\n if (n.h === 1 || n.h === n.minH) delete n.h;\r\n }\r\n\r\n /** return the closest parent (or itself) matching the given class */\r\n static closestUpByClass(el: HTMLElement, name: string): HTMLElement {\r\n while (el) {\r\n if (el.classList.contains(name)) return el;\r\n el = el.parentElement\r\n }\r\n return null;\r\n }\r\n\r\n /** delay calling the given function for given delay, preventing new calls from happening while waiting */\r\n static throttle(func: () => void, delay: number): () => void {\r\n let isWaiting = false;\r\n return (...args) => {\r\n if (!isWaiting) {\r\n isWaiting = true;\r\n setTimeout(() => { func(...args); isWaiting = false; }, delay);\r\n }\r\n }\r\n }\r\n\r\n static removePositioningStyles(el: HTMLElement): void {\r\n let style = el.style;\r\n if (style.position) {\r\n style.removeProperty('position');\r\n }\r\n if (style.left) {\r\n style.removeProperty('left');\r\n }\r\n if (style.top) {\r\n style.removeProperty('top');\r\n }\r\n if (style.width) {\r\n style.removeProperty('width');\r\n }\r\n if (style.height) {\r\n style.removeProperty('height');\r\n }\r\n }\r\n\r\n /** @internal returns the passed element if scrollable, else the closest parent that will, up to the entire document scrolling element */\r\n static getScrollElement(el?: HTMLElement): HTMLElement {\r\n if (!el) return document.scrollingElement as HTMLElement || document.documentElement; // IE support\r\n const style = getComputedStyle(el);\r\n const overflowRegex = /(auto|scroll)/;\r\n\r\n if (overflowRegex.test(style.overflow + style.overflowY)) {\r\n return el;\r\n } else {\r\n return this.getScrollElement(el.parentElement);\r\n }\r\n }\r\n\r\n /** @internal */\r\n static updateScrollPosition(el: HTMLElement, position: {top: number}, distance: number): void {\r\n // is widget in view?\r\n let rect = el.getBoundingClientRect();\r\n let innerHeightOrClientHeight = (window.innerHeight || document.documentElement.clientHeight);\r\n if (rect.top < 0 ||\r\n rect.bottom > innerHeightOrClientHeight\r\n ) {\r\n // set scrollTop of first parent that scrolls\r\n // if parent is larger than el, set as low as possible\r\n // to get entire widget on screen\r\n let offsetDiffDown = rect.bottom - innerHeightOrClientHeight;\r\n let offsetDiffUp = rect.top;\r\n let scrollEl = this.getScrollElement(el);\r\n if (scrollEl !== null) {\r\n let prevScroll = scrollEl.scrollTop;\r\n if (rect.top < 0 && distance < 0) {\r\n // moving up\r\n if (el.offsetHeight > innerHeightOrClientHeight) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += Math.abs(offsetDiffUp) > Math.abs(distance) ? distance : offsetDiffUp;\r\n }\r\n } else if (distance > 0) {\r\n // moving down\r\n if (el.offsetHeight > innerHeightOrClientHeight) {\r\n scrollEl.scrollTop += distance;\r\n } else {\r\n scrollEl.scrollTop += offsetDiffDown > distance ? distance : offsetDiffDown;\r\n }\r\n }\r\n // move widget y by amount scrolled\r\n position.top += scrollEl.scrollTop - prevScroll;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal Function used to scroll the page.\r\n *\r\n * @param event `MouseEvent` that triggers the resize\r\n * @param el `HTMLElement` that's being resized\r\n * @param distance Distance from the V edges to start scrolling\r\n */\r\n static updateScrollResize(event: MouseEvent, el: HTMLElement, distance: number): void {\r\n const scrollEl = this.getScrollElement(el);\r\n const height = scrollEl.clientHeight;\r\n // #1727 event.clientY is relative to viewport, so must compare this against position of scrollEl getBoundingClientRect().top\r\n // #1745 Special situation if scrollEl is document 'html': here browser spec states that\r\n // clientHeight is height of viewport, but getBoundingClientRect() is rectangle of html element;\r\n // this discrepancy arises because in reality scrollbar is attached to viewport, not html element itself.\r\n const offsetTop = (scrollEl === this.getScrollElement()) ? 0 : scrollEl.getBoundingClientRect().top;\r\n const pointerPosY = event.clientY - offsetTop;\r\n const top = pointerPosY < distance;\r\n const bottom = pointerPosY > height - distance;\r\n\r\n if (top) {\r\n // This also can be done with a timeout to keep scrolling while the mouse is\r\n // in the scrolling zone. (will have smoother behavior)\r\n scrollEl.scrollBy({ behavior: 'smooth', top: pointerPosY - distance});\r\n } else if (bottom) {\r\n scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - pointerPosY)});\r\n }\r\n }\r\n\r\n /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */\r\n static clone<T>(obj: T): T {\r\n if (obj === null || obj === undefined || typeof(obj) !== 'object') {\r\n return obj;\r\n }\r\n // return Object.assign({}, obj);\r\n if (obj instanceof Array) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return [...obj] as any;\r\n }\r\n return {...obj};\r\n }\r\n\r\n /**\r\n * Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.\r\n * Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies.\r\n */\r\n static cloneDeep<T>(obj: T): T {\r\n // list of fields we will skip during cloneDeep (nested objects, other internal)\r\n const skipFields = ['parentGrid', 'el', 'grid', 'subGrid', 'engine'];\r\n // return JSON.parse(JSON.stringify(obj)); // doesn't work with date format ?\r\n const ret = Utils.clone(obj);\r\n for (const key in ret) {\r\n // NOTE: we don't support function/circular dependencies so skip those properties for now...\r\n if (ret.hasOwnProperty(key) && typeof(ret[key]) === 'object' && key.substring(0, 2) !== '__' && !skipFields.find(k => k === key)) {\r\n ret[key] = Utils.cloneDeep(obj[key]);\r\n }\r\n }\r\n return ret;\r\n }\r\n\r\n /** deep clone the given HTML node, removing teh unique id field */\r\n public static cloneNode(el: HTMLElement): HTMLElement {\r\n const node = el.cloneNode(true) as HTMLElement;\r\n node.removeAttribute('id');\r\n return node;\r\n }\r\n\r\n public static appendTo(el: HTMLElement, parent: string | HTMLElement | Node): void {\r\n let parentNode: HTMLElement;\r\n if (typeof parent === 'string') {\r\n parentNode = document.querySelector(parent as string);\r\n } else {\r\n parentNode = parent as HTMLElement;\r\n }\r\n if (parentNode) {\r\n parentNode.appendChild(el);\r\n }\r\n }\r\n\r\n // public static setPositionRelative(el: HTMLElement): void {\r\n // if (!(/^(?:r|a|f)/).test(window.getComputedStyle(el).position)) {\r\n // el.style.position = \"relative\";\r\n // }\r\n // }\r\n\r\n public static addElStyles(el: HTMLElement, styles: { [prop: string]: string | string[] }): void {\r\n if (styles instanceof Object) {\r\n for (const s in styles) {\r\n if (styles.hasOwnProperty(s)) {\r\n if (Array.isArray(styles[s])) {\r\n // support fallback value\r\n (styles[s] as string[]).forEach(val => {\r\n el.style[s] = val;\r\n });\r\n } else {\r\n el.style[s] = styles[s];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public static initEvent<T>(e: DragEvent | MouseEvent, info: { type: string; target?: EventTarget }): T {\r\n const evt = { type: info.type };\r\n const obj = {\r\n button: 0,\r\n which: 0,\r\n buttons: 1,\r\n bubbles: true,\r\n cancelable: true,\r\n target: info.target ? info.target : e.target\r\n };\r\n // don't check for `instanceof DragEvent` as Safari use MouseEvent #1540\r\n if ((e as DragEvent).dataTransfer) {\r\n evt['dataTransfer'] = (e as DragEvent).dataTransfer; // workaround 'readonly' field.\r\n }\r\n ['altKey','ctrlKey','metaKey','shiftKey'].forEach(p => evt[p] = e[p]); // keys\r\n ['pageX','pageY','clientX','clientY','screenX','screenY'].forEach(p => evt[p] = e[p]); // point info\r\n return {...evt, ...obj} as unknown as T;\r\n }\r\n\r\n /** copies the MouseEvent properties and sends it as another event to the given target */\r\n public static simulateMouseEvent(e: MouseEvent, simulatedType: string, target?: EventTarget): void {\r\n const simulatedEvent = document.createEvent('MouseEvents');\r\n simulatedEvent.initMouseEvent(\r\n simulatedType, // type\r\n true, // bubbles\r\n true, // cancelable\r\n window, // view\r\n 1, // detail\r\n e.screenX, // screenX\r\n e.screenY, // screenY\r\n e.clientX, // clientX\r\n e.clientY, // clientY\r\n e.ctrlKey, // ctrlKey\r\n e.altKey, // altKey\r\n e.shiftKey, // shiftKey\r\n e.metaKey, // metaKey\r\n 0, // button\r\n e.target // relatedTarget\r\n );\r\n (target || e.target).dispatchEvent(simulatedEvent);\r\n }\r\n\r\n /** returns true if event is inside the given element rectangle */\r\n // Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead\r\n // this.el.contains(event.relatedTarget as HTMLElement)\r\n // public static inside(e: MouseEvent, el: HTMLElement): boolean {\r\n // // srcElement, toElement, target: all set to placeholder when leaving simple grid, so we can't use that (Chrome)\r\n // let target: HTMLElement = e.relatedTarget || (e as any).fromElement;\r\n // if (!target) {\r\n // const { bottom, left, right, top } = el.getBoundingClientRect();\r\n // return (e.x < right && e.x > left && e.y < bottom && e.y > top);\r\n // }\r\n // return el.contains(target);\r\n // }\r\n}\r\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see gridstack-all.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GridStack=t():e.GridStack=t()}(self,(()=>(()=>{"use strict";var e={427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDBaseImplement=void 0,t.DDBaseImplement=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(e,t){this._eventRegister[e]=t}off(e){delete this._eventRegister[e]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(e,t){if(!this.disabled&&this._eventRegister&&this._eventRegister[e])return this._eventRegister[e](t)}}},186:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDDraggable=void 0;const s=i(939),o=i(593),n=i(427),r=i(635);class l extends n.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t;let i=t.handle.substring(1);this.dragEl=e.classList.contains(i)?e:e.querySelector(t.handle)||e,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this.enable()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.dragEl.addEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.addEventListener("touchstart",r.touchstart),this.dragEl.addEventListener("pointerdown",r.pointerdown)),this.el.classList.remove("ui-draggable-disabled"))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.dragEl.removeEventListener("mousedown",this._mouseDown),r.isTouch&&(this.dragEl.removeEventListener("touchstart",r.touchstart),this.dragEl.removeEventListener("pointerdown",r.pointerdown)),e||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(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this}_mouseDown(e){if(s.DDManager.mouseHandled)return;if(0!==e.button)return!0;const t=e.target.nodeName.toLowerCase();return["input","textarea","button","select","option"].find((e=>e===t))||e.target.closest('[contenteditable="true"]')||(this.mouseDownEvent=e,delete this.dragging,delete s.DDManager.dragElement,delete s.DDManager.dropElement,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.addEventListener("touchmove",r.touchmove),this.dragEl.addEventListener("touchend",r.touchend)),e.preventDefault(),document.activeElement&&document.activeElement.blur(),s.DDManager.mouseHandled=!0),!0}_callDrag(e){if(!this.dragging)return;const t=o.Utils.initEvent(e,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(t,this.ui()),this.triggerEvent("drag",t)}_mouseMove(e){var t;let i=this.mouseDownEvent;if(this.dragging)if(this._dragFollow(e),s.DDManager.pauseDrag){const t=Number.isInteger(s.DDManager.pauseDrag)?s.DDManager.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout((()=>this._callDrag(e)),t)}else this._callDrag(e);else if(Math.abs(e.x-i.x)+Math.abs(e.y-i.y)>3){this.dragging=!0,s.DDManager.dragElement=this;let i=null===(t=this.el.gridstackNode)||void 0===t?void 0:t.grid;i?s.DDManager.dropElement=i.el.ddElement.ddDroppable:delete s.DDManager.dropElement,this.helper=this._createHelper(e),this._setupHelperContainmentStyle(),this.dragOffset=this._getDragOffset(e,this.el,this.helperContainment);const n=o.Utils.initEvent(e,{target:this.el,type:"dragstart"});this._setupHelperStyle(e),this.option.start&&this.option.start(n,this.ui()),this.triggerEvent("dragstart",n)}return e.preventDefault(),!0}_mouseUp(e){var t;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),r.isTouch&&(this.dragEl.removeEventListener("touchmove",r.touchmove,!0),this.dragEl.removeEventListener("touchend",r.touchend,!0)),this.dragging){delete this.dragging,(null===(t=s.DDManager.dropElement)||void 0===t?void 0:t.el)===this.el.parentElement&&delete s.DDManager.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper===this.el?this._removeHelperStyle():this.helper.remove();const i=o.Utils.initEvent(e,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(i),this.triggerEvent("dragstop",i),s.DDManager.dropElement&&s.DDManager.dropElement.drop(e)}delete this.helper,delete this.mouseDownEvent,delete s.DDManager.dragElement,delete s.DDManager.dropElement,delete s.DDManager.mouseHandled,e.preventDefault()}_createHelper(e){let t=this.el;return"function"==typeof this.option.helper?t=this.option.helper(e):"clone"===this.option.helper&&(t=o.Utils.cloneNode(this.el)),document.body.contains(t)||o.Utils.appendTo(t,"parent"===this.option.appendTo?this.el.parentNode:this.option.appendTo),t===this.el&&(this.dragElementOriginStyle=l.originStyleProp.map((e=>this.el.style[e]))),t}_setupHelperStyle(e){this.helper.classList.add("ui-draggable-dragging");const t=this.helper.style;return t.pointerEvents="none",t["min-width"]=0,t.width=this.dragOffset.width+"px",t.height=this.dragOffset.height+"px",t.willChange="left, top",t.position="fixed",this._dragFollow(e),t.transition="none",setTimeout((()=>{this.helper&&(t.transition=null)}),0),this}_removeHelperStyle(){var e;this.helper.classList.remove("ui-draggable-dragging");let t=null===(e=this.helper)||void 0===e?void 0:e.gridstackNode;if(!(null==t?void 0:t._isAboutToRemove)&&this.dragElementOriginStyle){let e=this.helper,t=this.dragElementOriginStyle.transition||null;e.style.transition=this.dragElementOriginStyle.transition="none",l.originStyleProp.forEach((t=>e.style[t]=this.dragElementOriginStyle[t]||null)),setTimeout((()=>e.style.transition=t),50)}return delete this.dragElementOriginStyle,this}_dragFollow(e){const t=this.helper.style,i=this.dragOffset;t.left=e.clientX+i.offsetLeft-0+"px",t.top=e.clientY+i.offsetTop-0+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,"fixed"!==this.helper.style.position&&(this.parentOriginStylePosition=this.helperContainment.style.position,window.getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(e,t,i){let s=0,n=0;if(i){const e=document.createElement("div");o.Utils.addElStyles(e,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),i.appendChild(e);const t=e.getBoundingClientRect();i.removeChild(e),s=t.left,n=t.top}const r=t.getBoundingClientRect();return{left:r.left,top:r.top,offsetLeft:-e.clientX+r.left-s,offsetTop:-e.clientY+r.top-n,width:r.width,height:r.height}}ui(){const e=this.el.parentElement.getBoundingClientRect(),t=this.helper.getBoundingClientRect();return{position:{top:t.top-e.top,left:t.left-e.left}}}}t.DDDraggable=l,l.originStyleProp=["transition","pointerEvents","position","left","top","minWidth","willChange"]},225:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDDroppable=void 0;const s=i(939),o=i(427),n=i(593),r=i(635);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this.el=e,this.option=t,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(e,t){super.on(e,t)}off(e){super.off(e)}enable(){!1!==this.disabled&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.addEventListener("pointerenter",r.pointerenter),this.el.addEventListener("pointerleave",r.pointerleave)))}disable(e=!1){!0!==this.disabled&&(super.disable(),this.el.classList.remove("ui-droppable"),e||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),r.isTouch&&(this.el.removeEventListener("pointerenter",r.pointerenter),this.el.removeEventListener("pointerleave",r.pointerleave)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(e){return Object.keys(e).forEach((t=>this.option[t]=e[t])),this._setupAccept(),this}_mouseEnter(e){if(!s.DDManager.dragElement)return;if(!this._canDrop(s.DDManager.dragElement.el))return;e.preventDefault(),e.stopPropagation(),s.DDManager.dropElement&&s.DDManager.dropElement!==this&&s.DDManager.dropElement._mouseLeave(e),s.DDManager.dropElement=this;const t=n.Utils.initEvent(e,{target:this.el,type:"dropover"});this.option.over&&this.option.over(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropover",t),this.el.classList.add("ui-droppable-over")}_mouseLeave(e){var t;if(!s.DDManager.dragElement||s.DDManager.dropElement!==this)return;e.preventDefault(),e.stopPropagation();const i=n.Utils.initEvent(e,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(i,this._ui(s.DDManager.dragElement)),this.triggerEvent("dropout",i),s.DDManager.dropElement===this){let i;delete s.DDManager.dropElement;let o=this.el.parentElement;for(;!i&&o;)i=null===(t=o.ddElement)||void 0===t?void 0:t.ddDroppable,o=o.parentElement;i&&i._mouseEnter(e)}}drop(e){e.preventDefault();const t=n.Utils.initEvent(e,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(t,this._ui(s.DDManager.dragElement)),this.triggerEvent("drop",t)}_canDrop(e){return e&&(!this.accept||this.accept(e))}_setupAccept(){return this.option.accept?("string"==typeof this.option.accept?this.accept=e=>e.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(e){return Object.assign({draggable:e.el},e.ui())}}t.DDDroppable=l},320:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDElement=void 0;const s=i(204),o=i(186),n=i(225);class r{constructor(e){this.el=e}static init(e){return e.ddElement||(e.ddElement=new r(e)),e.ddElement}on(e,t){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.on(e,t):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.on(e,t):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.on(e,t),this}off(e){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(e)>-1?this.ddDraggable.off(e):this.ddDroppable&&["drop","dropover","dropout"].indexOf(e)>-1?this.ddDroppable.off(e):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(e)>-1&&this.ddResizable.off(e),this}setupDraggable(e){return this.ddDraggable?this.ddDraggable.updateOption(e):this.ddDraggable=new o.DDDraggable(this.el,e),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(e){return this.ddResizable?this.ddResizable.updateOption(e):this.ddResizable=new s.DDResizable(this.el,e),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(e){return this.ddDroppable?this.ddDroppable.updateOption(e):this.ddDroppable=new n.DDDroppable(this.el,e),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}}t.DDElement=r},958:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDGridStack=void 0;const s=i(593),o=i(939),n=i(320);t.DDGridStack=class{resizable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddResizable&&e.ddResizable[t]();else if("destroy"===t)e.ddResizable&&e.cleanResizable();else if("option"===t)e.setupResizable({[i]:s});else{const i=e.el.gridstackNode.grid;let s=e.el.getAttribute("gs-resize-handles")?e.el.getAttribute("gs-resize-handles"):i.opts.resizable.handles,o=!i.opts.alwaysShowResizeHandle;e.setupResizable(Object.assign(Object.assign(Object.assign({},i.opts.resizable),{handles:s,autoHide:o}),{start:t.start,stop:t.stop,resize:t.resize}))}})),this}draggable(e,t,i,s){return this._getDDElements(e).forEach((e=>{if("disable"===t||"enable"===t)e.ddDraggable&&e.ddDraggable[t]();else if("destroy"===t)e.ddDraggable&&e.cleanDraggable();else if("option"===t)e.setupDraggable({[i]:s});else{const i=e.el.gridstackNode.grid;e.setupDraggable(Object.assign(Object.assign({},i.opts.draggable),{start:t.start,stop:t.stop,drag:t.drag}))}})),this}dragIn(e,t){return this._getDDElements(e).forEach((e=>e.setupDraggable(t))),this}droppable(e,t,i,s){return"function"!=typeof t.accept||t._accept||(t._accept=t.accept,t.accept=e=>t._accept(e)),this._getDDElements(e).forEach((e=>{"disable"===t||"enable"===t?e.ddDroppable&&e.ddDroppable[t]():"destroy"===t?e.ddDroppable&&e.cleanDroppable():"option"===t?e.setupDroppable({[i]:s}):e.setupDroppable(t)})),this}isDroppable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDroppable)||e.ddElement.ddDroppable.disabled)}isDraggable(e){return!(!(e&&e.ddElement&&e.ddElement.ddDraggable)||e.ddElement.ddDraggable.disabled)}isResizable(e){return!(!(e&&e.ddElement&&e.ddElement.ddResizable)||e.ddElement.ddResizable.disabled)}on(e,t,i){return this._getDDElements(e).forEach((e=>e.on(t,(e=>{i(e,o.DDManager.dragElement?o.DDManager.dragElement.el:e.target,o.DDManager.dragElement?o.DDManager.dragElement.helper:null)})))),this}off(e,t){return this._getDDElements(e).forEach((e=>e.off(t))),this}_getDDElements(e,t=!0){let i=s.Utils.getElements(e);if(!i.length)return[];let o=i.map((e=>e.ddElement||(t?n.DDElement.init(e):null)));return t||o.filter((e=>e)),o}}},939:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDManager=void 0,t.DDManager=class{}},41:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizableHandle=void 0;const s=i(635);class o{constructor(e,t,i){this.moving=!1,this.host=e,this.dir=t,this.option=i,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._init()}_init(){const e=document.createElement("div");return e.classList.add("ui-resizable-handle"),e.classList.add(`${o.prefix}${this.dir}`),e.style.zIndex="100",e.style.userSelect="none",this.el=e,this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.addEventListener("touchstart",s.touchstart),this.el.addEventListener("pointerdown",s.pointerdown)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),s.isTouch&&(this.el.removeEventListener("touchstart",s.touchstart),this.el.removeEventListener("pointerdown",s.pointerdown)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(e){this.mouseDownEvent=e,document.addEventListener("mousemove",this._mouseMove,!0),document.addEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.addEventListener("touchmove",s.touchmove),this.el.addEventListener("touchend",s.touchend)),e.stopPropagation(),e.preventDefault()}_mouseMove(e){let t=this.mouseDownEvent;this.moving?this._triggerEvent("move",e):Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",e)),e.stopPropagation(),e.preventDefault()}_mouseUp(e){this.moving&&this._triggerEvent("stop",e),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),s.isTouch&&(this.el.removeEventListener("touchmove",s.touchmove),this.el.removeEventListener("touchend",s.touchend)),delete this.moving,delete this.mouseDownEvent,e.stopPropagation(),e.preventDefault()}_triggerEvent(e,t){return this.option[e]&&this.option[e](t),this}}t.DDResizableHandle=o,o.prefix="ui-resizable-"},204:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDResizable=void 0;const s=i(41),o=i(427),n=i(593),r=i(939);class l extends o.DDBaseImplement{constructor(e,t={}){super(),this._ui=()=>{const e=this.el.parentElement.getBoundingClientRect(),t={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},i=this.temporalRect||t;return{position:{left:i.left-e.left,top:i.top-e.top},size:{width:i.width,height:i.height}}},this.el=e,this.option=t,this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(e,t){super.on(e,t)}off(e){super.off(e)}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(e){let t=e.handles&&e.handles!==this.option.handles,i=e.autoHide&&e.autoHide!==this.option.autoHide;return Object.keys(e).forEach((t=>this.option[t]=e[t])),t&&(this._removeHandlers(),this._setupHandlers()),i&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(e){return e?(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),r.DDManager.overResizeElement===this&&delete r.DDManager.overResizeElement),this}_mouseOver(e){r.DDManager.overResizeElement||r.DDManager.dragElement||(r.DDManager.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(e){r.DDManager.overResizeElement===this&&(delete r.DDManager.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){let e=this.option.handles||"e,s,se";return"all"===e&&(e="n,e,s,w,se,sw,ne,nw"),this.handlers=e.split(",").map((e=>e.trim())).map((e=>new s.DDResizableHandle(this.el,e,{start:e=>{this._resizeStart(e)},stop:e=>{this._resizeStop(e)},move:t=>{this._resizing(t,e)}}))),this}_resizeStart(e){this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=n.Utils.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=e,this._setupHelper(),this._applyChange();const t=n.Utils.initEvent(e,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(t,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",t),this}_resizing(e,t){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(e,t),this._applyChange();const i=n.Utils.initEvent(e,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(i,this._ui()),this.triggerEvent("resize",i),this}_resizeStop(e){const t=n.Utils.initEvent(e,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(t),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",t),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){return this.elOriginStyleVal=l._originStyleProp.map((e=>this.el.style[e])),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 l._originStyleProp.forEach(((e,t)=>{this.el.style[e]=this.elOriginStyleVal[t]||null})),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(e,t){const i=this.startEvent,s={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},o=e.clientX-i.clientX,n=e.clientY-i.clientY;t.indexOf("e")>-1?s.width+=o:t.indexOf("w")>-1&&(s.width-=o,s.left+=o),t.indexOf("s")>-1?s.height+=n:t.indexOf("n")>-1&&(s.height-=n,s.top+=n);const r=this._constrainSize(s.width,s.height);return Math.round(s.width)!==Math.round(r.width)&&(t.indexOf("w")>-1&&(s.left+=s.width-r.width),s.width=r.width),Math.round(s.height)!==Math.round(r.height)&&(t.indexOf("n")>-1&&(s.top+=s.height-r.height),s.height=r.height),s}_constrainSize(e,t){const i=this.option.maxWidth||Number.MAX_SAFE_INTEGER,s=this.option.minWidth||e,o=this.option.maxHeight||Number.MAX_SAFE_INTEGER,n=this.option.minHeight||t;return{width:Math.min(i,Math.max(s,e)),height:Math.min(o,Math.max(n,t))}}_applyChange(){let e={left:0,top:0,width:0,height:0};if("absolute"===this.el.style.position){const t=this.el.parentElement,{left:i,top:s}=t.getBoundingClientRect();e={left:i,top:s,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach((t=>{const i=this.temporalRect[t];this.el.style[t]=i-e[t]+"px"})),this):this}_removeHandlers(){return this.handlers.forEach((e=>e.destroy())),delete this.handlers,this}}t.DDResizable=l,l._originStyleProp=["width","height","position","left","top","opacity","zIndex"]},635:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pointerleave=t.pointerenter=t.pointerdown=t.touchend=t.touchmove=t.touchstart=t.isTouch=void 0;const s=i(939);t.isTouch="undefined"!=typeof window&&"undefined"!=typeof document&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0);class o{}function n(e,t){if(e.touches.length>1)return;e.cancelable&&e.preventDefault();const i=e.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(s)}function r(e,t){e.cancelable&&e.preventDefault();const 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),e.target.dispatchEvent(i)}t.touchstart=function(e){o.touchHandled||(o.touchHandled=!0,n(e,"mousedown"))},t.touchmove=function(e){o.touchHandled&&n(e,"mousemove")},t.touchend=function(e){if(!o.touchHandled)return;o.pointerLeaveTimeout&&(window.clearTimeout(o.pointerLeaveTimeout),delete o.pointerLeaveTimeout);const t=!!s.DDManager.dragElement;n(e,"mouseup"),t||n(e,"click"),o.touchHandled=!1},t.pointerdown=function(e){e.target.releasePointerCapture(e.pointerId)},t.pointerenter=function(e){s.DDManager.dragElement&&r(e,"mouseenter")},t.pointerleave=function(e){s.DDManager.dragElement&&(o.pointerLeaveTimeout=window.setTimeout((()=>{delete o.pointerLeaveTimeout,r(e,"mouseleave")}),10))}},62:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridStackEngine=void 0;const s=i(593);class o{constructor(e={}){this.addedNodes=[],this.removedNodes=[],this.column=e.column||12,this.maxRow=e.maxRow,this._float=e.float,this.nodes=e.nodes||[],this.onChange=e.onChange}batchUpdate(e=!0){return!!this.batchMode===e||(this.batchMode=e,e?(this._prevFloat=this._float,this._float=!0,this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,this._packNodes()._notify())),this}_useEntireRowArea(e,t){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!e._moving||e._skipDown||t.y<=e.y)}_fixCollisions(e,t=e,i,o={}){if(this.sortNodes(-1),!(i=i||this.collide(e,t)))return!1;if(e._moving&&!o.nested&&!this.float&&this.swap(e,i))return!0;let n=t;this._useEntireRowArea(e,t)&&(n={x:0,w:this.column,y:t.y,h:t.h},i=this.collide(e,n,o.skip));let r=!1,l={nested:!0,pack:!1};for(;i=i||this.collide(e,n,o.skip);){let n;if(i.locked||e._moving&&!e._skipDown&&t.y>e.y&&!this.float&&(!this.collide(i,Object.assign(Object.assign({},i),{y:e.y}),e)||!this.collide(i,Object.assign(Object.assign({},i),{y:t.y-i.h}),e))?(e._skipDown=e._skipDown||t.y>e.y,n=this.moveNode(e,Object.assign(Object.assign(Object.assign({},t),{y:i.y+i.h}),l)),i.locked&&n?s.Utils.copyPos(t,e):!i.locked&&n&&o.pack&&(this._packNodes(),t.y=i.y+i.h,s.Utils.copyPos(e,t)),r=r||n):n=this.moveNode(i,Object.assign(Object.assign(Object.assign({},i),{y:t.y+t.h,skip:e}),l)),!n)return r;i=void 0}return r}collide(e,t=e,i){return this.nodes.find((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}collideAll(e,t=e,i){return this.nodes.filter((o=>o!==e&&o!==i&&s.Utils.isIntercepted(o,t)))}directionCollideCoverage(e,t,i){if(!t.rect||!e._rect)return;let s,o=e._rect,n=Object.assign({},t.rect);return n.y>o.y?(n.h+=n.y-o.y,n.y=o.y):n.h+=o.y-n.y,n.x>o.x?(n.w+=n.x-o.x,n.x=o.x):n.w+=o.x-n.x,i.forEach((e=>{if(e.locked||!e._rect)return;let t=e._rect,i=Number.MAX_VALUE,r=Number.MAX_VALUE,l=.5;o.y<t.y?i=(n.y+n.h-t.y)/t.h:o.y+o.h>t.y+t.h&&(i=(t.y+t.h-n.y)/t.h),o.x<t.x?r=(n.x+n.w-t.x)/t.w:o.x+o.w>t.x+t.w&&(r=(t.x+t.w-n.x)/t.w);let a=Math.min(r,i);a>l&&(l=a,s=e)})),t.collide=s,s}cacheRects(e,t,i,s,o,n){return this.nodes.forEach((r=>r._rect={y:r.y*t+i,x:r.x*e+n,w:r.w*e-n-s,h:r.h*t-i-o})),this}swap(e,t){if(!t||t.locked||!e||e.locked)return!1;function i(){let i=t.x,s=t.y;return t.x=e.x,t.y=e.y,e.h!=t.h?(e.x=i,e.y=t.y+t.h):e.w!=t.w?(e.x=t.x+t.w,e.y=s):(e.x=i,e.y=s),e._dirty=t._dirty=!0,!0}let o;if(e.w===t.w&&e.h===t.h&&(e.x===t.x||e.y===t.y)&&(o=s.Utils.isTouching(e,t)))return i();if(!1!==o){if(e.w===t.w&&e.x===t.x&&(o||(o=s.Utils.isTouching(e,t)))){if(t.y<e.y){let i=e;e=t,t=i}return i()}if(!1!==o){if(e.h===t.h&&e.y===t.y&&(o||(o=s.Utils.isTouching(e,t)))){if(t.x<e.x){let i=e;e=t,t=i}return i()}return!1}}}isAreaEmpty(e,t,i,s){let o={x:e||0,y:t||0,w:i||1,h:s||1};return!this.collide(o)}compact(){if(0===this.nodes.length)return this;this.batchUpdate().sortNodes();let e=this.nodes;return this.nodes=[],e.forEach((e=>{e.locked||(e.autoPosition=!0),this.addNode(e,!1),e._dirty=!0})),this.batchUpdate(!1)}set float(e){this._float!==e&&(this._float=e||!1,e||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(e){return this.nodes=s.Utils.sort(this.nodes,e,this.column),this}_packNodes(){return this.batchMode||(this.sortNodes(),this.float?this.nodes.forEach((e=>{if(e._updating||void 0===e._orig||e.y===e._orig.y)return;let t=e.y;for(;t>e._orig.y;)--t,this.collide(e,{x:e.x,y:t,w:e.w,h:e.h})||(e._dirty=!0,e.y=t)})):this.nodes.forEach(((e,t)=>{if(!e.locked)for(;e.y>0;){let i=0===t?0:e.y-1;if(0!==t&&this.collide(e,{x:e.x,y:i,w:e.w,h:e.h}))break;e._dirty=e.y!==i,e.y=i}}))),this}prepareNode(e,t){(e=e||{})._id=e._id||o._idSeq++,void 0!==e.x&&void 0!==e.y&&null!==e.x&&null!==e.y||(e.autoPosition=!0);let i={x:0,y:0,w:1,h:1};return s.Utils.defaults(e,i),e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,s.Utils.sanitizeMinMax(e),"string"==typeof e.x&&(e.x=Number(e.x)),"string"==typeof e.y&&(e.y=Number(e.y)),"string"==typeof e.w&&(e.w=Number(e.w)),"string"==typeof e.h&&(e.h=Number(e.h)),isNaN(e.x)&&(e.x=i.x,e.autoPosition=!0),isNaN(e.y)&&(e.y=i.y,e.autoPosition=!0),isNaN(e.w)&&(e.w=i.w),isNaN(e.h)&&(e.h=i.h),this.nodeBoundFix(e,t)}nodeBoundFix(e,t){let i=e._orig||s.Utils.copyPos({},e);if(e.maxW&&(e.w=Math.min(e.w,e.maxW)),e.maxH&&(e.h=Math.min(e.h,e.maxH)),e.minW&&e.minW<=this.column&&(e.w=Math.max(e.w,e.minW)),e.minH&&(e.h=Math.max(e.h,e.minH)),(1===this.column||e.x+e.w>this.column)&&this.column<12&&!this._inColumnResize&&e._id&&-1===this.findCacheLayout(e,12)){let t=Object.assign({},e);t.autoPosition?(delete t.x,delete t.y):t.x=Math.min(11,t.x),t.w=Math.min(12,t.w),this.cacheOneLayout(t,12)}return e.w>this.column?e.w=this.column:e.w<1&&(e.w=1),this.maxRow&&e.h>this.maxRow?e.h=this.maxRow:e.h<1&&(e.h=1),e.x<0&&(e.x=0),e.y<0&&(e.y=0),e.x+e.w>this.column&&(t?e.w=this.column-e.x:e.x=this.column-e.w),this.maxRow&&e.y+e.h>this.maxRow&&(t?e.h=this.maxRow-e.y:e.y=this.maxRow-e.h),s.Utils.samePos(e,i)||(e._dirty=!0),e}getDirtyNodes(e){return e?this.nodes.filter((e=>e._dirty&&!s.Utils.samePos(e,e._orig))):this.nodes.filter((e=>e._dirty))}_notify(e){if(this.batchMode||!this.onChange)return this;let t=(e||[]).concat(this.getDirtyNodes());return this.onChange(t),this}cleanNodes(){return this.batchMode||this.nodes.forEach((e=>{delete e._dirty,delete e._lastTried})),this}saveInitial(){return this.nodes.forEach((e=>{e._orig=s.Utils.copyPos({},e),delete e._dirty})),this._hasLocked=this.nodes.some((e=>e.locked)),this}restoreInitial(){return this.nodes.forEach((e=>{s.Utils.samePos(e,e._orig)||(s.Utils.copyPos(e,e._orig),e._dirty=!0)})),this._notify(),this}findEmptyPosition(e,t=this.nodes,i=this.column){t=s.Utils.sort(t,-1,i);let o=!1;for(let n=0;!o;++n){let r=n%i,l=Math.floor(n/i);if(r+e.w>i)continue;let a={x:r,y:l,w:e.w,h:e.h};t.find((e=>s.Utils.isIntercepted(a,e)))||(e.x=r,e.y=l,delete e.autoPosition,o=!0)}return o}addNode(e,t=!1){return this.nodes.find((t=>t._id===e._id))||(delete(e=this._inColumnResize?this.nodeBoundFix(e):this.prepareNode(e))._temporaryRemoved,delete e._removeDOM,e.autoPosition&&this.findEmptyPosition(e)&&delete e.autoPosition,this.nodes.push(e),t&&this.addedNodes.push(e),this._fixCollisions(e),this.batchMode||this._packNodes()._notify(),e)}removeNode(e,t=!0,i=!1){return this.nodes.find((t=>t===e))?(i&&this.removedNodes.push(e),t&&(e._removeDOM=!0),this.nodes=this.nodes.filter((t=>t!==e)),this._packNodes()._notify([e])):this}removeAll(e=!0){return delete this._layouts,0===this.nodes.length?this:(e&&this.nodes.forEach((e=>e._removeDOM=!0)),this.removedNodes=this.nodes,this.nodes=[],this._notify(this.removedNodes))}moveNodeCheck(e,t){if(!this.changedPosConstrain(e,t))return!1;if(t.pack=!0,!this.maxRow)return this.moveNode(e,t);let i,n=new o({column:this.column,float:this.float,nodes:this.nodes.map((t=>t===e?(i=Object.assign({},t),i):Object.assign({},t)))});if(!i)return!1;let r=n.moveNode(i,t)&&n.getRow()<=this.maxRow;if(!r&&!t.resizing&&t.collide){let i=t.collide.el.gridstackNode;if(this.swap(e,i))return this._notify(),!0}return!!r&&(n.nodes.filter((e=>e._dirty)).forEach((e=>{let t=this.nodes.find((t=>t._id===e._id));t&&(s.Utils.copyPos(t,e),t._dirty=!0)})),this._notify(),!0)}willItFit(e){if(delete e._willFitPos,!this.maxRow)return!0;let t=new o({column:this.column,float:this.float,nodes:this.nodes.map((e=>Object.assign({},e)))}),i=Object.assign({},e);return this.cleanupNode(i),delete i.el,delete i._id,delete i.content,delete i.grid,t.addNode(i),t.getRow()<=this.maxRow&&(e._willFitPos=s.Utils.copyPos({},i),!0)}changedPosConstrain(e,t){return t.w=t.w||e.w,t.h=t.h||e.h,e.x!==t.x||e.y!==t.y||(e.maxW&&(t.w=Math.min(t.w,e.maxW)),e.maxH&&(t.h=Math.min(t.h,e.maxH)),e.minW&&(t.w=Math.max(t.w,e.minW)),e.minH&&(t.h=Math.max(t.h,e.minH)),e.w!==t.w||e.h!==t.h)}moveNode(e,t){var i,o;if(!e||!t)return!1;let n;void 0===t.pack&&(n=t.pack=!0),"number"!=typeof t.x&&(t.x=e.x),"number"!=typeof t.y&&(t.y=e.y),"number"!=typeof t.w&&(t.w=e.w),"number"!=typeof t.h&&(t.h=e.h);let r=e.w!==t.w||e.h!==t.h,l=s.Utils.copyPos({},e,!0);if(s.Utils.copyPos(l,t),l=this.nodeBoundFix(l,r),s.Utils.copyPos(t,l),s.Utils.samePos(e,t))return!1;let a=s.Utils.copyPos({},e),d=this.collideAll(e,l,t.skip),h=!0;if(d.length){let r=e._moving&&!t.nested,a=r?this.directionCollideCoverage(e,t,d):d[0];if(r&&a&&(null===(o=null===(i=e.grid)||void 0===i?void 0:i.opts)||void 0===o?void 0:o.subGridDynamic)&&!e.grid._isTemp){let i=s.Utils.areaIntercept(t.rect,a._rect),o=s.Utils.area(t.rect),n=s.Utils.area(a._rect);i/(o<n?o:n)>.8&&(a.grid.makeSubGrid(a.el,void 0,e),a=void 0)}a?h=!this._fixCollisions(e,l,a,t):(h=!1,n&&delete t.pack)}return h&&(e._dirty=!0,s.Utils.copyPos(e,l)),t.pack&&this._packNodes()._notify(),!s.Utils.samePos(e,a)}getRow(){return this.nodes.reduce(((e,t)=>Math.max(e,t.y+t.h)),0)}beginUpdate(e){return e._updating||(e._updating=!0,delete e._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let e=this.nodes.find((e=>e._updating));return e&&(delete e._updating,delete e._skipDown),this}save(e=!0){var t;let i=null===(t=this._layouts)||void 0===t?void 0:t.length,o=i&&this.column!==i-1?this._layouts[i-1]:null,n=[];return this.sortNodes(),this.nodes.forEach((t=>{let i=null==o?void 0:o.find((e=>e._id===t._id)),r=Object.assign({},t);i&&(r.x=i.x,r.y=i.y,r.w=i.w),s.Utils.removeInternalForSave(r,!e),n.push(r)})),n}layoutsNodesChange(e){return!this._layouts||this._inColumnResize||this._layouts.forEach(((t,i)=>{if(!t||i===this.column)return this;if(i<this.column)this._layouts[i]=void 0;else{let s=i/this.column;e.forEach((e=>{if(!e._orig)return;let i=t.find((t=>t._id===e._id));i&&(e.y!==e._orig.y&&(i.y+=e.y-e._orig.y),e.x!==e._orig.x&&(i.x=Math.round(e.x*s)),e.w!==e._orig.w&&(i.w=Math.round(e.w*s)))}))}})),this}updateNodeWidths(e,t,i,o="moveScale"){var n;if(!this.nodes.length||!t||e===t)return this;this.cacheLayout(this.nodes,e),this.batchUpdate();let r=[],l=!1;if(1===t&&(null==i?void 0:i.length)){l=!0;let e=0;i.forEach((t=>{t.x=0,t.w=1,t.y=Math.max(t.y,e),e=t.y+t.h})),r=i,i=[]}else i=s.Utils.sort(this.nodes,-1,e);let a=[];if(t>e){a=this._layouts[t]||[];let s=this._layouts.length-1;!a.length&&e!==s&&(null===(n=this._layouts[s])||void 0===n?void 0:n.length)&&(e=s,this._layouts[s].forEach((e=>{let t=i.find((t=>t._id===e._id));t&&(t.x=e.x,t.y=e.y,t.w=e.w)})))}if(a.forEach((e=>{let t=i.findIndex((t=>t._id===e._id));-1!==t&&((e.autoPosition||isNaN(e.x)||isNaN(e.y))&&this.findEmptyPosition(e,r),e.autoPosition||(i[t].x=e.x,i[t].y=e.y,i[t].w=e.w,r.push(i[t])),i.splice(t,1))})),i.length)if("function"==typeof o)o(t,e,r,i);else if(!l){let s=t/e,n="move"===o||"moveScale"===o,l="scale"===o||"moveScale"===o;i.forEach((i=>{i.x=1===t?0:n?Math.round(i.x*s):Math.min(i.x,t-1),i.w=1===t||1===e?1:l?Math.round(i.w*s)||1:Math.min(i.w,t),r.push(i)})),i=[]}return l||(r=s.Utils.sort(r,-1,t)),this._inColumnResize=!0,this.nodes=[],r.forEach((e=>{this.addNode(e,!1),delete e._orig})),this.batchUpdate(!1),delete this._inColumnResize,this}cacheLayout(e,t,i=!1){let s=[];return e.forEach(((e,t)=>{e._id=e._id||o._idSeq++,s[t]={x:e.x,y:e.y,w:e.w,_id:e._id}})),this._layouts=i?[]:this._layouts||[],this._layouts[t]=s,this}cacheOneLayout(e,t){e._id=e._id||o._idSeq++;let i={x:e.x,y:e.y,w:e.w,_id:e._id};e.autoPosition&&(delete i.x,delete i.y,i.autoPosition=!0),this._layouts=this._layouts||[],this._layouts[t]=this._layouts[t]||[];let s=this.findCacheLayout(e,t);return-1===s?this._layouts[t].push(i):this._layouts[t][s]=i,this}findCacheLayout(e,t){var i,s,o;return null!==(o=null===(s=null===(i=this._layouts)||void 0===i?void 0:i[t])||void 0===s?void 0:s.findIndex((t=>t._id===e._id)))&&void 0!==o?o:-1}cleanupNode(e){for(let t in e)"_"===t[0]&&"_id"!==t&&delete e[t];return this}}t.GridStackEngine=o,o._idSeq=1},270:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),t.GridStack=void 0;const n=i(62),r=i(593),l=i(699),a=i(958),d=i(635),h=i(939),g=new a.DDGridStack;o(i(699),t),o(i(593),t),o(i(62),t),o(i(958),t);class p{constructor(e,t={}){var i,s;this._gsEventHandler={},this._extraDragRow=0,this.el=e,t=t||{},e.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),t.row&&(t.minRow=t.maxRow=t.row,delete t.row);let o=r.Utils.toNumber(e.getAttribute("gs-row"));"auto"===t.column&&delete t.column;let a=t;void 0!==a.minWidth&&(t.oneColumnSize=t.oneColumnSize||a.minWidth,delete a.minWidth),void 0!==t.alwaysShowResizeHandle&&(t._alwaysShowResizeHandle=t.alwaysShowResizeHandle);let g=Object.assign(Object.assign({},r.Utils.cloneDeep(l.gridDefaults)),{column:r.Utils.toNumber(e.getAttribute("gs-column"))||l.gridDefaults.column,minRow:o||r.Utils.toNumber(e.getAttribute("gs-min-row"))||l.gridDefaults.minRow,maxRow:o||r.Utils.toNumber(e.getAttribute("gs-max-row"))||l.gridDefaults.maxRow,staticGrid:r.Utils.toBool(e.getAttribute("gs-static"))||l.gridDefaults.staticGrid,draggable:{handle:(t.handleClass?"."+t.handleClass:t.handle?t.handle:"")||l.gridDefaults.draggable.handle},removableOptions:{accept:t.itemClass?"."+t.itemClass:l.gridDefaults.removableOptions.accept}});e.getAttribute("gs-animate")&&(g.animate=r.Utils.toBool(e.getAttribute("gs-animate"))),this.opts=r.Utils.defaults(t,g),t=null,this._initMargin(),1!==this.opts.column&&!this.opts.disableOneColumnMode&&this._widthOrContainer()<=this.opts.oneColumnSize&&(this._prevColumn=this.getColumn(),this.opts.column=1),"auto"===this.opts.rtl&&(this.opts.rtl="rtl"===e.style.direction),this.opts.rtl&&this.el.classList.add("grid-stack-rtl");let u=null===(i=r.Utils.closestUpByClass(this.el,l.gridDefaults.itemClass))||void 0===i?void 0:i.gridstackNode;u&&(u.subGrid=this,this.parentGridItem=u,this.el.classList.add("grid-stack-nested"),u.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight="auto"===this.opts.cellHeight,this._isAutoCellHeight||"initial"===this.opts.cellHeight?this.cellHeight(void 0,!1):("number"==typeof this.opts.cellHeight&&this.opts.cellHeightUnit&&this.opts.cellHeightUnit!==l.gridDefaults.cellHeightUnit&&(this.opts.cellHeight=this.opts.cellHeight+this.opts.cellHeightUnit,delete this.opts.cellHeightUnit),this.cellHeight(this.opts.cellHeight,!1)),"mobile"===this.opts.alwaysShowResizeHandle&&(this.opts.alwaysShowResizeHandle=d.isTouch),this._styleSheetClass="grid-stack-instance-"+n.GridStackEngine._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let c=this.opts.engineClass||p.engineClass||n.GridStackEngine;if(this.engine=new c({column:this.getColumn(),float:this.opts.float,maxRow:this.opts.maxRow,onChange:e=>{let t=0;this.engine.nodes.forEach((e=>{t=Math.max(t,e.y+e.h)})),e.forEach((e=>{let t=e.el;t&&(e._removeDOM?(t&&t.remove(),delete e._removeDOM):this._writePosAttr(t,e))})),this._updateStyles(!1,t)}}),this.opts.auto&&(this.batchUpdate(),this.getGridItems().forEach((e=>this._prepareElement(e))),this.batchUpdate(!1)),this.opts.children){let e=this.opts.children;delete this.opts.children,e.length&&this.load(e)}this.setAnimation(this.opts.animate),this._updateStyles(),12!=this.opts.column&&this.el.classList.add("grid-stack-"+this.opts.column),this.opts.dragIn&&p.setupDragIn(this.opts.dragIn,this.opts.dragInOptions),delete this.opts.dragIn,delete this.opts.dragInOptions,this.opts.subGridDynamic&&!h.DDManager.pauseDrag&&(h.DDManager.pauseDrag=!0),void 0!==(null===(s=this.opts.draggable)||void 0===s?void 0:s.pause)&&(h.DDManager.pauseDrag=this.opts.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateWindowResizeEvent()}static init(e={},t=".grid-stack"){let i=p.getGridElement(t);return i?(i.gridstack||(i.gridstack=new p(i,r.Utils.cloneDeep(e))),i.gridstack):("string"==typeof t?console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'):console.error("GridStack.init() no grid element was passed."),null)}static initAll(e={},t=".grid-stack"){let i=[];return p.getGridElements(t).forEach((t=>{t.gridstack||(t.gridstack=new p(t,r.Utils.cloneDeep(e)),delete e.dragIn,delete e.dragInOptions),i.push(t.gridstack)})),0===i.length&&console.error('GridStack.initAll() no grid was found with selector "'+t+'" - element missing or wrong selector ?\nNote: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.'),i}static addGrid(e,t={}){if(!e)return null;let i=e;if(!e.classList.contains("grid-stack")||t.addRemoveCB)if(t.addRemoveCB)i=t.addRemoveCB(e,t,!0,!0);else{let s=document.implementation.createHTMLDocument("");s.body.innerHTML=`<div class="grid-stack ${t.class||""}"></div>`,i=s.body.children[0],e.appendChild(i)}return p.init(t,i)}static registerEngine(e){p.engineClass=e}get placeholder(){if(!this._placeholder){let e=document.createElement("div");e.className="placeholder-content",this.opts.placeholderText&&(e.innerHTML=this.opts.placeholderText),this._placeholder=document.createElement("div"),this._placeholder.classList.add(this.opts.placeholderClass,l.gridDefaults.itemClass,this.opts.itemClass),this.placeholder.appendChild(e)}return this._placeholder}addWidget(e,t){let i,s;if("string"==typeof e){let t=document.implementation.createHTMLDocument("");t.body.innerHTML=e,i=t.body.children[0]}else if(0===arguments.length||1===arguments.length&&(void 0!==(o=e).el||void 0!==o.x||void 0!==o.y||void 0!==o.w||void 0!==o.h||void 0!==o.content))if(s=t=e,null==s?void 0:s.el)i=s.el;else if(this.opts.addRemoveCB)i=this.opts.addRemoveCB(this.el,t,!0,!1);else{let e=(null==t?void 0:t.content)||"",s=document.implementation.createHTMLDocument("");s.body.innerHTML=`<div class="grid-stack-item ${this.opts.itemClass||""}"><div class="grid-stack-item-content">${e}</div></div>`,i=s.body.children[0]}else i=e;var o;if(!i)return;let n=this._readAttr(i);return t=r.Utils.cloneDeep(t)||{},r.Utils.defaults(t,n),s=this.engine.prepareNode(t),this._writeAttr(i,t),this._insertNotAppend?this.el.prepend(i):this.el.appendChild(i),this._prepareElement(i,!0,t),this._updateContainerHeight(),s.subGrid&&this.makeSubGrid(s.el,void 0,void 0,!1),this._prevColumn&&1===this.opts.column&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,i}makeSubGrid(e,t,i,s=!0){var o,n,l;let a,d=e.gridstackNode;if(d||(d=this.makeWidget(e).gridstackNode),null===(o=d.subGrid)||void 0===o?void 0:o.el)return d.subGrid;let h,g=this;for(;g&&!a;)a=null===(n=g.opts)||void 0===n?void 0:n.subGrid,g=null===(l=g.parentGridItem)||void 0===l?void 0:l.grid;t=r.Utils.cloneDeep(Object.assign(Object.assign(Object.assign({},a||{}),{children:void 0}),t||d.subGrid)),d.subGrid=t,"auto"===t.column&&(h=!0,t.column=Math.max(d.w||1,(null==i?void 0:i.w)||1),t.disableOneColumnMode=!0);let u,c,m=d.el.querySelector(".grid-stack-item-content");if(s){if(this._removeDD(d.el),c=Object.assign(Object.assign({},d),{x:0,y:0}),r.Utils.removeInternalForSave(c),delete c.subGrid,d.content&&(c.content=d.content,delete d.content),this.opts.addRemoveCB)u=this.opts.addRemoveCB(this.el,c,!0,!1);else{let e=document.implementation.createHTMLDocument("");e.body.innerHTML='<div class="grid-stack-item"></div>',u=e.body.children[0],u.appendChild(m),e.body.innerHTML='<div class="grid-stack-item-content"></div>',m=e.body.children[0],d.el.appendChild(m)}this._prepareDragDropByNode(d)}if(i){let e=h?t.column:d.w,s=d.h+i.h,o=d.el.style;o.transition="none",this.update(d.el,{w:e,h:s}),setTimeout((()=>o.transition=null))}this.opts.addRemoveCB&&(t.addRemoveCB=t.addRemoveCB||this.opts.addRemoveCB);let v=d.subGrid=p.addGrid(m,t);return(null==i?void 0:i._moving)&&(v._isTemp=!0),h&&(v._autoColumn=!0),s&&v.addWidget(u,c),i&&(i._moving?window.setTimeout((()=>r.Utils.simulateMouseEvent(i._event,"mouseenter",v.el)),0):v.addWidget(d.el,d)),v}removeAsSubGrid(e){var t;let i=null===(t=this.parentGridItem)||void 0===t?void 0:t.grid;i&&(i.batchUpdate(),i.removeWidget(this.parentGridItem.el,!0,!0),this.engine.nodes.forEach((e=>{e.x+=this.parentGridItem.x,e.y+=this.parentGridItem.y,i.addWidget(e.el,e)})),i.batchUpdate(!1),this.parentGridItem&&delete this.parentGridItem.subGrid,delete this.parentGridItem,e&&window.setTimeout((()=>r.Utils.simulateMouseEvent(e._event,"mouseenter",i.el)),0))}save(e=!0,t=!1){let i=this.engine.save(e);if(i.forEach((i=>{var s;if(e&&i.el&&!i.subGrid){let e=i.el.querySelector(".grid-stack-item-content");i.content=e?e.innerHTML:void 0,i.content||delete i.content}else if(e||delete i.content,null===(s=i.subGrid)||void 0===s?void 0:s.el){const s=i.subGrid.save(e,t);i.subGrid=t?s:{children:s}}delete i.el})),t){let e=r.Utils.cloneDeep(this.opts);e.marginBottom===e.marginTop&&e.marginRight===e.marginLeft&&e.marginTop===e.marginRight&&(e.margin=e.marginTop,delete e.marginTop,delete e.marginRight,delete e.marginBottom,delete e.marginLeft),e.rtl===("rtl"===this.el.style.direction)&&(e.rtl="auto"),this._isAutoCellHeight&&(e.cellHeight="auto"),this._autoColumn&&(e.column="auto",delete e.disableOneColumnMode);const t=e._alwaysShowResizeHandle;return delete e._alwaysShowResizeHandle,void 0!==t?e.alwaysShowResizeHandle=t:delete e.alwaysShowResizeHandle,r.Utils.removeInternalAndSame(e,l.gridDefaults),e.children=i,e}return i}load(e,t=this.opts.addRemoveCB||!0){let i=p.Utils.sort([...e],-1,this._prevColumn||this.getColumn());this._insertNotAppend=!0,this._prevColumn&&this._prevColumn!==this.opts.column&&i.some((e=>e.x+e.w>this.opts.column))&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(i,this._prevColumn,!0));const s=this.opts.addRemoveCB;"function"==typeof t&&(this.opts.addRemoveCB=t);let o=[];return this.batchUpdate(),t&&[...this.engine.nodes].forEach((e=>{i.find((t=>e.id===t.id))||(this.opts.addRemoveCB&&this.opts.addRemoveCB(this.el,e,!1,!1),o.push(e),this.removeWidget(e.el,!0,!1))})),i.forEach((e=>{let i=e.id||0===e.id?this.engine.nodes.find((t=>t.id===e.id)):void 0;if(i){if(this.update(i.el,e),e.subGrid&&e.subGrid.children){let t=i.el.querySelector(".grid-stack");t&&t.gridstack&&(t.gridstack.load(e.subGrid.children),this._insertNotAppend=!0)}}else t&&this.addWidget(e)})),this.engine.removedNodes=o,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,delete this._insertNotAppend,s?this.opts.addRemoveCB=s:delete this.opts.addRemoveCB,this}batchUpdate(e=!0){return this.engine.batchUpdate(e),e||(this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(e=!1){if(this.opts.cellHeight&&"auto"!==this.opts.cellHeight&&(!e||!this.opts.cellHeightUnit||"px"===this.opts.cellHeightUnit))return this.opts.cellHeight;let t=this.el.querySelector("."+this.opts.itemClass);if(t){let e=r.Utils.toNumber(t.getAttribute("gs-h"));return Math.round(t.offsetHeight/e)}let i=parseInt(this.el.getAttribute("gs-current-row"));return i?Math.round(this.el.getBoundingClientRect().height/i):this.opts.cellHeight}cellHeight(e,t=!0){if(t&&void 0!==e&&this._isAutoCellHeight!==("auto"===e)&&(this._isAutoCellHeight="auto"===e,this._updateWindowResizeEvent()),"initial"!==e&&"auto"!==e||(e=void 0),void 0===e){let t=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;e=this.cellWidth()+t}let i=r.Utils.parseHeight(e);return this.opts.cellHeightUnit===i.unit&&this.opts.cellHeight===i.h||(this.opts.cellHeightUnit=i.unit,this.opts.cellHeight=i.h,t&&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(e,t="moveScale"){if(e<1||this.opts.column===e)return this;let i,s=this.getColumn();return 1===e?this._prevColumn=s:delete this._prevColumn,this.el.classList.remove("grid-stack-"+s),this.el.classList.add("grid-stack-"+e),this.opts.column=this.engine.column=e,1===e&&this.opts.oneColumnModeDomSort&&(i=[],this.getGridItems().forEach((e=>{e.gridstackNode&&i.push(e.gridstackNode)})),i.length||(i=void 0)),this.engine.updateNodeWidths(s,e,i,t),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((e=>e.matches("."+this.opts.itemClass)&&!e.matches("."+this.opts.placeholderClass)))}destroy(e=!0){if(this.el)return this._updateWindowResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),e?this.el.parentNode.removeChild(this.el):(this.removeAll(e),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(e){return this.opts.float!==e&&(this.opts.float=this.engine.float=e,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(e,t=!1){let i,s=this.el.getBoundingClientRect();i=t?{top:s.top+document.documentElement.scrollTop,left:s.left}:{top:this.el.offsetTop,left:this.el.offsetLeft};let o=e.left-i.left,n=e.top-i.top,r=s.width/this.getColumn(),l=s.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(o/r),y:Math.floor(n/l)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(e,t,i,s){return this.engine.isAreaEmpty(e,t,i,s)}makeWidget(e){let t=p.getElement(e);return this._prepareElement(t,!0),this._updateContainerHeight(),this._triggerAddEvent(),this._triggerChangeEvent(),t}on(e,t){if(-1!==e.indexOf(" "))return e.split(" ").forEach((e=>this.on(e,t))),this;if("change"===e||"added"===e||"removed"===e||"enable"===e||"disable"===e){let i="enable"===e||"disable"===e;this._gsEventHandler[e]=i?e=>t(e):e=>t(e,e.detail),this.el.addEventListener(e,this._gsEventHandler[e])}else"drag"===e||"dragstart"===e||"dragstop"===e||"resizestart"===e||"resize"===e||"resizestop"===e||"dropped"===e?this._gsEventHandler[e]=t:console.log("GridStack.on("+e+') event not supported, but you can still use $(".grid-stack").on(...) while jquery-ui is still used internally.');return this}off(e){return-1!==e.indexOf(" ")?(e.split(" ").forEach((e=>this.off(e))),this):("change"!==e&&"added"!==e&&"removed"!==e&&"enable"!==e&&"disable"!==e||this._gsEventHandler[e]&&this.el.removeEventListener(e,this._gsEventHandler[e]),delete this._gsEventHandler[e],this)}removeWidget(e,t=!0,i=!0){return p.getElements(e).forEach((e=>{if(e.parentElement&&e.parentElement!==this.el)return;let s=e.gridstackNode;s||(s=this.engine.nodes.find((t=>e===t.el))),s&&(delete e.gridstackNode,this._removeDD(e),this.engine.removeNode(s,t,i),t&&e.parentElement&&e.remove())})),i&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this}removeAll(e=!0){return this.engine.nodes.forEach((e=>{delete e.el.gridstackNode,this._removeDD(e.el)})),this.engine.removeAll(e),this._triggerRemoveEvent(),this}setAnimation(e){return e?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}setStatic(e,t=!0,i=!0){return this.opts.staticGrid===e||(this.opts.staticGrid=e,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach((s=>{this._prepareDragDropByNode(s),s.subGrid&&i&&s.subGrid.setStatic(e,t,i)})),t&&this._setStaticClass()),this}update(e,t){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 t={x:i[s++],y:i[s++],w:i[s++],h:i[s++]},this.update(e,t)}return p.getElements(e).forEach((e=>{if(!e||!e.gridstackNode)return;let i=e.gridstackNode,s=r.Utils.cloneDeep(t);delete s.autoPosition;let o,n=["x","y","w","h"];if(n.some((e=>void 0!==s[e]&&s[e]!==i[e]))&&(o={},n.forEach((e=>{o[e]=void 0!==s[e]?s[e]:i[e],delete s[e]}))),!o&&(s.minW||s.minH||s.maxW||s.maxH)&&(o={}),s.content){let t=e.querySelector(".grid-stack-item-content");t&&t.innerHTML!==s.content&&(t.innerHTML=s.content),delete s.content}let l=!1,a=!1;for(const e in s)"_"!==e[0]&&i[e]!==s[e]&&(i[e]=s[e],l=!0,a=a||!this.opts.staticGrid&&("noResize"===e||"noMove"===e||"locked"===e));r.Utils.sanitizeMinMax(i),o&&(this.engine.cleanNodes().beginUpdate(i).moveNode(i,o),this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()),l&&this._writeAttr(e,i),a&&this._prepareDragDropByNode(i)})),this}margin(e){if(!("string"==typeof e&&e.split(" ").length>1)){let t=r.Utils.parseHeight(e);if(this.opts.marginUnit===t.unit&&this.opts.margin===t.h)return}return this.opts.margin=e,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(e){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,t=0,i={x:e[t++],y:e[t++],w:e[t++],h:e[t++],autoPosition:e[t++]};return this.willItFit(i)}return this.engine.willItFit(e)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let e=this.engine.getDirtyNodes(!0);return e&&e.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(e),this._triggerEvent("change",e)),this.engine.saveInitial(),this}_triggerAddEvent(){return this.engine.batchMode||this.engine.addedNodes&&this.engine.addedNodes.length>0&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach((e=>{delete e._dirty})),this._triggerEvent("added",this.engine.addedNodes),this.engine.addedNodes=[]),this}_triggerRemoveEvent(){return this.engine.batchMode||this.engine.removedNodes&&this.engine.removedNodes.length>0&&(this._triggerEvent("removed",this.engine.removedNodes),this.engine.removedNodes=[]),this}_triggerEvent(e,t){let i=t?new CustomEvent(e,{bubbles:!1,detail:t}):new Event(e);return this.el.dispatchEvent(i),this}_removeStylesheet(){return this._styles&&(r.Utils.removeStylesheet(this._styleSheetClass),delete this._styles),this}_updateStyles(e=!1,t){if(e&&this._removeStylesheet(),t||(t=this.getRow()),this._updateContainerHeight(),0===this.opts.cellHeight)return this;let i=this.opts.cellHeight,s=this.opts.cellHeightUnit,o=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let e=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=r.Utils.createStylesheet(this._styleSheetClass,e,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,r.Utils.addCSSRule(this._styles,o,`min-height: ${i}${s}`);let t=this.opts.marginTop+this.opts.marginUnit,n=this.opts.marginBottom+this.opts.marginUnit,l=this.opts.marginRight+this.opts.marginUnit,a=this.opts.marginLeft+this.opts.marginUnit,d=`${o} > .grid-stack-item-content`,h=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;r.Utils.addCSSRule(this._styles,d,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,h,`top: ${t}; right: ${l}; bottom: ${n}; left: ${a};`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-ne`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-e`,`right: ${l}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-se`,`right: ${l}; bottom: ${n}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-nw`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-w`,`left: ${a}`),r.Utils.addCSSRule(this._styles,`${o} > .ui-resizable-sw`,`left: ${a}; bottom: ${n}`)}if((t=t||this._styles._max)>this._styles._max){let e=e=>i*e+s;for(let i=this._styles._max+1;i<=t;i++){let t=e(i);r.Utils.addCSSRule(this._styles,`${o}[gs-y="${i-1}"]`,`top: ${e(i-1)}`),r.Utils.addCSSRule(this._styles,`${o}[gs-h="${i}"]`,`height: ${t}`)}this._styles._max=t}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let e=this.getRow()+this._extraDragRow;if(this.el.setAttribute("gs-current-row",String(e)),0===e)return this.el.style.removeProperty("min-height"),this;let t=this.opts.cellHeight,i=this.opts.cellHeightUnit;return t?(this.el.style.minHeight=e*t+i,this):this}_prepareElement(e,t=!1,i){e.classList.add(this.opts.itemClass),i=i||this._readAttr(e),e.gridstackNode=i,i.el=e,i.grid=this;let s=Object.assign({},i);return i=this.engine.addNode(i,t),r.Utils.same(i,s)||this._writeAttr(e,i),this._prepareDragDropByNode(i),this}_writePosAttr(e,t){return void 0!==t.x&&null!==t.x&&e.setAttribute("gs-x",String(t.x)),void 0!==t.y&&null!==t.y&&e.setAttribute("gs-y",String(t.y)),t.w>1?e.setAttribute("gs-w",String(t.w)):e.removeAttribute("gs-w"),t.h>1?e.setAttribute("gs-h",String(t.h)):e.removeAttribute("gs-h"),this}_writeAttr(e,t){if(!t)return this;this._writePosAttr(e,t);let i={autoPosition:"gs-auto-position",noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id"};for(const s in i)t[s]?e.setAttribute(i[s],String(t[s])):e.removeAttribute(i[s]);return this}_readAttr(e){let t={};t.x=r.Utils.toNumber(e.getAttribute("gs-x")),t.y=r.Utils.toNumber(e.getAttribute("gs-y")),t.w=r.Utils.toNumber(e.getAttribute("gs-w")),t.h=r.Utils.toNumber(e.getAttribute("gs-h")),t.w>1||e.removeAttribute("gs-w"),t.h>1||e.removeAttribute("gs-h"),t.autoPosition=r.Utils.toBool(e.getAttribute("gs-auto-position")),t.noResize=r.Utils.toBool(e.getAttribute("gs-no-resize")),t.noMove=r.Utils.toBool(e.getAttribute("gs-no-move")),t.locked=r.Utils.toBool(e.getAttribute("gs-locked")),t.id=e.getAttribute("gs-id"),t.maxW=r.Utils.toNumber(e.getAttribute("gs-max-w")),t.maxW&&e.removeAttribute("gs-max-w"),t.minW=r.Utils.toNumber(e.getAttribute("gs-min-w")),t.minW&&e.removeAttribute("gs-min-w"),t.maxH=r.Utils.toNumber(e.getAttribute("gs-max-h")),t.maxH&&e.removeAttribute("gs-max-h"),t.minH=r.Utils.toNumber(e.getAttribute("gs-min-h")),t.minH&&e.removeAttribute("gs-min-h");for(const e in t){if(!t.hasOwnProperty(e))return;t[e]||0===t[e]||delete t[e]}return t}_setStaticClass(){let e=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...e),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...e),this.el.removeAttribute("gs-static")),this}onParentResize(){if(!this.el||!this.el.clientWidth)return;let e=!1;if(this._autoColumn&&this.parentGridItem)this.opts.column!==this.parentGridItem.w&&(e=!0,this.column(this.parentGridItem.w,"none"));else{let t=!this.opts.disableOneColumnMode&&this.el.clientWidth<=this.opts.oneColumnSize;1===this.opts.column!==t&&(e=!0,this.opts.animate&&this.setAnimation(!1),this.column(t?1:this._prevColumn),this.opts.animate&&this.setAnimation(!0))}return this._isAutoCellHeight&&(!e&&this.opts.cellHeightThrottle?(this._cellHeightThrottle||(this._cellHeightThrottle=r.Utils.throttle((()=>this.cellHeight()),this.opts.cellHeightThrottle)),this._cellHeightThrottle()):this.cellHeight()),this.engine.nodes.forEach((e=>{e.subGrid&&e.subGrid.onParentResize()})),this}_updateWindowResizeEvent(e=!1){const t=(this._isAutoCellHeight||!this.opts.disableOneColumnMode)&&!this.parentGridItem;return e||!t||this._windowResizeBind?!e&&t||!this._windowResizeBind||(window.removeEventListener("resize",this._windowResizeBind),delete this._windowResizeBind):(this._windowResizeBind=this.onParentResize.bind(this),window.addEventListener("resize",this._windowResizeBind)),this}static getElement(e=".grid-stack-item"){return r.Utils.getElement(e)}static getElements(e=".grid-stack-item"){return r.Utils.getElements(e)}static getGridElement(e){return p.getElement(e)}static getGridElements(e){return r.Utils.getElements(e)}_initMargin(){let e,t=0,i=[];return"string"==typeof this.opts.margin&&(i=this.opts.margin.split(" ")),2===i.length?(this.opts.marginTop=this.opts.marginBottom=i[0],this.opts.marginLeft=this.opts.marginRight=i[1]):4===i.length?(this.opts.marginTop=i[0],this.opts.marginRight=i[1],this.opts.marginBottom=i[2],this.opts.marginLeft=i[3]):(e=r.Utils.parseHeight(this.opts.margin),this.opts.marginUnit=e.unit,t=this.opts.margin=e.h),void 0===this.opts.marginTop?this.opts.marginTop=t:(e=r.Utils.parseHeight(this.opts.marginTop),this.opts.marginTop=e.h,delete this.opts.margin),void 0===this.opts.marginBottom?this.opts.marginBottom=t:(e=r.Utils.parseHeight(this.opts.marginBottom),this.opts.marginBottom=e.h,delete this.opts.margin),void 0===this.opts.marginRight?this.opts.marginRight=t:(e=r.Utils.parseHeight(this.opts.marginRight),this.opts.marginRight=e.h,delete this.opts.margin),void 0===this.opts.marginLeft?this.opts.marginLeft=t:(e=r.Utils.parseHeight(this.opts.marginLeft),this.opts.marginLeft=e.h,delete this.opts.margin),this.opts.marginUnit=e.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 g}static setupDragIn(e,t){void 0!==(null==t?void 0:t.pause)&&(h.DDManager.pauseDrag=t.pause),"string"==typeof e&&(t=Object.assign(Object.assign({},l.dragInDefaultOptions),t||{}),r.Utils.getElements(e).forEach((e=>{g.isDraggable(e)||g.dragIn(e,t)})))}movable(e,t){return this.opts.staticGrid||p.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noMove:i.noMove=!0,this._prepareDragDropByNode(i))})),this}resizable(e,t){return this.opts.staticGrid||p.getElements(e).forEach((e=>{let i=e.gridstackNode;i&&(t?delete i.noResize:i.noResize=!0,this._prepareDragDropByNode(i))})),this}disable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!1,e),this.enableResize(!1,e),this._triggerEvent("disable"),this}enable(e=!0){if(!this.opts.staticGrid)return this.enableMove(!0,e),this.enableResize(!0,e),this._triggerEvent("enable"),this}enableMove(e,t=!0){return this.opts.staticGrid||(this.opts.disableDrag=!e,this.engine.nodes.forEach((i=>{this.movable(i.el,e),i.subGrid&&t&&i.subGrid.enableMove(e,t)}))),this}enableResize(e,t=!0){return this.opts.staticGrid||(this.opts.disableResize=!e,this.engine.nodes.forEach((i=>{this.resizable(i.el,e),i.subGrid&&t&&i.subGrid.enableResize(e,t)}))),this}_removeDD(e){return g.draggable(e,"destroy").resizable(e,"destroy"),e.gridstackNode&&delete e.gridstackNode._initDD,delete e.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return g.droppable(this.el,"destroy"),this;let e,t,i=(i,s,o)=>{let n=s.gridstackNode;if(!n)return;o=o||s;let l=this.el.getBoundingClientRect(),{top:a,left:d}=o.getBoundingClientRect();d-=l.left,a-=l.top;let h={position:{top:a,left:d}};if(n._temporaryRemoved){if(n.x=Math.max(0,Math.round(d/t)),n.y=Math.max(0,Math.round(a/e)),delete n.autoPosition,this.engine.nodeBoundFix(n),!this.engine.willItFit(n)){if(n.autoPosition=!0,!this.engine.willItFit(n))return void g.off(s,"drag");n._willFitPos&&(r.Utils.copyPos(n,n._willFitPos),delete n._willFitPos)}this._onStartMoving(o,i,h,n,t,e)}else this._dragOrResize(o,i,h,n,t,e)};return g.droppable(this.el,{accept:e=>{let t=e.gridstackNode;if((null==t?void 0:t.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let i=!0;if("function"==typeof this.opts.acceptWidgets)i=this.opts.acceptWidgets(e);else{let t=!0===this.opts.acceptWidgets?".grid-stack-item":this.opts.acceptWidgets;i=e.matches(t)}if(i&&t&&this.opts.maxRow){let e={w:t.w,h:t.h,minW:t.minW,minH:t.minH};i=this.engine.willItFit(e)}return i}}).on(this.el,"dropover",((s,o,n)=>{let r=o.gridstackNode;if((null==r?void 0:r.grid)===this&&!r._temporaryRemoved)return!1;(null==r?void 0:r.grid)&&r.grid!==this&&!r._temporaryRemoved&&r.grid._leave(o,n),t=this.cellWidth(),e=this.getCellHeight(!0),r||(r=this._readAttr(o)),r.grid||(r._isExternal=!0,o.gridstackNode=r),n=n||o;let l=r.w||Math.round(n.offsetWidth/t)||1,a=r.h||Math.round(n.offsetHeight/e)||1;return r.grid&&r.grid!==this?(o._gridstackNodeOrig||(o._gridstackNodeOrig=r),o.gridstackNode=r=Object.assign(Object.assign({},r),{w:l,h:a,grid:this}),this.engine.cleanupNode(r).nodeBoundFix(r),r._initDD=r._isExternal=r._temporaryRemoved=!0):(r.w=l,r.h=a,r._temporaryRemoved=!0),this._itemRemoving(r.el,!1),g.on(o,"drag",i),i(s,o,n),!1})).on(this.el,"dropout",((e,t,i)=>{let s=t.gridstackNode;return!!s&&(s.grid&&s.grid!==this||(this._leave(t,i),this._isTemp&&this.removeAsSubGrid(s)),!1)})).on(this.el,"drop",((e,t,i)=>{var s,o;let n=t.gridstackNode;if((null==n?void 0:n.grid)===this&&!n._isExternal)return!1;let a=!!this.placeholder.parentElement;this.placeholder.remove();let d=t._gridstackNodeOrig;if(delete t._gridstackNodeOrig,a&&(null==d?void 0:d.grid)&&d.grid!==this){let e=d.grid;e.engine.removedNodes.push(d),e._triggerRemoveEvent()._triggerChangeEvent(),e.parentGridItem&&!e.engine.nodes.length&&e.opts.subGridDynamic&&e.removeAsSubGrid()}if(!n)return!1;if(a&&(this.engine.cleanupNode(n),n.grid=this),g.off(t,"drag"),i!==t?(i.remove(),t.gridstackNode=d,a&&(t=t.cloneNode(!0))):(t.remove(),this._removeDD(t)),!a)return!1;t.gridstackNode=n,n.el=t;let h=null===(o=null===(s=n.subGrid)||void 0===s?void 0:s.el)||void 0===o?void 0:o.gridstack;return r.Utils.copyPos(n,this._readAttr(this.placeholder)),r.Utils.removePositioningStyles(t),this._writeAttr(t,n),t.classList.add(l.gridDefaults.itemClass,this.opts.itemClass),this.el.appendChild(t),h&&(h.parentGridItem=n,h.opts.styleInHead||h._updateStyles(!0)),this._updateContainerHeight(),this.engine.addedNodes.push(n),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(Object.assign(Object.assign({},e),{type:"dropped"}),d&&d.grid?d:void 0,n),window.setTimeout((()=>{n.el&&n.el.parentElement?this._prepareDragDropByNode(n):this.engine.removeNode(n),delete n.grid._isTemp})),!1})),this}_itemRemoving(e,t){let i=e?e.gridstackNode:void 0;i&&i.grid&&(t?i._isAboutToRemove=!0:delete i._isAboutToRemove,t?e.classList.add("grid-stack-item-removing"):e.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(!this.opts.staticGrid&&"string"==typeof this.opts.removable){let e=document.querySelector(this.opts.removable);if(!e)return this;g.isDroppable(e)||g.droppable(e,this.opts.removableOptions).on(e,"dropover",((e,t)=>this._itemRemoving(t,!0))).on(e,"dropout",((e,t)=>this._itemRemoving(t,!1)))}return this}_prepareDragDropByNode(e){let t=e.el;const i=e.noMove||this.opts.disableDrag,s=e.noResize||this.opts.disableResize;if(this.opts.staticGrid||i&&s)return e._initDD&&(this._removeDD(t),delete e._initDD),t.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!e._initDD){let i,s,o=(o,n)=>{this._gsEventHandler[o.type]&&this._gsEventHandler[o.type](o,o.target),i=this.cellWidth(),s=this.getCellHeight(!0),this._onStartMoving(t,o,n,e,i,s)},n=(o,n)=>{this._dragOrResize(t,o,n,e,i,s)},l=i=>{this.placeholder.remove(),delete e._moving,delete e._event,delete e._lastTried;let s=i.target;if(s.gridstackNode&&s.gridstackNode.grid===this){if(e.el=s,e._isAboutToRemove){let o=t.gridstackNode.grid;o._gsEventHandler[i.type]&&o._gsEventHandler[i.type](i,s),this._removeDD(t),o.engine.removedNodes.push(e),o._triggerRemoveEvent(),delete t.gridstackNode,delete e.el,t.remove()}else r.Utils.removePositioningStyles(s),e._temporaryRemoved?(r.Utils.copyPos(e,e._orig),this._writePosAttr(s,e),this.engine.addNode(e)):this._writePosAttr(s,e),this._gsEventHandler[i.type]&&this._gsEventHandler[i.type](i,s);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate()}};g.draggable(t,{start:o,stop:l,drag:n}).resizable(t,{start:o,stop:l,resize:n}),e._initDD=!0}return g.draggable(t,i?"disable":"enable").resizable(t,s?"disable":"enable"),this}_onStartMoving(e,t,i,s,o,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="dragstart"===t.type,delete s._lastTried,"dropover"===t.type&&s._temporaryRemoved&&(this.engine.addNode(s),s._moving=!0),this.engine.cacheRects(o,n,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),"resizestart"===t.type&&(g.resizable(e,"option","minWidth",o*(s.minW||1)).resizable(e,"option","minHeight",n*(s.minH||1)),s.maxW&&g.resizable(e,"option","maxWidth",o*s.maxW),s.maxH&&g.resizable(e,"option","maxHeight",n*s.maxH))}_dragOrResize(e,t,i,s,o,n){let l,a=Object.assign({},s._orig),d=this.opts.marginLeft,h=this.opts.marginRight,g=this.opts.marginTop,p=this.opts.marginBottom,u=Math.round(.1*n),c=Math.round(.1*o);if(d=Math.min(d,c),h=Math.min(h,c),g=Math.min(g,u),p=Math.min(p,u),"drag"===t.type){if(s._temporaryRemoved)return;let t=i.position.top-s._prevYPix;s._prevYPix=i.position.top,!1!==this.opts.draggable.scroll&&r.Utils.updateScrollPosition(e,i.position,t);let l=i.position.left+(i.position.left>s._lastUiPosition.left?-h:d),u=i.position.top+(i.position.top>s._lastUiPosition.top?-p:g);a.x=Math.round(l/o),a.y=Math.round(u/n);let c=this._extraDragRow;if(this.engine.collide(s,a)){let e=this.getRow(),t=Math.max(0,a.y+s.h-e);this.opts.maxRow&&e+t>this.opts.maxRow&&(t=Math.max(0,this.opts.maxRow-e)),this._extraDragRow=t}else this._extraDragRow=0;if(this._extraDragRow!==c&&this._updateContainerHeight(),s.x===a.x&&s.y===a.y)return}else if("resize"===t.type){if(a.x<0)return;if(r.Utils.updateScrollResize(t,e,n),a.w=Math.round((i.size.width-d)/o),a.h=Math.round((i.size.height-g)/n),s.w===a.w&&s.h===a.h)return;if(s._lastTried&&s._lastTried.w===a.w&&s._lastTried.h===a.h)return;let h=i.position.left+d,p=i.position.top+g;a.x=Math.round(h/o),a.y=Math.round(p/n),l=!0}s._event=t,s._lastTried=a;let m={x:i.position.left+d,y:i.position.top+g,w:(i.size?i.size.width:s.w*o)-d-h,h:(i.size?i.size.height:s.h*n)-g-p};if(this.engine.moveNodeCheck(s,Object.assign(Object.assign({},a),{cellWidth:o,cellHeight:n,rect:m,resizing:l}))){s._lastUiPosition=i.position,this.engine.cacheRects(o,n,g,h,p,d),delete s._skipDown,l&&s.subGrid&&s.subGrid.onParentResize(),this._extraDragRow=0,this._updateContainerHeight();let e=t.target;this._writePosAttr(e,s),this._gsEventHandler[t.type]&&this._gsEventHandler[t.type](t,e)}}_leave(e,t){let i=e.gridstackNode;i&&(g.off(e,"drag"),i._temporaryRemoved||(i._temporaryRemoved=!0,this.engine.removeNode(i),i.el=i._isExternal&&t?t:e,!0===this.opts.removable&&this._itemRemoving(e,!0),e._gridstackNodeOrig?(e.gridstackNode=e._gridstackNodeOrig,delete e._gridstackNodeOrig):i._isExternal&&(delete i.el,delete e.gridstackNode,this.engine.restoreInitial())))}commit(){return r.obsolete(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}}t.GridStack=p,p.Utils=r.Utils,p.Engine=n.GridStackEngine,p.GDRev="7.3.0-dev"},699:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dragInDefaultOptions=t.gridDefaults=void 0,t.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"},t.dragInDefaultOptions={handle:".grid-stack-item-content",appendTo:"body"}},593:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.obsoleteAttr=t.obsoleteOptsDel=t.obsoleteOpts=t.obsolete=void 0,t.obsolete=function(e,t,i,s,o){let n=(...n)=>(console.warn("gridstack.js: Function `"+i+"` is deprecated in "+o+" and has been replaced with `"+s+"`. It will be **removed** in a future release"),t.apply(e,n));return n.prototype=t.prototype,n},t.obsoleteOpts=function(e,t,i,s){void 0!==e[t]&&(e[i]=e[t],console.warn("gridstack.js: Option `"+t+"` is deprecated in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))},t.obsoleteOptsDel=function(e,t,i,s){void 0!==e[t]&&console.warn("gridstack.js: Option `"+t+"` is deprecated in "+i+s)},t.obsoleteAttr=function(e,t,i,s){let o=e.getAttribute(t);null!==o&&(e.setAttribute(i,o),console.warn("gridstack.js: attribute `"+t+"`="+o+" is deprecated on this object in "+s+" and has been replaced with `"+i+"`. It will be **removed** in a future release"))};class i{static getElements(e){if("string"==typeof e){let t=document.querySelectorAll(e);return t.length||"."===e[0]||"#"===e[0]||(t=document.querySelectorAll("."+e),t.length||(t=document.querySelectorAll("#"+e))),Array.from(t)}return[e]}static getElement(e){if("string"==typeof e){if(!e.length)return null;if("#"===e[0])return document.getElementById(e.substring(1));if("."===e[0]||"["===e[0])return document.querySelector(e);if(!isNaN(+e[0]))return document.getElementById(e);let t=document.querySelector(e);return t||(t=document.getElementById(e)),t||(t=document.querySelector("."+e)),t}return e}static isIntercepted(e,t){return!(e.y>=t.y+t.h||e.y+e.h<=t.y||e.x+e.w<=t.x||e.x>=t.x+t.w)}static isTouching(e,t){return i.isIntercepted(e,{x:t.x-.5,y:t.y-.5,w:t.w+1,h:t.h+1})}static areaIntercept(e,t){let i=e.x>t.x?e.x:t.x,s=e.x+e.w<t.x+t.w?e.x+e.w:t.x+t.w;if(s<=i)return 0;let o=e.y>t.y?e.y:t.y,n=e.y+e.h<t.y+t.h?e.y+e.h:t.y+t.h;return n<=o?0:(s-i)*(n-o)}static area(e){return e.w*e.h}static sort(e,t,i){return i=i||e.reduce(((e,t)=>Math.max(t.x+t.w,e)),0)||12,-1===t?e.sort(((e,t)=>t.x+t.y*i-(e.x+e.y*i))):e.sort(((e,t)=>e.x+e.y*i-(t.x+t.y*i)))}static createStylesheet(e,t,i){let s=document.createElement("style");const o=null==i?void 0:i.nonce;return o&&(s.nonce=o),s.setAttribute("type","text/css"),s.setAttribute("gs-style-id",e),s.styleSheet?s.styleSheet.cssText="":s.appendChild(document.createTextNode("")),t?t.insertBefore(s,t.firstChild):(t=document.getElementsByTagName("head")[0]).appendChild(s),s.sheet}static removeStylesheet(e){let t=document.querySelector("STYLE[gs-style-id="+e+"]");t&&t.parentNode&&t.remove()}static addCSSRule(e,t,i){"function"==typeof e.addRule?e.addRule(t,i):"function"==typeof e.insertRule&&e.insertRule(`${t}{${i}}`)}static toBool(e){return"boolean"==typeof e?e:"string"==typeof e?!(""===(e=e.toLowerCase())||"no"===e||"false"===e||"0"===e):Boolean(e)}static toNumber(e){return null===e||0===e.length?void 0:Number(e)}static parseHeight(e){let t,i="px";if("string"==typeof e){let s=e.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",t=parseFloat(s[1])}else t=e;return{h:t,unit:i}}static defaults(e,...t){return t.forEach((t=>{for(const i in t){if(!t.hasOwnProperty(i))return;null===e[i]||void 0===e[i]?e[i]=t[i]:"object"==typeof t[i]&&"object"==typeof e[i]&&this.defaults(e[i],t[i])}})),e}static same(e,t){if("object"!=typeof e)return e==t;if(typeof e!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}static copyPos(e,t,i=!1){return void 0!==t.x&&(e.x=t.x),void 0!==t.y&&(e.y=t.y),void 0!==t.w&&(e.w=t.w),void 0!==t.h&&(e.h=t.h),i&&(t.minW&&(e.minW=t.minW),t.minH&&(e.minH=t.minH),t.maxW&&(e.maxW=t.maxW),t.maxH&&(e.maxH=t.maxH)),e}static samePos(e,t){return e&&t&&e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h}static sanitizeMinMax(e){e.minW||delete e.minW,e.minH||delete e.minH,e.maxW||delete e.maxW,e.maxH||delete e.maxH}static removeInternalAndSame(e,t){if("object"==typeof e&&"object"==typeof t)for(let i in e){let s=e[i];if("_"===i[0]||s===t[i])delete e[i];else if(s&&"object"==typeof s&&void 0!==t[i]){for(let e in s)s[e]!==t[i][e]&&"_"!==e[0]||delete s[e];Object.keys(s).length||delete e[i]}}}static removeInternalForSave(e,t=!0){for(let t in e)"_"!==t[0]&&null!==e[t]&&void 0!==e[t]||delete e[t];delete e.grid,t&&delete e.el,e.autoPosition||delete e.autoPosition,e.noResize||delete e.noResize,e.noMove||delete e.noMove,e.locked||delete e.locked,1!==e.w&&e.w!==e.minW||delete e.w,1!==e.h&&e.h!==e.minH||delete e.h}static closestUpByClass(e,t){for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null}static throttle(e,t){let i=!1;return(...s)=>{i||(i=!0,setTimeout((()=>{e(...s),i=!1}),t))}}static removePositioningStyles(e){let t=e.style;t.position&&t.removeProperty("position"),t.left&&t.removeProperty("left"),t.top&&t.removeProperty("top"),t.width&&t.removeProperty("width"),t.height&&t.removeProperty("height")}static getScrollElement(e){if(!e)return document.scrollingElement||document.documentElement;const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowY)?e:this.getScrollElement(e.parentElement)}static updateScrollPosition(e,t,i){let s=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight;if(s.top<0||s.bottom>o){let n=s.bottom-o,r=s.top,l=this.getScrollElement(e);if(null!==l){let a=l.scrollTop;s.top<0&&i<0?e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=Math.abs(r)>Math.abs(i)?i:r:i>0&&(e.offsetHeight>o?l.scrollTop+=i:l.scrollTop+=n>i?i:n),t.top+=l.scrollTop-a}}}static updateScrollResize(e,t,i){const s=this.getScrollElement(t),o=s.clientHeight,n=s===this.getScrollElement()?0:s.getBoundingClientRect().top,r=e.clientY-n,l=r>o-i;r<i?s.scrollBy({behavior:"smooth",top:r-i}):l&&s.scrollBy({behavior:"smooth",top:i-(o-r)})}static clone(e){return null==e||"object"!=typeof e?e:e instanceof Array?[...e]:Object.assign({},e)}static cloneDeep(e){const t=["parentGrid","el","grid","subGrid","engine"],s=i.clone(e);for(const o in s)s.hasOwnProperty(o)&&"object"==typeof s[o]&&"__"!==o.substring(0,2)&&!t.find((e=>e===o))&&(s[o]=i.cloneDeep(e[o]));return s}static cloneNode(e){const t=e.cloneNode(!0);return t.removeAttribute("id"),t}static appendTo(e,t){let i;i="string"==typeof t?document.querySelector(t):t,i&&i.appendChild(e)}static addElStyles(e,t){if(t instanceof Object)for(const i in t)t.hasOwnProperty(i)&&(Array.isArray(t[i])?t[i].forEach((t=>{e.style[i]=t})):e.style[i]=t[i])}static initEvent(e,t){const i={type:t.type},s={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:t.target?t.target:e.target};return e.dataTransfer&&(i.dataTransfer=e.dataTransfer),["altKey","ctrlKey","metaKey","shiftKey"].forEach((t=>i[t]=e[t])),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach((t=>i[t]=e[t])),Object.assign(Object.assign({},i),s)}static simulateMouseEvent(e,t,i){const s=document.createEvent("MouseEvents");s.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,e.target),(i||e.target).dispatchEvent(s)}}t.Utils=i}},t={},i=function i(s){var o=t[s];if(void 0!==o)return o.exports;var n=t[s]={exports:{}};return e[s].call(n.exports,n,n.exports,i),n.exports}(270);return i.GridStack})()));
|
|
3
|
+
//# sourceMappingURL=gridstack-all.js.map
|