@lm_fe/utils 0.1.201

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.
@@ -0,0 +1,1303 @@
1
+ import dayjs, { ConfigType, QUnitType, OpUnitType, Dayjs as Dayjs$1 } from 'dayjs';
2
+ export { default as dayjs } from 'dayjs';
3
+ import { AxiosRequestConfig, AxiosError, AxiosResponse, AxiosInstance } from 'axios';
4
+ import ReconnectingWebSocket from 'reconnecting-websocket';
5
+ import { FC } from 'react';
6
+
7
+ interface ICommonOption {
8
+ value?: any;
9
+ label?: string;
10
+ prefix?: string;
11
+ sufix?: string;
12
+ suffix?: string;
13
+ props?: any;
14
+ warning?: boolean;
15
+ parentheses?: boolean;
16
+ exclusive?: boolean;
17
+ inputType?: string;
18
+ id?: any;
19
+ text?: any;
20
+ code?: any;
21
+ }
22
+
23
+ type PropertyKey$1 = string | number | symbol;
24
+ type PartialAll<T> = {
25
+ [P in keyof T]?: T[P] extends Array<any> ? Partial<T[P][number]>[] : Partial<T[P]>;
26
+ };
27
+ type PartialSome<T, K extends keyof T> = {
28
+ [P in K]?: T[P];
29
+ } & Pick<T, Exclude<keyof T, K>>;
30
+ type AnyObject<T = any> = {
31
+ [x: string]: T;
32
+ };
33
+
34
+ /**
35
+ * Sorts an array of items into groups. The return value is a map where the keys are
36
+ * the group ids the given getGroupId function produced and the value is an array of
37
+ * each item in that group.
38
+ */
39
+ declare const group: <T, Key extends string | number | symbol>(array: readonly T[], getGroupId: (item: T) => Key) => Partial<Record<Key, T[]>>;
40
+ /**
41
+ * Creates an array of grouped elements, the first of which contains the
42
+ * first elements of the given arrays, the second of which contains the
43
+ * second elements of the given arrays, and so on.
44
+ *
45
+ * Ex. const zipped = zip(['a', 'b'], [1, 2], [true, false]) // [['a', 1, true], ['b', 2, false]]
46
+ */
47
+ declare function zip<T1, T2, T3, T4, T5>(array1: T1[], array2: T2[], array3: T3[], array4: T4[], array5: T5[]): [T1, T2, T3, T4, T5][];
48
+ declare function zip<T1, T2, T3, T4>(array1: T1[], array2: T2[], array3: T3[], array4: T4[]): [T1, T2, T3, T4][];
49
+ declare function zip<T1, T2, T3>(array1: T1[], array2: T2[], array3: T3[]): [T1, T2, T3][];
50
+ declare function zip<T1, T2>(array1: T1[], array2: T2[]): [T1, T2][];
51
+ /**
52
+ * Creates an object mapping the specified keys to their corresponding values
53
+ *
54
+ * Ex. const zipped = zipToObject(['a', 'b'], [1, 2]) // { a: 1, b: 2 }
55
+ * Ex. const zipped = zipToObject(['a', 'b'], (k, i) => k + i) // { a: 'a0', b: 'b1' }
56
+ * Ex. const zipped = zipToObject(['a', 'b'], 1) // { a: 1, b: 1 }
57
+ */
58
+ declare function zipToObject<K extends string | number | symbol, V>(keys: K[], values: V | ((key: K, idx: number) => V) | V[]): Record<K, V>;
59
+ /**
60
+ * Go through a list of items, starting with the first item,
61
+ * and comparing with the second. Keep the one you want then
62
+ * compare that to the next item in the list with the same
63
+ *
64
+ * Ex. const greatest = () => boil(numbers, (a, b) => a > b)
65
+ */
66
+ declare const boil: <T>(array: readonly T[], compareFunc: (a: T, b: T) => T) => T | null;
67
+ /**
68
+ * Sum all numbers in an array. Optionally provide a function
69
+ * to convert objects in the array to number values.
70
+ */
71
+ declare function sum<T extends number>(array: readonly T[]): number;
72
+ declare function sum<T extends object>(array: readonly T[], fn: (item: T) => number): number;
73
+ /**
74
+ * Get the first item in an array or a default value
75
+ */
76
+ declare const first: <T>(array: readonly T[], defaultValue?: T | null | undefined) => T | null | undefined;
77
+ /**
78
+ * Get the last item in an array or a default value
79
+ */
80
+ declare const last: <T>(array: readonly T[], defaultValue?: T | null | undefined) => T | null | undefined;
81
+ /**
82
+ * Sort an array without modifying it and return
83
+ * the newly sorted value
84
+ */
85
+ declare const sort: <T>(array: readonly T[], getter: (item: T) => number, desc?: boolean) => T[];
86
+ /**
87
+ * Sort an array without modifying it and return
88
+ * the newly sorted value. Allows for a string
89
+ * sorting value.
90
+ */
91
+ declare const alphabetical: <T>(array: readonly T[], getter: (item: T) => string, dir?: 'asc' | 'desc') => T[];
92
+ declare const counting: <T, TId extends string | number | symbol>(list: readonly T[], identity: (item: T) => TId) => Record<TId, number>;
93
+ /**
94
+ * Replace an element in an array with a new
95
+ * item without modifying the array and return
96
+ * the new value
97
+ */
98
+ declare const replace: <T>(list: readonly T[], newItem: T, match: (item: T, idx: number) => boolean) => T[];
99
+ /**
100
+ * Convert an array to a dictionary by mapping each item
101
+ * into a dictionary key & value
102
+ */
103
+ declare const objectify: <T, Key extends string | number | symbol, Value = T>(array: readonly T[], getKey: (item: T) => Key, getValue?: (item: T) => Value) => Record<Key, Value>;
104
+ /**
105
+ * Select performs a filter and a mapper inside of a reduce,
106
+ * only iterating the list one time.
107
+ *
108
+ * @example
109
+ * select([1, 2, 3, 4], x => x*x, x > 2) == [9, 16]
110
+ */
111
+ declare const select: <T, K>(array: readonly T[], mapper: (item: T, index: number) => K, condition: (item: T, index: number) => boolean) => K[];
112
+ /**
113
+ * Max gets the greatest value from a list
114
+ *
115
+ * @example
116
+ * max([ 2, 3, 5]) == 5
117
+ * max([{ num: 1 }, { num: 2 }], x => x.num) == { num: 2 }
118
+ */
119
+ declare function max(array: readonly [number, ...number[]]): number;
120
+ declare function max(array: readonly number[]): number | null;
121
+ declare function max<T>(array: readonly T[], getter: (item: T) => number): T | null;
122
+ /**
123
+ * Min gets the smallest value from a list
124
+ *
125
+ * @example
126
+ * min([1, 2, 3, 4]) == 1
127
+ * min([{ num: 1 }, { num: 2 }], x => x.num) == { num: 1 }
128
+ */
129
+ declare function min(array: readonly [number, ...number[]]): number;
130
+ declare function min(array: readonly number[]): number | null;
131
+ declare function min<T>(array: readonly T[], getter: (item: T) => number): T | null;
132
+ /**
133
+ * Splits a single list into many lists of the desired size. If
134
+ * given a list of 10 items and a size of 2, it will return 5
135
+ * lists with 2 items each
136
+ */
137
+ declare const cluster: <T>(list: readonly T[], size?: number) => T[][];
138
+ /**
139
+ * Given a list of items returns a new list with only
140
+ * unique items. Accepts an optional identity function
141
+ * to convert each item in the list to a comparable identity
142
+ * value
143
+ */
144
+ declare const unique: <T, K extends string | number | symbol>(array: readonly T[], toKey?: ((item: T) => K) | undefined) => T[];
145
+ /**
146
+ * Creates a generator that will produce an iteration through
147
+ * the range of number as requested.
148
+ *
149
+ * @example
150
+ * range(3) // yields 0, 1, 2, 3
151
+ * range(0, 3) // yields 0, 1, 2, 3
152
+ * range(0, 3, 'y') // yields y, y, y, y
153
+ * range(0, 3, () => 'y') // yields y, y, y, y
154
+ * range(0, 3, i => i) // yields 0, 1, 2, 3
155
+ * range(0, 3, i => `y${i}`) // yields y0, y1, y2, y3
156
+ * range(0, 3, obj) // yields obj, obj, obj, obj
157
+ * range(0, 6, i => i, 2) // yields 0, 2, 4, 6
158
+ */
159
+ declare function range<T = number>(startOrLength: number, end?: number, valueOrMapper?: T | ((i: number) => T), step?: number): Generator<T>;
160
+ /**
161
+ * Creates a list of given start, end, value, and
162
+ * step parameters.
163
+ *
164
+ * @example
165
+ * list(3) // 0, 1, 2, 3
166
+ * list(0, 3) // 0, 1, 2, 3
167
+ * list(0, 3, 'y') // y, y, y, y
168
+ * list(0, 3, () => 'y') // y, y, y, y
169
+ * list(0, 3, i => i) // 0, 1, 2, 3
170
+ * list(0, 3, i => `y${i}`) // y0, y1, y2, y3
171
+ * list(0, 3, obj) // obj, obj, obj, obj
172
+ * list(0, 6, i => i, 2) // 0, 2, 4, 6
173
+ */
174
+ declare const list: <T = number>(startOrLength: number, end?: number, valueOrMapper?: T | ((i: number) => T) | undefined, step?: number) => T[];
175
+ /**
176
+ * Given an array of arrays, returns a single
177
+ * dimentional array with all items in it.
178
+ */
179
+ declare const flat: <T>(lists: readonly T[][]) => T[];
180
+ /**
181
+ * Given two arrays, returns true if any
182
+ * elements intersect
183
+ */
184
+ declare const intersects: <T, K extends string | number | symbol>(listA: readonly T[], listB: readonly T[], identity?: ((t: T) => K) | undefined) => boolean;
185
+ /**
186
+ * Split an array into two array based on
187
+ * a true/false condition function
188
+ */
189
+ declare const fork: <T>(list: readonly T[], condition: (item: T) => boolean) => [T[], T[]];
190
+ /**
191
+ * Given two lists of the same type, iterate the first list
192
+ * and replace items matched by the matcher func in the
193
+ * first place.
194
+ */
195
+ declare const merge: <T>(root: readonly T[], others: readonly T[], matcher: (item: T) => any) => readonly T[];
196
+ /**
197
+ * Replace an item in an array by a match function condition. If
198
+ * no items match the function condition, appends the new item to
199
+ * the end of the list.
200
+ */
201
+ declare const replaceOrAppend: <T>(list: readonly T[], newItem: T, match: (a: T, idx: number) => boolean) => T[];
202
+ /**
203
+ * If the item matching the condition already exists
204
+ * in the list it will be removed. If it does not it
205
+ * will be added.
206
+ */
207
+ declare const toggle: <T>(list: readonly T[], item: T, toKey?: ((item: T, idx: number) => number | string | symbol) | null | undefined, options?: {
208
+ strategy?: 'prepend' | 'append';
209
+ }) => T[];
210
+ type Falsy = null | undefined | false | '' | 0 | 0n;
211
+ /**
212
+ * Given a list returns a new list with
213
+ * only truthy values
214
+ */
215
+ declare const sift: <T>(list: readonly (Falsy | T)[]) => T[];
216
+ /**
217
+ * Like a reduce but does not require an array.
218
+ * Only need a number and will iterate the function
219
+ * as many times as specified.
220
+ *
221
+ * NOTE: This is NOT zero indexed. If you pass count=5
222
+ * you will get 1, 2, 3, 4, 5 iteration in the callback
223
+ * function
224
+ */
225
+ declare const iterate: <T>(count: number, func: (currentValue: T, iteration: number) => T, initValue: T) => T;
226
+ /**
227
+ * Returns all items from the first list that
228
+ * do not exist in the second list.
229
+ */
230
+ declare const diff: <T>(root: readonly T[], other: readonly T[], identity?: (item: T) => string | number | symbol) => T[];
231
+ /**
232
+ * Shift array items by n steps
233
+ * If n > 0 items will shift n steps to the right
234
+ * If n < 0 items will shift n steps to the left
235
+ */
236
+ declare function shift<T>(arr: Array<T>, n: number): T[];
237
+
238
+ /**
239
+ * An async reduce function. Works like the
240
+ * built-in Array.reduce function but handles
241
+ * an async reducer function
242
+ */
243
+ declare const reduce: <T, K>(array: readonly T[], asyncReducer: (acc: K, item: T, index: number) => Promise<K>, initValue?: K | undefined) => Promise<K>;
244
+ /**
245
+ * An async map function. Works like the
246
+ * built-in Array.map function but handles
247
+ * an async mapper function
248
+ */
249
+ declare const map: <T, K>(array: readonly T[], asyncMapFunc: (item: T, index: number) => Promise<K>) => Promise<K[]>;
250
+ /**
251
+ * Useful when for script like things where cleanup
252
+ * should be done on fail or sucess no matter.
253
+ *
254
+ * You can call defer many times to register many
255
+ * defered functions that will all be called when
256
+ * the function exits in any state.
257
+ */
258
+ declare const defer: <TResponse>(func: (register: (fn: (error?: any) => any, options?: {
259
+ rethrow?: boolean;
260
+ }) => void) => Promise<TResponse>) => Promise<TResponse>;
261
+ /**
262
+ * Support for the built-in AggregateError
263
+ * is still new. Node < 15 doesn't have it
264
+ * so patching here.
265
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError#browser_compatibility
266
+ */
267
+ declare class AggregateError extends Error {
268
+ errors: Error[];
269
+ constructor(errors?: Error[]);
270
+ }
271
+ /**
272
+ * Executes many async functions in parallel. Returns the
273
+ * results from all functions as an array. After all functions
274
+ * have resolved, if any errors were thrown, they are rethrown
275
+ * in an instance of AggregateError
276
+ */
277
+ declare const parallel: <T, K>(limit: number, array: readonly T[], func: (item: T) => Promise<K>) => Promise<K[]>;
278
+ type PromiseValues<T extends Promise<any>[]> = {
279
+ [K in keyof T]: T[K] extends Promise<infer U> ? U : never;
280
+ };
281
+ /**
282
+ * Functionally similar to Promise.all or Promise.allSettled. If any
283
+ * errors are thrown, all errors are gathered and thrown in an
284
+ * AggregateError.
285
+ *
286
+ * @example
287
+ * const [user] = await all([
288
+ * api.users.create(...),
289
+ * s3.buckets.create(...),
290
+ * slack.customerSuccessChannel.sendMessage(...)
291
+ * ])
292
+ */
293
+ declare function all<T extends [Promise<any>, ...Promise<any>[]]>(promises: T): Promise<PromiseValues<T>>;
294
+ declare function all<T extends Promise<any>[]>(promises: T): Promise<PromiseValues<T>>;
295
+ /**
296
+ * Functionally similar to Promise.all or Promise.allSettled. If any
297
+ * errors are thrown, all errors are gathered and thrown in an
298
+ * AggregateError.
299
+ *
300
+ * @example
301
+ * const { user } = await all({
302
+ * user: api.users.create(...),
303
+ * bucket: s3.buckets.create(...),
304
+ * message: slack.customerSuccessChannel.sendMessage(...)
305
+ * })
306
+ */
307
+ declare function all<T extends Record<string, Promise<any>>>(promises: T): Promise<{
308
+ [K in keyof T]: Awaited<T[K]>;
309
+ }>;
310
+ /**
311
+ * Retries the given function the specified number
312
+ * of times.
313
+ */
314
+ declare const retry: <TResponse>(options: {
315
+ times?: number | undefined;
316
+ delay?: number | null | undefined;
317
+ backoff?: ((count: number) => number) | undefined;
318
+ }, func: (exit: (err: any) => void) => Promise<TResponse>) => Promise<TResponse>;
319
+ /**
320
+ * Async wait
321
+ */
322
+ declare const sleep: (milliseconds: number) => Promise<unknown>;
323
+ /**
324
+ * A helper to try an async function without forking
325
+ * the control flow. Returns an error first callback _like_
326
+ * array response as [Error, result]
327
+ */
328
+ declare const tryit: <Args extends any[], Return>(func: (...args: Args) => Return) => (...args: Args) => Return extends Promise<any> ? Promise<[Error, undefined] | [undefined, Awaited<Return>]> : [Error, undefined] | [undefined, Return];
329
+ /**
330
+ * A helper to try an async function that returns undefined
331
+ * if it fails.
332
+ *
333
+ * e.g. const result = await guard(fetchUsers)() ?? [];
334
+ */
335
+ declare const guard: <TFunction extends () => any>(func: TFunction, shouldGuard?: ((err: any) => boolean) | undefined) => ReturnType<TFunction> extends Promise<any> ? Promise<Awaited<ReturnType<TFunction>> | undefined> : ReturnType<TFunction> | undefined;
336
+
337
+ declare function chain<T1 extends any[], T2, T3>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3): (...arg: T1) => T3;
338
+ declare function chain<T1 extends any[], T2, T3, T4>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4): (...arg: T1) => T4;
339
+ declare function chain<T1 extends any[], T2, T3, T4, T5>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5): (...arg: T1) => T5;
340
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6): (...arg: T1) => T6;
341
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6, f6: (arg: T3) => T7): (...arg: T1) => T7;
342
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6, f6: (arg: T3) => T7, f7: (arg: T3) => T8): (...arg: T1) => T8;
343
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6, f6: (arg: T3) => T7, f7: (arg: T3) => T8, f8: (arg: T3) => T9): (...arg: T1) => T9;
344
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6, f6: (arg: T3) => T7, f7: (arg: T3) => T8, f8: (arg: T3) => T9, f9: (arg: T3) => T10): (...arg: T1) => T10;
345
+ declare function chain<T1 extends any[], T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(f1: (...arg: T1) => T2, f2: (arg: T2) => T3, f3: (arg: T3) => T4, f4: (arg: T3) => T5, f5: (arg: T3) => T6, f6: (arg: T3) => T7, f7: (arg: T3) => T8, f8: (arg: T3) => T9, f9: (arg: T3) => T10, f10: (arg: T3) => T11): (...arg: T1) => T11;
346
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], LastResult>(f1: (next: (...args: F1NextArgs) => LastResult) => (...args: F1Args) => F1Result, last: (...args: F1NextArgs) => LastResult): (...args: F1Args) => F1Result;
347
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2Result, F2NextArgs extends any[], LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => LastResult) => (...args: F1NextArgs) => F2Result, last: (...args: F2NextArgs) => LastResult): (...args: F1Args) => F1Result;
348
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => LastResult) => (...args: F2NextArgs) => F3Result, last: (...args: F3NextArgs) => LastResult): (...args: F1Args) => F1Result;
349
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => LastResult) => (...args: F3NextArgs) => F4Result, last: (...args: F4NextArgs) => LastResult): (...args: F1Args) => F1Result;
350
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, F5NextArgs extends any[], F5Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => F5Result) => (...args: F3NextArgs) => F4Result, f5: (next: (...args: F5NextArgs) => LastResult) => (...args: F4NextArgs) => F5Result, last: (...args: F5NextArgs) => LastResult): (...args: F1Args) => F1Result;
351
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, F5NextArgs extends any[], F5Result, F6NextArgs extends any[], F6Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => F5Result) => (...args: F3NextArgs) => F4Result, f5: (next: (...args: F5NextArgs) => F6Result) => (...args: F4NextArgs) => F5Result, f6: (next: (...args: F6NextArgs) => LastResult) => (...args: F5NextArgs) => F6Result, last: (...args: F6NextArgs) => LastResult): (...args: F1Args) => F1Result;
352
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, F5NextArgs extends any[], F5Result, F6NextArgs extends any[], F6Result, F7NextArgs extends any[], F7Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => F5Result) => (...args: F3NextArgs) => F4Result, f5: (next: (...args: F5NextArgs) => F6Result) => (...args: F4NextArgs) => F5Result, f6: (next: (...args: F6NextArgs) => F7Result) => (...args: F5NextArgs) => F6Result, f7: (next: (...args: F7NextArgs) => LastResult) => (...args: F6NextArgs) => F7Result, last: (...args: F7NextArgs) => LastResult): (...args: F1Args) => F1Result;
353
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, F5NextArgs extends any[], F5Result, F6NextArgs extends any[], F6Result, F7NextArgs extends any[], F7Result, F8NextArgs extends any[], F8Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => F5Result) => (...args: F3NextArgs) => F4Result, f5: (next: (...args: F5NextArgs) => F6Result) => (...args: F4NextArgs) => F5Result, f6: (next: (...args: F6NextArgs) => F7Result) => (...args: F5NextArgs) => F6Result, f7: (next: (...args: F7NextArgs) => LastResult) => (...args: F6NextArgs) => F7Result, f8: (next: (...args: F8NextArgs) => LastResult) => (...args: F7NextArgs) => F8Result, last: (...args: F8NextArgs) => LastResult): (...args: F1Args) => F1Result;
354
+ declare function compose<F1Result, F1Args extends any[], F1NextArgs extends any[], F2NextArgs extends any[], F2Result, F3NextArgs extends any[], F3Result, F4NextArgs extends any[], F4Result, F5NextArgs extends any[], F5Result, F6NextArgs extends any[], F6Result, F7NextArgs extends any[], F7Result, F8NextArgs extends any[], F8Result, F9NextArgs extends any[], F9Result, LastResult>(f1: (next: (...args: F1NextArgs) => F2Result) => (...args: F1Args) => F1Result, f2: (next: (...args: F2NextArgs) => F3Result) => (...args: F1NextArgs) => F2Result, f3: (next: (...args: F3NextArgs) => F4Result) => (...args: F2NextArgs) => F3Result, f4: (next: (...args: F4NextArgs) => F5Result) => (...args: F3NextArgs) => F4Result, f5: (next: (...args: F5NextArgs) => F6Result) => (...args: F4NextArgs) => F5Result, f6: (next: (...args: F6NextArgs) => F7Result) => (...args: F5NextArgs) => F6Result, f7: (next: (...args: F7NextArgs) => LastResult) => (...args: F6NextArgs) => F7Result, f8: (next: (...args: F8NextArgs) => LastResult) => (...args: F7NextArgs) => F8Result, f9: (next: (...args: F9NextArgs) => LastResult) => (...args: F8NextArgs) => F9Result, last: (...args: F9NextArgs) => LastResult): (...args: F1Args) => F1Result;
355
+ /**
356
+ * This type produces the type array of TItems with all the type items
357
+ * in TItemsToRemove removed from the start of the array type.
358
+ *
359
+ * @example
360
+ * ```
361
+ * RemoveItemsInFront<[number, number], [number]> = [number]
362
+ * RemoveItemsInFront<[File, number, string], [File, number]> = [string]
363
+ * ```
364
+ */
365
+ type RemoveItemsInFront<TItems extends any[], TItemsToRemove extends any[]> = TItems extends [...TItemsToRemove, ...infer TRest] ? TRest : TItems;
366
+ declare const partial: <T extends any[], TA extends Partial<T>, R>(fn: (...args: T) => R, ...args: TA) => (...rest: RemoveItemsInFront<T, TA>) => R;
367
+ /**
368
+ * Like partial but for unary functions that accept
369
+ * a single object argument
370
+ */
371
+ declare const partob: <T, K, PartialArgs extends Partial<T>>(fn: (args: T) => K, argobj: PartialArgs) => (restobj: Omit<T, keyof PartialArgs>) => K;
372
+ /**
373
+ * Creates a Proxy object that will dynamically
374
+ * call the handler argument when attributes are
375
+ * accessed
376
+ */
377
+ declare const proxied: <T, K>(handler: (propertyName: T) => K) => Record<string, K>;
378
+ /**
379
+ * Creates a memoized function. The returned function
380
+ * will only execute the source function when no value
381
+ * has previously been computed. If a ttl (milliseconds)
382
+ * is given previously computed values will be checked
383
+ * for expiration before being returned.
384
+ */
385
+ declare const memo: <TArgs extends any[], TResult>(func: (...args: TArgs) => TResult, options?: {
386
+ key?: ((...args: TArgs) => string) | undefined;
387
+ ttl?: number | undefined;
388
+ }) => (...args: TArgs) => TResult;
389
+ type DebounceFunction<TArgs extends any[]> = {
390
+ (...args: TArgs): void;
391
+ /**
392
+ * Cancels the debounced function
393
+ */
394
+ cancel(): void;
395
+ /**
396
+ * Checks if there is any invocation debounced
397
+ */
398
+ isPending(): boolean;
399
+ /**
400
+ * Runs the debounced function immediately
401
+ */
402
+ flush(...args: TArgs): void;
403
+ };
404
+ type ThrottledFunction<TArgs extends any[]> = {
405
+ (...args: TArgs): void;
406
+ /**
407
+ * Checks if there is any invocation throttled
408
+ */
409
+ isThrottled(): boolean;
410
+ };
411
+ /**
412
+ * Given a delay and a function returns a new function
413
+ * that will only call the source function after delay
414
+ * milliseconds have passed without any invocations.
415
+ *
416
+ * The debounce function comes with a `cancel` method
417
+ * to cancel delayed `func` invocations and a `flush`
418
+ * method to invoke them immediately
419
+ */
420
+ declare const debounce: <TArgs extends any[]>({ delay }: {
421
+ delay: number;
422
+ }, func: (...args: TArgs) => any) => DebounceFunction<TArgs>;
423
+ /**
424
+ * Given an interval and a function returns a new function
425
+ * that will only call the source function if interval milliseconds
426
+ * have passed since the last invocation
427
+ */
428
+ declare const throttle: <TArgs extends any[]>({ interval }: {
429
+ interval: number;
430
+ }, func: (...args: TArgs) => any) => ThrottledFunction<TArgs>;
431
+ /**
432
+ * Make an object callable. Given an object and a function
433
+ * the returned object will be a function with all the
434
+ * objects properties.
435
+ *
436
+ * @example
437
+ * ```typescript
438
+ * const car = callable({
439
+ * wheels: 2
440
+ * }, self => () => {
441
+ * return 'driving'
442
+ * })
443
+ *
444
+ * car.wheels // => 2
445
+ * car() // => 'driving'
446
+ * ```
447
+ */
448
+ declare const callable: <TValue, TObj extends Record<string | number | symbol, TValue>, TFunc extends (...args: any) => any>(obj: TObj, fn: (self: TObj) => TFunc) => TObj & TFunc;
449
+
450
+ /**
451
+ * Checks if the given number is between zero (0) and the ending number. 0 is inclusive.
452
+ *
453
+ * * Numbers can be negative or positive.
454
+ * * Ending number is exclusive.
455
+ *
456
+ * @param {number} number The number to check.
457
+ * @param {number} end The end of the range. Exclusive.
458
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
459
+ */
460
+ declare function inRange(number: number, end: number): boolean;
461
+ /**
462
+ * Checks if the given number is between two numbers.
463
+ *
464
+ * * Numbers can be negative or positive.
465
+ * * Starting number is inclusive.
466
+ * * Ending number is exclusive.
467
+ * * The start and the end of the range can be ascending OR descending order.
468
+ *
469
+ * @param {number} number The number to check.
470
+ * @param {number} start The start of the range. Inclusive.
471
+ * @param {number} end The end of the range. Exclusive.
472
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
473
+ */
474
+ declare function inRange(number: number, start: number, end: number): boolean;
475
+ declare const toFloat: <T extends number | null = number>(value: any, defaultValue?: T | undefined) => number | T;
476
+ declare const toInt: <T extends number | null = number>(value: any, defaultValue?: T | undefined) => number | T;
477
+
478
+ type LowercasedKeys<T extends Record<string, any>> = {
479
+ [P in keyof T & string as Lowercase<P>]: T[P];
480
+ };
481
+ type UppercasedKeys<T extends Record<string, any>> = {
482
+ [P in keyof T & string as Uppercase<P>]: T[P];
483
+ };
484
+ /**
485
+ * Removes (shakes out) undefined entries from an
486
+ * object. Optional second argument shakes out values
487
+ * by custom evaluation.
488
+ */
489
+ declare const shake: <RemovedKeys extends string, T>(obj: T, filter?: (value: any) => boolean) => Omit<T, RemovedKeys>;
490
+ /**
491
+ * Map over all the keys of an object to return
492
+ * a new object
493
+ */
494
+ declare const mapKeys: <TValue, TKey extends string | number | symbol, TNewKey extends string | number | symbol>(obj: Record<TKey, TValue>, mapFunc: (key: TKey, value: TValue) => TNewKey) => Record<TNewKey, TValue>;
495
+ /**
496
+ * Map over all the keys to create a new object
497
+ */
498
+ declare const mapValues: <TValue, TKey extends string | number | symbol, TNewValue>(obj: Record<TKey, TValue>, mapFunc: (value: TValue, key: TKey) => TNewValue) => Record<TKey, TNewValue>;
499
+ /**
500
+ * Map over all the keys to create a new object
501
+ */
502
+ declare const mapEntries: <TKey extends string | number | symbol, TValue, TNewKey extends string | number | symbol, TNewValue>(obj: Record<TKey, TValue>, toEntry: (key: TKey, value: TValue) => [TNewKey, TNewValue]) => Record<TNewKey, TNewValue>;
503
+ /**
504
+ * Returns an object with { [keys]: value }
505
+ * inverted as { [value]: key }
506
+ */
507
+ declare const invert: <TKey extends string | number | symbol, TValue extends string | number | symbol>(obj: Record<TKey, TValue>) => Record<TValue, TKey>;
508
+ /**
509
+ * Convert all keys in an object to lower case
510
+ */
511
+ declare const lowerize: <T extends Record<string, any>>(obj: T) => LowercasedKeys<T>;
512
+ /**
513
+ * Convert all keys in an object to upper case
514
+ */
515
+ declare const upperize: <T extends Record<string, any>>(obj: T) => UppercasedKeys<T>;
516
+ /**
517
+ * Creates a shallow copy of the given obejct/value.
518
+ * @param {*} obj value to clone
519
+ * @returns {*} shallow clone of the given value
520
+ */
521
+ declare const clone: <T>(obj: T) => T;
522
+ /**
523
+ * Convert an object to a list, mapping each entry
524
+ * into a list item
525
+ */
526
+ declare const listify: <TValue, TKey extends string | number | symbol, KResult>(obj: Record<TKey, TValue>, toItem: (key: TKey, value: TValue) => KResult) => KResult[];
527
+ /**
528
+ * Pick a list of properties from an object
529
+ * into a new object
530
+ */
531
+ declare const pick: <T extends object, TKeys extends keyof T>(obj: T, keys: TKeys[]) => Pick<T, TKeys>;
532
+ /**
533
+ * Omit a list of properties from an object
534
+ * returning a new object with the properties
535
+ * that remain
536
+ */
537
+ declare const omit: <T, TKeys extends keyof T>(obj: T, keys: TKeys[]) => Omit<T, TKeys>;
538
+ /**
539
+ * Opposite of get, dynamically set a nested value into
540
+ * an object using a key path. Does not modify the given
541
+ * initial object.
542
+ *
543
+ * @example
544
+ * set({}, 'name', 'ra') // => { name: 'ra' }
545
+ * set({}, 'cards[0].value', 2) // => { cards: [{ value: 2 }] }
546
+ */
547
+ declare const set: <T extends object, K>(initial: T, path: string, value: K) => T;
548
+ /**
549
+ * Merges two objects together recursivly into a new
550
+ * object applying values from right to left.
551
+ * Recursion only applies to child object properties.
552
+ */
553
+ declare const assign: <X extends Record<string | number | symbol, any>>(initial: X, override: X) => X;
554
+ /**
555
+ * Get a string list of all key names that exist in
556
+ * an object (deep).
557
+ *
558
+ * @example
559
+ * keys({ name: 'ra' }) // ['name']
560
+ * keys({ name: 'ra', children: [{ name: 'hathor' }] }) // ['name', 'children.0.name']
561
+ */
562
+ declare const keys: <TValue extends object>(value: TValue) => string[];
563
+ /**
564
+ * Flattens a deep object to a single demension, converting
565
+ * the keys to dot notation.
566
+ *
567
+ * @example
568
+ * crush({ name: 'ra', children: [{ name: 'hathor' }] })
569
+ * // { name: 'ra', 'children.0.name': 'hathor' }
570
+ */
571
+ declare const crush: <TValue extends object>(value: TValue) => object;
572
+ /**
573
+ * The opposite of crush, given an object that was
574
+ * crushed into key paths and values will return
575
+ * the original object reconstructed.
576
+ *
577
+ * @example
578
+ * construct({ name: 'ra', 'children.0.name': 'hathor' })
579
+ * // { name: 'ra', children: [{ name: 'hathor' }] }
580
+ */
581
+ declare const construct: <TObject extends object>(obj: TObject) => object;
582
+
583
+ /**
584
+ * Generates a random number between min and max
585
+ */
586
+ declare const random: (min: number, max: number) => number;
587
+ /**
588
+ * Draw a random item from a list. Returns
589
+ * null if the list is empty
590
+ */
591
+ declare const draw: <T>(array: readonly T[]) => T | null;
592
+ declare const shuffle: <T>(array: readonly T[]) => T[];
593
+ declare const uid: (length: number, specials?: string) => string;
594
+
595
+ /**
596
+ * Creates a series object around a list of values
597
+ * that should be treated with order.
598
+ */
599
+ declare const series: <T>(items: T[], toKey?: (item: T) => string | symbol) => {
600
+ min: (a: T, b: T) => T;
601
+ max: (a: T, b: T) => T;
602
+ first: () => T;
603
+ last: () => T;
604
+ next: (current: T, defaultValue?: T | undefined) => T;
605
+ previous: (current: T, defaultValue?: T | undefined) => T;
606
+ spin: (current: T, num: number) => T;
607
+ };
608
+
609
+ /**
610
+ * Capitalize the first word of the string
611
+ *
612
+ * capitalize('hello') -> 'Hello'
613
+ * capitalize('va va voom') -> 'Va va voom'
614
+ */
615
+ declare const capitalize: (str: string) => string;
616
+ /**
617
+ * Formats the given string in camel case fashion
618
+ *
619
+ * camel('hello world') -> 'helloWorld'
620
+ * camel('va va-VOOM') -> 'vaVaVoom'
621
+ * camel('helloWorld') -> 'helloWorld'
622
+ */
623
+ declare const camel: (str: string) => string;
624
+ /**
625
+ * Formats the given string in snake case fashion
626
+ *
627
+ * snake('hello world') -> 'hello_world'
628
+ * snake('va va-VOOM') -> 'va_va_voom'
629
+ * snake('helloWord') -> 'hello_world'
630
+ */
631
+ declare const snake: (str: string, options?: {
632
+ splitOnNumber?: boolean;
633
+ }) => string;
634
+ /**
635
+ * Formats the given string in dash case fashion
636
+ *
637
+ * dash('hello world') -> 'hello-world'
638
+ * dash('va va_VOOM') -> 'va-va-voom'
639
+ * dash('helloWord') -> 'hello-word'
640
+ */
641
+ declare const dash: (str: string) => string;
642
+ /**
643
+ * Formats the given string in pascal case fashion
644
+ *
645
+ * pascal('hello world') -> 'HelloWorld'
646
+ * pascal('va va boom') -> 'VaVaBoom'
647
+ */
648
+ declare const pascal: (str: string) => string;
649
+ /**
650
+ * Formats the given string in title case fashion
651
+ *
652
+ * title('hello world') -> 'Hello World'
653
+ * title('va_va_boom') -> 'Va Va Boom'
654
+ * title('root-hook') -> 'Root Hook'
655
+ * title('queryItems') -> 'Query Items'
656
+ */
657
+ declare const title: (str: string | null | undefined) => string;
658
+ /**
659
+ * template is used to replace data by name in template strings.
660
+ * The default expression looks for {{name}} to identify names.
661
+ *
662
+ * Ex. template('Hello, {{name}}', { name: 'ray' })
663
+ * Ex. template('Hello, <name>', { name: 'ray' }, /<(.+?)>/g)
664
+ */
665
+ declare const template: (str: string, data: Record<string, any>, regex?: RegExp) => string;
666
+ /**
667
+ * Trims all prefix and suffix characters from the given
668
+ * string. Like the builtin trim function but accepts
669
+ * other characters you would like to trim and trims
670
+ * multiple characters.
671
+ *
672
+ * ```typescript
673
+ * trim(' hello ') // => 'hello'
674
+ * trim('__hello__', '_') // => 'hello'
675
+ * trim('/repos/:owner/:repo/', '/') // => 'repos/:owner/:repo'
676
+ * trim('222222__hello__1111111', '12_') // => 'hello'
677
+ * ```
678
+ */
679
+ declare const trim: (str: string | null | undefined, charsToTrim?: string) => string;
680
+
681
+ declare const isSymbol: (value: any) => value is symbol;
682
+ declare const isArray: (arg: any) => arg is any[];
683
+ declare const isObject: (value: any) => value is object;
684
+ /**
685
+ * Checks if the given value is primitive.
686
+ *
687
+ * Primitive Types: number , string , boolean , symbol, bigint, undefined, null
688
+ *
689
+ * @param {*} value value to check
690
+ * @returns {boolean} result
691
+ */
692
+ declare const isPrimitive: (value: any) => boolean;
693
+ declare const isFunction: (value: any) => value is Function;
694
+ declare const isString: (value: any) => value is string;
695
+ declare const isInt: (value: any) => value is number;
696
+ declare const isFloat: (value: any) => value is number;
697
+ declare const isNumber: (value: any) => value is number;
698
+ declare const isDate: (value: any) => value is Date;
699
+ /**
700
+ * This is really a _best guess_ promise checking. You
701
+ * should probably use Promise.resolve(value) to be 100%
702
+ * sure you're handling it correctly.
703
+ */
704
+ declare const isPromise: (value: any) => value is Promise<any>;
705
+ declare const isEmpty: (value: any) => boolean;
706
+ declare const isEqual: <TType>(x: TType, y: TType) => boolean;
707
+
708
+ declare function get<T = any>(value: T, path: string, defaultValue?: T | undefined): T;
709
+ declare function identity<T>(value: T): T;
710
+ declare function isBoolean(value: any): value is boolean;
711
+ declare function isObjectLike(value: any): boolean;
712
+ declare function isNull(value: any): value is null;
713
+ declare function size(value: any): number;
714
+ declare function isNil(value: any): value is null | undefined;
715
+ declare function toString(value: any): string;
716
+ declare function cloneDeep<T>(value: T): T | null;
717
+ declare function hasOwn(obj: AnyObject, key: PropertyKey): boolean;
718
+
719
+ declare function safe_json_parse<T = any>(str?: any, retOnErr?: T | null): T | null;
720
+ declare function safe_json_stringify(obj?: any): string;
721
+ declare function safe_json_parse_arr<T = any>(str?: any, retOnErr?: T[]): T[];
722
+
723
+ type TCommonFileType = 'application/vnd.ms-excel' | 'text/csv;charset=utf-8' | 'application/msword';
724
+ declare function get_global(): typeof globalThis;
725
+ declare function getSearchParamsValue(key: string): string | null;
726
+ declare function getSearchParamsAll(url?: URL): AnyObject<string>;
727
+ declare function setSearchParamsValue(key: string, value: string | number): URL;
728
+ declare function setSearchParamsAll(data: AnyObject<string | number>): URL;
729
+ declare function scrollIntoView(symbol: string, finder?: (selectors: string) => Element | null): void;
730
+ declare function base64ToBinary(data: string, type: TCommonFileType): Blob;
731
+ declare function downloadFile(content: string | Blob, filename?: string, type?: TCommonFileType, isBase64?: boolean): void;
732
+ declare function uuid(): string;
733
+ declare function randomHex(): number;
734
+ declare function charToUTF8(char: string): number[];
735
+ declare function charToUnicode(char: string): number;
736
+ declare function unicodeToChar(u: number): string | null;
737
+ declare function unicode_to_UTF8(u: number): number[] | null;
738
+ declare function getFilledArray(n: number): any[];
739
+ declare function copyText(text: string): boolean;
740
+ declare function safeExec<T extends (...args: any) => any>(fn?: T, ...args: Parameters<T>): any;
741
+ declare function safeGetFromFuncOrData(fn: any): any;
742
+ declare function numberLikeCompare(a: number | string | boolean | null, b: number | string | boolean | null): boolean;
743
+ declare function warpBase64Type(str: string, type: 'img' | 'pdf'): string;
744
+ declare function safe_number_parse(value: any, defaultValue?: number): number;
745
+ declare function expect_array<T>(value?: T[] | null, default_v?: T[]): T[];
746
+ declare function gen_encoded_char_svg(props: {
747
+ char: string;
748
+ size?: number;
749
+ color?: string;
750
+ }): string;
751
+ declare function base64_to_image(base64img: string): Promise<HTMLImageElement | null>;
752
+ declare function image_to_base64(img_el: HTMLImageElement): string | null;
753
+ declare function filter_obj_to_url_search(obj: Object | any[]): any;
754
+ declare function safe_async_call<T extends (...args: any) => any>(cb?: T, ...args: Parameters<T>): Promise<ReturnType<T> | null>;
755
+ declare function cache_fetch<T = any>(key: string, cb: () => Promise<T>, deep?: boolean): Promise<T>;
756
+ declare function speculate_on_display(value?: any): string;
757
+ declare function getFuckTimeInterval(star_hour?: number, end_hour?: number, min_interval?: 1 | 2 | 3 | 4 | 5 | 6 | 10 | 15 | 20 | 30): string[];
758
+ declare function random_word(): string[];
759
+ declare function confirm_operation(): boolean;
760
+ declare function simple_encrypt(data: AnyObject | any[]): number[] | null;
761
+ declare function simple_decrypt(code: number[]): AnyObject | null;
762
+ declare function simple_encrypt_str(data: string, sp?: string): string | null;
763
+ declare function simple_decrypt_str(code: string, sp?: string): string | null;
764
+ declare function text_ellipsis(text: string, max: number): string;
765
+
766
+ interface ILL {
767
+ log?(...optionalParams: any[]): void;
768
+ warn?(...optionalParams: any[]): void;
769
+ error?(...optionalParams: any[]): void;
770
+ }
771
+ declare class MyLog {
772
+ private _logMsg;
773
+ logBig(t: string): void;
774
+ private env;
775
+ private static _handler;
776
+ static set handler(v: ILL);
777
+ constructor(e: string);
778
+ log(...msg: any[]): void;
779
+ warn(...msg: any[]): void;
780
+ error(...msg: any[]): void;
781
+ }
782
+
783
+ declare class EventEmitter<TypeMapInterface extends {
784
+ [x: string]: any[];
785
+ }> {
786
+ events: {
787
+ [x in keyof TypeMapInterface]?: Array<(...args: TypeMapInterface[x]) => void>;
788
+ };
789
+ constructor();
790
+ addListener<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): this;
791
+ on<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): this;
792
+ on_cb<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): (...args: TypeMapInterface[T]) => void;
793
+ on_rm<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): () => void;
794
+ static logger: MyLog;
795
+ emit<T extends keyof TypeMapInterface>(event: T, ...args: TypeMapInterface[T]): boolean;
796
+ removeAllListeners<T extends keyof TypeMapInterface>(event: T): this;
797
+ off<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): this;
798
+ once<T extends keyof TypeMapInterface>(event: T, listener: (...args: TypeMapInterface[T]) => void): this;
799
+ prependListener<T extends keyof TypeMapInterface>(event: keyof TypeMapInterface, listener: (...args: any[]) => void): this;
800
+ prependOnceListener<T extends keyof TypeMapInterface>(event: keyof TypeMapInterface, listener: (...args: any[]) => void): this;
801
+ removeListener<T extends keyof TypeMapInterface>(event: keyof TypeMapInterface, listener: (...args: any[]) => void): this;
802
+ setMaxListeners(n: number): this;
803
+ getMaxListeners(): number;
804
+ listeners<T extends keyof TypeMapInterface>(event: keyof TypeMapInterface): Function[];
805
+ rawListeners<T extends keyof TypeMapInterface>(event: keyof TypeMapInterface): Function[];
806
+ eventNames(): Array<keyof TypeMapInterface>;
807
+ listenerCount(type: string): number;
808
+ }
809
+
810
+ declare const EMPTY_PLACEHOLDER = "-";
811
+ declare const TOKEN_KEY = "\u03A3(\u3063 \u00B0\u0414 \u00B0;)\u3063";
812
+ declare const ARG_URS1_KEY = "usr1";
813
+ declare const ARG_URS2_KEY = "usr2";
814
+ declare const noop: () => void;
815
+ declare const ROMAN_NUMERALS: {
816
+ 1: string;
817
+ 2: string;
818
+ 3: string;
819
+ 4: string;
820
+ 5: string;
821
+ 6: string;
822
+ 7: string;
823
+ 8: string;
824
+ 9: string;
825
+ 10: string;
826
+ };
827
+
828
+ type Dayjs = dayjs.Dayjs;
829
+ type DayjsConfigType = dayjs.ConfigType;
830
+ declare function getMomentObj(s: DayjsConfigType): Dayjs;
831
+ declare const formatDate: ((s?: any) => string | null) & {
832
+ format: "YYYY-MM-DD";
833
+ };
834
+ declare const formatDateTime: ((s?: any) => string | null) & {
835
+ format: "YYYY-MM-DD HH:mm:ss";
836
+ };
837
+ declare const formatDateTimeNoSecond: ((s?: any) => string | null) & {
838
+ format: "YYYY-MM-DD HH:mm";
839
+ };
840
+ declare const formatTime: ((s?: any) => string | null) & {
841
+ format: "HH:mm:ss";
842
+ };
843
+ declare function getMomentRange(m?: any): {
844
+ 昨天: [dayjs.Dayjs, dayjs.Dayjs];
845
+ 今天: [dayjs.Dayjs, dayjs.Dayjs];
846
+ 明天: [dayjs.Dayjs, dayjs.Dayjs];
847
+ 上周: [dayjs.Dayjs, dayjs.Dayjs];
848
+ 近一周: [dayjs.Dayjs, dayjs.Dayjs];
849
+ 下周: [dayjs.Dayjs, dayjs.Dayjs];
850
+ 上月: [dayjs.Dayjs, dayjs.Dayjs];
851
+ 近一月: [dayjs.Dayjs, dayjs.Dayjs];
852
+ 下月: [dayjs.Dayjs, dayjs.Dayjs];
853
+ 近一年: [dayjs.Dayjs, dayjs.Dayjs];
854
+ 年初至今: [dayjs.Dayjs, dayjs.Dayjs];
855
+ };
856
+ declare function presets_date(): {
857
+ label: string;
858
+ value: any;
859
+ }[];
860
+ declare function isMoment(m: any): boolean;
861
+ /**
862
+ * 获取若干天后的日期
863
+ */
864
+ declare function getFutureDate(num: number): any;
865
+ declare function dayjs_quarter(input: Dayjs, which_quarter?: number): [Dayjs, number];
866
+ declare function diff_between(a: ConfigType, b: ConfigType, unit: QUnitType | OpUnitType, float?: boolean): any;
867
+
868
+ interface ISpectialOption {
869
+ sp?: ICommonOption[];
870
+ start?: number;
871
+ useString?: boolean;
872
+ useDefault?: boolean;
873
+ }
874
+ declare const optionKey其他 = 99;
875
+ declare const optionKey不详 = 100;
876
+ declare const optionKey否 = 0;
877
+ type TOptionKey = string[] | string;
878
+ type TGetOptionKey = () => TOptionKey;
879
+ type TOptions<T extends TOptionKey | TGetOptionKey> = T extends TOptionKey ? ICommonOption[] : () => ICommonOption[];
880
+ declare function getSimpleOptions<T extends TOptionKey | TGetOptionKey>(_arr: T, options?: ISpectialOption): TOptions<T>;
881
+ declare function getSameOptions<T extends TOptionKey | TGetOptionKey>(_arr: T): TOptions<T>;
882
+ declare function getDualModeOptions<T extends TOptionKey | TGetOptionKey>(arr: T, options?: ISpectialOption): readonly [TOptions<T>, TOptions<T>];
883
+ declare function getPresetOptions(key: string, pure?: boolean): ICommonOption[];
884
+ declare function getOptionLabel(k: string, value: any, defaultLabel?: string): string;
885
+ declare function getOptionValue(k: string, label: any): any;
886
+ declare function merge_preset_options(ops: AnyObject<() => ICommonOption[]>): void;
887
+
888
+ interface IDictionary {
889
+ id: number;
890
+ module: string;
891
+ type: number;
892
+ key: string;
893
+ name: string;
894
+ note: string;
895
+ enumerations: Partial<IEnumeration>[];
896
+ }
897
+ interface IEnumeration {
898
+ id: number;
899
+ label: string;
900
+ note: string;
901
+ value: number;
902
+ }
903
+ declare function getDictionaries(): AnyObject<IDictionary>;
904
+ /**
905
+ *
906
+ * @param value 枚举值value
907
+ * @param type string 字典类型
908
+ */
909
+ declare function getDictionariesEnumerations(type: string): Partial<IEnumeration>[];
910
+ /**
911
+ *
912
+ * @param value 枚举值value
913
+ * @param type string 字典类型
914
+ */
915
+ declare function getDictionaryLabel(type: string, value: string | number): string | null | undefined;
916
+ /**
917
+ *
918
+ * @param label 枚举值value
919
+ * @param type string 字典类型
920
+ */
921
+ declare function getDictionaryValue(type: string, label: string): number | null | undefined;
922
+ declare function merge_dict(ops: AnyObject<IDictionary>): void;
923
+
924
+ interface IOpt {
925
+ id?: string;
926
+ text?: string;
927
+ url?: string;
928
+ debug?: boolean;
929
+ allowExternal?: boolean;
930
+ cache?: boolean;
931
+ async?: boolean;
932
+ type?: 'text/css' | 'text/javascript';
933
+ charset?: string;
934
+ }
935
+ type TMixOpt = IOpt | string;
936
+ declare function create_load_src(): (items: TMixOpt | TMixOpt[], node?: HTMLHeadElement) => Promise<Element> | Promise<Element[]>;
937
+ declare function load_src(items: TMixOpt, node?: HTMLHeadElement): Promise<Element>;
938
+ declare function load_src(items: TMixOpt[], node?: HTMLHeadElement): Promise<Element[]>;
939
+
940
+ type EventCallback_Old = (data: any) => void;
941
+ declare class EventEmitter_Old {
942
+ /**
943
+ * 事件集
944
+ */
945
+ private static events;
946
+ private static getCb;
947
+ /**
948
+ * 分发事件
949
+ * @param event
950
+ * @param data
951
+ */
952
+ static dispatch: (event: string, data?: any) => void;
953
+ /**
954
+ * 订阅事件
955
+ */
956
+ static subscribe: (event: string, callback: EventCallback_Old) => void;
957
+ /**
958
+ * 取消事件订阅
959
+ */
960
+ static unSubscribe: (event: string, callback: EventCallback_Old) => void;
961
+ }
962
+ declare const event: EventEmitter<{
963
+ [x: string]: any[];
964
+ }>;
965
+
966
+ type TEventBus<T extends AnyObject> = {
967
+ bus: EventBus<T>;
968
+ };
969
+ type TEventStore<T extends AnyObject> = TEventBus<T> & T;
970
+ declare class EventBus<T extends AnyObject> extends EventEmitter<{
971
+ change: any;
972
+ }> {
973
+ private _data;
974
+ get data(): T;
975
+ set data(value: T);
976
+ key?: string;
977
+ constructor(key?: string, data?: T);
978
+ timeId?: NodeJS.Timeout;
979
+ private persisitEventStore;
980
+ private get genStorePersistKey();
981
+ }
982
+ declare function makeEventStore<T extends AnyObject>(key?: string, data?: T): TEventStore<T>;
983
+
984
+ declare class AppEnv<T = string> {
985
+ static get singleton(): AppEnv;
986
+ _appName?: T;
987
+ _globalCache: {
988
+ [x: string]: any;
989
+ };
990
+ defineGlobalCacheProperty(k: string, d: PropertyDescriptor): void;
991
+ getGlobalCache<C extends Object>(k: string): any;
992
+ setGlobalCache(k: string, v: any): void;
993
+ tail_global_cache(k: string): AnyObject | null;
994
+ push_global_cache(k: string, v: AnyObject): number;
995
+ pop_global_cache(k: string): AnyObject | undefined;
996
+ _isDev?: boolean;
997
+ is(type: T): boolean;
998
+ in(types: T[]): boolean;
999
+ get isSp(): boolean;
1000
+ get isDev(): boolean;
1001
+ set isDev(value: boolean);
1002
+ get appName(): T | undefined;
1003
+ set appName(value: T | undefined);
1004
+ logger: MyLog;
1005
+ get store(): StoreJsAPI;
1006
+ get tokenKey(): string;
1007
+ get loginRememberKey(): string;
1008
+ constructor(appName?: T);
1009
+ get loginRemember(): AnyObject | undefined | null;
1010
+ set loginRemember(value: AnyObject | undefined | null);
1011
+ get token(): string | null;
1012
+ set token(value: string | null);
1013
+ get rawToken(): string | string[];
1014
+ reload(path?: string): void;
1015
+ open(url?: string | URL, target?: string, features?: string): Window | null;
1016
+ logout(path?: string): void;
1017
+ logout_clean(path?: string): void;
1018
+ getToken(): string | null;
1019
+ getTokenFromSearchParam(): string | null;
1020
+ setTokenToSearchParam(url: URL): URL;
1021
+ removeToken(): void;
1022
+ get is_fullscreen(): boolean;
1023
+ }
1024
+ declare const appEnv: AppEnv<"mchc_env">;
1025
+
1026
+ interface IRequest_AxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
1027
+ logger?: boolean;
1028
+ unboxing?: boolean;
1029
+ showMsg?: boolean;
1030
+ successText?: string;
1031
+ errText?: string;
1032
+ ignore_usr?: boolean;
1033
+ ignore_env?: boolean;
1034
+ }
1035
+ interface IRequest_ResponseError<D = any> {
1036
+ msg: string;
1037
+ data?: D;
1038
+ status?: number;
1039
+ url?: string;
1040
+ error?: AxiosError<any, any>;
1041
+ }
1042
+ interface IRequest_SpawnConfig {
1043
+ config?: IRequest_AxiosRequestConfig;
1044
+ onRequest?(value: IRequest_AxiosRequestConfig): IRequest_AxiosRequestConfig;
1045
+ onResponse?(value: AxiosResponse): any;
1046
+ onRejected?(err: IRequest_ResponseError): Promise<any>;
1047
+ }
1048
+ type TRequest_SimpleReq = <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: IRequest_AxiosRequestConfig<D>) => Promise<R>;
1049
+ type TRequest_PreReq = <T = any, R = AxiosResponse<T>, D = any>(url: string, data?: D, config?: IRequest_AxiosRequestConfig<D>) => Promise<R>;
1050
+
1051
+ declare class Request extends EventEmitter<{
1052
+ beforeRequest: any;
1053
+ afterResponse: any;
1054
+ responseErr: any;
1055
+ message: [boolean, string, any];
1056
+ }> {
1057
+ ins: AxiosInstance;
1058
+ constructor(config?: IRequest_SpawnConfig);
1059
+ static CONFIG: {
1060
+ successCode: number[];
1061
+ };
1062
+ static logger: MyLog;
1063
+ static checkRTCode(res?: AxiosResponse<any>): boolean;
1064
+ static genErrMsg(res?: AxiosResponse<any>, error?: AxiosError): string;
1065
+ static createErr(res?: AxiosResponse<any>, error?: AxiosError): IRequest_ResponseError;
1066
+ static getMsg(res?: AxiosResponse<{
1067
+ data?: any;
1068
+ code?: number;
1069
+ msg?: string;
1070
+ message?: string;
1071
+ title?: string;
1072
+ }>): any;
1073
+ static getRemoteMessage(res?: AxiosResponse<any>): any;
1074
+ static getHeaderMessage(res?: AxiosResponse<any>): string | undefined;
1075
+ displayMsg(res: AxiosResponse<{
1076
+ data?: any;
1077
+ code?: number;
1078
+ msg?: string;
1079
+ }>): void;
1080
+ spawn(spawnConfig?: IRequest_SpawnConfig): AxiosInstance;
1081
+ gen(spawnConfig?: IRequest_SpawnConfig): AxiosInstance;
1082
+ get: TRequest_SimpleReq;
1083
+ delete: TRequest_SimpleReq;
1084
+ head: TRequest_SimpleReq;
1085
+ post: TRequest_PreReq;
1086
+ put: TRequest_PreReq;
1087
+ }
1088
+
1089
+ declare const codeMessage: {
1090
+ 200: string;
1091
+ 201: string;
1092
+ 202: string;
1093
+ 204: string;
1094
+ 400: string;
1095
+ 401: string;
1096
+ 403: string;
1097
+ 404: string;
1098
+ 406: string;
1099
+ 410: string;
1100
+ 422: string;
1101
+ 500: string;
1102
+ 502: string;
1103
+ 503: string;
1104
+ 504: string;
1105
+ };
1106
+
1107
+ declare const request: Request;
1108
+ declare const rawRequest: AxiosInstance;
1109
+ declare const asRequest: Request;
1110
+ declare const fubaoRequest: Request;
1111
+
1112
+ interface IGlobalEnumItem<T = string> {
1113
+ label: T;
1114
+ value: number;
1115
+ }
1116
+ declare class EnumItem<T, V = any> extends Array<IGlobalEnumItem<T>> {
1117
+ t: T;
1118
+ v: V;
1119
+ constructor(...data: any[]);
1120
+ getValue(label?: T): number;
1121
+ getValues(labels?: T[]): number[];
1122
+ getLabel(value?: number): T;
1123
+ getLabels(value2?: number[]): T[];
1124
+ getMultiLabel(value?: string): T[];
1125
+ }
1126
+ declare function genEnum<T extends Object>(data: T): EnumItem<keyof T, T[keyof T]>;
1127
+
1128
+ declare function formatRangeDate(data: {
1129
+ [x: string]: Dayjs$1[] | null;
1130
+ }, cKeys?: string[]): {
1131
+ [x: string]: string | null;
1132
+ };
1133
+ declare function formatRangeDateTime(data: {
1134
+ [x: string]: Dayjs$1[] | null;
1135
+ }, cKeys?: string[]): {
1136
+ [x: string]: string | null;
1137
+ };
1138
+
1139
+ declare class Event {
1140
+ target: any;
1141
+ type: string;
1142
+ constructor(type: string, target: any);
1143
+ }
1144
+ declare class ErrorEvent extends Event {
1145
+ message: string;
1146
+ error: Error;
1147
+ constructor(error: Error, target: any);
1148
+ }
1149
+ declare class CloseEvent extends Event {
1150
+ code: number;
1151
+ reason: string;
1152
+ wasClean: boolean;
1153
+ constructor(code: number | undefined, reason: string | undefined, target: any);
1154
+ }
1155
+ interface WebSocketEventListenerMap {
1156
+ close: (event: CloseEvent) => void | {
1157
+ handleEvent: (event: CloseEvent) => void;
1158
+ };
1159
+ error: (event: ErrorEvent) => void | {
1160
+ handleEvent: (event: ErrorEvent) => void;
1161
+ };
1162
+ message: (event: MessageEvent) => void | {
1163
+ handleEvent: (event: MessageEvent) => void;
1164
+ };
1165
+ open: (event: Event) => void | {
1166
+ handleEvent: (event: Event) => void;
1167
+ };
1168
+ }
1169
+
1170
+ declare class BaseWsService<T = any> extends EventEmitter<{
1171
+ [x in keyof WebSocketEventListenerMap]: Parameters<WebSocketEventListenerMap[x]>;
1172
+ } & {
1173
+ data: [T];
1174
+ }> {
1175
+ wsService?: ReconnectingWebSocket;
1176
+ protected _url: string;
1177
+ protected _logger: MyLog;
1178
+ constructor(url: string);
1179
+ get isOpen(): boolean;
1180
+ protected _send(data: any): void;
1181
+ send(data: any): void;
1182
+ protected _messageHandler(e: WebSocketEventMap['message']): void;
1183
+ connect(): Promise<BaseWsService<T>>;
1184
+ }
1185
+
1186
+ declare function getTimeSlice(hour?: number, isShowSecond?: boolean): string[];
1187
+
1188
+ /**
1189
+ * 计算BMI
1190
+ */
1191
+ declare function getBMI(weight: number, height: number): string | 0;
1192
+ /**
1193
+ * 计算孕周
1194
+ * gesDate:预产期-B超
1195
+ * date:产检/报告日期
1196
+ */
1197
+ declare function getGesWeek(gesDate: string, date: string): string;
1198
+ /**
1199
+ * 计算停经孕周
1200
+ * @param checkData 当前日期
1201
+ * @param lmp 末次月经
1202
+ * @returns
1203
+ */
1204
+ declare const menopauseWeek: (checkData: string, lmp: string) => string;
1205
+ /**
1206
+ * 计算孕周对应的天数
1207
+ */
1208
+ declare function getGestationalDays(gestationalWeek: string): number;
1209
+ /**
1210
+ * 获取本周五、下周五、下下周五时间
1211
+ */
1212
+ declare function getOrderTime(orderDate: '本周五' | '下周五' | '下下周五'): dayjs.Dayjs;
1213
+ /**
1214
+ * 根据末次月经计算预产期B超
1215
+ */
1216
+ declare function getExpected(date: string): string;
1217
+ /**
1218
+ * 计算两个日期相隔的年数
1219
+ */
1220
+ declare function getDiffYears(date: string, preDate: string): number;
1221
+ /**
1222
+ * 获取两个字符串日期 YYYY-MM-dd 间隔的天数
1223
+ * 始终返回一个正数
1224
+ */
1225
+ declare const getDays: (str1: string, str2: string) => number;
1226
+ /**
1227
+ * 根据 预产期B超 日期获取孕周
1228
+ * 得出 ${孕周周数}+${孕周天数}
1229
+ * 预产期B超
1230
+ */
1231
+ declare const getGestationalWeekBySureEdd: (sureEdd: string) => string;
1232
+ /**
1233
+ * 根据末次月经计算预产期B超
1234
+ */
1235
+ declare function calEddByLmp(lmp: Dayjs$1): dayjs.Dayjs;
1236
+ /**根据出生日期计算年龄 */
1237
+ declare function GetAgeByBirthDay(strBirthday: string): number | null;
1238
+ declare const getDataSource: (url: string, params: object, processFromApi?: (v: any) => any) => Promise<{
1239
+ count: string;
1240
+ data: any;
1241
+ }>;
1242
+ declare function gen_id_form_item_config(name?: string): {
1243
+ inputType: "id";
1244
+ dataIndex: string;
1245
+ name: string;
1246
+ };
1247
+ declare const calGestationalWeekByLmp: (lmp: Dayjs$1, defaultDate?: dayjs.Dayjs) => string;
1248
+ declare const calGestationalWeekBySureEdd: (sureEdd: any, defaultDate?: dayjs.Dayjs) => string | number;
1249
+ declare function format_gp(data: {
1250
+ gravidity?: any;
1251
+ parity?: any;
1252
+ }): string;
1253
+ declare function unmarshalGestationWeek(weekStr?: string): {
1254
+ week: number;
1255
+ day: number;
1256
+ };
1257
+ declare function marshalGestationWeek(week?: string | number, day?: string | number): string;
1258
+
1259
+ declare const Browser: {
1260
+ client: {
1261
+ version: string;
1262
+ clientHeight: number;
1263
+ name: string;
1264
+ type: string;
1265
+ shell: () => string;
1266
+ agent: string;
1267
+ isIE: boolean;
1268
+ isGecko: boolean;
1269
+ isWebkit: boolean;
1270
+ isStrict: boolean;
1271
+ supportSubTitle: () => boolean;
1272
+ supportScope: () => boolean;
1273
+ ieVersion: () => any;
1274
+ operaVersion: () => string | undefined;
1275
+ versionFilter: (arg: any) => any;
1276
+ };
1277
+ };
1278
+ declare const isIE: () => boolean;
1279
+
1280
+ declare function getHappyConfig(pathname?: string): {
1281
+ path: string;
1282
+ args: string[];
1283
+ search: string;
1284
+ usr1: string;
1285
+ usr2: string;
1286
+ } | null;
1287
+ declare function genHappyPath(path: string, arg?: string[], search?: string): string;
1288
+ declare function get_global_happy_arg(key: 'usr1' | 'usr2'): any;
1289
+ declare function transmit_happy(path: string, search?: string): string;
1290
+ declare function transmit_happy_pre(url: string, pre?: string): string;
1291
+
1292
+ type NoArgVoidFunc = () => void;
1293
+ declare function protocolCheck(uri: string, failCb?: NoArgVoidFunc, successCb?: NoArgVoidFunc, unsupportedCb?: NoArgVoidFunc): void;
1294
+ declare function getChromeVersion(): number | false;
1295
+
1296
+ declare function temp_reander(config: {
1297
+ Comp: FC<any>;
1298
+ cb?: () => void;
1299
+ exclusive?: boolean;
1300
+ }): () => void;
1301
+
1302
+ export { ARG_URS1_KEY, ARG_URS2_KEY, AggregateError, AppEnv, BaseWsService, Browser, EMPTY_PLACEHOLDER, EnumItem, EventBus, EventEmitter, EventEmitter_Old, GetAgeByBirthDay, MyLog, ROMAN_NUMERALS, Request, TOKEN_KEY, all, alphabetical, appEnv, asRequest, assign, base64ToBinary, base64_to_image, boil, cache_fetch, calEddByLmp, calGestationalWeekByLmp, calGestationalWeekBySureEdd, callable, camel, capitalize, chain, charToUTF8, charToUnicode, clone, cloneDeep, cluster, codeMessage, compose, confirm_operation, construct, copyText, counting, create_load_src, crush, dash, dayjs_quarter, debounce, defer, diff, diff_between, downloadFile, draw, event, expect_array, filter_obj_to_url_search, first, flat, fork, formatDate, formatDateTime, formatDateTimeNoSecond, formatRangeDate, formatRangeDateTime, formatTime, format_gp, fubaoRequest, genEnum, genHappyPath, gen_encoded_char_svg, gen_id_form_item_config, get, getBMI, getChromeVersion, getDataSource, getDays, getDictionaries, getDictionariesEnumerations, getDictionaryLabel, getDictionaryValue, getDiffYears, getDualModeOptions, getExpected, getFilledArray, getFuckTimeInterval, getFutureDate, getGesWeek, getGestationalDays, getGestationalWeekBySureEdd, getHappyConfig, getMomentObj, getMomentRange, getOptionLabel, getOptionValue, getOrderTime, getPresetOptions, getSameOptions, getSearchParamsAll, getSearchParamsValue, getSimpleOptions, getTimeSlice, get_global, get_global_happy_arg, group, guard, hasOwn, identity, image_to_base64, inRange, intersects, invert, isArray, isBoolean, isDate, isEmpty, isEqual, isFloat, isFunction, isIE, isInt, isMoment, isNil, isNull, isNumber, isObject, isObjectLike, isPrimitive, isPromise, isString, isSymbol, iterate, keys, last, list, listify, load_src, lowerize, makeEventStore, map, mapEntries, mapKeys, mapValues, marshalGestationWeek, max, memo, menopauseWeek, merge, merge_dict, merge_preset_options, min, noop, numberLikeCompare, objectify, omit, optionKey不详, optionKey其他, optionKey否, parallel, partial, partob, pascal, pick, presets_date, protocolCheck, proxied, random, randomHex, random_word, range, rawRequest, reduce, replace, replaceOrAppend, request, retry, safeExec, safeGetFromFuncOrData, safe_async_call, safe_json_parse, safe_json_parse_arr, safe_json_stringify, safe_number_parse, scrollIntoView, select, series, set, setSearchParamsAll, setSearchParamsValue, shake, shift, shuffle, sift, simple_decrypt, simple_decrypt_str, simple_encrypt, simple_encrypt_str, size, sleep, snake, sort, speculate_on_display, sum, temp_reander, template, text_ellipsis, throttle, title, toFloat, toInt, toString, toggle, transmit_happy, transmit_happy_pre, trim, tryit as try, tryit, uid, unicodeToChar, unicode_to_UTF8, unique, unmarshalGestationWeek, upperize, uuid, warpBase64Type, zip, zipToObject };
1303
+ export type { AnyObject, Dayjs, DayjsConfigType, EventCallback_Old, ICommonOption, IGlobalEnumItem, IRequest_AxiosRequestConfig, IRequest_ResponseError, IRequest_SpawnConfig, PartialAll, PartialSome, PropertyKey$1 as PropertyKey, TCommonFileType, TEventBus, TEventStore, TRequest_PreReq, TRequest_SimpleReq };