@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
2 lines • 93.9 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["vendors~bad-route-2mkgt~custom-page-KXWAf~graphiql-page-QvAQg~home-page-WyKJQ~page-with-sidebar-I1Yd~fe182d51"],{"../node_modules/raf/index.js":function(e,t,n){(function(t){for(var r=n("../node_modules/performance-now/lib/performance-now.js"),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",s=o["request"+i],d=o["cancel"+i]||o["cancelRequest"+i],c=0;!s&&c<a.length;c++)s=o[a[c]+"Request"+i],d=o[a[c]+"Cancel"+i]||o[a[c]+"CancelRequest"+i];if(!s||!d){var u=0,l=0,p=[];s=function(e){if(0===p.length){var t=r(),n=Math.max(0,1e3/60-(t-u));u=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++l,callback:e,cancelled:!1}),l},d=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return s.call(o,e)},e.exports.cancel=function(){d.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=s,e.cancelAnimationFrame=d}}).call(this,n("../node_modules/webpack/buildin/global.js"))},"../node_modules/react-display-name/lib/getDisplayName.js":function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function getDisplayName(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}},"../node_modules/react-dnd/dist/esm/common/DragSourceMonitorImpl.js":function(e,t,n){n.d(t,"a",(function(){return s}));var r=n("../node_modules/invariant/invariant.js"),o=n.n(r);function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=!1,i=!1,s=function(){function DragSourceMonitorImpl(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,DragSourceMonitorImpl),this.sourceId=null,this.internalMonitor=e.getMonitor()}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(DragSourceMonitorImpl,[{key:"receiveHandlerId",value:function receiveHandlerId(e){this.sourceId=e}},{key:"getHandlerId",value:function getHandlerId(){return this.sourceId}},{key:"canDrag",value:function canDrag(){o()(!a,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return a=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{a=!1}}},{key:"isDragging",value:function isDragging(){if(!this.sourceId)return!1;o()(!i,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return i=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{i=!1}}},{key:"subscribeToStateChange",value:function subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function getTargetIds(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function isSourcePublic(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function getSourceId(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function canDragSource(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function getItemType(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function getItem(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function getDropResult(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function didDrop(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function getClientOffset(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),DragSourceMonitorImpl}()},"../node_modules/react-dnd/dist/esm/common/DropTargetMonitorImpl.js":function(e,t,n){n.d(t,"a",(function(){return i}));var r=n("../node_modules/invariant/invariant.js"),o=n.n(r);function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=!1,i=function(){function DropTargetMonitorImpl(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,DropTargetMonitorImpl),this.targetId=null,this.internalMonitor=e.getMonitor()}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(DropTargetMonitorImpl,[{key:"receiveHandlerId",value:function receiveHandlerId(e){this.targetId=e}},{key:"getHandlerId",value:function getHandlerId(){return this.targetId}},{key:"subscribeToStateChange",value:function subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function canDrop(){if(!this.targetId)return!1;o()(!a,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return a=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{a=!1}}},{key:"isOver",value:function isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function getItemType(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function getItem(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function getDropResult(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function didDrop(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function getClientOffset(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),DropTargetMonitorImpl}()},"../node_modules/react-dnd/dist/esm/common/SourceConnector.js":function(e,t,n){n.d(t,"a",(function(){return s}));var r=n("../node_modules/react-dnd/dist/esm/common/wrapConnectorHooks.js"),o=n("../node_modules/react-dnd/dist/esm/utils/isRef.js"),a=n("../node_modules/shallowequal/index.js"),i=n.n(a);function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function SourceConnector(e){var t=this;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,SourceConnector),this.hooks=Object(r.a)({dragSource:function dragSource(e,n){t.clearDragSource(),t.dragSourceOptions=n||null,Object(o.a)(e)?t.dragSourceRef=e:t.dragSourceNode=e,t.reconnectDragSource()},dragPreview:function dragPreview(e,n){t.clearDragPreview(),t.dragPreviewOptions=n||null,Object(o.a)(e)?t.dragPreviewRef=e:t.dragPreviewNode=e,t.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(SourceConnector,[{key:"receiveHandlerId",value:function receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"reconnect",value:function reconnect(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function reconnectDragSource(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function reconnectDragPreview(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();this.handlerId?this.dragPreview&&t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.disconnectDragPreview(),this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.disconnectDragPreview()}},{key:"didHandlerIdChange",value:function didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function didDragSourceOptionsChange(){return!i()(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function didDragPreviewOptionsChange(){return!i()(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function get(){return this.dragSource}},{key:"dragSourceOptions",get:function get(){return this.dragSourceOptionsInternal},set:function set(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function get(){return this.dragPreviewOptionsInternal},set:function set(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function get(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function get(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}]),SourceConnector}()},"../node_modules/react-dnd/dist/esm/common/TargetConnector.js":function(e,t,n){n.d(t,"a",(function(){return s}));var r=n("../node_modules/shallowequal/index.js"),o=n.n(r),a=n("../node_modules/react-dnd/dist/esm/common/wrapConnectorHooks.js"),i=n("../node_modules/react-dnd/dist/esm/utils/isRef.js");function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function TargetConnector(e){var t=this;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,TargetConnector),this.hooks=Object(a.a)({dropTarget:function dropTarget(e,n){t.clearDropTarget(),t.dropTargetOptions=n,Object(i.a)(e)?t.dropTargetRef=e:t.dropTargetNode=e,t.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(TargetConnector,[{key:"reconnect",value:function reconnect(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"didHandlerIdChange",value:function didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function didOptionsChange(){return!o()(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function get(){return this.dropTarget}},{key:"dropTargetOptions",get:function get(){return this.dropTargetOptionsInternal},set:function set(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function get(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}]),TargetConnector}()},"../node_modules/react-dnd/dist/esm/common/registration.js":function(e,t,n){function registerTarget(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return[o,function(){return r.removeTarget(o)}]}function registerSource(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}n.d(t,"b",(function(){return registerTarget})),n.d(t,"a",(function(){return registerSource}))},"../node_modules/react-dnd/dist/esm/common/wrapConnectorHooks.js":function(e,t,n){n.d(t,"a",(function(){return wrapConnectorHooks}));var r=n("react"),o=n("../node_modules/invariant/invariant.js"),a=n.n(o);function setRef(e,t){"function"==typeof e?e(t):e.current=t}function cloneWithRef(e,t){var n=e.ref;return a()("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?Object(r.cloneElement)(e,{ref:function ref(e){setRef(n,e),setRef(t,e)}}):Object(r.cloneElement)(e,{ref:t})}function throwIfCompositeComponentElement(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function wrapConnectorHooks(e){var t={};return Object.keys(e).forEach((function(n){var o=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var a=function wrapHookToRecognizeElement(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(r.isValidElement)(t)){var o=t;return e(o,n),o}var a=t;throwIfCompositeComponentElement(a);var i=n?function(t){return e(t,n)}:e;return cloneWithRef(a,i)}}(o);t[n]=function(){return a}}})),t}},"../node_modules/react-dnd/dist/esm/decorators/DragSource.js":function(e,t,n){n.d(t,"a",(function(){return DragSource}));var r=n("../node_modules/invariant/invariant.js"),o=n.n(r),a=n("../node_modules/react-dnd/dist/esm/utils/js_utils.js"),i=n("../node_modules/react-dnd/dist/esm/decorators/utils.js"),s=n("../node_modules/react-dnd/dist/esm/decorators/decorateHandler.js"),d=n("../node_modules/react-dnd/dist/esm/common/registration.js"),c=n("../node_modules/react-dnd/dist/esm/common/DragSourceMonitorImpl.js"),u=n("../node_modules/react-dnd/dist/esm/common/SourceConnector.js"),l=n("../node_modules/react-dnd/dist/esm/utils/isValidType.js");function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=["canDrag","beginDrag","isDragging","endDrag"],h=["beginDrag"],f=function(){function SourceImpl(e,t,n){var r=this;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,SourceImpl),this.props=null,this.beginDrag=function(){if(r.props)return r.spec.beginDrag(r.props,r.monitor,r.ref.current)},this.spec=e,this.monitor=t,this.ref=n}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(SourceImpl,[{key:"receiveProps",value:function receiveProps(e){this.props=e}},{key:"canDrag",value:function canDrag(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function isDragging(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function endDrag(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,Object(i.b)(this.ref))}}]),SourceImpl}();function DragSource(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(i.a)("DragSource","type, spec, collect[, options]",e,t,n,r);var g=e;"function"!=typeof e&&(o()(Object(l.a)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),g=function getType(){return e}),o()(Object(a.b)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var m=function createSourceFactory(e){return Object.keys(e).forEach((function(t){o()(p.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',p.join(", "),t),o()("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),h.forEach((function(t){o()("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function createSource(t,n){return new f(e,t,n)}}(t);return o()("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),o()(Object(a.b)(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function decorateSource(e){return Object(s.a)({containerDisplayName:"DragSource",createHandler:m,registerHandler:d.a,createConnector:function createConnector(e){return new u.a(e)},createMonitor:function createMonitor(e){return new c.a(e)},DecoratedComponent:e,getType:g,collect:n,options:r})}}},"../node_modules/react-dnd/dist/esm/decorators/DropTarget.js":function(e,t,n){n.d(t,"a",(function(){return DropTarget}));var r=n("../node_modules/invariant/invariant.js"),o=n.n(r),a=n("../node_modules/react-dnd/dist/esm/utils/js_utils.js"),i=n("../node_modules/react-dnd/dist/esm/common/registration.js"),s=n("../node_modules/react-dnd/dist/esm/utils/isValidType.js"),d=n("../node_modules/react-dnd/dist/esm/common/TargetConnector.js"),c=n("../node_modules/react-dnd/dist/esm/common/DropTargetMonitorImpl.js"),u=n("../node_modules/react-dnd/dist/esm/decorators/utils.js"),l=n("../node_modules/react-dnd/dist/esm/decorators/decorateHandler.js");function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=["canDrop","hover","drop"],h=function(){function TargetImpl(e,t,n){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,TargetImpl),this.props=null,this.spec=e,this.monitor=t,this.ref=n}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(TargetImpl,[{key:"receiveProps",value:function receiveProps(e){this.props=e}},{key:"receiveMonitor",value:function receiveMonitor(e){this.monitor=e}},{key:"canDrop",value:function canDrop(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function hover(){this.spec.hover&&this.spec.hover(this.props,this.monitor,Object(u.b)(this.ref))}},{key:"drop",value:function drop(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}]),TargetImpl}();function DropTarget(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(u.a)("DropTarget","type, spec, collect[, options]",e,t,n,r);var f=e;"function"!=typeof e&&(o()(Object(s.a)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),f=function getType(){return e}),o()(Object(a.b)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var g=function createTargetFactory(e){return Object.keys(e).forEach((function(t){o()(p.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',p.join(", "),t),o()("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function createTarget(t,n){return new h(e,t,n)}}(t);return o()("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),o()(Object(a.b)(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function decorateTarget(e){return Object(l.a)({containerDisplayName:"DropTarget",createHandler:g,registerHandler:i.b,createMonitor:function createMonitor(e){return new c.a(e)},createConnector:function createConnector(e){return new d.a(e)},DecoratedComponent:e,getType:f,collect:n,options:r})}}},"../node_modules/react-dnd/dist/esm/decorators/decorateHandler.js":function(e,t,n){n.d(t,"a",(function(){return decorateHandler}));var r=n("react"),o=n("../node_modules/shallowequal/index.js"),a=n.n(o),i=n("../node_modules/invariant/invariant.js"),s=n.n(i),d=n("../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),c=n.n(d),u=n("../node_modules/react-dnd/dist/esm/common/DndContext.js"),l=n("../node_modules/react-dnd/dist/esm/utils/js_utils.js");function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}var p=function(){function Disposable(e){_classCallCheck(this,Disposable),this.isDisposed=!1,this.action=Object(l.a)(e)?e:l.c}return _createClass(Disposable,[{key:"dispose",value:function dispose(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function isDisposable(e){return e&&Object(l.a)(e.dispose)}},{key:"_fixup",value:function _fixup(e){return Disposable.isDisposable(e)?e:Disposable.empty}},{key:"create",value:function create(e){return new Disposable(e)}}]),Disposable}();p.empty={dispose:l.c};var h=function(){function CompositeDisposable(){_classCallCheck(this,CompositeDisposable),this.isDisposed=!1;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.disposables=t}return _createClass(CompositeDisposable,[{key:"add",value:function add(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function remove(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),e.dispose())}return t}},{key:"clear",value:function clear(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}},{key:"dispose",value:function dispose(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}}]),CompositeDisposable}(),f=function(){function SerialDisposable(){_classCallCheck(this,SerialDisposable),this.isDisposed=!1}return _createClass(SerialDisposable,[{key:"getDisposable",value:function getDisposable(){return this.current}},{key:"setDisposable",value:function setDisposable(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e,n&&n.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function dispose(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),SerialDisposable}(),g=n("../node_modules/react-dnd/dist/esm/decorators/utils.js");function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function decorateHandler_defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function decorateHandler(e){var t=e.DecoratedComponent,n=e.createHandler,o=e.createMonitor,i=e.createConnector,d=e.registerHandler,l=e.containerDisplayName,m=e.getType,y=e.collect,v=e.options.arePropsEqual,b=void 0===v?a.a:v,D=t,_=t.displayName||t.name||"Component",C=function(e){function DragDropContainer(e){var t;return function decorateHandler_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,DragDropContainer),(t=_possibleConstructorReturn(this,_getPrototypeOf(DragDropContainer).call(this,e))).decoratedRef=r.createRef(),t.handleChange=function(){var e=t.getCurrentState();a()(e,t.state)||t.setState(e)},t.disposable=new f,t.receiveProps(e),t.dispose(),t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}(DragDropContainer,e),function decorateHandler_createClass(e,t,n){return t&&decorateHandler_defineProperties(e.prototype,t),n&&decorateHandler_defineProperties(e,n),e}(DragDropContainer,[{key:"getHandlerId",value:function getHandlerId(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function getDecoratedComponentInstance(){return s()(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(e,t){return!b(e,this.props)||!a()(t,this.state)}},{key:"componentDidMount",value:function componentDidMount(){this.disposable=new f,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function componentDidUpdate(e){b(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.dispose()}},{key:"receiveProps",value:function receiveProps(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(m(e)))}},{key:"receiveType",value:function receiveType(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=_slicedToArray(d(e,this.handler,this.manager),2),n=t[0],r=t[1];this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new h(new p(o),new p(r)))}}},{key:"dispose",value:function dispose(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function getCurrentState(){return this.handlerConnector?y(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function render(){var e=this;return r.createElement(u.a.Consumer,null,(function(t){var n=t.dragDropManager;return e.receiveDragDropManager(n),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){return e.handlerConnector.reconnect()})),r.createElement(D,Object.assign({},e.props,e.getCurrentState(),{ref:Object(g.c)(D)?e.decoratedRef:null}))}))}},{key:"receiveDragDropManager",value:function receiveDragDropManager(e){void 0===this.manager&&(s()(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",_,_),void 0!==e&&(this.manager=e,this.handlerMonitor=o(e),this.handlerConnector=i(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}]),DragDropContainer}(r.Component);return C.DecoratedComponent=t,C.displayName="".concat(l,"(").concat(_,")"),c()(C,t)}},"../node_modules/react-dnd/dist/esm/decorators/utils.js":function(e,t,n){function getDecoratedComponent(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function isRefable(e){return function isClassComponent(e){return e&&e.prototype&&"function"==typeof e.prototype.render}(e)||function isRefForwardingComponent(e){return e&&e.$$typeof&&"Symbol(react.forward_ref)"===e.$$typeof.toString()}(e)}function checkDecoratorArguments(e,t){}n.d(t,"b",(function(){return getDecoratedComponent})),n.d(t,"c",(function(){return isRefable})),n.d(t,"a",(function(){return checkDecoratorArguments}))},"../node_modules/react-dnd/dist/esm/hooks/internal/useCollector.js":function(e,t,n){n.d(t,"a",(function(){return useCollector}));var r=n("../node_modules/shallowequal/index.js"),o=n.n(r),a=n("react"),i=n("../node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js");function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useCollector(e,t,n){var r=_slicedToArray(Object(a.useState)((function(){return t(e)})),2),s=r[0],d=r[1],c=Object(a.useCallback)((function(){var r=t(e);o()(s,r)||(d(r),n&&n())}),[s,e,n]);return Object(i.a)(c,[]),[s,c]}},"../node_modules/react-dnd/dist/esm/hooks/internal/useDragDropManager.js":function(e,t,n){n.d(t,"a",(function(){return useDragDropManager}));var r=n("react"),o=n("../node_modules/invariant/invariant.js"),a=n.n(o),i=n("../node_modules/react-dnd/dist/esm/common/DndContext.js");function useDragDropManager(){var e=Object(r.useContext)(i.a).dragDropManager;return a()(null!=e,"Expected drag drop context"),e}},"../node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js":function(e,t,n){n.d(t,"a",(function(){return o}));var r=n("react"),o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},"../node_modules/react-dnd/dist/esm/hooks/internal/useMonitorOutput.js":function(e,t,n){n.d(t,"a",(function(){return useMonitorOutput}));var r=n("../node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js"),o=n("../node_modules/react-dnd/dist/esm/hooks/internal/useCollector.js");function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useMonitorOutput(e,t,n){var a=_slicedToArray(Object(o.a)(e,t,n),2),i=a[0],s=a[1];return Object(r.a)((function subscribeToMonitorStateChange(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(s,{handlerIds:[t]})}),[e,s]),i}},"../node_modules/react-dnd/dist/esm/hooks/useDrag.js":function(e,t,n){n.d(t,"a",(function(){return useDrag}));var r=n("react"),o=n("../node_modules/invariant/invariant.js"),a=n.n(o),i=n("../node_modules/react-dnd/dist/esm/hooks/internal/useMonitorOutput.js"),s=n("../node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js"),d=n("../node_modules/react-dnd/dist/esm/common/registration.js"),c=n("../node_modules/react-dnd/dist/esm/hooks/internal/useDragDropManager.js"),u=n("../node_modules/react-dnd/dist/esm/common/DragSourceMonitorImpl.js"),l=n("../node_modules/react-dnd/dist/esm/common/SourceConnector.js");function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function useDrag_slicedToArray(e,t){return function useDrag_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function useDrag_iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function useDrag_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useDrag(e){var t=Object(r.useRef)(e);t.current=e,a()(null!=e.item,"item must be defined"),a()(null!=e.item.type,"item type must be defined");var n=useDrag_slicedToArray(function useDragSourceMonitor(){var e=Object(c.a)();return[Object(r.useMemo)((function(){return new u.a(e)}),[e]),Object(r.useMemo)((function(){return new l.a(e.getBackend())}),[e])]}(),2),o=n[0],p=n[1];!function useDragHandler(e,t,n){var o=Object(c.a)(),i=Object(r.useMemo)((function(){return{beginDrag:function beginDrag(){var n=e.current,r=n.begin,o=n.item;if(r){var i=r(t);return a()(null==i||"object"===_typeof(i),"dragSpec.begin() must either return an object, undefined, or null"),i||o||{}}return o||{}},canDrag:function canDrag(){return"boolean"==typeof e.current.canDrag?e.current.canDrag:"function"!=typeof e.current.canDrag||e.current.canDrag(t)},isDragging:function isDragging(n,r){var isDragging=e.current.isDragging;return isDragging?isDragging(t):r===n.getSourceId()},endDrag:function endDrag(){var r=e.current.end;r&&r(t.getItem(),t),n.reconnect()}}}),[]);Object(s.a)((function registerHandler(){var r=_slicedToArray(Object(d.a)(e.current.item.type,i,o),2),a=r[0],s=r[1];return t.receiveHandlerId(a),n.receiveHandlerId(a),s}),[])}(t,o,p);var h=Object(i.a)(o,t.current.collect||function(){return{}},(function(){return p.reconnect()})),f=Object(r.useMemo)((function(){return p.hooks.dragSource()}),[p]),g=Object(r.useMemo)((function(){return p.hooks.dragPreview()}),[p]);return Object(s.a)((function(){p.dragSourceOptions=t.current.options||null,p.reconnect()}),[p]),Object(s.a)((function(){p.dragPreviewOptions=t.current.previewOptions||null,p.reconnect()}),[p]),[h,f,g]}},"../node_modules/react-dnd/dist/esm/hooks/useDrop.js":function(e,t,n){n.d(t,"a",(function(){return useDrop}));var r=n("react"),o=n("../node_modules/invariant/invariant.js"),a=n.n(o),i=n("../node_modules/react-dnd/dist/esm/hooks/internal/useMonitorOutput.js"),s=n("../node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js"),d=n("../node_modules/react-dnd/dist/esm/common/registration.js"),c=n("../node_modules/react-dnd/dist/esm/hooks/internal/useDragDropManager.js"),u=n("../node_modules/react-dnd/dist/esm/common/TargetConnector.js"),l=n("../node_modules/react-dnd/dist/esm/common/DropTargetMonitorImpl.js");function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useDrop_slicedToArray(e,t){return function useDrop_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function useDrop_iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function useDrop_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useDrop(e){var t=Object(r.useRef)(e);t.current=e,a()(null!=e.accept,"accept must be defined");var n=useDrop_slicedToArray(function useDropTargetMonitor(){var e=Object(c.a)();return[Object(r.useMemo)((function(){return new l.a(e)}),[e]),Object(r.useMemo)((function(){return new u.a(e.getBackend())}),[e])]}(),2),o=n[0],p=n[1];!function useDropHandler(e,t,n){var o=Object(c.a)(),a=Object(r.useMemo)((function(){return{canDrop:function canDrop(){var canDrop=e.current.canDrop;return!canDrop||canDrop(t.getItem(),t)},hover:function hover(){var hover=e.current.hover;hover&&hover(t.getItem(),t)},drop:function drop(){var drop=e.current.drop;if(drop)return drop(t.getItem(),t)}}}),[t]);Object(s.a)((function registerHandler(){var r=_slicedToArray(Object(d.b)(e.current.accept,a,o),2),i=r[0],s=r[1];return t.receiveHandlerId(i),n.receiveHandlerId(i),s}),[t,n])}(t,o,p);var h=Object(i.a)(o,t.current.collect||function(){return{}},(function(){return p.reconnect()})),f=Object(r.useMemo)((function(){return p.hooks.dropTarget()}),[p]);return Object(s.a)((function(){p.dropTargetOptions=e.options||null,p.reconnect()}),[e.options]),[h,f]}},"../node_modules/react-dnd/dist/esm/index.js":function(e,t,n){n.r(t),n.d(t,"DndContext",(function(){return r.a})),n.d(t,"createDndContext",(function(){return r.b})),n.d(t,"DndProvider",(function(){return o.a})),n.d(t,"DragPreviewImage",(function(){return i})),n.d(t,"useDrag",(function(){return s.a})),n.d(t,"useDrop",(function(){return d.a})),n.d(t,"useDragLayer",(function(){return useDragLayer})),n.d(t,"DragSource",(function(){return l.a})),n.d(t,"DropTarget",(function(){return p.a})),n.d(t,"DragLayer",(function(){return DragLayer}));var r=n("../node_modules/react-dnd/dist/esm/common/DndContext.js"),o=n("../node_modules/react-dnd/dist/esm/common/DndProvider.js"),a=n("react"),i=a.memo((function(e){var t=e.connect,n=e.src;if("undefined"!=typeof Image){var r=new Image;r.src=n,r.onload=function(){return t(r)}}return null}));i.displayName="DragPreviewImage";var s=n("../node_modules/react-dnd/dist/esm/hooks/useDrag.js"),d=n("../node_modules/react-dnd/dist/esm/hooks/useDrop.js"),c=n("../node_modules/react-dnd/dist/esm/hooks/internal/useDragDropManager.js"),u=n("../node_modules/react-dnd/dist/esm/hooks/internal/useCollector.js");function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function useDragLayer(e){var t=Object(c.a)().getMonitor(),n=_slicedToArray(Object(u.a)(t,e),2),r=n[0],o=n[1];return Object(a.useEffect)((function(){return t.subscribeToOffsetChange(o)})),Object(a.useEffect)((function(){return t.subscribeToStateChange(o)})),r}var l=n("../node_modules/react-dnd/dist/esm/decorators/DragSource.js"),p=n("../node_modules/react-dnd/dist/esm/decorators/DropTarget.js"),h=n("../node_modules/shallowequal/index.js"),f=n.n(h),g=n("../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),m=n.n(g),y=n("../node_modules/invariant/invariant.js"),v=n.n(y),b=n("../node_modules/react-dnd/dist/esm/utils/js_utils.js"),D=n("../node_modules/react-dnd/dist/esm/decorators/utils.js");function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function DragLayer(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(D.a)("DragLayer","collect[, options]",e,t),v()("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),v()(Object(b.b)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function decorateLayer(n){var o=n,i=t.arePropsEqual,s=void 0===i?f.a:i,d=o.displayName||o.name||"Component",c=function(t){function DragLayerContainer(){var e;return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,DragLayerContainer),(e=_possibleConstructorReturn(this,_getPrototypeOf(DragLayerContainer).apply(this,arguments))).isCurrentlyMounted=!1,e.ref=a.createRef(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();f()(t,e.state)||e.setState(t)}},e}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}(DragLayerContainer,t),function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(DragLayerContainer,[{key:"getDecoratedComponentInstance",value:function getDecoratedComponentInstance(){return v()(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(e,t){return!s(e,this.props)||!f()(t,this.state)}},{key:"componentDidMount",value:function componentDidMount(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function render(){var e=this;return a.createElement(r.a.Consumer,null,(function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?a.createElement(o,Object.assign({},e.props,e.state,{ref:Object(D.c)(o)?e.ref:null})):null)}))}},{key:"receiveDragDropManager",value:function receiveDragDropManager(e){if(void 0===this.manager){this.manager=e,v()("object"===_typeof(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",d,d);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function getCurrentState(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),DragLayerContainer}(a.Component);return c.displayName="DragLayer(".concat(d,")"),c.DecoratedComponent=n,m()(c,n)}}},"../node_modules/react-dnd/dist/esm/utils/isRef.js":function(e,t,n){function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function isRef(e){return null!==e&&"object"===_typeof(e)&&e.hasOwnProperty("current")}n.d(t,"a",(function(){return isRef}))},"../node_modules/react-dnd/dist/esm/utils/isValidType.js":function(e,t,n){function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function isValidType(e,t){return"string"==typeof e||"symbol"===_typeof(e)||!!t&&Array.isArray(e)&&e.every((function(e){return isValidType(e,!1)}))}n.d(t,"a",(function(){return isValidType}))},"../node_modules/react-dnd/dist/esm/utils/js_utils.js":function(e,t,n){function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function isFunction(e){return"function"==typeof e}function noop(){}function isPlainObject(e){if(!function isObjectLike(e){return"object"===_typeof(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}n.d(t,"a",(function(){return isFunction})),n.d(t,"c",(function(){return noop})),n.d(t,"b",(function(){return isPlainObject}))},"../node_modules/react-sortable-tree/dist/index.esm.js":function(e,t,n){n.d(t,"a",(function(){return x})),n.d(t,"d",(function(){return toggleExpandedForAll})),n.d(t,"b",(function(){return getFlatDataFromTree})),n.d(t,"c",(function(){return getTreeFromFlatData}));var r=n("../node_modules/react-virtualized/dist/es/index.js"),o=n("../node_modules/lodash.isequal/index.js"),a=n.n(o),i=n("../node_modules/frontend-collective-react-dnd-scrollzone/lib/index.js"),s=n.n(i),d=(n("../node_modules/react-dnd-html5-backend/dist/esm/index.js"),n("react")),c=n.n(d),u=n("../node_modules/prop-types/index.js"),l=n.n(u),p=n("../node_modules/react-dnd/dist/esm/decorators/DragSource.js"),h=n("../node_modules/react-dnd/dist/esm/decorators/DropTarget.js"),f=n("../node_modules/react-dnd/dist/esm/common/DndContext.js"),g=(n("../node_modules/react-dnd/dist/esm/common/DndProvider.js"),n("../node_modules/react-dom/index.js"));function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_defineProperty(e,t,n[t])}))}return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function componentWillMount(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function componentWillReceiveProps(e){this.setState(function updater(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function componentWillUpdate(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function classnames(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}componentWillMount.__suppressDeprecationWarning=!0,componentWillReceiveProps.__suppressDeprecationWarning=!0,componentWillUpdate.__suppressDeprecationWarning=!0;var m=function(e){function TreeNode(){return _classCallCheck(this,TreeNode),_possibleConstructorReturn(this,_getPrototypeOf(TreeNode).apply(this,arguments))}return _inherits(TreeNode,e),_createClass(TreeNode,[{key:"render",value:function render(){var e,t=this.props,n=t.children,r=t.listIndex,o=t.swapFrom,a=t.swapLength,i=t.swapDepth,s=t.scaffoldBlockPxWidth,u=t.lowerSiblingCounts,l=t.connectDropTarget,p=t.isOver,h=t.draggedNode,f=t.canDrop,g=t.treeIndex,m=(t.treeId,t.getPrevRow,t.node,t.path,t.rowDirection),y=_objectWithoutProperties(t,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),v="rtl"===m?"rst__rtl":null,b=u.length,D=[];return u.forEach((function(e,t){var n="";if(e>0?n=0===r?"rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":t===b-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":0===r?n="rst__lineHalfHorizontalRight":t===b-1&&(n="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),D.push(c.a.createElement("div",{key:"pre_".concat(1+t),style:{width:s},className:classnames("rst__lineBlock",n,v)})),g!==r&&t===i){var d,u="";u=r===o+a-1?"rst__highlightBottomLeftCorner":g===o?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",d="rtl"===m?{width:s,right:s*t}:{width:s,left:s*t},D.push(c.a.createElement("div",{key:t,style:d,className:classnames("rst__absoluteLineBlock",u,v)}))}})),e="rtl"===m?{right:s*b}:{left:s*b},l(c.a.createElement("div",_extends({},y,{className:classnames("rst__node",v)}),D,c.a.createElement("div",{className:"rst__nodeContent",style:e},d.Children.map(n,(function(e){return Object(d.cloneElement)(e,{isOver:p,canDrop:f,draggedNode:h})})))))}}]),TreeNode}(d.Component);function getNodeDataAtTreeIndexOrNextIndex(e){var t=e.targetIndex,n=e.node,r=e.currentIndex,o=e.getNodeKey,a=e.path,i=void 0===a?[]:a,s=e.lowerSiblingCounts,d=void 0===s?[]:s,c=e.ignoreCollapsed,u=void 0===c||c,l=e.isPseudoRoot,p=void 0!==l&&l?[]:_toConsumableArray(i).concat([o({node:n,treeIndex:r})]);if(r===t)return{node:n,lowerSiblingCounts:d,path:p};if(!n.children||u&&!0!==n.expanded)return{nextIndex:r+1};for(var h=r+1,f=n.children.length,g=0;g<f;g+=1){var m=getNodeDataAtTreeIndexOrNextIndex({ignoreCollapsed:u,getNodeKey:o,targetIndex:t,node:n.children[g],currentIndex:h,lowerSiblingCounts:_toConsumableArray(d).concat([f-g-1]),path:p});if(m.node)return m;h=m.nextIndex}return{nextIndex:h}}function getDescendantCount(e){var t=e.node,n=e.ignoreCollapsed;return getNodeDataAtTreeIndexOrNextIndex({getNodeKey:function getNodeKey(){},ignoreCollapsed:void 0===n||n,node:t,currentIndex:0,targetIndex:-1}).nextIndex-1}function walk(e){var t=e.treeData,n=e.getNodeKey,r=e.callback,o=e.ignoreCollapsed,a=void 0===o||o;!t||t.length<1||function walkDescendants(e){var t=e.callback,n=e.getNodeKey,r=e.ignoreCollapsed,o=e.isPseudoRoot,a=void 0!==o&&o,i=e.node,s=e.parentNode,d=void 0===s?null:s,c=e.currentIndex,u=e.path,l=void 0===u?[]:u,p=e.lowerSiblingCounts,h=void 0===p?[]:p,f=a?[]:_toConsumableArray(l).concat([n({node:i,treeIndex:c})]);if(!a&&!1===t(a?null:{node:i,parentNode:d,path:f,lowerSiblingCounts:h,treeIndex:c}))return!1;if(!i.children||!0!==i.expanded&&r&&!a)return c;var g=c,m=i.children.length;if("function"!=typeof i.children)for(var y=0;y<m;y+=1)if(!1===(g=walkDescendants({callback:t,getNodeKey:n,ignoreCollapsed:r,node:i.children[y],parentNode:a?null:i,currentIndex:g+1,lowerSiblingCounts:_toConsumableArray(h).concat([m-y-1]),path:f})))return!1;return g}({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function map(e){var t=e.treeData,n=e.getNodeKey,r=e.callback,o=e.ignoreCollapsed,a=void 0===o||o;return!t||t.length<1?[]:function mapDescendants(e){var t=e.callback,n=e.getNodeKey,r=e.ignoreCollapsed,o=e.isPseudoRoot,a=void 0!==o&&o,i=e.node,s=e.parentNode,d=void 0===s?null:s,c=e.currentIndex,u=e.path,l=void 0===u?[]:u,p=e.lowerSiblingCounts,h=void 0===p?[]:p,f=_objectSpread({},i),g=a?[]:_toConsumableArray(l).concat([n({node:f,treeIndex:c})]),m={node:f,parentNode:d,path:g,lowerSiblingCounts:h,treeIndex:c};if(!f.children||!0!==f.expanded&&r&&!a)return{treeIndex:c,node:t(m)};var y=c,v=f.children.length;return"function"!=typeof f.children&&(f.children=f.children.map((function(e,o){var i=mapDescendants({callback:t,getNodeKey:n,ignoreCollapsed:r,node:e,parentNode:a?null:f,currentIndex:y+1,lowerSiblingCounts:_toConsumableArray(h).concat([v-o-1]),path:g});return y=i.treeIndex,i.node}))),{node:t(m),treeIndex:y}}({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function toggleExpandedForAll(e){var t=e.treeData,n=e.expanded,r=void 0===n||n;return map({treeData:t,callback:function callback(e){return _objectSpread({},e.node,{expanded:r})},getNodeKey:function getNodeKey(e){return e.treeIndex},ignoreCollapsed:!1})}function changeNodeAtPath(e){var t=e.treeData,n=e.path,r=e.newNode,o=e.getNodeKey,a=e.ignoreCollapsed,i=void 0===a||a,s=function traverse(e){var t=e.isPseudoRoot,a=void 0!==t&&t,s=e.node,d=e.currentTreeIndex,c=e.pathIndex;if(!a&&o({node:s,treeIndex:d})!==n[c])return"RESULT_MISS";if(c>=n.length-1)return"function"==typeof r?r({node:s,treeIndex:d}):r;if(!s.children)throw new Error("Path referenced children of node with no children.");for(var u=d+1,l=0;l<s.children.length;l+=1){var p=traverse({node:s.children[l],currentTreeIndex:u,pathIndex:c+1});if("RESULT_MISS"!==p)return _objectSpread({},s,p?{children:_toConsumableArray(s.children.slice(0,l)).concat([p],_toConsumableArray(s.children.slice(l+1)))}:{children:_toConsumableArray(s.children.slice(0,l)).concat(_toConsumableArray(s.children.slice(l+1)))});u+=1+getDescendantCount({node:s.children[l],ignoreCollapsed:i})}return"RESULT_MISS"}({node:{children:t},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if("RESULT_MISS"===s)throw new Error("No node found at the given path.");return s.children}function insertNode(e){var t=e.treeData,n=e.depth,r=e.minimumTreeIndex,o=e.newNode,a=e.getNodeKey,i=void 0===a?function(){}:a,s=e.ignoreCollapsed,d=void 0===s||s,c=e.expandParent,u=void 0!==c&&c;if(!t&&0===n)return{treeData:[o],treeIndex:0,path:[i({node:o,treeIndex:0})],parentNode:null};var l=function addNodeAtDepthAndIndex(e){var t=e.targetDepth,n=e.minimumTreeIndex,r=e.newNode,o=e.ignoreCollapsed,a=e.expandParent,i=e.isPseudoRoot,s=void 0!==i&&i,d=e.isLastChild,c=e.node,u=e.currentIndex,l=e.currentDepth,p=e.getNodeKey,h=e.path,f=void 0===h?[]:h,g=function selfPath(e){return s?[]:_toConsumableArray(f).concat([p({node:e,treeIndex:u})])};if(u>=n-1||d&&(!c.children||!c.children.length)){if("function"==typeof c.children)throw new Error("Cannot add to children defined by a function");var m=_objectSpread({},c,a?{expanded:!0}:{},{children:c.children?[r].concat(_toConsumableArray(c.children)):[r]});return{node:m,nextIndex:u+2,insertedTreeIndex:u+1,parentPath:g(m),parentNode:s?null:m}}if(l>=t-1){if(!c.children||"function"==typeof c.children||!0!==c.expanded&&o&&!s)return{node:c,nextIndex:u+1};for(var y=u+1,v=null,b=null,D=0;D<c.children.length;D+=1){if(y>=n){v=y,b=D;break}y+=1+getDescendantCount({node:c.children[D],ignoreCollapsed:o})}if(null===b){if(y<n&&!d)return{node:c,nextIndex:y};v=y,b=c.children.length}var _=_objectSpread({},c,{children:_toConsumableArray(c.children.slice(0,b)).concat([r],_toConsumableArray(c.children.slice(b)))});return{node:_,nextIndex:y,insertedTreeIndex:v,parentPath:g(_),parentNode:s?null:_}}if(!c.children||"function"==typeof c.children||!0!==c.expanded&&o&&!s)return{node:c,nextIndex:u+1};var C=null,I=null,S=null,w=u+1,T=c.children;"function"!=typeof T&&(T=T.map((function(e,i){if(null!==C)return e;var s=addNodeAtDepthAndIndex({targetDepth:t,minimumTreeIndex:n,newNode:r,ignoreCollapsed:o,expandParent:a,isLastChild:d&&i===T.length-1,node:e,currentIndex:w,currentDepth:l+1,getNodeKey:p,path:[]});return"insertedTreeIndex"in s&&(C=s.insertedTreeIndex,S=s.parentNode,I=s.parentPath),w=s.nextIndex,s.node})));var O=_objectSpread({},c,{children:T}),x={node:O,nextIndex:w};return null!==C&&(x.insertedTreeIndex=C,x.parentPath=_toConsumableArray(g(O)).concat(_toConsumableArray(I)),x.parentNode=S),x}({targetDepth:n,minimumTreeIndex:r,newNode:o,ignoreCollapsed:d,expandParent:u,getNodeKey:i,isPseudoRoot:!0,isLastChild:!0,node:{children:t},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in l))throw new Error("No suitable position found to insert.");var p=l.insertedTreeIndex;return{treeData:l.node.children,treeIndex:p,path:_toConsumableArray(l.parentPath).concat([i({node:o,treeIndex:p})]),parentNode:l.parentNode}}function getFlatDataFromTree(e){var t=e.treeData,n=e.getNodeKey,r=e.ignoreCollapsed,o=void 0===r||r;if(!t||t.length<1)return[];var a=[];return walk({treeData:t,getNodeKey:n,ignoreCollapsed:o,callback:function callback(e){a.push(e)}}),a}function getTreeFromFlatData(e){var t=e.flatData,n=e.getKey,r=void 0===n?function(e){return e.id}:n,o=e.getParentKey,a=void 0===o?function(e){return e.parentId}:o,i=e.rootKey,s=void 0===i?"0":i;if(!t)return[];var d={};if(t.forEach((function(e){var t=a(e);t in d?d[t].push(e):d[t]=[e]})),!(s in d))return[];return d[s].map((function(e){return function trav(e){var t=r(e);return t in d?_objectSpread({},e,{children:d[t].map((function(e){return trav(e)}))}):_objectSpread({},e)}(e)}))}m.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},m.propTypes={treeIndex:l.a.number.isRequired,treeId:l.a.string.isRequired,swapFrom:l.a.number,swapDepth:l.a.number,swapLength:l.a.number,scaffoldBlockPxWidth:l.a.number.isRequired,lowerSiblingCounts:l.a.arrayOf(l.a.number).isRequired,listIndex:l.a.number.isRequired,children:l.a.node.isRequired,connectDropTarget:l.a.func.isRequired,isOver:l.a.bool.isRequired,canDrop:l.a.bool,draggedNode:l.a.shape({}),getPrevRow:l.a.func.isRequired,node:l.a.shape({}).isRequired,path:l.a.arrayOf(l.a.oneOfType([l.a.string,l.a.number])).isRequired,rowDirection:l.a.string};var y=function(e){function NodeRendererDefault(){return _classCallCheck(this,NodeRendererDefault),_possibleConstructorReturn(this,_getPrototypeOf(NodeRendererDefault).apply(this,arguments))}return _inherits(NodeRendererDefault,e),_createClass(NodeRendererDefault,[{key:"render",value:function render(){var e,t=this.props,n=t.scaffoldBlockPxWidth,r=t.toggleChildrenVisibility,o=t.connectDragPreview,a=t.connectDragSource,i=t.isDragging,s=t.canDrop,d=t.canDrag,u=t.node,l=t.title,p=t.subtitle,h=t.draggedNode,f=t.path,g=t.treeIndex,m=t.isSearchMatch,y=t.isSearchFocus,v=t.buttons,b=t.className,D=t.style,_=t.didDrop,C=(t.treeId,t.isOver,t.parentNode,t.rowDirection),I=_objectWithoutProperties(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),S=l||u.title,w=p||u.subtitle,T="rtl"===C?"rst__rtl":null;d&&(e="function"==typeof u.children&&u.expanded?c.a.createElement("div",{className:"rst__loadingHandle"},c.a.createElement("div",{className:"rst__loadingCircle"},_toConsumableArray(new Array(12)).map((function(e,t){return c.a.createElement("div",{key:t,className:classnames("rst__loadingCirclePoint",T)})})))):a(c.a.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var O=h&&function isDescendant(e,t){return!!e.children&&"function"!=typeof e.children&&e.children.some((function(e){return e===t||isDescendant(e,t)}))}(h,u),x=!_&&i,P={left:-.5*n};return"rtl"===C&&(P={right:-.5*n}),c.a.createElement("div",_extends({style:{height:"100%"}},I),r&&u.children&&(u.children.length>0||"function"==typeof u.children)&&c.a.createElement("div",null,c.a.createElement("button",{type:"button","aria-label":u.expanded?"Collapse":"Expand",className:classnames(u.expanded?"rst__collapseButton":"rst__expandButton",T),style:P,onClick:function onClick(){return r({node:u,path:f,treeIndex:g})}}),u.expanded&&!i&&c.a.createElement("div",{style:{width:n},className:classnames("rst__lineChildren",T)})),c.a.createElement("div",{className:classnames("rst__rowWrapper",T)},o(c.a.createElement("div",{className:classnames("rst__row",x&&"rst__rowLandingPad",x&&!s&&"rst__rowCancelPad",m&&"rst__rowSearchMatch",y&&"rst__rowSearchFocus",T,b),style:_objectSpread({opacity:O?.5:1},D)},e,c.a.createElement("div",{className:classnames("rst__rowContents",!d&&"rst__rowContentsDragDisabled",T)},c.a.createElement("div",{className:classnames("rst__rowLabel",T)},c.a.createElement("span",{className:classnames("rst__rowTitle",u.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof S?S({node:u,path:f,treeIndex:g}):S),w&&c.a.createElement("span",{className:"rst__rowSubtitle"},"function"==typeof w?w({node:u,path:f,treeIndex:g}):w)),c.a.createElement("div",{className:"rst__rowToolbar"},v.map((function(e,t){return c.a.createElement("div",{key:t,className:"rst__toolbarButton"},e)}))))))))}}]),NodeRendererDefault}(d.Component);y.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},y.propTypes={node:l.a.shape({}).isRequired,title:l.a.oneOfType([l.a.func,l.a.node]),subtitle:l.a.oneOfType([l.a.func,l.a.node]),path:l.a.arrayOf(l.a.oneOfType([l.a.string,l.a.number])).isRequired,treeIndex:l.a.number.isRequired,treeId:l.a.string.isRequired,isSearchMatch:l.a.bool,isSearchFocus:l.a.bool,canDrag:l.a.bool,scaffoldBlockPxWidth:l.a.number.isRequired,toggleChildrenVisibility:l.a.func,buttons:l.a.arrayOf(l.a.node),className:l.a.string,style:l.a.shape({}),connectDragPreview:l.a.func.isRequired,connectDragSource:l.a.func.isRequired,parentNode:l.a.shape({}),isDragging:l.a.bool.isRequired,didDrop:l.a.bool.isRequired,draggedNode:l.a.shape({}),isOver:l.a.bool.isRequired,canDrop:l.a.bool,rowDirection:l.a.string};var v=function(e){function TreePlaceholder(){return _classCallCheck(this,TreePlaceholder),_possibleConstructorReturn(this,_getPrototypeOf(TreePlaceholder).apply(this,arguments))}return _inherits(TreePlaceholder,e),_createClass(TreePlaceholder,[{key:"render",value:function render(){var e=this.props,t=e.children,n=e.connectDropTarget,r=(e.treeId,e.drop,_objectWithoutProperties(e,["children","connectDropTarget","treeId","drop"]));return n(c.a.createElement("div",null,d.Children.map(t,(function(e){return Object(d.cloneElement)(e,_objectSpread({},r))}))))}}]),TreePlaceholder}(d.Component);v.defaultProps={canDrop:!1,draggedNode:null},v.propTypes={children:l.a.node.isRequired,connectDropTarget:l.a.func.isRequired,isOver:l.a.bool.isRequired,canDrop:l.a.bool,draggedNode:l.a.shape({}),treeId:l.a.string.isRequired,drop:l.a.func.isRequired};var b=function PlaceholderRendererDefault(e){var t=e.isOver,n=e.canDrop;return c.a.createElement("div",{className:classnames("rst__placeholder",n&&"rst__placeholderLandingPad",n&&!t&&"rst__placeholderCancelPad")})};b.defaultProps={isOver:!1,canDrop:!1},b.propTypes={isOver:l.a.bool,canDrop:l.a.bool};var D=function memoize(e){var t=[],n=[],r=null;return function(o){var a=Object.keys(o).sort(),i=a.map((function(e){return o[e]}));return(i.length!==t.length||i.some((function(e,n){return e!==t[n]}))||a.some((function(e,t){return e!==n[t]})))&&(t=i,n=a,r=e(o)),r}},_=D(insertNode),C=D(getFlatDataFromTree),I=D(getDescendantCount);function stringSearch(e,t,n,r,o){return"function"==typeof n[e]?String(n[e]({node:n,path:r,treeIndex:o})).indexOf(t)>-1:"object"===_typeof(n[e])?function getReactElementText(e){return"string"==typeof e?e:null===e||"object"!==_typeof(e)||!e.props||!e.props.children||"string"!=typeof e.props.children&&"object"!==_typeof(e.props.children)?"":"string"==typeof e.props.children?e.props.children:e.props.children.map((function(e){return getReactElementText(e)})).join("")}(n[e]).indexOf(t)>-1:n[e]&&String(n[e]).indexOf(t)>-1}function defaultSearchMethod(e){var t=e.node,n=e.path,r=e.treeIndex,o=e.searchQuery;return stringSearch("title",o,t,n,r)||stringSearch("subtitle",o,t,n,r)}var S=function(){function DndManager(e){_classCallCheck(this,DndManager),this.treeRef=e}return _createClass(DndManager,[{key:"getTargetDepth",value:function getTargetDepth(e,t,n){var r,o=0,a=e.getPrevRow();if(a){var i=a.path;!this.treeRef.canNodeHaveChildren(a.node)&&(i=i.slice(0,i.length-1)),o=Math.min(i.length,e.path.length)}var s=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(s=0,n){var d=Object(g.findDOMNode)(n).getBoundingClientRect(),c=t.getSourceClientOffset().x-d.left;r=Math.round(c/e.scaffoldBlockPxWidth)}else r=e.path.length;else{var u="rtl"===e.rowDirection?-1:1;r=Math.round(u*t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth)}var l=Math.min(o,Math.max(0,s+r-1));if(void 0!==this.maxDepth&&null!==this.maxDepth){var p=function getDepth(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.children?"function"==typeof e.children?t+1:e.children.reduce((function(e,n){return Math.max(e,getDepth(n,t+1))}),t):t}(t.getItem().node);l=Math.max(0,Math.min(l,this.maxDepth-p-1))}return l}},{key:"canDrop",value:function canDrop(e,t){if(!t.isOver())return!1;var n=e.getPrevRow(),r=n?n.path:[],o=n?n.node:{},a=this.getTargetDepth(e,t,null);if(a>=r.length&&"function"==typeof o.children)return!1;if("function"==typeof this.customCanDrop){var i=t.getItem().node,s=_({treeData:this.treeData,newNode:i,depth:a,getNodeKey:this.getNodeKey,minimumTreeIndex:e.listIndex,expandParent:!0});return this.customCanDrop({node:i,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:s.path,nextParent:s.parentNode,nextTreeIndex:s.treeIndex})}return!0}},{key:"wrapSource",value:function wrapSource(e){var t=this,n={beginDrag:function beginDrag(e){return t.startDrag(e),{node:e.node,parentNode:e.parentNode,path:e.path,treeIndex:e.treeIndex,treeId:e.treeId}},endDrag:function endDrag(e,n){t.endDrag(n.getDropResult())},isDragging:function isDragging(e,t){var n=t.getItem().node;return e.node===n}};return Object(p.a)(this.dndType,n,(function nodeDragSourcePropInjection(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),didDrop:t.didDrop()}}))(e)}},{key:"wrapTarget",value:function wrapTarget(e){var t=this,n={drop:function drop(e,n,r){var o={node:n.getItem().node,path:n.getItem().path,treeIndex:n.getItem().treeIndex,treeId:t.treeId,minimumTreeIndex:e.treeIndex,depth:t.getTargetDepth(e,n,r)};return t.drop(o),o},hover:function hover(e,n,r){var o=t.getTargetDepth(e,n,r),a=n.getItem().node;(e.node!==a||o!==e.path.length-1)&&(cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame((function(){t.dragHover({node:a,path:n.getItem().path,minimumTreeIndex:e.listIndex,depth:o})})))},canDrop:this.canDrop.bind(this)};return Object(h.a)(this.dndType,n,(function nodeDropTargetPropInjection(e,t){var n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}},{key:"wrapPlaceholder",value:function wrapPlaceholder(e){var t=this,n={drop:function drop(e,n){var r=n.getItem(),o={node:r.node,path:r.path,treeIndex:r.treeIndex,treeId:t.treeId,minimumTreeIndex:0,depth:0};return t.drop(o),o}};return Object(h.a)(this.dndType,n,(function placeholderPropInjection(e,t){var n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}},{key:"startDrag",get:function get(){return this.treeRef.startDrag}},{key:"dragHover",get:function get(){return this.treeRef.dragHover}},{key:"endDrag",get:function get(){return this.treeRef.endDrag}},{key:"drop",get:function get(){return this.treeRef.drop}},{key:"treeId",get:function get(){return this.treeRef.treeId}},{key:"dndType",get:function get(){return this.treeRef.dndType}},{key:"treeData",get:function get(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function get(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function get(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function get(){return this.treeRef.props.maxDepth}}]),DndManager}(),w=1,T=function mergeTheme(e){var t=_objectSpread({},e,{style:_objectSpread({},e.theme.style,e.style),innerStyle:_objectSpread({},e.theme.innerStyle,e.innerStyle),reactVirtualizedListProps:_objectSpread({},e.theme.reactVirtualizedListProps,e.reactVirtualizedListProps)}),n={nodeContentRenderer:y,placeholderRenderer:b,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:m};return Object.keys(n).forEach((function(r){null===e[r]&&(t[r]=void 0!==e.theme[r]?e.theme[r]:n[r])})),t},O=function(e){function ReactSortableTree(e){var t;_classCallCheck(this,ReactSortableTree),t=_possibleConstructorReturn(this,_getPrototypeOf(ReactSortableTree).call(this,e));var n=T(e),o=n.dndType,a=n.nodeContentRenderer,d=n.treeNodeRenderer,c=n.isVirtualized,u=n.slideRegionSize;return t.dndManager=new S(_assertThisInitialized(_assertThisInitialized(t))),t.treeId="rst__".concat(w),w+=1,t.dndType=o||t.treeId,t.nodeContentRenderer=t.dndManager.wrapSource(a),t.treePlaceholderRenderer=t.dndManager.wrapPlaceholder(v),t.treeNodeRenderer=t.dndManager.wrapTarget(d),c&&(t.scrollZoneVirtualList=(i.createScrollingComponent||s.a)(r.b),t.vStrength=Object(i.createVerticalStrength)(u),t.hStrength=Object(i.createHorizontalStrength)(u)),t.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},t.toggleChildrenVisibility=t.toggleChildrenVisibility.bind(_assertThisInitialized(_assertThisInitialized(t))),t.moveNode=t.moveNode.bind(_assertThisInitialized(_assertThisInitialized(t))),t.startDrag=t.startDrag.bind(_assertThisInitialized(_assertThisInitialized(t))),t.dragHover=t.dragHover.bind(_assertThisInitialized(_assertThisInitialized(t))),t.endDrag=t.endDrag.bind(_assertThisInitialized(_assertThisInitialized(t))),t.drop=t.drop.bind(_assertThisInitialized(_assertThisInitialized(t))),t.handleDndMonitorChange=t.handleDndMonitorChange.bind(_assertThisInitialized(_assertThisInitialized(t))),t}return _inherits(ReactSortableTree,e),_createClass(ReactSortableTree,[{key:"componentDidMount",value:function componentDidMount(){ReactSortableTree.loadLazyChildren(this.props,this.state);var e=ReactSortableTree.search(this.props,this.state,!0,!0,!1);this.setState(e),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function componentDidUpdate(e,t){this.state.dragging!==t.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.clearMonitorSubscription()}},{key:"getRows",value:function getRows(e){return C({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:e})}},{key:"handleDndMonitorChange",value:function handleDndMonitorChange(){!this.props.dragDropManager.getMonitor().isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function toggleChildrenVisibility(e){var t=e.node,n=e.path,r=changeNodeAtPath({treeData:this.state.instanceProps.treeData,path:n,newNode:function newNode(e){var t=e.node;return _objectSpread({},t,{expanded:!t.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(r),this.props.onVisibilityToggle({treeData:r,node:t,expanded:!t.expanded,path:n})}},{key:"moveNode",value:function moveNode(e){var t=e.node,n=e.path,r=e.treeIndex,o=e.depth,a=e.minimumTreeIndex,i=insertNode({treeData:this.state.draggingTreeData,newNode:t,depth:o,minimumTreeIndex:a,expandParent:!0,getNodeKey:this.props.getNodeKey}),s=i.treeData,d=i.treeIndex,c=i.path,u=i.parentNode;this.props.onChange(s),this.props.onMoveNode({treeData:s,node:t,treeIndex:d,path:c,nextPath:c,nextTreeIndex:d,prevPath:n,prevTreeIndex:r,nextParentNode:u})}},{key:"startDrag",value:function startDrag(e){var t=this,n=e.path;this.setState((function(e){var r=function removeNode(e){var t=e.treeData,n=e.path,r=e.getNodeKey,o=e.ignoreCollapsed,a=null,i=null;return{treeData:changeNodeAtPath({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:void 0===o||o,newNode:function newNode(e){var t=e.node,n=e.treeIndex;return a=t,i=n,null}}),node:a,treeIndex:i}}({treeData:e.instanceProps.treeData,path:n,getNodeKey:t.props.getNodeKey}),o=r.treeData,a=r.node,i=r.treeIndex;return{draggingTreeData:o,draggedNode:a,draggedDepth:n.length-1,draggedMinimumTreeIndex:i,dragging:!0}}))}},{key:"dragHover",value:function dragHover(e){var t=this,n=e.node,r=e.depth,o=e.minimumTreeIndex;this.state.draggedDepth===r&&this.state.draggedMinimumTreeIndex===o||this.setState((function(e){var a=e.draggingTreeData,i=e.instanceProps,s=a||i.treeData,d=_({treeData:s,newNode:n,depth:r,minimumTreeIndex:o,expandParent:!0,getNodeKey:t.props.getNodeKey}),c=t.getRows(d.treeData)[d.treeIndex].path;return{draggedNode:n,draggedDepth:r,draggedMinimumTreeIndex:o,draggingTreeData:changeNodeAtPath({treeData:s,path:c.slice(0,-1),newNode:function newNode(e){return _objectSpread({},e.node,{expanded:!0})},getNodeKey:t.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}}))}},{key:"endDrag",value:function endDrag(e){var t=this,n=this.state.instanceProps;if(e){if(e.treeId!==this.treeId){var r=e.node,o=e.path,a=e.treeIndex,i=this.props.shouldCopyOnOutsideDrop;"function"==typeof i&&(i=i({node:r,prevTreeIndex:a,prevPath:o}));var s=this.state.draggingTreeData||n.treeData;i&&(s=changeNodeAtPath({treeData:n.treeData,path:o,newNode:function newNode(e){return _objectSpread({},e.node)},getNodeKey:this.props.getNodeKey})),this.props.onChange(s),this.props.onMoveNode({treeData:s,node:r,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:o,prevTreeIndex:a})}}else!function resetTree(){t.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})}()}},{key:"drop",value:function drop(e){this.moveNode(e)}},{key:"canNodeHaveChildren",value:function canNodeHaveChildren(e){var canNodeHaveChildren=this.props.canNodeHaveChildren;return!canNodeHaveChildren||canNodeHaveChildren(e)}},{key:"renderRow",value:function renderRow(e,t){var n=t.listIndex,r=t.style,o=t.getPrevRow,a=t.matchKeys,i=t.swapFrom,s=t.swapDepth,d=t.swapLength,u=e.node,l=e.parentNode,p=e.path,h=e.lowerSiblingCounts,f=e.treeIndex,g=T(this.props),m=g.canDrag,y=g.generateNodeProps,v=g.scaffoldBlockPxWidth,b=g.searchFocusOffset,D=g.rowDirection,_=this.treeNodeRenderer,C=this.nodeContentRenderer,I=p[p.length-1],S=I in a,w=S&&a[I]===b,O={node:u,parentNode:l,path:p,lowerSiblingCounts:h,treeIndex:f,isSearchMatch:S,isSearchFocus:w},x=y?y(O):{},P="function"!=typeof m?m:m(O),j={treeIndex:f,scaffoldBlockPxWidth:v,node:u,path:p,treeId:this.treeId,rowDirection:D};return c.a.createElement(_,_extends({style:r,key:I,listIndex:n,getPrevRow:o,lowerSiblingCounts:h,swapFrom:i,swapLength:d,swapDepth:s},j),c.a.createElement(C,_extends({parentNode:l,isSearchMatch:S,isSearchFocus:w,canDrag:P,toggleChildrenVisibility:this.toggleChildrenVisibility},j,x)))}},{key:"render",value:function render(){var e,t=this,n=T(this.props),o=n.dragDropManager,a=n.style,i=n.className,s=n.innerStyle,d=n.rowHeight,u=n.isVirtualized,l=n.placeholderRenderer,p=n.reactVirtualizedListProps,h=n.getNodeKey,f=n.rowDirection,g=this.state,m=g.searchMatches,y=g.searchFocusTreeIndex,v=g.draggedNode,b=g.draggedDepth,D=g.draggedMinimumTreeIndex,C=g.instanceProps,S=this.state.draggingTreeData||C.treeData,w="rtl"===f?"rst__rtl":null,O=null,x=null;if(v&&null!==D){var P=_({treeData:S,newNode:v,depth:b,minimumTreeIndex:D,expandParent:!0,getNodeKey:h}),j=D;O=P.treeIndex,x=1+I({node:v}),e=function slideRows(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=_toConsumableArray(e.slice(0,t)).concat(_toConsumableArray(e.slice(t+r)));return _toConsumableArray(o.slice(0,n)).concat(_toConsumableArray(e.slice(t,t+r)),_toConsumableArray(o.slice(n)))}(this.getRows(P.treeData),O,j,x)}else e=this.getRows(S);var k={};m.forEach((function(e,t){var n=e.path;k[n[n.length-1]]=t}));var R,N=null!==y?{scrollToIndex:y}:{},M=a;if(e.length<1){var E=this.treePlaceholderRenderer,A=l;R=c.a.createElement(E,{treeId:this.treeId,drop:this.drop},c.a.createElement(A,null))}else if(u){M=_objectSpread({height:"100%"},M);var H=this.scrollZoneVirtualList;R=c.a.createElement(r.a,null,(function(n){var r=n.height,a=n.width;return c.a.createElement(H,_extends({},N,{dragDropManager:o,verticalStrength:t.vStrength,horizontalStrength:t.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:a,onScroll:function onScroll(e){var n=e.scrollTop;t.scrollTop=n},height:r,style:s,rowCount:e.length,estimatedRowSize:"function"!=typeof d?d:void 0,rowHeight:"function"!=typeof d?d:function(t){var n=t.index;return d({index:n,treeIndex:n,node:e[n].node,path:e[n].path})},rowRenderer:function rowRenderer(n){var r=n.index,o=n.style;return t.renderRow(e[r],{listIndex:r,style:o,getPrevRow:function getPrevRow(){return e[r-1]||null},matchKeys:k,swapFrom:O,swapDepth:b,swapLength:x})}},p))}))}else R=e.map((function(n,r){return t.renderRow(n,{listIndex:r,style:{height:"function"!=typeof d?d:d({index:r,treeIndex:r,node:n.node,path:n.path})},getPrevRow:function getPrevRow(){return e[r-1]||null},matchKeys:k,swapFrom:O,swapDepth:b,swapLength:x})}));return c.a.createElement("div",{className:classnames("rst__tree",i,w),style:M},R)}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(e,t){var n=t.instanceProps,r={},o=a()(n.treeData,e.treeData);return n.treeData=e.treeData,o?a()(n.searchQuery,e.searchQuery)?n.searchFocusOffset!==e.searchFocusOffset&&Object.assign(r,ReactSortableTree.search(e,t,!0,!0,!0)):Object.assign(r,ReactSortableTree.search(e,t,!0,!0,!1)):(n.ignoreOneTreeUpdate?n.ignoreOneTreeUpdate=!1:(r.searchFocusTreeIndex=null,ReactSortableTree.loadLazyChildren(e,t),Object.assign(r,ReactSortableTree.search(e,t,!1,!1,!1))),r.draggingTreeData=null,r.draggedNode=null,r.draggedMinimumTreeIndex=null,r.draggedDepth=null,r.dragging=!1),n.searchQuery=e.searchQuery,n.searchFocusOffset=e.searchFocusOffset,r.instanceProps=n,r}},{key:"search",value:function search(e,t,n,r,o){var a=e.onChange,i=e.getNodeKey,s=e.searchFinishCallback,d=e.searchQuery,c=e.searchMethod,u=e.searchFocusOffset,l=e.onlyExpandSearchedNodes,p=t.instanceProps;if(!d&&!c)return s&&s([]),{searchMatches:[]};var h={},f=function find(e){var t=e.getNodeKey,n=e.treeData,r=e.searchQuery,o=e.searchMethod,a=e.searchFocusOffset,i=e.expandAllMatchPaths,s=void 0!==i&&i,d=e.expandFocusMatchPaths,c=void 0===d||d,u=0,l=function trav(e){var n=e.isPseudoRoot,i=void 0!==n&&n,d=e.node,l=e.currentIndex,p=e.path,h=[],f=!1,g=!1,m=i?[]:_toConsumableArray(void 0===p?[]:p).concat([t({node:d,treeIndex:l})]),y=i?null:{path:m,treeIndex:l},v=d.children&&"function"!=typeof d.children&&d.children.length>0;!i&&o(_objectSpread({},y,{node:d,searchQuery:r}))&&(u===a&&(g=!0),u+=1,f=!0);var b=l,D=_objectSpread({},d);return v&&(D.children=D.children.map((function(e){var t=trav({node:e,currentIndex:b+1,path:m});return t.node.expanded?b=t.treeIndex:b+=1,(t.matches.length>0||t.hasFocusMatch)&&(h=_toConsumableArray(h).concat(_toConsumableArray(t.matches)),t.hasFocusMatch&&(g=!0),(s&&t.matches.length>0||(s||c)&&t.hasFocusMatch)&&(D.expanded=!0)),t.node}))),i||D.expanded||(h=h.map((function(e){return _objectSpread({},e,{treeIndex:null})}))),f&&(h=[_objectSpread({},y,{node:D})].concat(_toConsumableArray(h))),{node:h.length>0?D:d,matches:h,hasFocusMatch:g,treeIndex:b}}({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:l.matches,treeData:l.node.children}}({getNodeKey:i,treeData:l?toggleExpandedForAll({treeData:p.treeData,expanded:!1}):p.treeData,searchQuery:d,searchMethod:c||defaultSearchMethod,searchFocusOffset:u,expandAllMatchPaths:r&&!o,expandFocusMatchPaths:!!r}),g=f.treeData,m=f.matches;r&&(h.ignoreOneTreeUpdate=!0,a(g)),s&&s(m);var y=null;return n&&null!==u&&u<m.length&&(y=m[u].treeIndex),h.searchMatches=m,h.searchFocusTreeIndex=y,h}},{key:"loadLazyChildren",value:function loadLazyChildren(e,t){var n=t.instanceProps;walk({treeData:n.treeData,getNodeKey:e.getNodeKey,callback:function callback(t){var r=t.node,o=t.path,a=t.lowerSiblingCounts,i=t.treeIndex;r.children&&"function"==typeof r.children&&(r.expanded||e.loadCollapsedLazyChildren)&&r.children({node:r,path:o,lowerSiblingCounts:a,treeIndex:i,done:function done(t){return e.onChange(changeNodeAtPath({treeData:n.treeData,path:o,newNode:function newNode(e){var n=e.node;return(n===r?_objectSpread({},n,{children:t}):n)},getNodeKey:e.getNodeKey}))}})}})}}]),ReactSortableTree}(d.Component);O.propTypes={dragDropManager:l.a.shape({getMonitor:l.a.func}).isRequired,treeData:l.a.arrayOf(l.a.object).isRequired,style:l.a.shape({}),className:l.a.string,innerStyle:l.a.shape({}),rowHeight:l.a.oneOfType([l.a.number,l.a.func]),slideRegionSize:l.a.number,reactVirtualizedListProps:l.a.shape({}),scaffoldBlockPxWidth:l.a.number,maxDepth:l.a.number,searchMethod:l.a.func,searchQuery:l.a.any,searchFocusOffset:l.a.number,searchFinishCallback:l.a.func,generateNodeProps:l.a.func,isVirtualized:l.a.bool,treeNodeRenderer:l.a.func,nodeContentRenderer:l.a.func,placeholderRenderer:l.a.func,theme:l.a.shape({style:l.a.shape({}),innerStyle:l.a.shape({}),reactVirtualizedListProps:l.a.shape({}),scaffoldBlockPxWidth:l.a.number,slideRegionSize:l.a.number,rowHeight:l.a.oneOfType([l.a.number,l.a.func]),treeNodeRenderer:l.a.func,nodeContentRenderer:l.a.func,placeholderRenderer:l.a.func}),getNodeKey:l.a.func,onChange:l.a.func.isRequired,onMoveNode:l.a.func,canDrag:l.a.oneOfType([l.a.func,l.a.bool]),canDrop:l.a.func,canNodeHaveChildren:l.a.func,shouldCopyOnOutsideDrop:l.a.oneOfType([l.a.func,l.a.bool]),onVisibilityToggle:l.a.func,dndType:l.a.string,onDragStateChanged:l.a.func,onlyExpandSearchedNodes:l.a.bool,rowDirection:l.a.string},O.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function canNodeHaveChildren(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:function defaultGetNodeKey(e){return e.treeIndex},innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function onMoveNode(){},onVisibilityToggle:function onVisibilityToggle(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function onDragStateChanged(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"},function polyfill(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,o=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?o="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==o){var a=e.displayName||e.name,i="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+a+" uses "+i+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=componentWillMount,t.componentWillReceiveProps=componentWillReceiveProps),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=componentWillUpdate;var s=t.componentDidUpdate;t.componentDidUpdate=function componentDidUpdatePolyfill(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}(O);var x=function SortableTreeWithoutDndContext(e){return c.a.createElement(f.a.Consumer,null,(function(t){var n=t.dragDropManager;return void 0===n?null:c.a.createElement(O,_extends({},e,{dragDropManager:n}))}))}}}]);
//# sourceMappingURL=vendors~bad-route-2mkgt~custom-page-KXWAf~graphiql-page-QvAQg~home-page-WyKJQ~page-with-sidebar-I1Yd~fe182d51.chunk.eaa5497fb7f7db0479e3.js.map