"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.debounce=debounce;var _isObject=require("./isObject");function debounce(i,o,n){var u,a,t,c,f,d,v=0,s=!1,l=!1,e=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(n){var e=u,t=a;return u=a=void 0,v=n,c=i.apply(t,e)}function b(n,e){return setTimeout(n,e)}function h(n){var e=n-d;return void 0===d||o<=e||e<0||l&&t<=n-v}function m(){var n,e=Date.now();if(h(e))return r(e);f=b(m,(n=(e=e)-v,e=o-(e-d),l?Math.min(e,t-n):e))}function r(n){return f=void 0,e&&u?p(n):(u=a=void 0,c)}function w(){for(var n=Date.now(),e=h(n),t=arguments.length,i=new Array(t),r=0;r