urbi-exhibitions
Version:
2 lines (1 loc) • 1.9 kB
JavaScript
;const l=require("./_commonjsHelpers-DKOUU3wS.cjs");var h,L;function V(){if(L)return h;L=1;var _="Expected a function",x=NaN,C="[object Symbol]",G=/^\s+|\s+$/g,F=/^[-+]0x[0-9a-f]+$/i,M=/^0b[01]+$/i,N=/^0o[0-7]+$/i,R=parseInt,W=typeof l.commonjsGlobal=="object"&&l.commonjsGlobal&&l.commonjsGlobal.Object===Object&&l.commonjsGlobal,$=typeof self=="object"&&self&&self.Object===Object&&self,q=W||$||Function("return this")(),A=Object.prototype,B=A.toString,D=Math.max,H=Math.min,j=function(){return q.Date.now()};function P(e,t,i){var c,s,b,a,r,f,u=0,O=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(_);t=I(t)||0,y(i)&&(O=!!i.leading,d="maxWait"in i,b=d?D(I(i.maxWait)||0,t):b,p="trailing"in i?!!i.trailing:p);function v(n){var o=c,m=s;return c=s=void 0,u=n,a=e.apply(m,o),a}function z(n){return u=n,r=setTimeout(g,t),O?v(n):a}function J(n){var o=n-f,m=n-u,k=t-o;return d?H(k,b-m):k}function E(n){var o=n-f,m=n-u;return f===void 0||o>=t||o<0||d&&m>=b}function g(){var n=j();if(E(n))return S(n);r=setTimeout(g,J(n))}function S(n){return r=void 0,p&&c?v(n):(c=s=void 0,a)}function K(){r!==void 0&&clearTimeout(r),u=0,c=f=s=r=void 0}function Q(){return r===void 0?a:S(j())}function T(){var n=j(),o=E(n);if(c=arguments,s=this,f=n,o){if(r===void 0)return z(f);if(d)return r=setTimeout(g,t),v(f)}return r===void 0&&(r=setTimeout(g,t)),a}return T.cancel=K,T.flush=Q,T}function y(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function U(e){return!!e&&typeof e=="object"}function X(e){return typeof e=="symbol"||U(e)&&B.call(e)==C}function I(e){if(typeof e=="number")return e;if(X(e))return x;if(y(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=y(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(G,"");var i=M.test(e);return i||N.test(e)?R(e.slice(2),i?2:8):F.test(e)?x:+e}return h=P,h}var Y=V();const Z=l.getDefaultExportFromCjs(Y);exports.debounce=Z;