react-dnd
Advanced tools
Comparing version 0.8.2 to 0.9.0
{ | ||
"name": "react-dnd", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"homepage": "https://github.com/gaearon/react-dnd", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -10,6 +10,4 @@ "use strict"; | ||
DefaultDropTarget = require("./DefaultDropTarget"), | ||
LegacyDefaultDropTarget = require("./LegacyDefaultDropTarget"), | ||
isFileDragDropEvent = require("./isFileDragDropEvent"), | ||
invariant = require("react/lib/invariant"), | ||
warning = require("react/lib/warning"), | ||
assign = require("react/lib/Object.assign"), | ||
@@ -37,14 +35,2 @@ defaults = require("lodash/object/defaults"), | ||
function callDragDropLifecycle(func, component) { | ||
for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | ||
rest[_key - 2] = arguments[_key]; | ||
} | ||
if (component.constructor._legacyConfigureDragDrop) { | ||
return func.apply(component, rest); | ||
} | ||
return func.call.apply(func, [null, component].concat(rest)); | ||
} | ||
function createDragDropMixin(backend) { | ||
@@ -96,3 +82,3 @@ var refs = 0; | ||
var canDrop = dropTarget.canDrop; | ||
return callDragDropLifecycle(canDrop, this, draggedItem) ? draggedItemType : null; | ||
return canDrop(this, draggedItem) ? draggedItemType : null; | ||
}, | ||
@@ -138,12 +124,5 @@ | ||
if (this.configureDragDrop) { | ||
warning(this.constructor._legacyConfigureDragDrop, "%s declares configureDragDrop as an instance method, which is deprecated and will be removed in next version. " + "Move configureDragDrop to statics and change all methods inside it to accept component as first parameter instead of using \"this\".", this.constructor.displayName); | ||
invariant(this.constructor.configureDragDrop, "%s must implement static configureDragDrop(register, context) to use DragDropMixin", this.constructor.displayName); | ||
this.constructor._legacyConfigureDragDrop = true; | ||
this.configureDragDrop(this.registerDragDropItemTypeHandlers); | ||
} else if (this.constructor.configureDragDrop) { | ||
this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers, DragDropContext); | ||
} else { | ||
invariant(this.constructor.configureDragDrop, "%s must implement static configureDragDrop(register, context) to use DragDropMixin", this.constructor.displayName); | ||
} | ||
this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers, DragDropContext); | ||
}, | ||
@@ -177,3 +156,3 @@ | ||
this._dropTargets[type] = defaults(dropTarget, this.constructor._legacyConfigureDragDrop ? LegacyDefaultDropTarget : DefaultDropTarget); | ||
this._dropTargets[type] = defaults(dropTarget, DefaultDropTarget); | ||
} | ||
@@ -202,3 +181,3 @@ }, | ||
if (!callDragDropLifecycle(canDrag, this, e)) { | ||
if (!canDrag(this)) { | ||
e.preventDefault(); | ||
@@ -208,8 +187,8 @@ return; | ||
var _callDragDropLifecycle = callDragDropLifecycle(beginDrag, this, e); | ||
var _beginDrag = beginDrag(this); | ||
var item = _callDragDropLifecycle.item; | ||
var dragPreview = _callDragDropLifecycle.dragPreview; | ||
var dragAnchors = _callDragDropLifecycle.dragAnchors; | ||
var effectsAllowed = _callDragDropLifecycle.effectsAllowed; | ||
var item = _beginDrag.item; | ||
var dragPreview = _beginDrag.dragPreview; | ||
var dragAnchors = _beginDrag.dragAnchors; | ||
var effectsAllowed = _beginDrag.effectsAllowed; | ||
var containerNode = this.getDOMNode(); | ||
@@ -267,3 +246,3 @@ var containerRect = containerNode.getBoundingClientRect(); | ||
callDragDropLifecycle(endDrag, this, effect, e); | ||
endDrag(this, effect); | ||
}, | ||
@@ -308,3 +287,3 @@ | ||
var dropEffect = callDragDropLifecycle(getDropEffect, this, effectsAllowed); | ||
var dropEffect = getDropEffect(this, effectsAllowed); | ||
if (dropEffect) { | ||
@@ -318,3 +297,3 @@ invariant(effectsAllowed.indexOf(dropEffect) > -1, "Effect %s supplied by drop target is not one of the effects allowed by drag source: %s", dropEffect, effectsAllowed.join(", ")); | ||
callDragDropLifecycle(enter, this, this.state.draggedItem, e); | ||
enter(this, this.state.draggedItem); | ||
}, | ||
@@ -332,3 +311,3 @@ | ||
var getDropEffect = _dropTargets$state$draggedItemType.getDropEffect; | ||
callDragDropLifecycle(over, this, this.state.draggedItem, e); | ||
over(this, this.state.draggedItem); | ||
@@ -353,3 +332,3 @@ // Don't use `none` because this will prevent browser from firing `dragend` | ||
var leave = this._dropTargets[this.state.draggedItemType].leave; | ||
callDragDropLifecycle(leave, this, this.state.draggedItem, e); | ||
leave(this, this.state.draggedItem); | ||
}, | ||
@@ -387,3 +366,3 @@ | ||
callDragDropLifecycle(acceptDrop, this, item, e, isHandled, DragOperationStore.getDropEffect()); | ||
acceptDrop(this, item, isHandled, DragOperationStore.getDropEffect()); | ||
} | ||
@@ -390,0 +369,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.ReactDND=e():t.ReactDND=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(30),i=r.HTML5,o=n(38);t.exports={DragDropMixin:o(i),ImagePreloaderMixin:n(32),DragLayerMixin:n(31),HorizontalDragAnchors:n(19),VerticalDragAnchors:n(21),NativeDragItemTypes:n(20),DropEffects:n(9)}},function(t){function e(t){return"number"==typeof t&&t>-1&&t%1==0&&n>=t}var n=Math.pow(2,53)-1;t.exports=e},function(t){function e(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}t.exports=e},function(t,e,n){function r(t){return null==t?!1:f.call(t)==s?g.test(u.call(t)):o(t)&&a.test(t)||!1}var i=n(71),o=n(4),s="[object Function]",a=/^\[object .+?Constructor\]$/,c=Object.prototype,u=Function.prototype.toString,f=c.toString,g=RegExp("^"+i(f).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t){function e(t){return t&&"object"==typeof t||!1}t.exports=e},function(t,e,n){var r=n(1),i=n(3),o=n(4),s="[object Array]",a=Object.prototype,c=a.toString,u=i(u=Array.isArray)&&u,f=u||function(t){return o(t)&&r(t.length)&&c.call(t)==s||!1};t.exports=f},function(t){function e(){}t.exports=e},function(t,e,n){"use strict";var r=n(17),i=function(t){var e,n={};r(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=i},function(t,e,n){"use strict";var r=n(7),i=r({DRAG_START:null,DRAG_END:null,DRAG:null,DROP:null});t.exports=i},function(t){"use strict";var e={COPY:"copy",MOVE:"move",LINK:"link"};t.exports=e},function(t,e,n){"use strict";var r=n(46).Dispatcher,i=n(16),o=i(new r,{handleAction:function(t){this.dispatch({action:t})}});t.exports=o},function(t,e,n){"use strict";var r=n(10),i=n(8),o=n(23),s=null,a=null,c=null,u=o({getInitialOffsetFromContainer:function(){return s},getInitialOffsetFromClient:function(){return a},getCurrentOffsetFromClient:function(){return c}});u.dispatchToken=r.register(function(t){var e=t.action;switch(e.type){case i.DRAG_START:s=e.offsetFromContainer,a=e.offsetFromClient,c=e.offsetFromClient,u.emitChange();break;case i.DRAG:c=e.offsetFromClient,u.emitChange();break;case i.DRAG_END:c=null,c=null,u.emitChange()}}),t.exports=u},function(t,e,n){"use strict";var r=n(10),i=n(8),o=n(11),s=n(23),a=null,c=null,u=null,f=null,g=s({isDragging:function(){return!!a},getEffectsAllowed:function(){return u},getDropEffect:function(){return f},getDraggedItem:function(){return a},getDraggedItemType:function(){return c}});g.dispatchToken=r.register(function(t){r.waitFor([o.dispatchToken]);var e=t.action;switch(e.type){case i.DRAG_START:f=null,a=e.item,c=e.itemType,u=e.effectsAllowed,g.emitChange();break;case i.DROP:f=e.dropEffect,g.emitChange();break;case i.DRAG_END:a=null,c=null,u=null,f=null,g.emitChange()}}),t.exports=g},function(t){"use strict";function e(){return!!window.safari}t.exports=e},function(t){function e(t,e){return t=+t,e=null==e?n:e,t>-1&&t%1==0&&e>t}var n=Math.pow(2,53)-1;t.exports=e},function(t,e,n){function r(t){var e=o(t)?t.length:void 0;return i(e)&&c.call(t)==s||!1}var i=n(1),o=n(4),s="[object Arguments]",a=Object.prototype,c=a.toString;t.exports=r},function(t){function e(t){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(t),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i){var o=Object(i);for(var s in o)n.call(o,s)&&(e[s]=o[s])}}return e}t.exports=e},function(t){"use strict";var e=function(t,e,n,r,i,o,s,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[f++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t,e,n){"use strict";var r=n(10),i=n(8),o={startDragging:function(t,e,n,o,s){r.handleAction({type:i.DRAG_START,itemType:t,item:e,effectsAllowed:n,offsetFromClient:o,offsetFromContainer:s})},drag:function(t){r.handleAction({type:i.DRAG,offsetFromClient:t})},recordDrop:function(t){r.handleAction({type:i.DROP,dropEffect:t})},endDragging:function(){r.handleAction({type:i.DRAG_END})}};t.exports=o},function(t,e,n){"use strict";var r=n(7),i=r({LEFT:null,CENTER:null,RIGHT:null});t.exports=i},function(t,e,n){"use strict";var r=(n(7),{FILE:"__NATIVE_FILE__"});t.exports=r},function(t,e,n){"use strict";var r=n(7),i=r({TOP:null,CENTER:null,BOTTOM:null});t.exports=i},function(t,e,n){"use strict";var r=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=n(49),s=n(50),a=function(){function t(){i(this,t),this._entered=[]}return r(t,null,{enter:{value:function(t){return this._entered=o(this._entered.filter(function(e){return document.body.contains(e)&&(!e.contains||e.contains(t))}),[t]),1===this._entered.length},writable:!0,configurable:!0},leave:{value:function(t){return this._entered=s(this._entered.filter(function(t){return document.body.contains(t)}),t),0===this._entered.length},writable:!0,configurable:!0},reset:{value:function(){this._entered=[]},writable:!0,configurable:!0}}),t}();t.exports=a},function(t,e,n){"use strict";function r(t){var e=o({emitChange:function(){this.emit(s)},addChangeListener:function(t){this.on(s,t)},removeChangeListener:function(t){this.removeListener(s,t)}},t,i.prototype);return e.setMaxListeners(0),e}var i=n(77).EventEmitter,o=n(16),s="change";t.exports=r},function(t){"use strict";function e(t){if(!t.dataTransfer)return!1;var e=Array.prototype.slice.call(t.dataTransfer.types);return-1!==e.indexOf("Files")}t.exports=e},function(t,e,n){function r(t,e,n){if(e!==e)return i(t,n);for(var r=(n||0)-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}var i=n(64);t.exports=r},function(t,e,n){function r(t,e){var n=t.data,r="string"==typeof e||i(e)?n.set.has(e):n.hash[e];return r?0:-1}var i=n(2);t.exports=r},function(t,e,n){(function(e){var r=n(51),i=n(72),o=n(3),s=o(s=e.Set)&&s,a=o(a=Object.create)&&a,c=a&&s?function(t){return new r(t)}:i(null);t.exports=c}).call(e,function(){return this}())},function(t,e,n){(function(e){var r=n(3),i=/\bthis\b/,o=Object.prototype,s=(s=e.window)&&s.document,a=o.propertyIsEnumerable,c={};!function(){c.funcDecomp=!r(e.WinRTError)&&i.test(function(){return this}),c.funcNames="string"==typeof Function.name;try{c.dom=11===s.createDocumentFragment().nodeType}catch(t){c.dom=!1}try{c.nonEnumArgs=!a.call(arguments,1)}catch(t){c.nonEnumArgs=!0}}(0,0),t.exports=c}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}function i(){if(!l){var t=r(g);l=!w(p,t)}return l}function o(){if(h&&!document.body.contains(g)){var t=D.getDraggedItemType();h.handleDragEnd(t,null)}}function s(t){x(t)&&t.preventDefault()}function a(t){t.preventDefault();var e=T.enter(t.target);e&&x(t)&&v.startDragging(m.FILE,null)}function c(t){s(t);var e=b.getOffsetFromClient(h,t);v.drag(e),d&&(t.dataTransfer.dropEffect=d,d=null),g&&E()&&i()&&t.preventDefault()}function u(t){s(t);var e=T.leave(t.target);e&&x(t)&&v.endDragging()}function f(t){s(t),T.reset(),x(t)&&v.endDragging(),o()}var g,h,p,l,d,v=n(18),D=n(12),m=n(20),y=n(22),x=n(24),_=n(37),w=n(75),E=n(44),T=new y,b={setup:function(){"undefined"!=typeof window&&(window.addEventListener("dragenter",a),window.addEventListener("dragover",c),window.addEventListener("dragleave",u),window.addEventListener("drop",f))},teardown:function(){"undefined"!=typeof window&&(window.removeEventListener("dragenter",a),window.removeEventListener("dragover",c),window.removeEventListener("dragleave",u),window.removeEventListener("drop",f))},beginDrag:function(t,e,n,i,s,a,c){var u=e.nativeEvent,f=u.dataTransfer,d=u.target;_(f,n,i,s,a,c),h=t,g=d,p=r(d),l=!1,window.addEventListener("mousemove",o,!0)},endDrag:function(){g=null,h=null,p=null,l=!1,window.removeEventListener("mousemove",o,!0)},dragOver:function(t,e,n){d||(d=n)},getDragSourceProps:function(t,e){return{draggable:!0,onDragStart:t.handleDragStart.bind(t,e),onDragEnd:t.handleDragEnd.bind(t,e)}},getDropTargetProps:function(t,e){return{onDragEnter:t.handleDragEnter.bind(t,e),onDragOver:t.handleDragOver.bind(t,e),onDragLeave:t.handleDragLeave.bind(t,e),onDrop:t.handleDrop.bind(t,e)}},getOffsetFromClient:function(t,e){return{x:e.clientX,y:e.clientY}}};t.exports=b},function(t,e,n){"use strict";t.exports={HTML5:n(29)}},function(t,e,n){"use strict";var r=n(12),i=n(11),o={getInitialState:function(){return this.getStateForDragLayerMixin()},getDragLayerState:function(){var t=this.state,e=t.isDragging,n=t.draggedItemType,r=t.draggedItem,i=t.initialOffset,o=t.currentOffset;return{isDragging:e,draggedItemType:n,draggedItem:r,initialOffset:i,currentOffset:o}},getStateForDragLayerMixin:function(){var t=i.getInitialOffsetFromClient(),e=i.getCurrentOffsetFromClient(),n=i.getInitialOffsetFromContainer(),o=!1,s=null,a=null,c=null,u=null;return t&&e&&(o=!0,s=r.getDraggedItemType(),a=r.getDraggedItem(),c={x:t.x-n.x,y:t.y-n.y},u={x:e.x-n.x,y:e.y-n.y}),{isDragging:o,draggedItemType:s,draggedItem:a,initialOffset:c,currentOffset:u}},handleStoreChangeInDragLayerMixin:function(){this.isMounted()&&this.setState(this.getStateForDragLayerMixin())},componentDidMount:function(){i.addChangeListener(this.handleStoreChangeInDragLayerMixin),r.addChangeListener(this.handleStoreChangeInDragLayerMixin)},componentWillUnmount:function(){i.removeChangeListener(this.handleStoreChangeInDragLayerMixin),r.removeChangeListener(this.handleStoreChangeInDragLayerMixin)}};t.exports=o},function(t,e,n){"use strict";var r=n(42),i="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o={componentDidMount:function(){this._cachedImages={},this._readyImages={},this.preloadImages()},componentDidUpdate:function(){this.preloadImages()},componentWillUnmount:function(){for(var t in this._cachedImages)this._cachedImages[t].src=i;this._cachedImages={}},hasPreloadedImage:function(t){return!!this._readyImages[t]},getPreloadedImage:function(t){return this.hasPreloadedImage(t)?this._cachedImages[t]:void 0},preloadImages:function(){var t=this.getImageUrlsToPreload();t.forEach(this.preloadImage)},preloadImage:function(t){var e=this;if(t&&!this._cachedImages[t]){var n=new Image;n.onload=function(){e.isMounted()&&(e._readyImages[t]=!0)},n.onerror=function(){e.isMounted()&&delete e._cachedImages[t]},n.src=t,this._cachedImages[t]=n}},getDragImageScale:r};t.exports=o},function(t,e,n){"use strict";var r=n(17),i=n(6),o={canDrag:function(){return!0},beginDrag:function(){r(!1,"Drag source must contain a method called beginDrag. See https://github.com/gaearon/react-dnd#drag-source-api")},endDrag:i};t.exports=o},function(t,e,n){"use strict";var r=n(6),i={canDrop:function(){return!0},getDropEffect:function(t,e){return e[0]},enter:r,over:r,leave:r,acceptDrop:r};t.exports=i},function(t,e,n){"use strict";var r=n(11),i={getCurrentOffsetDelta:function(){var t=r.getInitialOffsetFromClient(),e=r.getCurrentOffsetFromClient();return{x:e.x-t.x,y:e.y-t.y}}};t.exports=i},function(t,e,n){"use strict";var r=n(6),i={canDrop:function(){return!0},getDropEffect:function(t){return t[0]},enter:r,over:r,leave:r,acceptDrop:r};t.exports=i},function(t,e,n){"use strict";function r(t,e,n,r,a,c){try{t.setData("application/json",{})}catch(u){}if(i(n)&&t.setDragImage){var f=o(e,n,r,a);t.setDragImage(n,f.x,f.y)}t.effectAllowed=s(c)}var i=n(45),o=n(41),s=n(40);t.exports=r},function(t,e,n){"use strict";function r(t,e){D(e&&"string"==typeof e,"Expected item type to be a non-empty string. See %s",t.constructor.displayName)}function i(t,e){var n=t.constructor.displayName;D(t._dragSources[e],'There is no drag source for "%s" registered in %s. Have you forgotten to register it? See configureDragDrop in %s',e,n,n)}function o(t,e){var n=t.constructor.displayName;D(t._dropTargets[e],'There is no drop target for "%s" registered in %s. Have you forgotten to register it? See configureDragDrop in %s',e,n,n)}function s(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;n>i;i++)r[i-2]=arguments[i];return e.constructor._legacyConfigureDragDrop?t.apply(e,r):t.call.apply(t,[null,e].concat(r))}function a(t){function e(e){0===a&&t.setup(e),a++}function n(e){a--,0===a&&t.teardown(e)}var a=0;return{getInitialState:function(){var t={ownDraggedItemType:null,currentDropEffect:null};return y(t,this.getStateForDragDropMixin())},getActiveDropTargetType:function(){var t=this.state,e=t.draggedItemType,n=t.draggedItem,r=t.ownDraggedItemType,i=this._dropTargets[e];if(!i)return null;if(e===r)return null;var o=i.canDrop;return s(o,this,n)?e:null},isAnyDropTargetActive:function(t){return t.indexOf(this.getActiveDropTargetType())>-1},getStateForDragDropMixin:function(){return{draggedItem:u.getDraggedItem(),draggedItemType:u.getDraggedItemType()}},getDragState:function(t){return r(this,t),i(this,t),{isDragging:this.state.ownDraggedItemType===t}},getDropState:function(t){r(this,t),o(this,t);var e=this.getActiveDropTargetType()===t,n=!!this.state.currentDropEffect;return{isDragging:e,isHovering:e&&n}},componentWillMount:function(){this._monitor=new g,this._dragSources={},this._dropTargets={},this.configureDragDrop?(m(this.constructor._legacyConfigureDragDrop,'%s declares configureDragDrop as an instance method, which is deprecated and will be removed in next version. Move configureDragDrop to statics and change all methods inside it to accept component as first parameter instead of using "this".',this.constructor.displayName),this.constructor._legacyConfigureDragDrop=!0,this.configureDragDrop(this.registerDragDropItemTypeHandlers)):this.constructor.configureDragDrop?this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers,f):D(this.constructor.configureDragDrop,"%s must implement static configureDragDrop(register, context) to use DragDropMixin",this.constructor.displayName)},componentDidMount:function(){e(this),u.addChangeListener(this.handleStoreChangeInDragDropMixin)},componentWillUnmount:function(){n(this),u.removeChangeListener(this.handleStoreChangeInDragDropMixin)},registerDragDropItemTypeHandlers:function(t,e){r(this,t);var n=e.dragSource,i=e.dropTarget;n&&(D(!this._dragSources[t],"Drag source for %s specified twice. See configureDragDrop in %s",t,this.constructor.displayName),this._dragSources[t]=x(n,p)),i&&(D(!this._dropTargets[t],"Drop target for %s specified twice. See configureDragDrop in %s",t,this.constructor.displayName),this._dropTargets[t]=x(i,this.constructor._legacyConfigureDragDrop?d:l))},handleStoreChangeInDragDropMixin:function(){this.isMounted()&&this.setState(this.getStateForDragDropMixin())},dragSourceFor:function(e){return r(this,e),i(this,e),t.getDragSourceProps(this,e)},handleDragStart:function(e,n){var r=this,i=this._dragSources[e],o=i.canDrag,a=i.beginDrag;if(!s(o,this,n))return void n.preventDefault();var f,g=s(a,this,n),p=g.item,l=g.dragPreview,d=g.dragAnchors,v=g.effectsAllowed,m=this.getDOMNode(),y=m.getBoundingClientRect(),x=t.getOffsetFromClient(this,n);f={x:x.x-y.left,y:x.y-y.top},v||(v=[h.MOVE]),D(_(v)&&v.length>0,"Expected effectsAllowed to be non-empty array"),D(w(p),'Expected return value of beginDrag to contain "item" object'),t.beginDrag(this,n,m,l,d,f,v),c.startDragging(e,p,v,x,f),setTimeout(function(){r.isMounted()&&u.getDraggedItem()===p&&r.setState({ownDraggedItemType:e})})},handleDragEnd:function(e,n){t.endDrag(this);var r=this._dragSources[e].endDrag,i=u.getDropEffect();c.endDragging(),this.isMounted()&&this.setState({ownDraggedItemType:null}),s(r,this,i,n)},dropTargetFor:function(){for(var e=this,n=arguments.length,i=Array(n),s=0;n>s;s++)i[s]=arguments[s];return i.forEach(function(t){r(e,t),o(e,t)}),t.getDropTargetProps(this,i)},handleDragEnter:function(t,e){if(this.isAnyDropTargetActive(t)&&this._monitor.enter(e.target)){e.preventDefault();var n=this._dropTargets[this.state.draggedItemType],r=n.enter,i=n.getDropEffect,o=u.getEffectsAllowed();v(e)&&(o=[h.COPY]);var a=s(i,this,o);a&&D(o.indexOf(a)>-1,"Effect %s supplied by drop target is not one of the effects allowed by drag source: %s",a,o.join(", ")),this.setState({currentDropEffect:a}),s(r,this,this.state.draggedItem,e)}},handleDragOver:function(e,n){if(this.isAnyDropTargetActive(e)){n.preventDefault();{var r=this._dropTargets[this.state.draggedItemType],i=r.over;r.getDropEffect}s(i,this,this.state.draggedItem,n),t.dragOver(this,n,this.state.currentDropEffect||"move")}},handleDragLeave:function(t,e){if(this.isAnyDropTargetActive(t)&&this._monitor.leave(e.target)){this.setState({currentDropEffect:null});var n=this._dropTargets[this.state.draggedItemType].leave;s(n,this,this.state.draggedItem,e)}},handleDrop:function(t,e){if(this.isAnyDropTargetActive(t)){e.preventDefault();var n=this.state.draggedItem,r=this._dropTargets[this.state.draggedItemType].acceptDrop,i=this.state.currentDropEffect,o=!!u.getDropEffect();v(e)&&(n={files:Array.prototype.slice.call(e.dataTransfer.files)}),this._monitor.reset(),o||c.recordDrop(i),this.setState({currentDropEffect:null}),s(r,this,n,e,o,u.getDropEffect())}}}}{var c=n(18),u=n(12),f=n(35),g=n(22),h=n(9),p=n(33),l=n(34),d=n(36),v=n(24),D=n(17),m=n(76),y=n(16),x=n(68),_=n(5),w=n(2);n(6)}t.exports=a},function(t){"use strict";function e(t,e){return-1!==t.indexOf(e,t.length-e.length)}t.exports=e},function(t,e,n){"use strict";function r(t){var e=t.indexOf(i.COPY)>-1,n=t.indexOf(i.MOVE)>-1,r=t.indexOf(i.LINK)>-1;return e&&n&&r?"all":e&&n?"copyMove":r&&n?"linkMove":e&&r?"copyLink":e?"copy":n?"move":r?"link":"none"}var i=n(9);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){n=n||{};var a=t.offsetWidth,c=t.offsetHeight,u=e instanceof Image,f=u?e.width:a,g=u?e.height:c,h=n.horizontal||i.CENTER,p=n.vertical||o.CENTER,l=r.x,d=r.y;switch(s()&&(g/=window.devicePixelRatio,f/=window.devicePixelRatio),h){case i.LEFT:break;case i.CENTER:l*=f/a;break;case i.RIGHT:l=f-f*(1-l/a)}switch(p){case o.TOP:break;case o.CENTER:d*=g/c;break;case o.BOTTOM:d=g-g*(1-d/c)}return s()&&(d+=(window.devicePixelRatio-1)*g),{x:l,y:d}}var i=n(19),o=n(21),s=n(13);t.exports=r},function(t,e,n){"use strict";function r(){return i()||o()?window.devicePixelRatio:1}var i=n(43),o=n(13);t.exports=r},function(t){"use strict";function e(){return/firefox/i.test(navigator.userAgent)}t.exports=e},function(t){"use strict";function e(){return"WebkitAppearance"in document.documentElement.style}t.exports=e},function(t,e,n){"use strict";function r(t){return t?i()&&t instanceof Image&&o(t.src,".gif")?!1:!0:!1}var i=n(13),o=n(39);t.exports=r},function(t,e,n){t.exports.Dispatcher=n(47)},function(t,e,n){"use strict";function r(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=n(48),o=1,s="ID_";r.prototype.register=function(t){var e=s+o++;return this.$Dispatcher_callbacks[e]=t,e},r.prototype.unregister=function(t){i(this.$Dispatcher_callbacks[t],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t),delete this.$Dispatcher_callbacks[t]},r.prototype.waitFor=function(t){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var n=t[e];this.$Dispatcher_isPending[n]?i(this.$Dispatcher_isHandled[n],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(i(this.$Dispatcher_callbacks[n],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this.$Dispatcher_invokeCallback(n))}},r.prototype.dispatch=function(t){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(t);try{for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]||this.$Dispatcher_invokeCallback(e)}finally{this.$Dispatcher_stopDispatching()}},r.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},r.prototype.$Dispatcher_invokeCallback=function(t){this.$Dispatcher_isPending[t]=!0,this.$Dispatcher_callbacks[t](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[t]=!0},r.prototype.$Dispatcher_startDispatching=function(t){for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]=!1,this.$Dispatcher_isHandled[e]=!1;this.$Dispatcher_pendingPayload=t,this.$Dispatcher_isDispatching=!0},r.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},t.exports=r},function(t){"use strict";var e=function(t,e,n,r,i,o,s,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[f++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t,e,n){function r(){return o(i(arguments,!1,!0))}var i=n(57),o=n(60);t.exports=r},function(t,e,n){function r(t){return i(t,o(arguments,1))}var i=n(56),o=n(58);t.exports=r},function(t,e,n){(function(e){function r(t){var e=t?t.length:0;for(this.data={hash:a(null),set:new s};e--;)this.push(t[e])}var i=n(62),o=n(3),s=o(s=e.Set)&&s,a=o(a=Object.create)&&a;r.prototype.push=i,t.exports=r}).call(e,function(){return this}())},function(t){function e(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}t.exports=e},function(t){function e(t,e){return"undefined"==typeof t?e:t}t.exports=e},function(t,e,n){function r(t,e,n){var r=o(e);if(!n)return i(e,t,r);for(var s=-1,a=r.length;++s<a;){var c=r[s],u=t[c],f=n(u,e[c],c,t,e);(f===f?f===u:u!==u)&&("undefined"!=typeof u||c in t)||(t[c]=f)}return t}var i=n(55),o=n(69);t.exports=r},function(t){function e(t,e,n){n||(n=e,e={});for(var r=-1,i=n.length;++r<i;){var o=n[r];e[o]=t[o]}return e}t.exports=e},function(t,e,n){function r(t,e){var n=t?t.length:0,r=[];if(!n)return r;var a=-1,c=i,u=!0,f=u&&e.length>=200&&s(e),g=e.length;f&&(c=o,u=!1,e=f);t:for(;++a<n;){var h=t[a];if(u&&h===h){for(var p=g;p--;)if(e[p]===h)continue t;r.push(h)}else c(e,h)<0&&r.push(h)}return r}var i=n(25),o=n(26),s=n(27);t.exports=r},function(t,e,n){function r(t,e,n,c){for(var u=(c||0)-1,f=t.length,g=-1,h=[];++u<f;){var p=t[u];if(a(p)&&s(p.length)&&(o(p)||i(p))){e&&(p=r(p,e,n));var l=-1,d=p.length;for(h.length+=d;++l<d;)h[++g]=p[l]}else n||(h[++g]=p)}return h}var i=n(15),o=n(5),s=n(1),a=n(4);t.exports=r},function(t){function e(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),n="undefined"==typeof n||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}t.exports=e},function(t){function e(t){return"string"==typeof t?t:null==t?"":t+""}t.exports=e},function(t,e,n){function r(t,e){var n=-1,r=i,a=t.length,c=!0,u=c&&a>=200,f=u&&s(),g=[];f?(r=o,c=!1):(u=!1,f=e?[]:g);t:for(;++n<a;){var h=t[n],p=e?e(h,n,t):h;if(c&&h===h){for(var l=f.length;l--;)if(f[l]===p)continue t;e&&f.push(p),g.push(h)}else r(f,p)<0&&((e||u)&&f.push(p),g.push(h))}return g}var i=n(25),o=n(26),s=n(27);t.exports=r},function(t,e,n){function r(t,e,n){if("function"!=typeof t)return i;if("undefined"==typeof e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}var i=n(73);t.exports=r},function(t,e,n){function r(t){var e=this.data;"string"==typeof t||i(t)?e.set.add(t):e.hash[t]=!0}var i=n(2);t.exports=r},function(t,e,n){function r(t){return function(){var e=arguments.length,n=arguments[0];if(2>e||null==n)return n;if(e>3&&o(arguments[1],arguments[2],arguments[3])&&(e=2),e>3&&"function"==typeof arguments[e-2])var r=i(arguments[--e-1],arguments[e--],5);else e>2&&"function"==typeof arguments[e-1]&&(r=arguments[--e]);for(var s=0;++s<e;){var a=arguments[s];a&&t(n,a,r)}return n}}var i=n(61),o=n(65);t.exports=r},function(t){function e(t,e,n){for(var r=t.length,i=n?e||r:(e||0)-1;n?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}t.exports=e},function(t,e,n){function r(t,e,n){if(!s(n))return!1;var r=typeof e;if("number"==r)var a=n.length,c=o(a)&&i(e,a);else c="string"==r&&e in n;return c&&n[e]===t}var i=n(14),o=n(1),s=n(2);t.exports=r},function(t,e,n){function r(t){for(var e=c(t),n=e.length,r=n&&t.length,f=r&&a(r)&&(o(t)||u.nonEnumArgs&&i(t)),h=-1,p=[];++h<n;){var l=e[h];(f&&s(l,r)||g.call(t,l))&&p.push(l)}return p}var i=n(15),o=n(5),s=n(14),a=n(1),c=n(70),u=n(28),f=Object.prototype,g=f.hasOwnProperty;t.exports=r},function(t,e,n){var r=n(54),i=n(63),o=i(r);t.exports=o},function(t,e,n){function r(t){if(null==t)return t;var e=i(arguments);return e.push(s),o.apply(void 0,e)}var i=n(52),o=n(67),s=n(53);t.exports=r},function(t,e,n){var r=n(1),i=n(3),o=n(2),s=n(66),a=i(a=Object.keys)&&a,c=a?function(t){if(t)var e=t.constructor,n=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n&&r(n)?s(t):o(t)?a(t):[]}:s;t.exports=c},function(t,e,n){function r(t){if(null==t)return[];c(t)||(t=Object(t));var e=t.length;e=e&&a(e)&&(o(t)||u.nonEnumArgs&&i(t))&&e||0;for(var n=t.constructor,r=-1,f="function"==typeof n&&n.prototype===t,h=Array(e),p=e>0;++r<e;)h[r]=r+"";for(var l in t)p&&s(l,e)||"constructor"==l&&(f||!g.call(t,l))||h.push(l);return h}var i=n(15),o=n(5),s=n(14),a=n(1),c=n(2),u=n(28),f=Object.prototype,g=f.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){return t=i(t),t&&s.test(t)?t.replace(o,"\\$&"):t}var i=n(59),o=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(o.source);t.exports=r},function(t){function e(t){return function(){return t}}t.exports=e},function(t){function e(t){return t}t.exports=e},function(t){function e(t){return function(){return t}}function n(){}n.thatReturns=e,n.thatReturnsFalse=e(!1),n.thatReturnsTrue=e(!0),n.thatReturnsNull=e(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n},function(t){"use strict";function e(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}t.exports=e},function(t,e,n){"use strict";var r=n(74),i=r;t.exports=i},function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function r(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!r(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,r,s,a,c,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],o(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,a=new Array(s-1),c=1;s>c;c++)a[c-1]=arguments[c];r.apply(this,a)}else if(i(r)){for(s=arguments.length,a=new Array(s-1),c=1;s>c;c++)a[c-1]=arguments[c];for(u=r.slice(),s=u.length,c=0;s>c;c++)u[c].apply(this,a)}return!0},e.prototype.addListener=function(t,r){var s;if(!n(r))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(r.listener)?r.listener:r),this._events[t]?i(this._events[t])?this._events[t].push(r):this._events[t]=[this._events[t],r]:this._events[t]=r,i(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},e.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.ReactDND=e():t.ReactDND=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(30),i=r.HTML5,o=n(37);t.exports={DragDropMixin:o(i),ImagePreloaderMixin:n(32),DragLayerMixin:n(31),HorizontalDragAnchors:n(19),VerticalDragAnchors:n(21),NativeDragItemTypes:n(20),DropEffects:n(8)}},function(t){function e(t){return"number"==typeof t&&t>-1&&t%1==0&&n>=t}var n=Math.pow(2,53)-1;t.exports=e},function(t){function e(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}t.exports=e},function(t,e,n){function r(t){return null==t?!1:f.call(t)==s?g.test(u.call(t)):o(t)&&a.test(t)||!1}var i=n(70),o=n(4),s="[object Function]",a=/^\[object .+?Constructor\]$/,c=Object.prototype,u=Function.prototype.toString,f=c.toString,g=RegExp("^"+i(f).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t){function e(t){return t&&"object"==typeof t||!1}t.exports=e},function(t,e,n){var r=n(1),i=n(3),o=n(4),s="[object Array]",a=Object.prototype,c=a.toString,u=i(u=Array.isArray)&&u,f=u||function(t){return o(t)&&r(t.length)&&c.call(t)==s||!1};t.exports=f},function(t,e,n){"use strict";var r=n(17),i=function(t){var e,n={};r(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=i},function(t,e,n){"use strict";var r=n(6),i=r({DRAG_START:null,DRAG_END:null,DRAG:null,DROP:null});t.exports=i},function(t){"use strict";var e={COPY:"copy",MOVE:"move",LINK:"link"};t.exports=e},function(t,e,n){"use strict";var r=n(45).Dispatcher,i=n(16),o=i(new r,{handleAction:function(t){this.dispatch({action:t})}});t.exports=o},function(t,e,n){"use strict";var r=n(9),i=n(7),o=n(23),s=null,a=null,c=null,u=o({getInitialOffsetFromContainer:function(){return s},getInitialOffsetFromClient:function(){return a},getCurrentOffsetFromClient:function(){return c}});u.dispatchToken=r.register(function(t){var e=t.action;switch(e.type){case i.DRAG_START:s=e.offsetFromContainer,a=e.offsetFromClient,c=e.offsetFromClient,u.emitChange();break;case i.DRAG:c=e.offsetFromClient,u.emitChange();break;case i.DRAG_END:c=null,c=null,u.emitChange()}}),t.exports=u},function(t,e,n){"use strict";var r=n(9),i=n(7),o=n(10),s=n(23),a=null,c=null,u=null,f=null,g=s({isDragging:function(){return!!a},getEffectsAllowed:function(){return u},getDropEffect:function(){return f},getDraggedItem:function(){return a},getDraggedItemType:function(){return c}});g.dispatchToken=r.register(function(t){r.waitFor([o.dispatchToken]);var e=t.action;switch(e.type){case i.DRAG_START:f=null,a=e.item,c=e.itemType,u=e.effectsAllowed,g.emitChange();break;case i.DROP:f=e.dropEffect,g.emitChange();break;case i.DRAG_END:a=null,c=null,u=null,f=null,g.emitChange()}}),t.exports=g},function(t){"use strict";function e(){return!!window.safari}t.exports=e},function(t){function e(t,e){return t=+t,e=null==e?n:e,t>-1&&t%1==0&&e>t}var n=Math.pow(2,53)-1;t.exports=e},function(t,e,n){function r(t){var e=o(t)?t.length:void 0;return i(e)&&c.call(t)==s||!1}var i=n(1),o=n(4),s="[object Arguments]",a=Object.prototype,c=a.toString;t.exports=r},function(t){function e(){}t.exports=e},function(t){function e(t){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(t),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i){var o=Object(i);for(var s in o)n.call(o,s)&&(e[s]=o[s])}}return e}t.exports=e},function(t){"use strict";var e=function(t,e,n,r,i,o,s,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[f++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t,e,n){"use strict";var r=n(9),i=n(7),o={startDragging:function(t,e,n,o,s){r.handleAction({type:i.DRAG_START,itemType:t,item:e,effectsAllowed:n,offsetFromClient:o,offsetFromContainer:s})},drag:function(t){r.handleAction({type:i.DRAG,offsetFromClient:t})},recordDrop:function(t){r.handleAction({type:i.DROP,dropEffect:t})},endDragging:function(){r.handleAction({type:i.DRAG_END})}};t.exports=o},function(t,e,n){"use strict";var r=n(6),i=r({LEFT:null,CENTER:null,RIGHT:null});t.exports=i},function(t,e,n){"use strict";var r=(n(6),{FILE:"__NATIVE_FILE__"});t.exports=r},function(t,e,n){"use strict";var r=n(6),i=r({TOP:null,CENTER:null,BOTTOM:null});t.exports=i},function(t,e,n){"use strict";var r=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=n(48),s=n(49),a=function(){function t(){i(this,t),this._entered=[]}return r(t,null,{enter:{value:function(t){return this._entered=o(this._entered.filter(function(e){return document.body.contains(e)&&(!e.contains||e.contains(t))}),[t]),1===this._entered.length},writable:!0,configurable:!0},leave:{value:function(t){return this._entered=s(this._entered.filter(function(t){return document.body.contains(t)}),t),0===this._entered.length},writable:!0,configurable:!0},reset:{value:function(){this._entered=[]},writable:!0,configurable:!0}}),t}();t.exports=a},function(t,e,n){"use strict";function r(t){var e=o({emitChange:function(){this.emit(s)},addChangeListener:function(t){this.on(s,t)},removeChangeListener:function(t){this.removeListener(s,t)}},t,i.prototype);return e.setMaxListeners(0),e}var i=n(74).EventEmitter,o=n(16),s="change";t.exports=r},function(t){"use strict";function e(t){if(!t.dataTransfer)return!1;var e=Array.prototype.slice.call(t.dataTransfer.types);return-1!==e.indexOf("Files")}t.exports=e},function(t,e,n){function r(t,e,n){if(e!==e)return i(t,n);for(var r=(n||0)-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}var i=n(63);t.exports=r},function(t,e,n){function r(t,e){var n=t.data,r="string"==typeof e||i(e)?n.set.has(e):n.hash[e];return r?0:-1}var i=n(2);t.exports=r},function(t,e,n){(function(e){var r=n(50),i=n(71),o=n(3),s=o(s=e.Set)&&s,a=o(a=Object.create)&&a,c=a&&s?function(t){return new r(t)}:i(null);t.exports=c}).call(e,function(){return this}())},function(t,e,n){(function(e){var r=n(3),i=/\bthis\b/,o=Object.prototype,s=(s=e.window)&&s.document,a=o.propertyIsEnumerable,c={};!function(){c.funcDecomp=!r(e.WinRTError)&&i.test(function(){return this}),c.funcNames="string"==typeof Function.name;try{c.dom=11===s.createDocumentFragment().nodeType}catch(t){c.dom=!1}try{c.nonEnumArgs=!a.call(arguments,1)}catch(t){c.nonEnumArgs=!0}}(0,0),t.exports=c}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}function i(){if(!p){var t=r(g);p=!w(h,t)}return p}function o(){if(l&&!document.body.contains(g)){var t=m.getDraggedItemType();l.handleDragEnd(t,null)}}function s(t){x(t)&&t.preventDefault()}function a(t){t.preventDefault();var e=T.enter(t.target);e&&x(t)&&v.startDragging(D.FILE,null)}function c(t){s(t);var e=b.getOffsetFromClient(l,t);v.drag(e),d&&(t.dataTransfer.dropEffect=d,d=null),g&&E()&&i()&&t.preventDefault()}function u(t){s(t);var e=T.leave(t.target);e&&x(t)&&v.endDragging()}function f(t){s(t),T.reset(),x(t)&&v.endDragging(),o()}var g,l,h,p,d,v=n(18),m=n(11),D=n(20),y=n(22),x=n(24),_=n(36),w=n(73),E=n(43),T=new y,b={setup:function(){"undefined"!=typeof window&&(window.addEventListener("dragenter",a),window.addEventListener("dragover",c),window.addEventListener("dragleave",u),window.addEventListener("drop",f))},teardown:function(){"undefined"!=typeof window&&(window.removeEventListener("dragenter",a),window.removeEventListener("dragover",c),window.removeEventListener("dragleave",u),window.removeEventListener("drop",f))},beginDrag:function(t,e,n,i,s,a,c){var u=e.nativeEvent,f=u.dataTransfer,d=u.target;_(f,n,i,s,a,c),l=t,g=d,h=r(d),p=!1,window.addEventListener("mousemove",o,!0)},endDrag:function(){g=null,l=null,h=null,p=!1,window.removeEventListener("mousemove",o,!0)},dragOver:function(t,e,n){d||(d=n)},getDragSourceProps:function(t,e){return{draggable:!0,onDragStart:t.handleDragStart.bind(t,e),onDragEnd:t.handleDragEnd.bind(t,e)}},getDropTargetProps:function(t,e){return{onDragEnter:t.handleDragEnter.bind(t,e),onDragOver:t.handleDragOver.bind(t,e),onDragLeave:t.handleDragLeave.bind(t,e),onDrop:t.handleDrop.bind(t,e)}},getOffsetFromClient:function(t,e){return{x:e.clientX,y:e.clientY}}};t.exports=b},function(t,e,n){"use strict";t.exports={HTML5:n(29)}},function(t,e,n){"use strict";var r=n(11),i=n(10),o={getInitialState:function(){return this.getStateForDragLayerMixin()},getDragLayerState:function(){var t=this.state,e=t.isDragging,n=t.draggedItemType,r=t.draggedItem,i=t.initialOffset,o=t.currentOffset;return{isDragging:e,draggedItemType:n,draggedItem:r,initialOffset:i,currentOffset:o}},getStateForDragLayerMixin:function(){var t=i.getInitialOffsetFromClient(),e=i.getCurrentOffsetFromClient(),n=i.getInitialOffsetFromContainer(),o=!1,s=null,a=null,c=null,u=null;return t&&e&&(o=!0,s=r.getDraggedItemType(),a=r.getDraggedItem(),c={x:t.x-n.x,y:t.y-n.y},u={x:e.x-n.x,y:e.y-n.y}),{isDragging:o,draggedItemType:s,draggedItem:a,initialOffset:c,currentOffset:u}},handleStoreChangeInDragLayerMixin:function(){this.isMounted()&&this.setState(this.getStateForDragLayerMixin())},componentDidMount:function(){i.addChangeListener(this.handleStoreChangeInDragLayerMixin),r.addChangeListener(this.handleStoreChangeInDragLayerMixin)},componentWillUnmount:function(){i.removeChangeListener(this.handleStoreChangeInDragLayerMixin),r.removeChangeListener(this.handleStoreChangeInDragLayerMixin)}};t.exports=o},function(t,e,n){"use strict";var r=n(41),i="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o={componentDidMount:function(){this._cachedImages={},this._readyImages={},this.preloadImages()},componentDidUpdate:function(){this.preloadImages()},componentWillUnmount:function(){for(var t in this._cachedImages)this._cachedImages[t].src=i;this._cachedImages={}},hasPreloadedImage:function(t){return!!this._readyImages[t]},getPreloadedImage:function(t){return this.hasPreloadedImage(t)?this._cachedImages[t]:void 0},preloadImages:function(){var t=this.getImageUrlsToPreload();t.forEach(this.preloadImage)},preloadImage:function(t){var e=this;if(t&&!this._cachedImages[t]){var n=new Image;n.onload=function(){e.isMounted()&&(e._readyImages[t]=!0)},n.onerror=function(){e.isMounted()&&delete e._cachedImages[t]},n.src=t,this._cachedImages[t]=n}},getDragImageScale:r};t.exports=o},function(t,e,n){"use strict";var r=n(17),i=n(15),o={canDrag:function(){return!0},beginDrag:function(){r(!1,"Drag source must contain a method called beginDrag. See https://github.com/gaearon/react-dnd#drag-source-api")},endDrag:i};t.exports=o},function(t,e,n){"use strict";var r=n(15),i={canDrop:function(){return!0},getDropEffect:function(t,e){return e[0]},enter:r,over:r,leave:r,acceptDrop:r};t.exports=i},function(t,e,n){"use strict";var r=n(10),i={getCurrentOffsetDelta:function(){var t=r.getInitialOffsetFromClient(),e=r.getCurrentOffsetFromClient();return{x:e.x-t.x,y:e.y-t.y}}};t.exports=i},function(t,e,n){"use strict";function r(t,e,n,r,a,c){try{t.setData("application/json",{})}catch(u){}if(i(n)&&t.setDragImage){var f=o(e,n,r,a);t.setDragImage(n,f.x,f.y)}t.effectAllowed=s(c)}var i=n(44),o=n(40),s=n(39);t.exports=r},function(t,e,n){"use strict";function r(t,e){d(e&&"string"==typeof e,"Expected item type to be a non-empty string. See %s",t.constructor.displayName)}function i(t,e){var n=t.constructor.displayName;d(t._dragSources[e],'There is no drag source for "%s" registered in %s. Have you forgotten to register it? See configureDragDrop in %s',e,n,n)}function o(t,e){var n=t.constructor.displayName;d(t._dropTargets[e],'There is no drop target for "%s" registered in %s. Have you forgotten to register it? See configureDragDrop in %s',e,n,n)}function s(t){function e(e){0===s&&t.setup(e),s++}function n(e){s--,0===s&&t.teardown(e)}var s=0;return{getInitialState:function(){var t={ownDraggedItemType:null,currentDropEffect:null};return v(t,this.getStateForDragDropMixin())},getActiveDropTargetType:function(){var t=this.state,e=t.draggedItemType,n=t.draggedItem,r=t.ownDraggedItemType,i=this._dropTargets[e];if(!i)return null;if(e===r)return null;var o=i.canDrop;return o(this,n)?e:null},isAnyDropTargetActive:function(t){return t.indexOf(this.getActiveDropTargetType())>-1},getStateForDragDropMixin:function(){return{draggedItem:c.getDraggedItem(),draggedItemType:c.getDraggedItemType()}},getDragState:function(t){return r(this,t),i(this,t),{isDragging:this.state.ownDraggedItemType===t}},getDropState:function(t){r(this,t),o(this,t);var e=this.getActiveDropTargetType()===t,n=!!this.state.currentDropEffect;return{isDragging:e,isHovering:e&&n}},componentWillMount:function(){this._monitor=new f,this._dragSources={},this._dropTargets={},d(this.constructor.configureDragDrop,"%s must implement static configureDragDrop(register, context) to use DragDropMixin",this.constructor.displayName),this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers,u)},componentDidMount:function(){e(this),c.addChangeListener(this.handleStoreChangeInDragDropMixin)},componentWillUnmount:function(){n(this),c.removeChangeListener(this.handleStoreChangeInDragDropMixin)},registerDragDropItemTypeHandlers:function(t,e){r(this,t);var n=e.dragSource,i=e.dropTarget;n&&(d(!this._dragSources[t],"Drag source for %s specified twice. See configureDragDrop in %s",t,this.constructor.displayName),this._dragSources[t]=m(n,l)),i&&(d(!this._dropTargets[t],"Drop target for %s specified twice. See configureDragDrop in %s",t,this.constructor.displayName),this._dropTargets[t]=m(i,h))},handleStoreChangeInDragDropMixin:function(){this.isMounted()&&this.setState(this.getStateForDragDropMixin())},dragSourceFor:function(e){return r(this,e),i(this,e),t.getDragSourceProps(this,e)},handleDragStart:function(e,n){var r=this,i=this._dragSources[e],o=i.canDrag,s=i.beginDrag;if(!o(this))return void n.preventDefault();var u,f=s(this),l=f.item,h=f.dragPreview,p=f.dragAnchors,v=f.effectsAllowed,m=this.getDOMNode(),x=m.getBoundingClientRect(),_=t.getOffsetFromClient(this,n);u={x:_.x-x.left,y:_.y-x.top},v||(v=[g.MOVE]),d(D(v)&&v.length>0,"Expected effectsAllowed to be non-empty array"),d(y(l),'Expected return value of beginDrag to contain "item" object'),t.beginDrag(this,n,m,h,p,u,v),a.startDragging(e,l,v,_,u),setTimeout(function(){r.isMounted()&&c.getDraggedItem()===l&&r.setState({ownDraggedItemType:e})})},handleDragEnd:function(e){t.endDrag(this);var n=this._dragSources[e].endDrag,r=c.getDropEffect();a.endDragging(),this.isMounted()&&this.setState({ownDraggedItemType:null}),n(this,r)},dropTargetFor:function(){for(var e=this,n=arguments.length,i=Array(n),s=0;n>s;s++)i[s]=arguments[s];return i.forEach(function(t){r(e,t),o(e,t)}),t.getDropTargetProps(this,i)},handleDragEnter:function(t,e){if(this.isAnyDropTargetActive(t)&&this._monitor.enter(e.target)){e.preventDefault();var n=this._dropTargets[this.state.draggedItemType],r=n.enter,i=n.getDropEffect,o=c.getEffectsAllowed();p(e)&&(o=[g.COPY]);var s=i(this,o);s&&d(o.indexOf(s)>-1,"Effect %s supplied by drop target is not one of the effects allowed by drag source: %s",s,o.join(", ")),this.setState({currentDropEffect:s}),r(this,this.state.draggedItem)}},handleDragOver:function(e,n){if(this.isAnyDropTargetActive(e)){n.preventDefault();{var r=this._dropTargets[this.state.draggedItemType],i=r.over;r.getDropEffect}i(this,this.state.draggedItem),t.dragOver(this,n,this.state.currentDropEffect||"move")}},handleDragLeave:function(t,e){if(this.isAnyDropTargetActive(t)&&this._monitor.leave(e.target)){this.setState({currentDropEffect:null});var n=this._dropTargets[this.state.draggedItemType].leave;n(this,this.state.draggedItem)}},handleDrop:function(t,e){if(this.isAnyDropTargetActive(t)){e.preventDefault();var n=this.state.draggedItem,r=this._dropTargets[this.state.draggedItemType].acceptDrop,i=this.state.currentDropEffect,o=!!c.getDropEffect();p(e)&&(n={files:Array.prototype.slice.call(e.dataTransfer.files)}),this._monitor.reset(),o||a.recordDrop(i),this.setState({currentDropEffect:null}),r(this,n,o,c.getDropEffect())}}}}{var a=n(18),c=n(11),u=n(35),f=n(22),g=n(8),l=n(33),h=n(34),p=n(24),d=n(17),v=n(16),m=n(67),D=n(5),y=n(2);n(15)}t.exports=s},function(t){"use strict";function e(t,e){return-1!==t.indexOf(e,t.length-e.length)}t.exports=e},function(t,e,n){"use strict";function r(t){var e=t.indexOf(i.COPY)>-1,n=t.indexOf(i.MOVE)>-1,r=t.indexOf(i.LINK)>-1;return e&&n&&r?"all":e&&n?"copyMove":r&&n?"linkMove":e&&r?"copyLink":e?"copy":n?"move":r?"link":"none"}var i=n(8);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){n=n||{};var a=t.offsetWidth,c=t.offsetHeight,u=e instanceof Image,f=u?e.width:a,g=u?e.height:c,l=n.horizontal||i.CENTER,h=n.vertical||o.CENTER,p=r.x,d=r.y;switch(s()&&(g/=window.devicePixelRatio,f/=window.devicePixelRatio),l){case i.LEFT:break;case i.CENTER:p*=f/a;break;case i.RIGHT:p=f-f*(1-p/a)}switch(h){case o.TOP:break;case o.CENTER:d*=g/c;break;case o.BOTTOM:d=g-g*(1-d/c)}return s()&&(d+=(window.devicePixelRatio-1)*g),{x:p,y:d}}var i=n(19),o=n(21),s=n(12);t.exports=r},function(t,e,n){"use strict";function r(){return i()||o()?window.devicePixelRatio:1}var i=n(42),o=n(12);t.exports=r},function(t){"use strict";function e(){return/firefox/i.test(navigator.userAgent)}t.exports=e},function(t){"use strict";function e(){return"WebkitAppearance"in document.documentElement.style}t.exports=e},function(t,e,n){"use strict";function r(t){return t?i()&&t instanceof Image&&o(t.src,".gif")?!1:!0:!1}var i=n(12),o=n(38);t.exports=r},function(t,e,n){t.exports.Dispatcher=n(46)},function(t,e,n){"use strict";function r(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=n(47),o=1,s="ID_";r.prototype.register=function(t){var e=s+o++;return this.$Dispatcher_callbacks[e]=t,e},r.prototype.unregister=function(t){i(this.$Dispatcher_callbacks[t],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",t),delete this.$Dispatcher_callbacks[t]},r.prototype.waitFor=function(t){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var e=0;e<t.length;e++){var n=t[e];this.$Dispatcher_isPending[n]?i(this.$Dispatcher_isHandled[n],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):(i(this.$Dispatcher_callbacks[n],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n),this.$Dispatcher_invokeCallback(n))}},r.prototype.dispatch=function(t){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(t);try{for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]||this.$Dispatcher_invokeCallback(e)}finally{this.$Dispatcher_stopDispatching()}},r.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},r.prototype.$Dispatcher_invokeCallback=function(t){this.$Dispatcher_isPending[t]=!0,this.$Dispatcher_callbacks[t](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[t]=!0},r.prototype.$Dispatcher_startDispatching=function(t){for(var e in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[e]=!1,this.$Dispatcher_isHandled[e]=!1;this.$Dispatcher_pendingPayload=t,this.$Dispatcher_isDispatching=!0},r.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},t.exports=r},function(t){"use strict";var e=function(t,e,n,r,i,o,s,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],f=0;c=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return u[f++]}))}throw c.framesToPop=1,c}};t.exports=e},function(t,e,n){function r(){return o(i(arguments,!1,!0))}var i=n(56),o=n(59);t.exports=r},function(t,e,n){function r(t){return i(t,o(arguments,1))}var i=n(55),o=n(57);t.exports=r},function(t,e,n){(function(e){function r(t){var e=t?t.length:0;for(this.data={hash:a(null),set:new s};e--;)this.push(t[e])}var i=n(61),o=n(3),s=o(s=e.Set)&&s,a=o(a=Object.create)&&a;r.prototype.push=i,t.exports=r}).call(e,function(){return this}())},function(t){function e(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}t.exports=e},function(t){function e(t,e){return"undefined"==typeof t?e:t}t.exports=e},function(t,e,n){function r(t,e,n){var r=o(e);if(!n)return i(e,t,r);for(var s=-1,a=r.length;++s<a;){var c=r[s],u=t[c],f=n(u,e[c],c,t,e);(f===f?f===u:u!==u)&&("undefined"!=typeof u||c in t)||(t[c]=f)}return t}var i=n(54),o=n(68);t.exports=r},function(t){function e(t,e,n){n||(n=e,e={});for(var r=-1,i=n.length;++r<i;){var o=n[r];e[o]=t[o]}return e}t.exports=e},function(t,e,n){function r(t,e){var n=t?t.length:0,r=[];if(!n)return r;var a=-1,c=i,u=!0,f=u&&e.length>=200?s(e):null,g=e.length;f&&(c=o,u=!1,e=f);t:for(;++a<n;){var l=t[a];if(u&&l===l){for(var h=g;h--;)if(e[h]===l)continue t;r.push(l)}else c(e,l)<0&&r.push(l)}return r}var i=n(25),o=n(26),s=n(27);t.exports=r},function(t,e,n){function r(t,e,n,c){for(var u=(c||0)-1,f=t.length,g=-1,l=[];++u<f;){var h=t[u];if(a(h)&&s(h.length)&&(o(h)||i(h))){e&&(h=r(h,e,n));var p=-1,d=h.length;for(l.length+=d;++p<d;)l[++g]=h[p]}else n||(l[++g]=h)}return l}var i=n(14),o=n(5),s=n(1),a=n(4);t.exports=r},function(t){function e(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),n="undefined"==typeof n||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}t.exports=e},function(t){function e(t){return"string"==typeof t?t:null==t?"":t+""}t.exports=e},function(t,e,n){function r(t,e){var n=-1,r=i,a=t.length,c=!0,u=c&&a>=200,f=u?s():null,g=[];f?(r=o,c=!1):(u=!1,f=e?[]:g);t:for(;++n<a;){var l=t[n],h=e?e(l,n,t):l;if(c&&l===l){for(var p=f.length;p--;)if(f[p]===h)continue t;e&&f.push(h),g.push(l)}else r(f,h)<0&&((e||u)&&f.push(h),g.push(l))}return g}var i=n(25),o=n(26),s=n(27);t.exports=r},function(t,e,n){function r(t,e,n){if("function"!=typeof t)return i;if("undefined"==typeof e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,s){return t.call(e,n,r,i,o,s)}}return function(){return t.apply(e,arguments)}}var i=n(72);t.exports=r},function(t,e,n){function r(t){var e=this.data;"string"==typeof t||i(t)?e.set.add(t):e.hash[t]=!0}var i=n(2);t.exports=r},function(t,e,n){function r(t){return function(){var e=arguments.length,n=arguments[0];if(2>e||null==n)return n;if(e>3&&o(arguments[1],arguments[2],arguments[3])&&(e=2),e>3&&"function"==typeof arguments[e-2])var r=i(arguments[--e-1],arguments[e--],5);else e>2&&"function"==typeof arguments[e-1]&&(r=arguments[--e]);for(var s=0;++s<e;){var a=arguments[s];a&&t(n,a,r)}return n}}var i=n(60),o=n(64);t.exports=r},function(t){function e(t,e,n){for(var r=t.length,i=n?e||r:(e||0)-1;n?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}t.exports=e},function(t,e,n){function r(t,e,n){if(!s(n))return!1;var r=typeof e;if("number"==r)var a=n.length,c=o(a)&&i(e,a);else c="string"==r&&e in n;if(c){var u=n[e];return t===t?t===u:u!==u}return!1}var i=n(13),o=n(1),s=n(2);t.exports=r},function(t,e,n){function r(t){for(var e=c(t),n=e.length,r=n&&t.length,f=r&&a(r)&&(o(t)||u.nonEnumArgs&&i(t)),l=-1,h=[];++l<n;){var p=e[l];(f&&s(p,r)||g.call(t,p))&&h.push(p)}return h}var i=n(14),o=n(5),s=n(13),a=n(1),c=n(69),u=n(28),f=Object.prototype,g=f.hasOwnProperty;t.exports=r},function(t,e,n){var r=n(53),i=n(62),o=i(r);t.exports=o},function(t,e,n){function r(t){if(null==t)return t;var e=i(arguments);return e.push(s),o.apply(void 0,e)}var i=n(51),o=n(66),s=n(52);t.exports=r},function(t,e,n){var r=n(1),i=n(3),o=n(2),s=n(65),a=i(a=Object.keys)&&a,c=a?function(t){if(t)var e=t.constructor,n=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n&&r(n)?s(t):o(t)?a(t):[]}:s;t.exports=c},function(t,e,n){function r(t){if(null==t)return[];c(t)||(t=Object(t));var e=t.length;e=e&&a(e)&&(o(t)||u.nonEnumArgs&&i(t))&&e||0;for(var n=t.constructor,r=-1,f="function"==typeof n&&n.prototype===t,l=Array(e),h=e>0;++r<e;)l[r]=r+"";for(var p in t)h&&s(p,e)||"constructor"==p&&(f||!g.call(t,p))||l.push(p);return l}var i=n(14),o=n(5),s=n(13),a=n(1),c=n(2),u=n(28),f=Object.prototype,g=f.hasOwnProperty;t.exports=r},function(t,e,n){function r(t){return t=i(t),t&&s.test(t)?t.replace(o,"\\$&"):t}var i=n(58),o=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(o.source);t.exports=r},function(t){function e(t){return function(){return t}}t.exports=e},function(t){function e(t){return t}t.exports=e},function(t){"use strict";function e(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}t.exports=e},function(t){function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function r(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=e,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(t){if(!r(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},e.prototype.emit=function(t){var e,r,s,a,c,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],o(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(s=arguments.length,a=new Array(s-1),c=1;s>c;c++)a[c-1]=arguments[c];r.apply(this,a)}else if(i(r)){for(s=arguments.length,a=new Array(s-1),c=1;s>c;c++)a[c-1]=arguments[c];for(u=r.slice(),s=u.length,c=0;s>c;c++)u[c].apply(this,a)}return!0},e.prototype.addListener=function(t,r){var s;if(!n(r))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(r.listener)?r.listener:r),this._events[t]?i(this._events[t])?this._events[t].push(r):this._events[t]=[this._events[t],r]:this._events[t]=r,i(this._events[t])&&!this._events[t].warned){var s;s=o(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},e.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},e.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},e.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},e.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}}])}); |
# API | ||
Something changed? See [Upgrade Guide](https://github.com/gaearon/react-dnd/blob/master/docs/UPGRADE_GUIDE.md). | ||
## `require('react-dnd')` | ||
@@ -24,3 +26,3 @@ | ||
##### `beginDrag(component: ReactComponent, e: SyntheticEvent)` | ||
##### `beginDrag(component: ReactComponent)` | ||
@@ -41,7 +43,7 @@ Return value must contain `item: Object` representing your data. Other fields are optional: | ||
##### `canDrag(component: ReactComponent, e: SyntheticEvent)` | ||
##### `canDrag(component: ReactComponent)` | ||
Optionally decide whether to allow dragging. Default implementation returns `true`. | ||
##### `endDrag(component: ReactComponent, effect: DropEffect?, e: SyntheticEvent)` | ||
##### `endDrag(component: ReactComponent, effect: DropEffect?)` | ||
@@ -52,7 +54,7 @@ Optionally handle the end of dragging operation. `effect` is falsy if item was dropped outside compatible drop targets, or if the drop target returned `null` from `getDropEffect()`. | ||
##### `enter(component: ReactComponent, item: Object, e: SyntheticEvent)` | ||
##### `enter(component: ReactComponent, item: Object)` | ||
##### `leave(component: ReactComponent, item: Object, e: SyntheticEvent)` | ||
##### `leave(component: ReactComponent, item: Object)` | ||
##### `over(component: ReactComponent, item: Object, e: SyntheticEvent)` | ||
##### `over(component: ReactComponent, item: Object)` | ||
@@ -63,4 +65,2 @@ You can use these methods to perform side effects in response to changing drag state. For example, you might use `over` for reordering items when they overlap. | ||
Note that you **don't** need to call `preventDefault` in any of these methods. Most of the times it's better that you don't use `e` argument at all, as it may be deprecated later. | ||
##### `canDrop(component: ReactComponent, item: Object): Boolean` | ||
@@ -74,3 +74,3 @@ | ||
##### `acceptDrop(component: ReactComponent, item: Object, e: SyntheticEvent, isHandled: bool, effect: DropEffect?)` | ||
##### `acceptDrop(component: ReactComponent, item: Object, isHandled: bool, effect: DropEffect?)` | ||
@@ -77,0 +77,0 @@ Optionally implement this method to perform some action when drop occurs. `isHandled` is `true` if some child drop target has already handled the drop. `effect` is the drop effect you returned from `getDropEffect`, or if `isHandled` is `true`, drop effect specified by the child drop target that has already handled the drop. |
@@ -246,2 +246,2 @@ ### Simple Drag Source | ||
* `dropTargetFor(...types)` allows to specify several types at once, so one drop zone can catch many different types. | ||
* When you need more fine-grained control, most methods are passed drag event that caused them as the last parameter. | ||
* Use `context` (second parameter on `configureDragDrop`) to query mouse position delta. |
@@ -40,3 +40,3 @@ 'use strict'; | ||
dropTarget: { | ||
acceptDrop(component, item, e) { | ||
acceptDrop(component, item) { | ||
var delta = context.getCurrentOffsetDelta(), | ||
@@ -43,0 +43,0 @@ left = Math.round(item.left + delta.x), |
@@ -37,3 +37,3 @@ 'use strict'; | ||
dragSource: { | ||
beginDrag(component, e) { | ||
beginDrag(component) { | ||
return { | ||
@@ -40,0 +40,0 @@ effectAllowed: DropEffects.MOVE, |
@@ -10,6 +10,4 @@ 'use strict'; | ||
DefaultDropTarget = require('./DefaultDropTarget'), | ||
LegacyDefaultDropTarget = require('./LegacyDefaultDropTarget'), | ||
isFileDragDropEvent = require('./isFileDragDropEvent'), | ||
invariant = require('react/lib/invariant'), | ||
warning = require('react/lib/warning'), | ||
assign = require('react/lib/Object.assign'), | ||
@@ -57,10 +55,2 @@ defaults = require('lodash/object/defaults'), | ||
function callDragDropLifecycle(func, component, ...rest) { | ||
if (component.constructor._legacyConfigureDragDrop) { | ||
return func.apply(component, rest); | ||
} | ||
return func.call(null, component, ...rest); | ||
} | ||
function createDragDropMixin(backend) { | ||
@@ -109,3 +99,3 @@ var refs = 0; | ||
var { canDrop } = dropTarget; | ||
return callDragDropLifecycle(canDrop, this, draggedItem) ? draggedItemType : null; | ||
return canDrop(this, draggedItem) ? draggedItemType : null; | ||
}, | ||
@@ -151,21 +141,9 @@ | ||
if (this.configureDragDrop) { | ||
warning( | ||
this.constructor._legacyConfigureDragDrop, | ||
'%s declares configureDragDrop as an instance method, which is deprecated and will be removed in next version. ' + | ||
'Move configureDragDrop to statics and change all methods inside it to accept component as first parameter instead of using "this".', | ||
this.constructor.displayName | ||
); | ||
invariant( | ||
this.constructor.configureDragDrop, | ||
'%s must implement static configureDragDrop(register, context) to use DragDropMixin', | ||
this.constructor.displayName | ||
); | ||
this.constructor._legacyConfigureDragDrop = true; | ||
this.configureDragDrop(this.registerDragDropItemTypeHandlers); | ||
} else if (this.constructor.configureDragDrop) { | ||
this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers, DragDropContext); | ||
} else { | ||
invariant( | ||
this.constructor.configureDragDrop, | ||
'%s must implement static configureDragDrop(register, context) to use DragDropMixin', | ||
this.constructor.displayName | ||
); | ||
} | ||
this.constructor.configureDragDrop(this.registerDragDropItemTypeHandlers, DragDropContext); | ||
}, | ||
@@ -207,6 +185,3 @@ | ||
this._dropTargets[type] = defaults( | ||
dropTarget, | ||
this.constructor._legacyConfigureDragDrop ? LegacyDefaultDropTarget : DefaultDropTarget | ||
); | ||
this._dropTargets[type] = defaults(dropTarget, DefaultDropTarget); | ||
} | ||
@@ -231,3 +206,3 @@ }, | ||
if (!callDragDropLifecycle(canDrag, this, e)) { | ||
if (!canDrag(this)) { | ||
e.preventDefault(); | ||
@@ -237,3 +212,3 @@ return; | ||
var { item, dragPreview, dragAnchors, effectsAllowed } = callDragDropLifecycle(beginDrag, this, e), | ||
var { item, dragPreview, dragAnchors, effectsAllowed } = beginDrag(this), | ||
containerNode = this.getDOMNode(), | ||
@@ -291,3 +266,3 @@ containerRect = containerNode.getBoundingClientRect(), | ||
callDragDropLifecycle(endDrag, this, effect, e); | ||
endDrag(this, effect); | ||
}, | ||
@@ -325,3 +300,3 @@ | ||
var dropEffect = callDragDropLifecycle(getDropEffect, this, effectsAllowed); | ||
var dropEffect = getDropEffect(this, effectsAllowed); | ||
if (dropEffect) { | ||
@@ -340,3 +315,3 @@ invariant( | ||
callDragDropLifecycle(enter, this, this.state.draggedItem, e); | ||
enter(this, this.state.draggedItem); | ||
}, | ||
@@ -352,3 +327,3 @@ | ||
var { over, getDropEffect } = this._dropTargets[this.state.draggedItemType]; | ||
callDragDropLifecycle(over, this, this.state.draggedItem, e); | ||
over(this, this.state.draggedItem); | ||
@@ -373,3 +348,3 @@ // Don't use `none` because this will prevent browser from firing `dragend` | ||
var { leave } = this._dropTargets[this.state.draggedItemType]; | ||
callDragDropLifecycle(leave, this, this.state.draggedItem, e); | ||
leave(this, this.state.draggedItem); | ||
}, | ||
@@ -407,3 +382,3 @@ | ||
callDragDropLifecycle(acceptDrop, this, item, e, isHandled, DragOperationStore.getDropEffect()); | ||
acceptDrop(this, item, isHandled, DragOperationStore.getDropEffect()); | ||
} | ||
@@ -410,0 +385,0 @@ }; |
{ | ||
"name": "react-dnd", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"description": "Drag and drop for React with full DOM control", | ||
@@ -5,0 +5,0 @@ "main": "dist-modules/index.js", |
@@ -1,6 +0,6 @@ | ||
react-dnd | ||
React DnD | ||
========= | ||
[![Join the chat at https://gitter.im/gaearon/react-dnd](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gaearon/react-dnd?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
eve | ||
Drag and drop for React with full DOM control. | ||
@@ -19,3 +19,3 @@ | ||
#### [See it in action!](http://gaearon.github.io/react-dnd/) | ||
#### [See it in action!](http://gaearon.github.io/react-dnd/) ([Source](https://github.com/gaearon/react-dnd/tree/master/examples)) | ||
@@ -50,2 +50,6 @@ Demo contains a variety of things you can implement with this library, including: | ||
### SemVer | ||
We plan to follow SemVer after 1.0. Before 1.0, minor version bumps may contain breaking changes. Breaking changes will be documented in the **[Upgrade Guide](https://github.com/gaearon/react-dnd/blob/master/docs/UPGRADE_GUIDE.md)**. | ||
### API Reference | ||
@@ -89,3 +93,3 @@ | ||
* [Stampsy](http://stampsy.com), where it was originally developed, is using react-dnd for the post editor. | ||
* [Stampsy](http://stampsy.com), where it was originally developed, is using React DnD for the post editor. | ||
* [Add your company!](https://github.com/gaearon/react-dnd/edit/master/README.md) | ||
@@ -92,0 +96,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2274001
105
4268