react-draggable
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "react-draggable", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"homepage": "https://github.com/mzabriskie/react-draggable", | ||
@@ -5,0 +5,0 @@ "authors": [ |
# Changelog | ||
### 3.0.3 (Aug 31, 2017) | ||
- Bugfix: Fix deprecation warnings caused by `import * as React` (Flow best practice). | ||
- See https://github.com/facebook/react/issues/10583 | ||
### 3.0.2 (Aug 22, 2017) | ||
@@ -4,0 +9,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("react-dom"),require("react")):"function"==typeof define&&define.amd?define(["react-dom","react"],factory):"object"==typeof exports?exports.ReactDraggable=factory(require("react-dom"),require("react")):root.ReactDraggable=factory(root.ReactDOM,root.React)}(this,function(__WEBPACK_EXTERNAL_MODULE_4__,__WEBPACK_EXTERNAL_MODULE_6__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=12)}([function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=function(array,callback){for(var i=0,length=array.length;i<length;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]},exports.isFunction=function(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)},exports.isNum=function(num){return"number"==typeof num&&!isNaN(num)},exports.int=function(a){return parseInt(a,10)},exports.dontSetMe=function(props,propName,componentName){if(props[propName])return new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child.")}},function(module,exports,__webpack_require__){"use strict";function makeEmptyFunction(arg){return function(){return arg}}var emptyFunction=function(){};emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg},module.exports=emptyFunction},function(module,exports,__webpack_require__){"use strict";var validateFormat=function(format){};"production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&(validateFormat=function(format){if(void 0===format)throw new Error("invariant requires an error message argument")}),module.exports=function(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;(error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}))).name="Invariant Violation"}throw error.framesToPop=1,error}}},function(module,exports,__webpack_require__){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_4__},function(module,exports,__webpack_require__){"use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function matchesSelector(el,selector){return matchesSelectorFunc||(matchesSelectorFunc=(0,_shims.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return(0,_shims.isFunction)(el[method])})),el[matchesSelectorFunc].call(el,selector)}function addClassName(el,className){el.classList?el.classList.add(className):el.className.match(new RegExp("(?:^|\\s)"+className+"(?!\\S)"))||(el.className+=" "+className)}function removeClassName(el,className){el.classList?el.classList.remove(className):el.className=el.className.replace(new RegExp("(?:^|\\s)"+className+"(?!\\S)","g"),"")}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports.matchesSelector=matchesSelector,exports.matchesSelectorAndParentsTo=function(el,selector,baseNode){var node=el;do{if(matchesSelector(node,selector))return!0;if(node===baseNode)return!1;node=node.parentNode}while(node);return!1},exports.addEvent=function(el,event,handler){el&&(el.attachEvent?el.attachEvent("on"+event,handler):el.addEventListener?el.addEventListener(event,handler,!0):el["on"+event]=handler)},exports.removeEvent=function(el,event,handler){el&&(el.detachEvent?el.detachEvent("on"+event,handler):el.removeEventListener?el.removeEventListener(event,handler,!0):el["on"+event]=null)},exports.outerHeight=function(node){var height=node.clientHeight,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return height+=(0,_shims.int)(computedStyle.borderTopWidth),height+=(0,_shims.int)(computedStyle.borderBottomWidth)},exports.outerWidth=function(node){var width=node.clientWidth,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return width+=(0,_shims.int)(computedStyle.borderLeftWidth),width+=(0,_shims.int)(computedStyle.borderRightWidth)},exports.innerHeight=function(node){var height=node.clientHeight,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return height-=(0,_shims.int)(computedStyle.paddingTop),height-=(0,_shims.int)(computedStyle.paddingBottom)},exports.innerWidth=function(node){var width=node.clientWidth,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return width-=(0,_shims.int)(computedStyle.paddingLeft),width-=(0,_shims.int)(computedStyle.paddingRight)},exports.offsetXYFromParent=function(evt,offsetParent){var offsetParentRect=offsetParent===offsetParent.ownerDocument.body?{left:0,top:0}:offsetParent.getBoundingClientRect();return{x:evt.clientX+offsetParent.scrollLeft-offsetParentRect.left,y:evt.clientY+offsetParent.scrollTop-offsetParentRect.top}},exports.createCSSTransform=function(_ref){var x=_ref.x,y=_ref.y;return _defineProperty({},(0,_getPrefix.browserPrefixToKey)("transform",_getPrefix2.default),"translate("+x+"px,"+y+"px)")},exports.createSVGTransform=function(_ref3){return"translate("+_ref3.x+","+_ref3.y+")"},exports.getTouch=function(e,identifier){return e.targetTouches&&(0,_shims.findInArray)(e.targetTouches,function(t){return identifier===t.identifier})||e.changedTouches&&(0,_shims.findInArray)(e.changedTouches,function(t){return identifier===t.identifier})},exports.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},exports.addUserSelectStyles=function(doc){var styleEl=doc.getElementById("react-draggable-style-el");styleEl||((styleEl=doc.createElement("style")).type="text/css",styleEl.id="react-draggable-style-el",styleEl.innerHTML=".react-draggable-transparent-selection *::-moz-selection {background: transparent;}\n",styleEl.innerHTML+=".react-draggable-transparent-selection *::selection {background: transparent;}\n",doc.getElementsByTagName("head")[0].appendChild(styleEl)),doc.body&&addClassName(doc.body,"react-draggable-transparent-selection")},exports.removeUserSelectStyles=function(doc){doc.body&&removeClassName(doc.body,"react-draggable-transparent-selection"),window.getSelection().removeAllRanges()},exports.styleHacks=function(){var childStyle=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _extends({touchAction:"none"},childStyle)},exports.addClassName=addClassName,exports.removeClassName=removeClassName;var _shims=__webpack_require__(0),_getPrefix=__webpack_require__(18),_getPrefix2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_getPrefix),matchesSelectorFunc=""},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_6__},function(module,exports,__webpack_require__){if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV){var REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;module.exports=__webpack_require__(14)(function(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE},!0)}else module.exports=__webpack_require__(16)()},function(module,exports,__webpack_require__){"use strict";var warning=__webpack_require__(1);if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV){var printWarning=function(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});"undefined"!=typeof console&&console.error(message);try{throw new Error(message)}catch(x){}};warning=function(condition,format){if(void 0===format)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==format.indexOf("Failed Composite propType: ")&&!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)args[_key2-2]=arguments[_key2];printWarning.apply(void 0,[format].concat(args))}}}module.exports=warning},function(module,exports,__webpack_require__){"use strict";function cloneBounds(bounds){return{left:bounds.left,top:bounds.top,right:bounds.right,bottom:bounds.bottom}}function findDOMNode(draggable){var node=_reactDom2.default.findDOMNode(draggable);if(!node)throw new Error("<DraggableCore>: Unmounted during event!");return node}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBoundPosition=function(draggable,x,y){if(!draggable.props.bounds)return[x,y];var bounds=draggable.props.bounds;bounds="string"==typeof bounds?bounds:cloneBounds(bounds);var node=findDOMNode(draggable);if("string"==typeof bounds){var ownerDocument=node.ownerDocument,ownerWindow=ownerDocument.defaultView,boundNode=void 0;if(!((boundNode="parent"===bounds?node.parentNode:ownerDocument.querySelector(bounds))instanceof HTMLElement))throw new Error('Bounds selector "'+bounds+'" could not find an element.');var nodeStyle=ownerWindow.getComputedStyle(node),boundNodeStyle=ownerWindow.getComputedStyle(boundNode);bounds={left:-node.offsetLeft+(0,_shims.int)(boundNodeStyle.paddingLeft)+(0,_shims.int)(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims.int)(boundNodeStyle.paddingTop)+(0,_shims.int)(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(boundNode)-(0,_domFns.outerWidth)(node)-node.offsetLeft+(0,_shims.int)(boundNodeStyle.paddingRight)-(0,_shims.int)(nodeStyle.marginRight),bottom:(0,_domFns.innerHeight)(boundNode)-(0,_domFns.outerHeight)(node)-node.offsetTop+(0,_shims.int)(boundNodeStyle.paddingBottom)-(0,_shims.int)(nodeStyle.marginBottom)}}return(0,_shims.isNum)(bounds.right)&&(x=Math.min(x,bounds.right)),(0,_shims.isNum)(bounds.bottom)&&(y=Math.min(y,bounds.bottom)),(0,_shims.isNum)(bounds.left)&&(x=Math.max(x,bounds.left)),(0,_shims.isNum)(bounds.top)&&(y=Math.max(y,bounds.top)),[x,y]},exports.snapToGrid=function(grid,pendingX,pendingY){return[Math.round(pendingX/grid[0])*grid[0],Math.round(pendingY/grid[1])*grid[1]]},exports.canDragX=function(draggable){return"both"===draggable.props.axis||"x"===draggable.props.axis},exports.canDragY=function(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis},exports.getControlPosition=function(e,touchIdentifier,draggableCore){var touchObj="number"==typeof touchIdentifier?(0,_domFns.getTouch)(e,touchIdentifier):null;if("number"==typeof touchIdentifier&&!touchObj)return null;var node=findDOMNode(draggableCore),offsetParent=draggableCore.props.offsetParent||node.offsetParent||node.ownerDocument.body;return(0,_domFns.offsetXYFromParent)(touchObj||e,offsetParent)},exports.createCoreData=function(draggable,x,y){var state=draggable.state,isStart=!(0,_shims.isNum)(state.lastX),node=findDOMNode(draggable);return isStart?{node:node,deltaX:0,deltaY:0,lastX:x,lastY:y,x:x,y:y}:{node:node,deltaX:x-state.lastX,deltaY:y-state.lastY,lastX:state.lastX,lastY:state.lastY,x:x,y:y}},exports.createDraggableData=function(draggable,coreData){return{node:coreData.node,x:draggable.state.x+coreData.deltaX,y:draggable.state.y+coreData.deltaY,deltaX:coreData.deltaX,deltaY:coreData.deltaY,lastX:draggable.state.x,lastY:draggable.state.y}};var _shims=__webpack_require__(0),_reactDom2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(4)),_domFns=__webpack_require__(5)},function(module,exports,__webpack_require__){"use strict";(function(process){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),React=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(__webpack_require__(6)),_propTypes2=_interopRequireDefault(__webpack_require__(7)),_reactDom2=_interopRequireDefault(__webpack_require__(4)),_domFns=__webpack_require__(5),_positionFns=__webpack_require__(9),_shims=__webpack_require__(0),_log2=_interopRequireDefault(__webpack_require__(11)),eventsFor={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},dragEventFor=eventsFor.mouse,DraggableCore=function(_React$Component){function DraggableCore(){var _ref,_temp,_this,_ret;_classCallCheck(this,DraggableCore);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=DraggableCore.__proto__||Object.getPrototypeOf(DraggableCore)).call.apply(_ref,[this].concat(args))),_this.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null},_this.handleDragStart=function(e){if(_this.props.onMouseDown(e),!_this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;var thisNode=_reactDom2.default.findDOMNode(_this);if(!thisNode||!thisNode.ownerDocument||!thisNode.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var ownerDocument=thisNode.ownerDocument;if(!(_this.props.disabled||!(e.target instanceof ownerDocument.defaultView.Node)||_this.props.handle&&!(0,_domFns.matchesSelectorAndParentsTo)(e.target,_this.props.handle,thisNode)||_this.props.cancel&&(0,_domFns.matchesSelectorAndParentsTo)(e.target,_this.props.cancel,thisNode))){var touchIdentifier=(0,_domFns.getTouchIdentifier)(e);_this.setState({touchIdentifier:touchIdentifier});var position=(0,_positionFns.getControlPosition)(e,touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2.default)("DraggableCore: handleDragStart: %j",coreEvent),(0,_log2.default)("calling",_this.props.onStart),!1!==_this.props.onStart(e,coreEvent)&&(_this.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)(ownerDocument),_this.setState({dragging:!0,lastX:x,lastY:y}),(0,_domFns.addEvent)(ownerDocument,dragEventFor.move,_this.handleDrag),(0,_domFns.addEvent)(ownerDocument,dragEventFor.stop,_this.handleDragStop))}}},_this.handleDrag=function(e){"touchmove"===e.type&&e.preventDefault();var position=(0,_positionFns.getControlPosition)(e,_this.state.touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y;if(Array.isArray(_this.props.grid)){var _deltaX=x-_this.state.lastX,_deltaY=y-_this.state.lastY,_snapToGrid=(0,_positionFns.snapToGrid)(_this.props.grid,_deltaX,_deltaY),_snapToGrid2=_slicedToArray(_snapToGrid,2);if(_deltaX=_snapToGrid2[0],_deltaY=_snapToGrid2[1],!_deltaX&&!_deltaY)return;x=_this.state.lastX+_deltaX,y=_this.state.lastY+_deltaY}var coreEvent=(0,_positionFns.createCoreData)(_this,x,y);if((0,_log2.default)("DraggableCore: handleDrag: %j",coreEvent),!1!==_this.props.onDrag(e,coreEvent))_this.setState({lastX:x,lastY:y});else try{_this.handleDragStop(new MouseEvent("mouseup"))}catch(err){var event=document.createEvent("MouseEvents");event.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_this.handleDragStop(event)}}},_this.handleDragStop=function(e){if(_this.state.dragging){var position=(0,_positionFns.getControlPosition)(e,_this.state.touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y),thisNode=_reactDom2.default.findDOMNode(_this);thisNode&&_this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(thisNode.ownerDocument),(0,_log2.default)("DraggableCore: handleDragStop: %j",coreEvent),_this.setState({dragging:!1,lastX:NaN,lastY:NaN}),_this.props.onStop(e,coreEvent),thisNode&&((0,_log2.default)("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(thisNode.ownerDocument,dragEventFor.move,_this.handleDrag),(0,_domFns.removeEvent)(thisNode.ownerDocument,dragEventFor.stop,_this.handleDragStop))}}},_this.onMouseDown=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStart(e)},_this.onMouseUp=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStop(e)},_this.onTouchStart=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStart(e)},_this.onTouchEnd=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStop(e)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DraggableCore,React.Component),_createClass(DraggableCore,[{key:"componentWillUnmount",value:function(){var thisNode=_reactDom2.default.findDOMNode(this);if(thisNode){var ownerDocument=thisNode.ownerDocument;(0,_domFns.removeEvent)(ownerDocument,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(ownerDocument,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(ownerDocument,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(ownerDocument,eventsFor.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(ownerDocument)}}},{key:"render",value:function(){return React.cloneElement(React.Children.only(this.props.children),{style:(0,_domFns.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),DraggableCore}();DraggableCore.displayName="DraggableCore",DraggableCore.propTypes={allowAnyClick:_propTypes2.default.bool,disabled:_propTypes2.default.bool,enableUserSelectHack:_propTypes2.default.bool,offsetParent:function(props,propName){if(process.browser&&props[propName]&&1!==props[propName].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_propTypes2.default.arrayOf(_propTypes2.default.number),handle:_propTypes2.default.string,cancel:_propTypes2.default.string,onStart:_propTypes2.default.func,onDrag:_propTypes2.default.func,onStop:_propTypes2.default.func,onMouseDown:_propTypes2.default.func,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe},DraggableCore.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},exports.default=DraggableCore}).call(exports,__webpack_require__(19))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){}},function(module,exports,__webpack_require__){"use strict";var Draggable=__webpack_require__(13).default;module.exports=Draggable,module.exports.default=Draggable,module.exports.DraggableCore=__webpack_require__(10).default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),React=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(__webpack_require__(6)),_propTypes2=_interopRequireDefault(__webpack_require__(7)),_reactDom2=_interopRequireDefault(__webpack_require__(4)),_classnames2=_interopRequireDefault(__webpack_require__(17)),_domFns=__webpack_require__(5),_positionFns=__webpack_require__(9),_shims=__webpack_require__(0),_DraggableCore2=_interopRequireDefault(__webpack_require__(10)),_log2=_interopRequireDefault(__webpack_require__(11)),Draggable=function(_React$Component){function Draggable(props){_classCallCheck(this,Draggable);var _this=_possibleConstructorReturn(this,(Draggable.__proto__||Object.getPrototypeOf(Draggable)).call(this,props));return _this.onDragStart=function(e,coreData){if((0,_log2.default)("Draggable: onDragStart: %j",coreData),!1===_this.props.onStart(e,(0,_positionFns.createDraggableData)(_this,coreData)))return!1;_this.setState({dragging:!0,dragged:!0})},_this.onDrag=function(e,coreData){if(!_this.state.dragging)return!1;(0,_log2.default)("Draggable: onDrag: %j",coreData);var uiData=(0,_positionFns.createDraggableData)(_this,coreData),newState={x:uiData.x,y:uiData.y};if(_this.props.bounds){var _x=newState.x,_y=newState.y;newState.x+=_this.state.slackX,newState.y+=_this.state.slackY;var _getBoundPosition=(0,_positionFns.getBoundPosition)(_this,newState.x,newState.y),_getBoundPosition2=_slicedToArray(_getBoundPosition,2);newState.x=_getBoundPosition2[0],newState.y=_getBoundPosition2[1],newState.slackX=_this.state.slackX+(_x-newState.x),newState.slackY=_this.state.slackY+(_y-newState.y),uiData.x=newState.x,uiData.y=newState.y,uiData.deltaX=newState.x-_this.state.x,uiData.deltaY=newState.y-_this.state.y}if(!1===_this.props.onDrag(e,uiData))return!1;_this.setState(newState)},_this.onDragStop=function(e,coreData){if(!_this.state.dragging)return!1;if(!1===_this.props.onStop(e,(0,_positionFns.createDraggableData)(_this,coreData)))return!1;(0,_log2.default)("Draggable: onDragStop: %j",coreData);var newState={dragging:!1,slackX:0,slackY:0};if(Boolean(_this.props.position)){var _this$props$position=_this.props.position,_x2=_this$props$position.x,_y2=_this$props$position.y;newState.x=_x2,newState.y=_y2}_this.setState(newState)},_this.state={dragging:!1,dragged:!1,x:props.position?props.position.x:props.defaultPosition.x,y:props.position?props.position.y:props.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},_this}return _inherits(Draggable,React.Component),_createClass(Draggable,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&_reactDom2.default.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(nextProps){!nextProps.position||this.props.position&&nextProps.position.x===this.props.position.x&&nextProps.position.y===this.props.position.y||this.setState({x:nextProps.position.x,y:nextProps.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var _classNames,style={},svgTransform=null,draggable=!Boolean(this.props.position)||this.state.dragging,position=this.props.position||this.props.defaultPosition,transformOpts={x:(0,_positionFns.canDragX)(this)&&draggable?this.state.x:position.x,y:(0,_positionFns.canDragY)(this)&&draggable?this.state.y:position.y};this.state.isElementSVG?svgTransform=(0,_domFns.createSVGTransform)(transformOpts):style=(0,_domFns.createCSSTransform)(transformOpts);var _props=this.props,defaultClassName=_props.defaultClassName,defaultClassNameDragging=_props.defaultClassNameDragging,defaultClassNameDragged=_props.defaultClassNameDragged,className=(0,_classnames2.default)(this.props.children.props.className||"",defaultClassName,(_classNames={},_defineProperty(_classNames,defaultClassNameDragging,this.state.dragging),_defineProperty(_classNames,defaultClassNameDragged,this.state.dragged),_classNames));return React.createElement(_DraggableCore2.default,_extends({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),React.cloneElement(React.Children.only(this.props.children),{className:className,style:_extends({},this.props.children.props.style,style),transform:svgTransform}))}}]),Draggable}();Draggable.displayName="Draggable",Draggable.propTypes=_extends({},_DraggableCore2.default.propTypes,{axis:_propTypes2.default.oneOf(["both","x","y","none"]),bounds:_propTypes2.default.oneOfType([_propTypes2.default.shape({left:_propTypes2.default.number,right:_propTypes2.default.number,top:_propTypes2.default.number,bottom:_propTypes2.default.number}),_propTypes2.default.string,_propTypes2.default.oneOf([!1])]),defaultClassName:_propTypes2.default.string,defaultClassNameDragging:_propTypes2.default.string,defaultClassNameDragged:_propTypes2.default.string,defaultPosition:_propTypes2.default.shape({x:_propTypes2.default.number,y:_propTypes2.default.number}),position:_propTypes2.default.shape({x:_propTypes2.default.number,y:_propTypes2.default.number}),className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe}),Draggable.defaultProps=_extends({},_DraggableCore2.default.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null}),exports.default=Draggable},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(1),invariant=__webpack_require__(2),warning=__webpack_require__(8),ReactPropTypesSecret=__webpack_require__(3),checkPropTypes=__webpack_require__(15);module.exports=function(isValidElement,throwOnDirectAccess){function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if("function"==typeof iteratorFn)return iteratorFn}function is(x,y){return x===y?0!==x||1/x==1/y:x!==x&&y!==y}function PropTypeError(message){this.message=message,this.stack=""}function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName,location,propFullName,secret){if(componentName=componentName||ANONYMOUS,propFullName=propFullName||propName,secret!==ReactPropTypesSecret)if(throwOnDirectAccess)invariant(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&"undefined"!=typeof console){var cacheKey=componentName+":"+propName;!manualPropTypeCallCache[cacheKey]&&manualPropTypeWarningCount<3&&(warning(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",propFullName,componentName),manualPropTypeCallCache[cacheKey]=!0,manualPropTypeWarningCount++)}return null==props[propName]?isRequired?new PropTypeError(null===props[propName]?"The "+location+" `"+propFullName+"` is marked as required in `"+componentName+"`, but its value is `null`.":"The "+location+" `"+propFullName+"` is marked as required in `"+componentName+"`, but its value is `undefined`."):null:validate(props,propName,componentName,location,propFullName)}if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)var manualPropTypeCallCache={},manualPropTypeWarningCount=0;var chainedCheckType=checkType.bind(null,!1);return chainedCheckType.isRequired=checkType.bind(null,!0),chainedCheckType}function createPrimitiveTypeChecker(expectedType){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName,secret){var propValue=props[propName];return getPropType(propValue)!==expectedType?new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPreciseType(propValue)+"` supplied to `"+componentName+"`, expected `"+expectedType+"`."):null})}function isNode(propValue){switch(typeof propValue){case"number":case"string":case"undefined":return!0;case"boolean":return!propValue;case"object":if(Array.isArray(propValue))return propValue.every(isNode);if(null===propValue||isValidElement(propValue))return!0;var iteratorFn=getIteratorFn(propValue);if(!iteratorFn)return!1;var step,iterator=iteratorFn.call(propValue);if(iteratorFn!==propValue.entries){for(;!(step=iterator.next()).done;)if(!isNode(step.value))return!1}else for(;!(step=iterator.next()).done;){var entry=step.value;if(entry&&!isNode(entry[1]))return!1}return!0;default:return!1}}function isSymbol(propType,propValue){return"symbol"===propType||("Symbol"===propValue["@@toStringTag"]||"function"==typeof Symbol&&propValue instanceof Symbol)}function getPropType(propValue){var propType=typeof propValue;return Array.isArray(propValue)?"array":propValue instanceof RegExp?"object":isSymbol(propType,propValue)?"symbol":propType}function getPreciseType(propValue){if(void 0===propValue||null===propValue)return""+propValue;var propType=getPropType(propValue);if("object"===propType){if(propValue instanceof Date)return"date";if(propValue instanceof RegExp)return"regexp"}return propType}function getPostfixForTypeWarning(value){var type=getPreciseType(value);switch(type){case"array":case"object":return"an "+type;case"boolean":case"date":case"regexp":return"a "+type;default:return type}}function getClassName(propValue){return propValue.constructor&&propValue.constructor.name?propValue.constructor.name:ANONYMOUS}var ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",ANONYMOUS="<<anonymous>>",ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:createChainableTypeChecker(emptyFunction.thatReturnsNull),arrayOf:function(typeChecker){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if("function"!=typeof typeChecker)return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.");var propValue=props[propName];if(!Array.isArray(propValue))return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPropType(propValue)+"` supplied to `"+componentName+"`, expected an array.");for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location,propFullName+"["+i+"]",ReactPropTypesSecret);if(error instanceof Error)return error}return null})},element:function(){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){var propValue=props[propName];return isValidElement(propValue)?null:new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPropType(propValue)+"` supplied to `"+componentName+"`, expected a single ReactElement.")})}(),instanceOf:function(expectedClass){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if(!(props[propName]instanceof expectedClass)){var expectedClassName=expectedClass.name||ANONYMOUS;return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getClassName(props[propName])+"` supplied to `"+componentName+"`, expected instance of `"+expectedClassName+"`.")}return null})},node:function(){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){return isNode(props[propName])?null:new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to `"+componentName+"`, expected a ReactNode.")})}(),objectOf:function(typeChecker){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if("function"!=typeof typeChecker)return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside objectOf.");var propValue=props[propName],propType=getPropType(propValue);if("object"!==propType)return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` supplied to `"+componentName+"`, expected an object.");for(var key in propValue)if(propValue.hasOwnProperty(key)){var error=typeChecker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error instanceof Error)return error}return null})},oneOf:function(expectedValues){return Array.isArray(expectedValues)?createChainableTypeChecker(function(props,propName,componentName,location,propFullName){for(var propValue=props[propName],i=0;i<expectedValues.length;i++)if(is(propValue,expectedValues[i]))return null;return new PropTypeError("Invalid "+location+" `"+propFullName+"` of value `"+propValue+"` supplied to `"+componentName+"`, expected one of "+JSON.stringify(expectedValues)+".")}):("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&warning(!1,"Invalid argument supplied to oneOf, expected an instance of array."),emptyFunction.thatReturnsNull)},oneOfType:function(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers))return"production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&warning(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),emptyFunction.thatReturnsNull;for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if("function"!=typeof checker)return warning(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",getPostfixForTypeWarning(checker),i),emptyFunction.thatReturnsNull}return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){for(var i=0;i<arrayOfTypeCheckers.length;i++)if(null==(0,arrayOfTypeCheckers[i])(props,propName,componentName,location,propFullName,ReactPropTypesSecret))return null;return new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to `"+componentName+"`.")})},shape:function(shapeTypes){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){var propValue=props[propName],propType=getPropType(propValue);if("object"!==propType)return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` supplied to `"+componentName+"`, expected `object`.");for(var key in shapeTypes){var checker=shapeTypes[key];if(checker){var error=checker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error)return error}}return null})}};return PropTypeError.prototype=Error.prototype,ReactPropTypes.checkPropTypes=checkPropTypes,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}},function(module,exports,__webpack_require__){"use strict";if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)var invariant=__webpack_require__(2),warning=__webpack_require__(8),ReactPropTypesSecret=__webpack_require__(3),loggedTypeFailures={};module.exports=function(typeSpecs,values,location,componentName,getStack){if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)for(var typeSpecName in typeSpecs)if(typeSpecs.hasOwnProperty(typeSpecName)){var error;try{invariant("function"==typeof typeSpecs[typeSpecName],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",componentName||"React class",location,typeSpecName),error=typeSpecs[typeSpecName](values,typeSpecName,componentName,location,null,ReactPropTypesSecret)}catch(ex){error=ex}if(warning(!error||error instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",componentName||"React class",location,typeSpecName,typeof error),error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=!0;var stack=getStack?getStack():"";warning(!1,"Failed %s type: %s%s",location,error.message,null!=stack?stack:"")}}}},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(1),invariant=__webpack_require__(2),ReactPropTypesSecret=__webpack_require__(3);module.exports=function(){function shim(props,propName,componentName,location,propFullName,secret){secret!==ReactPropTypesSecret&&invariant(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function getShim(){return shim}shim.isRequired=shim;var ReactPropTypes={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim};return ReactPropTypes.checkPropTypes=emptyFunction,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(arg){var argType=typeof arg;if("string"===argType||"number"===argType)classes.push(arg);else if(Array.isArray(arg))classes.push(classNames.apply(null,arg));else if("object"===argType)for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key)}}return classes.join(" ")}var hasOwn={}.hasOwnProperty;void 0!==module&&module.exports?module.exports=classNames:(__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}()},function(module,exports,__webpack_require__){"use strict";function getPrefix(){var prop=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var style=window.document.documentElement.style;if(prop in style)return"";for(var i=0;i<prefixes.length;i++)if(browserPrefixToKey(prop,prefixes[i])in style)return prefixes[i];return""}function browserPrefixToKey(prop,prefix){return prefix?""+prefix+kebabToTitleCase(prop):prop}function kebabToTitleCase(str){for(var out="",shouldCapitalize=!0,i=0;i<str.length;i++)shouldCapitalize?(out+=str[i].toUpperCase(),shouldCapitalize=!1):"-"===str[i]?shouldCapitalize=!0:out+=str[i];return out}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPrefix=getPrefix,exports.browserPrefixToKey=browserPrefixToKey,exports.browserPrefixToStyle=function(prop,prefix){return prefix?"-"+prefix.toLowerCase()+"-"+prop:prop};var prefixes=["Moz","Webkit","O","ms"];exports.default=getPrefix()},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}}])}); | ||
!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("react-dom"),require("react")):"function"==typeof define&&define.amd?define(["react-dom","react"],factory):"object"==typeof exports?exports.ReactDraggable=factory(require("react-dom"),require("react")):root.ReactDraggable=factory(root.ReactDOM,root.React)}(this,function(__WEBPACK_EXTERNAL_MODULE_4__,__WEBPACK_EXTERNAL_MODULE_6__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=12)}([function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=function(array,callback){for(var i=0,length=array.length;i<length;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]},exports.isFunction=function(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)},exports.isNum=function(num){return"number"==typeof num&&!isNaN(num)},exports.int=function(a){return parseInt(a,10)},exports.dontSetMe=function(props,propName,componentName){if(props[propName])return new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child.")}},function(module,exports,__webpack_require__){"use strict";function makeEmptyFunction(arg){return function(){return arg}}var emptyFunction=function(){};emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg},module.exports=emptyFunction},function(module,exports,__webpack_require__){"use strict";var validateFormat=function(format){};"production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&(validateFormat=function(format){if(void 0===format)throw new Error("invariant requires an error message argument")}),module.exports=function(condition,format,a,b,c,d,e,f){if(validateFormat(format),!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;(error=new Error(format.replace(/%s/g,function(){return args[argIndex++]}))).name="Invariant Violation"}throw error.framesToPop=1,error}}},function(module,exports,__webpack_require__){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_4__},function(module,exports,__webpack_require__){"use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function matchesSelector(el,selector){return matchesSelectorFunc||(matchesSelectorFunc=(0,_shims.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return(0,_shims.isFunction)(el[method])})),el[matchesSelectorFunc].call(el,selector)}function addClassName(el,className){el.classList?el.classList.add(className):el.className.match(new RegExp("(?:^|\\s)"+className+"(?!\\S)"))||(el.className+=" "+className)}function removeClassName(el,className){el.classList?el.classList.remove(className):el.className=el.className.replace(new RegExp("(?:^|\\s)"+className+"(?!\\S)","g"),"")}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target};exports.matchesSelector=matchesSelector,exports.matchesSelectorAndParentsTo=function(el,selector,baseNode){var node=el;do{if(matchesSelector(node,selector))return!0;if(node===baseNode)return!1;node=node.parentNode}while(node);return!1},exports.addEvent=function(el,event,handler){el&&(el.attachEvent?el.attachEvent("on"+event,handler):el.addEventListener?el.addEventListener(event,handler,!0):el["on"+event]=handler)},exports.removeEvent=function(el,event,handler){el&&(el.detachEvent?el.detachEvent("on"+event,handler):el.removeEventListener?el.removeEventListener(event,handler,!0):el["on"+event]=null)},exports.outerHeight=function(node){var height=node.clientHeight,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return height+=(0,_shims.int)(computedStyle.borderTopWidth),height+=(0,_shims.int)(computedStyle.borderBottomWidth)},exports.outerWidth=function(node){var width=node.clientWidth,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return width+=(0,_shims.int)(computedStyle.borderLeftWidth),width+=(0,_shims.int)(computedStyle.borderRightWidth)},exports.innerHeight=function(node){var height=node.clientHeight,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return height-=(0,_shims.int)(computedStyle.paddingTop),height-=(0,_shims.int)(computedStyle.paddingBottom)},exports.innerWidth=function(node){var width=node.clientWidth,computedStyle=node.ownerDocument.defaultView.getComputedStyle(node);return width-=(0,_shims.int)(computedStyle.paddingLeft),width-=(0,_shims.int)(computedStyle.paddingRight)},exports.offsetXYFromParent=function(evt,offsetParent){var offsetParentRect=offsetParent===offsetParent.ownerDocument.body?{left:0,top:0}:offsetParent.getBoundingClientRect();return{x:evt.clientX+offsetParent.scrollLeft-offsetParentRect.left,y:evt.clientY+offsetParent.scrollTop-offsetParentRect.top}},exports.createCSSTransform=function(_ref){var x=_ref.x,y=_ref.y;return _defineProperty({},(0,_getPrefix.browserPrefixToKey)("transform",_getPrefix2.default),"translate("+x+"px,"+y+"px)")},exports.createSVGTransform=function(_ref3){return"translate("+_ref3.x+","+_ref3.y+")"},exports.getTouch=function(e,identifier){return e.targetTouches&&(0,_shims.findInArray)(e.targetTouches,function(t){return identifier===t.identifier})||e.changedTouches&&(0,_shims.findInArray)(e.changedTouches,function(t){return identifier===t.identifier})},exports.getTouchIdentifier=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0},exports.addUserSelectStyles=function(doc){var styleEl=doc.getElementById("react-draggable-style-el");styleEl||((styleEl=doc.createElement("style")).type="text/css",styleEl.id="react-draggable-style-el",styleEl.innerHTML=".react-draggable-transparent-selection *::-moz-selection {background: transparent;}\n",styleEl.innerHTML+=".react-draggable-transparent-selection *::selection {background: transparent;}\n",doc.getElementsByTagName("head")[0].appendChild(styleEl)),doc.body&&addClassName(doc.body,"react-draggable-transparent-selection")},exports.removeUserSelectStyles=function(doc){doc.body&&removeClassName(doc.body,"react-draggable-transparent-selection"),window.getSelection().removeAllRanges()},exports.styleHacks=function(){var childStyle=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _extends({touchAction:"none"},childStyle)},exports.addClassName=addClassName,exports.removeClassName=removeClassName;var _shims=__webpack_require__(0),_getPrefix=__webpack_require__(18),_getPrefix2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(_getPrefix),matchesSelectorFunc=""},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_6__},function(module,exports,__webpack_require__){if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV){var REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;module.exports=__webpack_require__(14)(function(object){return"object"==typeof object&&null!==object&&object.$$typeof===REACT_ELEMENT_TYPE},!0)}else module.exports=__webpack_require__(16)()},function(module,exports,__webpack_require__){"use strict";var warning=__webpack_require__(1);if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV){var printWarning=function(format){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});"undefined"!=typeof console&&console.error(message);try{throw new Error(message)}catch(x){}};warning=function(condition,format){if(void 0===format)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==format.indexOf("Failed Composite propType: ")&&!condition){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)args[_key2-2]=arguments[_key2];printWarning.apply(void 0,[format].concat(args))}}}module.exports=warning},function(module,exports,__webpack_require__){"use strict";function cloneBounds(bounds){return{left:bounds.left,top:bounds.top,right:bounds.right,bottom:bounds.bottom}}function findDOMNode(draggable){var node=_reactDom2.default.findDOMNode(draggable);if(!node)throw new Error("<DraggableCore>: Unmounted during event!");return node}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBoundPosition=function(draggable,x,y){if(!draggable.props.bounds)return[x,y];var bounds=draggable.props.bounds;bounds="string"==typeof bounds?bounds:cloneBounds(bounds);var node=findDOMNode(draggable);if("string"==typeof bounds){var ownerDocument=node.ownerDocument,ownerWindow=ownerDocument.defaultView,boundNode=void 0;if(!((boundNode="parent"===bounds?node.parentNode:ownerDocument.querySelector(bounds))instanceof HTMLElement))throw new Error('Bounds selector "'+bounds+'" could not find an element.');var nodeStyle=ownerWindow.getComputedStyle(node),boundNodeStyle=ownerWindow.getComputedStyle(boundNode);bounds={left:-node.offsetLeft+(0,_shims.int)(boundNodeStyle.paddingLeft)+(0,_shims.int)(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims.int)(boundNodeStyle.paddingTop)+(0,_shims.int)(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(boundNode)-(0,_domFns.outerWidth)(node)-node.offsetLeft+(0,_shims.int)(boundNodeStyle.paddingRight)-(0,_shims.int)(nodeStyle.marginRight),bottom:(0,_domFns.innerHeight)(boundNode)-(0,_domFns.outerHeight)(node)-node.offsetTop+(0,_shims.int)(boundNodeStyle.paddingBottom)-(0,_shims.int)(nodeStyle.marginBottom)}}return(0,_shims.isNum)(bounds.right)&&(x=Math.min(x,bounds.right)),(0,_shims.isNum)(bounds.bottom)&&(y=Math.min(y,bounds.bottom)),(0,_shims.isNum)(bounds.left)&&(x=Math.max(x,bounds.left)),(0,_shims.isNum)(bounds.top)&&(y=Math.max(y,bounds.top)),[x,y]},exports.snapToGrid=function(grid,pendingX,pendingY){return[Math.round(pendingX/grid[0])*grid[0],Math.round(pendingY/grid[1])*grid[1]]},exports.canDragX=function(draggable){return"both"===draggable.props.axis||"x"===draggable.props.axis},exports.canDragY=function(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis},exports.getControlPosition=function(e,touchIdentifier,draggableCore){var touchObj="number"==typeof touchIdentifier?(0,_domFns.getTouch)(e,touchIdentifier):null;if("number"==typeof touchIdentifier&&!touchObj)return null;var node=findDOMNode(draggableCore),offsetParent=draggableCore.props.offsetParent||node.offsetParent||node.ownerDocument.body;return(0,_domFns.offsetXYFromParent)(touchObj||e,offsetParent)},exports.createCoreData=function(draggable,x,y){var state=draggable.state,isStart=!(0,_shims.isNum)(state.lastX),node=findDOMNode(draggable);return isStart?{node:node,deltaX:0,deltaY:0,lastX:x,lastY:y,x:x,y:y}:{node:node,deltaX:x-state.lastX,deltaY:y-state.lastY,lastX:state.lastX,lastY:state.lastY,x:x,y:y}},exports.createDraggableData=function(draggable,coreData){return{node:coreData.node,x:draggable.state.x+coreData.deltaX,y:draggable.state.y+coreData.deltaY,deltaX:coreData.deltaX,deltaY:coreData.deltaY,lastX:draggable.state.x,lastY:draggable.state.y}};var _shims=__webpack_require__(0),_reactDom2=function(obj){return obj&&obj.__esModule?obj:{default:obj}}(__webpack_require__(4)),_domFns=__webpack_require__(5)},function(module,exports,__webpack_require__){"use strict";(function(process){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react2=_interopRequireDefault(__webpack_require__(6)),_propTypes2=_interopRequireDefault(__webpack_require__(7)),_reactDom2=_interopRequireDefault(__webpack_require__(4)),_domFns=__webpack_require__(5),_positionFns=__webpack_require__(9),_shims=__webpack_require__(0),_log2=_interopRequireDefault(__webpack_require__(11)),eventsFor={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},dragEventFor=eventsFor.mouse,DraggableCore=function(_React$Component){function DraggableCore(){var _ref,_temp,_this,_ret;_classCallCheck(this,DraggableCore);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_ref=DraggableCore.__proto__||Object.getPrototypeOf(DraggableCore)).call.apply(_ref,[this].concat(args))),_this.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null},_this.handleDragStart=function(e){if(_this.props.onMouseDown(e),!_this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;var thisNode=_reactDom2.default.findDOMNode(_this);if(!thisNode||!thisNode.ownerDocument||!thisNode.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var ownerDocument=thisNode.ownerDocument;if(!(_this.props.disabled||!(e.target instanceof ownerDocument.defaultView.Node)||_this.props.handle&&!(0,_domFns.matchesSelectorAndParentsTo)(e.target,_this.props.handle,thisNode)||_this.props.cancel&&(0,_domFns.matchesSelectorAndParentsTo)(e.target,_this.props.cancel,thisNode))){var touchIdentifier=(0,_domFns.getTouchIdentifier)(e);_this.setState({touchIdentifier:touchIdentifier});var position=(0,_positionFns.getControlPosition)(e,touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2.default)("DraggableCore: handleDragStart: %j",coreEvent),(0,_log2.default)("calling",_this.props.onStart),!1!==_this.props.onStart(e,coreEvent)&&(_this.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)(ownerDocument),_this.setState({dragging:!0,lastX:x,lastY:y}),(0,_domFns.addEvent)(ownerDocument,dragEventFor.move,_this.handleDrag),(0,_domFns.addEvent)(ownerDocument,dragEventFor.stop,_this.handleDragStop))}}},_this.handleDrag=function(e){"touchmove"===e.type&&e.preventDefault();var position=(0,_positionFns.getControlPosition)(e,_this.state.touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y;if(Array.isArray(_this.props.grid)){var _deltaX=x-_this.state.lastX,_deltaY=y-_this.state.lastY,_snapToGrid=(0,_positionFns.snapToGrid)(_this.props.grid,_deltaX,_deltaY),_snapToGrid2=_slicedToArray(_snapToGrid,2);if(_deltaX=_snapToGrid2[0],_deltaY=_snapToGrid2[1],!_deltaX&&!_deltaY)return;x=_this.state.lastX+_deltaX,y=_this.state.lastY+_deltaY}var coreEvent=(0,_positionFns.createCoreData)(_this,x,y);if((0,_log2.default)("DraggableCore: handleDrag: %j",coreEvent),!1!==_this.props.onDrag(e,coreEvent))_this.setState({lastX:x,lastY:y});else try{_this.handleDragStop(new MouseEvent("mouseup"))}catch(err){var event=document.createEvent("MouseEvents");event.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_this.handleDragStop(event)}}},_this.handleDragStop=function(e){if(_this.state.dragging){var position=(0,_positionFns.getControlPosition)(e,_this.state.touchIdentifier,_this);if(null!=position){var x=position.x,y=position.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y),thisNode=_reactDom2.default.findDOMNode(_this);thisNode&&_this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(thisNode.ownerDocument),(0,_log2.default)("DraggableCore: handleDragStop: %j",coreEvent),_this.setState({dragging:!1,lastX:NaN,lastY:NaN}),_this.props.onStop(e,coreEvent),thisNode&&((0,_log2.default)("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(thisNode.ownerDocument,dragEventFor.move,_this.handleDrag),(0,_domFns.removeEvent)(thisNode.ownerDocument,dragEventFor.stop,_this.handleDragStop))}}},_this.onMouseDown=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStart(e)},_this.onMouseUp=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStop(e)},_this.onTouchStart=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStart(e)},_this.onTouchEnd=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStop(e)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DraggableCore,_react2.default.Component),_createClass(DraggableCore,[{key:"componentWillUnmount",value:function(){var thisNode=_reactDom2.default.findDOMNode(this);if(thisNode){var ownerDocument=thisNode.ownerDocument;(0,_domFns.removeEvent)(ownerDocument,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(ownerDocument,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(ownerDocument,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(ownerDocument,eventsFor.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)(ownerDocument)}}},{key:"render",value:function(){return _react2.default.cloneElement(_react2.default.Children.only(this.props.children),{style:(0,_domFns.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),DraggableCore}();DraggableCore.displayName="DraggableCore",DraggableCore.propTypes={allowAnyClick:_propTypes2.default.bool,disabled:_propTypes2.default.bool,enableUserSelectHack:_propTypes2.default.bool,offsetParent:function(props,propName){if(process.browser&&props[propName]&&1!==props[propName].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_propTypes2.default.arrayOf(_propTypes2.default.number),handle:_propTypes2.default.string,cancel:_propTypes2.default.string,onStart:_propTypes2.default.func,onDrag:_propTypes2.default.func,onStop:_propTypes2.default.func,onMouseDown:_propTypes2.default.func,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe},DraggableCore.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},exports.default=DraggableCore}).call(exports,__webpack_require__(19))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){}},function(module,exports,__webpack_require__){"use strict";var Draggable=__webpack_require__(13).default;module.exports=Draggable,module.exports.default=Draggable,module.exports.DraggableCore=__webpack_require__(10).default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_react2=_interopRequireDefault(__webpack_require__(6)),_propTypes2=_interopRequireDefault(__webpack_require__(7)),_reactDom2=_interopRequireDefault(__webpack_require__(4)),_classnames2=_interopRequireDefault(__webpack_require__(17)),_domFns=__webpack_require__(5),_positionFns=__webpack_require__(9),_shims=__webpack_require__(0),_DraggableCore2=_interopRequireDefault(__webpack_require__(10)),_log2=_interopRequireDefault(__webpack_require__(11)),Draggable=function(_React$Component){function Draggable(props){_classCallCheck(this,Draggable);var _this=_possibleConstructorReturn(this,(Draggable.__proto__||Object.getPrototypeOf(Draggable)).call(this,props));return _this.onDragStart=function(e,coreData){if((0,_log2.default)("Draggable: onDragStart: %j",coreData),!1===_this.props.onStart(e,(0,_positionFns.createDraggableData)(_this,coreData)))return!1;_this.setState({dragging:!0,dragged:!0})},_this.onDrag=function(e,coreData){if(!_this.state.dragging)return!1;(0,_log2.default)("Draggable: onDrag: %j",coreData);var uiData=(0,_positionFns.createDraggableData)(_this,coreData),newState={x:uiData.x,y:uiData.y};if(_this.props.bounds){var _x=newState.x,_y=newState.y;newState.x+=_this.state.slackX,newState.y+=_this.state.slackY;var _getBoundPosition=(0,_positionFns.getBoundPosition)(_this,newState.x,newState.y),_getBoundPosition2=_slicedToArray(_getBoundPosition,2);newState.x=_getBoundPosition2[0],newState.y=_getBoundPosition2[1],newState.slackX=_this.state.slackX+(_x-newState.x),newState.slackY=_this.state.slackY+(_y-newState.y),uiData.x=newState.x,uiData.y=newState.y,uiData.deltaX=newState.x-_this.state.x,uiData.deltaY=newState.y-_this.state.y}if(!1===_this.props.onDrag(e,uiData))return!1;_this.setState(newState)},_this.onDragStop=function(e,coreData){if(!_this.state.dragging)return!1;if(!1===_this.props.onStop(e,(0,_positionFns.createDraggableData)(_this,coreData)))return!1;(0,_log2.default)("Draggable: onDragStop: %j",coreData);var newState={dragging:!1,slackX:0,slackY:0};if(Boolean(_this.props.position)){var _this$props$position=_this.props.position,_x2=_this$props$position.x,_y2=_this$props$position.y;newState.x=_x2,newState.y=_y2}_this.setState(newState)},_this.state={dragging:!1,dragged:!1,x:props.position?props.position.x:props.defaultPosition.x,y:props.position?props.position.y:props.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},_this}return _inherits(Draggable,_react2.default.Component),_createClass(Draggable,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&_reactDom2.default.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(nextProps){!nextProps.position||this.props.position&&nextProps.position.x===this.props.position.x&&nextProps.position.y===this.props.position.y||this.setState({x:nextProps.position.x,y:nextProps.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var _classNames,style={},svgTransform=null,draggable=!Boolean(this.props.position)||this.state.dragging,position=this.props.position||this.props.defaultPosition,transformOpts={x:(0,_positionFns.canDragX)(this)&&draggable?this.state.x:position.x,y:(0,_positionFns.canDragY)(this)&&draggable?this.state.y:position.y};this.state.isElementSVG?svgTransform=(0,_domFns.createSVGTransform)(transformOpts):style=(0,_domFns.createCSSTransform)(transformOpts);var _props=this.props,defaultClassName=_props.defaultClassName,defaultClassNameDragging=_props.defaultClassNameDragging,defaultClassNameDragged=_props.defaultClassNameDragged,className=(0,_classnames2.default)(this.props.children.props.className||"",defaultClassName,(_classNames={},_defineProperty(_classNames,defaultClassNameDragging,this.state.dragging),_defineProperty(_classNames,defaultClassNameDragged,this.state.dragged),_classNames));return _react2.default.createElement(_DraggableCore2.default,_extends({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),_react2.default.cloneElement(_react2.default.Children.only(this.props.children),{className:className,style:_extends({},this.props.children.props.style,style),transform:svgTransform}))}}]),Draggable}();Draggable.displayName="Draggable",Draggable.propTypes=_extends({},_DraggableCore2.default.propTypes,{axis:_propTypes2.default.oneOf(["both","x","y","none"]),bounds:_propTypes2.default.oneOfType([_propTypes2.default.shape({left:_propTypes2.default.number,right:_propTypes2.default.number,top:_propTypes2.default.number,bottom:_propTypes2.default.number}),_propTypes2.default.string,_propTypes2.default.oneOf([!1])]),defaultClassName:_propTypes2.default.string,defaultClassNameDragging:_propTypes2.default.string,defaultClassNameDragged:_propTypes2.default.string,defaultPosition:_propTypes2.default.shape({x:_propTypes2.default.number,y:_propTypes2.default.number}),position:_propTypes2.default.shape({x:_propTypes2.default.number,y:_propTypes2.default.number}),className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe}),Draggable.defaultProps=_extends({},_DraggableCore2.default.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null}),exports.default=Draggable},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(1),invariant=__webpack_require__(2),warning=__webpack_require__(8),ReactPropTypesSecret=__webpack_require__(3),checkPropTypes=__webpack_require__(15);module.exports=function(isValidElement,throwOnDirectAccess){function getIteratorFn(maybeIterable){var iteratorFn=maybeIterable&&(ITERATOR_SYMBOL&&maybeIterable[ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL]);if("function"==typeof iteratorFn)return iteratorFn}function is(x,y){return x===y?0!==x||1/x==1/y:x!==x&&y!==y}function PropTypeError(message){this.message=message,this.stack=""}function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName,location,propFullName,secret){if(componentName=componentName||ANONYMOUS,propFullName=propFullName||propName,secret!==ReactPropTypesSecret)if(throwOnDirectAccess)invariant(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&"undefined"!=typeof console){var cacheKey=componentName+":"+propName;!manualPropTypeCallCache[cacheKey]&&manualPropTypeWarningCount<3&&(warning(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",propFullName,componentName),manualPropTypeCallCache[cacheKey]=!0,manualPropTypeWarningCount++)}return null==props[propName]?isRequired?new PropTypeError(null===props[propName]?"The "+location+" `"+propFullName+"` is marked as required in `"+componentName+"`, but its value is `null`.":"The "+location+" `"+propFullName+"` is marked as required in `"+componentName+"`, but its value is `undefined`."):null:validate(props,propName,componentName,location,propFullName)}if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)var manualPropTypeCallCache={},manualPropTypeWarningCount=0;var chainedCheckType=checkType.bind(null,!1);return chainedCheckType.isRequired=checkType.bind(null,!0),chainedCheckType}function createPrimitiveTypeChecker(expectedType){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName,secret){var propValue=props[propName];return getPropType(propValue)!==expectedType?new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPreciseType(propValue)+"` supplied to `"+componentName+"`, expected `"+expectedType+"`."):null})}function isNode(propValue){switch(typeof propValue){case"number":case"string":case"undefined":return!0;case"boolean":return!propValue;case"object":if(Array.isArray(propValue))return propValue.every(isNode);if(null===propValue||isValidElement(propValue))return!0;var iteratorFn=getIteratorFn(propValue);if(!iteratorFn)return!1;var step,iterator=iteratorFn.call(propValue);if(iteratorFn!==propValue.entries){for(;!(step=iterator.next()).done;)if(!isNode(step.value))return!1}else for(;!(step=iterator.next()).done;){var entry=step.value;if(entry&&!isNode(entry[1]))return!1}return!0;default:return!1}}function isSymbol(propType,propValue){return"symbol"===propType||("Symbol"===propValue["@@toStringTag"]||"function"==typeof Symbol&&propValue instanceof Symbol)}function getPropType(propValue){var propType=typeof propValue;return Array.isArray(propValue)?"array":propValue instanceof RegExp?"object":isSymbol(propType,propValue)?"symbol":propType}function getPreciseType(propValue){if(void 0===propValue||null===propValue)return""+propValue;var propType=getPropType(propValue);if("object"===propType){if(propValue instanceof Date)return"date";if(propValue instanceof RegExp)return"regexp"}return propType}function getPostfixForTypeWarning(value){var type=getPreciseType(value);switch(type){case"array":case"object":return"an "+type;case"boolean":case"date":case"regexp":return"a "+type;default:return type}}function getClassName(propValue){return propValue.constructor&&propValue.constructor.name?propValue.constructor.name:ANONYMOUS}var ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",ANONYMOUS="<<anonymous>>",ReactPropTypes={array:createPrimitiveTypeChecker("array"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:createChainableTypeChecker(emptyFunction.thatReturnsNull),arrayOf:function(typeChecker){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if("function"!=typeof typeChecker)return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.");var propValue=props[propName];if(!Array.isArray(propValue))return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPropType(propValue)+"` supplied to `"+componentName+"`, expected an array.");for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location,propFullName+"["+i+"]",ReactPropTypesSecret);if(error instanceof Error)return error}return null})},element:function(){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){var propValue=props[propName];return isValidElement(propValue)?null:new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getPropType(propValue)+"` supplied to `"+componentName+"`, expected a single ReactElement.")})}(),instanceOf:function(expectedClass){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if(!(props[propName]instanceof expectedClass)){var expectedClassName=expectedClass.name||ANONYMOUS;return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+getClassName(props[propName])+"` supplied to `"+componentName+"`, expected instance of `"+expectedClassName+"`.")}return null})},node:function(){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){return isNode(props[propName])?null:new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to `"+componentName+"`, expected a ReactNode.")})}(),objectOf:function(typeChecker){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){if("function"!=typeof typeChecker)return new PropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside objectOf.");var propValue=props[propName],propType=getPropType(propValue);if("object"!==propType)return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` supplied to `"+componentName+"`, expected an object.");for(var key in propValue)if(propValue.hasOwnProperty(key)){var error=typeChecker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error instanceof Error)return error}return null})},oneOf:function(expectedValues){return Array.isArray(expectedValues)?createChainableTypeChecker(function(props,propName,componentName,location,propFullName){for(var propValue=props[propName],i=0;i<expectedValues.length;i++)if(is(propValue,expectedValues[i]))return null;return new PropTypeError("Invalid "+location+" `"+propFullName+"` of value `"+propValue+"` supplied to `"+componentName+"`, expected one of "+JSON.stringify(expectedValues)+".")}):("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&warning(!1,"Invalid argument supplied to oneOf, expected an instance of array."),emptyFunction.thatReturnsNull)},oneOfType:function(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers))return"production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV&&warning(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),emptyFunction.thatReturnsNull;for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if("function"!=typeof checker)return warning(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",getPostfixForTypeWarning(checker),i),emptyFunction.thatReturnsNull}return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){for(var i=0;i<arrayOfTypeCheckers.length;i++)if(null==(0,arrayOfTypeCheckers[i])(props,propName,componentName,location,propFullName,ReactPropTypesSecret))return null;return new PropTypeError("Invalid "+location+" `"+propFullName+"` supplied to `"+componentName+"`.")})},shape:function(shapeTypes){return createChainableTypeChecker(function(props,propName,componentName,location,propFullName){var propValue=props[propName],propType=getPropType(propValue);if("object"!==propType)return new PropTypeError("Invalid "+location+" `"+propFullName+"` of type `"+propType+"` supplied to `"+componentName+"`, expected `object`.");for(var key in shapeTypes){var checker=shapeTypes[key];if(checker){var error=checker(propValue,key,componentName,location,propFullName+"."+key,ReactPropTypesSecret);if(error)return error}}return null})}};return PropTypeError.prototype=Error.prototype,ReactPropTypes.checkPropTypes=checkPropTypes,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}},function(module,exports,__webpack_require__){"use strict";if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)var invariant=__webpack_require__(2),warning=__webpack_require__(8),ReactPropTypesSecret=__webpack_require__(3),loggedTypeFailures={};module.exports=function(typeSpecs,values,location,componentName,getStack){if("production"!==Object({DRAGGABLE_DEBUG:void 0}).NODE_ENV)for(var typeSpecName in typeSpecs)if(typeSpecs.hasOwnProperty(typeSpecName)){var error;try{invariant("function"==typeof typeSpecs[typeSpecName],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",componentName||"React class",location,typeSpecName),error=typeSpecs[typeSpecName](values,typeSpecName,componentName,location,null,ReactPropTypesSecret)}catch(ex){error=ex}if(warning(!error||error instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",componentName||"React class",location,typeSpecName,typeof error),error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=!0;var stack=getStack?getStack():"";warning(!1,"Failed %s type: %s%s",location,error.message,null!=stack?stack:"")}}}},function(module,exports,__webpack_require__){"use strict";var emptyFunction=__webpack_require__(1),invariant=__webpack_require__(2),ReactPropTypesSecret=__webpack_require__(3);module.exports=function(){function shim(props,propName,componentName,location,propFullName,secret){secret!==ReactPropTypesSecret&&invariant(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function getShim(){return shim}shim.isRequired=shim;var ReactPropTypes={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim};return ReactPropTypes.checkPropTypes=emptyFunction,ReactPropTypes.PropTypes=ReactPropTypes,ReactPropTypes}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes=[],i=0;i<arguments.length;i++){var arg=arguments[i];if(arg){var argType=typeof arg;if("string"===argType||"number"===argType)classes.push(arg);else if(Array.isArray(arg))classes.push(classNames.apply(null,arg));else if("object"===argType)for(var key in arg)hasOwn.call(arg,key)&&arg[key]&&classes.push(key)}}return classes.join(" ")}var hasOwn={}.hasOwnProperty;void 0!==module&&module.exports?module.exports=classNames:(__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(){return classNames}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}()},function(module,exports,__webpack_require__){"use strict";function getPrefix(){var prop=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var style=window.document.documentElement.style;if(prop in style)return"";for(var i=0;i<prefixes.length;i++)if(browserPrefixToKey(prop,prefixes[i])in style)return prefixes[i];return""}function browserPrefixToKey(prop,prefix){return prefix?""+prefix+kebabToTitleCase(prop):prop}function kebabToTitleCase(str){for(var out="",shouldCapitalize=!0,i=0;i<str.length;i++)shouldCapitalize?(out+=str[i].toUpperCase(),shouldCapitalize=!1):"-"===str[i]?shouldCapitalize=!0:out+=str[i];return out}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPrefix=getPrefix,exports.browserPrefixToKey=browserPrefixToKey,exports.browserPrefixToStyle=function(prop,prefix){return prefix?"-"+prefix.toLowerCase()+"-"+prop:prop};var prefixes=["Moz","Webkit","O","ms"];exports.default=getPrefix()},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}}])}); |
// @flow | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -13,2 +13,3 @@ import ReactDOM from 'react-dom'; | ||
import type {DraggableEventHandler} from './utils/types'; | ||
import type {Element as ReactElement} from 'react'; | ||
@@ -304,3 +305,3 @@ type DraggableState = { | ||
render(): React.Element<any> { | ||
render(): ReactElement<any> { | ||
let style = {}, svgTransform = null; | ||
@@ -307,0 +308,0 @@ |
// @flow | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
@@ -12,2 +12,3 @@ import ReactDOM from 'react-dom'; | ||
import type {EventHandler, MouseTouchEvent} from './utils/types'; | ||
import type {Element as ReactElement} from 'react'; | ||
@@ -59,3 +60,3 @@ // Simple abstraction for dragging events names. | ||
cancel: string, | ||
children: React.Element<any>, | ||
children: ReactElement<any>, | ||
disabled: boolean, | ||
@@ -62,0 +63,0 @@ enableUserSelectHack: boolean, |
{ | ||
"name": "react-draggable", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "React draggable component", | ||
@@ -13,3 +13,4 @@ "main": "dist/react-draggable.js", | ||
"build": "make clean build", | ||
"lint": "make lint" | ||
"lint": "make lint", | ||
"flow": "flow" | ||
}, | ||
@@ -16,0 +17,0 @@ "typings": "./typings/index.d.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
3425
441296