UNPKG

react-grid-layout

Version:

A draggable and resizable grid layout with responsive breakpoints, for React.

2 lines 90.4 kB
/*! For license information please see react-grid-layout.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.ReactGridLayout=e(require("react"),require("react-dom")):t.ReactGridLayout=e(t.React,t.ReactDOM)}(self,(function(t,e){return function(){var n={325:function(t,e,n){t.exports=n(606).default,t.exports.utils=n(872),t.exports.Responsive=n(94).default,t.exports.Responsive.utils=n(271),t.exports.WidthProvider=n(663).default},606:function(t,e,n){"use strict";n.d(e,{default:function(){return F}});var r=n(888),o=n.n(r),a=n(307),i=n.n(a),s=n(184),u=n.n(s),c=n(872);function l(t){var e=t.margin,n=t.containerPadding,r=t.containerWidth,o=t.cols;return(r-e[0]*(o-1)-2*n[0])/o}function f(t,e,n){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*n):t}function p(t,e,n,r,o,a){var i=t.margin,s=t.containerPadding,u=t.rowHeight,c=l(t),p={};return a&&a.resizing?(p.width=Math.round(a.resizing.width),p.height=Math.round(a.resizing.height)):(p.width=f(r,c,i[0]),p.height=f(o,u,i[1])),a&&a.dragging?(p.top=Math.round(a.dragging.top),p.left=Math.round(a.dragging.left)):(p.top=Math.round((u+i[1])*n+s[1]),p.left=Math.round((c+i[0])*e+s[0])),p}function d(t,e,n,r,o){var a=t.margin,i=t.cols,s=t.rowHeight,u=t.maxRows,c=l(t),f=Math.round((n-a[0])/(c+a[0])),p=Math.round((e-a[1])/(s+a[1]));return{x:f=h(f,0,i-r),y:p=h(p,0,u-o)}}function h(t,e,n){return Math.max(Math.min(t,n),e)}var y=n(697),g=n.n(y),b=n(193),m=n(706),v=g().arrayOf(g().oneOf(["s","w","e","n","sw","nw","se","ne"])),w=g().oneOfType([g().node,g().func]),O={className:g().string,style:g().object,width:g().number,autoSize:g().bool,cols:g().number,draggableCancel:g().string,draggableHandle:g().string,verticalCompact:function(t){t.verticalCompact},compactType:g().oneOf(["vertical","horizontal"]),layout:function(t){var e=t.layout;void 0!==e&&n(872).validateLayout(e,"layout")},margin:g().arrayOf(g().number),containerPadding:g().arrayOf(g().number),rowHeight:g().number,maxRows:g().number,isBounded:g().bool,isDraggable:g().bool,isResizable:g().bool,preventCollision:g().bool,useCSSTransforms:g().bool,transformScale:g().number,isDroppable:g().bool,resizeHandles:v,resizeHandle:w,onLayoutChange:g().func,onDragStart:g().func,onDrag:g().func,onDragStop:g().func,onResizeStart:g().func,onResize:g().func,onResizeStop:g().func,onDrop:g().func,droppingItem:g().shape({i:g().string.isRequired,w:g().number.isRequired,h:g().number.isRequired}),children:function(t,e){var n=t[e],r={};o().Children.forEach(n,(function(t){if(r[t.key])throw new Error('Duplicate child key "'+t.key+'" found! This will cause problems in ReactGridLayout.');r[t.key]=!0}))},innerRef:g().any};function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function D(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function R(t,e){return(R=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(t,e){return!e||"object"!==S(e)&&"function"!=typeof e?z(t):e}function z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&R(t,e)}(s,t);var e,n,r,a,i=(r=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=C(r);if(a){var n=C(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return _(this,t)});function s(){var t;P(this,s);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return k(z(t=i.call.apply(i,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),k(z(t),"elementRef",o().createRef()),k(z(t),"onDragStart",(function(e,n){var r=n.node,o=t.props,a=o.onDragStart,i=o.transformScale;if(a){var s={top:0,left:0},u=r.offsetParent;if(u){var c=u.getBoundingClientRect(),l=r.getBoundingClientRect(),f=l.left/i,p=c.left/i,h=l.top/i,y=c.top/i;s.left=f-p+u.scrollLeft,s.top=h-y+u.scrollTop,t.setState({dragging:s});var g=d(t.getPositionParams(),s.top,s.left,t.props.w,t.props.h),b=g.x,m=g.y;return a.call(z(t),t.props.i,b,m,{e:e,node:r,newPosition:s})}}})),k(z(t),"onDrag",(function(e,n){var r=n.node,o=n.deltaX,a=n.deltaY,i=t.props.onDrag;if(i){if(!t.state.dragging)throw new Error("onDrag called before onDragStart.");var s=t.state.dragging.top+a,u=t.state.dragging.left+o,c=t.props,p=c.isBounded,y=c.i,g=c.w,b=c.h,m=c.containerWidth,v=t.getPositionParams();if(p){var w=r.offsetParent;if(w){var O=t.props,S=O.margin,j=O.rowHeight;s=h(s,0,w.clientHeight-f(b,j,S[1])),u=h(u,0,m-f(g,l(v),S[0]))}}var D={top:s,left:u};t.setState({dragging:D});var P=d(v,s,u,g,b),x=P.x,R=P.y;return i.call(z(t),y,x,R,{e:e,node:r,newPosition:D})}})),k(z(t),"onDragStop",(function(e,n){var r=n.node,o=t.props.onDragStop;if(o){if(!t.state.dragging)throw new Error("onDragEnd called before onDragStart.");var a=t.props,i=a.w,s=a.h,u=a.i,c=t.state.dragging,l=c.left,f=c.top,p={top:f,left:l};t.setState({dragging:null});var h=d(t.getPositionParams(),f,l,i,s),y=h.x,g=h.y;return o.call(z(t),u,y,g,{e:e,node:r,newPosition:p})}})),k(z(t),"onResizeStop",(function(e,n){t.onResizeHandler(e,n,"onResizeStop")})),k(z(t),"onResizeStart",(function(e,n){t.onResizeHandler(e,n,"onResizeStart")})),k(z(t),"onResize",(function(e,n){t.onResizeHandler(e,n,"onResize")})),t}return e=s,(n=[{key:"shouldComponentUpdate",value:function(t,e){if(this.props.children!==t.children)return!0;if(this.props.droppingPosition!==t.droppingPosition)return!0;var n=p(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=p(this.getPositionParams(t),t.x,t.y,t.w,t.h,e);return!(0,c.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==t.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(t){this.moveDroppingItem(t)}},{key:"moveDroppingItem",value:function(t){var e=this.props.droppingPosition;if(e){var n=this.elementRef.current;if(n){var r=t.droppingPosition||{left:0,top:0},o=this.state.dragging,a=o&&e.left!==r.left||e.top!==r.top;if(o){if(a){var i=e.left-o.left,s=e.top-o.top;this.onDrag(e.e,{node:n,deltaX:i,deltaY:s})}}else this.onDragStart(e.e,{node:n,deltaX:e.left,deltaY:e.top})}}}},{key:"getPositionParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}},{key:"createStyle",value:function(t){var e,n=this.props,r=n.usePercentages,o=n.containerWidth;return n.useCSSTransforms?e=(0,c.setTransform)(t):(e=(0,c.setTopLeft)(t),r&&(e.left=(0,c.perc)(t.left/o),e.width=(0,c.perc)(t.width/o))),e}},{key:"mixinDraggable",value:function(t,e){return o().createElement(b.DraggableCore,{disabled:!e,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}},{key:"mixinResizable",value:function(t,e,n){var r=this.props,a=r.cols,i=r.x,s=r.minW,u=r.minH,c=r.maxW,l=r.maxH,f=r.transformScale,d=r.resizeHandles,h=r.resizeHandle,y=this.getPositionParams(),g=p(y,0,0,a-i,0).width,b=p(y,0,0,s,u),v=p(y,0,0,c,l),w=[b.width,b.height],O=[Math.min(v.width,g),Math.min(v.height,1/0)];return o().createElement(m.Resizable,{draggableOpts:{disabled:!n,nodeRef:this.elementRef},className:n?void 0:"react-resizable-hide",width:e.width,height:e.height,minConstraints:w,maxConstraints:O,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:f,resizeHandles:d,handle:h},t)}},{key:"onResizeHandler",value:function(t,e,n){var r=e.node,o=e.size,a=this.props[n];if(a){var i=this.props,s=i.cols,u=i.x,c=i.y,f=i.i,p=i.maxH,d=i.minH,y=this.props,g=y.minW,b=y.maxW,m=function(t,e,n,r,o){var a=t.margin,i=t.maxRows,s=t.cols,u=t.rowHeight,c=l(t),f=Math.round((e+a[0])/(c+a[0])),p=Math.round((n+a[1])/(u+a[1]));return{w:f=h(f,0,s-r),h:p=h(p,0,i-o)}}(this.getPositionParams(),o.width,o.height,u,c),v=m.w,w=m.h;v=h(v,g=Math.max(g,1),b=Math.min(b,s-u)),w=h(w,d,p),this.setState({resizing:"onResizeStop"===n?null:o}),a.call(this,f,v,w,{e:t,node:r,size:o})}}},{key:"render",value:function(){var t=this.props,e=t.x,n=t.y,r=t.w,a=t.h,i=t.isDraggable,s=t.isResizable,c=t.droppingPosition,l=t.useCSSTransforms,f=p(this.getPositionParams(),e,n,r,a,this.state),d=o().Children.only(this.props.children),h=o().cloneElement(d,{ref:this.elementRef,className:u()("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:l}),style:D(D(D({},this.props.style),d.props.style),this.createStyle(f))});return h=this.mixinResizable(h,f,s),this.mixinDraggable(h,i)}}])&&x(e.prototype,n),s}(o().Component);function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){U(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function L(t,e){if(t){if("string"==typeof t)return N(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(t,e):void 0}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function W(t,e){return(W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function I(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?B(t):e}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function U(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}k(E,"propTypes",{children:g().element,cols:g().number.isRequired,containerWidth:g().number.isRequired,rowHeight:g().number.isRequired,margin:g().array.isRequired,maxRows:g().number.isRequired,containerPadding:g().array.isRequired,x:g().number.isRequired,y:g().number.isRequired,w:g().number.isRequired,h:g().number.isRequired,minW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("minWidth not Number"):n>t.w||n>t.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxWidth not Number"):n<t.w||n<t.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(t,e){var n=t[e];return"number"!=typeof n?new Error("minHeight not Number"):n>t.h||n>t.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(t,e){var n=t[e];return"number"!=typeof n?new Error("maxHeight not Number"):n<t.h||n<t.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:g().string.isRequired,resizeHandles:v,resizeHandle:w,onDragStop:g().func,onDragStart:g().func,onDrag:g().func,onResizeStop:g().func,onResizeStart:g().func,onResize:g().func,isDraggable:g().bool.isRequired,isResizable:g().bool.isRequired,isBounded:g().bool.isRequired,static:g().bool,useCSSTransforms:g().bool.isRequired,transformScale:g().number,className:g().string,handle:g().string,cancel:g().string,droppingPosition:g().shape({e:g().object.isRequired,left:g().number.isRequired,top:g().number.isRequired})}),k(E,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1});var X="react-grid-layout",Y=!1;try{Y=/firefox/i.test(navigator.userAgent)}catch(t){}var F=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(f,t);var e,n,o,a,s,l=(a=f,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=q(a);if(s){var n=q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return I(this,t)});function f(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),U(B(n=l.call(this,t,e)),"state",{activeDrag:null,layout:(0,c.synchronizeLayoutWithChildren)(n.props.layout,n.props.children,n.props.cols,(0,c.compactType)(n.props)),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),U(B(n),"dragEnterCounter",0),U(B(n),"onDragOver",(function(t){var e;if(Y&&(null===(e=t.nativeEvent.target)||void 0===e||!e.classList.contains(X)))return t.preventDefault(),!1;var o,a=n.props,i=a.droppingItem,s=a.margin,u=a.cols,c=a.rowHeight,l=a.maxRows,f=a.width,p=a.containerPadding,h=n.state.layout,y=t.nativeEvent,g=y.layerX,b=y.layerY,m={left:g,top:b,e:t};if(n.state.droppingDOMNode){if(n.state.droppingPosition){var v=n.state.droppingPosition,w=v.left,O=v.top;(w!=g||O!=b)&&n.setState({droppingPosition:m})}}else{var S=d({cols:u,margin:s,maxRows:l,rowHeight:c,containerWidth:f,containerPadding:p||s},b,g,i.w,i.h);n.setState({droppingDOMNode:r.createElement("div",{key:i.i}),droppingPosition:m,layout:[].concat((o=h,function(t){if(Array.isArray(t))return N(t)}(o)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(o)||L(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[H(H({},i),{},{x:S.x,y:S.y,static:!1,isDraggable:!0})])})}t.stopPropagation(),t.preventDefault()})),U(B(n),"removeDroppingPlaceholder",(function(){var t=n.props,e=t.droppingItem,r=t.cols,o=n.state.layout,a=(0,c.compact)(o.filter((function(t){return t.i!==e.i})),(0,c.compactType)(n.props),r);n.setState({layout:a,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),U(B(n),"onDragLeave",(function(){n.dragEnterCounter--,0===n.dragEnterCounter&&n.removeDroppingPlaceholder()})),U(B(n),"onDragEnter",(function(){n.dragEnterCounter++})),U(B(n),"onDrop",(function(t){var e=n.props.droppingItem,r=n.state.layout,o=r.find((function(t){return t.i===e.i}));n.dragEnterCounter=0,n.removeDroppingPlaceholder(),n.props.onDrop(r,o,t)})),(0,c.autoBindHandlers)(B(n),["onDragStart","onDrag","onDragStop","onResizeStart","onResize","onResizeStop"]),n}return e=f,o=[{key:"getDerivedStateFromProps",value:function(t,e){var n;return e.activeDrag?null:(i()(t.layout,e.propsLayout)&&t.compactType===e.compactType?(0,c.childrenEqual)(t.children,e.children)||(n=e.layout):n=t.layout,n?{layout:(0,c.synchronizeLayoutWithChildren)(n,t.children,t.cols,(0,c.compactType)(t)),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(t,e){return this.props.children!==t.children||!(0,c.fastRGLPropsEqual)(this.props,t,i())||this.state.activeDrag!==e.activeDrag||this.state.mounted!==e.mounted||this.state.droppingPosition!==e.droppingPosition}},{key:"componentDidUpdate",value:function(t,e){if(!this.state.activeDrag){var n=this.state.layout,r=e.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var t=(0,c.bottom)(this.state.layout),e=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+2*e+"px"}}},{key:"onDragStart",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state.layout,s=(0,c.getLayoutItem)(i,t);if(s)return this.setState({oldDragItem:(0,c.cloneLayoutItem)(s),oldLayout:this.state.layout}),this.props.onDragStart(i,s,s,null,o,a)}},{key:"onDrag",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state.oldDragItem,s=this.state.layout,u=this.props.cols,l=(0,c.getLayoutItem)(s,t);if(l){var f={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:t};s=(0,c.moveElement)(s,l,e,n,!0,this.props.preventCollision,(0,c.compactType)(this.props),u),this.props.onDrag(s,i,l,f,o,a),this.setState({layout:(0,c.compact)(s,(0,c.compactType)(this.props),u),activeDrag:f})}}},{key:"onDragStop",value:function(t,e,n,r){var o=r.e,a=r.node;if(this.state.activeDrag){var i=this.state.oldDragItem,s=this.state.layout,u=this.props,l=u.cols,f=u.preventCollision,p=(0,c.getLayoutItem)(s,t);if(p){s=(0,c.moveElement)(s,p,e,n,!0,f,(0,c.compactType)(this.props),l),this.props.onDragStop(s,i,p,null,o,a);var d=(0,c.compact)(s,(0,c.compactType)(this.props),l),h=this.state.oldLayout;this.setState({activeDrag:null,layout:d,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(d,h)}}}},{key:"onLayoutMaybeChanged",value:function(t,e){e||(e=this.state.layout),i()(e,t)||this.props.onLayoutChange(t)}},{key:"onResizeStart",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state.layout,s=(0,c.getLayoutItem)(i,t);s&&(this.setState({oldResizeItem:(0,c.cloneLayoutItem)(s),oldLayout:this.state.layout}),this.props.onResizeStart(i,s,s,null,o,a))}},{key:"onResize",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state,s=i.layout,u=i.oldResizeItem,l=this.props,f=l.cols,p=l.preventCollision,d=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}(t,e)||L(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,c.withLayoutItem)(s,t,(function(t){var r;if(p){var o=(0,c.getAllCollisions)(s,H(H({},t),{},{w:e,h:n})).filter((function(e){return e.i!==t.i}));if(r=o.length>0){var a=1/0,i=1/0;o.forEach((function(e){e.x>t.x&&(a=Math.min(a,e.x)),e.y>t.y&&(i=Math.min(i,e.y))})),Number.isFinite(a)&&(t.w=a-t.x),Number.isFinite(i)&&(t.h=i-t.y)}}return r||(t.w=e,t.h=n),t})),2),h=d[0],y=d[1];if(y){var g={w:y.w,h:y.h,x:y.x,y:y.y,static:!0,i:t};this.props.onResize(h,u,y,g,o,a),this.setState({layout:(0,c.compact)(h,(0,c.compactType)(this.props),f),activeDrag:g})}}},{key:"onResizeStop",value:function(t,e,n,r){var o=r.e,a=r.node,i=this.state,s=i.layout,u=i.oldResizeItem,l=this.props.cols,f=(0,c.getLayoutItem)(s,t);this.props.onResizeStop(s,u,f,null,o,a);var p=(0,c.compact)(s,(0,c.compactType)(this.props),l),d=this.state.oldLayout;this.setState({activeDrag:null,layout:p,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,d)}},{key:"placeholder",value:function(){var t=this.state.activeDrag;if(!t)return null;var e=this.props,n=e.width,o=e.cols,a=e.margin,i=e.containerPadding,s=e.rowHeight,u=e.maxRows,c=e.useCSSTransforms,l=e.transformScale;return r.createElement(E,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder",containerWidth:n,cols:o,margin:a,containerPadding:i||a,maxRows:u,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:l},r.createElement("div",null))}},{key:"processGridItem",value:function(t,e){if(t&&t.key){var n=(0,c.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;var o=this.props,a=o.width,i=o.cols,s=o.margin,u=o.containerPadding,l=o.rowHeight,f=o.maxRows,p=o.isDraggable,d=o.isResizable,h=o.isBounded,y=o.useCSSTransforms,g=o.transformScale,b=o.draggableCancel,m=o.draggableHandle,v=o.resizeHandles,w=o.resizeHandle,O=this.state,S=O.mounted,j=O.droppingPosition,D="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&p,P="boolean"==typeof n.isResizable?n.isResizable:!n.static&&d,x=n.resizeHandles||v,R=D&&h&&!1!==n.isBounded;return r.createElement(E,{containerWidth:a,cols:i,margin:s,containerPadding:u||s,maxRows:f,rowHeight:l,cancel:b,handle:m,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:D,isResizable:P,isBounded:R,useCSSTransforms:y&&S,usePercentages:!S,transformScale:g,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:e?j:void 0,resizeHandles:x,resizeHandle:w},t)}}},{key:"render",value:function(){var t=this,e=this.props,n=e.className,o=e.style,a=e.isDroppable,i=e.innerRef,s=u()(X,n),l=H({height:this.containerHeight()},o);return r.createElement("div",{ref:i,className:s,style:l,onDrop:a?this.onDrop:c.noop,onDragLeave:a?this.onDragLeave:c.noop,onDragEnter:a?this.onDragEnter:c.noop,onDragOver:a?this.onDragOver:c.noop},r.Children.map(this.props.children,(function(e){return t.processGridItem(e)})),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&A(e.prototype,n),o&&A(e,o),f}(r.Component);U(F,"displayName","ReactGridLayout"),U(F,"propTypes",O),U(F,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:c.noop,onDragStart:c.noop,onDrag:c.noop,onDragStop:c.noop,onResizeStart:c.noop,onResize:c.noop,onResizeStop:c.noop,onDrop:c.noop})},94:function(t,e,n){"use strict";n.d(e,{default:function(){return D}});var r=n(888),o=n(697),a=n.n(o),i=n(307),s=n.n(i),u=n(872),c=n(271),l=n(606);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(){return(p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function O(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var S=function(t){return Object.prototype.toString.call(t)};function j(t,e){return null==t?null:Array.isArray(t)?t:t[e]}var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(d,t);var e,n,o,a,i,f=(a=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=w(a);if(i){var n=w(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return m(this,t)});function d(){var t;y(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return O(v(t=f.call.apply(f,[this].concat(n))),"state",t.generateInitialState()),O(v(t),"onLayoutChange",(function(e){t.props.onLayoutChange(e,h(h({},t.props.layouts),{},O({},t.state.breakpoint,e)))})),t}return e=d,o=[{key:"getDerivedStateFromProps",value:function(t,e){if(!s()(t.layouts,e.layouts)){var n=e.breakpoint,r=e.cols;return{layout:(0,c.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,n,n,r,t.compactType),layouts:t.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var t=this.props,e=t.width,n=t.breakpoints,r=t.layouts,o=t.cols,a=(0,c.getBreakpointFromWidth)(n,e),i=(0,c.getColsFromBreakpoint)(a,o),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,c.findOrGenerateResponsiveLayout)(r,n,a,a,i,s),breakpoint:a,cols:i}}},{key:"componentDidUpdate",value:function(t){this.props.width==t.width&&this.props.breakpoint===t.breakpoint&&s()(this.props.breakpoints,t.breakpoints)&&s()(this.props.cols,t.cols)||this.onWidthChange(t)}},{key:"onWidthChange",value:function(t){var e=this.props,n=e.breakpoints,r=e.cols,o=e.layouts,a=e.compactType,i=this.props.breakpoint||(0,c.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),s=this.state.breakpoint,l=(0,c.getColsFromBreakpoint)(i,r),f=h({},o);if(s!==i||t.breakpoints!==n||t.cols!==r){s in f||(f[s]=(0,u.cloneLayout)(this.state.layout));var p=(0,c.findOrGenerateResponsiveLayout)(f,n,i,s,l,a);p=(0,u.synchronizeLayoutWithChildren)(p,this.props.children,l,a),f[i]=p,this.props.onLayoutChange(p,f),this.props.onBreakpointChange(i,l),this.setState({breakpoint:i,layout:p,cols:l})}var d=j(this.props.margin,i),y=j(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,d,l,y)}},{key:"render",value:function(){var t=this.props,e=(t.breakpoint,t.breakpoints,t.cols,t.layouts,t.margin),n=t.containerPadding,o=(t.onBreakpointChange,t.onLayoutChange,t.onWidthChange,function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"]));return r.createElement(l.default,p({},o,{margin:j(e,this.state.breakpoint),containerPadding:j(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&g(e.prototype,n),o&&g(e,o),d}(r.Component);O(D,"propTypes",{breakpoint:a().string,breakpoints:a().object,cols:a().object,margin:a().oneOfType([a().array,a().object]),containerPadding:a().oneOfType([a().array,a().object]),layouts:function(t,e){if("[object Object]"!==S(t[e]))throw new Error("Layout property must be an object. Received: "+S(t[e]));Object.keys(t[e]).forEach((function(e){if(!(e in t.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,u.validateLayout)(t.layouts[e],"layouts."+e)}))},width:a().number.isRequired,onBreakpointChange:a().func,onLayoutChange:a().func,onWidthChange:a().func}),O(D,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],onBreakpointChange:u.noop,onLayoutChange:u.noop,onWidthChange:u.noop})},663:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var r=n(888),o=n(697),a=n.n(o),i=n(184),s=n.n(i);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){var e,n;return n=e=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(b,e);var n,o,a,i,u=(a=b,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(a);if(i){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return d(this,t)});function b(){var t;l(this,b);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return g(h(t=u.call.apply(u,[this].concat(n))),"state",{width:1280}),g(h(t),"elementRef",r.createRef()),g(h(t),"mounted",!1),g(h(t),"onWindowResize",(function(){if(t.mounted){var e=t.elementRef.current;e instanceof HTMLElement&&e.offsetWidth&&t.setState({width:e.offsetWidth})}})),t}return n=b,(o=[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var e=this.props,n=e.measureBeforeMount,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,["measureBeforeMount"]);return n&&!this.mounted?r.createElement("div",{className:s()(this.props.className,"react-grid-layout"),style:this.props.style,ref:this.elementRef}):r.createElement(t,c({innerRef:this.elementRef},o,this.state))}}])&&f(n.prototype,o),b}(r.Component),g(e,"defaultProps",{measureBeforeMount:!1}),g(e,"propTypes",{measureBeforeMount:a().bool}),n}},378:function(t){t.exports=function(t,e,n){return t===e||t.className===e.className&&n(t.style,e.style)&&t.width===e.width&&t.autoSize===e.autoSize&&t.cols===e.cols&&t.draggableCancel===e.draggableCancel&&t.draggableHandle===e.draggableHandle&&n(t.verticalCompact,e.verticalCompact)&&n(t.compactType,e.compactType)&&n(t.layout,e.layout)&&n(t.margin,e.margin)&&n(t.containerPadding,e.containerPadding)&&t.rowHeight===e.rowHeight&&t.maxRows===e.maxRows&&t.isBounded===e.isBounded&&t.isDraggable===e.isDraggable&&t.isResizable===e.isResizable&&t.preventCollision===e.preventCollision&&t.useCSSTransforms===e.useCSSTransforms&&t.transformScale===e.transformScale&&t.isDroppable===e.isDroppable&&n(t.resizeHandles,e.resizeHandles)&&n(t.resizeHandle,e.resizeHandle)&&t.onLayoutChange===e.onLayoutChange&&t.onDragStart===e.onDragStart&&t.onDrag===e.onDrag&&t.onDragStop===e.onDragStop&&t.onResizeStart===e.onResizeStart&&t.onResize===e.onResize&&t.onResizeStop===e.onResizeStop&&t.onDrop===e.onDrop&&n(t.droppingItem,e.droppingItem)&&n(t.innerRef,e.innerRef)}},271:function(t,e,n){"use strict";n.r(e),n.d(e,{getBreakpointFromWidth:function(){return o},getColsFromBreakpoint:function(){return a},findOrGenerateResponsiveLayout:function(){return i},sortBreakpoints:function(){return s}});var r=n(872);function o(t,e){for(var n=s(t),r=n[0],o=1,a=n.length;o<a;o++){var i=n[o];e>t[i]&&(r=i)}return r}function a(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]}function i(t,e,n,o,a,i){if(t[n])return(0,r.cloneLayout)(t[n]);for(var u=t[o],c=s(e),l=c.slice(c.indexOf(n)),f=0,p=l.length;f<p;f++){var d=l[f];if(t[d]){u=t[d];break}}return u=(0,r.cloneLayout)(u||[]),(0,r.compact)((0,r.correctBounds)(u,{cols:a}),i,a)}function s(t){return Object.keys(t).sort((function(e,n){return t[e]-t[n]}))}},872:function(t,e,n){"use strict";n.r(e),n.d(e,{bottom:function(){return l},cloneLayout:function(){return f},modifyLayout:function(){return p},withLayoutItem:function(){return d},cloneLayoutItem:function(){return h},childrenEqual:function(){return y},fastRGLPropsEqual:function(){return g},fastPositionEqual:function(){return b},collides:function(){return m},compact:function(){return v},compactItem:function(){return S},correctBounds:function(){return j},getLayoutItem:function(){return D},getFirstCollision:function(){return P},getAllCollisions:function(){return x},getStatics:function(){return R},moveElement:function(){return _},moveElementAwayFromCollision:function(){return z},perc:function(){return C},setTransform:function(){return k},setTopLeft:function(){return E},sortLayoutItems:function(){return T},sortLayoutItemsByRowCol:function(){return M},sortLayoutItemsByColRow:function(){return H},synchronizeLayoutWithChildren:function(){return L},validateLayout:function(){return N},compactType:function(){return A},autoBindHandlers:function(){return W},noop:function(){return I}});var r=n(307),o=n.n(r),a=n(888),i=n.n(a);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){for(var e,n=0,r=0,o=t.length;r<o;r++)(e=t[r].y+t[r].h)>n&&(n=e);return n}function f(t){for(var e=Array(t.length),n=0,r=t.length;n<r;n++)e[n]=h(t[n]);return e}function p(t,e){for(var n=Array(t.length),r=0,o=t.length;r<o;r++)e.i===t[r].i?n[r]=e:n[r]=t[r];return n}function d(t,e,n){var r=D(t,e);return r?[t=p(t,r=n(h(r))),r]:[t,null]}function h(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:Boolean(t.moved),static:Boolean(t.static),isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}function y(t,e){return o()(i().Children.map(t,(function(t){return t.key})),i().Children.map(e,(function(t){return t.key})))}var g=n(378);function b(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height}function m(t,e){return!(t.i===e.i||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h)}function v(t,e,n){for(var r=R(t),o=T(t,e),a=Array(t.length),i=0,s=o.length;i<s;i++){var u=h(o[i]);u.static||(u=S(r,u,e,n,o),r.push(u)),a[t.indexOf(o[i])]=u,u.moved=!1}return a}var w={x:"w",y:"h"};function O(t,e,n,r){var o=w[r];e[r]+=1;for(var a=t.map((function(t){return t.i})).indexOf(e.i)+1;a<t.length;a++){var i=t[a];if(!i.static){if(i.y>e.y+e.h)break;m(e,i)&&O(t,i,n+e[o],r)}}e[r]=n}function S(t,e,n,r,o){var a,i="horizontal"===n;if("vertical"===n)for(e.y=Math.min(l(t),e.y);e.y>0&&!P(t,e);)e.y--;else if(i)for(;e.x>0&&!P(t,e);)e.x--;for(;a=P(t,e);)i?O(o,e,a.x+a.w,"x"):O(o,e,a.y+a.h,"y"),i&&e.x+e.w>r&&(e.x=r-e.w,e.y++);return e}function j(t,e){for(var n=R(t),r=0,o=t.length;r<o;r++){var a=t[r];if(a.x+a.w>e.cols&&(a.x=e.cols-a.w),a.x<0&&(a.x=0,a.w=e.cols),a.static)for(;P(n,a);)a.y++;else n.push(a)}return t}function D(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n].i===e)return t[n]}function P(t,e){for(var n=0,r=t.length;n<r;n++)if(m(t[n],e))return t[n]}function x(t,e){return t.filter((function(t){return m(t,e)}))}function R(t){return t.filter((function(t){return t.static}))}function _(t,e,n,r,o,a,i,s){if(e.static&&!0!==e.isDraggable)return t;if(e.y===r&&e.x===n)return t;"Moving element ".concat(e.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(e.x,",").concat(e.y,"]");var u=e.x,c=e.y;"number"==typeof n&&(e.x=n),"number"==typeof r&&(e.y=r),e.moved=!0;var l=T(t,i);("vertical"===i&&"number"==typeof r?c>=r:"horizontal"===i&&"number"==typeof n&&u>=n)&&(l=l.reverse());var f=x(l,e);if(a&&f.length)return"Collision prevented on ".concat(e.i,", reverting."),e.x=u,e.y=c,e.moved=!1,t;for(var p=0,d=f.length;p<d;p++){var h=f[p];"Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(h.i," at [").concat(h.x,",").concat(h.y,"]"),h.moved||(t=h.static?z(t,h,e,o,i,s):z(t,e,h,o,i,s))}return t}function z(t,e,n,r,o,a){var i="horizontal"===o,s="horizontal"!==o,u=e.static;if(r){r=!1;var c={x:i?Math.max(e.x-n.w,0):n.x,y:s?Math.max(e.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!P(t,c))return"Doing reverse collision on ".concat(n.i," up to [").concat(c.x,",").concat(c.y,"]."),_(t,n,i?c.x:void 0,s?c.y:void 0,r,u,o,a)}return _(t,n,i?n.x+1:void 0,s?n.y+1:void 0,r,u,o,a)}function C(t){return 100*t+"%"}function k(t){var e=t.top,n=t.left,r=t.width,o=t.height,a="translate(".concat(n,"px,").concat(e,"px)");return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function E(t){var e=t.top,n=t.left,r=t.width,o=t.height;return{top:"".concat(e,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function T(t,e){return"horizontal"===e?H(t):M(t)}function M(t){return t.slice(0).sort((function(t,e){return t.y>e.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1}))}function H(t){return t.slice(0).sort((function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1}))}function L(t,e,n,r){t=t||[];var o=[];return i().Children.forEach(e,(function(e,n){var r=D(t,String(e.key));if(r)o[n]=h(r);else{var a=e.props["data-grid"]||e.props._grid;o[n]=h(a?u(u({},a),{},{i:e.key}):{w:1,h:1,x:0,y:l(o),i:String(e.key)})}})),v(j(o,{cols:n}),r,n)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(var r=0,o=t.length;r<o;r++){for(var a=t[r],i=0;i<n.length;i++)if("number"!=typeof a[n[i]])throw new Error("ReactGridLayout: "+e+"["+r+"]."+n[i]+" must be a number!");if(a.i&&"string"!=typeof a.i)throw new Error("ReactGridLayout: "+e+"["+r+"].i must be a string!");if(void 0!==a.static&&"boolean"!=typeof a.static)throw new Error("ReactGridLayout: "+e+"["+r+"].static must be a boolean!")}}function A(t){var e=t||{},n=e.verticalCompact,r=e.compactType;return!1===n?null:r}function W(t,e){e.forEach((function(e){return t[e]=t[e].bind(t)}))}var I=function(){}},184:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var a=typeof n;if("string"===a||"number"===a)t.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&t.push(i)}else if("object"===a)for(var s in n)r.call(n,s)&&n[s]&&t.push(s)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},307:function(t,e,n){t=n.nmd(t);var r="__lodash_hash_undefined__",o=9007199254740991,a="[object Arguments]",i="[object Array]",s="[object Boolean]",u="[object Date]",c="[object Error]",l="[object Function]",f="[object Map]",p="[object Number]",d="[object Object]",h="[object Promise]",y="[object RegExp]",g="[object Set]",b="[object String]",m="[object WeakMap]",v="[object ArrayBuffer]",w="[object DataView]",O=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,j={};j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j[a]=j[i]=j[v]=j[s]=j[w]=j[u]=j[c]=j[l]=j[f]=j[p]=j[d]=j[y]=j[g]=j[b]=j[m]=!1;var D="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,P="object"==typeof self&&self&&self.Object===Object&&self,x=D||P||Function("return this")(),R=e&&!e.nodeType&&e,_=R&&t&&!t.nodeType&&t,z=_&&_.exports===R,C=z&&D.process,k=function(){try{return C&&C.binding&&C.binding("util")}catch(t){}}(),E=k&&k.isTypedArray;function T(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function M(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function H(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var L,N,A,W=Array.prototype,I=Function.prototype,B=Object.prototype,q=x["__core-js_shared__"],U=I.toString,X=B.hasOwnProperty,Y=(L=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",F=B.toString,G=RegExp("^"+U.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=z?x.Buffer:void 0,$=x.Symbol,K=x.Uint8Array,J=B.propertyIsEnumerable,Q=W.splice,Z=$?$.toStringTag:void 0,tt=Object.getOwnPropertySymbols,et=V?V.isBuffer:void 0,nt=(N=Object.keys,A=Object,function(t){return N(A(t))}),rt=_t(x,"DataView"),ot=_t(x,"Map"),at=_t(x,"Promise"),it=_t(x,"Set"),st=_t(x,"WeakMap"),ut=_t(Object,"create"),ct=Et(rt),lt=Et(ot),ft=Et(at),pt=Et(it),dt=Et(st),ht=$?$.prototype:void 0,yt=ht?ht.valueOf:void 0;function gt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function bt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function mt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function vt(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new mt;++e<n;)this.add(t[e])}function wt(t){var e=this.__data__=new bt(t);this.size=e.size}function Ot(t,e){for(var n=t.length;n--;)if(Tt(t[n][0],e))return n;return-1}function St(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Z&&Z in Object(t)?function(t){var e=X.call(t,Z),n=t[Z];try{t[Z]=void 0;var r=!0}catch(t){}var o=F.call(t);return r&&(e?t[Z]=n:delete t[Z]),o}(t):function(t){return F.call(t)}(t)}function jt(t){return It(t)&&St(t)==a}function Dt(t,e,n,r,o){return t===e||(null==t||null==e||!It(t)&&!It(e)?t!=t&&e!=e:function(t,e,n,r,o,l){var h=Ht(t),m=Ht(e),O=h?i:Ct(t),S=m?i:Ct(e),j=(O=O==a?d:O)==d,D=(S=S==a?d:S)==d,P=O==S;if(P&&Lt(t)){if(!Lt(e))return!1;h=!0,j=!1}if(P&&!j)return l||(l=new wt),h||Bt(t)?Pt(t,e,n,r,o,l):function(t,e,n,r,o,a,i){switch(n){case w:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case v:return!(t.byteLength!=e.byteLength||!a(new K(t),new K(e)));case s:case u:case p:return Tt(+t,+e);case c:return t.name==e.name&&t.message==e.message;case y:case b:return t==e+"";case f:var l=M;case g:var d=1&r;if(l||(l=H),t.size!=e.size&&!d)return!1;var h=i.get(t);if(h)return h==e;r|=2,i.set(t,e);var m=Pt(l(t),l(e),r,o,a,i);return i.delete(t),m;case"[object Symbol]":if(yt)return yt.call(t)==yt.call(e)}return!1}(t,e,O,n,r,o,l);if(!(1&n)){var x=j&&X.call(t,"__wrapped__"),R=D&&X.call(e,"__wrapped__");if(x||R){var _=x?t.value():t,z=R?e.value():e;return l||(l=new wt),o(_,z,n,r,l)}}return!!P&&(l||(l=new wt),function(t,e,n,r,o,a){var i=1&n,s=xt(t),u=s.length;if(u!=xt(e).length&&!i)return!1;for(var c=u;c--;){var l=s[c];if(!(i?l in e:X.call(e,l)))return!1}var f=a.get(t);if(f&&a.get(e))return f==e;var p=!0;a.set(t,e),a.set(e,t);for(var d=i;++c<u;){var h=t[l=s[c]],y=e[l];if(r)var g=i?r(y,h,l,e,t,a):r(h,y,l,t,e,a);if(!(void 0===g?h===y||o(h,y,n,r,a):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return a.delete(t),a.delete(e),p}(t,e,n,r,o,l))}(t,e,n,r,Dt,o))}function Pt(t,e,n,r,o,a){var i=1&n,s=t.length,u=e.length;if(s!=u&&!(i&&u>s))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,f=!0,p=2&n?new vt:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var d=t[l],h=e[l];if(r)var y=i?r(h,d,l,e,t,a):r(d,h,l,t,e,a);if(void 0!==y){if(y)continue;f=!1;break}if(p){if(!T(e,(function(t,e){if(i=e,!p.has(i)&&(d===t||o(d,t,n,r,a)))return p.push(e);var i}))){f=!1;break}}else if(d!==h&&!o(d,h,n,r,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function xt(t){return function(t,e,n){var r=e(t);return Ht(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,qt,zt)}function Rt(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function _t(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Wt(t)||function(t){return!!Y&&Y in t}(t))&&(Nt(t)?G:O).test(Et(t))}(n)?n:void 0}gt.prototype.clear=function(){this.__data__=ut?ut(null):{},this.size=0},gt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},gt.prototype.get=function(t){var e=this.__data__;if(ut){var n=e[t];return n===r?void 0:n}return X.call(e,t)?e[t]:void 0},gt.prototype.has=function(t){var e=this.__data__;return ut?void 0!==e[t]:X.call(e,t)},gt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ut&&void 0===e?r:e,this},bt.prototype.clear=function(){this.__data__=[],this.size=0},bt.prototype.delete=function(t){var e=this.__data__,n=Ot(e,t);return!(n<0||(n==e.length-1?e.pop():Q.call(e,n,1),--this.size,0))},bt.prototype.get=function(t){var e=this.__data__,n=Ot(e,t);return n<0?void 0:e[n][1]},bt.prototype.has=function(t){return Ot(this.__data__,t)>-1},bt.prototype.set=function(t,e){var n=this.__data__,r=Ot(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},mt.prototype.clear=function(){this.size=0,this.__data__={hash:new gt,map:new(ot||bt),string:new gt}},mt.prototype.delete=function(t){var e=Rt(this,t).delete(t);return this.size-=e?1:0,e},mt.prototype.get=function(t){return Rt(this,t).g