aiflowy-ui-admin/node_modules/.vite/deps/chunk-HEQ4L5TV.js

144 lines
4.0 KiB
JavaScript

import {
baseEach,
baseFindIndex,
baseIteratee
} from "./chunk-BQYCTTAX.js";
import {
baseRest,
isIterateeCall
} from "./chunk-SJ5HZDIS.js";
import {
toNumber
} from "./chunk-ZXSZILPV.js";
import {
arrayMap,
eq,
hasPath,
identity,
isArray2 as isArray,
isArrayLike,
isSymbol,
keys,
keysIn
} from "./chunk-LB3CVB72.js";
// ../node_modules/.pnpm/vue-element-plus-x@1.3.7_ro_47c535807434a0797b7704af258a7bca/node_modules/vue-element-plus-x/dist/min-BngCxx8g.js
var INFINITY = 1 / 0;
var MAX_INTEGER = 17976931348623157e292;
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = value < 0 ? -1 : 1;
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
function toInteger(value) {
var result = toFinite(value), remainder = result % 1;
return result === result ? remainder ? result - remainder : result : 0;
}
var objectProto$1 = Object.prototype;
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
var defaults = baseRest(function(object, sources) {
object = Object(object);
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : void 0;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
length = 1;
}
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
var propsIndex = -1;
var propsLength = props.length;
while (++propsIndex < propsLength) {
var key = props[propsIndex];
var value = object[key];
if (value === void 0 || eq(value, objectProto$1[key]) && !hasOwnProperty$1.call(object, key)) {
object[key] = source[key];
}
}
}
return object;
});
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = baseIteratee(predicate);
collection = keys(collection);
predicate = function(key) {
return iteratee(iterable[key], key, iterable);
};
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0;
};
}
var nativeMax = Math.max;
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, baseIteratee(predicate), index);
}
var find = createFind(findIndex);
function baseMap(collection, iteratee) {
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection2) {
result[++index] = iteratee(value, key, collection2);
});
return result;
}
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, baseIteratee(iteratee));
}
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
function has(object, path) {
return object != null && hasPath(object, path, baseHas);
}
function baseLt(value, other) {
return value < other;
}
function baseExtremum(array, iteratee, comparator) {
var index = -1, length = array.length;
while (++index < length) {
var value = array[index], current = iteratee(value);
if (current != null && (computed === void 0 ? current === current && !isSymbol(current) : comparator(current, computed))) {
var computed = current, result = value;
}
}
return result;
}
function min(array) {
return array && array.length ? baseExtremum(array, identity, baseLt) : void 0;
}
export {
toFinite,
toInteger,
defaults,
find,
baseMap,
map,
has,
baseLt,
baseExtremum,
min
};
//# sourceMappingURL=chunk-HEQ4L5TV.js.map