diff --git a/packages/bootstrap-chat/build/bundle.js b/packages/bootstrap-chat/build/bundle.js index e02db074a..7ac7d9fe0 100644 --- a/packages/bootstrap-chat/build/bundle.js +++ b/packages/bootstrap-chat/build/bundle.js @@ -15,4 +15,4 @@ for(i=97;i<123;i++)r[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)r[i-48]= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,E=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case d:case y:case m:case c:return e;default:return t}}case i:return t}}}function x(e){return O(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return x(e)||O(e)===f},t.isConcurrentMode=x,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===u},t.isStrictMode=function(e){return O(e)===s},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===s||e===h||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===E||e.$$typeof===w||e.$$typeof===b)},t.typeOf=O},function(e,t,n){n(95),e.exports=n(7).Object.entries},function(e,t,n){var r=n(9),o=n(48)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){"use strict";t.__esModule=!0,t.uncontrolledPropTypes=function(e,t){var n={};return Object.keys(e).forEach((function(e){n[i(e)]=o})),n},t.isProp=function(e,t){return void 0!==e[t]},t.defaultKey=i,t.isReactComponent=function(e){return!!(e&&e.prototype&&e.prototype.isReactComponent)};var r;(r=n(27))&&r.__esModule;var o=function(){};function i(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}},function(e,t,n){n(98),n(104),e.exports=n(7).Array.from},function(e,t,n){"use strict";var r=n(99)(!0);n(100)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(35),o=n(34);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(53),o=n(9),i=n(101),a=n(18),s=n(38),u=n(102),c=n(58),l=n(103),f=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,v,m,y){u(n,t,h);var b,g,E,w=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},O=t+" Iterator",x="values"==v,C=!1,S=e.prototype,_=S[f]||S["@@iterator"]||v&&S[v],T=_||w(v),k=v?x?w("entries"):T:void 0,M="Array"==t&&S.entries||_;if(M&&(E=l(M.call(new e)))!==Object.prototype&&E.next&&(c(E,O,!0),r||"function"==typeof E[f]||a(E,f,d)),x&&_&&"values"!==_.name&&(C=!0,T=function(){return _.call(this)}),r&&!y||!p&&!C&&S[f]||a(S,f,T),s[t]=T,s[O]=d,v)if(b={values:x?T:w("values"),keys:m?T:w("keys"),entries:k},y)for(g in b)g in S||i(S,g,b[g]);else o(o.P+o.F*(p||C),t,b);return b}},function(e,t,n){e.exports=n(18)},function(e,t,n){"use strict";var r=n(57),o=n(32),i=n(58),a={};n(18)(a,n(10)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(22),o=n(24),i=n(36)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r=n(46),o=n(9),i=n(24),a=n(105),s=n(106),u=n(51),c=n(107),l=n(108);o(o.S+o.F*!n(110)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,y=0,b=l(p);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),null==b||d==Array&&s(b))for(n=new d(t=u(p.length));t>y;y++)c(n,y,m?v(p[y],y):p[y]);else for(f=b.call(p),n=new d;!(o=f.next()).done;y++)c(n,y,m?a(f,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){var r=n(20);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(38),o=n(10)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(19),o=n(32);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(109),o=n(10)("iterator"),i=n(38);e.exports=n(7).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(50),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,i){return(0,r.default)(e,t,n,i),{remove:function(){(0,o.default)(e,t,n,i)}}};var r=i(n(112)),o=i(n(113));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var o=function(){};r(n(26)).default&&(o=document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,(function(t){(t=t||window.event).target=t.target||t.srcElement,t.currentTarget=e,n.call(e,t)}))}:void 0);var i=o;t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var o=function(){};r(n(26)).default&&(o=document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0);var i=o;t.default=i,e.exports=t.default},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(C([])));m&&m!==t&&n.call(m,o)&&(h=m);var y=d.prototype=f.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,s){var u=c(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(117),o=n(118);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n0&&void 0!==arguments[0]?arguments[0]:r.props;r._portalContainerNode=(0,s.default)(e.container,(0,u.default)(r).body)},r.getMountNode=function(){return r._portalContainerNode},p(r,n)}return 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)}(t,e),t.prototype.componentDidMount=function(){this.setContainer(),this.forceUpdate(this.props.onRendered)},t.prototype.componentWillReceiveProps=function(e){e.container!==this.props.container&&this.setContainer(e)},t.prototype.componentWillUnmount=function(){this._portalContainerNode=null},t.prototype.render=function(){return this.props.children&&this._portalContainerNode?a.default.createPortal(this.props.children,this._portalContainerNode):null},t}(i.default.Component);d.displayName="Portal",d.propTypes={container:r.default.oneOfType([o.default,r.default.func]),onRendered:r.default.func},t.default=a.default.createPortal?d:c.default,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(1)),o=c(n(39)),i=c(n(0)),a=c(n(4)),s=c(n(40)),u=c(n(15));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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}var p=function(e){function t(){var n,r;l(this,t);for(var o=arguments.length,c=Array(o),p=0;p=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var v=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=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}(this,e.call(this,n,r));return o.getTarget=function(){var e=o.props.target,t="function"==typeof e?e():e;return t&&c.default.findDOMNode(t)||null},o.maybeUpdatePosition=function(e){var t=o.getTarget();(o.props.shouldUpdatePosition||t!==o._lastTarget||e)&&o.updatePosition(t)},o.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},o._needsFlush=!1,o._lastTarget=null,o}return 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)}(t,e),t.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},t.prototype.componentWillReceiveProps=function(){this._needsFlush=!0},t.prototype.componentDidUpdate=function(e){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==e.placement))},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=h(e,["children","className"]),a=this.state,c=a.positionLeft,l=a.positionTop,f=h(a,["positionLeft","positionTop"]);delete i.target,delete i.container,delete i.containerPadding,delete i.shouldUpdatePosition;var p=u.default.Children.only(t);return(0,s.cloneElement)(p,r({},i,f,{positionLeft:c,positionTop:l,className:(0,o.default)(n,p.props.className),style:r({},p.props.style,{left:c,top:l})}))},t.prototype.updatePosition=function(e){if(this._lastTarget=e,e){var t=c.default.findDOMNode(this),n=(0,f.default)(this.props.container,(0,p.default)(this).body);this.setState((0,l.default)(this.props.placement,t,e,n,this.props.containerPadding))}else this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null})},t}(u.default.Component);v.propTypes={target:i.default.oneOfType([a.default,i.default.func]),container:i.default.oneOfType([a.default,i.default.func]),containerPadding:i.default.number,placement:i.default.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:i.default.bool},v.displayName="Position",v.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t.default=v,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,i,a){var s="BODY"===i.tagName?(0,r.default)(n):(0,o.default)(n,i),c=(0,r.default)(t),l=c.height,f=c.width,p=void 0,d=void 0,h=void 0,v=void 0;if("left"===e||"right"===e){d=s.top+(s.height-l)/2,p="left"===e?s.left-f:s.left+s.width;var m=function(e,t,n,r){var o=u(n),i=o.scroll,a=o.height,s=e-r-i,c=e+r-i+t;return s<0?-s:c>a?a-c:0}(d,l,i,a);d+=m,v=50*(1-2*m/l)+"%",h=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');p=s.left+(s.width-f)/2,d="top"===e?s.top-l:s.top+s.height;var y=function(e,t,n,r){var o=u(n).width,i=e-r,a=e+r+t;if(i<0)return-i;if(a>o)return o-a;return 0}(p,f,i,a);p+=y,h=50*(1-2*y/f)+"%",v=void 0}return{positionLeft:p,positionTop:d,arrowOffsetLeft:h,arrowOffsetTop:v}};var r=s(n(59)),o=s(n(124)),i=s(n(62)),a=s(n(15));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=void 0,n=void 0,o=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,o=(0,i.default)((0,a.default)(e).documentElement)||(0,i.default)(e);else{var s=(0,r.default)(e);t=s.width,n=s.height,o=(0,i.default)(e)}return{width:t,height:n,scroll:o}}e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t){var n,r={top:0,left:0};"fixed"===(0,c.default)(e,"position")?n=e.getBoundingClientRect():(t=t||(0,a.default)(e),n=(0,i.default)(e),"html"!==function(e){return e.nodeName&&e.nodeName.toLowerCase()}(t)&&(r=(0,i.default)(t)),r.top+=parseInt((0,c.default)(t,"borderTopWidth"),10)-(0,s.default)(t)||0,r.left+=parseInt((0,c.default)(t,"borderLeftWidth"),10)-(0,u.default)(t)||0);return(0,o.default)({},n,{top:n.top-r.top-(parseInt((0,c.default)(e,"marginTop"),10)||0),left:n.left-r.left-(parseInt((0,c.default)(e,"marginLeft"),10)||0)})};var o=r(n(125)),i=r(n(59)),a=r(n(126)),s=r(n(62)),u=r(n(134)),c=r(n(60));e.exports=t.default},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var p=n(65),d=n.n(p);function h(){return(h=d.a||function(e){for(var t=1;t1)||(o=t,!1)})),o?new Error("(children) "+r+" - Duplicate children detected of bsRole: "+o+". Only one child each allowed with the following bsRoles: "+t.join(", ")):null}))}(De)),disabled:w.a.bool,pullRight:w.a.bool,open:w.a.bool,defaultOpen:w.a.bool,onToggle:w.a.func,onSelect:w.a.func,role:w.a.string,rootCloseEvent:w.a.oneOf(["click","mousedown"]),onMouseEnter:w.a.func,onMouseLeave:w.a.func},Ie={componentClass:Ee},Ue=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(K(K(r))),r.handleKeyDown=r.handleKeyDown.bind(K(K(r))),r.handleClose=r.handleClose.bind(K(K(r))),r._focusInDropdown=!1,r.lastOpenEventType=null,r}y(t,e);var n=t.prototype;return n.componentDidMount=function(){this.focusNextOnOpen()},n.componentWillUpdate=function(e){!e.open&&this.props.open&&(this._focusInDropdown=ce()(de.a.findDOMNode(this.menu),se()(document)))},n.componentDidUpdate=function(e){var t=this.props.open,n=e.open;t&&!n&&this.focusNextOnOpen(),!t&&n&&this._focusInDropdown&&(this._focusInDropdown=!1,this.focus())},n.focus=function(){var e=de.a.findDOMNode(this.toggle);e&&e.focus&&e.focus()},n.focusNextOnOpen=function(){var e=this.menu;e&&e.focusNext&&("keydown"!==this.lastOpenEventType&&"menuitem"!==this.props.role||e.focusNext())},n.handleClick=function(e){this.props.disabled||this.toggleOpen(e,{source:"click"})},n.handleClose=function(e,t){this.props.open&&this.toggleOpen(e,t)},n.handleKeyDown=function(e){if(!this.props.disabled)switch(e.keyCode){case fe.a.codes.down:this.props.open?this.menu.focusNext&&this.menu.focusNext():this.toggleOpen(e,{source:"keydown"}),e.preventDefault();break;case fe.a.codes.esc:case fe.a.codes.tab:this.handleClose(e,{source:"keydown"})}},n.toggleOpen=function(e,t){var n=!this.props.open;n&&(this.lastOpenEventType=t.source),this.props.onToggle&&this.props.onToggle(n,e,t)},n.renderMenu=function(e,t){var n=this,o=t.id,i=t.onSelect,a=t.rootCloseEvent,s=f(t,["id","onSelect","rootCloseEvent"]),u=function(e){n.menu=e};return"string"==typeof e.ref||(u=Y(e.ref,u)),Object(r.cloneElement)(e,h({},s,{ref:u,labelledBy:o,bsClass:I(s,"menu"),onClose:Y(e.props.onClose,this.handleClose),onSelect:Y(e.props.onSelect,i,(function(e,t){return n.handleClose(t,{source:"select"})})),rootCloseEvent:a}))},n.renderToggle=function(e,t){var n=this,o=function(e){n.toggle=e};return"string"==typeof e.ref||(o=Y(e.ref,o)),Object(r.cloneElement)(e,h({},t,{ref:o,bsClass:I(t,"toggle"),onClick:Y(e.props.onClick,this.handleClick),onKeyDown:Y(e.props.onKeyDown,this.handleKeyDown)}))},n.render=function(){var e,t=this,n=this.props,r=n.componentClass,i=n.id,a=n.dropup,s=n.disabled,u=n.pullRight,c=n.open,l=n.onSelect,p=n.role,d=n.bsClass,v=n.className,m=n.rootCloseEvent,y=n.children,b=f(n,["componentClass","id","dropup","disabled","pullRight","open","onSelect","role","bsClass","className","rootCloseEvent","children"]);delete b.onToggle;var E=((e={})[d]=!0,e.open=c,e.disabled=s,e);return a&&(E[d]=!1,E.dropup=!0),o.a.createElement(r,h({},b,{className:g()(v,E)}),Se.map(y,(function(e){switch(e.props.bsRole){case Ae:return t.renderToggle(e,{id:i,disabled:s,open:c,role:p,bsClass:d});case De:return t.renderMenu(e,{id:i,open:c,pullRight:u,bsClass:d,onSelect:l,rootCloseEvent:m});default:return e}})))},t}(o.a.Component);Ue.propTypes=Le,Ue.defaultProps=Ie,U("dropdown",Ue);var Fe=ye()(Ue,{open:"onToggle"});Fe.Toggle=Pe,Fe.Menu=ke;var He=Fe;var Ve=h({},He.propTypes,{bsStyle:w.a.string,bsSize:w.a.string,title:w.a.node.isRequired,noCaret:w.a.bool,children:w.a.node}),Be=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.bsSize,n=e.bsStyle,r=e.title,i=e.children,a=function(e,t){var n=t.propTypes,r={},o={};return S()(e).forEach((function(e){var t=e[0],i=e[1];n[t]?r[t]=i:o[t]=i})),[r,o]}(f(e,["bsSize","bsStyle","title","children"]),He.ControlledComponent),s=a[0],u=a[1];return o.a.createElement(He,h({},s,{bsSize:t,bsStyle:n}),o.a.createElement(He.Toggle,h({},u,{bsSize:t,bsStyle:n}),r),o.a.createElement(He.Menu,null,i))},t}(o.a.Component);Be.propTypes=Ve;var We=Be,ze=U("input-group-addon",function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component)),Ge=U("input-group-btn",function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component)),Ke=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component);Ke.Addon=ze,Ke.Button=Ge;var Ye=U("input-group",H([k,M],Ke)),Xe={glyph:w.a.string.isRequired},$e=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e,t=this.props,n=t.glyph,r=t.className,i=z(f(t,["glyph","className"])),a=i[0],s=i[1],u=h({},V(a),((e={})[I(a,n)]=!0,e));return o.a.createElement("span",h({},s,{className:g()(r,u)}))},t}(o.a.Component);$e.propTypes=Xe;var qe=U("glyphicon",$e),Ze={$bs_formGroup:w.a.object},Qe=function(e){function t(){return e.apply(this,arguments)||this}y(t,e);var n=t.prototype;return n.getGlyph=function(e){switch(e){case"success":return"ok";case"warning":return"warning-sign";case"error":return"remove";default:return null}},n.renderDefaultFeedback=function(e,t,n,r){var i=this.getGlyph(e&&e.validationState);return i?o.a.createElement(qe,h({},r,{glyph:i,className:g()(t,n)})):null},n.render=function(){var e=this.props,t=e.className,n=e.children,r=z(f(e,["className","children"])),i=r[0],a=r[1],s=V(i);if(!n)return this.renderDefaultFeedback(this.context.$bs_formGroup,t,s,a);var u=o.a.Children.only(n);return o.a.cloneElement(u,h({},a,{className:g()(u.props.className,t,s)}))},t}(o.a.Component);Qe.defaultProps={bsRole:"feedback"},Qe.contextTypes=Ze;var Je=U("form-control-feedback",Qe),et={componentClass:x.a},tt=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,r=z(f(e,["componentClass","className"])),i=r[0],a=r[1],s=V(i);return o.a.createElement(t,h({},a,{className:g()(n,s)}))},t}(o.a.Component);tt.propTypes=et,tt.defaultProps={componentClass:"p"};var nt=U("form-control-static",tt),rt={componentClass:x.a,type:w.a.string,id:w.a.string,inputRef:w.a.func},ot={$bs_formGroup:w.a.object},it=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e,t=this.context.$bs_formGroup,n=t&&t.controlId,r=this.props,i=r.componentClass,a=r.type,s=r.id,u=void 0===s?n:s,c=r.inputRef,l=r.className,p=r.bsSize,d=z(f(r,["componentClass","type","id","inputRef","className","bsSize"])),v=d[0],m=d[1];("file"!==a&&(e=V(v)),p)&&(e[I({bsClass:"input"},P[p]||p)]=!0);return o.a.createElement(i,h({},m,{type:a,id:u,ref:c,className:g()(l,e)}))},t}(o.a.Component);it.propTypes=rt,it.defaultProps={componentClass:"input"},it.contextTypes=ot,it.Feedback=Je,it.Static=nt;var at=U("form-control",H([M,k],it));function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var n=0;n3&&(i="success"),o.a.createElement(ee,{onClick:function(){return e.setState({current_rating:n,text:"",dropdown_value:"Not specified"})},bsStyle:t===n?i:"default",disabled:e.state.submitting,key:"button-rating-"+n},r[n-1])})),a=null,s=null,u=null;if(null!==t&&3!==t){var c=(t>3?this.GOOD_REASONS:this.BAD_REASONS).map((function(t){return o.a.createElement(ie,{key:"dropdown-item-"+t,eventKey:t,onSelect:function(t){return e.setState({dropdown_value:t,text:""})}},t)}));a=o.a.createElement(We,{dropup:!0,componentClass:Ye.Button,title:this.state.dropdown_value,id:"review-dropdown",disabled:this.state.submitting},c)}null!==a&&"Other"===this.state.dropdown_value&&(s=o.a.createElement(at,{type:"text",placeholder:"Enter reason (optional)",value:this.state.text,onChange:function(t){return e.setState({text:t.target.value})},disabled:this.state.submitting})),null!=a&&(u=o.a.createElement("div",{style:{marginBottom:"8px"}},"Give a reason for your rating (optional):",o.a.createElement(Ye,null,a,s)));var l=this.state.submitting||null==t;return o.a.createElement("div",null,"Rate your chat partner (fully optional & confidential):",o.a.createElement("br",null),o.a.createElement(Ee,null,i),u,o.a.createElement("div",{style:{marginBottom:"8px"}},o.a.createElement(Ee,{style:{marginBottom:"8px"}},o.a.createElement(ee,{disabled:l,bsStyle:"info",onClick:function(){e.setState({submitting:!0});var t={rating:e.state.current_rating,reason_category:e.state.dropdown_value,reason:e.state.text};e.props.onMessageSend({text:"[PEER_REVIEW]",task_data:t}).then((function(){return e.setState({submitted:!0})})),e.props.onChoice(!0)}},this.state.submitted?"Submitted!":"Submit Review"),o.a.createElement(ee,{disabled:this.state.submitting,onClick:function(){return e.props.onChoice(!1)}},"Decline Review"))))}}])&&ut(t.prototype,n),r&&ut(t,r),a}(o.a.Component);function mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function un(e,t,n){return(un="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qt(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function cn(e,t,n,r){var o=de.a.unstable_batchedUpdates?function(e){de.a.unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,o)}}}var ln=function(e){var t=e.prefixCls,n=e.vertical,r=e.reverse,i=e.marks,a=e.dots,s=e.step,u=e.included,c=e.lowerBound,l=e.upperBound,f=e.max,p=e.min,d=e.dotStyle,h=e.activeDotStyle,v=f-p,m=function(e,t,n,r,o,i){on(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(n&&r)for(var s=o;s<=i;s+=r)-1===a.indexOf(s)&&a.push(s);return a}(0,i,a,s,p,f).map((function(e){var i,a="".concat(Math.abs(e-p)/v*100,"%"),s=!u&&e===l||u&&e<=l&&e>=c,f=zt(zt({},d),{},Bt({},n?r?"top":"bottom":r?"right":"left",a));s&&(f=zt(zt({},f),h));var m=g()((Bt(i={},"".concat(t,"-dot"),!0),Bt(i,"".concat(t,"-dot-active"),s),Bt(i,"".concat(t,"-dot-reverse"),r),i));return o.a.createElement("span",{className:m,style:f,key:e})}));return o.a.createElement("div",{className:"".concat(t,"-step")},m)},fn=function(e){var t=e.className,n=e.vertical,r=e.reverse,i=e.marks,a=e.included,s=e.upperBound,u=e.lowerBound,c=e.max,l=e.min,f=e.onClickLabel,p=Object.keys(i),d=c-l,h=p.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var c,p=i[e],h="object"===Zt(p)&&!o.a.isValidElement(p),v=h?p.label:p;if(!v&&0!==v)return null;var m=!a&&e===s||a&&e<=s&&e>=u,y=g()((Bt(c={},"".concat(t,"-text"),!0),Bt(c,"".concat(t,"-text-active"),m),c)),b=Bt({marginBottom:"-50%"},r?"top":"bottom","".concat((e-l)/d*100,"%")),E=Bt({transform:"translateX(".concat(r?"50%":"-50%",")"),msTransform:"translateX(".concat(r?"50%":"-50%",")")},r?"right":"left","".concat((e-l)/d*100,"%")),w=n?b:E,O=h?zt(zt({},w),p.style):w;return o.a.createElement("span",{className:y,style:O,key:e,onMouseDown:function(t){return f(t,e)},onTouchStart:function(t){return f(t,e)}},v)}));return o.a.createElement("div",{className:t},h)},pn=function(e){$t(n,e);var t=en(n);function n(){var e;return Gt(this,n),(e=t.apply(this,arguments)).state={clickFocused:!1},e.setHandleRef=function(t){e.handle=t},e.handleMouseUp=function(){document.activeElement===e.handle&&e.setClickFocus(!0)},e.handleMouseDown=function(t){t.preventDefault(),e.focus()},e.handleBlur=function(){e.setClickFocus(!1)},e.handleKeyDown=function(){e.setClickFocus(!1)},e}return Yt(n,[{key:"componentDidMount",value:function(){this.onMouseUpListener=cn(document,"mouseup",this.handleMouseUp)}},{key:"componentWillUnmount",value:function(){this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"setClickFocus",value:function(e){this.setState({clickFocused:e})}},{key:"clickFocus",value:function(){this.setClickFocus(!0),this.focus()}},{key:"focus",value:function(){this.handle.focus()}},{key:"blur",value:function(){this.handle.blur()}},{key:"render",value:function(){var e,t,n,r=this.props,i=r.prefixCls,a=r.vertical,s=r.reverse,u=r.offset,c=r.style,l=r.disabled,f=r.min,p=r.max,d=r.value,h=r.tabIndex,v=r.ariaLabel,m=r.ariaLabelledBy,y=r.ariaValueTextFormatter,b=sn(r,["prefixCls","vertical","reverse","offset","style","disabled","min","max","value","tabIndex","ariaLabel","ariaLabelledBy","ariaValueTextFormatter"]),E=g()(this.props.className,Bt({},"".concat(i,"-handle-click-focused"),this.state.clickFocused)),w=a?(Bt(e={},s?"top":"bottom","".concat(u,"%")),Bt(e,s?"bottom":"top","auto"),Bt(e,"transform",s?null:"translateY(+50%)"),e):(Bt(t={},s?"right":"left","".concat(u,"%")),Bt(t,s?"left":"right","auto"),Bt(t,"transform","translateX(".concat(s?"+":"-","50%)")),t),O=zt(zt({},c),w),x=h||0;return(l||null===h)&&(x=null),y&&(n=y(d)),o.a.createElement("div",Object.assign({ref:this.setHandleRef,tabIndex:x},b,{className:E,style:O,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,role:"slider","aria-valuemin":f,"aria-valuemax":p,"aria-valuenow":d,"aria-disabled":!!l,"aria-label":v,"aria-labelledby":m,"aria-valuetext":n}))}}]),n}(o.a.Component);function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=mn.F1&&t<=mn.F12)return!1;switch(t){case mn.ALT:case mn.CAPS_LOCK:case mn.CONTEXT_MENU:case mn.CTRL:case mn.DOWN:case mn.END:case mn.ESC:case mn.HOME:case mn.INSERT:case mn.LEFT:case mn.MAC_FF_META:case mn.META:case mn.NUMLOCK:case mn.NUM_CENTER:case mn.PAGE_DOWN:case mn.PAGE_UP:case mn.PAUSE:case mn.PRINT_SCREEN:case mn.RIGHT:case mn.SHIFT:case mn.UP:case mn.WIN_KEY:case mn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=mn.ZERO&&e<=mn.NINE)return!0;if(e>=mn.NUM_ZERO&&e<=mn.NUM_MULTIPLY)return!0;if(e>=mn.A&&e<=mn.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case mn.SPACE:case mn.QUESTION_MARK:case mn.NUM_PLUS:case mn.NUM_MINUS:case mn.NUM_PERIOD:case mn.NUM_DIVISION:case mn.SEMICOLON:case mn.DASH:case mn.EQUALS:case mn.COMMA:case mn.PERIOD:case mn.SLASH:case mn.APOSTROPHE:case mn.SINGLE_QUOTE:case mn.OPEN_SQUARE_BRACKET:case mn.BACKSLASH:case mn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},yn=mn;function bn(e,t){try{return Object.keys(t).some((function(n){return e.target===Object(pe.findDOMNode)(t[n])}))}catch(e){return!1}}function gn(e,t){var n=t.min,r=t.max;return er}function En(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function wn(e,t){var n=t.marks,r=t.step,o=t.min,i=t.max,a=Object.keys(n).map(parseFloat);if(null!==r){var s=Math.floor((i-o)/r),u=Math.min((e-o)/r,s),c=Math.round(u)*r+o;a.push(c)}var l=a.map((function(t){return Math.abs(e-t)}));return a[l.indexOf(Math.min.apply(Math,vn(l)))]}function On(e,t){return e?t.clientY:t.pageX}function xn(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function Cn(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:window.pageXOffset+n.left+.5*n.width}function Sn(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function _n(e,t){var n=t.step,r=isFinite(wn(e,t))?wn(e,t):0;return null===n?r:parseFloat(r.toFixed(function(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}(n)))}function Tn(e){e.stopPropagation(),e.preventDefault()}function kn(e,t,n){var r="increase";switch(e.keyCode){case yn.UP:r=t&&n?"decrease":"increase";break;case yn.RIGHT:r=!t&&n?"decrease":"increase";break;case yn.DOWN:r=t&&n?"increase":"decrease";break;case yn.LEFT:r=!t&&n?"increase":"decrease";break;case yn.END:return function(e,t){return t.max};case yn.HOME:return function(e,t){return t.min};case yn.PAGE_UP:return function(e,t){return e+2*t.step};case yn.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,n){var r={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},o=r[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[o];return n.step?r[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}(r,e,t)}}function Mn(){}function Nn(e){var t;return(t=function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onMouseDown=function(e){if(0===e.button){var t=r.props.vertical,n=On(t,e);if(bn(e,r.handlesRefs)){var o=Cn(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.removeDocumentEvents(),r.onStart(n),r.addDocumentMouseEvents()}},r.onTouchStart=function(e){if(!En(e)){var t=r.props.vertical,n=xn(t,e);if(bn(e,r.handlesRefs)){var o=Cn(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.onStart(n),r.addDocumentTouchEvents(),Tn(e)}},r.onFocus=function(e){var t=r.props,n=t.onFocus,o=t.vertical;if(bn(e,r.handlesRefs)){var i=Cn(o,e.target);r.dragOffset=0,r.onStart(i),Tn(e),n&&n(e)}},r.onBlur=function(e){var t=r.props.onBlur;r.onEnd(),t&&t(e)},r.onMouseUp=function(){r.handlesRefs[r.prevMovedHandleIndex]&&r.handlesRefs[r.prevMovedHandleIndex].clickFocus()},r.onMouseMove=function(e){if(r.sliderRef){var t=On(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onTouchMove=function(e){if(!En(e)&&r.sliderRef){var t=xn(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onKeyDown=function(e){r.sliderRef&&bn(e,r.handlesRefs)&&r.onKeyboard(e)},r.onClickMarkLabel=function(e,t){e.stopPropagation(),r.onChange({value:t}),r.setState({value:t},(function(){return r.onEnd(!0)}))},r.saveSlider=function(e){r.sliderRef=e};var o=e.step,i=e.max,a=e.min,s=!isFinite(i-a)||(i-a)%o==0;return on(!o||Math.floor(o)!==o||s,"Slider[max] - Slider[min] (".concat(i-a,") should be a multiple of Slider[step] (").concat(o,")")),r.handlesRefs={},r}return Yt(n,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,n=e.disabled;t&&!n&&this.focus()}},{key:"componentWillUnmount",value:function(){un(qt(n.prototype),"componentWillUnmount",this)&&un(qt(n.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,n=t.vertical,r=t.reverse,o=e.getBoundingClientRect();return n?r?o.bottom:o.top:window.pageXOffset+(r?o.right:o.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=cn(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=cn(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=cn(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=cn(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){this.props.disabled||this.handlesRefs[0].focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){e.handlesRefs[t]&&e.handlesRefs[t].blur&&e.handlesRefs[t].blur()}))}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,o=t.max,i=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-i)*(o-r)+r:i*(o-r)+r}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min,r=(e-n)/(t.max-n);return Math.max(0,100*r)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,t=this.props,r=t.prefixCls,i=t.className,a=t.marks,s=t.dots,u=t.step,c=t.included,l=t.disabled,f=t.vertical,p=t.reverse,d=t.min,h=t.max,v=t.children,m=t.maximumTrackStyle,y=t.style,b=t.railStyle,E=t.dotStyle,w=t.activeDotStyle,O=un(qt(n.prototype),"render",this).call(this),x=O.tracks,C=O.handles,S=g()(r,(Bt(e={},"".concat(r,"-with-marks"),Object.keys(a).length),Bt(e,"".concat(r,"-disabled"),l),Bt(e,"".concat(r,"-vertical"),f),Bt(e,i,i),e));return o.a.createElement("div",{ref:this.saveSlider,className:S,onTouchStart:l?Mn:this.onTouchStart,onMouseDown:l?Mn:this.onMouseDown,onMouseUp:l?Mn:this.onMouseUp,onKeyDown:l?Mn:this.onKeyDown,onFocus:l?Mn:this.onFocus,onBlur:l?Mn:this.onBlur,style:y},o.a.createElement("div",{className:"".concat(r,"-rail"),style:zt(zt({},m),b)}),x,o.a.createElement(ln,{prefixCls:r,vertical:f,reverse:p,marks:a,dots:s,step:u,included:c,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:d,dotStyle:E,activeDotStyle:w}),C,o.a.createElement(fn,{className:"".concat(r,"-mark"),onClickLabel:l?Mn:this.onClickMarkLabel,vertical:f,marks:a,included:c,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:d,reverse:p}),v)}}]),n}(e)).displayName="ComponentEnhancer(".concat(e.displayName,")"),t.defaultProps=zt(zt({},e.defaultProps),{},{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=sn(e,["index"]);return delete n.dragging,null===n.value?null:o.a.createElement(pn,Object.assign({},n,{key:t}))},onBeforeChange:Mn,onChange:Mn,onAfterChange:Mn,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),t}var Pn=Nn(function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.dragging;r.removeDocumentEvents(),(t||e)&&r.props.onAfterChange(r.getValue()),r.setState({dragging:!1})};var o=void 0!==e.defaultValue?e.defaultValue:e.min,i=void 0!==e.value?e.value:o;return r.state={value:r.trimAlignValue(i),dragging:!1},on(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),on(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),r}return Yt(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){if("value"in this.props||"min"in this.props||"max"in this.props){var n=this.props,r=n.value,o=n.onChange,i=void 0!==r?r:t.value,a=this.trimAlignValue(i,this.props);a!==t.value&&(this.setState({value:a}),gn(i,this.props)&&o(a))}}},{key:"onChange",value:function(e){var t=this.props,n=!("value"in t),r=e.value>this.props.max?zt(zt({},e),{},{value:this.props.max}):e;n&&this.setState(r);var o=r.value;t.onChange(o)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,n=this.getValue();t.onBeforeChange(n);var r=this.calcValueByPos(e);this.startValue=r,this.startPosition=e,r!==n&&(this.prevMovedHandleIndex=0,this.onChange({value:r}))}},{key:"onMove",value:function(e,t){Tn(e);var n=this.state.value,r=this.calcValueByPos(t);r!==n&&this.onChange({value:r})}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=kn(e,t.vertical,n);if(r){Tn(e);var o=this.state.value,i=r(o,this.props),a=this.trimAlignValue(i);if(a===o)return;this.onChange({value:a}),this.props.onAfterChange(a),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){return this.props.min}},{key:"getUpperBound",value:function(){return this.state.value}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var n=zt(zt({},this.props),t),r=Sn(e,n);return _n(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,i=t.included,a=t.disabled,s=t.minimumTrackStyle,u=t.trackStyle,c=t.handleStyle,l=t.tabIndex,f=t.ariaLabelForHandle,p=t.ariaLabelledByForHandle,d=t.ariaValueTextFormatterForHandle,h=t.min,v=t.max,m=t.startPoint,y=t.reverse,b=t.handle,g=this.state,E=g.value,w=g.dragging,O=this.calcOffset(E),x=b({className:"".concat(n,"-handle"),prefixCls:n,vertical:r,offset:O,value:E,dragging:w,disabled:a,min:h,max:v,reverse:y,index:0,tabIndex:l,ariaLabel:f,ariaLabelledBy:p,ariaValueTextFormatter:d,style:c[0]||c,ref:function(t){return e.saveHandle(0,t)}}),C=void 0!==m?this.calcOffset(m):0,S=u[0]||u;return{tracks:o.a.createElement(an,{className:"".concat(n,"-track"),vertical:r,included:i,offset:C,reverse:y,length:O-C,style:zt(zt({},s),S)}),handles:x}}}]),n}(o.a.Component)),Rn=n(70),jn=n.n(Rn),An=function(e){var t=e.value,n=e.handle,r=e.bounds,o=e.props,i=o.allowCross,a=o.pushable,s=Number(a),u=Sn(t,o),c=u;return i||null==n||void 0===r||(n>0&&u<=r[n-1]+s&&(c=r[n-1]+s),n=r[n+1]-s&&(c=r[n+1]-s)),_n(c,o)},Dn=function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.handle;r.removeDocumentEvents(),(null!==t||e)&&r.props.onAfterChange(r.getValue()),r.setState({handle:null})};var o=e.count,i=e.min,a=e.max,s=Array.apply(void 0,vn(Array(o+1))).map((function(){return i})),u="defaultValue"in e?e.defaultValue:s,c=(void 0!==e.value?e.value:u).map((function(t,n){return An({value:t,handle:n,props:e})})),l=c[0]===a?0:c.length-1;return r.state={handle:null,recent:l,bounds:c},r}return Yt(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(("value"in this.props||"min"in this.props||"max"in this.props)&&(this.props.min!==e.min||this.props.max!==e.max||!jn()(this.props.value,e.value))){var r=this.props,o=r.onChange,i=r.value||t.bounds;if(i.some((function(e){return gn(e,n.props)})))o(i.map((function(e){return Sn(e,n.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var n={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),Object.keys(n).length&&this.setState(n)}var r=zt(zt({},this.state),e).bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var o=this.calcValueByPos(e);this.startValue=o,this.startPosition=e;var i=this.getClosestBound(o);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(o,i),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),o!==r[this.prevMovedHandleIndex]){var a=vn(n.bounds);a[this.prevMovedHandleIndex]=o,this.onChange({bounds:a})}}},{key:"onMove",value:function(e,t){Tn(e);var n=this.state,r=this.calcValueByPos(t);r!==n.bounds[n.handle]&&this.moveTo(r)}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=kn(e,t.vertical,n);if(r){Tn(e);var o=this.state,i=this.props,a=o.bounds,s=o.handle,u=a[null===s?o.recent:s],c=r(u,i),l=An({value:c,handle:s,bounds:o.bounds,props:i});if(l===u)return;this.moveTo(l,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;r=t[r]&&(n=r);return Math.abs(t[n+1]-e)=r.length||o<0)return!1;var i=t+n,a=r[o],s=this.props.pushable,u=Number(s),c=n*(e[i]-a);return!!this.pushHandle(e,i,n,u-c)&&(e[t]=a,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,n=t.handle,r=t.bounds;return An({value:e,handle:n,bounds:r,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,i=this.props,a=i.prefixCls,s=i.vertical,u=i.included,c=i.disabled,l=i.min,f=i.max,p=i.reverse,d=i.handle,h=i.trackStyle,v=i.handleStyle,m=i.tabIndex,y=i.ariaLabelGroupForHandles,b=i.ariaLabelledByGroupForHandles,E=i.ariaValueTextFormatterGroupForHandles,w=r.map((function(t){return e.calcOffset(t)})),O="".concat(a,"-handle"),x=r.map((function(t,r){var o,i=m[r]||0;(c||null===m[r])&&(i=null);var u=n===r;return d({className:g()((o={},Bt(o,O,!0),Bt(o,"".concat(O,"-").concat(r+1),!0),Bt(o,"".concat(O,"-dragging"),u),o)),prefixCls:a,vertical:s,dragging:u,offset:w[r],value:t,index:r,tabIndex:i,min:l,max:f,reverse:p,disabled:c,style:v[r],ref:function(t){return e.saveHandle(r,t)},ariaLabel:y[r],ariaLabelledBy:b[r],ariaValueTextFormatter:E[r]})}));return{tracks:r.slice(0,-1).map((function(e,t){var n,r=t+1,i=g()((Bt(n={},"".concat(a,"-track"),!0),Bt(n,"".concat(a,"-track-").concat(r),!0),n));return o.a.createElement(an,{className:i,vertical:s,reverse:p,included:u,offset:w[r-1],length:w[r]-w[r-1],style:h[t],key:r})})),handles:x}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if("value"in e||"min"in e||"max"in e){var n=(e.value||t.bounds).map((function(n,r){return An({value:n,handle:r,bounds:t.bounds,props:e})}));return n.length===t.bounds.length&&n.every((function(e,n){return e===t.bounds[n]}))?null:zt(zt({},t),{},{bounds:n})}return null}}]),n}(o.a.Component);Dn.displayName="Range",Dn.defaultProps={count:1,allowCross:!0,pushable:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var Ln=Nn(Dn),In=function(e){return+setTimeout(e,16)},Un=function(e){return clearTimeout(e)};function Fn(e){return In(e)}function Hn(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function Vn(e){return e instanceof HTMLElement?e:de.a.findDOMNode(e)}"undefined"!=typeof window&&"requestAnimationFrame"in window&&(In=function(e){return window.requestAnimationFrame(e)},Un=function(e){return window.cancelAnimationFrame(e)}),Fn.cancel=Un;var Bn=n(42);function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zn(e,t){"function"==typeof e?e(t):"object"===Wn(e)&&e&&"current"in e&&(e.current=t)}function Gn(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:2;t();var i=Fn((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),2),a=i[0],s=i[1];return pr((function(){if("none"!==n&&"end"!==n){var t=dr.indexOf(n),r=dr[t+1],i=e(n);!1===i?o(r):a((function(e){function t(){e.isCanceled()||o(r)}!0===i?t():Promise.resolve(i).then(t)}))}}),[n]),r.useEffect((function(){return function(){s()}}),[]),[function(){o("prepare")},n]};function mr(e,t,n,o){var i=o.motionEnter,a=void 0===i||i,s=o.motionAppear,u=void 0===s||s,c=o.motionLeave,l=void 0===c||c,f=o.motionDeadline,p=o.motionLeaveImmediately,d=o.onAppearPrepare,h=o.onEnterPrepare,v=o.onLeavePrepare,m=o.onAppearStart,y=o.onEnterStart,b=o.onLeaveStart,g=o.onAppearActive,E=o.onEnterActive,w=o.onLeaveActive,O=o.onAppearEnd,x=o.onEnterEnd,C=o.onLeaveEnd,S=qn(Object(r.useState)("none"),2),_=S[0],T=S[1],k=qn(Object(r.useState)(null),2),M=k[0],N=k[1],P=Object(r.useRef)(!1),R=Object(r.useRef)(null),j=Object(r.useRef)(null);function A(){return n()||j.current}var D=Object(r.useRef)(!1);function L(e){var t,n=A();e&&!e.deadline&&e.target!==n||("appear"===_&&D.current?t=null==O?void 0:O(n,e):"enter"===_&&D.current?t=null==x?void 0:x(n,e):"leave"===_&&D.current&&(t=null==C?void 0:C(n,e)),!1!==t&&(T("none"),N(null)))}var I=qn(function(e){var t=Object(r.useRef)(),n=Object(r.useRef)(e);n.current=e;var o=r.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(lr,o),e.removeEventListener(cr,o))}return r.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(lr,o),e.addEventListener(cr,o),t.current=e)},i]}(L),1)[0],U=r.useMemo((function(){var e,t,n;switch(_){case"appear":return Bt(e={},"prepare",d),Bt(e,"start",m),Bt(e,"active",g),e;case"enter":return Bt(t={},"prepare",h),Bt(t,"start",y),Bt(t,"active",E),t;case"leave":return Bt(n={},"prepare",v),Bt(n,"start",b),Bt(n,"active",w),n;default:return{}}}),[_]),F=qn(vr((function(e){if("prepare"===e){var t=U.prepare;return!!t&&t(A())}var n;V in U&&N((null===(n=U[V])||void 0===n?void 0:n.call(U,A(),null))||null);return"active"===V&&(I(A()),f>0&&(clearTimeout(R.current),R.current=setTimeout((function(){L({deadline:!0})}),f))),!0})),2),H=F[0],V=F[1],B=hr(V);D.current=B,pr((function(){if(e){var n,r=P.current;P.current=!0,!r&&t&&u&&(n="appear"),r&&t&&a&&(n="enter"),(r&&!t&&l||!r&&p&&!t&&l)&&(n="leave"),n&&(T(n),H())}}),[t]),Object(r.useEffect)((function(){("appear"===_&&!u||"enter"===_&&!a||"leave"===_&&!l)&&T("none")}),[u,a,l]),Object(r.useEffect)((function(){return function(){clearTimeout(R.current)}}),[]);var W=M;return U.prepare&&"start"===V&&(W=zt({transition:"none"},W)),[_,V,W]}var yr=function(e){$t(n,e);var t=en(n);function n(){return Gt(this,n),t.apply(this,arguments)}return Yt(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);var br=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Zt(e)&&(t=e.transitionSupport);var o=r.forwardRef((function(e,t){var o=e.visible,i=void 0===o||o,a=e.removeOnLeave,s=void 0===a||a,u=e.children,c=e.motionName,l=e.leavedClassName,f=e.eventProps,p=n(e),d=Object(r.useRef)(),h=Object(r.useRef)();var v=qn(mr(p,i,(function(){try{return Vn(d.current||h.current)}catch(e){return null}}),e),3),m=v[0],y=v[1],b=v[2],E=Object(r.useRef)(t);E.current=t;var w,O=r.useCallback((function(e){d.current=e,zn(E.current,e)}),[]);if(u)if("none"!==m&&n(e)){var x,C;"prepare"===y?C="prepare":hr(y)?C="active":"start"===y&&(C="start"),w=u(zt(zt({},f),{},{className:g()(fr(c,m),(x={},Bt(x,fr(c,"".concat(m,"-").concat(C)),C),Bt(x,c,"string"==typeof c),x)),style:b}),O)}else w=i?u(zt({},f),O):s?null:u(zt(zt({},f),{},{className:l}),O);else w=null;return r.createElement(yr,{ref:h},w)}));return o.displayName="CSSMotion",o}(ur);function gr(e){var t;return zt(zt({},t=e&&"object"===Zt(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Er(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(gr)}function wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=Er(e),a=Er(t);i.forEach((function(e){for(var t=!1,i=r;i1}));return u.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var Or=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:br,n=function(n){$t(i,n);var o=en(i);function i(){var e;return Gt(this,i),(e=o.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:zt(zt({},e),{},{status:"removed"})}))}}))},e}return Yt(i,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,s=sn(o,["component","children"]),u=i||r.Fragment,c={};return Or.forEach((function(e){c[e]=s[e],delete s[e]})),delete s.keys,r.createElement(u,Object.assign({},s),n.map((function(n){var o=n.status,i=sn(n,["status"]),s="add"===o||"keep"===o;return r.createElement(t,Object.assign({},c,{key:i.key,visible:s,eventProps:i,onLeaveEnd:function(){c.onLeaveEnd&&c.onLeaveEnd.apply(c,arguments),e.removeKey(i.key)}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(t,n){var r=t.keys,o=n.keyEntities,i=Er(r);if(!e)return{keyEntities:i.map((function(e){return zt(zt({},e),{},{status:"keep"})}))};var a=wr(o,i),s=o.length;return{keyEntities:a.filter((function(e){for(var t=null,n=0;n=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function mo(e){var t,n,r;if(lo.isWindow(e)||9===e.nodeType){var o=lo.getWindow(e);t={left:lo.getWindowScrollLeft(o),top:lo.getWindowScrollTop(o)},n=lo.viewportWidth(o),r=lo.viewportHeight(o)}else t=lo.offset(e),n=lo.outerWidth(e),r=lo.outerHeight(e);return t.width=n,t.height=r,t}function yo(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,i=e.height,a=e.left,s=e.top;return"c"===n?s+=i/2:"b"===n&&(s+=i),"c"===r?a+=o/2:"r"===r&&(a+=o),{left:a,top:s}}function bo(e,t,n,r,o){var i=yo(t,n[1]),a=yo(e,n[0]),s=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-s[0]+r[0]-o[0]),top:Math.round(e.top-s[1]+r[1]-o[1])}}function go(e,t,n){return e.leftn.right}function Eo(e,t,n){return e.topn.bottom}function wo(e,t,n){var r=[];return lo.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Oo(e,t){return e[t]=-e[t],e}function xo(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Co(e,t){e[0]=xo(e[0],t.width),e[1]=xo(e[1],t.height)}function So(e,t,n,r){var o=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,u=n.source||e;i=[].concat(i),a=[].concat(a);var c={},l=0,f=vo(u,!(!(s=s||{})||!s.alwaysByViewport)),p=mo(u);Co(i,p),Co(a,t);var d=bo(p,t,o,i,a),h=lo.merge(p,d);if(f&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&go(d,p,f)){var v=wo(o,/[lr]/gi,{l:"r",r:"l"}),m=Oo(i,0),y=Oo(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&o.left+i.width>n.right&&(i.width-=o.left+i.width-n.right),r.adjustX&&o.left+i.width>n.right&&(o.left=Math.max(n.right-i.width,n.left)),r.adjustY&&o.top=n.top&&o.top+i.height>n.bottom&&(i.height-=o.top+i.height-n.bottom),r.adjustY&&o.top+i.height>n.bottom&&(o.top=Math.max(n.bottom-i.height,n.top)),lo.mix(o,i)}(d,p,f,c))}return h.width!==p.width&&lo.css(u,"width",lo.width(u)+h.width-p.width),h.height!==p.height&&lo.css(u,"height",lo.height(u)+h.height-p.height),lo.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:i,targetOffset:a,overflow:c}}function _o(e,t,n){var r=n.target||t;return So(e,mo(r),n,!function(e,t){var n=vo(e,t),r=mo(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function To(e,t,n){var r,o,i=lo.getDocument(e),a=i.defaultView||i.parentWindow,s=lo.getWindowScrollLeft(a),u=lo.getWindowScrollTop(a),c=lo.viewportWidth(a),l=lo.viewportHeight(a);r="pageX"in t?t.pageX:s+t.clientX,o="pageY"in t?t.pageY:u+t.clientY;var f=r>=0&&r<=s+c&&o>=0&&o<=u+l;return So(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t1&&(B=r.createElement("div",{className:"".concat(i,"-content")},u)),r.createElement(xr,Object.assign({visible:n,ref:x},U,{onAppearPrepare:F,onEnterPrepare:F,removeOnLeave:f,leavedClassName:"".concat(i,"-hidden")}),(function(e,t){var n=e.className,o=e.style,s=g()(i,a,S,n);return r.createElement(jo,{target:d||h,key:"popup",ref:O,monitorWindowResize:!0,disabled:V,align:p,onAlign:I},r.createElement("div",{ref:t,className:s,onMouseEnter:y,onMouseLeave:b,onMouseDown:E,onTouchStart:w,style:zt(zt({},o),H)},B))}))}));Fo.displayName="PopupInner";var Ho=Fo,Vo=r.forwardRef((function(e,t){var n=$n({},e);return r.createElement("div",null,r.createElement(Sr,Object.assign({},n)),r.createElement(Ho,Object.assign({},n,{ref:t})))}));Vo.displayName="Popup";var Bo=Vo,Wo=r.createContext(null);function zo(){}function Go(){return""}function Ko(){return window.document}var Yo=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Xo,$o,qo=(Xo=Yn,($o=function(e){$t(n,e);var t=en(n);function n(e){var r,i;return Gt(this,n),(r=t.call(this,e)).popupRef=o.a.createRef(),r.triggerRef=o.a.createRef(),r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Hn(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();Hn(n,t)||Hn(o,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Vn(r.triggerRef.current);if(t)return t}catch(e){}return de.a.findDOMNode(Qt(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,o=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,u=n.getPopupClassNameFromAlign;return o&&i&&t.push(function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?"".concat(r," min"):"",a=n>0?"".concat(n," sec"):"";return o.a.createElement("small",null,o.a.createElement("br",null),o.a.createElement("i",null,"Duration: "),i+" "+a)}var Hi=function(e){var t=e.isSelf,n=e.duration,r=e.agentName,i=e.message,a=void 0===i?"":i,s=t?"right":"left",u=t?"alert-info":"alert-warning";return o.a.createElement("div",{className:"row",style:{marginLeft:"0",marginRight:"0"}},o.a.createElement("div",{className:"alert message "+u,role:"alert",style:{float:s}},o.a.createElement("span",{style:{fontSize:"16px",whiteSpace:"pre-wrap"}},o.a.createElement("b",null,r),": ",a),o.a.createElement(Fi,{duration:n})))};function Vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(35),o=n(34);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(53),o=n(9),i=n(101),a=n(18),s=n(38),u=n(102),c=n(58),l=n(103),f=n(10)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,v,m,y){u(n,t,h);var b,g,E,w=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},O=t+" Iterator",x="values"==v,C=!1,S=e.prototype,_=S[f]||S["@@iterator"]||v&&S[v],T=_||w(v),k=v?x?w("entries"):T:void 0,M="Array"==t&&S.entries||_;if(M&&(E=l(M.call(new e)))!==Object.prototype&&E.next&&(c(E,O,!0),r||"function"==typeof E[f]||a(E,f,d)),x&&_&&"values"!==_.name&&(C=!0,T=function(){return _.call(this)}),r&&!y||!p&&!C&&S[f]||a(S,f,T),s[t]=T,s[O]=d,v)if(b={values:x?T:w("values"),keys:m?T:w("keys"),entries:k},y)for(g in b)g in S||i(S,g,b[g]);else o(o.P+o.F*(p||C),t,b);return b}},function(e,t,n){e.exports=n(18)},function(e,t,n){"use strict";var r=n(57),o=n(32),i=n(58),a={};n(18)(a,n(10)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(22),o=n(24),i=n(36)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";var r=n(46),o=n(9),i=n(24),a=n(105),s=n(106),u=n(51),c=n(107),l=n(108);o(o.S+o.F*!n(110)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,y=0,b=l(p);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),null==b||d==Array&&s(b))for(n=new d(t=u(p.length));t>y;y++)c(n,y,m?v(p[y],y):p[y]);else for(f=b.call(p),n=new d;!(o=f.next()).done;y++)c(n,y,m?a(f,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){var r=n(20);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(38),o=n(10)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(19),o=n(32);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(109),o=n(10)("iterator"),i=n(38);e.exports=n(7).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(50),o=n(10)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(10)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,i){return(0,r.default)(e,t,n,i),{remove:function(){(0,o.default)(e,t,n,i)}}};var r=i(n(112)),o=i(n(113));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var o=function(){};r(n(26)).default&&(o=document.addEventListener?function(e,t,n,r){return e.addEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.attachEvent("on"+t,(function(t){(t=t||window.event).target=t.target||t.srcElement,t.currentTarget=e,n.call(e,t)}))}:void 0);var i=o;t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=void 0;var o=function(){};r(n(26)).default&&(o=document.addEventListener?function(e,t,n,r){return e.removeEventListener(t,n,r||!1)}:document.attachEvent?function(e,t,n){return e.detachEvent("on"+t,n)}:void 0);var i=o;t.default=i,e.exports=t.default},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(C([])));m&&m!==t&&n.call(m,o)&&(h=m);var y=d.prototype=f.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,s){var u=c(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(117),o=n(118);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n0&&void 0!==arguments[0]?arguments[0]:r.props;r._portalContainerNode=(0,s.default)(e.container,(0,u.default)(r).body)},r.getMountNode=function(){return r._portalContainerNode},p(r,n)}return 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)}(t,e),t.prototype.componentDidMount=function(){this.setContainer(),this.forceUpdate(this.props.onRendered)},t.prototype.componentWillReceiveProps=function(e){e.container!==this.props.container&&this.setContainer(e)},t.prototype.componentWillUnmount=function(){this._portalContainerNode=null},t.prototype.render=function(){return this.props.children&&this._portalContainerNode?a.default.createPortal(this.props.children,this._portalContainerNode):null},t}(i.default.Component);d.displayName="Portal",d.propTypes={container:r.default.oneOfType([o.default,r.default.func]),onRendered:r.default.func},t.default=a.default.createPortal?d:c.default,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(1)),o=c(n(39)),i=c(n(0)),a=c(n(4)),s=c(n(40)),u=c(n(15));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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}var p=function(e){function t(){var n,r;l(this,t);for(var o=arguments.length,c=Array(o),p=0;p=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var v=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=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}(this,e.call(this,n,r));return o.getTarget=function(){var e=o.props.target,t="function"==typeof e?e():e;return t&&c.default.findDOMNode(t)||null},o.maybeUpdatePosition=function(e){var t=o.getTarget();(o.props.shouldUpdatePosition||t!==o._lastTarget||e)&&o.updatePosition(t)},o.state={positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null},o._needsFlush=!1,o._lastTarget=null,o}return 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)}(t,e),t.prototype.componentDidMount=function(){this.updatePosition(this.getTarget())},t.prototype.componentWillReceiveProps=function(){this._needsFlush=!0},t.prototype.componentDidUpdate=function(e){this._needsFlush&&(this._needsFlush=!1,this.maybeUpdatePosition(this.props.placement!==e.placement))},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,i=h(e,["children","className"]),a=this.state,c=a.positionLeft,l=a.positionTop,f=h(a,["positionLeft","positionTop"]);delete i.target,delete i.container,delete i.containerPadding,delete i.shouldUpdatePosition;var p=u.default.Children.only(t);return(0,s.cloneElement)(p,r({},i,f,{positionLeft:c,positionTop:l,className:(0,o.default)(n,p.props.className),style:r({},p.props.style,{left:c,top:l})}))},t.prototype.updatePosition=function(e){if(this._lastTarget=e,e){var t=c.default.findDOMNode(this),n=(0,f.default)(this.props.container,(0,p.default)(this).body);this.setState((0,l.default)(this.props.placement,t,e,n,this.props.containerPadding))}else this.setState({positionLeft:0,positionTop:0,arrowOffsetLeft:null,arrowOffsetTop:null})},t}(u.default.Component);v.propTypes={target:i.default.oneOfType([a.default,i.default.func]),container:i.default.oneOfType([a.default,i.default.func]),containerPadding:i.default.number,placement:i.default.oneOf(["top","right","bottom","left"]),shouldUpdatePosition:i.default.bool},v.displayName="Position",v.defaultProps={containerPadding:0,placement:"right",shouldUpdatePosition:!1},t.default=v,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n,i,a){var s="BODY"===i.tagName?(0,r.default)(n):(0,o.default)(n,i),c=(0,r.default)(t),l=c.height,f=c.width,p=void 0,d=void 0,h=void 0,v=void 0;if("left"===e||"right"===e){d=s.top+(s.height-l)/2,p="left"===e?s.left-f:s.left+s.width;var m=function(e,t,n,r){var o=u(n),i=o.scroll,a=o.height,s=e-r-i,c=e+r-i+t;return s<0?-s:c>a?a-c:0}(d,l,i,a);d+=m,v=50*(1-2*m/l)+"%",h=void 0}else{if("top"!==e&&"bottom"!==e)throw new Error('calcOverlayPosition(): No such placement of "'+e+'" found.');p=s.left+(s.width-f)/2,d="top"===e?s.top-l:s.top+s.height;var y=function(e,t,n,r){var o=u(n).width,i=e-r,a=e+r+t;if(i<0)return-i;if(a>o)return o-a;return 0}(p,f,i,a);p+=y,h=50*(1-2*y/f)+"%",v=void 0}return{positionLeft:p,positionTop:d,arrowOffsetLeft:h,arrowOffsetTop:v}};var r=s(n(59)),o=s(n(124)),i=s(n(62)),a=s(n(15));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=void 0,n=void 0,o=void 0;if("BODY"===e.tagName)t=window.innerWidth,n=window.innerHeight,o=(0,i.default)((0,a.default)(e).documentElement)||(0,i.default)(e);else{var s=(0,r.default)(e);t=s.width,n=s.height,o=(0,i.default)(e)}return{width:t,height:n,scroll:o}}e.exports=t.default},function(e,t,n){"use strict";var r=n(6);t.__esModule=!0,t.default=function(e,t){var n,r={top:0,left:0};"fixed"===(0,c.default)(e,"position")?n=e.getBoundingClientRect():(t=t||(0,a.default)(e),n=(0,i.default)(e),"html"!==function(e){return e.nodeName&&e.nodeName.toLowerCase()}(t)&&(r=(0,i.default)(t)),r.top+=parseInt((0,c.default)(t,"borderTopWidth"),10)-(0,s.default)(t)||0,r.left+=parseInt((0,c.default)(t,"borderLeftWidth"),10)-(0,u.default)(t)||0);return(0,o.default)({},n,{top:n.top-r.top-(parseInt((0,c.default)(e,"marginTop"),10)||0),left:n.left-r.left-(parseInt((0,c.default)(e,"marginLeft"),10)||0)})};var o=r(n(125)),i=r(n(59)),a=r(n(126)),s=r(n(62)),u=r(n(134)),c=r(n(60));e.exports=t.default},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var p=n(65),d=n.n(p);function h(){return(h=d.a||function(e){for(var t=1;t1)||(o=t,!1)})),o?new Error("(children) "+r+" - Duplicate children detected of bsRole: "+o+". Only one child each allowed with the following bsRoles: "+t.join(", ")):null}))}(De)),disabled:w.a.bool,pullRight:w.a.bool,open:w.a.bool,defaultOpen:w.a.bool,onToggle:w.a.func,onSelect:w.a.func,role:w.a.string,rootCloseEvent:w.a.oneOf(["click","mousedown"]),onMouseEnter:w.a.func,onMouseLeave:w.a.func},Ie={componentClass:Ee},Ue=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleClick=r.handleClick.bind(K(K(r))),r.handleKeyDown=r.handleKeyDown.bind(K(K(r))),r.handleClose=r.handleClose.bind(K(K(r))),r._focusInDropdown=!1,r.lastOpenEventType=null,r}y(t,e);var n=t.prototype;return n.componentDidMount=function(){this.focusNextOnOpen()},n.componentWillUpdate=function(e){!e.open&&this.props.open&&(this._focusInDropdown=ce()(de.a.findDOMNode(this.menu),se()(document)))},n.componentDidUpdate=function(e){var t=this.props.open,n=e.open;t&&!n&&this.focusNextOnOpen(),!t&&n&&this._focusInDropdown&&(this._focusInDropdown=!1,this.focus())},n.focus=function(){var e=de.a.findDOMNode(this.toggle);e&&e.focus&&e.focus()},n.focusNextOnOpen=function(){var e=this.menu;e&&e.focusNext&&("keydown"!==this.lastOpenEventType&&"menuitem"!==this.props.role||e.focusNext())},n.handleClick=function(e){this.props.disabled||this.toggleOpen(e,{source:"click"})},n.handleClose=function(e,t){this.props.open&&this.toggleOpen(e,t)},n.handleKeyDown=function(e){if(!this.props.disabled)switch(e.keyCode){case fe.a.codes.down:this.props.open?this.menu.focusNext&&this.menu.focusNext():this.toggleOpen(e,{source:"keydown"}),e.preventDefault();break;case fe.a.codes.esc:case fe.a.codes.tab:this.handleClose(e,{source:"keydown"})}},n.toggleOpen=function(e,t){var n=!this.props.open;n&&(this.lastOpenEventType=t.source),this.props.onToggle&&this.props.onToggle(n,e,t)},n.renderMenu=function(e,t){var n=this,o=t.id,i=t.onSelect,a=t.rootCloseEvent,s=f(t,["id","onSelect","rootCloseEvent"]),u=function(e){n.menu=e};return"string"==typeof e.ref||(u=Y(e.ref,u)),Object(r.cloneElement)(e,h({},s,{ref:u,labelledBy:o,bsClass:I(s,"menu"),onClose:Y(e.props.onClose,this.handleClose),onSelect:Y(e.props.onSelect,i,(function(e,t){return n.handleClose(t,{source:"select"})})),rootCloseEvent:a}))},n.renderToggle=function(e,t){var n=this,o=function(e){n.toggle=e};return"string"==typeof e.ref||(o=Y(e.ref,o)),Object(r.cloneElement)(e,h({},t,{ref:o,bsClass:I(t,"toggle"),onClick:Y(e.props.onClick,this.handleClick),onKeyDown:Y(e.props.onKeyDown,this.handleKeyDown)}))},n.render=function(){var e,t=this,n=this.props,r=n.componentClass,i=n.id,a=n.dropup,s=n.disabled,u=n.pullRight,c=n.open,l=n.onSelect,p=n.role,d=n.bsClass,v=n.className,m=n.rootCloseEvent,y=n.children,b=f(n,["componentClass","id","dropup","disabled","pullRight","open","onSelect","role","bsClass","className","rootCloseEvent","children"]);delete b.onToggle;var E=((e={})[d]=!0,e.open=c,e.disabled=s,e);return a&&(E[d]=!1,E.dropup=!0),o.a.createElement(r,h({},b,{className:g()(v,E)}),Se.map(y,(function(e){switch(e.props.bsRole){case Ae:return t.renderToggle(e,{id:i,disabled:s,open:c,role:p,bsClass:d});case De:return t.renderMenu(e,{id:i,open:c,pullRight:u,bsClass:d,onSelect:l,rootCloseEvent:m});default:return e}})))},t}(o.a.Component);Ue.propTypes=Le,Ue.defaultProps=Ie,U("dropdown",Ue);var Fe=ye()(Ue,{open:"onToggle"});Fe.Toggle=Pe,Fe.Menu=ke;var He=Fe;var Ve=h({},He.propTypes,{bsStyle:w.a.string,bsSize:w.a.string,title:w.a.node.isRequired,noCaret:w.a.bool,children:w.a.node}),Be=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.bsSize,n=e.bsStyle,r=e.title,i=e.children,a=function(e,t){var n=t.propTypes,r={},o={};return S()(e).forEach((function(e){var t=e[0],i=e[1];n[t]?r[t]=i:o[t]=i})),[r,o]}(f(e,["bsSize","bsStyle","title","children"]),He.ControlledComponent),s=a[0],u=a[1];return o.a.createElement(He,h({},s,{bsSize:t,bsStyle:n}),o.a.createElement(He.Toggle,h({},u,{bsSize:t,bsStyle:n}),r),o.a.createElement(He.Menu,null,i))},t}(o.a.Component);Be.propTypes=Ve;var We=Be,ze=U("input-group-addon",function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component)),Ge=U("input-group-btn",function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component)),Ke=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=z(f(e,["className"])),r=n[0],i=n[1],a=V(r);return o.a.createElement("span",h({},i,{className:g()(t,a)}))},t}(o.a.Component);Ke.Addon=ze,Ke.Button=Ge;var Ye=U("input-group",H([k,M],Ke)),Xe={glyph:w.a.string.isRequired},$e=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e,t=this.props,n=t.glyph,r=t.className,i=z(f(t,["glyph","className"])),a=i[0],s=i[1],u=h({},V(a),((e={})[I(a,n)]=!0,e));return o.a.createElement("span",h({},s,{className:g()(r,u)}))},t}(o.a.Component);$e.propTypes=Xe;var qe=U("glyphicon",$e),Ze={$bs_formGroup:w.a.object},Qe=function(e){function t(){return e.apply(this,arguments)||this}y(t,e);var n=t.prototype;return n.getGlyph=function(e){switch(e){case"success":return"ok";case"warning":return"warning-sign";case"error":return"remove";default:return null}},n.renderDefaultFeedback=function(e,t,n,r){var i=this.getGlyph(e&&e.validationState);return i?o.a.createElement(qe,h({},r,{glyph:i,className:g()(t,n)})):null},n.render=function(){var e=this.props,t=e.className,n=e.children,r=z(f(e,["className","children"])),i=r[0],a=r[1],s=V(i);if(!n)return this.renderDefaultFeedback(this.context.$bs_formGroup,t,s,a);var u=o.a.Children.only(n);return o.a.cloneElement(u,h({},a,{className:g()(u.props.className,t,s)}))},t}(o.a.Component);Qe.defaultProps={bsRole:"feedback"},Qe.contextTypes=Ze;var Je=U("form-control-feedback",Qe),et={componentClass:x.a},tt=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,r=z(f(e,["componentClass","className"])),i=r[0],a=r[1],s=V(i);return o.a.createElement(t,h({},a,{className:g()(n,s)}))},t}(o.a.Component);tt.propTypes=et,tt.defaultProps={componentClass:"p"};var nt=U("form-control-static",tt),rt={componentClass:x.a,type:w.a.string,id:w.a.string,inputRef:w.a.func},ot={$bs_formGroup:w.a.object},it=function(e){function t(){return e.apply(this,arguments)||this}return y(t,e),t.prototype.render=function(){var e,t=this.context.$bs_formGroup,n=t&&t.controlId,r=this.props,i=r.componentClass,a=r.type,s=r.id,u=void 0===s?n:s,c=r.inputRef,l=r.className,p=r.bsSize,d=z(f(r,["componentClass","type","id","inputRef","className","bsSize"])),v=d[0],m=d[1];("file"!==a&&(e=V(v)),p)&&(e[I({bsClass:"input"},P[p]||p)]=!0);return o.a.createElement(i,h({},m,{type:a,id:u,ref:c,className:g()(l,e)}))},t}(o.a.Component);it.propTypes=rt,it.defaultProps={componentClass:"input"},it.contextTypes=ot,it.Feedback=Je,it.Static=nt;var at=U("form-control",H([M,k],it));function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ut(e,t){for(var n=0;n3&&(i="success"),o.a.createElement(ee,{onClick:function(){return e.setState({current_rating:n,text:"",dropdown_value:"Not specified"})},bsStyle:t===n?i:"default",disabled:e.state.submitting,key:"button-rating-"+n},r[n-1])})),a=null,s=null,u=null;if(null!==t&&3!==t){var c=(t>3?this.GOOD_REASONS:this.BAD_REASONS).map((function(t){return o.a.createElement(ie,{key:"dropdown-item-"+t,eventKey:t,onSelect:function(t){return e.setState({dropdown_value:t,text:""})}},t)}));a=o.a.createElement(We,{dropup:!0,componentClass:Ye.Button,title:this.state.dropdown_value,id:"review-dropdown",disabled:this.state.submitting},c)}null!==a&&"Other"===this.state.dropdown_value&&(s=o.a.createElement(at,{type:"text",placeholder:"Enter reason (optional)",value:this.state.text,onChange:function(t){return e.setState({text:t.target.value})},disabled:this.state.submitting})),null!=a&&(u=o.a.createElement("div",{style:{marginBottom:"8px"}},"Give a reason for your rating (optional):",o.a.createElement(Ye,null,a,s)));var l=this.state.submitting||null==t;return o.a.createElement("div",null,"Rate your chat partner (fully optional & confidential):",o.a.createElement("br",null),o.a.createElement(Ee,null,i),u,o.a.createElement("div",{style:{marginBottom:"8px"}},o.a.createElement(Ee,{style:{marginBottom:"8px"}},o.a.createElement(ee,{disabled:l,bsStyle:"info",onClick:function(){e.setState({submitting:!0});var t={rating:e.state.current_rating,reason_category:e.state.dropdown_value,reason:e.state.text};e.props.onMessageSend({text:"[PEER_REVIEW]",task_data:t}).then((function(){return e.setState({submitted:!0})})),e.props.onChoice(!0)}},this.state.submitted?"Submitted!":"Submit Review"),o.a.createElement(ee,{disabled:this.state.submitting,onClick:function(){return e.props.onChoice(!1)}},"Decline Review"))))}}])&&ut(t.prototype,n),r&&ut(t,r),a}(o.a.Component);function mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function un(e,t,n){return(un="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qt(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function cn(e,t,n,r){var o=de.a.unstable_batchedUpdates?function(e){de.a.unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,o)}}}var ln=function(e){var t=e.prefixCls,n=e.vertical,r=e.reverse,i=e.marks,a=e.dots,s=e.step,u=e.included,c=e.lowerBound,l=e.upperBound,f=e.max,p=e.min,d=e.dotStyle,h=e.activeDotStyle,v=f-p,m=function(e,t,n,r,o,i){on(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(n&&r)for(var s=o;s<=i;s+=r)-1===a.indexOf(s)&&a.push(s);return a}(0,i,a,s,p,f).map((function(e){var i,a="".concat(Math.abs(e-p)/v*100,"%"),s=!u&&e===l||u&&e<=l&&e>=c,f=zt(zt({},d),{},Bt({},n?r?"top":"bottom":r?"right":"left",a));s&&(f=zt(zt({},f),h));var m=g()((Bt(i={},"".concat(t,"-dot"),!0),Bt(i,"".concat(t,"-dot-active"),s),Bt(i,"".concat(t,"-dot-reverse"),r),i));return o.a.createElement("span",{className:m,style:f,key:e})}));return o.a.createElement("div",{className:"".concat(t,"-step")},m)},fn=function(e){var t=e.className,n=e.vertical,r=e.reverse,i=e.marks,a=e.included,s=e.upperBound,u=e.lowerBound,c=e.max,l=e.min,f=e.onClickLabel,p=Object.keys(i),d=c-l,h=p.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var c,p=i[e],h="object"===Zt(p)&&!o.a.isValidElement(p),v=h?p.label:p;if(!v&&0!==v)return null;var m=!a&&e===s||a&&e<=s&&e>=u,y=g()((Bt(c={},"".concat(t,"-text"),!0),Bt(c,"".concat(t,"-text-active"),m),c)),b=Bt({marginBottom:"-50%"},r?"top":"bottom","".concat((e-l)/d*100,"%")),E=Bt({transform:"translateX(".concat(r?"50%":"-50%",")"),msTransform:"translateX(".concat(r?"50%":"-50%",")")},r?"right":"left","".concat((e-l)/d*100,"%")),w=n?b:E,O=h?zt(zt({},w),p.style):w;return o.a.createElement("span",{className:y,style:O,key:e,onMouseDown:function(t){return f(t,e)},onTouchStart:function(t){return f(t,e)}},v)}));return o.a.createElement("div",{className:t},h)},pn=function(e){$t(n,e);var t=en(n);function n(){var e;return Gt(this,n),(e=t.apply(this,arguments)).state={clickFocused:!1},e.setHandleRef=function(t){e.handle=t},e.handleMouseUp=function(){document.activeElement===e.handle&&e.setClickFocus(!0)},e.handleMouseDown=function(t){t.preventDefault(),e.focus()},e.handleBlur=function(){e.setClickFocus(!1)},e.handleKeyDown=function(){e.setClickFocus(!1)},e}return Yt(n,[{key:"componentDidMount",value:function(){this.onMouseUpListener=cn(document,"mouseup",this.handleMouseUp)}},{key:"componentWillUnmount",value:function(){this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"setClickFocus",value:function(e){this.setState({clickFocused:e})}},{key:"clickFocus",value:function(){this.setClickFocus(!0),this.focus()}},{key:"focus",value:function(){this.handle.focus()}},{key:"blur",value:function(){this.handle.blur()}},{key:"render",value:function(){var e,t,n,r=this.props,i=r.prefixCls,a=r.vertical,s=r.reverse,u=r.offset,c=r.style,l=r.disabled,f=r.min,p=r.max,d=r.value,h=r.tabIndex,v=r.ariaLabel,m=r.ariaLabelledBy,y=r.ariaValueTextFormatter,b=sn(r,["prefixCls","vertical","reverse","offset","style","disabled","min","max","value","tabIndex","ariaLabel","ariaLabelledBy","ariaValueTextFormatter"]),E=g()(this.props.className,Bt({},"".concat(i,"-handle-click-focused"),this.state.clickFocused)),w=a?(Bt(e={},s?"top":"bottom","".concat(u,"%")),Bt(e,s?"bottom":"top","auto"),Bt(e,"transform",s?null:"translateY(+50%)"),e):(Bt(t={},s?"right":"left","".concat(u,"%")),Bt(t,s?"left":"right","auto"),Bt(t,"transform","translateX(".concat(s?"+":"-","50%)")),t),O=zt(zt({},c),w),x=h||0;return(l||null===h)&&(x=null),y&&(n=y(d)),o.a.createElement("div",Object.assign({ref:this.setHandleRef,tabIndex:x},b,{className:E,style:O,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,role:"slider","aria-valuemin":f,"aria-valuemax":p,"aria-valuenow":d,"aria-disabled":!!l,"aria-label":v,"aria-labelledby":m,"aria-valuetext":n}))}}]),n}(o.a.Component);function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=mn.F1&&t<=mn.F12)return!1;switch(t){case mn.ALT:case mn.CAPS_LOCK:case mn.CONTEXT_MENU:case mn.CTRL:case mn.DOWN:case mn.END:case mn.ESC:case mn.HOME:case mn.INSERT:case mn.LEFT:case mn.MAC_FF_META:case mn.META:case mn.NUMLOCK:case mn.NUM_CENTER:case mn.PAGE_DOWN:case mn.PAGE_UP:case mn.PAUSE:case mn.PRINT_SCREEN:case mn.RIGHT:case mn.SHIFT:case mn.UP:case mn.WIN_KEY:case mn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=mn.ZERO&&e<=mn.NINE)return!0;if(e>=mn.NUM_ZERO&&e<=mn.NUM_MULTIPLY)return!0;if(e>=mn.A&&e<=mn.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case mn.SPACE:case mn.QUESTION_MARK:case mn.NUM_PLUS:case mn.NUM_MINUS:case mn.NUM_PERIOD:case mn.NUM_DIVISION:case mn.SEMICOLON:case mn.DASH:case mn.EQUALS:case mn.COMMA:case mn.PERIOD:case mn.SLASH:case mn.APOSTROPHE:case mn.SINGLE_QUOTE:case mn.OPEN_SQUARE_BRACKET:case mn.BACKSLASH:case mn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},yn=mn;function bn(e,t){try{return Object.keys(t).some((function(n){return e.target===Object(pe.findDOMNode)(t[n])}))}catch(e){return!1}}function gn(e,t){var n=t.min,r=t.max;return er}function En(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function wn(e,t){var n=t.marks,r=t.step,o=t.min,i=t.max,a=Object.keys(n).map(parseFloat);if(null!==r){var s=Math.floor((i-o)/r),u=Math.min((e-o)/r,s),c=Math.round(u)*r+o;a.push(c)}var l=a.map((function(t){return Math.abs(e-t)}));return a[l.indexOf(Math.min.apply(Math,vn(l)))]}function On(e,t){return e?t.clientY:t.pageX}function xn(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function Cn(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:window.pageXOffset+n.left+.5*n.width}function Sn(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function _n(e,t){var n=t.step,r=isFinite(wn(e,t))?wn(e,t):0;return null===n?r:parseFloat(r.toFixed(function(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}(n)))}function Tn(e){e.stopPropagation(),e.preventDefault()}function kn(e,t,n){var r="increase";switch(e.keyCode){case yn.UP:r=t&&n?"decrease":"increase";break;case yn.RIGHT:r=!t&&n?"decrease":"increase";break;case yn.DOWN:r=t&&n?"increase":"decrease";break;case yn.LEFT:r=!t&&n?"increase":"decrease";break;case yn.END:return function(e,t){return t.max};case yn.HOME:return function(e,t){return t.min};case yn.PAGE_UP:return function(e,t){return e+2*t.step};case yn.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,n){var r={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},o=r[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),i=Object.keys(n.marks)[o];return n.step?r[e](t,n.step):Object.keys(n.marks).length&&n.marks[i]?n.marks[i]:t}(r,e,t)}}function Mn(){}function Nn(e){var t;return(t=function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onMouseDown=function(e){if(0===e.button){var t=r.props.vertical,n=On(t,e);if(bn(e,r.handlesRefs)){var o=Cn(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.removeDocumentEvents(),r.onStart(n),r.addDocumentMouseEvents()}},r.onTouchStart=function(e){if(!En(e)){var t=r.props.vertical,n=xn(t,e);if(bn(e,r.handlesRefs)){var o=Cn(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.onStart(n),r.addDocumentTouchEvents(),Tn(e)}},r.onFocus=function(e){var t=r.props,n=t.onFocus,o=t.vertical;if(bn(e,r.handlesRefs)){var i=Cn(o,e.target);r.dragOffset=0,r.onStart(i),Tn(e),n&&n(e)}},r.onBlur=function(e){var t=r.props.onBlur;r.onEnd(),t&&t(e)},r.onMouseUp=function(){r.handlesRefs[r.prevMovedHandleIndex]&&r.handlesRefs[r.prevMovedHandleIndex].clickFocus()},r.onMouseMove=function(e){if(r.sliderRef){var t=On(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onTouchMove=function(e){if(!En(e)&&r.sliderRef){var t=xn(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onKeyDown=function(e){r.sliderRef&&bn(e,r.handlesRefs)&&r.onKeyboard(e)},r.onClickMarkLabel=function(e,t){e.stopPropagation(),r.onChange({value:t}),r.setState({value:t},(function(){return r.onEnd(!0)}))},r.saveSlider=function(e){r.sliderRef=e};var o=e.step,i=e.max,a=e.min,s=!isFinite(i-a)||(i-a)%o==0;return on(!o||Math.floor(o)!==o||s,"Slider[max] - Slider[min] (".concat(i-a,") should be a multiple of Slider[step] (").concat(o,")")),r.handlesRefs={},r}return Yt(n,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,n=e.disabled;t&&!n&&this.focus()}},{key:"componentWillUnmount",value:function(){un(qt(n.prototype),"componentWillUnmount",this)&&un(qt(n.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,n=t.vertical,r=t.reverse,o=e.getBoundingClientRect();return n?r?o.bottom:o.top:window.pageXOffset+(r?o.right:o.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=cn(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=cn(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=cn(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=cn(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){this.props.disabled||this.handlesRefs[0].focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){e.handlesRefs[t]&&e.handlesRefs[t].blur&&e.handlesRefs[t].blur()}))}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,o=t.max,i=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-i)*(o-r)+r:i*(o-r)+r}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min,r=(e-n)/(t.max-n);return Math.max(0,100*r)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,t=this.props,r=t.prefixCls,i=t.className,a=t.marks,s=t.dots,u=t.step,c=t.included,l=t.disabled,f=t.vertical,p=t.reverse,d=t.min,h=t.max,v=t.children,m=t.maximumTrackStyle,y=t.style,b=t.railStyle,E=t.dotStyle,w=t.activeDotStyle,O=un(qt(n.prototype),"render",this).call(this),x=O.tracks,C=O.handles,S=g()(r,(Bt(e={},"".concat(r,"-with-marks"),Object.keys(a).length),Bt(e,"".concat(r,"-disabled"),l),Bt(e,"".concat(r,"-vertical"),f),Bt(e,i,i),e));return o.a.createElement("div",{ref:this.saveSlider,className:S,onTouchStart:l?Mn:this.onTouchStart,onMouseDown:l?Mn:this.onMouseDown,onMouseUp:l?Mn:this.onMouseUp,onKeyDown:l?Mn:this.onKeyDown,onFocus:l?Mn:this.onFocus,onBlur:l?Mn:this.onBlur,style:y},o.a.createElement("div",{className:"".concat(r,"-rail"),style:zt(zt({},m),b)}),x,o.a.createElement(ln,{prefixCls:r,vertical:f,reverse:p,marks:a,dots:s,step:u,included:c,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:d,dotStyle:E,activeDotStyle:w}),C,o.a.createElement(fn,{className:"".concat(r,"-mark"),onClickLabel:l?Mn:this.onClickMarkLabel,vertical:f,marks:a,included:c,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:d,reverse:p}),v)}}]),n}(e)).displayName="ComponentEnhancer(".concat(e.displayName,")"),t.defaultProps=zt(zt({},e.defaultProps),{},{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=sn(e,["index"]);return delete n.dragging,null===n.value?null:o.a.createElement(pn,Object.assign({},n,{key:t}))},onBeforeChange:Mn,onChange:Mn,onAfterChange:Mn,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),t}var Pn=Nn(function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.dragging;r.removeDocumentEvents(),(t||e)&&r.props.onAfterChange(r.getValue()),r.setState({dragging:!1})};var o=void 0!==e.defaultValue?e.defaultValue:e.min,i=void 0!==e.value?e.value:o;return r.state={value:r.trimAlignValue(i),dragging:!1},on(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),on(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),r}return Yt(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){if("value"in this.props||"min"in this.props||"max"in this.props){var n=this.props,r=n.value,o=n.onChange,i=void 0!==r?r:t.value,a=this.trimAlignValue(i,this.props);a!==t.value&&(this.setState({value:a}),gn(i,this.props)&&o(a))}}},{key:"onChange",value:function(e){var t=this.props,n=!("value"in t),r=e.value>this.props.max?zt(zt({},e),{},{value:this.props.max}):e;n&&this.setState(r);var o=r.value;t.onChange(o)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,n=this.getValue();t.onBeforeChange(n);var r=this.calcValueByPos(e);this.startValue=r,this.startPosition=e,r!==n&&(this.prevMovedHandleIndex=0,this.onChange({value:r}))}},{key:"onMove",value:function(e,t){Tn(e);var n=this.state.value,r=this.calcValueByPos(t);r!==n&&this.onChange({value:r})}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=kn(e,t.vertical,n);if(r){Tn(e);var o=this.state.value,i=r(o,this.props),a=this.trimAlignValue(i);if(a===o)return;this.onChange({value:a}),this.props.onAfterChange(a),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){return this.props.min}},{key:"getUpperBound",value:function(){return this.state.value}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var n=zt(zt({},this.props),t),r=Sn(e,n);return _n(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,i=t.included,a=t.disabled,s=t.minimumTrackStyle,u=t.trackStyle,c=t.handleStyle,l=t.tabIndex,f=t.ariaLabelForHandle,p=t.ariaLabelledByForHandle,d=t.ariaValueTextFormatterForHandle,h=t.min,v=t.max,m=t.startPoint,y=t.reverse,b=t.handle,g=this.state,E=g.value,w=g.dragging,O=this.calcOffset(E),x=b({className:"".concat(n,"-handle"),prefixCls:n,vertical:r,offset:O,value:E,dragging:w,disabled:a,min:h,max:v,reverse:y,index:0,tabIndex:l,ariaLabel:f,ariaLabelledBy:p,ariaValueTextFormatter:d,style:c[0]||c,ref:function(t){return e.saveHandle(0,t)}}),C=void 0!==m?this.calcOffset(m):0,S=u[0]||u;return{tracks:o.a.createElement(an,{className:"".concat(n,"-track"),vertical:r,included:i,offset:C,reverse:y,length:O-C,style:zt(zt({},s),S)}),handles:x}}}]),n}(o.a.Component)),Rn=n(70),jn=n.n(Rn),An=function(e){var t=e.value,n=e.handle,r=e.bounds,o=e.props,i=o.allowCross,a=o.pushable,s=Number(a),u=Sn(t,o),c=u;return i||null==n||void 0===r||(n>0&&u<=r[n-1]+s&&(c=r[n-1]+s),n=r[n+1]-s&&(c=r[n+1]-s)),_n(c,o)},Dn=function(e){$t(n,e);var t=en(n);function n(e){var r;Gt(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.handle;r.removeDocumentEvents(),(null!==t||e)&&r.props.onAfterChange(r.getValue()),r.setState({handle:null})};var o=e.count,i=e.min,a=e.max,s=Array.apply(void 0,vn(Array(o+1))).map((function(){return i})),u="defaultValue"in e?e.defaultValue:s,c=(void 0!==e.value?e.value:u).map((function(t,n){return An({value:t,handle:n,props:e})})),l=c[0]===a?0:c.length-1;return r.state={handle:null,recent:l,bounds:c},r}return Yt(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(("value"in this.props||"min"in this.props||"max"in this.props)&&(this.props.min!==e.min||this.props.max!==e.max||!jn()(this.props.value,e.value))){var r=this.props,o=r.onChange,i=r.value||t.bounds;if(i.some((function(e){return gn(e,n.props)})))o(i.map((function(e){return Sn(e,n.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var n={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),Object.keys(n).length&&this.setState(n)}var r=zt(zt({},this.state),e).bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var o=this.calcValueByPos(e);this.startValue=o,this.startPosition=e;var i=this.getClosestBound(o);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(o,i),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),o!==r[this.prevMovedHandleIndex]){var a=vn(n.bounds);a[this.prevMovedHandleIndex]=o,this.onChange({bounds:a})}}},{key:"onMove",value:function(e,t){Tn(e);var n=this.state,r=this.calcValueByPos(t);r!==n.bounds[n.handle]&&this.moveTo(r)}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=kn(e,t.vertical,n);if(r){Tn(e);var o=this.state,i=this.props,a=o.bounds,s=o.handle,u=a[null===s?o.recent:s],c=r(u,i),l=An({value:c,handle:s,bounds:o.bounds,props:i});if(l===u)return;this.moveTo(l,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;r=t[r]&&(n=r);return Math.abs(t[n+1]-e)=r.length||o<0)return!1;var i=t+n,a=r[o],s=this.props.pushable,u=Number(s),c=n*(e[i]-a);return!!this.pushHandle(e,i,n,u-c)&&(e[t]=a,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,n=t.handle,r=t.bounds;return An({value:e,handle:n,bounds:r,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,i=this.props,a=i.prefixCls,s=i.vertical,u=i.included,c=i.disabled,l=i.min,f=i.max,p=i.reverse,d=i.handle,h=i.trackStyle,v=i.handleStyle,m=i.tabIndex,y=i.ariaLabelGroupForHandles,b=i.ariaLabelledByGroupForHandles,E=i.ariaValueTextFormatterGroupForHandles,w=r.map((function(t){return e.calcOffset(t)})),O="".concat(a,"-handle"),x=r.map((function(t,r){var o,i=m[r]||0;(c||null===m[r])&&(i=null);var u=n===r;return d({className:g()((o={},Bt(o,O,!0),Bt(o,"".concat(O,"-").concat(r+1),!0),Bt(o,"".concat(O,"-dragging"),u),o)),prefixCls:a,vertical:s,dragging:u,offset:w[r],value:t,index:r,tabIndex:i,min:l,max:f,reverse:p,disabled:c,style:v[r],ref:function(t){return e.saveHandle(r,t)},ariaLabel:y[r],ariaLabelledBy:b[r],ariaValueTextFormatter:E[r]})}));return{tracks:r.slice(0,-1).map((function(e,t){var n,r=t+1,i=g()((Bt(n={},"".concat(a,"-track"),!0),Bt(n,"".concat(a,"-track-").concat(r),!0),n));return o.a.createElement(an,{className:i,vertical:s,reverse:p,included:u,offset:w[r-1],length:w[r]-w[r-1],style:h[t],key:r})})),handles:x}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if("value"in e||"min"in e||"max"in e){var n=(e.value||t.bounds).map((function(n,r){return An({value:n,handle:r,bounds:t.bounds,props:e})}));return n.length===t.bounds.length&&n.every((function(e,n){return e===t.bounds[n]}))?null:zt(zt({},t),{},{bounds:n})}return null}}]),n}(o.a.Component);Dn.displayName="Range",Dn.defaultProps={count:1,allowCross:!0,pushable:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var Ln=Nn(Dn),In=function(e){return+setTimeout(e,16)},Un=function(e){return clearTimeout(e)};function Fn(e){return In(e)}function Hn(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function Vn(e){return e instanceof HTMLElement?e:de.a.findDOMNode(e)}"undefined"!=typeof window&&"requestAnimationFrame"in window&&(In=function(e){return window.requestAnimationFrame(e)},Un=function(e){return window.cancelAnimationFrame(e)}),Fn.cancel=Un;var Bn=n(42);function Wn(e){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zn(e,t){"function"==typeof e?e(t):"object"===Wn(e)&&e&&"current"in e&&(e.current=t)}function Gn(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:2;t();var i=Fn((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),2),a=i[0],s=i[1];return pr((function(){if("none"!==n&&"end"!==n){var t=dr.indexOf(n),r=dr[t+1],i=e(n);!1===i?o(r):a((function(e){function t(){e.isCanceled()||o(r)}!0===i?t():Promise.resolve(i).then(t)}))}}),[n]),r.useEffect((function(){return function(){s()}}),[]),[function(){o("prepare")},n]};function mr(e,t,n,o){var i=o.motionEnter,a=void 0===i||i,s=o.motionAppear,u=void 0===s||s,c=o.motionLeave,l=void 0===c||c,f=o.motionDeadline,p=o.motionLeaveImmediately,d=o.onAppearPrepare,h=o.onEnterPrepare,v=o.onLeavePrepare,m=o.onAppearStart,y=o.onEnterStart,b=o.onLeaveStart,g=o.onAppearActive,E=o.onEnterActive,w=o.onLeaveActive,O=o.onAppearEnd,x=o.onEnterEnd,C=o.onLeaveEnd,S=qn(Object(r.useState)("none"),2),_=S[0],T=S[1],k=qn(Object(r.useState)(null),2),M=k[0],N=k[1],P=Object(r.useRef)(!1),R=Object(r.useRef)(null),j=Object(r.useRef)(null);function A(){return n()||j.current}var D=Object(r.useRef)(!1);function L(e){var t,n=A();e&&!e.deadline&&e.target!==n||("appear"===_&&D.current?t=null==O?void 0:O(n,e):"enter"===_&&D.current?t=null==x?void 0:x(n,e):"leave"===_&&D.current&&(t=null==C?void 0:C(n,e)),!1!==t&&(T("none"),N(null)))}var I=qn(function(e){var t=Object(r.useRef)(),n=Object(r.useRef)(e);n.current=e;var o=r.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(lr,o),e.removeEventListener(cr,o))}return r.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(lr,o),e.addEventListener(cr,o),t.current=e)},i]}(L),1)[0],U=r.useMemo((function(){var e,t,n;switch(_){case"appear":return Bt(e={},"prepare",d),Bt(e,"start",m),Bt(e,"active",g),e;case"enter":return Bt(t={},"prepare",h),Bt(t,"start",y),Bt(t,"active",E),t;case"leave":return Bt(n={},"prepare",v),Bt(n,"start",b),Bt(n,"active",w),n;default:return{}}}),[_]),F=qn(vr((function(e){if("prepare"===e){var t=U.prepare;return!!t&&t(A())}var n;V in U&&N((null===(n=U[V])||void 0===n?void 0:n.call(U,A(),null))||null);return"active"===V&&(I(A()),f>0&&(clearTimeout(R.current),R.current=setTimeout((function(){L({deadline:!0})}),f))),!0})),2),H=F[0],V=F[1],B=hr(V);D.current=B,pr((function(){if(e){var n,r=P.current;P.current=!0,!r&&t&&u&&(n="appear"),r&&t&&a&&(n="enter"),(r&&!t&&l||!r&&p&&!t&&l)&&(n="leave"),n&&(T(n),H())}}),[t]),Object(r.useEffect)((function(){("appear"===_&&!u||"enter"===_&&!a||"leave"===_&&!l)&&T("none")}),[u,a,l]),Object(r.useEffect)((function(){return function(){clearTimeout(R.current)}}),[]);var W=M;return U.prepare&&"start"===V&&(W=zt({transition:"none"},W)),[_,V,W]}var yr=function(e){$t(n,e);var t=en(n);function n(){return Gt(this,n),t.apply(this,arguments)}return Yt(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);var br=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Zt(e)&&(t=e.transitionSupport);var o=r.forwardRef((function(e,t){var o=e.visible,i=void 0===o||o,a=e.removeOnLeave,s=void 0===a||a,u=e.children,c=e.motionName,l=e.leavedClassName,f=e.eventProps,p=n(e),d=Object(r.useRef)(),h=Object(r.useRef)();var v=qn(mr(p,i,(function(){try{return Vn(d.current||h.current)}catch(e){return null}}),e),3),m=v[0],y=v[1],b=v[2],E=Object(r.useRef)(t);E.current=t;var w,O=r.useCallback((function(e){d.current=e,zn(E.current,e)}),[]);if(u)if("none"!==m&&n(e)){var x,C;"prepare"===y?C="prepare":hr(y)?C="active":"start"===y&&(C="start"),w=u(zt(zt({},f),{},{className:g()(fr(c,m),(x={},Bt(x,fr(c,"".concat(m,"-").concat(C)),C),Bt(x,c,"string"==typeof c),x)),style:b}),O)}else w=i?u(zt({},f),O):s?null:u(zt(zt({},f),{},{className:l}),O);else w=null;return r.createElement(yr,{ref:h},w)}));return o.displayName="CSSMotion",o}(ur);function gr(e){var t;return zt(zt({},t=e&&"object"===Zt(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function Er(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(gr)}function wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=Er(e),a=Er(t);i.forEach((function(e){for(var t=!1,i=r;i1}));return u.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var Or=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:br,n=function(n){$t(i,n);var o=en(i);function i(){var e;return Gt(this,i),(e=o.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:zt(zt({},e),{},{status:"removed"})}))}}))},e}return Yt(i,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,o=this.props,i=o.component,a=o.children,s=sn(o,["component","children"]),u=i||r.Fragment,c={};return Or.forEach((function(e){c[e]=s[e],delete s[e]})),delete s.keys,r.createElement(u,Object.assign({},s),n.map((function(n){var o=n.status,i=sn(n,["status"]),s="add"===o||"keep"===o;return r.createElement(t,Object.assign({},c,{key:i.key,visible:s,eventProps:i,onLeaveEnd:function(){c.onLeaveEnd&&c.onLeaveEnd.apply(c,arguments),e.removeKey(i.key)}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(t,n){var r=t.keys,o=n.keyEntities,i=Er(r);if(!e)return{keyEntities:i.map((function(e){return zt(zt({},e),{},{status:"keep"})}))};var a=wr(o,i),s=o.length;return{keyEntities:a.filter((function(e){for(var t=null,n=0;n=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function mo(e){var t,n,r;if(lo.isWindow(e)||9===e.nodeType){var o=lo.getWindow(e);t={left:lo.getWindowScrollLeft(o),top:lo.getWindowScrollTop(o)},n=lo.viewportWidth(o),r=lo.viewportHeight(o)}else t=lo.offset(e),n=lo.outerWidth(e),r=lo.outerHeight(e);return t.width=n,t.height=r,t}function yo(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,i=e.height,a=e.left,s=e.top;return"c"===n?s+=i/2:"b"===n&&(s+=i),"c"===r?a+=o/2:"r"===r&&(a+=o),{left:a,top:s}}function bo(e,t,n,r,o){var i=yo(t,n[1]),a=yo(e,n[0]),s=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-s[0]+r[0]-o[0]),top:Math.round(e.top-s[1]+r[1]-o[1])}}function go(e,t,n){return e.leftn.right}function Eo(e,t,n){return e.topn.bottom}function wo(e,t,n){var r=[];return lo.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Oo(e,t){return e[t]=-e[t],e}function xo(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Co(e,t){e[0]=xo(e[0],t.width),e[1]=xo(e[1],t.height)}function So(e,t,n,r){var o=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,u=n.source||e;i=[].concat(i),a=[].concat(a);var c={},l=0,f=vo(u,!(!(s=s||{})||!s.alwaysByViewport)),p=mo(u);Co(i,p),Co(a,t);var d=bo(p,t,o,i,a),h=lo.merge(p,d);if(f&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&go(d,p,f)){var v=wo(o,/[lr]/gi,{l:"r",r:"l"}),m=Oo(i,0),y=Oo(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&o.left+i.width>n.right&&(i.width-=o.left+i.width-n.right),r.adjustX&&o.left+i.width>n.right&&(o.left=Math.max(n.right-i.width,n.left)),r.adjustY&&o.top=n.top&&o.top+i.height>n.bottom&&(i.height-=o.top+i.height-n.bottom),r.adjustY&&o.top+i.height>n.bottom&&(o.top=Math.max(n.bottom-i.height,n.top)),lo.mix(o,i)}(d,p,f,c))}return h.width!==p.width&&lo.css(u,"width",lo.width(u)+h.width-p.width),h.height!==p.height&&lo.css(u,"height",lo.height(u)+h.height-p.height),lo.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:i,targetOffset:a,overflow:c}}function _o(e,t,n){var r=n.target||t;return So(e,mo(r),n,!function(e,t){var n=vo(e,t),r=mo(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function To(e,t,n){var r,o,i=lo.getDocument(e),a=i.defaultView||i.parentWindow,s=lo.getWindowScrollLeft(a),u=lo.getWindowScrollTop(a),c=lo.viewportWidth(a),l=lo.viewportHeight(a);r="pageX"in t?t.pageX:s+t.clientX,o="pageY"in t?t.pageY:u+t.clientY;var f=r>=0&&r<=s+c&&o>=0&&o<=u+l;return So(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t1&&(B=r.createElement("div",{className:"".concat(i,"-content")},u)),r.createElement(xr,Object.assign({visible:n,ref:x},U,{onAppearPrepare:F,onEnterPrepare:F,removeOnLeave:f,leavedClassName:"".concat(i,"-hidden")}),(function(e,t){var n=e.className,o=e.style,s=g()(i,a,S,n);return r.createElement(jo,{target:d||h,key:"popup",ref:O,monitorWindowResize:!0,disabled:V,align:p,onAlign:I},r.createElement("div",{ref:t,className:s,onMouseEnter:y,onMouseLeave:b,onMouseDown:E,onTouchStart:w,style:zt(zt({},o),H)},B))}))}));Fo.displayName="PopupInner";var Ho=Fo,Vo=r.forwardRef((function(e,t){var n=$n({},e);return r.createElement("div",null,r.createElement(Sr,Object.assign({},n)),r.createElement(Ho,Object.assign({},n,{ref:t})))}));Vo.displayName="Popup";var Bo=Vo,Wo=r.createContext(null);function zo(){}function Go(){return""}function Ko(){return window.document}var Yo=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Xo,$o,qo=(Xo=Yn,($o=function(e){$t(n,e);var t=en(n);function n(e){var r,i;return Gt(this,n),(r=t.call(this,e)).popupRef=o.a.createRef(),r.triggerRef=o.a.createRef(),r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Hn(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();Hn(n,t)||Hn(o,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Vn(r.triggerRef.current);if(t)return t}catch(e){}return de.a.findDOMNode(Qt(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,o=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,u=n.getPopupClassNameFromAlign;return o&&i&&t.push(function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?"".concat(r," min"):"",a=n>0?"".concat(n," sec"):"";return o.a.createElement("small",null,o.a.createElement("br",null),o.a.createElement("i",null,"Duration: "),i+" "+a)}var Hi=function(e){var t=e.isSelf,n=e.duration,r=e.agentName,i=e.message,a=void 0===i?"":i,s=t?"right":"left",u=t?"alert-info":"alert-warning";return o.a.createElement("div",{className:"row",style:{marginLeft:"0",marginRight:"0"}},o.a.createElement("div",{className:"alert message "+u,role:"alert",style:{float:s}},o.a.createElement("span",{style:{fontSize:"16px",whiteSpace:"pre-wrap"}},o.a.createElement("b",null,r),": ",a),o.a.createElement(Fi,{duration:n})))};function Vi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bi(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n