text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.DebounceInput=t(require("React")):e.DebounceInput=t(e.React)}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(t,n){t.exports=e},function(e,t,n){(function(t){var n="Expected a function",o=NaN,r="[object Symbol]",i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,c=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,p="object"==typeof self&&self&&self.Object===Object&&self,s=l||p||Function("return this")(),y=Object.prototype.toString,b=Math.max,v=Math.min,d=function(){return s.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&y.call(e)==r}(e))return o;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=f.test(e);return n||c.test(e)?a(e.slice(2),n?2:8):u.test(e)?o:+e}e.exports=function(e,t,o){var r,i,u,f,c,a,l=0,p=!1,s=!1,y=!0;if("function"!=typeof e)throw new TypeError(n);function g(t){var n=r,o=i;return r=i=void 0,l=t,f=e.apply(o,n)}function O(e){var n=e-a;return void 0===a||n>=t||n<0||s&&e-l>=u}function j(){var e=d();if(O(e))return w(e);c=setTimeout(j,function(e){var n=t-(e-a);return s?v(n,u-(e-l)):n}(e))}function w(e){return c=void 0,y&&r?g(e):(r=i=void 0,f)}function D(){var e=d(),n=O(e);if(r=arguments,i=this,a=e,n){if(void 0===c)return function(e){return l=e,c=setTimeout(j,t),p?g(e):f}(a);if(s)return c=setTimeout(j,t),g(a)}return void 0===c&&(c=setTimeout(j,t)),f}return t=m(t)||0,h(o)&&(p=!!o.leading,u=(s="maxWait"in o)?b(m(o.maxWait)||0,t):u,y="trailing"in o?!!o.trailing:y),D.cancel=function(){void 0!==c&&clearTimeout(c),l=0,r=a=i=c=void 0},D.flush=function(){return void 0===c?f:w(d())},D}}).call(this,n(4))},function(e,t,n){var o=n(3).DebounceInput;o.DebounceInput=o,e.exports=o},function(e,t,n){"use strict";n.r(t),n.d(t,"DebounceInput",(function(){return d}));var o=n(0),r=n.n(o),i=n(1),u=n.n(i);function f(e){return(f="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 c(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?y(e):t}(this,s(t).call(this,e)),v(y(n),"onChange",(function(e){e.persist();var t=n.state.value,o=n.props.minLength;n.setState({value:e.target.value},(function(){var r=n.state.value;r.length>=o?n.notify(e):t.length>r.length&&n.notify(l({},e,{target:l({},e.target,{value:""})}))}))})),v(y(n),"onKeyDown",(function(e){"Enter"===e.key&&n.forceNotify(e);var t=n.props.onKeyDown;t&&(e.persist(),t(e))})),v(y(n),"onBlur",(function(e){n.forceNotify(e);var t=n.props.onBlur;t&&(e.persist(),t(e))})),v(y(n),"createNotifier",(function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=u()((function(e){n.isDebouncing=!1,n.doNotify(e)}),e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}})),v(y(n),"doNotify",(function(){var e=n.props.onChange;e.apply(void 0,arguments)})),v(y(n),"forceNotify",(function(e){var t=n.props.debounceTimeout;if(n.isDebouncing||!(t>0)){n.cancel&&n.cancel();var o=n.state.value,r=n.props.minLength;o.length>=r?n.doNotify(e):n.doNotify(l({},e,{target:l({},e.target,{value:o})}))}})),n.isDebouncing=!1,n.state={value:e.value||""};var o=n.props.debounceTimeout;return n.createNotifier(o),n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(t,e),n=t,(o=[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,o=t.debounceTimeout,r=e.debounceTimeout,i=e.value,u=this.state.value;void 0!==n&&i!==n&&u!==n&&this.setState({value:n}),o!==r&&this.createNotifier(o)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e,t,n=this.props,o=n.element,i=(n.onChange,n.value,n.minLength,n.debounceTimeout,n.forceNotifyByEnter),u=n.forceNotifyOnBlur,f=n.onKeyDown,a=n.onBlur,p=n.inputRef,s=c(n,["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"]),y=this.state.value;e=i?{onKeyDown:this.onKeyDown}:f?{onKeyDown:f}:{},t=u?{onBlur:this.onBlur}:a?{onBlur:a}:{};var b=p?{ref:p}:{};return r.a.createElement(o,l({},s,{onChange:this.onChange,value:y},e,{},t,{},b))}}])&&p(n.prototype,o),i&&p(n,i),t}(r.a.PureComponent);v(d,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},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}])}));