(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["ReactDraggable"] = factory(require("react"), require("react-dom")); else root["ReactDraggable"] = factory(root["React"], root["ReactDOM"]); })(self, function(__WEBPACK_EXTERNAL_MODULE__359__, __WEBPACK_EXTERNAL_MODULE__318__) { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 404: /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { DraggableCore: function() { return /* reexport */ DraggableCore; }, "default": function() { return /* binding */ Draggable; } }); // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} var external_commonjs_react_commonjs2_react_amd_react_root_React_ = __webpack_require__(359); // EXTERNAL MODULE: ./node_modules/prop-types/index.js var prop_types = __webpack_require__(697); var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); // EXTERNAL MODULE: external {"commonjs":"react-dom","commonjs2":"react-dom","amd":"react-dom","root":"ReactDOM"} var external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_ = __webpack_require__(318); var external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_); ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.m.js function toVal(mix) { var k, y, str=''; if (typeof mix === 'string' || typeof mix === 'number') { str += mix; } else if (typeof mix === 'object') { if (Array.isArray(mix)) { for (k=0; k < mix.length; k++) { if (mix[k]) { if (y = toVal(mix[k])) { str && (str += ' '); str += y; } } } } else { for (k in mix) { if (mix[k]) { str && (str += ' '); str += k; } } } } return str; } /* harmony default export */ function clsx_m() { var i=0, tmp, x, str=''; while (i < arguments.length) { if (tmp = arguments[i++]) { if (x = toVal(tmp)) { str && (str += ' '); str += x } } } return str; } ;// CONCATENATED MODULE: ./lib/utils/shims.js // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc function findInArray(array /*: Array | TouchList*/, callback /*: Function*/) /*: any*/{ for (let i = 0, length = array.length; i < length; i++) { if (callback.apply(callback, [array[i], i, array])) return array[i]; } } function isFunction(func /*: any*/) /*: boolean %checks*/{ // $FlowIgnore[method-unbinding] return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]'; } function isNum(num /*: any*/) /*: boolean %checks*/{ return typeof num === 'number' && !isNaN(num); } function shims_int(a /*: string*/) /*: number*/{ return parseInt(a, 10); } function dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) /*: ?Error*/{ if (props[propName]) { return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child.")); } } ;// CONCATENATED MODULE: ./lib/utils/getPrefix.js const prefixes = ['Moz', 'Webkit', 'O', 'ms']; function getPrefix() /*: string*/{ var _window$document; let prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform'; // Ensure we're running in an environment where there is actually a global // `window` obj if (typeof window === 'undefined') return ''; // If we're in a pseudo-browser server-side environment, this access // path may not exist, so bail out if it doesn't. const style = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style; if (!style) return ''; if (prop in style) return ''; for (let i = 0; i < prefixes.length; i++) { if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i]; } return ''; } function browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/{ return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop; } function browserPrefixToStyle(prop /*: string*/, prefix /*: string*/) /*: string*/{ return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop; } function kebabToTitleCase(str /*: string*/) /*: string*/{ let out = ''; let shouldCapitalize = true; for (let i = 0; i < str.length; i++) { if (shouldCapitalize) { out += str[i].toUpperCase(); shouldCapitalize = false; } else if (str[i] === '-') { shouldCapitalize = true; } else { out += str[i]; } } return out; } // Default export is the prefix itself, like 'Moz', 'Webkit', etc // Note that you may have to re-test for certain things; for instance, Chrome 50 // can handle unprefixed `transform`, but not unprefixed `user-select` /* harmony default export */ var utils_getPrefix = (getPrefix()); ;// CONCATENATED MODULE: ./lib/utils/domFns.js /*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/ let matchesSelectorFunc = ''; function matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/{ if (!matchesSelectorFunc) { matchesSelectorFunc = findInArray(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) { // $FlowIgnore: Doesn't think elements are indexable return isFunction(el[method]); }); } // Might not be found entirely (not an Element?) - in that case, bail // $FlowIgnore: Doesn't think elements are indexable if (!isFunction(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable return el[matchesSelectorFunc](selector); } // Works up the tree to the draggable itself attempting to match selector. function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{ let node = el; do { if (matchesSelector(node, selector)) return true; if (node === baseNode) return false; // $FlowIgnore[incompatible-type] node = node.parentNode; } while (node); return false; } function addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{ if (!el) return; const options = { capture: true, ...inputOptions }; // $FlowIgnore[method-unbinding] if (el.addEventListener) { el.addEventListener(event, handler, options); } else if (el.attachEvent) { el.attachEvent('on' + event, handler); } else { // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = handler; } } function removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/, inputOptions /*: Object*/) /*: void*/{ if (!el) return; const options = { capture: true, ...inputOptions }; // $FlowIgnore[method-unbinding] if (el.removeEventListener) { el.removeEventListener(event, handler, options); } else if (el.detachEvent) { el.detachEvent('on' + event, handler); } else { // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = null; } } function domFns_outerHeight(node /*: HTMLElement*/) /*: number*/{ // This is deliberately excluding margin for our calculations, since we are using // offsetTop which is including margin. See getBoundPosition let height = node.clientHeight; const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); height += shims_int(computedStyle.borderTopWidth); height += shims_int(computedStyle.borderBottomWidth); return height; } function domFns_outerWidth(node /*: HTMLElement*/) /*: number*/{ // This is deliberately excluding margin for our calculations, since we are using // offsetLeft which is including margin. See getBoundPosition let width = node.clientWidth; const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); width += shims_int(computedStyle.borderLeftWidth); width += shims_int(computedStyle.borderRightWidth); return width; } function domFns_innerHeight(node /*: HTMLElement*/) /*: number*/{ let height = node.clientHeight; const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); height -= shims_int(computedStyle.paddingTop); height -= shims_int(computedStyle.paddingBottom); return height; } function domFns_innerWidth(node /*: HTMLElement*/) /*: number*/{ let width = node.clientWidth; const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node); width -= shims_int(computedStyle.paddingLeft); width -= shims_int(computedStyle.paddingRight); return width; } /*:: interface EventWithOffset { clientX: number, clientY: number }*/ // Get from offsetParent function offsetXYFromParent(evt /*: EventWithOffset*/, offsetParent /*: HTMLElement*/, scale /*: number*/) /*: ControlPosition*/{ const isBody = offsetParent === offsetParent.ownerDocument.body; const offsetParentRect = isBody ? { left: 0, top: 0 } : offsetParent.getBoundingClientRect(); const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale; const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale; return { x, y }; } function createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/{ const translation = getTranslation(controlPos, positionOffset, 'px'); return { [browserPrefixToKey('transform', utils_getPrefix)]: translation }; } function createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/{ const translation = getTranslation(controlPos, positionOffset, ''); return translation; } function getTranslation(_ref /*:: */, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/{ let { x, y } /*: ControlPosition*/ = _ref /*: ControlPosition*/; let translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")"); if (positionOffset) { const defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix); const defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix); translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation; } return translation; } function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/{ return e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier) || e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier); } function getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/{ if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier; if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier; } // User-select Hacks: // // Useful for preventing blue highlights all over everything when dragging. // Note we're passing `document` b/c we could be iframed function addUserSelectStyles(doc /*: ?Document*/) { if (!doc) return; let styleEl = doc.getElementById('react-draggable-style-el'); if (!styleEl) { styleEl = doc.createElement('style'); styleEl.type = 'text/css'; styleEl.id = 'react-draggable-style-el'; styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n'; styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n'; doc.getElementsByTagName('head')[0].appendChild(styleEl); } if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection'); } function removeUserSelectStyles(doc /*: ?Document*/) { if (!doc) return; try { if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE if (doc.selection) { // $FlowIgnore: IE doc.selection.empty(); } else { // Remove selection caused by scroll, unless it's a focused input // (we use doc.defaultView in case we're in an iframe) const selection = (doc.defaultView || window).getSelection(); if (selection && selection.type !== 'Caret') { selection.removeAllRanges(); } } } catch (e) { // probably IE } } function addClassName(el /*: HTMLElement*/, className /*: string*/) { if (el.classList) { el.classList.add(className); } else { if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) { el.className += " ".concat(className); } } } function removeClassName(el /*: HTMLElement*/, className /*: string*/) { if (el.classList) { el.classList.remove(className); } else { el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), ''); } } ;// CONCATENATED MODULE: ./lib/utils/positionFns.js /*:: import type Draggable from '../Draggable';*/ /*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/ /*:: import type DraggableCore from '../DraggableCore';*/ function getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/{ // If no bounds, short-circuit and move on if (!draggable.props.bounds) return [x, y]; // Clone new bounds let { bounds } = draggable.props; bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds); const node = findDOMNode(draggable); if (typeof bounds === 'string') { const { ownerDocument } = node; const ownerWindow = ownerDocument.defaultView; let boundNode; if (bounds === 'parent') { boundNode = node.parentNode; } else { boundNode = ownerDocument.querySelector(bounds); } if (!(boundNode instanceof ownerWindow.HTMLElement)) { throw new Error('Bounds selector "' + bounds + '" could not find an element.'); } const boundNodeEl /*: HTMLElement*/ = boundNode; // for Flow, can't seem to refine correctly const nodeStyle = ownerWindow.getComputedStyle(node); const boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right. bounds = { left: -node.offsetLeft + shims_int(boundNodeStyle.paddingLeft) + shims_int(nodeStyle.marginLeft), top: -node.offsetTop + shims_int(boundNodeStyle.paddingTop) + shims_int(nodeStyle.marginTop), right: domFns_innerWidth(boundNodeEl) - domFns_outerWidth(node) - node.offsetLeft + shims_int(boundNodeStyle.paddingRight) - shims_int(nodeStyle.marginRight), bottom: domFns_innerHeight(boundNodeEl) - domFns_outerHeight(node) - node.offsetTop + shims_int(boundNodeStyle.paddingBottom) - shims_int(nodeStyle.marginBottom) }; } // Keep x and y below right and bottom limits... if (isNum(bounds.right)) x = Math.min(x, bounds.right); if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits. if (isNum(bounds.left)) x = Math.max(x, bounds.left); if (isNum(bounds.top)) y = Math.max(y, bounds.top); return [x, y]; } function snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/{ const x = Math.round(pendingX / grid[0]) * grid[0]; const y = Math.round(pendingY / grid[1]) * grid[1]; return [x, y]; } function canDragX(draggable /*: Draggable*/) /*: boolean*/{ return draggable.props.axis === 'both' || draggable.props.axis === 'x'; } function canDragY(draggable /*: Draggable*/) /*: boolean*/{ return draggable.props.axis === 'both' || draggable.props.axis === 'y'; } // Get {x, y} positions from event. function getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/{ const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null; if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch const node = findDOMNode(draggableCore); // User can provide an offsetParent if desired. const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body; return offsetXYFromParent(touchObj || e, offsetParent, draggableCore.props.scale); } // Create an data object exposed by 's events function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/{ const isStart = !isNum(draggable.lastX); const node = findDOMNode(draggable); if (isStart) { // If this is our first move, use the x and y as last coords. return { node, deltaX: 0, deltaY: 0, lastX: x, lastY: y, x, y }; } else { // Otherwise calculate proper values. return { node, deltaX: x - draggable.lastX, deltaY: y - draggable.lastY, lastX: draggable.lastX, lastY: draggable.lastY, x, y }; } } // Create an data exposed by 's events function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/{ const scale = draggable.props.scale; return { node: coreData.node, x: draggable.state.x + coreData.deltaX / scale, y: draggable.state.y + coreData.deltaY / scale, deltaX: coreData.deltaX / scale, deltaY: coreData.deltaY / scale, lastX: draggable.state.x, lastY: draggable.state.y }; } // A lot faster than stringify/parse function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/{ return { left: bounds.left, top: bounds.top, right: bounds.right, bottom: bounds.bottom }; } function findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/{ const node = draggable.findDOMNode(); if (!node) { throw new Error(': Unmounted during event!'); } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME return node; } ;// CONCATENATED MODULE: ./lib/utils/log.js /*eslint no-console:0*/ function log() { if (false) {} } ;// CONCATENATED MODULE: ./lib/DraggableCore.js function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/ /*:: import type {Element as ReactElement} from 'react';*/ // Simple abstraction for dragging events names. const eventsFor = { touch: { start: 'touchstart', move: 'touchmove', stop: 'touchend' }, mouse: { start: 'mousedown', move: 'mousemove', stop: 'mouseup' } }; // Default to mouse events. let dragEventFor = eventsFor.mouse; /*:: export type DraggableData = { node: HTMLElement, x: number, y: number, deltaX: number, deltaY: number, lastX: number, lastY: number, };*/ /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/ /*:: export type ControlPosition = {x: number, y: number};*/ /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/ /*:: export type DraggableCoreDefaultProps = { allowAnyClick: boolean, disabled: boolean, enableUserSelectHack: boolean, onStart: DraggableEventHandler, onDrag: DraggableEventHandler, onStop: DraggableEventHandler, onMouseDown: (e: MouseEvent) => void, scale: number, };*/ /*:: export type DraggableCoreProps = { ...DraggableCoreDefaultProps, cancel: string, children: ReactElement, offsetParent: HTMLElement, grid: [number, number], handle: string, nodeRef?: ?React.ElementRef, };*/ // // Define . // // is for advanced usage of . It maintains minimal internal state so it can // work well with libraries that require more control over the element. // class DraggableCore extends external_commonjs_react_commonjs2_react_amd_react_root_React_.Component /*:: */{ constructor() { super(...arguments); _defineProperty(this, "dragging", false); // Used while dragging to determine deltas. _defineProperty(this, "lastX", NaN); _defineProperty(this, "lastY", NaN); _defineProperty(this, "touchIdentifier", null); _defineProperty(this, "mounted", false); _defineProperty(this, "handleDragStart", e => { // Make it possible to attach event handlers on top of this one. this.props.onMouseDown(e); // Only accept left-clicks. if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed) const thisNode = this.findDOMNode(); if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) { throw new Error(' not mounted on DragStart!'); } const { ownerDocument } = thisNode; // Short circuit if handle or cancel prop was provided and selector doesn't match. if (this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode) || this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode)) { return; } // Prevent scrolling on mobile devices, like ipad/iphone. // Important that this is after handle/cancel. if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to // distinguish between individual touches on multitouch screens by identifying which // touchpoint was set to this element. const touchIdentifier = getTouchIdentifier(e); this.touchIdentifier = touchIdentifier; // Get the current drag point from the event. This is used as the offset. const position = getControlPosition(e, touchIdentifier, this); if (position == null) return; // not possible but satisfies flow const { x, y } = position; // Create an event object with all the data parents need to make a decision here. const coreEvent = createCoreData(this, x, y); log('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel. log('calling', this.props.onStart); const shouldUpdate = this.props.onStart(e, coreEvent); if (shouldUpdate === false || this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from // being selected all over the page. if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument); // Initiate dragging. Set the current x and y as offsets // so we know how much we've moved during the drag. This allows us // to drag elements around even if they have been moved, without issue. this.dragging = true; this.lastX = x; this.lastY = y; // Add events to the document directly so we catch when the user's mouse/touch moves outside of // this element. We use different events depending on whether or not we have detected that this // is a touch-capable device. addEvent(ownerDocument, dragEventFor.move, this.handleDrag); addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop); }); _defineProperty(this, "handleDrag", e => { // Get the current drag point from the event. This is used as the offset. const position = getControlPosition(e, this.touchIdentifier, this); if (position == null) return; let { x, y } = position; // Snap to grid if prop has been provided if (Array.isArray(this.props.grid)) { let deltaX = x - this.lastX, deltaY = y - this.lastY; [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY); if (!deltaX && !deltaY) return; // skip useless drag x = this.lastX + deltaX, y = this.lastY + deltaY; } const coreEvent = createCoreData(this, x, y); log('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end. const shouldUpdate = this.props.onDrag(e, coreEvent); if (shouldUpdate === false || this.mounted === false) { try { // $FlowIgnore this.handleDragStop(new MouseEvent('mouseup')); } catch (err) { // Old browsers const event = ((document.createEvent('MouseEvents') /*: any*/) /*: MouseTouchEvent*/); // I see why this insanity was deprecated // $FlowIgnore event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); this.handleDragStop(event); } return; } this.lastX = x; this.lastY = y; }); _defineProperty(this, "handleDragStop", e => { if (!this.dragging) return; const position = getControlPosition(e, this.touchIdentifier, this); if (position == null) return; let { x, y } = position; // Snap to grid if prop has been provided if (Array.isArray(this.props.grid)) { let deltaX = x - this.lastX || 0; let deltaY = y - this.lastY || 0; [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY); x = this.lastX + deltaX, y = this.lastY + deltaY; } const coreEvent = createCoreData(this, x, y); // Call event handler const shouldContinue = this.props.onStop(e, coreEvent); if (shouldContinue === false || this.mounted === false) return false; const thisNode = this.findDOMNode(); if (thisNode) { // Remove user-select hack if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument); } log('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el. this.dragging = false; this.lastX = NaN; this.lastY = NaN; if (thisNode) { // Remove event handlers log('DraggableCore: Removing handlers'); removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag); removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop); } }); _defineProperty(this, "onMouseDown", e => { dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse return this.handleDragStart(e); }); _defineProperty(this, "onMouseUp", e => { dragEventFor = eventsFor.mouse; return this.handleDragStop(e); }); // Same as onMouseDown (start drag), but now consider this a touch device. _defineProperty(this, "onTouchStart", e => { // We're on a touch device now, so change the event handlers dragEventFor = eventsFor.touch; return this.handleDragStart(e); }); _defineProperty(this, "onTouchEnd", e => { // We're on a touch device now, so change the event handlers dragEventFor = eventsFor.touch; return this.handleDragStop(e); }); } componentDidMount() { this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable. // https://developers.google.com/web/updates/2017/01/scrolling-intervention const thisNode = this.findDOMNode(); if (thisNode) { addEvent(thisNode, eventsFor.touch.start, this.onTouchStart, { passive: false }); } } componentWillUnmount() { this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case // some browser quirk caused a touch event to fire during a mouse move, or vice versa. const thisNode = this.findDOMNode(); if (thisNode) { const { ownerDocument } = thisNode; removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag); removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag); removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop); removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop); removeEvent(thisNode, eventsFor.touch.start, this.onTouchStart, { passive: false }); if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument); } } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find // the underlying DOM node ourselves. See the README for more information. findDOMNode() /*: ?HTMLElement*/{ var _this$props, _this$props2; return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_default().findDOMNode(this); } render() /*: React.Element*/{ // Reuse the child provided // This makes it flexible to use whatever element is wanted (div, ul, etc) return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.cloneElement(external_commonjs_react_commonjs2_react_amd_react_root_React_.Children.only(this.props.children), { // Note: mouseMove handler is attached to document so it will still function // when the user drags quickly and leaves the bounds of the element. onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, // onTouchStart is added on `componentDidMount` so they can be added with // {passive: false}, which allows it to cancel. See // https://developers.google.com/web/updates/2017/01/scrolling-intervention onTouchEnd: this.onTouchEnd }); } } _defineProperty(DraggableCore, "displayName", 'DraggableCore'); _defineProperty(DraggableCore, "propTypes", { /** * `allowAnyClick` allows dragging using any mouse button. * By default, we only accept the left button. * * Defaults to `false`. */ allowAnyClick: (prop_types_default()).bool, children: (prop_types_default()).node.isRequired, /** * `disabled`, if true, stops the from dragging. All handlers, * with the exception of `onMouseDown`, will not fire. */ disabled: (prop_types_default()).bool, /** * By default, we add 'user-select:none' attributes to the document body * to prevent ugly text selection during drag. If this is causing problems * for your app, set this to `false`. */ enableUserSelectHack: (prop_types_default()).bool, /** * `offsetParent`, if set, uses the passed DOM node to compute drag offsets * instead of using the parent node. */ offsetParent: function (props /*: DraggableCoreProps*/, propName /*: $Keys*/) { if (props[propName] && props[propName].nodeType !== 1) { throw new Error('Draggable\'s offsetParent must be a DOM Node.'); } }, /** * `grid` specifies the x and y that dragging should snap to. */ grid: prop_types_default().arrayOf((prop_types_default()).number), /** * `handle` specifies a selector to be used as the handle that initiates drag. * * Example: * * ```jsx * let App = React.createClass({ * render: function () { * return ( * *
*
Click me to drag
*
This is some other content
*
*
* ); * } * }); * ``` */ handle: (prop_types_default()).string, /** * `cancel` specifies a selector to be used to prevent drag initialization. * * Example: * * ```jsx * let App = React.createClass({ * render: function () { * return( * *
*
You can't drag from here
*
Dragging here works fine
*
*
* ); * } * }); * ``` */ cancel: (prop_types_default()).string, /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated. * Unfortunately, in order for to work properly, we need raw access * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef` * as in this example: * * function MyComponent() { * const nodeRef = React.useRef(null); * return ( * *
Example Target
*
* ); * } * * This can be used for arbitrarily nested components, so long as the ref ends up * pointing to the actual child DOM node and not a custom component. */ nodeRef: (prop_types_default()).object, /** * Called when dragging starts. * If this function returns the boolean false, dragging will be canceled. */ onStart: (prop_types_default()).func, /** * Called while dragging. * If this function returns the boolean false, dragging will be canceled. */ onDrag: (prop_types_default()).func, /** * Called when dragging stops. * If this function returns the boolean false, the drag will remain active. */ onStop: (prop_types_default()).func, /** * A workaround option which can be passed if onMouseDown needs to be accessed, * since it'll always be blocked (as there is internal use of onMouseDown) */ onMouseDown: (prop_types_default()).func, /** * `scale`, if set, applies scaling while dragging an element */ scale: (prop_types_default()).number, /** * These properties should be defined on the child, not here. */ className: dontSetMe, style: dontSetMe, transform: dontSetMe }); _defineProperty(DraggableCore, "defaultProps", { allowAnyClick: false, // by default only accept left click disabled: false, enableUserSelectHack: true, onStart: function () {}, onDrag: function () {}, onStop: function () {}, onMouseDown: function () {}, scale: 1 }); ;// CONCATENATED MODULE: ./lib/Draggable.js function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function Draggable_defineProperty(obj, key, value) { key = Draggable_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function Draggable_toPropertyKey(arg) { var key = Draggable_toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function Draggable_toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*:: import type {ControlPosition, PositionOffsetControlPosition, DraggableCoreProps, DraggableCoreDefaultProps} from './DraggableCore';*/ /*:: import type {Bounds, DraggableEventHandler} from './utils/types';*/ /*:: import type {Element as ReactElement} from 'react';*/ /*:: type DraggableState = { dragging: boolean, dragged: boolean, x: number, y: number, slackX: number, slackY: number, isElementSVG: boolean, prevPropsPosition: ?ControlPosition, };*/ /*:: export type DraggableDefaultProps = { ...DraggableCoreDefaultProps, axis: 'both' | 'x' | 'y' | 'none', bounds: Bounds | string | false, defaultClassName: string, defaultClassNameDragging: string, defaultClassNameDragged: string, defaultPosition: ControlPosition, scale: number, };*/ /*:: export type DraggableProps = { ...DraggableCoreProps, ...DraggableDefaultProps, positionOffset: PositionOffsetControlPosition, position: ControlPosition, };*/ // // Define // class Draggable extends external_commonjs_react_commonjs2_react_amd_react_root_React_.Component /*:: */{ // React 16.3+ // Arity (props, state) static getDerivedStateFromProps(_ref /*:: */, _ref2 /*:: */) /*: ?Partial*/{ let { position } /*: DraggableProps*/ = _ref /*: DraggableProps*/; let { prevPropsPosition } /*: DraggableState*/ = _ref2 /*: DraggableState*/; // Set x/y if a new position is provided in props that is different than the previous. if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) { log('Draggable: getDerivedStateFromProps %j', { position, prevPropsPosition }); return { x: position.x, y: position.y, prevPropsPosition: { ...position } }; } return null; } constructor(props /*: DraggableProps*/) { super(props); Draggable_defineProperty(this, "onDragStart", (e, coreData) => { log('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it. const shouldStart = this.props.onStart(e, createDraggableData(this, coreData)); // Kills start event on core as well, so move handlers are never bound. if (shouldStart === false) return false; this.setState({ dragging: true, dragged: true }); }); Draggable_defineProperty(this, "onDrag", (e, coreData) => { if (!this.state.dragging) return false; log('Draggable: onDrag: %j', coreData); const uiData = createDraggableData(this, coreData); const newState = { x: uiData.x, y: uiData.y, slackX: 0, slackY: 0 }; // Keep within bounds. if (this.props.bounds) { // Save original x and y. const { x, y } = newState; // Add slack to the values used to calculate bound position. This will ensure that if // we start removing slack, the element won't react to it right away until it's been // completely removed. newState.x += this.state.slackX; newState.y += this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries. const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y); newState.x = newStateX; newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler. newState.slackX = this.state.slackX + (x - newState.x); newState.slackY = this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect. uiData.x = newState.x; uiData.y = newState.y; uiData.deltaX = newState.x - this.state.x; uiData.deltaY = newState.y - this.state.y; } // Short-circuit if user's callback killed it. const shouldUpdate = this.props.onDrag(e, uiData); if (shouldUpdate === false) return false; this.setState(newState); }); Draggable_defineProperty(this, "onDragStop", (e, coreData) => { if (!this.state.dragging) return false; // Short-circuit if user's callback killed it. const shouldContinue = this.props.onStop(e, createDraggableData(this, coreData)); if (shouldContinue === false) return false; log('Draggable: onDragStop: %j', coreData); const newState /*: Partial*/ = { dragging: false, slackX: 0, slackY: 0 }; // If this is a controlled component, the result of this operation will be to // revert back to the old position. We expect a handler on `onDragStop`, at the least. const controlled = Boolean(this.props.position); if (controlled) { const { x, y } = this.props.position; newState.x = x; newState.y = y; } this.setState(newState); }); this.state = { // Whether or not we are currently dragging. dragging: false, // Whether or not we have been dragged before. dragged: false, // Current transform x and y. x: props.position ? props.position.x : props.defaultPosition.x, y: props.position ? props.position.y : props.defaultPosition.y, prevPropsPosition: { ...props.position }, // Used for compensating for out-of-bounds drags slackX: 0, slackY: 0, // Can only determine if SVG after mounting isElementSVG: false }; if (props.position && !(props.onDrag || props.onStop)) { // eslint-disable-next-line no-console console.warn('A `position` was applied to this , 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.'); } } componentDidMount() { // Check to see if the element passed is an instanceof SVGElement if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) { this.setState({ isElementSVG: true }); } } componentWillUnmount() { this.setState({ dragging: false }); // prevents invariant if unmounted while dragging } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find // the underlying DOM node ourselves. See the README for more information. findDOMNode() /*: ?HTMLElement*/{ var _this$props$nodeRef$c, _this$props; return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_default().findDOMNode(this); } render() /*: ReactElement*/{ const { axis, bounds, children, defaultPosition, defaultClassName, defaultClassNameDragging, defaultClassNameDragged, position, positionOffset, scale, ...draggableCoreProps } = this.props; let style = {}; let svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging. const controlled = Boolean(position); const draggable = !controlled || this.state.dragging; const validPosition = position || defaultPosition; const transformOpts = { // Set left if horizontal drag is enabled x: canDragX(this) && draggable ? this.state.x : validPosition.x, // Set top if vertical drag is enabled y: canDragY(this) && draggable ? this.state.y : validPosition.y }; // If this element was SVG, we use the `transform` attribute. if (this.state.isElementSVG) { svgTransform = createSVGTransform(transformOpts, positionOffset); } else { // Add a CSS transform to move the element around. This allows us to move the element around // without worrying about whether or not it is relatively or absolutely positioned. // If the item you are dragging already has a transform set, wrap it in a so // has a clean slate. style = createCSSTransform(transformOpts, positionOffset); } // Mark with class while dragging const className = clsx_m(children.props.className || '', defaultClassName, { [defaultClassNameDragging]: this.state.dragging, [defaultClassNameDragged]: this.state.dragged }); // Reuse the child provided // This makes it flexible to use whatever element is wanted (div, ul, etc) return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(DraggableCore, _extends({}, draggableCoreProps, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.cloneElement(external_commonjs_react_commonjs2_react_amd_react_root_React_.Children.only(children), { className: className, style: { ...children.props.style, ...style }, transform: svgTransform })); } } Draggable_defineProperty(Draggable, "displayName", 'Draggable'); Draggable_defineProperty(Draggable, "propTypes", { // Accepts all props accepts. ...DraggableCore.propTypes, /** * `axis` determines which axis the draggable can move. * * Note that all callbacks will still return data as normal. This only * controls flushing to the DOM. * * 'both' allows movement horizontally and vertically. * 'x' limits movement to horizontal axis. * 'y' limits movement to vertical axis. * 'none' limits all movement. * * Defaults to 'both'. */ axis: prop_types_default().oneOf(['both', 'x', 'y', 'none']), /** * `bounds` determines the range of movement available to the element. * Available values are: * * 'parent' restricts movement within the Draggable's parent node. * * Alternatively, pass an object with the following properties, all of which are optional: * * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND} * * All values are in px. * * Example: * * ```jsx * let App = React.createClass({ * render: function () { * return ( * *
Content
*
* ); * } * }); * ``` */ bounds: prop_types_default().oneOfType([prop_types_default().shape({ left: (prop_types_default()).number, right: (prop_types_default()).number, top: (prop_types_default()).number, bottom: (prop_types_default()).number }), (prop_types_default()).string, prop_types_default().oneOf([false])]), defaultClassName: (prop_types_default()).string, defaultClassNameDragging: (prop_types_default()).string, defaultClassNameDragged: (prop_types_default()).string, /** * `defaultPosition` specifies the x and y that the dragged item should start at * * Example: * * ```jsx * let App = React.createClass({ * render: function () { * return ( * *
I start with transformX: 25px and transformY: 25px;
*
* ); * } * }); * ``` */ defaultPosition: prop_types_default().shape({ x: (prop_types_default()).number, y: (prop_types_default()).number }), positionOffset: prop_types_default().shape({ x: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]), y: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]) }), /** * `position`, if present, defines the current position of the element. * * This is similar to how form elements in React work - if no `position` is supplied, the component * is uncontrolled. * * Example: * * ```jsx * let App = React.createClass({ * render: function () { * return ( * *
I start with transformX: 25px and transformY: 25px;
*
* ); * } * }); * ``` */ position: prop_types_default().shape({ x: (prop_types_default()).number, y: (prop_types_default()).number }), /** * These properties should be defined on the child, not here. */ className: dontSetMe, style: dontSetMe, transform: dontSetMe }); Draggable_defineProperty(Draggable, "defaultProps", { ...DraggableCore.defaultProps, axis: 'both', bounds: false, defaultClassName: 'react-draggable', defaultClassNameDragging: 'react-draggable-dragging', defaultClassNameDragged: 'react-draggable-dragged', defaultPosition: { x: 0, y: 0 }, scale: 1 }); /***/ }), /***/ 16: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { const { default: Draggable, DraggableCore } = __webpack_require__(404); // Previous versions of this lib exported as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'. // See https://github.com/mzabriskie/react-draggable/pull/254 // and https://github.com/mzabriskie/react-draggable/issues/266 module.exports = Draggable; module.exports["default"] = Draggable; module.exports.DraggableCore = DraggableCore; /***/ }), /***/ 703: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(414); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( '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' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bigint: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ 697: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(703)(); } /***/ }), /***/ 414: /***/ (function(module) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ 359: /***/ (function(module) { "use strict"; module.exports = __WEBPACK_EXTERNAL_MODULE__359__; /***/ }), /***/ 318: /***/ (function(module) { "use strict"; module.exports = __WEBPACK_EXTERNAL_MODULE__318__; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function() { return module['default']; } : /******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __webpack_require__(16); /******/ /******/ return __webpack_exports__; /******/ })() ; }); //# sourceMappingURL=react-draggable.min.js.map