@pie-element/shared-lodash 0.1.1 → 0.1.2-next.20261005182602
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.js +286 -169
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type AnyFn = (...args: any[]) => any;
|
|
2
|
-
type Iteratee<T, R = unknown> = ((value: T, index: number | string, collection: any) => R) | string | object;
|
|
2
|
+
type Iteratee<T, R = unknown> = ((value: T, index: number | string, collection: any) => R) | string | number | object;
|
|
3
3
|
type Predicate<T> = Iteratee<T, boolean>;
|
|
4
4
|
export interface CancelableFunction<T extends AnyFn> {
|
|
5
5
|
(...args: Parameters<T>): ReturnType<T> | undefined;
|
|
@@ -22,7 +22,7 @@ export declare function difference<T>(array: T[] | null | undefined, ...values:
|
|
|
22
22
|
export declare function differenceWith<T, U>(array: T[] | null | undefined, values: U[] | null | undefined, comparator: (a: T, b: U) => boolean): T[];
|
|
23
23
|
export declare function every<T>(collection: T[] | Record<string, T> | null | undefined, predicate?: Predicate<T>): boolean;
|
|
24
24
|
export declare function escape(value: unknown): string;
|
|
25
|
-
export declare function find<T>(collection: T[] | Record<string, T> | null | undefined, predicate?: Predicate<T
|
|
25
|
+
export declare function find<T>(collection: T[] | Record<string, T> | null | undefined, predicate?: Predicate<T>, fromIndex?: number): T | undefined;
|
|
26
26
|
export declare function findKey<T>(object: Record<string, T> | null | undefined, predicate?: Predicate<T>): string | undefined;
|
|
27
27
|
export declare function flatten<T>(array: Array<T | T[]> | null | undefined): T[];
|
|
28
28
|
export declare function flatMap<T, R>(collection: T[] | Record<string, T> | null | undefined, iteratee?: Iteratee<T, R | R[]>): R[];
|
|
@@ -44,7 +44,7 @@ export declare function isObject(value: unknown): value is object;
|
|
|
44
44
|
export declare function isString(value: unknown): value is string;
|
|
45
45
|
export declare function isUndefined(value: unknown): value is undefined;
|
|
46
46
|
export declare function map<T, R>(collection: T[] | Record<string, T> | null | undefined, iteratee?: Iteratee<T, R>): R[];
|
|
47
|
-
export declare function max(array:
|
|
47
|
+
export declare function max<T>(array: ArrayLike<T> | null | undefined): T | undefined;
|
|
48
48
|
export declare function merge<T extends object>(object: T, ...sources: Array<Record<string, any> | null | undefined>): T;
|
|
49
49
|
export declare function omit<T extends Record<string, any>>(object: T | null | undefined, paths: string | string[]): Partial<T>;
|
|
50
50
|
export declare function omitBy<T extends Record<string, any>>(object: T | null | undefined, predicate?: Predicate<any>): Partial<T>;
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,114 @@
|
|
|
1
1
|
//#region src/index.ts
|
|
2
|
-
var e = Object.prototype;
|
|
3
|
-
function
|
|
2
|
+
var e = Object.prototype, t = Function.prototype.toString.call(Object);
|
|
3
|
+
function n(e) {
|
|
4
4
|
return typeof e == "object" && !!e;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function r(e, t) {
|
|
7
|
+
return e === t || e !== e && t !== t;
|
|
8
|
+
}
|
|
9
|
+
function i(e) {
|
|
10
|
+
if (e == null || typeof e == "function") return !1;
|
|
11
|
+
let { length: t } = e;
|
|
12
|
+
return typeof t == "number" && Number.isSafeInteger(t) && t >= 0;
|
|
13
|
+
}
|
|
14
|
+
function a(r) {
|
|
15
|
+
if (!n(r) || e.toString.call(r) !== "[object Object]") return !1;
|
|
16
|
+
let i = Object.getPrototypeOf(r);
|
|
17
|
+
if (i === null) return !0;
|
|
18
|
+
let a = e.hasOwnProperty.call(i, "constructor") && i.constructor;
|
|
19
|
+
return typeof a == "function" && a instanceof a && Function.prototype.toString.call(a) === t;
|
|
20
|
+
}
|
|
21
|
+
function o(e) {
|
|
22
|
+
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
23
|
+
}
|
|
24
|
+
function s(e) {
|
|
25
|
+
if (!e) return e === 0 ? e : 0;
|
|
26
|
+
let t = typeof e == "symbol" ? NaN : Number(e);
|
|
27
|
+
return t === Infinity || t === -Infinity ? t < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE : t === t ? t : 0;
|
|
28
|
+
}
|
|
29
|
+
function c(e) {
|
|
30
|
+
let t = s(e), n = t % 1;
|
|
31
|
+
return n ? t - n : t;
|
|
32
|
+
}
|
|
33
|
+
function l(e) {
|
|
7
34
|
return Array.isArray(e) ? e : typeof e == "number" ? [e] : e.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
8
35
|
}
|
|
9
|
-
function
|
|
10
|
-
return (t) =>
|
|
36
|
+
function u(e) {
|
|
37
|
+
return (t) => k(t, e);
|
|
38
|
+
}
|
|
39
|
+
function d(e, t) {
|
|
40
|
+
if (e == null) return !1;
|
|
41
|
+
if (!Array.isArray(t) && t in Object(e)) return !0;
|
|
42
|
+
let n = e;
|
|
43
|
+
for (let e of l(t)) {
|
|
44
|
+
if (n == null || !(e in Object(n))) return !1;
|
|
45
|
+
n = n[e];
|
|
46
|
+
}
|
|
47
|
+
return !0;
|
|
11
48
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
49
|
+
function f(e, t) {
|
|
50
|
+
if (r(e, t)) return !0;
|
|
51
|
+
if (!n(e) || !n(t)) return !1;
|
|
52
|
+
if (e instanceof Date || t instanceof Date) return e instanceof Date && t instanceof Date && r(e.getTime(), t.getTime());
|
|
53
|
+
if (Array.isArray(t)) {
|
|
54
|
+
if (!Array.isArray(e) || e.length < t.length) return !1;
|
|
55
|
+
let n = /* @__PURE__ */ new Set();
|
|
56
|
+
for (let r of t) {
|
|
57
|
+
let t = e.findIndex((e, t) => !n.has(t) && f(e, r));
|
|
58
|
+
if (t < 0) return !1;
|
|
59
|
+
n.add(t);
|
|
60
|
+
}
|
|
61
|
+
return !0;
|
|
62
|
+
}
|
|
63
|
+
return !Array.isArray(e) && Object.keys(t).every((n) => n in e && f(e[n], t[n]));
|
|
64
|
+
}
|
|
65
|
+
function ee(e) {
|
|
66
|
+
let t = Object.keys(e);
|
|
67
|
+
return (n) => {
|
|
68
|
+
if (n === e) return !0;
|
|
69
|
+
if (n == null) return t.length === 0;
|
|
70
|
+
let r = Object(n);
|
|
71
|
+
return t.every((t) => t in r && f(r[t], e[t]));
|
|
72
|
+
};
|
|
14
73
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
74
|
+
function te(e, t) {
|
|
75
|
+
return (n) => {
|
|
76
|
+
let r = k(n, e);
|
|
77
|
+
return r === void 0 && t === void 0 ? d(n, e) : f(r, t);
|
|
78
|
+
};
|
|
17
79
|
}
|
|
18
|
-
function
|
|
80
|
+
function p(e) {
|
|
81
|
+
return typeof e == "function" ? e : e == null ? ((e) => e) : typeof e == "object" ? Array.isArray(e) ? te(e[0], e[1]) : ee(e) : u(e);
|
|
82
|
+
}
|
|
83
|
+
function m(e, ...t) {
|
|
19
84
|
return Object.assign(e, ...t.filter(Boolean));
|
|
20
85
|
}
|
|
21
|
-
function
|
|
86
|
+
function h(e, t = 1) {
|
|
22
87
|
if (!e?.length || t < 1) return [];
|
|
23
88
|
let n = [];
|
|
24
89
|
for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
|
|
25
90
|
return n;
|
|
26
91
|
}
|
|
27
|
-
function
|
|
28
|
-
return Array.isArray(e) ? e.slice() :
|
|
92
|
+
function g(e) {
|
|
93
|
+
return Array.isArray(e) ? e.slice() : n(e) ? { ...e } : e;
|
|
29
94
|
}
|
|
30
|
-
function
|
|
31
|
-
if (!
|
|
95
|
+
function _(e) {
|
|
96
|
+
if (!n(e)) return e;
|
|
32
97
|
if (e instanceof Date) return new Date(e.getTime());
|
|
33
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
34
|
-
let
|
|
35
|
-
for (let [
|
|
36
|
-
return
|
|
98
|
+
if (Array.isArray(e)) return e.map((e) => _(e));
|
|
99
|
+
let t = {};
|
|
100
|
+
for (let [n, r] of Object.entries(e)) t[n] = _(r);
|
|
101
|
+
return t;
|
|
37
102
|
}
|
|
38
|
-
function
|
|
103
|
+
function v(e) {
|
|
39
104
|
return (e ?? []).filter(Boolean);
|
|
40
105
|
}
|
|
41
|
-
function
|
|
106
|
+
function ne(e, ...t) {
|
|
42
107
|
let n = [...e ?? []];
|
|
43
108
|
for (let e of t) Array.isArray(e) ? n.push(...e) : n.push(e);
|
|
44
109
|
return n;
|
|
45
110
|
}
|
|
46
|
-
function
|
|
111
|
+
function y(e, t = 0, n = {}) {
|
|
47
112
|
let r, i, a, o, s, c = n.leading === !0, l = n.trailing !== !1, u = () => {
|
|
48
113
|
if (!a) return s;
|
|
49
114
|
let t = a, n = o;
|
|
@@ -60,177 +125,229 @@ function f(e, t = 0, n = {}) {
|
|
|
60
125
|
};
|
|
61
126
|
return f.cancel = d, f.flush = () => (r &&= (clearTimeout(r), void 0), i &&= (clearTimeout(i), void 0), u()), f;
|
|
62
127
|
}
|
|
63
|
-
function
|
|
128
|
+
function re(e, ...t) {
|
|
64
129
|
for (let n of t) if (n) for (let [t, r] of Object.entries(n)) e[t] === void 0 && (e[t] = r);
|
|
65
130
|
return e;
|
|
66
131
|
}
|
|
67
|
-
function
|
|
132
|
+
function b(e, ...t) {
|
|
68
133
|
let n = new Set(t.flat());
|
|
69
134
|
return (e ?? []).filter((e) => !n.has(e));
|
|
70
135
|
}
|
|
71
|
-
function
|
|
136
|
+
function x(e, t, n) {
|
|
72
137
|
return (e ?? []).filter((e) => !(t ?? []).some((t) => n(e, t)));
|
|
73
138
|
}
|
|
74
|
-
function
|
|
75
|
-
let n =
|
|
139
|
+
function S(e, t) {
|
|
140
|
+
let n = p(t), r = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});
|
|
76
141
|
for (let [t, i] of r) if (!n(i, t, e)) return !1;
|
|
77
142
|
return !0;
|
|
78
143
|
}
|
|
79
|
-
function
|
|
144
|
+
function C(e) {
|
|
80
145
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
81
146
|
}
|
|
82
|
-
function
|
|
83
|
-
let
|
|
84
|
-
for (
|
|
147
|
+
function w(e, t, n = 0) {
|
|
148
|
+
let r = p(t), a = Object(e), o = i(e) ? void 0 : Object.keys(a), s = o ? o.length : e.length, l = c(n);
|
|
149
|
+
for (l < 0 && (l = Math.max(s + l, 0)); l < s; l++) {
|
|
150
|
+
let t = o ? o[l] : l;
|
|
151
|
+
if (r(a[t], t, o ? a : e)) return a[t];
|
|
152
|
+
}
|
|
85
153
|
}
|
|
86
|
-
function
|
|
87
|
-
let n =
|
|
154
|
+
function T(e, t) {
|
|
155
|
+
let n = p(t);
|
|
88
156
|
for (let [t, r] of Object.entries(e ?? {})) if (n(r, t, e)) return t;
|
|
89
157
|
}
|
|
90
|
-
function
|
|
158
|
+
function E(e) {
|
|
91
159
|
let t = [];
|
|
92
160
|
for (let n of e ?? []) Array.isArray(n) ? t.push(...n) : t.push(n);
|
|
93
161
|
return t;
|
|
94
162
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
163
|
+
function D(e, t) {
|
|
164
|
+
return G(e, t).flat();
|
|
97
165
|
}
|
|
98
|
-
function
|
|
166
|
+
function O(e, t) {
|
|
99
167
|
let n = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});
|
|
100
168
|
for (let [r, i] of n) t(i, r, e);
|
|
101
169
|
return e;
|
|
102
170
|
}
|
|
103
|
-
function
|
|
171
|
+
function k(e, t, n) {
|
|
104
172
|
if (!Array.isArray(t) && e != null && Object.prototype.hasOwnProperty.call(Object(e), t)) {
|
|
105
|
-
let
|
|
106
|
-
return
|
|
173
|
+
let r = e[t];
|
|
174
|
+
return r === void 0 ? n : r;
|
|
107
175
|
}
|
|
108
|
-
let
|
|
109
|
-
for (let e of
|
|
110
|
-
if (
|
|
111
|
-
|
|
176
|
+
let r = e;
|
|
177
|
+
for (let e of l(t)) {
|
|
178
|
+
if (r == null) return n;
|
|
179
|
+
r = r[e];
|
|
112
180
|
}
|
|
113
|
-
return
|
|
181
|
+
return r === void 0 ? n : r;
|
|
114
182
|
}
|
|
115
|
-
function
|
|
116
|
-
let n =
|
|
117
|
-
return
|
|
183
|
+
function A(e, t) {
|
|
184
|
+
let n = p(t);
|
|
185
|
+
return Z(e, (t, r, i) => {
|
|
118
186
|
let a = String(n(r, i, e));
|
|
119
187
|
return (t[a] ??= []).push(r), t;
|
|
120
188
|
}, {});
|
|
121
189
|
}
|
|
122
|
-
function
|
|
190
|
+
function j(e) {
|
|
123
191
|
return e?.[0];
|
|
124
192
|
}
|
|
125
|
-
function
|
|
193
|
+
function M(e) {
|
|
126
194
|
return (e ?? []).slice(0, -1);
|
|
127
195
|
}
|
|
128
|
-
function
|
|
196
|
+
function N(e, t) {
|
|
129
197
|
return typeof e == "string" ? e.includes(String(t)) : Array.isArray(e) ? e.includes(t) : Object.values(e ?? {}).includes(t);
|
|
130
198
|
}
|
|
131
|
-
function
|
|
199
|
+
function P(...e) {
|
|
132
200
|
let [t, ...n] = e;
|
|
133
201
|
return $((t ?? []).filter((e) => n.every((t) => (t ?? []).includes(e))));
|
|
134
202
|
}
|
|
135
|
-
function
|
|
203
|
+
function F(e) {
|
|
136
204
|
return Array.isArray(e);
|
|
137
205
|
}
|
|
138
|
-
function
|
|
139
|
-
return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !
|
|
140
|
-
}
|
|
141
|
-
function
|
|
142
|
-
let
|
|
143
|
-
if (
|
|
144
|
-
if (
|
|
145
|
-
if (!t
|
|
146
|
-
if (
|
|
147
|
-
if (Array.isArray(
|
|
148
|
-
|
|
149
|
-
|
|
206
|
+
function I(e) {
|
|
207
|
+
return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !n(e) || Object.keys(e).length === 0;
|
|
208
|
+
}
|
|
209
|
+
function L(t, i, a) {
|
|
210
|
+
let o = a?.(t, i);
|
|
211
|
+
if (o !== void 0) return !!o;
|
|
212
|
+
if (r(t, i)) return !0;
|
|
213
|
+
if (!n(t) || !n(i)) return !1;
|
|
214
|
+
if (t instanceof Date || i instanceof Date) return t instanceof Date && i instanceof Date && r(t.getTime(), i.getTime());
|
|
215
|
+
if (Array.isArray(t) || Array.isArray(i)) {
|
|
216
|
+
if (!Array.isArray(t) || !Array.isArray(i) || t.length !== i.length) return !1;
|
|
217
|
+
for (let e = 0; e < t.length; e++) if (!L(t[e], i[e], a)) return !1;
|
|
218
|
+
return !0;
|
|
219
|
+
}
|
|
220
|
+
let s = Object.keys(t), c = Object.keys(i);
|
|
221
|
+
return s.length === c.length && s.every((n) => e.hasOwnProperty.call(i, n) && L(t[n], i[n], a));
|
|
150
222
|
}
|
|
151
|
-
function
|
|
152
|
-
return
|
|
223
|
+
function R(e, t) {
|
|
224
|
+
return L(e, t);
|
|
153
225
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
226
|
+
function z(e, t, n) {
|
|
227
|
+
return L(e, t, n);
|
|
156
228
|
}
|
|
157
|
-
function
|
|
229
|
+
function B(e) {
|
|
158
230
|
return Number.isFinite(e);
|
|
159
231
|
}
|
|
160
|
-
function
|
|
232
|
+
function V(e) {
|
|
161
233
|
return typeof e == "function";
|
|
162
234
|
}
|
|
163
|
-
function
|
|
235
|
+
function H(e) {
|
|
164
236
|
return typeof e == "number" || e instanceof Number;
|
|
165
237
|
}
|
|
166
|
-
function
|
|
238
|
+
function U(e) {
|
|
167
239
|
return typeof e == "object" && !!e || typeof e == "function";
|
|
168
240
|
}
|
|
169
|
-
function
|
|
241
|
+
function ie(e) {
|
|
170
242
|
return typeof e == "string" || e instanceof String;
|
|
171
243
|
}
|
|
172
|
-
function
|
|
244
|
+
function W(e) {
|
|
173
245
|
return e === void 0;
|
|
174
246
|
}
|
|
175
|
-
function
|
|
176
|
-
let n =
|
|
247
|
+
function G(e, t) {
|
|
248
|
+
let n = p(t), r = Array.isArray(e) ? e.entries() : Object.entries(e ?? {}), i = [];
|
|
177
249
|
for (let [t, a] of r) i.push(n(a, t, e));
|
|
178
250
|
return i;
|
|
179
251
|
}
|
|
180
|
-
function
|
|
181
|
-
|
|
252
|
+
function K(e) {
|
|
253
|
+
let t;
|
|
254
|
+
for (let n = 0; n < (e?.length ?? 0); n++) {
|
|
255
|
+
let r = e[n];
|
|
256
|
+
r != null && (t === void 0 ? r === r && typeof r != "symbol" : r > t) && (t = r);
|
|
257
|
+
}
|
|
258
|
+
return t;
|
|
182
259
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
260
|
+
function ae(t) {
|
|
261
|
+
let n = Array.isArray(t), r = n ? Array.from({ length: t.length }, (e, t) => String(t)) : [];
|
|
262
|
+
for (let i in t) (n ? /^(?:0|[1-9]\d*)$/.test(i) && Number(i) < t.length : i === "constructor" && !e.hasOwnProperty.call(t, i)) || r.push(i);
|
|
263
|
+
return r;
|
|
186
264
|
}
|
|
187
|
-
function
|
|
265
|
+
function q(e, t) {
|
|
266
|
+
if (!(t === "__proto__" || t === "constructor" && typeof e[t] == "function")) return e[t];
|
|
267
|
+
}
|
|
268
|
+
function J(e, t, n) {
|
|
269
|
+
(n === void 0 ? t in e : r(e[t], n)) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
270
|
+
configurable: !0,
|
|
271
|
+
enumerable: !0,
|
|
272
|
+
value: n,
|
|
273
|
+
writable: !0
|
|
274
|
+
}) : e[t] = n);
|
|
275
|
+
}
|
|
276
|
+
function Y(e, t, n) {
|
|
277
|
+
if (e !== t) for (let r of ae(t)) U(t[r]) ? oe(e, t, r, n) : J(e, r, t[r]);
|
|
278
|
+
}
|
|
279
|
+
function oe(e, t, r, s) {
|
|
280
|
+
let c = q(e, r), l = q(t, r), u = s.get(l);
|
|
281
|
+
if (u) {
|
|
282
|
+
J(e, r, u);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
let d = l, f = !0;
|
|
286
|
+
if (Array.isArray(l) || o(l)) if (Array.isArray(c)) d = c;
|
|
287
|
+
else if (n(c) && i(c)) d = Array.from(c);
|
|
288
|
+
else if (o(l)) {
|
|
289
|
+
f = !1;
|
|
290
|
+
let e = l.constructor;
|
|
291
|
+
d = new e(l.buffer.slice(0), l.byteOffset, l.length);
|
|
292
|
+
} else d = [];
|
|
293
|
+
else a(l) ? d = !U(c) || typeof c == "function" ? {} : c : f = !1;
|
|
294
|
+
f && (s.set(l, d), Y(d, l, s), s.delete(l)), J(e, r, d);
|
|
295
|
+
}
|
|
296
|
+
function X(e, ...t) {
|
|
297
|
+
let n = Object(e);
|
|
298
|
+
for (let e of t) e && Y(n, e, /* @__PURE__ */ new Map());
|
|
299
|
+
return n;
|
|
300
|
+
}
|
|
301
|
+
function se(e, t) {
|
|
188
302
|
let n = { ...e ?? {} };
|
|
189
303
|
for (let e of Array.isArray(t) ? t : [t]) delete n[e];
|
|
190
304
|
return n;
|
|
191
305
|
}
|
|
192
|
-
function
|
|
193
|
-
let n =
|
|
306
|
+
function ce(e, t) {
|
|
307
|
+
let n = p(t), r = {};
|
|
194
308
|
for (let [t, i] of Object.entries(e ?? {})) n(i, t, e) || (r[t] = i);
|
|
195
309
|
return r;
|
|
196
310
|
}
|
|
197
|
-
function
|
|
311
|
+
function le(e, ...t) {
|
|
198
312
|
let n = {};
|
|
199
313
|
for (let r of t.flat()) e && r in e && (n[r] = e[r]);
|
|
200
314
|
return n;
|
|
201
315
|
}
|
|
202
|
-
function
|
|
203
|
-
let
|
|
204
|
-
|
|
205
|
-
let
|
|
206
|
-
for (
|
|
207
|
-
return
|
|
316
|
+
function ue(e, t, n, r) {
|
|
317
|
+
let i = s(e), a;
|
|
318
|
+
t === void 0 ? (a = i, i = 0) : a = s(t);
|
|
319
|
+
let o = n === void 0 ? i < a ? 1 : -1 : s(n), c = Math.max(Math.ceil((a - i) / (o || 1)), 0), l = Array(c), u = -1;
|
|
320
|
+
for (; c--;) l[r ? c : ++u] = i, i += o;
|
|
321
|
+
return l;
|
|
322
|
+
}
|
|
323
|
+
function de(e, t, n) {
|
|
324
|
+
return ue(e, t, n, !1);
|
|
208
325
|
}
|
|
209
|
-
function
|
|
210
|
-
return
|
|
326
|
+
function fe(e, t, n) {
|
|
327
|
+
return ue(e, t, n, !0);
|
|
211
328
|
}
|
|
212
|
-
function
|
|
329
|
+
function Z(e, t, n) {
|
|
213
330
|
let r = n, i = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});
|
|
214
331
|
for (let [n, a] of i) r = t(r, a, n, e);
|
|
215
332
|
return r;
|
|
216
333
|
}
|
|
217
|
-
function
|
|
218
|
-
let n =
|
|
334
|
+
function pe(e, t) {
|
|
335
|
+
let n = p(t), r = [];
|
|
219
336
|
for (let t = e.length - 1; t >= 0; t--) n(e[t], t, e) && r.unshift(...e.splice(t, 1));
|
|
220
337
|
return r;
|
|
221
338
|
}
|
|
222
|
-
function
|
|
223
|
-
let
|
|
224
|
-
return
|
|
225
|
-
if (t ===
|
|
226
|
-
|
|
339
|
+
function me(e, t, n) {
|
|
340
|
+
let r = l(t), i = e;
|
|
341
|
+
return r.forEach((e, t) => {
|
|
342
|
+
if (t === r.length - 1) {
|
|
343
|
+
i[e] = n;
|
|
227
344
|
return;
|
|
228
345
|
}
|
|
229
|
-
let
|
|
230
|
-
|
|
346
|
+
let a = r[t + 1];
|
|
347
|
+
i[e] ??= typeof a == "number" || /^\d+$/.test(String(a)) ? [] : {}, i = i[e];
|
|
231
348
|
}), e;
|
|
232
349
|
}
|
|
233
|
-
function
|
|
350
|
+
function Q(e) {
|
|
234
351
|
let t = [...e ?? []];
|
|
235
352
|
for (let e = t.length - 1; e > 0; e--) {
|
|
236
353
|
let n = Math.floor(Math.random() * (e + 1));
|
|
@@ -238,93 +355,93 @@ function Y(e) {
|
|
|
238
355
|
}
|
|
239
356
|
return t;
|
|
240
357
|
}
|
|
241
|
-
function
|
|
358
|
+
function he(e) {
|
|
242
359
|
return (e ?? []).slice(1);
|
|
243
360
|
}
|
|
244
|
-
function
|
|
361
|
+
function ge(e, t = 1) {
|
|
245
362
|
return t <= 0 ? [] : (e ?? []).slice(-t);
|
|
246
363
|
}
|
|
247
|
-
function
|
|
248
|
-
return
|
|
364
|
+
function _e(e, t = 0, n = {}) {
|
|
365
|
+
return y(e, t, {
|
|
249
366
|
leading: n.leading !== !1,
|
|
250
367
|
trailing: n.trailing !== !1,
|
|
251
368
|
maxWait: t
|
|
252
369
|
});
|
|
253
370
|
}
|
|
254
|
-
function
|
|
371
|
+
function ve(e, t) {
|
|
255
372
|
let n = t ?? ((e) => e);
|
|
256
373
|
return Array.from({ length: Math.max(0, e) }, (e, t) => n(t));
|
|
257
374
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
375
|
+
var ye = 0;
|
|
376
|
+
function be(e = "") {
|
|
377
|
+
return ye += 1, `${e}${ye}`;
|
|
261
378
|
}
|
|
262
379
|
function $(e) {
|
|
263
380
|
return e != null && e.length ? Array.from(new Set(Array.from(e))) : [];
|
|
264
381
|
}
|
|
265
|
-
function
|
|
382
|
+
function xe(e, t) {
|
|
266
383
|
let n = [];
|
|
267
384
|
for (let r of e ?? []) n.some((e) => t(r, e)) || n.push(r);
|
|
268
385
|
return n;
|
|
269
386
|
}
|
|
270
|
-
function
|
|
387
|
+
function Se(...e) {
|
|
271
388
|
let t = Math.max(0, ...e.map((e) => e.length));
|
|
272
389
|
return Array.from({ length: t }, (t, n) => e.map((e) => e[n]));
|
|
273
390
|
}
|
|
274
|
-
var
|
|
275
|
-
assign:
|
|
276
|
-
chunk:
|
|
277
|
-
clone:
|
|
278
|
-
cloneDeep:
|
|
279
|
-
compact:
|
|
280
|
-
concat:
|
|
281
|
-
debounce:
|
|
282
|
-
defaults:
|
|
283
|
-
difference:
|
|
284
|
-
differenceWith:
|
|
285
|
-
every:
|
|
286
|
-
escape:
|
|
287
|
-
find:
|
|
288
|
-
findKey:
|
|
289
|
-
flatten:
|
|
290
|
-
flatMap:
|
|
291
|
-
forEach:
|
|
292
|
-
get:
|
|
293
|
-
groupBy:
|
|
294
|
-
head:
|
|
295
|
-
includes:
|
|
296
|
-
initial:
|
|
297
|
-
intersection:
|
|
298
|
-
isArray:
|
|
299
|
-
isEmpty:
|
|
300
|
-
isEqual:
|
|
301
|
-
isEqualWith:
|
|
302
|
-
isFinite:
|
|
303
|
-
isFunction:
|
|
304
|
-
isNumber:
|
|
305
|
-
isObject:
|
|
306
|
-
isString:
|
|
307
|
-
isUndefined:
|
|
308
|
-
map:
|
|
309
|
-
max:
|
|
310
|
-
merge:
|
|
311
|
-
omit:
|
|
312
|
-
omitBy:
|
|
313
|
-
pick:
|
|
314
|
-
range:
|
|
315
|
-
rangeRight:
|
|
316
|
-
reduce:
|
|
317
|
-
remove:
|
|
318
|
-
set:
|
|
319
|
-
shuffle:
|
|
320
|
-
tail:
|
|
321
|
-
takeRight:
|
|
322
|
-
throttle:
|
|
323
|
-
times:
|
|
324
|
-
uniqueId:
|
|
391
|
+
var Ce = {
|
|
392
|
+
assign: m,
|
|
393
|
+
chunk: h,
|
|
394
|
+
clone: g,
|
|
395
|
+
cloneDeep: _,
|
|
396
|
+
compact: v,
|
|
397
|
+
concat: ne,
|
|
398
|
+
debounce: y,
|
|
399
|
+
defaults: re,
|
|
400
|
+
difference: b,
|
|
401
|
+
differenceWith: x,
|
|
402
|
+
every: S,
|
|
403
|
+
escape: C,
|
|
404
|
+
find: w,
|
|
405
|
+
findKey: T,
|
|
406
|
+
flatten: E,
|
|
407
|
+
flatMap: D,
|
|
408
|
+
forEach: O,
|
|
409
|
+
get: k,
|
|
410
|
+
groupBy: A,
|
|
411
|
+
head: j,
|
|
412
|
+
includes: N,
|
|
413
|
+
initial: M,
|
|
414
|
+
intersection: P,
|
|
415
|
+
isArray: F,
|
|
416
|
+
isEmpty: I,
|
|
417
|
+
isEqual: R,
|
|
418
|
+
isEqualWith: z,
|
|
419
|
+
isFinite: B,
|
|
420
|
+
isFunction: V,
|
|
421
|
+
isNumber: H,
|
|
422
|
+
isObject: U,
|
|
423
|
+
isString: ie,
|
|
424
|
+
isUndefined: W,
|
|
425
|
+
map: G,
|
|
426
|
+
max: K,
|
|
427
|
+
merge: X,
|
|
428
|
+
omit: se,
|
|
429
|
+
omitBy: ce,
|
|
430
|
+
pick: le,
|
|
431
|
+
range: de,
|
|
432
|
+
rangeRight: fe,
|
|
433
|
+
reduce: Z,
|
|
434
|
+
remove: pe,
|
|
435
|
+
set: me,
|
|
436
|
+
shuffle: Q,
|
|
437
|
+
tail: he,
|
|
438
|
+
takeRight: ge,
|
|
439
|
+
throttle: _e,
|
|
440
|
+
times: ve,
|
|
441
|
+
uniqueId: be,
|
|
325
442
|
uniq: $,
|
|
326
|
-
uniqWith:
|
|
327
|
-
zip:
|
|
443
|
+
uniqWith: xe,
|
|
444
|
+
zip: Se
|
|
328
445
|
};
|
|
329
446
|
//#endregion
|
|
330
|
-
export {
|
|
447
|
+
export { m as assign, h as chunk, g as clone, _ as cloneDeep, v as compact, ne as concat, y as debounce, Ce as default, re as defaults, b as difference, x as differenceWith, C as escape, S as every, w as find, T as findKey, D as flatMap, E as flatten, O as forEach, k as get, A as groupBy, j as head, N as includes, M as initial, P as intersection, F as isArray, I as isEmpty, R as isEqual, z as isEqualWith, B as isFinite, V as isFunction, H as isNumber, U as isObject, ie as isString, W as isUndefined, G as map, K as max, X as merge, se as omit, ce as omitBy, le as pick, de as range, fe as rangeRight, Z as reduce, pe as remove, me as set, Q as shuffle, he as tail, ge as takeRight, _e as throttle, ve as times, $ as uniq, xe as uniqWith, be as uniqueId, Se as zip };
|