10.145fb751.chunk.js
22.8 KB
webpackJsonp([10],{1368:function(e,t,n){!function(t,r){e.exports=r(n(52),n(0))}(0,function(e,t){"use strict";function n(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(e){return function(){return e}}function o(e,t,n,r,o,a,i,s){if(q(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function i(e,t,n,r,o){for(var a in e)if(e.hasOwnProperty(a)){var i;try{te("function"===typeof e[a],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",r||"React class",n,a,typeof e[a]),i=e[a](t,a,r,n,null,re)}catch(e){i=e}if(ne(!i||i 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).",r||"React class",n,a,typeof i),i instanceof Error&&!(i.message in oe)){oe[i.message]=!0;var s=o?o():"";ne(!1,"Failed %s type: %s%s",n,i.message,null!=s?s:"")}}}function s(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function u(e){return"function"===typeof e||"[object Function]"===Object.prototype.toString.call(e)}function l(e){return"number"===typeof e&&!isNaN(e)}function c(e){return parseInt(e,10)}function f(e,t,n){if(e[t])return new Error("Invalid prop "+t+" passed to "+n+" - do not set this, set it on the child.")}function p(e,t){return t?""+t+d(e):e}function d(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}function g(e,t){return ve||(ve=s(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return u(e[t])})),!!u(e[ve])&&e[ve](t)}function y(e,t,n){var r=e;do{if(g(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function h(e,t,n){e&&(e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener?e.addEventListener(t,n,!0):e["on"+t]=n)}function m(e,t,n){e&&(e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener?e.removeEventListener(t,n,!0):e["on"+t]=null)}function v(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=c(n.borderTopWidth),t+=c(n.borderBottomWidth)}function b(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=c(n.borderLeftWidth),t+=c(n.borderRightWidth)}function w(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=c(n.paddingTop),t-=c(n.paddingBottom)}function S(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=c(n.paddingLeft),t-=c(n.paddingRight)}function x(e,t){var n=t===t.ownerDocument.body,r=n?{left:0,top:0}:t.getBoundingClientRect();return{x:e.clientX+t.scrollLeft-r.left,y:e.clientY+t.scrollTop-r.top}}function O(e,t){var n=T(e,t,"px");return de({},p("transform",ce),n)}function D(e,t){return T(e,t,"")}function T(e,t,n){var r=e.x,o=e.y,a="translate("+r+n+","+o+n+")";if(t){a="translate("+(""+("string"===typeof t.x?t.x:t.x+n))+", "+(""+("string"===typeof t.y?t.y:t.y+n))+")"+a}return a}function E(e,t){return e.targetTouches&&s(e.targetTouches,function(e){return t===e.identifier})||e.changedTouches&&s(e.changedTouches,function(e){return t===e.identifier})}function N(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0}function j(e){if(e){var t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t)),e.body&&C(e.body,"react-draggable-transparent-selection")}}function k(e){try{e&&e.body&&M(e.body,"react-draggable-transparent-selection"),e.selection?e.selection.empty():window.getSelection().removeAllRanges()}catch(e){}}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ge({touchAction:"none"},e)}function C(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)"+t+"(?!\\S)"))||(e.className+=" "+t)}function M(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)"+t+"(?!\\S)","g"),"")}function R(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"===typeof r?r:U(r);var o=V(e);if("string"===typeof r){var a=o.ownerDocument,i=a.defaultView,s=void 0;if(!((s="parent"===r?o.parentNode:a.querySelector(r))instanceof i.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var u=i.getComputedStyle(o),f=i.getComputedStyle(s);r={left:-o.offsetLeft+c(f.paddingLeft)+c(u.marginLeft),top:-o.offsetTop+c(f.paddingTop)+c(u.marginTop),right:S(s)-b(o)-o.offsetLeft+c(f.paddingRight)-c(u.marginRight),bottom:w(s)-v(o)-o.offsetTop+c(f.paddingBottom)-c(u.marginBottom)}}return l(r.right)&&(t=Math.min(t,r.right)),l(r.bottom)&&(n=Math.min(n,r.bottom)),l(r.left)&&(t=Math.max(t,r.left)),l(r.top)&&(n=Math.max(n,r.top)),[t,n]}function A(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function I(e){return"both"===e.props.axis||"x"===e.props.axis}function Y(e){return"both"===e.props.axis||"y"===e.props.axis}function X(e,t,n){var r="number"===typeof t?E(e,t):null;if("number"===typeof t&&!r)return null;var o=V(n),a=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return x(r||e,a)}function _(e,t,n){var r=e.state,o=!l(r.lastX),a=V(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}}function L(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function U(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function V(t){var n=e.findDOMNode(t);if(!n)throw new Error("<DraggableCore>: Unmounted during event!");return n}function B(){}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var W=function(){};W.thatReturns=r,W.thatReturnsFalse=r(!1),W.thatReturnsTrue=r(!0),W.thatReturnsNull=r(null),W.thatReturnsThis=function(){return this},W.thatReturnsArgument=function(e){return e};var H=W,q=function(e){};q=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")};var F=o,G=H,J=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,a="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!==typeof console&&console.error(a);try{throw new Error(a)}catch(e){}};G=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];J.apply(void 0,[t].concat(r))}};var z=G,$=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,Z=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=a(e),i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)K.call(n,s)&&(o[s]=n[s]);if($){r=$(n);for(var u=0;u<r.length;u++)Q.call(n,r[u])&&(o[r[u]]=n[r[u]])}}return o},ee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",te=F,ne=z,re=ee,oe={},ae=i,ie=function(e,t){function n(e){var t=e&&(w&&e[w]||e[S]);if("function"===typeof t)return t}function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function a(e){function n(n,i,s,u,l,c,f){if(u=u||x,c=c||s,f!==ee)if(t)F(!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("undefined"!==typeof console){var p=u+":"+s;!r[p]&&a<3&&(z(!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.",c,u),r[p]=!0,a++)}return null==i[s]?n?new o(null===i[s]?"The "+l+" `"+c+"` is marked as required in `"+u+"`, but its value is `null`.":"The "+l+" `"+c+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(i,s,u,l,c)}var r={},a=0,i=n.bind(null,!1);return i.isRequired=n.bind(null,!0),i}function i(e){function t(t,n,r,a,i,s){var u=t[n];if(h(u)!==e)return new o("Invalid "+a+" `"+i+"` of type `"+m(u)+"` supplied to `"+r+"`, expected `"+e+"`.");return null}return a(t)}function s(e){function t(t,n,r,a,i){if("function"!==typeof e)return new o("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){return new o("Invalid "+a+" `"+i+"` of type `"+h(s)+"` supplied to `"+r+"`, expected an array.")}for(var u=0;u<s.length;u++){var l=e(s,u,r,a,i+"["+u+"]",ee);if(l instanceof Error)return l}return null}return a(t)}function u(e){function t(t,n,r,a,i){if(!(t[n]instanceof e)){var s=e.name||x;return new o("Invalid "+a+" `"+i+"` of type `"+b(t[n])+"` supplied to `"+r+"`, expected instance of `"+s+"`.")}return null}return a(t)}function l(e){function t(t,n,a,i,s){for(var u=t[n],l=0;l<e.length;l++)if(r(u,e[l]))return null;return new o("Invalid "+i+" `"+s+"` of value `"+u+"` supplied to `"+a+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?a(t):(z(!1,"Invalid argument supplied to oneOf, expected an instance of array."),H.thatReturnsNull)}function c(e){function t(t,n,r,a,i){if("function"!==typeof e)return new o("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=h(s);if("object"!==u)return new o("Invalid "+a+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var l in s)if(s.hasOwnProperty(l)){var c=e(s,l,r,a,i+"."+l,ee);if(c instanceof Error)return c}return null}return a(t)}function f(e){function t(t,n,r,a,i){for(var s=0;s<e.length;s++){if(null==(0,e[s])(t,n,r,a,i,ee))return null}return new o("Invalid "+a+" `"+i+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return z(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),H.thatReturnsNull;for(var n=0;n<e.length;n++){var r=e[n];if("function"!==typeof r)return z(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",v(r),n),H.thatReturnsNull}return a(t)}function p(e){function t(t,n,r,a,i){var s=t[n],u=h(s);if("object"!==u)return new o("Invalid "+a+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var f=c(s,l,r,a,i+"."+l,ee);if(f)return f}}return null}return a(t)}function d(e){function t(t,n,r,a,i){var s=t[n],u=h(s);if("object"!==u)return new o("Invalid "+a+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var l=Z({},t[n],e);for(var c in l){var f=e[c];if(!f)return new o("Invalid "+a+" `"+i+"` key `"+c+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=f(s,c,r,a,i+"."+c,ee);if(p)return p}return null}return a(t)}function g(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(g);if(null===t||e(t))return!0;var r=n(t);if(!r)return!1;var o,a=r.call(t);if(r!==t.entries){for(;!(o=a.next()).done;)if(!g(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!g(i[1]))return!1}return!0;default:return!1}}function y(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"===typeof Symbol&&t instanceof Symbol)}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":y(t,e)?"symbol":t}function m(e){if("undefined"===typeof e||null===e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function v(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function b(e){return e.constructor&&e.constructor.name?e.constructor.name:x}var w="function"===typeof Symbol&&Symbol.iterator,S="@@iterator",x="<<anonymous>>",O={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:function(){return a(H.thatReturnsNull)}(),arrayOf:s,element:function(){function t(t,n,r,a,i){var s=t[n];if(!e(s)){return new o("Invalid "+a+" `"+i+"` of type `"+h(s)+"` supplied to `"+r+"`, expected a single ReactElement.")}return null}return a(t)}(),instanceOf:u,node:function(){function e(e,t,n,r,a){return g(e[t])?null:new o("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}return a(e)}(),objectOf:c,oneOf:l,oneOfType:f,shape:p,exact:d};return o.prototype=Error.prototype,O.checkPropTypes=ae,O.PropTypes=O,O},se=n(function(e){var t="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,n=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===t};e.exports=ie(n,!0)}),ue=n(function(e){!function(){function t(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o))e.push(t.apply(null,o));else if("object"===a)for(var i in o)n.call(o,i)&&o[i]&&e.push(i)}}return e.join(" ")}var n={}.hasOwnProperty;e.exports?e.exports=t:window.classNames=t}()}),le=["Moz","Webkit","O","ms"],ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window||"undefined"===typeof window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n<le.length;n++)if(p(e,le[n])in t)return le[n];return""}(),fe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},pe=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),de=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ye=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},he=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},me=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ve="",be={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},we=be.mouse,Se=function(n){function r(){var t,n,o,a;fe(this,r);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=o=he(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(s))),o.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null},o.handleDragStart=function(t){if(o.props.onMouseDown(t),!o.props.allowAnyClick&&"number"===typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode(o);if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(o.props.disabled||!(t.target instanceof r.defaultView.Node)||o.props.handle&&!y(t.target,o.props.handle,n)||o.props.cancel&&y(t.target,o.props.cancel,n))){var a=N(t);o.setState({touchIdentifier:a});var i=X(t,a,o);if(null!=i){var s=i.x,u=i.y,l=_(o,s,u);B("calling",o.props.onStart);!1!==o.props.onStart(t,l)&&(o.props.enableUserSelectHack&&j(r),o.setState({dragging:!0,lastX:s,lastY:u}),h(r,we.move,o.handleDrag),h(r,we.stop,o.handleDragStop))}}},o.handleDrag=function(e){"touchmove"===e.type&&e.preventDefault();var t=X(e,o.state.touchIdentifier,o);if(null!=t){var n=t.x,r=t.y;if(Array.isArray(o.props.grid)){var a=n-o.state.lastX,i=r-o.state.lastY,s=A(o.props.grid,a,i),u=me(s,2);if(a=u[0],i=u[1],!a&&!i)return;n=o.state.lastX+a,r=o.state.lastY+i}var l=_(o,n,r);if(!1!==o.props.onDrag(e,l))o.setState({lastX:n,lastY:r});else try{o.handleDragStop(new MouseEvent("mouseup"))}catch(e){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),o.handleDragStop(c)}}},o.handleDragStop=function(t){if(o.state.dragging){var n=X(t,o.state.touchIdentifier,o);if(null!=n){var r=n.x,a=n.y,i=_(o,r,a),s=e.findDOMNode(o);s&&o.props.enableUserSelectHack&&k(s.ownerDocument),o.setState({dragging:!1,lastX:NaN,lastY:NaN}),o.props.onStop(t,i),s&&(m(s.ownerDocument,we.move,o.handleDrag),m(s.ownerDocument,we.stop,o.handleDragStop))}}},o.onMouseDown=function(e){return we=be.mouse,o.handleDragStart(e)},o.onMouseUp=function(e){return we=be.mouse,o.handleDragStop(e)},o.onTouchStart=function(e){return we=be.touch,o.handleDragStart(e)},o.onTouchEnd=function(e){return we=be.touch,o.handleDragStop(e)},a=n,he(o,a)}return ye(r,n),pe(r,[{key:"componentWillUnmount",value:function(){var t=e.findDOMNode(this);if(t){var n=t.ownerDocument;m(n,be.mouse.move,this.handleDrag),m(n,be.touch.move,this.handleDrag),m(n,be.mouse.stop,this.handleDragStop),m(n,be.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&k(n)}}},{key:"render",value:function(){return t.cloneElement(t.Children.only(this.props.children),{style:P(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),r}(t.Component);Se.displayName="DraggableCore",Se.propTypes={allowAnyClick:se.bool,disabled:se.bool,enableUserSelectHack:se.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:se.arrayOf(se.number),scale:se.number,handle:se.string,cancel:se.string,onStart:se.func,onDrag:se.func,onStop:se.func,onMouseDown:se.func,className:f,style:f,transform:f},Se.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(){}};var xe=function(n){function r(e){fe(this,r);var t=he(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.onDragStart=function(e,n){if(!1===t.props.onStart(e,L(t,n)))return!1;t.setState({dragging:!0,dragged:!0})},t.onDrag=function(e,n){if(!t.state.dragging)return!1;var r=L(t,n),o={x:r.x,y:r.y};if(t.props.bounds){var a=o.x,i=o.y;o.x+=t.state.slackX,o.y+=t.state.slackY;var s=R(t,o.x,o.y),u=me(s,2),l=u[0],c=u[1];o.x=l,o.y=c,o.slackX=t.state.slackX+(a-o.x),o.slackY=t.state.slackY+(i-o.y),r.x=o.x,r.y=o.y,r.deltaX=o.x-t.state.x,r.deltaY=o.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(o)},t.onDragStop=function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,L(t,n)))return!1;var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var o=t.props.position,a=o.x,i=o.y;r.x=a,r.y=i}t.setState(r)},t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.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."),t}return ye(r,n),pe(r,[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&e.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(e){!e.position||this.props.position&&e.position.x===this.props.position.x&&e.position.y===this.props.position.y||this.setState({x:e.position.x,y:e.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,n={},r=null,o=Boolean(this.props.position),a=!o||this.state.dragging,i=this.props.position||this.props.defaultPosition,s={x:I(this)&&a?this.state.x:i.x,y:Y(this)&&a?this.state.y:i.y};this.state.isElementSVG?r=D(s,this.props.positionOffset):n=O(s,this.props.positionOffset);var u=this.props,l=u.defaultClassName,c=u.defaultClassNameDragging,f=u.defaultClassNameDragged,p=t.Children.only(this.props.children),d=ue(p.props.className||"",l,(e={},de(e,c,this.state.dragging),de(e,f,this.state.dragged),e));return t.createElement(Se,ge({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(p,{className:d,style:ge({},p.props.style,n),transform:r}))}}]),r}(t.Component);return xe.displayName="Draggable",xe.propTypes=ge({},Se.propTypes,{axis:se.oneOf(["both","x","y","none"]),bounds:se.oneOfType([se.shape({left:se.number,right:se.number,top:se.number,bottom:se.number}),se.string,se.oneOf([!1])]),defaultClassName:se.string,defaultClassNameDragging:se.string,defaultClassNameDragged:se.string,defaultPosition:se.shape({x:se.number,y:se.number}),positionOffset:se.shape({x:se.oneOfType([se.number,se.string]),y:se.oneOfType([se.number,se.string])}),position:se.shape({x:se.number,y:se.number}),className:f,style:f,transform:f}),xe.defaultProps=ge({},Se.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}),xe.default=xe,xe.DraggableCore=Se,xe})}});
//# sourceMappingURL=10.145fb751.chunk.js.map