File: /home/dmstechonline/whatsapp.dmstech.online/node_modules/.vite/deps/lodash_debounce.js
import {
__commonJS
} from "./chunk-ROME4SDB.js";
// node_modules/lodash/isObject.js
var require_isObject = __commonJS({
"node_modules/lodash/isObject.js"(exports, module) {
function isObject(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
module.exports = isObject;
}
});
// node_modules/lodash/_freeGlobal.js
var require_freeGlobal = __commonJS({
"node_modules/lodash/_freeGlobal.js"(exports, module) {
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
module.exports = freeGlobal;
}
});
// node_modules/lodash/_root.js
var require_root = __commonJS({
"node_modules/lodash/_root.js"(exports, module) {
var freeGlobal = require_freeGlobal();
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
module.exports = root;
}
});
// node_modules/lodash/now.js
var require_now = __commonJS({
"node_modules/lodash/now.js"(exports, module) {
var root = require_root();
var now = function() {
return root.Date.now();
};
module.exports = now;
}
});
// node_modules/lodash/_trimmedEndIndex.js
var require_trimmedEndIndex = __commonJS({
"node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
var reWhitespace = /\s/;
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {
}
return index;
}
module.exports = trimmedEndIndex;
}
});
// node_modules/lodash/_baseTrim.js
var require_baseTrim = __commonJS({
"node_modules/lodash/_baseTrim.js"(exports, module) {
var trimmedEndIndex = require_trimmedEndIndex();
var reTrimStart = /^\s+/;
function baseTrim(string) {
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
}
module.exports = baseTrim;
}
});
// node_modules/lodash/_Symbol.js
var require_Symbol = __commonJS({
"node_modules/lodash/_Symbol.js"(exports, module) {
var root = require_root();
var Symbol = root.Symbol;
module.exports = Symbol;
}
});
// node_modules/lodash/_getRawTag.js
var require_getRawTag = __commonJS({
"node_modules/lodash/_getRawTag.js"(exports, module) {
var Symbol = require_Symbol();
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var nativeObjectToString = objectProto.toString;
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = true;
} catch (e) {
}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
}
});
// node_modules/lodash/_objectToString.js
var require_objectToString = __commonJS({
"node_modules/lodash/_objectToString.js"(exports, module) {
var objectProto = Object.prototype;
var nativeObjectToString = objectProto.toString;
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
}
});
// node_modules/lodash/_baseGetTag.js
var require_baseGetTag = __commonJS({
"node_modules/lodash/_baseGetTag.js"(exports, module) {
var Symbol = require_Symbol();
var getRawTag = require_getRawTag();
var objectToString = require_objectToString();
var nullTag = "[object Null]";
var undefinedTag = "[object Undefined]";
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
function baseGetTag(value) {
if (value == null) {
return value === void 0 ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
module.exports = baseGetTag;
}
});
// node_modules/lodash/isObjectLike.js
var require_isObjectLike = __commonJS({
"node_modules/lodash/isObjectLike.js"(exports, module) {
function isObjectLike(value) {
return value != null && typeof value == "object";
}
module.exports = isObjectLike;
}
});
// node_modules/lodash/isSymbol.js
var require_isSymbol = __commonJS({
"node_modules/lodash/isSymbol.js"(exports, module) {
var baseGetTag = require_baseGetTag();
var isObjectLike = require_isObjectLike();
var symbolTag = "[object Symbol]";
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
module.exports = isSymbol;
}
});
// node_modules/lodash/toNumber.js
var require_toNumber = __commonJS({
"node_modules/lodash/toNumber.js"(exports, module) {
var baseTrim = require_baseTrim();
var isObject = require_isObject();
var isSymbol = require_isSymbol();
var NAN = 0 / 0;
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
var reIsBinary = /^0b[01]+$/i;
var reIsOctal = /^0o[0-7]+$/i;
var freeParseInt = parseInt;
function toNumber(value) {
if (typeof value == "number") {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
value = isObject(other) ? other + "" : other;
}
if (typeof value != "string") {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
module.exports = toNumber;
}
});
// node_modules/lodash/debounce.js
var require_debounce = __commonJS({
"node_modules/lodash/debounce.js"(exports, module) {
var isObject = require_isObject();
var now = require_now();
var toNumber = require_toNumber();
var FUNC_ERROR_TEXT = "Expected a function";
var nativeMax = Math.max;
var nativeMin = Math.min;
function debounce(func, wait, options) {
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
if (typeof func != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = "maxWait" in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs, thisArg = lastThis;
lastArgs = lastThis = void 0;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
lastInvokeTime = time;
timerId = setTimeout(timerExpired, wait);
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = void 0;
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = void 0;
return result;
}
function cancel() {
if (timerId !== void 0) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = void 0;
}
function flush() {
return timerId === void 0 ? result : trailingEdge(now());
}
function debounced() {
var time = now(), isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === void 0) {
return leadingEdge(lastCallTime);
}
if (maxing) {
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === void 0) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
module.exports = debounce;
}
});
export default require_debounce();
//# sourceMappingURL=lodash_debounce.js.map