deverything 4.0.0 → 4.1.0
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/README.md +6 -3
- package/dist/index.d.mts +38 -3
- package/dist/index.d.ts +38 -3
- package/dist/index.global.js +2 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -11
package/README.md
CHANGED
|
@@ -30,8 +30,9 @@ Contributions always welcome!
|
|
|
30
30
|
- `isFile()` if it's a file
|
|
31
31
|
- `isFunction()`
|
|
32
32
|
- `isJsDate()` if it's a **valid** javascript's Date
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
33
|
+
- `isBetweenDates()` check if date falls between two other dates (left inclusive: includes start, excludes end)
|
|
34
|
+
- `isFutureDate()` check if date is in the future, optionally against a reference date
|
|
35
|
+
- `isPastDate()` check if date is in the past, optionally against a reference date
|
|
35
36
|
- `isStringDate()` also checks if the string passed is a **valid** date
|
|
36
37
|
- `isKey()` is a real key of an object
|
|
37
38
|
- `isLastIndex()` is the index is the last item of array
|
|
@@ -61,7 +62,9 @@ Contributions always welcome!
|
|
|
61
62
|
### Dates
|
|
62
63
|
|
|
63
64
|
- `getDateRangeSeries()` generate a series of dates within a range
|
|
64
|
-
- `
|
|
65
|
+
- `getDateSeriesRange()` get the smallest and biggest dates from an array of dates
|
|
66
|
+
- `groupByDateBucket()` group items into date buckets based on their dates and specified time intervals
|
|
67
|
+
- `isOver18()` check if someone is over 18 years old
|
|
65
68
|
- `startOfDay()` get the start of a specific day
|
|
66
69
|
- `startOfNextMonth()`
|
|
67
70
|
- `startOfNextWeek()`
|
package/dist/index.d.mts
CHANGED
|
@@ -142,6 +142,7 @@ type Serialized<T> = T extends Date ? string : T extends Array<infer R> ? Array<
|
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Buckets dates into groups based on a date series
|
|
145
|
+
* @deprecated Use `groupByDateBucket` instead. This function will be removed in the next major version.
|
|
145
146
|
* @param dateSeries Array of dates that define the buckets, must be sorted in ascending order
|
|
146
147
|
* @param dates Array of dates to be bucketed, must be sorted in ascending order
|
|
147
148
|
* @param unit The time unit to use for bucketing ('day', 'hour', 'minute', 'second')
|
|
@@ -164,6 +165,23 @@ declare const getDateRangeSeries: (dateRange: DateRange, unit: "day" | "hour" |
|
|
|
164
165
|
*/
|
|
165
166
|
declare const getDateSeriesRange: (dateSeries: DateSeries) => DateRange;
|
|
166
167
|
|
|
168
|
+
type PropertyAccessor<T> = keyof T | ((item: T) => any);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Groups items into date buckets based on their dates and specified time intervals
|
|
172
|
+
* @param dateBuckets Array of ISO date strings that define the bucket boundaries, must be sorted in ascending order
|
|
173
|
+
* @param items Array of items to be grouped into buckets, should be sorted in ascending order by the date property for optimal performance
|
|
174
|
+
* @param unit The time unit to use for bucket intervals ('day', 'hour', 'minute', 'second')
|
|
175
|
+
* @param accessor Optional property accessor for extracting dates from items. If not provided, assumes items are ISO date strings
|
|
176
|
+
* @returns Record where keys are ISO date strings from dateBuckets and values are arrays of items that fall within each bucket's time range
|
|
177
|
+
*/
|
|
178
|
+
declare function groupByDateBucket<T>({ dateBuckets, items, unit, accessor, }: {
|
|
179
|
+
dateBuckets: ISODate[];
|
|
180
|
+
items: T[];
|
|
181
|
+
unit: "day" | "hour" | "minute" | "second";
|
|
182
|
+
accessor?: PropertyAccessor<T>;
|
|
183
|
+
}): Record<ISODate, T[]>;
|
|
184
|
+
|
|
167
185
|
declare const isOver18: (birthDate: DateLike) => boolean;
|
|
168
186
|
|
|
169
187
|
/**
|
|
@@ -764,6 +782,19 @@ declare const isArray: <T>(arg?: any) => arg is T[];
|
|
|
764
782
|
|
|
765
783
|
declare const isArrayIncluded: <T>(arr1: T[], arr2: T[]) => boolean;
|
|
766
784
|
|
|
785
|
+
/**
|
|
786
|
+
* Checks if a date falls between two other dates (left inclusive)
|
|
787
|
+
* @param date The date to check
|
|
788
|
+
* @param dateRange The date range to check against
|
|
789
|
+
* @returns true if the date is between the start and end dates (includes startDate, excludes endDate)
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* isBetweenDates("2023-06-15", { startDate: "2023-01-01", endDate: "2023-12-31" }) // true
|
|
793
|
+
* isBetweenDates("2023-01-01", { startDate: "2023-01-01", endDate: "2023-12-31" }) // true (includes start)
|
|
794
|
+
* isBetweenDates("2023-12-31", { startDate: "2023-01-01", endDate: "2023-12-31" }) // false (excludes end)
|
|
795
|
+
*/
|
|
796
|
+
declare const isBetweenDates: (date: DateLike, dateRange: DateRange) => boolean;
|
|
797
|
+
|
|
767
798
|
declare const isBoolean: (arg: any) => arg is boolean;
|
|
768
799
|
|
|
769
800
|
declare const isBrowser: () => boolean;
|
|
@@ -786,7 +817,9 @@ declare const isFile: (arg?: any) => arg is File;
|
|
|
786
817
|
*/
|
|
787
818
|
declare const isFunction: (arg: any) => arg is Function;
|
|
788
819
|
|
|
789
|
-
declare const isFutureDate: (arg: DateLike
|
|
820
|
+
declare const isFutureDate: (arg: DateLike, { referenceDate }?: {
|
|
821
|
+
referenceDate?: DateLike;
|
|
822
|
+
}) => boolean;
|
|
790
823
|
|
|
791
824
|
declare const isJsDate: (arg: Date) => arg is Date;
|
|
792
825
|
|
|
@@ -822,7 +855,9 @@ declare const isNumericId: (id: string) => boolean;
|
|
|
822
855
|
|
|
823
856
|
declare const isObject: <T>(arg?: any) => arg is PlainObject<T>;
|
|
824
857
|
|
|
825
|
-
declare const isPastDate: (arg: DateLike
|
|
858
|
+
declare const isPastDate: (arg: DateLike, { referenceDate }?: {
|
|
859
|
+
referenceDate?: DateLike;
|
|
860
|
+
}) => boolean;
|
|
826
861
|
|
|
827
862
|
declare const isPromise: (arg: any) => arg is Promise<any>;
|
|
828
863
|
|
|
@@ -858,4 +893,4 @@ declare const isUUID: (arg: string) => boolean;
|
|
|
858
893
|
|
|
859
894
|
declare const isValue: <T>(arg?: Maybe<T>) => arg is T;
|
|
860
895
|
|
|
861
|
-
export { type BoolMap, type Coords, type DateLike, type DateRange, type DateSeries, type Datey, type Defined, type Dimensions, type HashMap, type ISODate, type ISODay, type ISOMonth, type ISOYear, JS_MAX_DIGITS, type Key, type Matrix, type Maybe, type MaybePromise, type MaybePromiseOrValue, type MaybePromiseOrValueArray, type NonUndefined, type NumberMap, type ObjectEntries, type ObjectEntry, type ObjectKey, type ObjectKeys, type ObjectValue, type ObjectValues, type PickDefined, type PickRequired, type PlainKey, type PlainObject, type Point, type PrismaSelect, type Serialized, type StringMap, type Timezone, type TrueMap, type VoidFn, array, arrayDiff, arrayIntersection, average, bucketSortedDates, capitalize, chunkArray, chunkedAll, chunkedAsync, chunkedDynamic, clamp, cleanSpaces, cyclicalItem, dir, enumKeys, enumValues, filterAlphanumeric, first, firstKey, firstValue, formatCamelCase, formatCookies, formatIndexProgress, formatNumber, formatPercentage, formatTrpcInputQueryString, getCookieByName, getDateRangeSeries, getDateSeriesRange, getKeys, getUrlSearchParam, getUrlSearchParams, groupByKey, incrementalId, isArray, isArrayIncluded, isBetween, isBigInt, isBigIntString, isBoolean, isBrowser, isBuffer, isClient, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEven, isFile, isFunction, isFutureDate, isInt, isJsDate, isKey, isLastIndex, isNegativeInt, isNotEmptyString, isNumber, isNumeric, isNumericId, isObject, isOdd, isOutside, isOutsideInt4, isOver18, isPWA, isPastDate, isPositiveInt, isPromise, isReactElement, isRegExp, isSame, isSequence, isServer, isSpacedString, isStrictlyBetween, isString, isStringDate, isURL, isUUID, isValue, keysLength, last, lastIndex, mapByKey, max, merge, mergeArrays, min, moveToFirst, moveToLast, multiply, noop, normaliseArray, normaliseNumber, normalizeNumber, objectDiff, omit, parseDate, percentageChange, pickObjectKeys, pickObjectValues, pluck, prismaDateRange, promiseWithTimeout, randomAddress, randomAlphaNumericCode, randomArray, randomArrayItem, randomBankAccount, randomBigInt, randomBool, randomChar, randomCompany, randomCoords, randomDate, randomDateRange, randomEmail, randomEmoji, randomEmptyValue, randomEnumKey, randomEnumValue, randomFile, randomFirstName, randomFloat, randomFormattedPercentage, randomFullName, randomFutureDate, randomHandle, randomHexColor, randomHexValue, randomHtmlColorName, randomIBAN, randomIP, randomInt, randomLastName, randomLat, randomLng, randomMaxDate, randomMaxInt, randomMaxSafeInt, randomName, randomNegativeInt, randomNoun, randomNumericCode, randomObject, randomParagraph, randomPassword, randomPastDate, randomPath, randomPhoneNumber, randomPositiveInt, randomString, randomSymbol, randomUUID, randomValue, randomVerb, randomWord, removeUndefinedValues, scrambleText, serialize, seriesAsync, setObjectPath, setUrlSearchParams, shuffle, sleep, startOfDay, startOfNextMonth, startOfNextWeek, startOfThisWeek, startOfToday, startOfTomorrow, startOfUTCDay, startOfUTCTomorrow, stringToCSSUnicode, stringToUnicode, stringify, sum, toggleArrayValue, truncate, uniqueValues };
|
|
896
|
+
export { type BoolMap, type Coords, type DateLike, type DateRange, type DateSeries, type Datey, type Defined, type Dimensions, type HashMap, type ISODate, type ISODay, type ISOMonth, type ISOYear, JS_MAX_DIGITS, type Key, type Matrix, type Maybe, type MaybePromise, type MaybePromiseOrValue, type MaybePromiseOrValueArray, type NonUndefined, type NumberMap, type ObjectEntries, type ObjectEntry, type ObjectKey, type ObjectKeys, type ObjectValue, type ObjectValues, type PickDefined, type PickRequired, type PlainKey, type PlainObject, type Point, type PrismaSelect, type Serialized, type StringMap, type Timezone, type TrueMap, type VoidFn, array, arrayDiff, arrayIntersection, average, bucketSortedDates, capitalize, chunkArray, chunkedAll, chunkedAsync, chunkedDynamic, clamp, cleanSpaces, cyclicalItem, dir, enumKeys, enumValues, filterAlphanumeric, first, firstKey, firstValue, formatCamelCase, formatCookies, formatIndexProgress, formatNumber, formatPercentage, formatTrpcInputQueryString, getCookieByName, getDateRangeSeries, getDateSeriesRange, getKeys, getUrlSearchParam, getUrlSearchParams, groupByDateBucket, groupByKey, incrementalId, isArray, isArrayIncluded, isBetween, isBetweenDates, isBigInt, isBigIntString, isBoolean, isBrowser, isBuffer, isClient, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEven, isFile, isFunction, isFutureDate, isInt, isJsDate, isKey, isLastIndex, isNegativeInt, isNotEmptyString, isNumber, isNumeric, isNumericId, isObject, isOdd, isOutside, isOutsideInt4, isOver18, isPWA, isPastDate, isPositiveInt, isPromise, isReactElement, isRegExp, isSame, isSequence, isServer, isSpacedString, isStrictlyBetween, isString, isStringDate, isURL, isUUID, isValue, keysLength, last, lastIndex, mapByKey, max, merge, mergeArrays, min, moveToFirst, moveToLast, multiply, noop, normaliseArray, normaliseNumber, normalizeNumber, objectDiff, omit, parseDate, percentageChange, pickObjectKeys, pickObjectValues, pluck, prismaDateRange, promiseWithTimeout, randomAddress, randomAlphaNumericCode, randomArray, randomArrayItem, randomBankAccount, randomBigInt, randomBool, randomChar, randomCompany, randomCoords, randomDate, randomDateRange, randomEmail, randomEmoji, randomEmptyValue, randomEnumKey, randomEnumValue, randomFile, randomFirstName, randomFloat, randomFormattedPercentage, randomFullName, randomFutureDate, randomHandle, randomHexColor, randomHexValue, randomHtmlColorName, randomIBAN, randomIP, randomInt, randomLastName, randomLat, randomLng, randomMaxDate, randomMaxInt, randomMaxSafeInt, randomName, randomNegativeInt, randomNoun, randomNumericCode, randomObject, randomParagraph, randomPassword, randomPastDate, randomPath, randomPhoneNumber, randomPositiveInt, randomString, randomSymbol, randomUUID, randomValue, randomVerb, randomWord, removeUndefinedValues, scrambleText, serialize, seriesAsync, setObjectPath, setUrlSearchParams, shuffle, sleep, startOfDay, startOfNextMonth, startOfNextWeek, startOfThisWeek, startOfToday, startOfTomorrow, startOfUTCDay, startOfUTCTomorrow, stringToCSSUnicode, stringToUnicode, stringify, sum, toggleArrayValue, truncate, uniqueValues };
|
package/dist/index.d.ts
CHANGED
|
@@ -142,6 +142,7 @@ type Serialized<T> = T extends Date ? string : T extends Array<infer R> ? Array<
|
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Buckets dates into groups based on a date series
|
|
145
|
+
* @deprecated Use `groupByDateBucket` instead. This function will be removed in the next major version.
|
|
145
146
|
* @param dateSeries Array of dates that define the buckets, must be sorted in ascending order
|
|
146
147
|
* @param dates Array of dates to be bucketed, must be sorted in ascending order
|
|
147
148
|
* @param unit The time unit to use for bucketing ('day', 'hour', 'minute', 'second')
|
|
@@ -164,6 +165,23 @@ declare const getDateRangeSeries: (dateRange: DateRange, unit: "day" | "hour" |
|
|
|
164
165
|
*/
|
|
165
166
|
declare const getDateSeriesRange: (dateSeries: DateSeries) => DateRange;
|
|
166
167
|
|
|
168
|
+
type PropertyAccessor<T> = keyof T | ((item: T) => any);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Groups items into date buckets based on their dates and specified time intervals
|
|
172
|
+
* @param dateBuckets Array of ISO date strings that define the bucket boundaries, must be sorted in ascending order
|
|
173
|
+
* @param items Array of items to be grouped into buckets, should be sorted in ascending order by the date property for optimal performance
|
|
174
|
+
* @param unit The time unit to use for bucket intervals ('day', 'hour', 'minute', 'second')
|
|
175
|
+
* @param accessor Optional property accessor for extracting dates from items. If not provided, assumes items are ISO date strings
|
|
176
|
+
* @returns Record where keys are ISO date strings from dateBuckets and values are arrays of items that fall within each bucket's time range
|
|
177
|
+
*/
|
|
178
|
+
declare function groupByDateBucket<T>({ dateBuckets, items, unit, accessor, }: {
|
|
179
|
+
dateBuckets: ISODate[];
|
|
180
|
+
items: T[];
|
|
181
|
+
unit: "day" | "hour" | "minute" | "second";
|
|
182
|
+
accessor?: PropertyAccessor<T>;
|
|
183
|
+
}): Record<ISODate, T[]>;
|
|
184
|
+
|
|
167
185
|
declare const isOver18: (birthDate: DateLike) => boolean;
|
|
168
186
|
|
|
169
187
|
/**
|
|
@@ -764,6 +782,19 @@ declare const isArray: <T>(arg?: any) => arg is T[];
|
|
|
764
782
|
|
|
765
783
|
declare const isArrayIncluded: <T>(arr1: T[], arr2: T[]) => boolean;
|
|
766
784
|
|
|
785
|
+
/**
|
|
786
|
+
* Checks if a date falls between two other dates (left inclusive)
|
|
787
|
+
* @param date The date to check
|
|
788
|
+
* @param dateRange The date range to check against
|
|
789
|
+
* @returns true if the date is between the start and end dates (includes startDate, excludes endDate)
|
|
790
|
+
*
|
|
791
|
+
* @example
|
|
792
|
+
* isBetweenDates("2023-06-15", { startDate: "2023-01-01", endDate: "2023-12-31" }) // true
|
|
793
|
+
* isBetweenDates("2023-01-01", { startDate: "2023-01-01", endDate: "2023-12-31" }) // true (includes start)
|
|
794
|
+
* isBetweenDates("2023-12-31", { startDate: "2023-01-01", endDate: "2023-12-31" }) // false (excludes end)
|
|
795
|
+
*/
|
|
796
|
+
declare const isBetweenDates: (date: DateLike, dateRange: DateRange) => boolean;
|
|
797
|
+
|
|
767
798
|
declare const isBoolean: (arg: any) => arg is boolean;
|
|
768
799
|
|
|
769
800
|
declare const isBrowser: () => boolean;
|
|
@@ -786,7 +817,9 @@ declare const isFile: (arg?: any) => arg is File;
|
|
|
786
817
|
*/
|
|
787
818
|
declare const isFunction: (arg: any) => arg is Function;
|
|
788
819
|
|
|
789
|
-
declare const isFutureDate: (arg: DateLike
|
|
820
|
+
declare const isFutureDate: (arg: DateLike, { referenceDate }?: {
|
|
821
|
+
referenceDate?: DateLike;
|
|
822
|
+
}) => boolean;
|
|
790
823
|
|
|
791
824
|
declare const isJsDate: (arg: Date) => arg is Date;
|
|
792
825
|
|
|
@@ -822,7 +855,9 @@ declare const isNumericId: (id: string) => boolean;
|
|
|
822
855
|
|
|
823
856
|
declare const isObject: <T>(arg?: any) => arg is PlainObject<T>;
|
|
824
857
|
|
|
825
|
-
declare const isPastDate: (arg: DateLike
|
|
858
|
+
declare const isPastDate: (arg: DateLike, { referenceDate }?: {
|
|
859
|
+
referenceDate?: DateLike;
|
|
860
|
+
}) => boolean;
|
|
826
861
|
|
|
827
862
|
declare const isPromise: (arg: any) => arg is Promise<any>;
|
|
828
863
|
|
|
@@ -858,4 +893,4 @@ declare const isUUID: (arg: string) => boolean;
|
|
|
858
893
|
|
|
859
894
|
declare const isValue: <T>(arg?: Maybe<T>) => arg is T;
|
|
860
895
|
|
|
861
|
-
export { type BoolMap, type Coords, type DateLike, type DateRange, type DateSeries, type Datey, type Defined, type Dimensions, type HashMap, type ISODate, type ISODay, type ISOMonth, type ISOYear, JS_MAX_DIGITS, type Key, type Matrix, type Maybe, type MaybePromise, type MaybePromiseOrValue, type MaybePromiseOrValueArray, type NonUndefined, type NumberMap, type ObjectEntries, type ObjectEntry, type ObjectKey, type ObjectKeys, type ObjectValue, type ObjectValues, type PickDefined, type PickRequired, type PlainKey, type PlainObject, type Point, type PrismaSelect, type Serialized, type StringMap, type Timezone, type TrueMap, type VoidFn, array, arrayDiff, arrayIntersection, average, bucketSortedDates, capitalize, chunkArray, chunkedAll, chunkedAsync, chunkedDynamic, clamp, cleanSpaces, cyclicalItem, dir, enumKeys, enumValues, filterAlphanumeric, first, firstKey, firstValue, formatCamelCase, formatCookies, formatIndexProgress, formatNumber, formatPercentage, formatTrpcInputQueryString, getCookieByName, getDateRangeSeries, getDateSeriesRange, getKeys, getUrlSearchParam, getUrlSearchParams, groupByKey, incrementalId, isArray, isArrayIncluded, isBetween, isBigInt, isBigIntString, isBoolean, isBrowser, isBuffer, isClient, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEven, isFile, isFunction, isFutureDate, isInt, isJsDate, isKey, isLastIndex, isNegativeInt, isNotEmptyString, isNumber, isNumeric, isNumericId, isObject, isOdd, isOutside, isOutsideInt4, isOver18, isPWA, isPastDate, isPositiveInt, isPromise, isReactElement, isRegExp, isSame, isSequence, isServer, isSpacedString, isStrictlyBetween, isString, isStringDate, isURL, isUUID, isValue, keysLength, last, lastIndex, mapByKey, max, merge, mergeArrays, min, moveToFirst, moveToLast, multiply, noop, normaliseArray, normaliseNumber, normalizeNumber, objectDiff, omit, parseDate, percentageChange, pickObjectKeys, pickObjectValues, pluck, prismaDateRange, promiseWithTimeout, randomAddress, randomAlphaNumericCode, randomArray, randomArrayItem, randomBankAccount, randomBigInt, randomBool, randomChar, randomCompany, randomCoords, randomDate, randomDateRange, randomEmail, randomEmoji, randomEmptyValue, randomEnumKey, randomEnumValue, randomFile, randomFirstName, randomFloat, randomFormattedPercentage, randomFullName, randomFutureDate, randomHandle, randomHexColor, randomHexValue, randomHtmlColorName, randomIBAN, randomIP, randomInt, randomLastName, randomLat, randomLng, randomMaxDate, randomMaxInt, randomMaxSafeInt, randomName, randomNegativeInt, randomNoun, randomNumericCode, randomObject, randomParagraph, randomPassword, randomPastDate, randomPath, randomPhoneNumber, randomPositiveInt, randomString, randomSymbol, randomUUID, randomValue, randomVerb, randomWord, removeUndefinedValues, scrambleText, serialize, seriesAsync, setObjectPath, setUrlSearchParams, shuffle, sleep, startOfDay, startOfNextMonth, startOfNextWeek, startOfThisWeek, startOfToday, startOfTomorrow, startOfUTCDay, startOfUTCTomorrow, stringToCSSUnicode, stringToUnicode, stringify, sum, toggleArrayValue, truncate, uniqueValues };
|
|
896
|
+
export { type BoolMap, type Coords, type DateLike, type DateRange, type DateSeries, type Datey, type Defined, type Dimensions, type HashMap, type ISODate, type ISODay, type ISOMonth, type ISOYear, JS_MAX_DIGITS, type Key, type Matrix, type Maybe, type MaybePromise, type MaybePromiseOrValue, type MaybePromiseOrValueArray, type NonUndefined, type NumberMap, type ObjectEntries, type ObjectEntry, type ObjectKey, type ObjectKeys, type ObjectValue, type ObjectValues, type PickDefined, type PickRequired, type PlainKey, type PlainObject, type Point, type PrismaSelect, type Serialized, type StringMap, type Timezone, type TrueMap, type VoidFn, array, arrayDiff, arrayIntersection, average, bucketSortedDates, capitalize, chunkArray, chunkedAll, chunkedAsync, chunkedDynamic, clamp, cleanSpaces, cyclicalItem, dir, enumKeys, enumValues, filterAlphanumeric, first, firstKey, firstValue, formatCamelCase, formatCookies, formatIndexProgress, formatNumber, formatPercentage, formatTrpcInputQueryString, getCookieByName, getDateRangeSeries, getDateSeriesRange, getKeys, getUrlSearchParam, getUrlSearchParams, groupByDateBucket, groupByKey, incrementalId, isArray, isArrayIncluded, isBetween, isBetweenDates, isBigInt, isBigIntString, isBoolean, isBrowser, isBuffer, isClient, isEmail, isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEven, isFile, isFunction, isFutureDate, isInt, isJsDate, isKey, isLastIndex, isNegativeInt, isNotEmptyString, isNumber, isNumeric, isNumericId, isObject, isOdd, isOutside, isOutsideInt4, isOver18, isPWA, isPastDate, isPositiveInt, isPromise, isReactElement, isRegExp, isSame, isSequence, isServer, isSpacedString, isStrictlyBetween, isString, isStringDate, isURL, isUUID, isValue, keysLength, last, lastIndex, mapByKey, max, merge, mergeArrays, min, moveToFirst, moveToLast, multiply, noop, normaliseArray, normaliseNumber, normalizeNumber, objectDiff, omit, parseDate, percentageChange, pickObjectKeys, pickObjectValues, pluck, prismaDateRange, promiseWithTimeout, randomAddress, randomAlphaNumericCode, randomArray, randomArrayItem, randomBankAccount, randomBigInt, randomBool, randomChar, randomCompany, randomCoords, randomDate, randomDateRange, randomEmail, randomEmoji, randomEmptyValue, randomEnumKey, randomEnumValue, randomFile, randomFirstName, randomFloat, randomFormattedPercentage, randomFullName, randomFutureDate, randomHandle, randomHexColor, randomHexValue, randomHtmlColorName, randomIBAN, randomIP, randomInt, randomLastName, randomLat, randomLng, randomMaxDate, randomMaxInt, randomMaxSafeInt, randomName, randomNegativeInt, randomNoun, randomNumericCode, randomObject, randomParagraph, randomPassword, randomPastDate, randomPath, randomPhoneNumber, randomPositiveInt, randomString, randomSymbol, randomUUID, randomValue, randomVerb, randomWord, removeUndefinedValues, scrambleText, serialize, seriesAsync, setObjectPath, setUrlSearchParams, shuffle, sleep, startOfDay, startOfNextMonth, startOfNextWeek, startOfThisWeek, startOfToday, startOfTomorrow, startOfUTCDay, startOfUTCTomorrow, stringToCSSUnicode, stringToUnicode, stringify, sum, toggleArrayValue, truncate, uniqueValues };
|
package/dist/index.global.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(exports){'use strict';var g=t=>Array.isArray(t);var f=t=>Object.prototype.toString.call(t)==="[object Object]";var b=t=>typeof t=="string";var Y=t=>!!(t===void 0||t===null||Vt(t)||zt(t)||Kt(t)),Vt=t=>b(t)&&t.trim().length===0,Kt=t=>g(t)&&t.length===0,zt=t=>f(t)&&Object.keys(t).length===0;var w=t=>Object.prototype.toString.call(t)==="[object Date]"&&!isNaN(t);var Ht=/^\d{4}(-\d{2})?(-\d{2})?$/,l=(t,e)=>{if(Y(t))return;b(t)&&Ht.test(t)&&(t=`${t+"-01-01".slice(t.length-4)}T00:00:00`,e?.asUTC&&(t+="Z"));let r=new Date(t);if(w(r))return r};var Re=(t,e,r)=>{let o=(u=>{switch(u){case "day":return 864e5;case "hour":return 36e5;case "minute":return 6e4;case "second":return 1e3}})(r),i=t.map(u=>{let p=new Date(u);return {timestamp:p.getTime(),normalizedKey:p.toISOString()}}),m={};i.forEach(({normalizedKey:u})=>{m[u]=[];});let s=0;return e.forEach(u=>{let p=l(u);if(!p)return;let x=p.getTime(),A=p.toISOString();for(;s<i.length;){let E=i[s].timestamp,z=s<i.length-1?i[s+1].timestamp:E+o;if(x>=E&&x<z){m[i[s].normalizedKey].push(A);break}if(x<E)break;s++;}}),m};var _e=(t,e)=>{let{startDate:r,endDate:n}=t,o=l(r),i=l(n);if(!o||!i||o.getTime()>i.getTime())throw new Error("Invalid date range");let m=[],s=new Date(o.getTime());for(;s<i;)switch(m.push(s.toISOString()),e){case "calendarMonth":if(o.getUTCDate()>28)throw new Error("Cannot add months when the start day of month is greater than 28, it may lead to unexpected results");let u=s.getUTCMonth();s.setUTCMonth(u+1);break;case "day":s.setUTCDate(s.getUTCDate()+1);break;case "hour":s.setUTCHours(s.getUTCHours()+1);break;case "minute":s.setUTCMinutes(s.getUTCMinutes()+1);break;case "second":s.setUTCSeconds(s.getUTCSeconds()+1);break;default:throw new Error(`Unsupported unit: ${e}`)}return m};var Le=t=>{if(!t||t.length===0)throw new Error("Cannot find date range for empty array");let e=t.map(s=>l(s)).filter(s=>s!==void 0);if(e.length===0)throw new Error("No valid dates found in array");let r=e.map(s=>s.getTime()),n=Math.min(...r),o=Math.max(...r),i=new Date(n),m=new Date(o);return {startDate:i,endDate:m}};var d=(t,e=()=>{})=>Array.from({length:t},e);var Ke=(t,e)=>{let r=new Set(t),n=new Set(e),o=[...r].filter(m=>!n.has(m)),i=[...n].filter(m=>!r.has(m));return [...o,...i]};var He=(t,e)=>{if(t.length===0||e.length===0)return [];let r=new Set(t),n=new Set(e),[o,i]=r.size<n.size?[r,n]:[n,r];return [...o].filter(m=>i.has(m))};var q=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();var R=(t,e)=>{let r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r};var Xe=async(t,e,r)=>{let n=R(t,e);return await Promise.all(n.map(r))};var O=t=>new Promise(e=>{setTimeout(e,t);});var Qe=async(t,e,r,{minChunkTimeMs:n}={})=>{let o=[],i=R(t,e);for(let[m,s]of i.entries()){let u=performance.now(),p=await r(s,m,i);if(o.push(p),n){let x=performance.now()-u;x<n&&await O(n-x);}}return o};var N=({number:t,min:e,max:r})=>(r<e&&process.env.DEVERYTHING_WARNINGS&&console.warn("clamp: max < min",{number:t,min:e,max:r}),t<e?e:t>r?r:t);var or=async(t,e,r,{idealChunkDuration:n,maxChunkSize:o,minChunkDuration:i,minChunkSize:m,sleepTimeMs:s}={})=>{let u=[],p=0,x=0,A=e;for(;p<t.length;){let E=performance.now(),z=t.slice(p,p+A);p+=A;let Ft=await r(z,x);if(x+=1,u.push(Ft),s&&await O(s),n){let P=performance.now()-E;A=N({number:Math.round(A*(n/P)),min:m||1,max:o||200});}if(i){let P=performance.now()-E;P<i&&await O(i-P);}}return u};var Z=new RegExp(/\p{C}/,"gu");var Q=/\p{Zs}/gu;var tt=/\p{Zl}/gu;var et=/\p{Zp}/gu;var fr=t=>t.replace(Z," ").replace(Q," ").replace(tt," ").replace(et," ").trim().replace(/\s{2,}/g," ");var br=(t,e)=>t[e%t.length];var gr=(t,{maxDepth:e=5}={})=>{console.dir(t,{depth:e});};var rt=(t,e,r)=>t<e||t>r;var k=t=>Number.isInteger(t),Nr=t=>k(t)&&!(t%2),Dr=t=>k(t)&&!!(t%2),nt=t=>k(t)&&t>0,Cr=t=>k(t)&&t<0,j=t=>Object.prototype.toString.apply(t)==="[object Number]"&&isFinite(t),Or=t=>Object.prototype.toString.apply(t)==="[object BigInt]",Ir=t=>{try{return BigInt(t)>Number.MAX_SAFE_INTEGER}catch{return false}},Mr=t=>rt(t,-2147483647,2147483647);var ot=t=>j(t)?true:b(t)?/^[+-]?((\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?|0[xX][\dA-Fa-f]+|0[bB][01]+)$/.test(t):false;var at=t=>Object.keys(t).filter(e=>!ot(e));var _=(t,e)=>e.hasOwnProperty(t)&&e.propertyIsEnumerable(t);var it=t=>{let e=[];return Object.values(t).forEach(r=>{_(r,t)&&!e.includes(r)&&e.push(t[r]);}),e};var Fr=t=>t.replace(/[^a-zA-Z0-9]/g,"");var Kr=t=>t[0];var Hr=t=>Object.keys(t)[0];var vr=t=>Object.values(t)[0];var Jr=t=>{if(typeof document>"u")return;let e=document.cookie.split(";");for(let r of e){let[n,o]=r.trim().split("=");if(n===t)return decodeURIComponent(o)}};var $r=Object.keys;var st=t=>{if(!t)return {};try{let e=t.startsWith("/"),r=new URL(t,e?"https://deverything.dev/":void 0);return Object.fromEntries(r.searchParams)}catch{return {}}};var Qr=(t,e)=>st(t)[e];var y=t=>t!=null&&!Number.isNaN(t);var nn=(t,e)=>t.reduce((r,n)=>{let o=n[e];return y(o)&&(r[o]||(r[o]=[]),r[o].push(n)),r},{});var Wt=1,B=()=>Wt++;var sn=t=>Object.keys(t).length;var D=t=>t.length-1;var mt=t=>t[D(t)];var ln=(t,e)=>t.every(r=>e.includes(r));var fn=t=>Object.prototype.toString.call(t)==="[object Boolean]";var ct=()=>typeof window>"u";var U=()=>!ct();var Tn=U;var S=t=>{let e=Object.prototype.toString.call(t);return e==="[object Function]"||e==="[object AsyncFunction]"};var Dn=t=>y(t)&&y(t.constructor)&&S(t.constructor.isBuffer)&&t.constructor.isBuffer(t);var In=t=>b(t)&&/\S+@\S+\.\S+/.test(t);var Pn=t=>Object.prototype.toString.call(t)==="[object File]";var H=t=>{let e=l(t);return !!e&&e>new Date};var _n=(t,e)=>t===D(e);var Ln=t=>b(t)&&t.trim().length>0;var Vn=t=>/^\d+$/.test(t)&&parseInt(t)>0;var W=t=>{let e=l(t);return !!e&&e<new Date};var Wn=t=>t instanceof Promise;var Jn=()=>U()&&window.matchMedia("(display-mode: standalone)").matches;var vt=typeof Symbol=="function"&&Symbol.for,Gt=vt?Symbol.for("react.element"):60103,$n=t=>t.$$typeof===Gt;var qn=t=>Object.prototype.toString.call(t)==="[object RegExp]";var L=(t,e)=>{if(t===e)return true;if(g(t)&&g(e))return t.length!==e.length?false:t.every((r,n)=>L(r,e[n]));if(f(t)&&f(e)){let r=Object.keys(t);return r.length!==Object.keys(e).length?false:r.every(n=>L(t[n],e[n]))}return S(t)&&S(e)?t.toString()===e.toString():false};var no=t=>t.length<2?true:t[0]!==1?false:t.slice(1).every((e,r)=>e===t[r-1]+1);var ao=t=>t.indexOf(" ")>=0;var mo=t=>{let e=new Date(t);return w(e)};var Jt=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),uo=t=>!!t&&Jt.test(t);var lo=t=>/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t);var bo=(t,e)=>t.reduce((r,n)=>(y(n[e])&&(r[n[e]]=n),r),{});var v=(t,e)=>{let r={};return Object.keys(t).forEach(n=>{r[n]=f(t[n])?v({},t[n]):t[n];}),Object.keys(e).forEach(n=>{_(n,t)?r[n]=f(t[n])&&f(e[n])?v(t[n],e[n]):e[n]:r[n]=f(e[n])?v({},e[n]):e[n];}),r};var To=(t,e)=>t.concat(e.filter(r=>!t.includes(r)));var Ao=(t,e)=>{let r=[...t];for(let n=0;n<r.length;n++)if(e(r[n],n,r)){let o=r.splice(n,1);r.unshift(o[0]);break}return r};var No=(t,e)=>{let r=[...t];for(let n=0;n<r.length;n++)if(e(r[n],n,r)){let o=r.splice(n,1)[0];r.push(o);break}return r};var Co=({value:t,max:e,min:r})=>t>=e?1:t<=r?0:(t-r)/(e-r);var Mo=(t,e)=>{var r={};let n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n)L(e[o],t[o])||(r[o]={from:t[o],to:e[o]});return r};var wo=(t,e)=>{let r={};for(let n in t)e.includes(n)||(r[n]=t[n]);return r};var ko=(t,e)=>{let r={};for(let n in t)e.includes(n)&&(r[n]=t[n]);return r};var _o=(t,e)=>{let r={};for(let n in t)e.includes(t[n])&&(r[n]=t[n]);return r};var Lo=(t,e)=>t.reduce((r,n)=>(y(n[e])&&r.push(n[e]),r),[]);var Vo=(t,e,r)=>{let n,o=new Promise((i,m)=>{n=setTimeout(()=>m(r??new Error("Promise timed out")),e);});return Promise.race([t(),o]).finally(()=>{clearTimeout(n);})};var zo=t=>Object.fromEntries(Object.entries(t).filter(([e,r])=>r!==void 0));var c=({min:t=-100,max:e=100}={})=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1)+t)),ut=()=>BigInt(c()),Wo=({min:t=1,max:e}={})=>c({min:t,max:e}),vo=({min:t,max:e=-1}={})=>c({min:t,max:e}),Go=()=>c({min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),Jo=()=>c({min:-Number.MAX_VALUE,max:Number.MAX_VALUE}),Xo=()=>c()+"%";var F=()=>String.fromCharCode(c({min:97,max:122}));var pt=new RegExp(/\p{L}/,"gu");var ea=t=>t.replace(pt,()=>F());var na=t=>{let e=new Set;return JSON.stringify(t,(r,n)=>(e.add(r),n)),JSON.stringify(t,Array.from(e).sort())};var ia=async t=>{let e=[];for(let r of t)if(S(r))e.push(await r());else throw new Error(`seriesAsync: invalid type received "${typeof r}", make sure all items are functions, not promises, otherwise they would've been executed already`);return e};var ca=(t,e,r)=>{let n=e.split("."),o=(i,m,s)=>{let u=m[0];if(m.length===1){i[u]=s;return}(!i[u]||!f(i[u]))&&(i[u]={}),o(i[u],m.slice(1),s);};o(t,n,r);};var la=(t,e={})=>{let r=t.startsWith("/"),n=new URL(t,r?"https://deverything.dev/":void 0);return Object.entries(e).forEach(([o,i])=>{i!=null&&(f(i)?n.searchParams.set(o,JSON.stringify(i)):n.searchParams.set(o,i.toString()));}),r?n.pathname+n.search+n.hash:n.toString()};var fa=t=>{let e=[...t];for(let r=e.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[e[r],e[n]]=[e[n],e[r]];}return e};var lt=()=>{let t=[],e=[],r=function(n,o){return t[0]===o?"[Circular ~]":"[Circular ~."+e.slice(0,t.indexOf(o)).join(".")+"]"};return function(n,o){if(t.length>0){let i=t.indexOf(this);~i?t.splice(i+1):t.push(this),~i?e.splice(i,1/0,n):e.push(n),~t.indexOf(o)&&(o=r.call(this,n,o));}else t.push(o);return o}};var ga=t=>JSON.stringify(t,lt(),2);var ha=(t,e)=>{if(!g(t))return t;let r=t.reduce((n,o)=>(o!==e&&n.push(o),n),[]);return r.length===t.length&&r.push(e),r};var Na=(t,e,{ellipsis:r,position:n}={})=>{if(r||(r="..."),n||(n="end"),!nt(e))return t;let o=[...t],i=r.length;if(o.length<=e)return t;switch(n){case "start":let m=e-i;return r+o.slice(-m).join("");case "middle":{let s=Math.ceil((e-i)/2),u=o.length-Math.floor((e-i)/2);return o.slice(0,s).join("")+r+o.slice(u).join("")}case "end":default:return o.slice(0,e-i).join("")+r}};var Ca=t=>[...new Set(t)];var Ma=t=>{let e=new Date,r=l(t);if(!r)return false;let n=e.getFullYear()-r.getFullYear();if(n>18)return true;if(n<18)return false;if(n===18){if(e.getMonth()>r.getMonth())return true;if(e.getMonth()<r.getMonth())return false;if(e.getMonth()===r.getMonth()){if(e.getDate()>=r.getDate())return true;if(e.getDate()<r.getDate())return false}}return false};var dt=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate());var Ra=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,1)};var ja=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+7-t.getDay())};var Ba=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay())};var Fa=()=>dt(new Date);var Ka=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1)};var Ha=t=>new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));var va=()=>{let t=new Date;return t.setUTCDate(t.getUTCDate()+1),new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))};var Ja=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o});var $a=t=>Object.entries(t).reduce((e,[r,n])=>(n!==void 0&&e.push(`${r}=${n}`),e),[]).join("; ")+";";var Za=(t,e)=>`[${N({number:t+1,min:1,max:e})}/${e}]`;var ei=(t,{compact:e,maxDigits:r,percentage:n}={})=>n?`${((j(t)?t:0)*100).toFixed(r||0)}%`:Intl.NumberFormat("en",{notation:e?"compact":"standard",maximumSignificantDigits:r}).format(t);var oi=(t,{digits:e}={})=>`${N({number:t*100,min:0,max:100}).toFixed(e||0)}%`;var ii=t=>Array.from(t).map(e=>{let r=e.codePointAt(0);return r!==void 0?`\\${r.toString(16)}`:""}).join("");var mi=t=>Array.from(t).map(e=>{let r=e.codePointAt(0);return r!==void 0?`\\u{${r.toString(16)}}`:""}).join("");var ui=t=>t.reduce((r,n)=>r+n,0)/t.length;var li=(t,e,r)=>t>=e&&t<=r;var fi=(t,e,r)=>t>e&&t<r;var ft=t=>t.length?Math.max(...t):0;var yt=t=>Math.min(...t);var gi=t=>t.reduce((e,r)=>e*r,1);var bt=(t,e,r)=>(t-e)/(r-e);var Ni=t=>{let e=yt(t),r=ft(t);return t.map(n=>bt(n,e,r))};var Ci=(t,e)=>{if(t<0||e<0||e===0&&t===0)return 0;if(e===0&&t!==0)return -1;if(e!==0&&t===0)return 1;let r=(e-t)/t;return parseFloat(r.toFixed(4))};var xt=t=>t.reduce((e,r)=>e+r,0);var Pi=({startDate:t,endDate:e})=>{let r=l(t),n=l(e);if(!r||!n)throw new Error("prismaDateRange: Invalid date range");return {gte:r,lt:n}};var Xt=[{city:"London",country:"United Kingdom",countryCode:"GB",line2:"Marylebone",number:"221B",street:"Baker Street",zip:"NW1 6XE"},{city:"Birmingham",country:"United Kingdom",countryCode:"GB",number:"B1 1AA",street:"Bordesley Street",zip:"B1 1AA"}],$t=[{city:"New York",country:"United States",countryCode:"US",state:"NY",street:"Broadway",line2:"Manhattan",number:"42",zip:"10036"},{city:"Los Angeles",country:"United States",countryCode:"US",state:"CA",street:"Hollywood Boulevard",number:"6801",zip:"90028"}],Yt=[{city:"Paris",country:"France",countryCode:"FR",street:"Rue de Rivoli",number:"75001",zip:"75001"},{city:"Berlin",country:"Germany",countryCode:"DE",street:"Unter den Linden",line2:"Mitte",number:"10117",zip:"10117"},{city:"Rome",country:"Italy",countryCode:"IT",street:"Via del Corso",number:"00186",zip:"00186"},{city:"Madrid",country:"Spain",countryCode:"ES",street:"Gran V\xEDa",line2:"Sol",number:"28013",zip:"28013"}],qt=[{city:"Moscow",country:"Russia",countryCode:"RU",street:"Tverskaya",number:"101000",zip:"101000"},{city:"Tokyo",country:"Japan",countryCode:"JP",street:"Shinjuku",line2:"Shinjuku City",number:"160-0022",zip:"160-0022"},{city:"Beijing",country:"China",countryCode:"CN",street:"Changan",number:"100005",zip:"100005"},{city:"Cairo",country:"Egypt",countryCode:"EG",street:"Al-Muizz",number:"11511",zip:"11511"},{city:"Buenos Aires",country:"Argentina",countryCode:"AR",street:"Avenida de Mayo",number:"1002",zip:"C1006AAQ"},{city:"Cape Town",country:"South Africa",countryCode:"ZA",street:"Adderley",number:"7700",zip:"7700"},{city:"Sydney",country:"Australia",countryCode:"AU",street:"George",line2:"Haymarket",number:"2000",zip:"2000"},{city:"Rio de Janeiro",country:"Brazil",countryCode:"BR",street:"Av. Presidente Vargas",number:"20021-000",zip:"20021-000"},{city:"Mexico City",country:"Mexico",countryCode:"MX",street:"Paseo de la Reforma",number:"06500",zip:"06500"}],gt=[...Xt,...$t,...Yt,...qt];var a=(t,{weights:e}={})=>{if(e&&e.length===t.length){let r=xt(e),n=Math.random()*r;for(let o=0;o<e.length;o++)if(n-=e[o],n<=0)return t[o];return mt(t)}return t[c({min:0,max:D(t)})]};var Vi=()=>a(gt);var Zt="123456789ABCDEFGHIJKLMNPQRSTUVWXYZ".split(""),Wi=({length:t=6}={})=>{if(t<1)throw new Error("randomAlphaNumericCode: Length must be greater than 0.");return d(t,()=>a(Zt)).join("")};var St=()=>a([true,false]);var ee=(t=new Date)=>G(t,31536e7),re=(t=new Date)=>G(t,-31536e7),G=(t,e)=>new Date(t.getTime()+e),T=({startDate:t,endDate:e}={})=>{let r=l(t),n=l(e);r&&n&&r>n&&console.warn("randomDate: startDate must be before endDate");let o=r||re(n),i=n||ee(r);return new Date(c({min:o.getTime(),max:i.getTime()}))},Zi=({startDate:t,endDate:e})=>(t=t||new Date(-864e13),e=e||new Date(864e13),T({startDate:t,endDate:e})),Qi=({startDate:t,endDate:e}={})=>{t&&W(t)&&console.warn("randomFutureDate: startDate must be in the future"),e&&W(e)&&console.warn("randomFutureDate: endDate must be in the future");let r=l(t)||G(new Date,5*6e4);return T({startDate:r,endDate:e})},ts=({startDate:t,endDate:e}={})=>{t&&H(t)&&console.warn("randomPastDate: startDate must be in the past"),e&&H(e)&&console.warn("randomPastDate: endDate must be in the past");let r=l(e)||new Date;return T({startDate:t,endDate:r})},es=()=>{let t=T();return {endDate:T({startDate:t}),startDate:t}};var h=({length:t=10}={})=>d(t,()=>F()).join("");var Tt=()=>Symbol(h());var V=()=>a([St(),h(),c(),T(),ut(),Tt()]);var ht=()=>d(c({min:1,max:5}),V);var At=["AD1200012030200359100100","BA391290079401028494","BE68539007547034","BG80BNBG96611020345678","FI2112345600000785","FO6264600001631634","FR1420041010050500013M02606","GB29NWBK60161331926819","GE29NB0000000101904917"];var ne=[{accountHolderName:"John Peters",accountNumber:"12345678",bankAddress:"1 Churchill Place, Canary Wharf, London, E14 5HP, UK",bankName:"Barclays plc",bicSwift:"BARCGB22",iban:"GB51BARC20039534871253",sortCode:"12-34-56",accountHolderType:"individual"},{accountHolderName:"Jane Evans",accountNumber:"87654321",bankAddress:"8 Canada Square, London, E14 5HQ, UK",bankName:"HSBC Holdings plc",bicSwift:"HSBCGB2L",iban:"GB82BARC20031847813531",sortCode:"65-43-21",accountHolderType:"company"}],oe=[{accountHolderName:"Jack I. Taylor",accountNumber:"123456789012",accountType:"checking",bankAddress:"Bank of America Corporate Center, 100 North Tryon Street, Charlotte, NC 28255, USA",bankName:"Bank of America Corporation",routingNumber:"111000025",accountHolderType:"individual"},{accountHolderName:"Sally T King",accountNumber:"987654321098",accountType:"savings",bankAddress:"383 Madison Avenue, New York, NY 10179, USA",bankName:"JPMorgan Chase & Co.",routingNumber:"021000021",accountHolderType:"company"}],ae=[{accountHolderName:"William Kevin White",accountNumber:"123456789012",accountType:"savings",bankAddress:"Commonwealth Bank Centre, Tower 1, 201 Sussex Street, Sydney, NSW 2000, Australia",bankName:"Commonwealth Bank of Australia",bicSwift:"CTBAAU2S",bsbNumber:"062-000",accountHolderType:"individual"},{accountHolderName:"Jennifer Ann Brown",accountNumber:"987654321098",accountType:"checking",bankAddress:"Westpac Place, 275 Kent Street, Sydney, NSW 2000, Australia",bankName:"Westpac Banking Corporation",bicSwift:"WPACAU2S",bsbNumber:"032-001",accountHolderType:"company"}],ie=[{accountHolderName:"Charles Green",accountNumber:"123456789012",accountType:"savings",bankAddress:"Royal Bank Plaza, 200 Bay Street, North Tower, Toronto, ON M5J 2J5, Canada",bankName:"Royal Bank of Canada",branchTransitNumber:"45678",institutionNumber:"123",accountHolderType:"individual"},{accountHolderName:"Olivia Orange",accountNumber:"987654321098",accountType:"checking",bankAddress:"TD Canada Trust Tower, 161 Bay Street, Toronto, ON M5J 2S8, Canada",bankName:"Toronto-Dominion Bank",branchTransitNumber:"65432",institutionNumber:"987",accountHolderType:"company"}],Et=[...ne,...oe,...ae,...ie];var As=()=>a(Et);var Nt=["IE1234567T","GB123456789","XI123456789"],Dt=["Acme Inc.","Globex Ltd.","Aurora LLC","Serenity Systems","Vulcan Ventures","Umbrella Corp."];var Is=()=>({name:a(Dt),vatRegNumber:a(Nt)});var ws=16,J=(t=-9,e=9,r)=>{let n=Math.random()*(e-t)+t;return y(r)?parseFloat(n.toFixed(r)):n};var js=()=>({lat:se(),lng:me()}),se=()=>J(-90,90),me=()=>J(-180,180);var Ct=["gmail.com","yahoo.com","hotmail.com","aol.com","msn.com","comcast.net","live.com","att.net","mac.com","me.com","charter.net","shaw.ca","yahoo.ca","mail.com","qq.com","web.de","gmx.de","mail.ru"];var Ot=["Albatross","Dolphin","Elephant","Giraffe","Koala","Lion","Penguin","Squirrel","Tiger","Turtle","Whale","Zebra"],It=["Axe","Chisel","Drill","Hammer","Mallet","Pliers","Saw","Screwdriver","Wrench","Blowtorch","Crowbar","Ladder"],I=["Adrian","Albert","Alexander","Alice","Amanda","Amy","Benjamin","David","Emma","Esther","Olivia","Ruby","Sarah","Victoria"],M=["Anderson","Brown","Davis","Jackson","Johnson","Jones","Miller","Moore","Smith","Taylor","Thomas","White","Williams","Wilson"],ce=["\u0410\u0431\u0438\u0433\u0430\u0438\u043B","\u0410\u0433\u043D\u0435\u0441","\u0410\u0434\u0430\u043C","\u0410\u0434\u0440\u0438\u0430\u043D","\u0410\u043B\u0430\u043D","\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440","\u0410\u043B\u0438\u0441\u0430","\u0410\u043B\u044C\u0431\u0435\u0440\u0442","\u0410\u043C\u0430\u043D\u0434\u0430","\u0410\u043C\u0435\u043B\u0438\u044F","\u042D\u043C\u0438","\u042D\u043D\u0434\u0440\u044E"],ue=["\u0410\u043D\u0434\u0435\u0440\u0441\u043E\u043D","\u0411\u0440\u0430\u0443\u043D","\u0412\u0438\u043B\u0441\u043E\u043D","\u0414\u0436\u0435\u043A\u0441\u043E\u043D","\u0414\u0436\u043E\u043D\u0441","\u0414\u0436\u043E\u043D\u0441\u043E\u043D","\u0414\u044D\u0432\u0438\u0441","\u041C\u0438\u043B\u043B\u0435\u0440","\u041C\u0443\u0440","\u0421\u043C\u0438\u0442","\u0422\u0435\u0439\u043B\u043E\u0440","\u0422\u043E\u043C\u0430\u0441","\u0423\u0430\u0439\u0442","\u0423\u0438\u043B\u044C\u044F\u043C\u0441"],pe=["\u30A2\u30B0\u30CD\u30B9","\u30A2\u30C0\u30E0","\u30A2\u30C9\u30EA\u30A2\u30F3","\u30A2\u30D3\u30B2\u30A4\u30EB","\u30A2\u30DE\u30F3\u30C0","\u30A2\u30DF\u30FC","\u30A2\u30E1\u30EA\u30A2","\u30A2\u30E9\u30F3","\u30A2\u30EA\u30B9","\u30A2\u30EB\u30D0\u30FC\u30C8","\u30A2\u30EC\u30AF\u30B5\u30F3\u30C0\u30FC","\u30A2\u30F3\u30C9\u30EA\u30E5\u30FC"],le=["\u30A2\u30F3\u30C0\u30FC\u30BD\u30F3","\u30A6\u30A3\u30EA\u30A2\u30E0\u30BA","\u30A6\u30A3\u30EB\u30BD\u30F3","\u30B8\u30E3\u30AF\u30BD\u30F3","\u30B8\u30E7\u30FC\u30F3\u30BA","\u30B8\u30E7\u30F3\u30BD\u30F3","\u30B9\u30DF\u30B9","\u30BF\u30A4\u30E9\u30FC","\u30C7\u30A4\u30D3\u30B9","\u30C8\u30FC\u30DE\u30B9","\u30D6\u30E9\u30A6\u30F3","\u30DB\u30EF\u30A4\u30C8","\u30DF\u30E9\u30FC","\u30E2\u30A2"],de=["\u0622\u062F\u0631\u064A\u0627\u0646","\u0622\u062F\u0645","\u0622\u0644\u0627\u0646","\u0622\u0644\u0628\u0631\u062A","\u0622\u0644\u064A\u0633","\u0622\u0645\u0627\u0646\u062F\u0627","\u0622\u0645\u064A","\u0622\u0645\u064A\u0644\u064A\u0627","\u0623\u0628\u064A\u062C\u064A\u0644","\u0623\u063A\u0646\u064A\u0633","\u0623\u0644\u0643\u0633\u0646\u062F\u0631","\u0623\u0646\u062F\u0631\u0648"],fe=["\u0623\u0646\u062F\u0631\u0633\u0648\u0646","\u0628\u0631\u0627\u0648\u0646","\u062A\u0627\u064A\u0644\u0648\u0631","\u062A\u0648\u0645\u0627\u0633","\u062C\u0627\u0643\u0633\u0648\u0646","\u062C\u0648\u0646\u0632","\u062C\u0648\u0646\u0633\u0648\u0646","\u062F\u064A\u0641\u064A\u0633","\u0633\u0645\u064A\u062B","\u0645\u0648\u0631","\u0645\u064A\u0644\u0631","\u0648\u0627\u064A\u062A","\u0648\u064A\u0644\u0633\u0648\u0646","\u0648\u064A\u0644\u064A\u0627\u0645\u0632"],Mt=[...I,...ce,...pe,...de],Pt=[...M,...ue,...le,...fe];var wt=({suffix:t}={})=>(a(I)+"."+a(M)).toLowerCase()+B()+(t||"");var vs=({handle:t,handleSuffix:e}={})=>`${t||wt({suffix:e})}@${a(Ct)}`;var Rt=["\u{1F600}","\u{1F601}","\u{1F602}","\u{1F923}","\u{1F603}","\u{1F604}","\u{1F605}","\u{1F606}","\u{1F609}","\u{1F60A}","\u{1F60B}","\u{1F60E}","\u{1F60D}","\u{1F618}","\u{1F617}","\u{1F619}"],kt=["!","@","#","$","%","^","&","*"];var Ys=()=>a(Rt);var Qs=()=>a([void 0,null,NaN,1/0]);var nm=t=>{let e=at(t);return a(e)};var sm=t=>{let e=it(t);return a(e)};var X=["act","add","agree","allow","be","catch","create","delete","discover","eat","explore","go","help","imagine","jump","merge","need","offer","play","read","run","search","skip","solve","speak","think","try","work","write"],$=["city","coffee","courage","fact","family","flower","food","friend","fun","hope","justice","key","life","love","music","smile","time"],ye=["absolute","compassionate","cozy","dull","enigmatic","fascinating","interesting","playful","predictable","remarkable","soothing","sunny","unforgettable","wonderful"],be=["accidentally","accommodatingly","boldly","briskly","carefully","efficiently","freely","gently","happily","lightly","loudly","quickly","quietly","suddenly","unexpectedly","wisely"],xe=["Pneumonoultramicroscopicsilicovolcanoconiosis","Floccinaucinihilipilification","Pseudopseudohypoparathyroidism","Hippopotomonstrosesquippedaliophobia","Antidisestablishmentarianism","Supercalifragilisticexpialidocious","Honorificabilitudinitatibus"];var jt=["AliceBlue","Aqua","Aquamarine","Azure","Beige","Bisque","Black","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","DarkSlateGray","DeepPink","Gold","Lime","Olive","Orchid","Salmon","Turquoise"],_t=[...X,...$,...ye,...be,...xe];var C=()=>a(_t),Bt=()=>a($),lm=()=>a(X);var Ut=({maxCharacters:t=200,minWords:e=8,maxWords:r=16}={})=>q(d(c({min:e,max:r}),()=>C()).join(" ").slice(0,t-1)+".");var ge=["png","jpg","jpeg","gif","svg","webp"],Am=({name:t,extension:e}={})=>{if(typeof File>"u")return;let r=e||a(ge);return new File([Ut()],`${t||C()}.${r}`,{type:`image/${r}`})};var K=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];var Im=()=>"#"+d(6,()=>a(K)).join("");var Rm=()=>a(K);var Bm=()=>a(jt);var Vm=()=>a(At);var Wm=()=>d(4,()=>c({min:0,max:255}).toString()).join(".");var Xm=()=>a([...Ot,...It]),$m=()=>a(Mt),Ym=()=>a(Pt),qm=()=>a(I)+" "+a(M);var ec=({length:t=6}={})=>{if(t<1)throw new Error("randomNumericCode: Length must be greater than 0.");return d(t,(e,r)=>c({min:r?0:1,max:9})).join("")};var cc=({maxDepth:t=5,circular:e=false}={})=>{let r=(o=0)=>o>=t?{}:d(c({min:1,max:5}),Bt).reduce((m,s)=>{let u=a(["value","object","array"]);if(u==="object"){let p=r(o+1);m[s]=p,e&&a([true,false],{weights:[.2,.8]})&&(p.circular=p);}else if(u==="array"){let p=ht();m[s]=p;}else {let p=V();m[s]=p;}return m},{});return r()};var yc=({minChars:t=9,maxChars:e=32}={})=>h({length:1}).toUpperCase()+h({length:c({min:t,max:e})-3})+a(kt)+c({min:1,max:9});var Sc=({depth:t=3}={})=>d(t,C).join("/");var Lt=["+44 20 7123 4567","+33 1 45 67 89 10","+81 3 1234 5678","+61 2 9876 5432","+49 30 9876 5432"];var Nc=()=>a(Lt);var Oc=()=>{let t=B().toString().padStart(15,"0"),e=t.substring(0,12);return `00000000-0000-1000-8${t.substring(12,15)}-${e}`};var Mc=t=>new URLSearchParams({input:JSON.stringify(t)});var wc=()=>{};
|
|
2
|
-
exports.JS_MAX_DIGITS=
|
|
1
|
+
(function(exports){'use strict';var A=t=>Array.isArray(t);var y=t=>Object.prototype.toString.call(t)==="[object Object]";var g=t=>typeof t=="string";var Z=t=>!!(t===void 0||t===null||zt(t)||Ht(t)||vt(t)),zt=t=>g(t)&&t.trim().length===0,vt=t=>A(t)&&t.length===0,Ht=t=>y(t)&&Object.keys(t).length===0;var j=t=>Object.prototype.toString.call(t)==="[object Date]"&&!isNaN(t);var Q=(t,e,r)=>t<e||t>r;var _=t=>Number.isInteger(t),ke=t=>_(t)&&!(t%2),Re=t=>_(t)&&!!(t%2),tt=t=>_(t)&&t>0,je=t=>_(t)&&t<0,O=t=>Object.prototype.toString.apply(t)==="[object Number]"&&isFinite(t),_e=t=>Object.prototype.toString.apply(t)==="[object BigInt]",Be=t=>{try{return BigInt(t)>Number.MAX_SAFE_INTEGER}catch{return false}},Le=t=>Q(t,-2147483647,2147483647);var Wt=/^\d{4}(-\d{2})?(-\d{2})?$/,c=(t,e)=>{if(Z(t)||O(t)&&(!Number.isInteger(t)||t<-864e13||t>864e13||!Number.isFinite(t)))return;g(t)&&Wt.test(t)&&(t=`${t+"-01-01".slice(t.length-4)}T00:00:00`,e?.asUTC&&(t+="Z"));let r=new Date(t);if(j(r))return r};var We=(t,e,r)=>{let o=(l=>{switch(l){case "day":return 864e5;case "hour":return 36e5;case "minute":return 6e4;case "second":return 1e3}})(r),i=t.map(l=>{let u=new Date(l);return {timestamp:u.getTime(),normalizedKey:u.toISOString()}}),m={};i.forEach(({normalizedKey:l})=>{m[l]=[];});let s=0;return e.forEach(l=>{let u=c(l);if(!u)return;let d=u.getTime(),b=u.toISOString();for(;s<i.length;){let S=i[s].timestamp,h=s<i.length-1?i[s+1].timestamp:S+o;if(d>=S&&d<h){m[i[s].normalizedKey].push(b);break}if(d<S)break;s++;}}),m};var Xe=(t,e)=>{let{startDate:r,endDate:n}=t,o=c(r),i=c(n);if(!o||!i||o.getTime()>i.getTime())throw new Error("Invalid date range");let m=[],s=new Date(o.getTime());for(;s<i;)switch(m.push(s.toISOString()),e){case "calendarMonth":if(o.getUTCDate()>28)throw new Error("Cannot add months when the start day of month is greater than 28, it may lead to unexpected results");{let l=s.getUTCMonth();s.setUTCMonth(l+1);}break;case "day":s.setUTCDate(s.getUTCDate()+1);break;case "hour":s.setUTCHours(s.getUTCHours()+1);break;case "minute":s.setUTCMinutes(s.getUTCMinutes()+1);break;case "second":s.setUTCSeconds(s.getUTCSeconds()+1);break;default:throw new Error(`Unsupported unit: ${e}`)}return m};var qe=t=>{if(!t||t.length===0)throw new Error("Cannot find date range for empty array");let e=t.map(s=>c(s)).filter(s=>s!==void 0);if(e.length===0)throw new Error("No valid dates found in array");let r=e.map(s=>s.getTime()),n=Math.min(...r),o=Math.max(...r),i=new Date(n),m=new Date(o);return {startDate:i,endDate:m}};var Qe=(t,e)=>t.every(r=>e.includes(r));var f=(t,e=()=>{})=>Array.from({length:t},e);var rr=(t,e)=>{let r=new Set(t),n=new Set(e),o=[...r].filter(m=>!n.has(m)),i=[...n].filter(m=>!r.has(m));return [...o,...i]};var or=(t,e)=>{if(t.length===0||e.length===0)return [];let r=new Set(t),n=new Set(e),[o,i]=r.size<n.size?[r,n]:[n,r];return [...o].filter(m=>i.has(m))};var et=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();var B=(t,e)=>{let r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r};var cr=async(t,e,r)=>{let n=B(t,e);return await Promise.all(n.map(r))};var w=t=>new Promise(e=>{setTimeout(e,t);});var fr=async(t,e,r,{minChunkTimeMs:n}={})=>{let o=[],i=B(t,e);for(let[m,s]of i.entries()){let l=performance.now(),u=await r(s,m,i);if(o.push(u),n){let d=performance.now()-l;d<n&&await w(n-d);}}return o};var C=({number:t,min:e,max:r})=>(r<e&&process.env.DEVERYTHING_WARNINGS&&console.warn("clamp: max < min",{number:t,min:e,max:r}),t<e?e:t>r?r:t);var Sr=async(t,e,r,{idealChunkDuration:n,maxChunkSize:o,minChunkDuration:i,minChunkSize:m,sleepTimeMs:s}={})=>{let l=[],u=0,d=0,b=e;for(;u<t.length;){let S=performance.now(),h=t.slice(u,u+b);u+=b;let M=await r(h,d);if(d+=1,l.push(M),s&&await w(s),n){let N=performance.now()-S;b=C({number:Math.round(b*(n/N)),min:m||1,max:o||200});}if(i){let N=performance.now()-S;N<i&&await w(i-N);}}return l};var rt=new RegExp(/\p{C}/,"gu");var nt=/\p{Zs}/gu;var ot=/\p{Zl}/gu;var at=/\p{Zp}/gu;var Pr=t=>t.replace(rt," ").replace(nt," ").replace(ot," ").replace(at," ").trim().replace(/\s{2,}/g," ");var wr=(t,e)=>t[e%t.length];var Rr=(t,{maxDepth:e=5}={})=>{console.dir(t,{depth:e});};var it=t=>O(t)?true:g(t)?/^[+-]?((\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?|0[xX][\dA-Fa-f]+|0[bB][01]+)$/.test(t):false;var st=t=>Object.keys(t).filter(e=>!it(e));var L=(t,e)=>e.hasOwnProperty(t)&&e.propertyIsEnumerable(t);var mt=t=>{let e=[];return Object.values(t).forEach(r=>{L(r,t)&&!e.includes(r)&&e.push(t[r]);}),e};var vr=t=>t.replace(/[^a-zA-Z0-9]/g,"");var Wr=t=>t[0];var Jr=t=>Object.keys(t)[0];var $r=t=>Object.values(t)[0];var qr=t=>{if(typeof document>"u")return;let e=document.cookie.split(";");for(let r of e){let[n,o]=r.trim().split("=");if(n===t)return decodeURIComponent(o)}};var Qr=Object.keys;var ct=t=>{if(!t)return {};try{let e=t.startsWith("/"),r=new URL(t,e?"https://deverything.dev/":void 0);return Object.fromEntries(r.searchParams)}catch{return {}}};var nn=(t,e)=>ct(t)[e];var x=t=>t!=null&&!Number.isNaN(t);var mn=(t,e)=>t.reduce((r,n)=>{let o=n[e];return x(o)&&(r[o]||(r[o]=[]),r[o].push(n)),r},{});var Gt=1,U=()=>Gt++;var pn=t=>Object.keys(t).length;var I=t=>t.length-1;var ut=t=>t[I(t)];var xn=(t,e)=>t.reduce((r,n)=>(x(n[e])&&(r[n[e]]=n),r),{});var W=(t,e)=>{let r={};return Object.keys(t).forEach(n=>{r[n]=y(t[n])?W({},t[n]):t[n];}),Object.keys(e).forEach(n=>{L(n,t)?r[n]=y(t[n])&&y(e[n])?W(t[n],e[n]):e[n]:r[n]=y(e[n])?W({},e[n]):e[n];}),r};var hn=(t,e)=>t.concat(e.filter(r=>!t.includes(r)));var Dn=(t,e)=>{let r=[...t];for(let n=0;n<r.length;n++)if(e(r[n],n,r)){let o=r.splice(n,1);r.unshift(o[0]);break}return r};var Nn=(t,e)=>{let r=[...t];for(let n=0;n<r.length;n++)if(e(r[n],n,r)){let o=r.splice(n,1)[0];r.push(o);break}return r};var Cn=({value:t,max:e,min:r})=>t>=e?1:t<=r?0:(t-r)/(e-r);var T=t=>{let e=Object.prototype.toString.call(t);return e==="[object Function]"||e==="[object AsyncFunction]"};var F=(t,e)=>{if(t===e)return true;if(A(t)&&A(e))return t.length!==e.length?false:t.every((r,n)=>F(r,e[n]));if(y(t)&&y(e)){let r=Object.keys(t);return r.length!==Object.keys(e).length?false:r.every(n=>F(t[n],e[n]))}return T(t)&&T(e)?t.toString()===e.toString():false};var _n=(t,e)=>{let r={},n=new Set([...Object.keys(t),...Object.keys(e)]);for(let o of n)F(e[o],t[o])||(r[o]={from:t[o],to:e[o]});return r};var Ln=(t,e)=>{let r={};for(let n in t)e.includes(n)||(r[n]=t[n]);return r};var Fn=(t,e)=>{let r={};for(let n in t)e.includes(n)&&(r[n]=t[n]);return r};var Kn=(t,e)=>{let r={};for(let n in t)e.includes(t[n])&&(r[n]=t[n]);return r};var Hn=(t,e)=>t.reduce((r,n)=>(x(n[e])&&r.push(n[e]),r),[]);var Gn=(t,e,r)=>{let n,o=new Promise((i,m)=>{n=setTimeout(()=>m(r??new Error("Promise timed out")),e);});return Promise.race([t(),o]).finally(()=>{clearTimeout(n);})};var Xn=t=>Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0));var p=({min:t=-100,max:e=100}={})=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1)+t)),pt=()=>BigInt(p()),Yn=({min:t=1,max:e}={})=>p({min:t,max:e}),qn=({min:t,max:e=-1}={})=>p({min:t,max:e}),Zn=()=>p({min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),Qn=()=>p({min:-Number.MAX_VALUE,max:Number.MAX_VALUE}),to=()=>p()+"%";var V=()=>String.fromCharCode(p({min:97,max:122}));var lt=new RegExp(/\p{L}/,"gu");var so=t=>t.replace(lt,()=>V());var co=t=>{let e=new Set;return JSON.stringify(t,(r,n)=>(e.add(r),n)),JSON.stringify(t,Array.from(e).sort())};var lo=async t=>{let e=[];for(let r of t)if(T(r))e.push(await r());else throw new Error(`seriesAsync: invalid type received "${typeof r}", make sure all items are functions, not promises, otherwise they would've been executed already`);return e};var bo=(t,e,r)=>{let n=e.split("."),o=(i,m,s)=>{let l=m[0];if(m.length===1){i[l]=s;return}(!i[l]||!y(i[l]))&&(i[l]={}),o(i[l],m.slice(1),s);};o(t,n,r);};var So=(t,e={})=>{let r=t.startsWith("/"),n=new URL(t,r?"https://deverything.dev/":void 0);return Object.entries(e).forEach(([o,i])=>{i!=null&&(y(i)?n.searchParams.set(o,JSON.stringify(i)):n.searchParams.set(o,i.toString()));}),r?n.pathname+n.search+n.hash:n.toString()};var ho=t=>{let e=[...t];for(let r=e.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[e[r],e[n]]=[e[n],e[r]];}return e};var dt=()=>{let t=[],e=[],r=function(n,o){return t[0]===o?"[Circular ~]":"[Circular ~."+e.slice(0,t.indexOf(o)).join(".")+"]"};return function(n,o){if(t.length>0){let i=t.indexOf(this);~i?t.splice(i+1):t.push(this),~i?e.splice(i,1/0,n):e.push(n),t.indexOf(o)!==-1&&(o=r.call(this,n,o));}else t.push(o);return o}};var No=t=>JSON.stringify(t,dt(),2);var Io=(t,e)=>{if(!A(t))return t;let r=t.reduce((n,o)=>(o!==e&&n.push(o),n),[]);return r.length===t.length&&r.push(e),r};var wo=(t,e,{ellipsis:r,position:n}={})=>{if(r||(r="..."),n||(n="end"),!tt(e))return t;let o=[...t],i=r.length;if(o.length<=e)return t;switch(n){case "start":{let m=e-i;return r+o.slice(-m).join("")}case "middle":{let m=Math.ceil((e-i)/2),s=o.length-Math.floor((e-i)/2);return o.slice(0,m).join("")+r+o.slice(s).join("")}case "end":default:return o.slice(0,e-i).join("")+r}};var Ro=t=>[...new Set(t)];var Bo=(t,e)=>{let r=c(t),n=c(e.startDate),o=c(e.endDate);return !r||!n||!o?false:r>=n&&r<o};var Uo=t=>Object.prototype.toString.call(t)==="[object Boolean]";var ft=()=>typeof window>"u";var K=()=>!ft();var Ho=K;var Xo=t=>x(t)&&x(t.constructor)&&T(t.constructor.isBuffer)&&t.constructor.isBuffer(t);var qo=t=>g(t)&&/\S+@\S+\.\S+/.test(t);var Qo=t=>Object.prototype.toString.call(t)==="[object File]";var G=(t,{referenceDate:e}={})=>{let r=c(t),n=e?c(e):new Date;if(!n)throw new Error(`[isFutureDate] Invalid referenceDate: ${e}`);return !!r&&r>n};var oa=(t,e)=>t===I(e);var sa=t=>g(t)&&t.trim().length>0;var ca=t=>/^\d+$/.test(t)&&parseInt(t)>0;var J=(t,{referenceDate:e}={})=>{let r=c(t),n=e?c(e):new Date;if(!n)throw new Error(`[isPastDate] Invalid referenceDate: ${e}`);return !!r&&r<n};var da=t=>t instanceof Promise;var ba=()=>K()&&window.matchMedia("(display-mode: standalone)").matches;var Jt=typeof Symbol=="function"&&Symbol.for,Xt=Jt?Symbol.for("react.element"):60103,ga=t=>t.$$typeof===Xt;var Ta=t=>Object.prototype.toString.call(t)==="[object RegExp]";var Aa=t=>t.length<2?true:t[0]!==1?false:t.slice(1).every((e,r)=>e===t[r-1]+1);var Ea=t=>t.indexOf(" ")>=0;var Ca=t=>{let e=new Date(t);return j(e)};var $t=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i"),Pa=t=>!!t&&$t.test(t);var wa=t=>/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t);var yt=(t,e)=>T(e)?e(t):t[e];function La({dateBuckets:t,items:e,unit:r,accessor:n}){let i=(d=>{switch(d){case "day":return 864e5;case "hour":return 36e5;case "minute":return 6e4;case "second":return 1e3}})(r),m=t.map(d=>{let b=c(d);if(!b)throw new Error(`[groupByDateBucket] Invalid dateBucket: ${d}`);return {timestamp:b.getTime(),normalizedKey:b.toISOString()}}),s={};m.forEach(({normalizedKey:d})=>{s[d]=[];});let l=d=>n?yt(d,n):d,u=0;return e.forEach(d=>{let b=l(d);if(!b)return;let S=c(b);if(!S)return;let h=S.getTime();for(;u<m.length;){let M=m[u].timestamp,N=u<m.length-1?m[u+1].timestamp:M+i;if(h>=M&&h<N){s[m[u].normalizedKey].push(d);break}if(h<M)break;u++;}}),s}var Va=t=>{let e=new Date,r=c(t);if(!r)return false;let n=e.getFullYear()-r.getFullYear();if(n>18)return true;if(n<18)return false;if(n===18){if(e.getMonth()>r.getMonth())return true;if(e.getMonth()<r.getMonth())return false;if(e.getMonth()===r.getMonth()){if(e.getDate()>=r.getDate())return true;if(e.getDate()<r.getDate())return false}}return false};var bt=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate());var va=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,1)};var Wa=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+7-t.getDay())};var Ja=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay())};var Ya=()=>bt(new Date);var Za=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1)};var ti=t=>new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));var ri=()=>{let t=new Date;return t.setUTCDate(t.getUTCDate()+1),new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()))};var oi=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n);var ii=t=>Object.entries(t).reduce((e,[r,n])=>(n!==void 0&&e.push(`${r}=${n}`),e),[]).join("; ")+";";var ci=(t,e)=>`[${C({number:t+1,min:1,max:e})}/${e}]`;var li=(t,{compact:e,maxDigits:r,percentage:n}={})=>n?`${((O(t)?t:0)*100).toFixed(r||0)}%`:Intl.NumberFormat("en",{notation:e?"compact":"standard",maximumSignificantDigits:r}).format(t);var yi=(t,{digits:e}={})=>`${C({number:t*100,min:0,max:100}).toFixed(e||0)}%`;var xi=t=>Array.from(t).map(e=>{let r=e.codePointAt(0);return r!==void 0?`\\${r.toString(16)}`:""}).join("");var Si=t=>Array.from(t).map(e=>{let r=e.codePointAt(0);return r!==void 0?`\\u{${r.toString(16)}}`:""}).join("");var hi=t=>t.reduce((r,n)=>r+n,0)/t.length;var Di=(t,e,r)=>t>=e&&t<=r;var Ni=(t,e,r)=>t>e&&t<r;var xt=t=>t.length?Math.max(...t):0;var gt=t=>Math.min(...t);var Pi=t=>t.reduce((e,r)=>e*r,1);var St=(t,e,r)=>(t-e)/(r-e);var _i=t=>{let e=gt(t),r=xt(t);return t.map(n=>St(n,e,r))};var Li=(t,e)=>{if(t<0||e<0||e===0&&t===0)return 0;if(e===0&&t!==0)return -1;if(e!==0&&t===0)return 1;let r=(e-t)/t;return parseFloat(r.toFixed(4))};var Tt=t=>t.reduce((e,r)=>e+r,0);var Ki=({startDate:t,endDate:e})=>{let r=c(t),n=c(e);if(!r||!n)throw new Error("prismaDateRange: Invalid date range");return {gte:r,lt:n}};var Yt=[{city:"London",country:"United Kingdom",countryCode:"GB",line2:"Marylebone",number:"221B",street:"Baker Street",zip:"NW1 6XE"},{city:"Birmingham",country:"United Kingdom",countryCode:"GB",number:"B1 1AA",street:"Bordesley Street",zip:"B1 1AA"}],qt=[{city:"New York",country:"United States",countryCode:"US",state:"NY",street:"Broadway",line2:"Manhattan",number:"42",zip:"10036"},{city:"Los Angeles",country:"United States",countryCode:"US",state:"CA",street:"Hollywood Boulevard",number:"6801",zip:"90028"}],Zt=[{city:"Paris",country:"France",countryCode:"FR",street:"Rue de Rivoli",number:"75001",zip:"75001"},{city:"Berlin",country:"Germany",countryCode:"DE",street:"Unter den Linden",line2:"Mitte",number:"10117",zip:"10117"},{city:"Rome",country:"Italy",countryCode:"IT",street:"Via del Corso",number:"00186",zip:"00186"},{city:"Madrid",country:"Spain",countryCode:"ES",street:"Gran V\xEDa",line2:"Sol",number:"28013",zip:"28013"}],Qt=[{city:"Moscow",country:"Russia",countryCode:"RU",street:"Tverskaya",number:"101000",zip:"101000"},{city:"Tokyo",country:"Japan",countryCode:"JP",street:"Shinjuku",line2:"Shinjuku City",number:"160-0022",zip:"160-0022"},{city:"Beijing",country:"China",countryCode:"CN",street:"Changan",number:"100005",zip:"100005"},{city:"Cairo",country:"Egypt",countryCode:"EG",street:"Al-Muizz",number:"11511",zip:"11511"},{city:"Buenos Aires",country:"Argentina",countryCode:"AR",street:"Avenida de Mayo",number:"1002",zip:"C1006AAQ"},{city:"Cape Town",country:"South Africa",countryCode:"ZA",street:"Adderley",number:"7700",zip:"7700"},{city:"Sydney",country:"Australia",countryCode:"AU",street:"George",line2:"Haymarket",number:"2000",zip:"2000"},{city:"Rio de Janeiro",country:"Brazil",countryCode:"BR",street:"Av. Presidente Vargas",number:"20021-000",zip:"20021-000"},{city:"Mexico City",country:"Mexico",countryCode:"MX",street:"Paseo de la Reforma",number:"06500",zip:"06500"}],ht=[...Yt,...qt,...Zt,...Qt];var a=(t,{weights:e}={})=>{if(e&&e.length===t.length){let r=Tt(e),n=Math.random()*r;for(let o=0;o<e.length;o++)if(n-=e[o],n<=0)return t[o];return ut(t)}return t[p({min:0,max:I(t)})]};var qi=()=>a(ht);var te="123456789ABCDEFGHIJKLMNPQRSTUVWXYZ".split(""),es=({length:t=6}={})=>{if(t<1)throw new Error("randomAlphaNumericCode: Length must be greater than 0.");return f(t,()=>a(te)).join("")};var At=()=>a([true,false]);var re=(t=new Date)=>X(t,31536e7),ne=(t=new Date)=>X(t,-31536e7),X=(t,e)=>new Date(t.getTime()+e),D=({startDate:t,endDate:e}={})=>{let r=c(t),n=c(e);r&&n&&r>n&&console.warn("randomDate: startDate must be before endDate");let o=r||ne(n),i=n||re(r);return new Date(p({min:o.getTime(),max:i.getTime()}))},cs=({startDate:t,endDate:e})=>(t=t||new Date(-864e13),e=e||new Date(864e13),D({startDate:t,endDate:e})),us=({startDate:t,endDate:e}={})=>{t&&J(t)&&console.warn("randomFutureDate: startDate must be in the future"),e&&J(e)&&console.warn("randomFutureDate: endDate must be in the future");let r=c(t)||X(new Date,5*6e4);return D({startDate:r,endDate:e})},ps=({startDate:t,endDate:e}={})=>{t&&G(t)&&console.warn("randomPastDate: startDate must be in the past"),e&&G(e)&&console.warn("randomPastDate: endDate must be in the past");let r=c(e)||new Date;return D({startDate:t,endDate:r})},ls=()=>{let t=D();return {endDate:D({startDate:t}),startDate:t}};var E=({length:t=10}={})=>f(t,()=>V()).join("");var Dt=()=>Symbol(E());var z=()=>a([At(),E(),p(),D(),pt(),Dt()]);var Et=()=>f(p({min:1,max:5}),z);var Nt=["AD1200012030200359100100","BA391290079401028494","BE68539007547034","BG80BNBG96611020345678","FI2112345600000785","FO6264600001631634","FR1420041010050500013M02606","GB29NWBK60161331926819","GE29NB0000000101904917"];var oe=[{accountHolderName:"John Peters",accountNumber:"12345678",bankAddress:"1 Churchill Place, Canary Wharf, London, E14 5HP, UK",bankName:"Barclays plc",bicSwift:"BARCGB22",iban:"GB51BARC20039534871253",sortCode:"12-34-56",accountHolderType:"individual"},{accountHolderName:"Jane Evans",accountNumber:"87654321",bankAddress:"8 Canada Square, London, E14 5HQ, UK",bankName:"HSBC Holdings plc",bicSwift:"HSBCGB2L",iban:"GB82BARC20031847813531",sortCode:"65-43-21",accountHolderType:"company"}],ae=[{accountHolderName:"Jack I. Taylor",accountNumber:"123456789012",accountType:"checking",bankAddress:"Bank of America Corporate Center, 100 North Tryon Street, Charlotte, NC 28255, USA",bankName:"Bank of America Corporation",routingNumber:"111000025",accountHolderType:"individual"},{accountHolderName:"Sally T King",accountNumber:"987654321098",accountType:"savings",bankAddress:"383 Madison Avenue, New York, NY 10179, USA",bankName:"JPMorgan Chase & Co.",routingNumber:"021000021",accountHolderType:"company"}],ie=[{accountHolderName:"William Kevin White",accountNumber:"123456789012",accountType:"savings",bankAddress:"Commonwealth Bank Centre, Tower 1, 201 Sussex Street, Sydney, NSW 2000, Australia",bankName:"Commonwealth Bank of Australia",bicSwift:"CTBAAU2S",bsbNumber:"062-000",accountHolderType:"individual"},{accountHolderName:"Jennifer Ann Brown",accountNumber:"987654321098",accountType:"checking",bankAddress:"Westpac Place, 275 Kent Street, Sydney, NSW 2000, Australia",bankName:"Westpac Banking Corporation",bicSwift:"WPACAU2S",bsbNumber:"032-001",accountHolderType:"company"}],se=[{accountHolderName:"Charles Green",accountNumber:"123456789012",accountType:"savings",bankAddress:"Royal Bank Plaza, 200 Bay Street, North Tower, Toronto, ON M5J 2J5, Canada",bankName:"Royal Bank of Canada",branchTransitNumber:"45678",institutionNumber:"123",accountHolderType:"individual"},{accountHolderName:"Olivia Orange",accountNumber:"987654321098",accountType:"checking",bankAddress:"TD Canada Trust Tower, 161 Bay Street, Toronto, ON M5J 2S8, Canada",bankName:"Toronto-Dominion Bank",branchTransitNumber:"65432",institutionNumber:"987",accountHolderType:"company"}],Ot=[...oe,...ae,...ie,...se];var Rs=()=>a(Ot);var Ct=["IE1234567T","GB123456789","XI123456789"],It=["Acme Inc.","Globex Ltd.","Aurora LLC","Serenity Systems","Vulcan Ventures","Umbrella Corp."];var Fs=()=>({name:a(It),vatRegNumber:a(Ct)});var zs=16,$=(t=-9,e=9,r)=>{let n=Math.random()*(e-t)+t;return x(r)?parseFloat(n.toFixed(r)):n};var Ws=()=>({lat:me(),lng:ce()}),me=()=>$(-90,90),ce=()=>$(-180,180);var Pt=["gmail.com","yahoo.com","hotmail.com","aol.com","msn.com","comcast.net","live.com","att.net","mac.com","me.com","charter.net","shaw.ca","yahoo.ca","mail.com","qq.com","web.de","gmx.de","mail.ru"];var Mt=["Albatross","Dolphin","Elephant","Giraffe","Koala","Lion","Penguin","Squirrel","Tiger","Turtle","Whale","Zebra"],wt=["Axe","Chisel","Drill","Hammer","Mallet","Pliers","Saw","Screwdriver","Wrench","Blowtorch","Crowbar","Ladder"],k=["Adrian","Albert","Alexander","Alice","Amanda","Amy","Benjamin","David","Emma","Esther","Olivia","Ruby","Sarah","Victoria"],R=["Anderson","Brown","Davis","Jackson","Johnson","Jones","Miller","Moore","Smith","Taylor","Thomas","White","Williams","Wilson"],ue=["\u0410\u0431\u0438\u0433\u0430\u0438\u043B","\u0410\u0433\u043D\u0435\u0441","\u0410\u0434\u0430\u043C","\u0410\u0434\u0440\u0438\u0430\u043D","\u0410\u043B\u0430\u043D","\u0410\u043B\u0435\u043A\u0441\u0430\u043D\u0434\u0440","\u0410\u043B\u0438\u0441\u0430","\u0410\u043B\u044C\u0431\u0435\u0440\u0442","\u0410\u043C\u0430\u043D\u0434\u0430","\u0410\u043C\u0435\u043B\u0438\u044F","\u042D\u043C\u0438","\u042D\u043D\u0434\u0440\u044E"],pe=["\u0410\u043D\u0434\u0435\u0440\u0441\u043E\u043D","\u0411\u0440\u0430\u0443\u043D","\u0412\u0438\u043B\u0441\u043E\u043D","\u0414\u0436\u0435\u043A\u0441\u043E\u043D","\u0414\u0436\u043E\u043D\u0441","\u0414\u0436\u043E\u043D\u0441\u043E\u043D","\u0414\u044D\u0432\u0438\u0441","\u041C\u0438\u043B\u043B\u0435\u0440","\u041C\u0443\u0440","\u0421\u043C\u0438\u0442","\u0422\u0435\u0439\u043B\u043E\u0440","\u0422\u043E\u043C\u0430\u0441","\u0423\u0430\u0439\u0442","\u0423\u0438\u043B\u044C\u044F\u043C\u0441"],le=["\u30A2\u30B0\u30CD\u30B9","\u30A2\u30C0\u30E0","\u30A2\u30C9\u30EA\u30A2\u30F3","\u30A2\u30D3\u30B2\u30A4\u30EB","\u30A2\u30DE\u30F3\u30C0","\u30A2\u30DF\u30FC","\u30A2\u30E1\u30EA\u30A2","\u30A2\u30E9\u30F3","\u30A2\u30EA\u30B9","\u30A2\u30EB\u30D0\u30FC\u30C8","\u30A2\u30EC\u30AF\u30B5\u30F3\u30C0\u30FC","\u30A2\u30F3\u30C9\u30EA\u30E5\u30FC"],de=["\u30A2\u30F3\u30C0\u30FC\u30BD\u30F3","\u30A6\u30A3\u30EA\u30A2\u30E0\u30BA","\u30A6\u30A3\u30EB\u30BD\u30F3","\u30B8\u30E3\u30AF\u30BD\u30F3","\u30B8\u30E7\u30FC\u30F3\u30BA","\u30B8\u30E7\u30F3\u30BD\u30F3","\u30B9\u30DF\u30B9","\u30BF\u30A4\u30E9\u30FC","\u30C7\u30A4\u30D3\u30B9","\u30C8\u30FC\u30DE\u30B9","\u30D6\u30E9\u30A6\u30F3","\u30DB\u30EF\u30A4\u30C8","\u30DF\u30E9\u30FC","\u30E2\u30A2"],fe=["\u0622\u062F\u0631\u064A\u0627\u0646","\u0622\u062F\u0645","\u0622\u0644\u0627\u0646","\u0622\u0644\u0628\u0631\u062A","\u0622\u0644\u064A\u0633","\u0622\u0645\u0627\u0646\u062F\u0627","\u0622\u0645\u064A","\u0622\u0645\u064A\u0644\u064A\u0627","\u0623\u0628\u064A\u062C\u064A\u0644","\u0623\u063A\u0646\u064A\u0633","\u0623\u0644\u0643\u0633\u0646\u062F\u0631","\u0623\u0646\u062F\u0631\u0648"],ye=["\u0623\u0646\u062F\u0631\u0633\u0648\u0646","\u0628\u0631\u0627\u0648\u0646","\u062A\u0627\u064A\u0644\u0648\u0631","\u062A\u0648\u0645\u0627\u0633","\u062C\u0627\u0643\u0633\u0648\u0646","\u062C\u0648\u0646\u0632","\u062C\u0648\u0646\u0633\u0648\u0646","\u062F\u064A\u0641\u064A\u0633","\u0633\u0645\u064A\u062B","\u0645\u0648\u0631","\u0645\u064A\u0644\u0631","\u0648\u0627\u064A\u062A","\u0648\u064A\u0644\u0633\u0648\u0646","\u0648\u064A\u0644\u064A\u0627\u0645\u0632"],kt=[...k,...ue,...le,...fe],Rt=[...R,...pe,...de,...ye];var jt=({suffix:t}={})=>(a(k)+"."+a(R)).toLowerCase()+U()+(t||"");var rm=({handle:t,handleSuffix:e}={})=>`${t||jt({suffix:e})}@${a(Pt)}`;var _t=["\u{1F600}","\u{1F601}","\u{1F602}","\u{1F923}","\u{1F603}","\u{1F604}","\u{1F605}","\u{1F606}","\u{1F609}","\u{1F60A}","\u{1F60B}","\u{1F60E}","\u{1F60D}","\u{1F618}","\u{1F617}","\u{1F619}"],Bt=["!","@","#","$","%","^","&","*"];var sm=()=>a(_t);var um=()=>a([void 0,null,NaN,1/0]);var fm=t=>{let e=st(t);return a(e)};var gm=t=>{let e=mt(t);return a(e)};var Y=["act","add","agree","allow","be","catch","create","delete","discover","eat","explore","go","help","imagine","jump","merge","need","offer","play","read","run","search","skip","solve","speak","think","try","work","write"],q=["city","coffee","courage","fact","family","flower","food","friend","fun","hope","justice","key","life","love","music","smile","time"],be=["absolute","compassionate","cozy","dull","enigmatic","fascinating","interesting","playful","predictable","remarkable","soothing","sunny","unforgettable","wonderful"],xe=["accidentally","accommodatingly","boldly","briskly","carefully","efficiently","freely","gently","happily","lightly","loudly","quickly","quietly","suddenly","unexpectedly","wisely"],ge=["Pneumonoultramicroscopicsilicovolcanoconiosis","Floccinaucinihilipilification","Pseudopseudohypoparathyroidism","Hippopotomonstrosesquippedaliophobia","Antidisestablishmentarianism","Supercalifragilisticexpialidocious","Honorificabilitudinitatibus"];var Lt=["AliceBlue","Aqua","Aquamarine","Azure","Beige","Bisque","Black","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","DarkSlateGray","DeepPink","Gold","Lime","Olive","Orchid","Salmon","Turquoise"],Ut=[...Y,...q,...be,...xe,...ge];var P=()=>a(Ut),Ft=()=>a(q),Dm=()=>a(Y);var Vt=({maxCharacters:t=200,minWords:e=8,maxWords:r=16}={})=>et(f(p({min:e,max:r}),()=>P()).join(" ").slice(0,t-1)+".");var Se=["png","jpg","jpeg","gif","svg","webp"],Rm=({name:t,extension:e}={})=>{if(typeof File>"u")return;let r=e||a(Se);return new File([Vt()],`${t||P()}.${r}`,{type:`image/${r}`})};var v=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];var Fm=()=>"#"+f(6,()=>a(v)).join("");var vm=()=>a(v);var Jm=()=>a(Lt);var qm=()=>a(Nt);var ec=()=>f(4,()=>p({min:0,max:255}).toString()).join(".");var ac=()=>a([...Mt,...wt]),ic=()=>a(kt),sc=()=>a(Rt),mc=()=>a(k)+" "+a(R);var lc=({length:t=6}={})=>{if(t<1)throw new Error("randomNumericCode: Length must be greater than 0.");return f(t,(e,r)=>p({min:r?0:1,max:9})).join("")};var Tc=({maxDepth:t=5,circular:e=false}={})=>{let r=(o=0)=>o>=t?{}:f(p({min:1,max:5}),Ft).reduce((m,s)=>{let l=a(["value","object","array"]);if(l==="object"){let u=r(o+1);m[s]=u,e&&a([true,false],{weights:[.2,.8]})&&(u.circular=u);}else if(l==="array"){let u=Et();m[s]=u;}else {let u=z();m[s]=u;}return m},{});return r()};var Oc=({minChars:t=9,maxChars:e=32}={})=>E({length:1}).toUpperCase()+E({length:p({min:t,max:e})-3})+a(Bt)+p({min:1,max:9});var Mc=({depth:t=3}={})=>f(t,P).join("/");var Kt=["+44 20 7123 4567","+33 1 45 67 89 10","+81 3 1234 5678","+61 2 9876 5432","+49 30 9876 5432"];var _c=()=>a(Kt);var Uc=()=>{let t=U().toString().padStart(15,"0"),e=t.substring(0,12);return `00000000-0000-1000-8${t.substring(12,15)}-${e}`};var Vc=t=>new URLSearchParams({input:JSON.stringify(t)});var zc=()=>{};
|
|
2
|
+
exports.JS_MAX_DIGITS=zs;exports.array=f;exports.arrayDiff=rr;exports.arrayIntersection=or;exports.average=hi;exports.bucketSortedDates=We;exports.capitalize=et;exports.chunkArray=B;exports.chunkedAll=cr;exports.chunkedAsync=fr;exports.chunkedDynamic=Sr;exports.clamp=C;exports.cleanSpaces=Pr;exports.cyclicalItem=wr;exports.dir=Rr;exports.enumKeys=st;exports.enumValues=mt;exports.filterAlphanumeric=vr;exports.first=Wr;exports.firstKey=Jr;exports.firstValue=$r;exports.formatCamelCase=oi;exports.formatCookies=ii;exports.formatIndexProgress=ci;exports.formatNumber=li;exports.formatPercentage=yi;exports.formatTrpcInputQueryString=Vc;exports.getCookieByName=qr;exports.getDateRangeSeries=Xe;exports.getDateSeriesRange=qe;exports.getKeys=Qr;exports.getUrlSearchParam=nn;exports.getUrlSearchParams=ct;exports.groupByDateBucket=La;exports.groupByKey=mn;exports.incrementalId=U;exports.isArray=A;exports.isArrayIncluded=Qe;exports.isBetween=Di;exports.isBetweenDates=Bo;exports.isBigInt=_e;exports.isBigIntString=Be;exports.isBoolean=Uo;exports.isBrowser=Ho;exports.isBuffer=Xo;exports.isClient=K;exports.isEmail=qo;exports.isEmpty=Z;exports.isEmptyArray=vt;exports.isEmptyObject=Ht;exports.isEmptyString=zt;exports.isEven=ke;exports.isFile=Qo;exports.isFunction=T;exports.isFutureDate=G;exports.isInt=_;exports.isJsDate=j;exports.isKey=L;exports.isLastIndex=oa;exports.isNegativeInt=je;exports.isNotEmptyString=sa;exports.isNumber=O;exports.isNumeric=it;exports.isNumericId=ca;exports.isObject=y;exports.isOdd=Re;exports.isOutside=Q;exports.isOutsideInt4=Le;exports.isOver18=Va;exports.isPWA=ba;exports.isPastDate=J;exports.isPositiveInt=tt;exports.isPromise=da;exports.isReactElement=ga;exports.isRegExp=Ta;exports.isSame=F;exports.isSequence=Aa;exports.isServer=ft;exports.isSpacedString=Ea;exports.isStrictlyBetween=Ni;exports.isString=g;exports.isStringDate=Ca;exports.isURL=Pa;exports.isUUID=wa;exports.isValue=x;exports.keysLength=pn;exports.last=ut;exports.lastIndex=I;exports.mapByKey=xn;exports.max=xt;exports.merge=W;exports.mergeArrays=hn;exports.min=gt;exports.moveToFirst=Dn;exports.moveToLast=Nn;exports.multiply=Pi;exports.noop=zc;exports.normaliseArray=_i;exports.normaliseNumber=St;exports.normalizeNumber=Cn;exports.objectDiff=_n;exports.omit=Ln;exports.parseDate=c;exports.percentageChange=Li;exports.pickObjectKeys=Fn;exports.pickObjectValues=Kn;exports.pluck=Hn;exports.prismaDateRange=Ki;exports.promiseWithTimeout=Gn;exports.randomAddress=qi;exports.randomAlphaNumericCode=es;exports.randomArray=Et;exports.randomArrayItem=a;exports.randomBankAccount=Rs;exports.randomBigInt=pt;exports.randomBool=At;exports.randomChar=V;exports.randomCompany=Fs;exports.randomCoords=Ws;exports.randomDate=D;exports.randomDateRange=ls;exports.randomEmail=rm;exports.randomEmoji=sm;exports.randomEmptyValue=um;exports.randomEnumKey=fm;exports.randomEnumValue=gm;exports.randomFile=Rm;exports.randomFirstName=ic;exports.randomFloat=$;exports.randomFormattedPercentage=to;exports.randomFullName=mc;exports.randomFutureDate=us;exports.randomHandle=jt;exports.randomHexColor=Fm;exports.randomHexValue=vm;exports.randomHtmlColorName=Jm;exports.randomIBAN=qm;exports.randomIP=ec;exports.randomInt=p;exports.randomLastName=sc;exports.randomLat=me;exports.randomLng=ce;exports.randomMaxDate=cs;exports.randomMaxInt=Qn;exports.randomMaxSafeInt=Zn;exports.randomName=ac;exports.randomNegativeInt=qn;exports.randomNoun=Ft;exports.randomNumericCode=lc;exports.randomObject=Tc;exports.randomParagraph=Vt;exports.randomPassword=Oc;exports.randomPastDate=ps;exports.randomPath=Mc;exports.randomPhoneNumber=_c;exports.randomPositiveInt=Yn;exports.randomString=E;exports.randomSymbol=Dt;exports.randomUUID=Uc;exports.randomValue=z;exports.randomVerb=Dm;exports.randomWord=P;exports.removeUndefinedValues=Xn;exports.scrambleText=so;exports.serialize=co;exports.seriesAsync=lo;exports.setObjectPath=bo;exports.setUrlSearchParams=So;exports.shuffle=ho;exports.sleep=w;exports.startOfDay=bt;exports.startOfNextMonth=va;exports.startOfNextWeek=Wa;exports.startOfThisWeek=Ja;exports.startOfToday=Ya;exports.startOfTomorrow=Za;exports.startOfUTCDay=ti;exports.startOfUTCTomorrow=ri;exports.stringToCSSUnicode=xi;exports.stringToUnicode=Si;exports.stringify=No;exports.sum=Tt;exports.toggleArrayValue=Io;exports.truncate=wo;exports.uniqueValues=Ro;return exports;})({});//# sourceMappingURL=index.global.js.map
|
|
3
3
|
//# sourceMappingURL=index.global.js.map
|