You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
var e=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:global;var t={};function debounce(t,o=100,n={}){if(typeof t!=="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(o<0)throw new RangeError("`wait` must not be negative.");const{immediate:i}=typeof n==="boolean"?{immediate:n}:n;let r;let a;let c;let l;let d;function later(){const e=Date.now()-l;if(e<o&&e>=0)c=setTimeout(later,o-e);else{c=void 0;if(!i){const e=r;const o=a;r=void 0;a=void 0;d=t.apply(e,o)}}}const debounced=function(...n){if(r&&(this||e)!==r)throw new Error("Debounced method called with different contexts.");r=this||e;a=n;l=Date.now();const f=i&&!c;c||(c=setTimeout(later,o));if(f){const e=r;const o=a;r=void 0;a=void 0;d=t.apply(e,o)}return d};debounced.clear=()=>{if(c){clearTimeout(c);c=void 0}};debounced.flush=()=>{if(!c)return;const e=r;const o=a;r=void 0;a=void 0;d=t.apply(e,o);clearTimeout(c);c=void 0};return debounced}t.debounce=debounce;t=debounce;var o=t;const n=t.debounce;export{n as debounce,o as default};