mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-08 07:48:02 +08:00
7 lines
1.7 KiB
JavaScript
7 lines
1.7 KiB
JavaScript
|
// Underscore.js 1.9.2
|
||
|
// https://underscorejs.org
|
||
|
// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
|
// Underscore may be freely distributed under the MIT license.
|
||
|
|
||
|
(()=>{var e=function(t){return t instanceof e?t:this instanceof e?void 0:new e(t)};"undefined"==typeof exports||exports.nodeType?("object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{})._=e:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=e),exports._=e);e.VERSION="1.9.2";var t=function(e,t,n,o,l){if(!(o instanceof t))return e.apply(n,l);var r,u="object"!=typeof(r=e.prototype)?{}:Object.create(r),i=e.apply(u,l);return"object"==typeof i?i:u};e.defer=(()=>{var e=(e,t,...n)=>setTimeout(()=>e.apply(null,n),t),n=function(...o){for(var l=0,r=[o[l++],1];l<o.length;)r.push(o[l++]);return t(e,n,this,this,r)};return n})(),e.throttle=function(e,t,n){var o,l,r,u,i=0;n||(n={});var a=function(){i=!1===n.leading?0:Date.now(),o=null,u=e.apply(l,r),o||(l=r=null)},f=function(){var f=Date.now();i||!1!==n.leading||(i=f);var p=t-(f-i);return l=this,r=arguments,p<=0||p>t?(o&&(clearTimeout(o),o=null),i=f,u=e.apply(l,r),o||(l=r=null)):o||!1===n.trailing||(o=setTimeout(a,p)),u};return f.cancel=function(){clearTimeout(o),i=0,o=l=r=null},f},e.debounce=function(e,t,n){var o,l,r=function(t,n){o=null,n&&(l=e.apply(t,n))},u=function(...u){if(o&&clearTimeout(o),n){var i=!o;o=setTimeout(r,t),i&&(l=e.apply(this,u))}else{var a=this;o=setTimeout(()=>r.apply(null,[a,u]),t)}return l};return u.cancel=function(){clearTimeout(o),o=null},u},"function"==typeof define&&define.amd&&define("underscore",[],function(){return e})})();
|