Socket
Socket
Sign inDemoInstall

es-toolkit

Package Overview
Dependencies
Maintainers
0
Versions
730
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-toolkit - npm Package Compare versions

Comparing version 1.18.0 to 1.19.0-dev.603

dist/_chunk/curry-BmwJrK.js

11

CHANGELOG.md
# es-toolkit Changelog
## Version v1.19.0
Released on September 14th, 2024.
- Added support for [isDate](https://es-toolkit.slash.page/reference/predicate/isDate.html), [curry](https://es-toolkit.slash.page/reference/function/curry.html), [upperCase](https://es-toolkit.slash.page/reference/string/upperCase.html).
- Added compatibility functions for [pick](https://es-toolkit.slash.page/reference/object/pick.html), [omit](https://es-toolkit.slash.page/reference/object/omit.html), [unset](https://es-toolkit.slash.page/reference/compat/object/unset.html), [toPath](https://es-toolkit.slash.page/reference/compat/util/toPath.html), [trim](https://es-toolkit.slash.page/reference/compat/string/trim.html), [trimStart](https://es-toolkit.slash.page/reference/compat/string/trimStart.html), [trimEnd](https://es-toolkit.slash.page/reference/compat/string/trimEnd.html), [isInteger](https://es-toolkit.slash.page/reference/compat/predicate/isInteger.html), [isSafeInteger](https://es-toolkit.slash.page/reference/compat/predicate/isSafeInteger.html), [snakeCase](https://es-toolkit.slash.page/reference/string/snakeCase.html), [startCase](https://es-toolkit.slash.page/reference/string/startCase.html), [lowerCase](https://es-toolkit.slash.page/reference/string/lowerCase.html), [kebabCase](https://es-toolkit.slash.page/reference/string/kebabCase.html), [ceil](https://es-toolkit.slash.page/reference/compat/math/ceil.html), [floor](https://es-toolkit.slash.page/reference/compat/math/floor.html), [round](https://es-toolkit.slash.page/reference/math/round.html).
- Enhanced [clone](https://es-toolkit.slash.page/reference/object/clone.html) to handle `Buffer`s, `SharedArrayBuffer`s, `File`s, `Blob`s, `TypedArray`s, and `Error`s.
- Fixed a bug where [mergeWith](https://es-toolkit.slash.page/reference/object/mergeWith.html) did not preserve the original properties of the `target` object.
- Fixed a bug where [groupBy](https://es-toolkit.slash.page/reference/array/groupBy.html) couldn't group with keys like `toString` and `indexOf`.
- Improved performance for [has](https://es-toolkit.slash.page/reference/compat/object/has.html) and [get](https://es-toolkit.slash.page/reference/compat/object/get.html).
## Version v1.18.0

@@ -4,0 +15,0 @@

@@ -24,3 +24,26 @@ /**

declare function forEachRight<T>(arr: T[], callback: (value: T, index: number, arr: T[]) => void): void;
/**
* Iterates over elements of 'arr' from right to left and invokes 'callback' for each element.
*
* @template T - The type of elements in the array.
* @param {T[]} arr - The array to iterate over.
* @param {(value: T, index: number, arr: T[]) => void} callback - The function invoked per iteration.
* The callback function receives three arguments:
* - 'value': The current element being processed in the array.
* - 'index': The index of the current element being processed in the array.
* - 'arr': The array 'forEachRight' was called upon.
*
* @example
* const array = [1, 2, 3];
* const result: number[] = [];
*
* // Use the forEachRight function to iterate through the array and add each element to the result array.
* forEachRight(array, (value) => {
* result.push(value);
* })
*
* console.log(result) // Output: [3, 2, 1]
*/
declare function forEachRight<T>(arr: readonly T[], callback: (value: T, index: number, arr: readonly T[]) => void): void;
export { forEachRight };

2

dist/array/index.js

@@ -5,3 +5,3 @@ 'use strict';

const zipWith = require('../_chunk/zipWith-CYaH1Y.js');
const zipWith = require('../_chunk/zipWith-B-5AMf.js');

@@ -8,0 +8,0 @@ function compareValues(a, b, order) {

@@ -35,4 +35,4 @@ /**

*/
declare function orderBy<T extends object>(arr: T[], criteria: Array<((item: T) => unknown) | keyof T>, orders: Array<'asc' | 'desc'>): T[];
declare function orderBy<T extends object>(arr: readonly T[], criteria: Array<((item: T) => unknown) | keyof T>, orders: Array<'asc' | 'desc'>): T[];
export { orderBy };

@@ -33,4 +33,4 @@ /**

*/
declare function sortBy<T extends object>(arr: T[], criteria: Array<((item: T) => unknown) | keyof T>): T[];
declare function sortBy<T extends object>(arr: readonly T[], criteria: Array<((item: T) => unknown) | keyof T>): T[];
export { sortBy };

@@ -14,3 +14,3 @@ /**

*/
declare function unzip<T extends unknown[]>(zipped: Array<[...T]>): Unzip<T>;
declare function unzip<T extends unknown[]>(zipped: ReadonlyArray<[...T]>): Unzip<T>;
type Unzip<K extends unknown[]> = {

@@ -17,0 +17,0 @@ [I in keyof K]: Array<K[I]>;

@@ -31,4 +31,4 @@ /**

*/
declare function zipObject<P extends PropertyKey, V>(keys: P[], values: V[]): Record<P, V>;
declare function zipObject<P extends PropertyKey, V>(keys: readonly P[], values: readonly V[]): Record<P, V>;
export { zipObject };

@@ -1,2 +0,2 @@

var _=function(t){"use strict";function at(t,e){const n=[];for(let r=0;r<e.length;r++){const o=e[r];n.push(t.at(o))}return n}function difference$1(t,e){const n=new Set(e);return t.filter((t=>!n.has(t)))}function differenceBy(t,e,n){const r=new Set(e.map((t=>n(t))));return t.filter((t=>!r.has(n(t))))}function differenceWith(t,e,n){return t.filter((t=>e.every((e=>!n(t,e)))))}function flatten$1(t,e=1){const n=[],r=Math.floor(e),recursive=(t,e)=>{for(const o of t)Array.isArray(o)&&e<r?recursive(o,e+1):n.push(o)};recursive(t,0);return n}function head(t){return t[0]}function intersection(t,e){const n=new Set(e);return t.filter((t=>n.has(t)))}function intersectionBy(t,e,n){const r=new Set(e.map(n));return t.filter((t=>r.has(n(t))))}function intersectionWith(t,e,n){return t.filter((t=>e.some((e=>n(t,e)))))}function random(t,e){if(null==e){e=t;t=0}if(t>=e)throw new Error("Invalid input: The maximum value must be greater than the minimum value.");return Math.random()*(e-t)+t}function randomInt(t,e){return Math.floor(random(t,e))}function uniq(t){return Array.from(new Set(t))}function union(t,e){return uniq(t.concat(e))}function unionBy(t,e,n){const r=new Map;for(const o of[...t,...e]){const t=n(o);r.has(t)||r.set(t,o)}return Array.from(r.values())}function uniqWith(t,e){const n=[];for(const r of t){n.every((t=>!e(t,r)))&&n.push(r)}return n}function unionWith(t,e,n){return uniqWith(t.concat(e),n)}function zip(...t){const e=[],n=Math.max(...t.map((t=>t.length)));for(let r=0;r<n;r++){const n=[];for(const e of t)n.push(e[r]);e.push(n)}return e}class AbortError extends Error{constructor(t="The operation was aborted"){super(t);this.name="AbortError"}}class TimeoutError extends Error{constructor(t="The operation was timed out"){super(t);this.name="TimeoutError"}}function noop(){}function ary$1(t,e){return function(...n){return t.apply(this,n.slice(0,e))}}function partial(t,...e){return function(...n){const r=[];let o=0;for(let t=0;t<e.length;t++){const i=e[t];i===partial.placeholder?r.push(n[o++]):r.push(i)}for(let t=o;t<n.length;t++)r.push(n[t]);return t.apply(this,r)}}const e=Symbol("partial.placeholder");partial.placeholder=e;function partialRight(t,...e){return function(...r){const o=e.filter((t=>t===n)).length,i=Math.max(r.length-o,0),c=[];let s=0;for(let t=0;t<i;t++)c.push(r[s++]);for(let t=0;t<e.length;t++){const n=e[t];n===partialRight.placeholder?c.push(r[s++]):c.push(n)}return t.apply(this,c)}}const n=Symbol("partialRight.placeholder");partialRight.placeholder=n;function sum(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n];return e}function mean(t){return sum(t)/t.length}function clone(t){if(function isPrimitive$1(t){return null==t||"object"!=typeof t&&"function"!=typeof t}(t))return t;if(Array.isArray(t))return t.slice();if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(t instanceof Map){const e=new Map;for(const[n,r]of t)e.set(n,r);return e}if(t instanceof Set){const e=new Set;for(const n of t)e.add(n);return e}if("object"==typeof t){const e=Object.getPrototypeOf(t),n=Object.create(e);return Object.assign(n,t)}return t}function isPlainObject$1(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==t.toString())return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function flattenObjectImpl(t,e=""){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i],s=e?`${e}.${i}`:i;if(isPlainObject$1(c)&&Object.keys(c).length>0)Object.assign(n,flattenObjectImpl(c,s));else if(Array.isArray(c))for(let t=0;t<c.length;t++)n[`${s}.${t}`]=c[t];else n[s]=c}return n}function mapKeys$1(t,e){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i];n[e(c,i,t)]=c}return n}function mapValues$1(t,e){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i];n[i]=e(c,i,t)}return n}function isPrimitive(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function isTypedArray$1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function cloneDeep$1(t){return cloneDeepImpl(t)}function cloneDeepImpl(t,e=new Map){if(isPrimitive(t))return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const n=new Array(t.length);e.set(t,n);for(let r=0;r<t.length;r++)n[r]=cloneDeepImpl(t[r],e);Object.prototype.hasOwnProperty.call(t,"index")&&(n.index=t.index);Object.prototype.hasOwnProperty.call(t,"input")&&(n.input=t.input);return n}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);e.lastIndex=t.lastIndex;return e}if(t instanceof Map){const n=new Map;e.set(t,n);for(const[r,o]of t.entries())n.set(r,cloneDeepImpl(o,e));return n}if(t instanceof Set){const n=new Set;e.set(t,n);for(const r of t.values())n.add(cloneDeepImpl(r,e));return n}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(isTypedArray$1(t)){const n=new(Object.getPrototypeOf(t).constructor)(t.length);e.set(t,n);for(let r=0;r<t.length;r++)n[r]=cloneDeepImpl(t[r],e);return n}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const n=new DataView(t.buffer.slice(0));e.set(t,n);copyProperties(n,t,e);return n}if("undefined"!=typeof File&&t instanceof File){const n=new File([t],t.name,{type:t.type});e.set(t,n);copyProperties(n,t,e);return n}if(t instanceof Blob){const n=new Blob([t],{type:t.type});e.set(t,n);copyProperties(n,t,e);return n}if(t instanceof Error){const n=new t.constructor;e.set(t,n);n.message=t.message;n.name=t.name;n.stack=t.stack;n.cause=t.cause;copyProperties(n,t,e);return n}if("object"==typeof t&&null!==t){const n={};e.set(t,n);copyProperties(n,t,e);return n}return t}function copyProperties(t,e,n){const r=Object.keys(e);for(let o=0;o<r.length;o++){const i=r[o],c=Object.getOwnPropertyDescriptor(e,i);(c?.writable||c?.set)&&(t[i]=cloneDeepImpl(e[i],n))}}function isObjectLike(t){return"object"==typeof t&&null!==t}function merge$1(t,e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o],c=t[o];Array.isArray(i)?t[o]=merge$1(c??[],i):isObjectLike(c)&&isObjectLike(i)?t[o]=merge$1(c??{},i):void 0!==c&&void 0===i||(t[o]=i)}return t}const r="[object RegExp]",o="[object String]",i="[object Number]",c="[object Boolean]",s="[object Arguments]",u="[object Symbol]",a="[object Date]",f="[object Map]",l="[object Set]",p="[object Array]",y="[object Function]",h="[object ArrayBuffer]",g="[object Object]",m="[object Error]",b="[object DataView]",d="[object Uint8Array]",j="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]",w="[object BigUint64Array]",M="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",B="[object BigInt64Array]",k="[object Float32Array]",E="[object Float64Array]";function getSymbols(t){return Object.getOwnPropertySymbols(t).filter((e=>Object.prototype.propertyIsEnumerable.call(t,e)))}function getTag(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function areObjectsEqual(t,e,n){if(Object.is(t,e))return!0;let P=getTag(t),W=getTag(e);P===s&&(P=g);W===s&&(W=g);if(P!==W)return!1;switch(P){case o:return t.toString()===e.toString();case i:{const n=t.valueOf(),r=e.valueOf();return n===r||Number.isNaN(n)&&Number.isNaN(r)}case c:case a:case u:return Object.is(t.valueOf(),e.valueOf());case r:return t.source===e.source&&t.flags===e.flags;case y:return t===e}const $=(n=n??new Map).get(t),I=n.get(e);if(null!=$&&null!=I)return $===e;n.set(t,e);n.set(e,t);try{switch(P){case f:if(t.size!==e.size)return!1;for(const[r,o]of t.entries())if(!e.has(r)||!areObjectsEqual(o,e.get(r),n))return!1;return!0;case l:{if(t.size!==e.size)return!1;const r=Array.from(t.values()),o=Array.from(e.values());for(let t=0;t<r.length;t++){const e=r[t],i=o.findIndex((t=>areObjectsEqual(e,t,n)));if(-1===i)return!1;o.splice(i,1)}return!0}case p:case d:case j:case A:case O:case w:case M:case S:case x:case B:case k:case E:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!areObjectsEqual(t[r],e[r],n))return!1;return!0;case h:return t.byteLength===e.byteLength&&areObjectsEqual(new Uint8Array(t),new Uint8Array(e),n);case b:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&areObjectsEqual(t.buffer,e.buffer,n);case m:return t.name===e.name&&t.message===e.message;case g:{if(!(areObjectsEqual(t.constructor,e.constructor,n)||isPlainObject$1(t)&&isPlainObject$1(e)))return!1;const r=[...Object.keys(t),...getSymbols(t)],o=[...Object.keys(e),...getSymbols(e)];if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o],c=t[i];if(!Object.prototype.hasOwnProperty.call(e,i))return!1;if(!areObjectsEqual(c,e[i],n))return!1}return!0}default:return!1}}finally{n.delete(t);n.delete(e)}}function isNil(t){return null==t}function isLength(t){return Number.isSafeInteger(t)&&t>=0}function delay(t,{signal:e}={}){return new Promise(((n,r)=>{const abortError=()=>{r(new AbortError)},abortHandler=()=>{clearTimeout(o);abortError()};if(e?.aborted)return abortError();const o=setTimeout((()=>{e?.removeEventListener("abort",abortHandler);n()}),t);e?.addEventListener("abort",abortHandler,{once:!0})}))}async function timeout(t){await delay(t);throw new TimeoutError}function capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const P=/[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g;function getWords(t){return Array.from(t.match(P)??[])}const W=new Map(Object.entries({Æ:"Ae",Ð:"D",Ø:"O",Þ:"Th",ß:"ss",æ:"ae",ð:"d",ø:"o",þ:"th",Đ:"D",đ:"d",Ħ:"H",ħ:"h",ı:"i",IJ:"IJ",ij:"ij",ĸ:"k",Ŀ:"L",ŀ:"l",Ł:"L",ł:"l",ʼn:"'n",Ŋ:"N",ŋ:"n",Œ:"Oe",œ:"oe",Ŧ:"T",ŧ:"t",ſ:"s"}));const $={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};const I={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};const v=/^\w*$/,D=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;function isDeepKey(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return!v.test(t)&&D.test(t)}}function isSymbol(t){return"symbol"==typeof t||null!=t&&t instanceof Symbol}function toKey(t){return"string"==typeof t||isSymbol(t)?t:Object.is(t?.valueOf(),-0)?"-0":`${t}`}function toPath(t){const e=/\\(\\)?/g,n=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),r=[];"."===t[0]&&r.push("");let o,i=0;for(;null!==(o=n.exec(t));){let t=o[0];const c=o[1],s=o[2],u=o[3];s?t=u.replace(e,"$1"):c&&(t=c);r.push(t);n.lastIndex===i?n.lastIndex++:i=n.lastIndex}return r}function get(t,e,n){let r;r=Array.isArray(e)?e:"string"==typeof e&&isDeepKey(e)&&null==t?.[e]?toPath(e):[e];if(0===r.length)return n;let o,i=t;for(o=0;o<r.length&&null!=i;o++){i=i[toKey(r[o])]}return null===i&&o===r.length?i:i??n}function property(t){return function(e){return get(e,t)}}function isArrayMatch(t,e){if(0===e.length)return!0;if(!Array.isArray(t))return!1;const n=new Set;for(let r=0;r<e.length;r++){const o=e[r],i=t.findIndex(((t,e)=>isMatch(t,o)&&!n.has(e)));if(-1===i)return!1;n.add(i)}return!0}function isMatch(t,e){if(e===t)return!0;switch(typeof e){case"object":{if(null==e)return!0;const n=Object.keys(e);if(null==t)return 0===n.length;if(Array.isArray(e))return isArrayMatch(t,e);if(e instanceof Map)return function isMapMatch(t,e){if(0===e.size)return!0;if(!(t instanceof Map))return!1;for(const[n,r]of e.entries())if(!isMatch(t.get(n),r))return!1;return!0}(t,e);if(e instanceof Set)return function isSetMatch(t,e){return 0===e.size||t instanceof Set&&isArrayMatch([...t],[...e])}(t,e);for(let r=0;r<n.length;r++){const o=n[r];if(!isPrimitive(t)&&!(o in t))return!1;if(void 0===e[o]&&void 0!==t[o])return!1;if(!isMatch(t[o],e[o]))return!1}return!0}case"function":return Object.keys(e).length>0&&isMatch(t,{...e});default:return!e}}function matches(t){t=cloneDeep$1(t);return e=>isMatch(e,t)}function cloneDeep(t){if("object"!=typeof t)return cloneDeep$1(t);switch(Object.prototype.toString.call(t)){case i:case o:case c:{const e=new t.constructor(t?.valueOf());copyProperties(e,t);return e}case s:{const e={};copyProperties(e,t);e.length=t.length;e[Symbol.iterator]=t[Symbol.iterator];return e}default:return cloneDeep$1(t)}}const N=/^(?:0|[1-9]\d*)$/;function isIndex(t){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<Number.MAX_SAFE_INTEGER;case"symbol":return!1;case"string":return N.test(t)}}function isArguments(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===getTag(t)}function has(t,e){let n;n=Array.isArray(e)?e:"string"==typeof e&&isDeepKey(e)&&null==t?.[e]?toPath(e):[e];if(0===n.length)return!1;let r=t;for(let t=0;t<n.length;t++){const e=n[t];if(null==r||!Object.prototype.hasOwnProperty.call(r,e)){if(!((Array.isArray(r)||isArguments(r))&&isIndex(e)&&e<r.length))return!1}r=r[e]}return!0}function matchesProperty(t,e){t=Array.isArray(t)?t:toKey(t);e=cloneDeep(e);return function(n){const r=get(n,t);return void 0===r?has(n,t):void 0===e?void 0===r:isMatch(r,e)}}function flatten(t,e=1){const n=[],r=Math.floor(e);if(!Array.isArray(t))return n;const recursive=(t,e)=>{for(const o of t)e<r&&(Array.isArray(o)||Boolean(o?.[Symbol.isConcatSpreadable])||null!==o&&"object"==typeof o&&"[object Arguments]"===Object.prototype.toString.call(o))?Array.isArray(o)?recursive(o,e+1):recursive(Array.from(o),e+1):n.push(o)};recursive(t,0);return n}function getPriority(t){return"symbol"==typeof t?1:null===t?2:void 0===t?3:t!=t?4:0}const compareValues=(t,e,n)=>{if(t!==e){if("string"==typeof t&&"string"==typeof e)return"desc"===n?e.localeCompare(t):t.localeCompare(e);const r=getPriority(t),o=getPriority(e);if(r===o&&0===r){if(t<e)return"desc"===n?1:-1;if(t>e)return"desc"===n?-1:1}return"desc"===n?o-r:r-o}return 0},T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/;function orderBy(t,e,n){if(null==t||"number"==typeof t)return[];"object"!=typeof t||Array.isArray(t)||(t=Object.values(t));Array.isArray(e)||(e=null==e?[null]:[e]);Array.isArray(n)||(n=null==n?[]:[n]);n=n.map((t=>String(t)));const getValueByNestedPath=(t,e)=>{let n=t;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n},r=e.map((t=>{Array.isArray(t)&&1===t.length&&(t=t[0]);return null==t||"function"==typeof t||Array.isArray(t)||function isKey(t,e){return!Array.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!isSymbol(t))||"string"==typeof t&&(z.test(t)||!T.test(t))||null!=e)}(t)?t:{key:t,path:toPath(t)}}));return t.map((t=>({original:t,criteria:r.map((e=>((t,e)=>null==e||null==t?e:"object"==typeof t&&"key"in t?Object.hasOwn(e,t.key)?e[t.key]:getValueByNestedPath(e,t.path):"function"==typeof t?t(e):Array.isArray(t)?getValueByNestedPath(e,t):"object"==typeof e?e[t]:e)(e,t)))}))).slice().sort(((t,e)=>{for(let o=0;o<r.length;o++){const r=compareValues(t.criteria[o],e.criteria[o],n[o]);if(0!==r)return r}return 0})).map((t=>t.original))}function identity(t){return t}function set(t,e,n){const r=Array.isArray(e)?e:"string"==typeof e?toPath(e):[e];let o=t;for(let t=0;t<r.length-1;t++){const e=r[t],n=r[t+1];null==o[e]&&(o[e]=isIndex(n)?[]:{});o=o[e]}o[r[r.length-1]]=n;return t}function bind(t,e,...n){const bound=function(...r){const o=[];let i=0;for(let t=0;t<n.length;t++){const e=n[t];e===bind.placeholder?o.push(r[i++]):o.push(e)}for(let t=i;t<r.length;t++)o.push(r[t]);return this instanceof bound?new t(...o):t.apply(e,o)};return bound}const L=Symbol("bind.placeholder");bind.placeholder=L;function bindKey(t,e,...n){const bound=function(...r){const o=[];let i=0;for(let t=0;t<n.length;t++){const e=n[t];e===bindKey.placeholder?o.push(r[i++]):o.push(e)}for(let t=i;t<r.length;t++)o.push(r[t]);return this instanceof bound?new t[e](...o):t[e].apply(t,o)};return bound}const C=Symbol("bindKey.placeholder");bindKey.placeholder=C;function isPlainObject(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];if(null==e)return!1;return!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function isTypedArray(t){return isTypedArray$1(t)}function mergeWith(t,...e){const n=e.slice(0,-1),r=e[e.length-1];let o=t;for(let e=0;e<n.length;e++){o=mergeWithDeep(t,n[e],r,new Map)}return o}function mergeWithDeep(t,e,n,r){if(null==e||"object"!=typeof e)return t;if(r.has(e))return clone(r.get(e));r.set(e,t);if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=Object.keys(e);for(let i=0;i<o.length;i++){const c=o[i];let s=e[c],u=t[c];isArguments(s)&&(s={...s});isArguments(u)&&(u={...u});"undefined"!=typeof Buffer&&Buffer.isBuffer(s)&&(s=cloneDeep(s));Array.isArray(s)&&(u="object"==typeof u?Array.from(u??[]):[]);const a=n(u,s,c,t,e,r);null!=a?t[c]=a:Array.isArray(s)||isObjectLike(u)&&isObjectLike(s)?t[c]=mergeWithDeep(u,s,n,r):null==u&&isPlainObject(s)?t[c]=mergeWithDeep({},s,n,r):null==u&&isTypedArray(s)?t[c]=cloneDeep(s):void 0!==u&&void 0===s||(t[c]=s)}return t}function isArrayLike(t){return null!=t&&"function"!=typeof t&&isLength(t.length)}function conformsTo(t,e){if(null==e)return!0;if(null==t)return 0===Object.keys(e).length;for(const n of Object.keys(e)){const r=e[n],o=t[n];if(void 0===o&&!(n in t)||!r(o))return!1}return!0}t.AbortError=AbortError;t.TimeoutError=TimeoutError;t.after=function after(t,e){if(!Number.isInteger(t)||t<0)throw new Error("n must be a non-negative integer.");let n=0;return(...r)=>{if(++n>=t)return e(...r)}};t.ary=function ary(t,e=t.length,n){n&&(e=t.length);(Number.isNaN(e)||e<0)&&(e=0);return ary$1(t,e)};t.at=at;t.attempt=function attempt(t,...e){try{return t(...e)}catch(t){return t instanceof Error?t:new Error(t)}};t.before=function before(t,e){if(!Number.isInteger(t)||t<0)throw new Error("n must be a non-negative integer.");let n=0;return(...r)=>{if(++n<t)return e(...r)}};t.bind=bind;t.bindKey=bindKey;t.camelCase=function camelCase(t){return function camelCase$1(t){const e=getWords(t);if(0===e.length)return"";const[n,...r]=e;return`${n.toLowerCase()}${r.map((t=>capitalize(t))).join("")}`}(function normalizeForCase(t){"object"==typeof t&&(t=t.toString());return t.replace(/['\u2019]/g,"")}(t))};t.capitalize=capitalize;t.castArray=function castArray(t){return 0===arguments.length?[]:Array.isArray(t)?t:[t]};t.chunk=function chunk(t,e=1){return 0===(e=Math.max(Math.floor(e),0))?[]:function chunk$1(t,e){if(!Number.isInteger(e)||e<=0)throw new Error("Size must be an integer greater than zero.");const n=Math.ceil(t.length/e),r=Array(n);for(let o=0;o<n;o++){const n=o*e,i=n+e;r[o]=t.slice(n,i)}return r}(t,e)};t.clamp=function clamp(t,e,n){return null==n?Math.min(t,e):Math.min(Math.max(t,e),n)};t.clone=clone;t.cloneDeep=cloneDeep$1;t.compact=function compact(t){const e=[];for(const n of t)n&&e.push(n);return e};t.concat=function concat(...t){return flatten$1(t)};t.conforms=function conforms(t){t=cloneDeep$1(t);return function(e){return conformsTo(e,t)}};t.conformsTo=conformsTo;t.countBy=function countBy(t,e){const n={};for(const r of t){const t=e(r);n[t]=(n[t]??0)+1}return n};t.debounce=function debounce(t,e,{signal:n}={}){let r=null;const debounced=function(...o){null!==r&&clearTimeout(r);n?.aborted||(r=setTimeout((()=>{t(...o);r=null}),e))};debounced.cancel=function(){if(null!==r){clearTimeout(r);r=null}};n?.addEventListener("abort",(function(){debounced.cancel()}),{once:!0});return debounced};t.deburr=function deburr(t){t=t.normalize("NFD");let e="";for(let n=0;n<t.length;n++){const r=t[n];r>="̀"&&r<="ͯ"||r>="︠"&&r<="︣"||(e+=W.get(r)??r)}return e};t.delay=delay;t.difference=function difference(t,...e){return difference$1(t,flatten$1(e))};t.differenceBy=differenceBy;t.differenceWith=differenceWith;t.drop=function drop(t,e){e=Math.max(e,0);return t.slice(e)};t.dropRight=function dropRight(t,e){return 0===(e=Math.min(-e,0))?t.slice():t.slice(0,e)};t.dropRightWhile=function dropRightWhile(t,e){for(let n=t.length-1;n>=0;n--)if(!e(t[n]))return t.slice(0,n+1);return[]};t.dropWhile=function dropWhile(t,e){const n=t.findIndex((t=>!e(t)));return-1===n?[]:t.slice(n)};t.endsWith=function endsWith(t,e,n=t.length){return t.endsWith(e,n)};t.escape=function escape(t){return t.replace(/[&<>"']/g,(t=>$[t]))};t.escapeRegExp=function escapeRegExp(t){return t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")};t.fill=function fill(t,e,n=0,r=t.length){(n=Math.floor(n))||(n=0);(r=Math.floor(r))||(r=0);return function fill$1(t,e,n=0,r=t.length){const o=t.length,i=Math.max(n>=0?n:o+n,0),c=Math.min(r>=0?r:o+r,o);for(let n=i;n<c;n++)t[n]=e;return t}(t,e,n,r)};t.find=function find(t,e){let n=t;Array.isArray(t)||(n=Object.values(t));switch(typeof e){case"function":if(!Array.isArray(t)){const n=Object.entries(t);for(let r=0;r<n.length;r++){const o=n[r],i=o[0],c=o[1];if(e(c,i,t))return c}return}return n.find(e);case"object":if(Array.isArray(e)&&2===e.length){const t=e[0],r=e[1];return n.find(matchesProperty(t,r))}return n.find(matches(e));case"string":return n.find(property(e))}};t.findIndex=function findIndex(t,e){switch(typeof e){case"function":return t.findIndex(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.findIndex(matchesProperty(n,r))}return t.findIndex(matches(e));case"string":return t.findIndex(property(e))}};t.findLastIndex=function findLastIndex(t,e,n=t.length-1){n=n<0?Math.max(t.length+n,0):Math.min(n,t.length-1);t=t.slice(0,n+1);switch(typeof e){case"function":return t.findLastIndex(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.findLastIndex(matchesProperty(n,r))}return t.findLastIndex(matches(e));case"string":return t.findLastIndex(property(e))}};t.first=head;t.flatMap=function flatMap(t,e,n=1){return flatten$1(t.map((t=>e(t))),n)};t.flatMapDeep=function flatMapDeep(t,e){return function flattenDeep$1(t){return flatten$1(t,1/0)}(t.map((t=>e(t))))};t.flatten=flatten;t.flattenDeep=function flattenDeep(t){return flatten(t,1/0)};t.flattenDepth=function flattenDepth(t,e=1){return flatten(t,e)};t.flattenObject=function flattenObject(t){return flattenObjectImpl(t)};t.forEachRight=function forEachRight(t,e){for(let n=t.length-1;n>=0;n--){e(t[n],n,t)}};t.fromPairs=function fromPairs(t){if(!(isArrayLike(t)||t instanceof Map))return{};const e={};for(const[n,r]of t)e[n]=r;return e};t.get=get;t.groupBy=function groupBy(t,e){const n={};for(const r of t){const t=e(r);null==n[t]&&(n[t]=[]);n[t].push(r)}return n};t.has=has;t.head=head;t.inRange=function inRange(t,e,n){if(null==n){n=e;e=0}if(e>=n)throw new Error("The maximum value must be greater than the minimum value.");return e<=t&&t<n};t.indexOf=function indexOf(t,e,n){if(null==t)return-1;if(Number.isNaN(e)){(n=n??0)<0&&(n=Math.max(0,t.length+n));for(let e=n;e<t.length;e++)if(Number.isNaN(t[e]))return e;return-1}return t.indexOf(e,n)};t.initial=function initial(t){return t.slice(0,-1)};t.intersection=intersection;t.intersectionBy=intersectionBy;t.intersectionWith=intersectionWith;t.invert=function invert(t){const e={},n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];e[t[o]]=o}return e};t.isArguments=isArguments;t.isArray=function isArray(t){return Array.isArray(t)};t.isArrayLike=isArrayLike;t.isBoolean=function isBoolean(t){return!0===t||!1===t||"object"==typeof t&&null!=t&&"[object Boolean]"===getTag(t)};t.isEqual=function isEqual(t,e){if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return areObjectsEqual(t,e)}return areObjectsEqual(t,e)};t.isFunction=function isFunction(t){return"function"==typeof t};t.isLength=isLength;t.isMatch=isMatch;t.isNil=isNil;t.isNotNil=function isNotNil(t){return null!=t};t.isNull=function isNull(t){return null===t};t.isObject=function isObject(t){return null!==t&&("object"==typeof t||"function"==typeof t)};t.isObjectLike=isObjectLike;t.isPlainObject=isPlainObject;t.isPrimitive=isPrimitive;t.isRegExp=function isRegExp(t){return"[object RegExp]"===getTag(t)};t.isString=function isString(t){return"string"==typeof t||"object"==typeof t&&null!=t&&"[object String]"===getTag(t)};t.isSubset=function isSubset(t,e){return 0===difference$1(e,t).length};t.isSymbol=isSymbol;t.isTypedArray=isTypedArray;t.isUndefined=function isUndefined(t){return void 0===t};t.isWeakMap=function isWeakMap(t){return function isWeakMap$1(t){return t instanceof WeakMap}(t)};t.isWeakSet=function isWeakSet(t){return function isWeakSet$1(t){return t instanceof WeakSet}(t)};t.join=function join(t,e=","){return t.join(e)};t.kebabCase=function kebabCase(t){return getWords(t).map((t=>t.toLowerCase())).join("-")};t.keyBy=function keyBy(t,e){const n={};for(const r of t){n[e(r)]=r}return n};t.last=function last(t){return t[t.length-1]};t.lowerCase=function lowerCase(t){return getWords(t).map((t=>t.toLowerCase())).join(" ")};t.lowerFirst=function lowerFirst(t){return t.substring(0,1).toLowerCase()+t.substring(1)};t.mapKeys=function mapKeys(t,e){switch(typeof(e=e??identity)){case"string":case"symbol":case"number":case"object":return mapKeys$1(t,property(e));case"function":return mapKeys$1(t,e)}};t.mapValues=function mapValues(t,e){switch(typeof(e=e??identity)){case"string":case"symbol":case"number":case"object":return mapValues$1(t,property(e));case"function":return mapValues$1(t,e)}};t.matches=matches;t.matchesProperty=matchesProperty;t.max=function max(t=[]){let e,n=t[0];for(const r of t)if(null==e||r>e){e=r;n=r}return n};t.maxBy=function maxBy(t,e){let n=t[0],r=-1/0;for(const o of t){const t=e(o);if(t>r){r=t;n=o}}return n};t.mean=mean;t.meanBy=function meanBy(t,e){return mean(t.map((t=>e(t))))};t.memoize=function memoize(t,e={}){const{cache:n=new Map,getCacheKey:r}=e,memoizedFn=function(e){const o=r?r(e):e;if(n.has(o))return n.get(o);const i=t.call(this,e);n.set(o,i);return i};memoizedFn.cache=n;return memoizedFn};t.merge=function merge(t,...e){return mergeWith(t,...e,noop)};t.mergeWith=mergeWith;t.min=function min(t=[]){let e,n=t[0];for(const r of t)if(null==e||r<e){e=r;n=r}return n};t.minBy=function minBy(t,e){let n=t[0],r=1/0;for(const o of t){const t=e(o);if(t<r){r=t;n=o}}return n};t.negate=function negate(t){return(...e)=>!t(...e)};t.noop=noop;t.omit=function omit(t,e){const n={...t};for(const t of e)delete n[t];return n};t.omitBy=function omitBy(t,e){const n={};for(const[r,o]of Object.entries(t))e(o,r)||(n[r]=o);return n};t.once=function once(t){let e,n=!1;return function(){if(n)return e;const r=t();n=!0;e=r;return r}};t.orderBy=orderBy;t.pad=function pad(t,e,n=" "){return t.padStart(Math.floor((e-t.length)/2)+t.length,n).padEnd(e,n)};t.padEnd=function padEnd(t,e=0,n=" "){return t.padEnd(e,n)};t.padStart=function padStart(t,e=0,n=" "){return t.padStart(e,n)};t.parseInt=function parseInt(t,e=0,n){n&&(e=0);return Number.parseInt(t,e)};t.partial=partial;t.partialRight=partialRight;t.partition=function partition(t,e){const n=[],r=[];for(const o of t)e(o)?n.push(o):r.push(o);return[n,r]};t.pascalCase=function pascalCase(t){return getWords(t).map((t=>capitalize(t))).join("")};t.pick=function pick(t,e){const n={};for(const r of e)n[r]=t[r];return n};t.pickBy=function pickBy(t,e){const n={};for(const[r,o]of Object.entries(t))e(o,r)&&(n[r]=o);return n};t.property=property;t.pullAt=function pullAt(t,e){const n=at(t,e),r=new Set(e.slice().sort(((t,e)=>e-t)));for(const e of r)t.splice(e,1);return n};t.random=random;t.randomInt=randomInt;t.range=function range(t,e,n){if(null==e){e=t;t=0}null==n&&(n=1);if(!Number.isInteger(n)||0===n)throw new Error("The step value must be a non-zero integer.");const r=Math.max(Math.ceil((e-t)/n),0),o=new Array(r);for(let e=0;e<r;e++)o[e]=t+e*n;return o};t.rearg=function rearg(t,...e){const n=flatten(e);return function(...e){const r=n.map((t=>e[t])).slice(0,e.length);for(let t=r.length;t<e.length;t++)r.push(e[t]);return t.apply(this,r)}};t.repeat=function repeat(t,e){return t.repeat(e)};t.rest=function rest(t,e=t.length-1){e=Number.parseInt(e,10);(Number.isNaN(e)||e<0)&&(e=t.length-1);return function rest$1(t,e=t.length-1){return function(...n){const r=n.slice(e),o=n.slice(0,e);for(;o.length<e;)o.push(void 0);return t.apply(this,[...o,r])}}(t,e)};t.round=function round(t,e=0){if(!Number.isInteger(e))throw new Error("Precision must be an integer.");const n=Math.pow(10,e);return Math.round(t*n)/n};t.sample=function sample(t){return t[Math.floor(Math.random()*t.length)]};t.sampleSize=function sampleSize(t,e){if(e>t.length)throw new Error("Size must be less than or equal to the length of array.");const n=new Array(e),r=new Set;for(let o=t.length-e,i=0;o<t.length;o++,i++){let e=randomInt(0,o+1);r.has(e)&&(e=o);r.add(e);n[i]=t[e]}return n};t.set=set;t.shuffle=function shuffle(t){const e=t.slice();for(let t=e.length-1;t>=1;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e};t.size=function size(t){return isNil(t)?0:t instanceof Map||t instanceof Set?t.size:Object.keys(t).length};t.snakeCase=function snakeCase(t){return getWords(t).map((t=>t.toLowerCase())).join("_")};t.some=function some(t,e,n){null!=n&&(e=void 0);e||(e=identity);if(!Array.isArray(t))return!1;switch(typeof e){case"function":return t.some(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.some(matchesProperty(n,r))}return t.some(matches(e));case"string":return t.some(property(e))}};t.sortBy=function sortBy(t,e){return orderBy(t,e,["asc"])};t.spread=function spread(t,e=0){e=Number.parseInt(e,10);(Number.isNaN(e)||e<0)&&(e=0);return function(...n){const r=n[e],o=n.slice(0,e);r&&o.push(...r);return t.apply(this,o)}};t.startCase=function startCase(t){const e=getWords(t.trim());let n="";for(const t of e){n&&(n+=" ");t===t.toUpperCase()?n+=t:n+=t[0].toUpperCase()+t.slice(1).toLowerCase()}return n};t.startsWith=function startsWith(t,e,n=0){return t.startsWith(e,n)};t.sum=sum;t.sumBy=function sumBy(t,e){return sum(t.map((t=>e(t))))};t.tail=function tail(t){return t.slice(1)};t.take=function take(t,e){return t.slice(0,e)};t.takeRight=function takeRight(t,e=1){return e<=0?[]:t.slice(-e)};t.takeRightWhile=function takeRightWhile(t,e){for(let n=t.length-1;n>=0;n--)if(!e(t[n]))return t.slice(n+1);return t.slice()};t.takeWhile=function takeWhile(t,e){const n=[];for(const r of t){if(!e(r))break;n.push(r)}return n};t.throttle=function throttle(t,e){let n;return function(...r){const o=Date.now();if(null==n||o-n>=e){n=o;t(...r)}}};t.timeout=timeout;t.toFilled=function toFilled(t,e,n=0,r=t.length){const o=t.length,i=Math.max(n>=0?n:o+n,0),c=Math.min(r>=0?r:o+r,o),s=t.slice();for(let t=i;t<c;t++)s[t]=e;return s};t.toMerged=function toMerged(t,e){return merge$1(cloneDeep$1(t),e)};t.unary=function unary(t){return ary$1(t,1)};t.unescape=function unescape(t){return t.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,(t=>I[t]||"'"))};t.union=union;t.unionBy=unionBy;t.unionWith=unionWith;t.uniq=uniq;t.uniqBy=function uniqBy(t,e){const n=new Map;for(const r of t){const t=e(r);n.has(t)||n.set(t,r)}return Array.from(n.values())};t.uniqWith=uniqWith;t.unzip=function unzip(t){let e=0;for(let n=0;n<t.length;n++)t[n].length>e&&(e=t[n].length);const n=new Array(e);for(let r=0;r<e;r++){n[r]=new Array(t.length);for(let e=0;e<t.length;e++)n[r][e]=t[e][r]}return n};t.unzipWith=function unzipWith(t,e){const n=Math.max(...t.map((t=>t.length))),r=new Array(n);for(let o=0;o<n;o++){const n=new Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e][o];r[o]=e(...n)}return r};t.upperFirst=function upperFirst(t){return t.substring(0,1).toUpperCase()+t.substring(1)};t.withTimeout=async function withTimeout(t,e){return Promise.race([t(),timeout(e)])};t.without=function without(t,...e){const n=new Set(e);return t.filter((t=>!n.has(t)))};t.xor=function xor(t,e){return difference$1(union(t,e),intersection(t,e))};t.xorBy=function xorBy(t,e,n){return differenceBy(unionBy(t,e,n),intersectionBy(t,e,n),n)};t.xorWith=function xorWith(t,e,n){return differenceWith(unionWith(t,e,n),intersectionWith(t,e,n),n)};t.zip=zip;t.zipObject=function zipObject(t,e){const n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n};t.zipObjectDeep=function zipObjectDeep(t,e){const n={},r=zip(t,e);for(let t=0;t<r.length;t++){const[e,o]=r[t];null!=e&&set(n,e,o)}return n};t.zipWith=function zipWith(t,...e){const n=[t,...e.slice(0,-1)],r=e[e.length-1],o=[],i=Math.max(...n.map((t=>t.length)));for(let t=0;t<i;t++){const e=n.map((e=>e[t]));o.push(r(...e))}return o};Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});return t}({});
var _=function(t){"use strict";function at(t,e){const n=[];for(let r=0;r<e.length;r++){const o=e[r];n.push(t.at(o))}return n}function difference$1(t,e){const n=new Set(e);return t.filter((t=>!n.has(t)))}function differenceBy(t,e,n){const r=new Set(e.map((t=>n(t))));return t.filter((t=>!r.has(n(t))))}function differenceWith(t,e,n){return t.filter((t=>e.every((e=>!n(t,e)))))}function flatten$1(t,e=1){const n=[],r=Math.floor(e),recursive=(t,e)=>{for(const o of t)Array.isArray(o)&&e<r?recursive(o,e+1):n.push(o)};recursive(t,0);return n}function head(t){return t[0]}function intersection(t,e){const n=new Set(e);return t.filter((t=>n.has(t)))}function intersectionBy(t,e,n){const r=new Set(e.map(n));return t.filter((t=>r.has(n(t))))}function intersectionWith(t,e,n){return t.filter((t=>e.some((e=>n(t,e)))))}function random(t,e){if(null==e){e=t;t=0}if(t>=e)throw new Error("Invalid input: The maximum value must be greater than the minimum value.");return Math.random()*(e-t)+t}function randomInt(t,e){return Math.floor(random(t,e))}function uniq(t){return Array.from(new Set(t))}function union(t,e){return uniq(t.concat(e))}function unionBy(t,e,n){const r=new Map;for(const o of[...t,...e]){const t=n(o);r.has(t)||r.set(t,o)}return Array.from(r.values())}function uniqWith(t,e){const n=[];for(const r of t){n.every((t=>!e(t,r)))&&n.push(r)}return n}function unionWith(t,e,n){return uniqWith(t.concat(e),n)}function zip(...t){const e=[],n=Math.max(...t.map((t=>t.length)));for(let r=0;r<n;r++){const n=[];for(const e of t)n.push(e[r]);e.push(n)}return e}class AbortError extends Error{constructor(t="The operation was aborted"){super(t);this.name="AbortError"}}class TimeoutError extends Error{constructor(t="The operation was timed out"){super(t);this.name="TimeoutError"}}function noop(){}function ary$1(t,e){return function(...n){return t.apply(this,n.slice(0,e))}}function partial(t,...e){return function(...n){const r=[];let o=0;for(let t=0;t<e.length;t++){const i=e[t];i===partial.placeholder?r.push(n[o++]):r.push(i)}for(let t=o;t<n.length;t++)r.push(n[t]);return t.apply(this,r)}}const e=Symbol("partial.placeholder");partial.placeholder=e;function partialRight(t,...e){return function(...r){const o=e.filter((t=>t===n)).length,i=Math.max(r.length-o,0),c=[];let u=0;for(let t=0;t<i;t++)c.push(r[u++]);for(let t=0;t<e.length;t++){const n=e[t];n===partialRight.placeholder?c.push(r[u++]):c.push(n)}return t.apply(this,c)}}const n=Symbol("partialRight.placeholder");partialRight.placeholder=n;function makeCurry(t,e,n){if(n.length===e)return t(...n);return function(r){return makeCurry(t,e,[...n,r])}}function sum(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n];return e}function mean(t){return sum(t)/t.length}function isTypedArray$1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function isPrimitive(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function clone(t){if(isPrimitive(t))return t;if(Array.isArray(t)||isTypedArray$1(t)||t instanceof ArrayBuffer||t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),n=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new n(t);if(t instanceof RegExp){const e=new n(t);e.lastIndex=t.lastIndex;return e}if(t instanceof DataView)return new n(t.buffer.slice(0));if(t instanceof Error){const e=new n(t.message);e.stack=t.stack;e.name=t.name;e.cause=t.cause;return e}if("undefined"!=typeof File&&t instanceof File){return new n([t],t.name,{type:t.type,lastModified:t.lastModified})}if("object"==typeof t){const n=Object.create(e);return Object.assign(n,t)}return t}function isPlainObject$1(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==t.toString())return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function flattenObjectImpl(t,e=""){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i],u=e?`${e}.${i}`:i;if(isPlainObject$1(c)&&Object.keys(c).length>0)Object.assign(n,flattenObjectImpl(c,u));else if(Array.isArray(c))for(let t=0;t<c.length;t++)n[`${u}.${t}`]=c[t];else n[u]=c}return n}function mapKeys$1(t,e){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i];n[e(c,i,t)]=c}return n}function mapValues$1(t,e){const n={},r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],c=t[i];n[i]=e(c,i,t)}return n}function cloneDeep$1(t){return cloneDeepImpl(t)}function cloneDeepImpl(t,e=new Map){if(isPrimitive(t))return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const n=new Array(t.length);e.set(t,n);for(let r=0;r<t.length;r++)n[r]=cloneDeepImpl(t[r],e);Object.prototype.hasOwnProperty.call(t,"index")&&(n.index=t.index);Object.prototype.hasOwnProperty.call(t,"input")&&(n.input=t.input);return n}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);e.lastIndex=t.lastIndex;return e}if(t instanceof Map){const n=new Map;e.set(t,n);for(const[r,o]of t.entries())n.set(r,cloneDeepImpl(o,e));return n}if(t instanceof Set){const n=new Set;e.set(t,n);for(const r of t.values())n.add(cloneDeepImpl(r,e));return n}if("undefined"!=typeof Buffer&&Buffer.isBuffer(t))return t.subarray();if(isTypedArray$1(t)){const n=new(Object.getPrototypeOf(t).constructor)(t.length);e.set(t,n);for(let r=0;r<t.length;r++)n[r]=cloneDeepImpl(t[r],e);return n}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const n=new DataView(t.buffer.slice(0));e.set(t,n);copyProperties(n,t,e);return n}if("undefined"!=typeof File&&t instanceof File){const n=new File([t],t.name,{type:t.type});e.set(t,n);copyProperties(n,t,e);return n}if(t instanceof Blob){const n=new Blob([t],{type:t.type});e.set(t,n);copyProperties(n,t,e);return n}if(t instanceof Error){const n=new t.constructor;e.set(t,n);n.message=t.message;n.name=t.name;n.stack=t.stack;n.cause=t.cause;copyProperties(n,t,e);return n}if("object"==typeof t&&null!==t){const n={};e.set(t,n);copyProperties(n,t,e);return n}return t}function copyProperties(t,e,n){const r=Object.keys(e);for(let o=0;o<r.length;o++){const i=r[o],c=Object.getOwnPropertyDescriptor(e,i);(c?.writable||c?.set)&&(t[i]=cloneDeepImpl(e[i],n))}}function isObjectLike(t){return"object"==typeof t&&null!==t}function merge$1(t,e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o],c=t[o];Array.isArray(i)?t[o]=merge$1(c??[],i):isObjectLike(c)&&isObjectLike(i)?t[o]=merge$1(c??{},i):void 0!==c&&void 0===i||(t[o]=i)}return t}const r="[object RegExp]",o="[object String]",i="[object Number]",c="[object Boolean]",u="[object Arguments]",s="[object Symbol]",a="[object Date]",f="[object Map]",l="[object Set]",p="[object Array]",y="[object Function]",h="[object ArrayBuffer]",g="[object Object]",m="[object Error]",b="[object DataView]",d="[object Uint8Array]",j="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]",w="[object BigUint64Array]",S="[object Int8Array]",$="[object Int16Array]",M="[object Int32Array]",k="[object BigInt64Array]",E="[object Float32Array]",B="[object Float64Array]";function getSymbols(t){return Object.getOwnPropertySymbols(t).filter((e=>Object.prototype.propertyIsEnumerable.call(t,e)))}function getTag(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function areObjectsEqual(t,e,n){if(Object.is(t,e))return!0;let P=getTag(t),v=getTag(e);P===u&&(P=g);v===u&&(v=g);if(P!==v)return!1;switch(P){case o:return t.toString()===e.toString();case i:{const n=t.valueOf(),r=e.valueOf();return n===r||Number.isNaN(n)&&Number.isNaN(r)}case c:case a:case s:return Object.is(t.valueOf(),e.valueOf());case r:return t.source===e.source&&t.flags===e.flags;case y:return t===e}const x=(n=n??new Map).get(t),W=n.get(e);if(null!=x&&null!=W)return x===e;n.set(t,e);n.set(e,t);try{switch(P){case f:if(t.size!==e.size)return!1;for(const[r,o]of t.entries())if(!e.has(r)||!areObjectsEqual(o,e.get(r),n))return!1;return!0;case l:{if(t.size!==e.size)return!1;const r=Array.from(t.values()),o=Array.from(e.values());for(let t=0;t<r.length;t++){const e=r[t],i=o.findIndex((t=>areObjectsEqual(e,t,n)));if(-1===i)return!1;o.splice(i,1)}return!0}case p:case d:case j:case A:case O:case w:case S:case $:case M:case k:case E:case B:if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)!==Buffer.isBuffer(e))return!1;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!areObjectsEqual(t[r],e[r],n))return!1;return!0;case h:return t.byteLength===e.byteLength&&areObjectsEqual(new Uint8Array(t),new Uint8Array(e),n);case b:return t.byteLength===e.byteLength&&t.byteOffset===e.byteOffset&&areObjectsEqual(t.buffer,e.buffer,n);case m:return t.name===e.name&&t.message===e.message;case g:{if(!(areObjectsEqual(t.constructor,e.constructor,n)||isPlainObject$1(t)&&isPlainObject$1(e)))return!1;const r=[...Object.keys(t),...getSymbols(t)],o=[...Object.keys(e),...getSymbols(e)];if(r.length!==o.length)return!1;for(let o=0;o<r.length;o++){const i=r[o],c=t[i];if(!Object.prototype.hasOwnProperty.call(e,i))return!1;if(!areObjectsEqual(c,e[i],n))return!1}return!0}default:return!1}}finally{n.delete(t);n.delete(e)}}function isNil$1(t){return null==t}function isLength(t){return Number.isSafeInteger(t)&&t>=0}function delay(t,{signal:e}={}){return new Promise(((n,r)=>{const abortError=()=>{r(new AbortError)},abortHandler=()=>{clearTimeout(o);abortError()};if(e?.aborted)return abortError();const o=setTimeout((()=>{e?.removeEventListener("abort",abortHandler);n()}),t);e?.addEventListener("abort",abortHandler,{once:!0})}))}async function timeout(t){await delay(t);throw new TimeoutError}function capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const P=/[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g;function getWords(t){return Array.from(t.match(P)??[])}function trimStart$1(t,e){if(void 0===e)return t.trimStart();let n=0;switch(typeof e){case"string":for(;n<t.length&&t[n]===e;)n++;break;case"object":for(;n<t.length&&e.includes(t[n]);)n++}return t.substring(n)}function trimEnd$1(t,e){if(void 0===e)return t.trimEnd();let n=t.length;switch(typeof e){case"string":for(;n>0&&t[n-1]===e;)n--;break;case"object":for(;n>0&&e.includes(t[n-1]);)n--}return t.substring(0,n)}function trim$1(t,e){return void 0===e?t.trim():trimStart$1(trimEnd$1(t,e),e)}const v=new Map(Object.entries({Æ:"Ae",Ð:"D",Ø:"O",Þ:"Th",ß:"ss",æ:"ae",ð:"d",ø:"o",þ:"th",Đ:"D",đ:"d",Ħ:"H",ħ:"h",ı:"i",IJ:"IJ",ij:"ij",ĸ:"k",Ŀ:"L",ŀ:"l",Ł:"L",ł:"l",ʼn:"'n",Ŋ:"N",ŋ:"n",Œ:"Oe",œ:"oe",Ŧ:"T",ŧ:"t",ſ:"s"}));const x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};const W={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function isDeepKey(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function toKey(t){return Object.is(t,-0)?"-0":t.toString()}const I=/^[\w.]+$/g,N=/\\(\\)?/g,D=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g");function toPath(t){if(I.test(t))return t.split(".");const e=[];"."===t[0]&&e.push("");const n=t.matchAll(D);for(const t of n){let n=t[0];const r=t[1],o=t[2],i=t[3];o?n=i.replace(N,"$1"):r&&(n=r);e.push(n)}return e}function get(t,e,n){if(null==t)return n;switch(typeof e){case"string":{const r=t[e];return void 0===r?isDeepKey(e)?get(t,toPath(e),n):n:r}case"number":case"symbol":{"number"==typeof e&&(e=toKey(e));const r=t[e];return void 0===r?n:r}default:{if(Array.isArray(e))return function getWithPath(t,e,n){if(0===e.length)return n;let r=t;for(let t=0;t<e.length;t++){if(null==r)return n;r=r[e[t]]}if(void 0===r)return n;return r}(t,e,n);const r=t[e=Object.is(e?.valueOf(),-0)?"-0":String(e)];return void 0===r?n:r}}}function property(t){return function(e){return get(e,t)}}function isMatch(t,e){if(e===t)return!0;switch(typeof e){case"object":{if(null==e)return!0;const n=Object.keys(e);if(null==t)return 0===n.length;if(Array.isArray(e))return isArrayMatch(t,e);if(e instanceof Map)return function isMapMatch(t,e){if(0===e.size)return!0;if(!(t instanceof Map))return!1;for(const[n,r]of e.entries())if(!isMatch(t.get(n),r))return!1;return!0}(t,e);if(e instanceof Set)return function isSetMatch(t,e){if(0===e.size)return!0;if(!(t instanceof Set))return!1;return isArrayMatch([...t],[...e])}(t,e);for(let r=0;r<n.length;r++){const o=n[r];if(!isPrimitive(t)&&!(o in t))return!1;if(void 0===e[o]&&void 0!==t[o])return!1;if(!isMatch(t[o],e[o]))return!1}return!0}case"function":return Object.keys(e).length>0&&isMatch(t,{...e});default:return!e}}function isArrayMatch(t,e){if(0===e.length)return!0;if(!Array.isArray(t))return!1;const n=new Set;for(let r=0;r<e.length;r++){const o=e[r],i=t.findIndex(((t,e)=>isMatch(t,o)&&!n.has(e)));if(-1===i)return!1;n.add(i)}return!0}function matches(t){t=cloneDeep$1(t);return e=>isMatch(e,t)}function cloneDeep(t){if("object"!=typeof t)return cloneDeep$1(t);switch(Object.prototype.toString.call(t)){case i:case o:case c:{const e=new t.constructor(t?.valueOf());copyProperties(e,t);return e}case u:{const e={};copyProperties(e,t);e.length=t.length;e[Symbol.iterator]=t[Symbol.iterator];return e}default:return cloneDeep$1(t)}}const z=/^(?:0|[1-9]\d*)$/;function isIndex(t){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<Number.MAX_SAFE_INTEGER;case"symbol":return!1;case"string":return z.test(t)}}function isArguments(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===getTag(t)}function has(t,e){let n;n=Array.isArray(e)?e:"string"==typeof e&&isDeepKey(e)&&null==t?.[e]?toPath(e):[e];if(0===n.length)return!1;let r=t;for(let t=0;t<n.length;t++){const e=n[t];if(null==r||!Object.prototype.hasOwnProperty.call(r,e)){if(!((Array.isArray(r)||isArguments(r))&&isIndex(e)&&e<r.length))return!1}r=r[e]}return!0}function matchesProperty(t,e){switch(typeof t){case"object":Object.is(t?.valueOf(),-0)&&(t="-0");break;case"number":t=toKey(t)}e=cloneDeep(e);return function(n){const r=get(n,t);return void 0===r?has(n,t):void 0===e?void 0===r:isMatch(r,e)}}function flatten(t,e=1){const n=[],r=Math.floor(e);if(!Array.isArray(t))return n;const recursive=(t,e)=>{for(const o of t)e<r&&(Array.isArray(o)||Boolean(o?.[Symbol.isConcatSpreadable])||null!==o&&"object"==typeof o&&"[object Arguments]"===Object.prototype.toString.call(o))?Array.isArray(o)?recursive(o,e+1):recursive(Array.from(o),e+1):n.push(o)};recursive(t,0);return n}function getPriority(t){return"symbol"==typeof t?1:null===t?2:void 0===t?3:t!=t?4:0}const compareValues=(t,e,n)=>{if(t!==e){if("string"==typeof t&&"string"==typeof e)return"desc"===n?e.localeCompare(t):t.localeCompare(e);const r=getPriority(t),o=getPriority(e);if(r===o&&0===r){if(t<e)return"desc"===n?1:-1;if(t>e)return"desc"===n?-1:1}return"desc"===n?o-r:r-o}return 0};function isSymbol(t){return"symbol"==typeof t||null!=t&&t instanceof Symbol}const C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/;function orderBy(t,e,n){if(null==t||"number"==typeof t)return[];"object"!=typeof t||Array.isArray(t)||(t=Object.values(t));Array.isArray(e)||(e=null==e?[null]:[e]);Array.isArray(n)||(n=null==n?[]:[n]);n=n.map((t=>String(t)));const getValueByNestedPath=(t,e)=>{let n=t;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n},r=e.map((t=>{Array.isArray(t)&&1===t.length&&(t=t[0]);return null==t||"function"==typeof t||Array.isArray(t)||function isKey(t,e){return!Array.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!isSymbol(t))||"string"==typeof t&&(T.test(t)||!C.test(t))||null!=e)}(t)?t:{key:t,path:toPath(t)}}));return t.map((t=>({original:t,criteria:r.map((e=>((t,e)=>null==e||null==t?e:"object"==typeof t&&"key"in t?Object.hasOwn(e,t.key)?e[t.key]:getValueByNestedPath(e,t.path):"function"==typeof t?t(e):Array.isArray(t)?getValueByNestedPath(e,t):"object"==typeof e?e[t]:e)(e,t)))}))).slice().sort(((t,e)=>{for(let o=0;o<r.length;o++){const r=compareValues(t.criteria[o],e.criteria[o],n[o]);if(0!==r)return r}return 0})).map((t=>t.original))}function identity(t){return t}function set(t,e,n){const r=Array.isArray(e)?e:"string"==typeof e?toPath(e):[e];let o=t;for(let t=0;t<r.length-1;t++){const e=r[t],n=r[t+1];null==o[e]&&(o[e]=isIndex(n)?[]:{});o=o[e]}o[r[r.length-1]]=n;return t}function bind(t,e,...n){const bound=function(...r){const o=[];let i=0;for(let t=0;t<n.length;t++){const e=n[t];e===bind.placeholder?o.push(r[i++]):o.push(e)}for(let t=i;t<r.length;t++)o.push(r[t]);return this instanceof bound?new t(...o):t.apply(e,o)};return bound}const L=Symbol("bind.placeholder");bind.placeholder=L;function bindKey(t,e,...n){const bound=function(...r){const o=[];let i=0;for(let t=0;t<n.length;t++){const e=n[t];e===bindKey.placeholder?o.push(r[i++]):o.push(e)}for(let t=i;t<r.length;t++)o.push(r[t]);return this instanceof bound?new t[e](...o):t[e].apply(t,o)};return bound}const R=Symbol("bindKey.placeholder");bindKey.placeholder=R;function unset(t,e){if(null==t)return!0;switch(typeof e){case"symbol":case"number":case"object":if(Array.isArray(e))return unsetWithPath(t,e);"number"==typeof e?e=toKey(e):"object"==typeof e&&(e=Object.is(e?.valueOf(),-0)?"-0":String(e));if(void 0===t?.[e])return!0;try{delete t[e];return!0}catch{return!1}case"string":if(void 0===t?.[e]&&isDeepKey(e))return unsetWithPath(t,toPath(e));try{delete t[e];return!0}catch{return!1}}}function unsetWithPath(t,e){const n=get(t,e.slice(0,-1),t),r=e[e.length-1];if(void 0===n?.[r])return!0;try{delete n[r];return!0}catch{return!1}}function isPlainObject(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];if(null==e)return!1;return!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function isTypedArray(t){return isTypedArray$1(t)}function mergeWith(t,...e){const n=e.slice(0,-1),r=e[e.length-1];let o=t;for(let e=0;e<n.length;e++){o=mergeWithDeep(t,n[e],r,new Map)}return o}function mergeWithDeep(t,e,n,r){if(null==e||"object"!=typeof e)return t;if(r.has(e))return clone(r.get(e));r.set(e,t);if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=[...Object.keys(e),...getSymbols(e)];for(let i=0;i<o.length;i++){const c=o[i];let u=e[c],s=t[c];isArguments(u)&&(u={...u});isArguments(s)&&(s={...s});"undefined"!=typeof Buffer&&Buffer.isBuffer(u)&&(u=cloneDeep(u));if(Array.isArray(u))if("object"==typeof s){const t=[],e=Reflect.ownKeys(s);for(let n=0;n<e.length;n++){const r=e[n];t[r]=s[r]}s=t}else s=[];const a=n(s,u,c,t,e,r);null!=a?t[c]=a:Array.isArray(u)||isObjectLike(s)&&isObjectLike(u)?t[c]=mergeWithDeep(s,u,n,r):null==s&&isPlainObject(u)?t[c]=mergeWithDeep({},u,n,r):null==s&&isTypedArray(u)?t[c]=cloneDeep(u):void 0!==s&&void 0===u||(t[c]=u)}return t}function isArrayLike(t){return null!=t&&"function"!=typeof t&&isLength(t.length)}function conformsTo(t,e){if(null==e)return!0;if(null==t)return 0===Object.keys(e).length;for(const n of Object.keys(e)){const r=e[n],o=t[n];if(void 0===o&&!(n in t)||!r(o))return!1}return!0}function toString(t){if(null==t)return"";if(Array.isArray(t))return t.map(toString).join(",");const e=String(t);return"0"===e&&Object.is(Number(t),-0)?"-0":e}function normalizeForCase(t){"string"!=typeof t&&(t=toString(t));return t.replace(/['\u2019]/g,"")}function decimalAdjust(t,e,n=0){e=Number(e);Object.is(e,-0)&&(e="-0");if(n=Math.min(Number.parseInt(n,10),292)){const[r,o=0]=e.toString().split("e");let i=Math[t](Number(`${r}e${Number(o)+n}`));Object.is(i,-0)&&(i="-0");const[c,u=0]=i.toString().split("e");return Number(`${c}e${Number(u)-n}`)}return Math[t](Number(e))}t.AbortError=AbortError;t.TimeoutError=TimeoutError;t.after=function after(t,e){if(!Number.isInteger(t)||t<0)throw new Error("n must be a non-negative integer.");let n=0;return(...r)=>{if(++n>=t)return e(...r)}};t.ary=function ary(t,e=t.length,n){n&&(e=t.length);(Number.isNaN(e)||e<0)&&(e=0);return ary$1(t,e)};t.at=at;t.attempt=function attempt(t,...e){try{return t(...e)}catch(t){return t instanceof Error?t:new Error(t)}};t.before=function before(t,e){if(!Number.isInteger(t)||t<0)throw new Error("n must be a non-negative integer.");let n=0;return(...r)=>{if(++n<t)return e(...r)}};t.bind=bind;t.bindKey=bindKey;t.camelCase=function camelCase(t){return function camelCase$1(t){const e=getWords(t);if(0===e.length)return"";const[n,...r]=e;return`${n.toLowerCase()}${r.map((t=>capitalize(t))).join("")}`}(normalizeForCase(t))};t.capitalize=capitalize;t.castArray=function castArray(t){return 0===arguments.length?[]:Array.isArray(t)?t:[t]};t.ceil=function ceil(t,e=0){return decimalAdjust("ceil",t,e)};t.chunk=function chunk(t,e=1){return 0===(e=Math.max(Math.floor(e),0))?[]:function chunk$1(t,e){if(!Number.isInteger(e)||e<=0)throw new Error("Size must be an integer greater than zero.");const n=Math.ceil(t.length/e),r=Array(n);for(let o=0;o<n;o++){const n=o*e,i=n+e;r[o]=t.slice(n,i)}return r}(t,e)};t.clamp=function clamp(t,e,n){return null==n?Math.min(t,e):Math.min(Math.max(t,e),n)};t.clone=clone;t.cloneDeep=cloneDeep$1;t.compact=function compact(t){const e=[];for(const n of t)n&&e.push(n);return e};t.concat=function concat(...t){return flatten$1(t)};t.conforms=function conforms(t){t=cloneDeep$1(t);return function(e){return conformsTo(e,t)}};t.conformsTo=conformsTo;t.countBy=function countBy(t,e){const n={};for(const r of t){const t=e(r);n[t]=(n[t]??0)+1}return n};t.curry=function curry(t){return 0===t.length||1===t.length?t:function(e){return makeCurry(t,t.length,[e])}};t.debounce=function debounce(t,e,{signal:n}={}){let r=null;const debounced=function(...o){null!==r&&clearTimeout(r);n?.aborted||(r=setTimeout((()=>{t(...o);r=null}),e))};debounced.cancel=function(){if(null!==r){clearTimeout(r);r=null}};n?.addEventListener("abort",(function(){debounced.cancel()}),{once:!0});return debounced};t.deburr=function deburr(t){t=t.normalize("NFD");let e="";for(let n=0;n<t.length;n++){const r=t[n];r>="̀"&&r<="ͯ"||r>="︠"&&r<="︣"||(e+=v.get(r)??r)}return e};t.delay=delay;t.difference=function difference(t,...e){return difference$1(t,flatten$1(e))};t.differenceBy=differenceBy;t.differenceWith=differenceWith;t.drop=function drop(t,e){e=Math.max(e,0);return t.slice(e)};t.dropRight=function dropRight(t,e){return 0===(e=Math.min(-e,0))?t.slice():t.slice(0,e)};t.dropRightWhile=function dropRightWhile(t,e){for(let n=t.length-1;n>=0;n--)if(!e(t[n]))return t.slice(0,n+1);return[]};t.dropWhile=function dropWhile(t,e){const n=t.findIndex((t=>!e(t)));return-1===n?[]:t.slice(n)};t.endsWith=function endsWith(t,e,n=t.length){return t.endsWith(e,n)};t.escape=function escape(t){return t.replace(/[&<>"']/g,(t=>x[t]))};t.escapeRegExp=function escapeRegExp(t){return t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")};t.fill=function fill(t,e,n=0,r=t.length){(n=Math.floor(n))||(n=0);(r=Math.floor(r))||(r=0);return function fill$1(t,e,n=0,r=t.length){const o=t.length,i=Math.max(n>=0?n:o+n,0),c=Math.min(r>=0?r:o+r,o);for(let n=i;n<c;n++)t[n]=e;return t}(t,e,n,r)};t.find=function find(t,e){let n=t;Array.isArray(t)||(n=Object.values(t));switch(typeof e){case"function":if(!Array.isArray(t)){const n=Object.entries(t);for(let r=0;r<n.length;r++){const o=n[r],i=o[0],c=o[1];if(e(c,i,t))return c}return}return n.find(e);case"object":if(Array.isArray(e)&&2===e.length){const t=e[0],r=e[1];return n.find(matchesProperty(t,r))}return n.find(matches(e));case"string":return n.find(property(e))}};t.findIndex=function findIndex(t,e){switch(typeof e){case"function":return t.findIndex(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.findIndex(matchesProperty(n,r))}return t.findIndex(matches(e));case"string":return t.findIndex(property(e))}};t.findLastIndex=function findLastIndex(t,e,n=t.length-1){n=n<0?Math.max(t.length+n,0):Math.min(n,t.length-1);t=t.slice(0,n+1);switch(typeof e){case"function":return t.findLastIndex(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.findLastIndex(matchesProperty(n,r))}return t.findLastIndex(matches(e));case"string":return t.findLastIndex(property(e))}};t.first=head;t.flatMap=function flatMap(t,e,n=1){return flatten$1(t.map((t=>e(t))),n)};t.flatMapDeep=function flatMapDeep(t,e){return function flattenDeep$1(t){return flatten$1(t,1/0)}(t.map((t=>e(t))))};t.flatten=flatten;t.flattenDeep=function flattenDeep(t){return flatten(t,1/0)};t.flattenDepth=function flattenDepth(t,e=1){return flatten(t,e)};t.flattenObject=function flattenObject(t){return flattenObjectImpl(t)};t.floor=function floor(t,e=0){return decimalAdjust("floor",t,e)};t.forEachRight=function forEachRight(t,e){for(let n=t.length-1;n>=0;n--){e(t[n],n,t)}};t.fromPairs=function fromPairs(t){if(!(isArrayLike(t)||t instanceof Map))return{};const e={};for(const[n,r]of t)e[n]=r;return e};t.get=get;t.groupBy=function groupBy(t,e){const n=Object.create(null);for(const r of t){const t=e(r);null==n[t]&&(n[t]=[]);n[t].push(r)}return n};t.has=has;t.head=head;t.inRange=function inRange(t,e,n){if(null==n){n=e;e=0}if(e>=n)throw new Error("The maximum value must be greater than the minimum value.");return e<=t&&t<n};t.indexOf=function indexOf(t,e,n){if(null==t)return-1;if(Number.isNaN(e)){(n=n??0)<0&&(n=Math.max(0,t.length+n));for(let e=n;e<t.length;e++)if(Number.isNaN(t[e]))return e;return-1}return t.indexOf(e,n)};t.initial=function initial(t){return t.slice(0,-1)};t.intersection=intersection;t.intersectionBy=intersectionBy;t.intersectionWith=intersectionWith;t.invert=function invert(t){const e={},n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];e[t[o]]=o}return e};t.isArguments=isArguments;t.isArray=function isArray(t){return Array.isArray(t)};t.isArrayLike=isArrayLike;t.isBoolean=function isBoolean(t){return!0===t||!1===t||"object"==typeof t&&null!=t&&"[object Boolean]"===getTag(t)};t.isDate=function isDate(t){return t instanceof Date};t.isEqual=function isEqual(t,e){if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===e;case"number":return t===e||Object.is(t,e);case"object":return areObjectsEqual(t,e)}return areObjectsEqual(t,e)};t.isFunction=function isFunction(t){return"function"==typeof t};t.isInteger=function isInteger(t){return Number.isInteger(t)};t.isLength=isLength;t.isMatch=isMatch;t.isNil=isNil$1;t.isNotNil=function isNotNil(t){return null!=t};t.isNull=function isNull(t){return null===t};t.isObject=function isObject(t){return null!==t&&("object"==typeof t||"function"==typeof t)};t.isObjectLike=isObjectLike;t.isPlainObject=isPlainObject;t.isPrimitive=isPrimitive;t.isRegExp=function isRegExp(t){return"[object RegExp]"===getTag(t)};t.isSafeInteger=function isSafeInteger(t){return Number.isSafeInteger(t)};t.isString=function isString(t){return"string"==typeof t||"object"==typeof t&&null!=t&&"[object String]"===getTag(t)};t.isSubset=function isSubset(t,e){return 0===difference$1(e,t).length};t.isSymbol=isSymbol;t.isTypedArray=isTypedArray;t.isUndefined=function isUndefined(t){return void 0===t};t.isWeakMap=function isWeakMap(t){return function isWeakMap$1(t){return t instanceof WeakMap}(t)};t.isWeakSet=function isWeakSet(t){return function isWeakSet$1(t){return t instanceof WeakSet}(t)};t.join=function join(t,e=","){return t.join(e)};t.kebabCase=function kebabCase(t){return function kebabCase$1(t){return getWords(t).map((t=>t.toLowerCase())).join("-")}(normalizeForCase(t))};t.keyBy=function keyBy(t,e){const n={};for(const r of t){n[e(r)]=r}return n};t.last=function last(t){return t[t.length-1]};t.lowerCase=function lowerCase(t){return function lowerCase$1(t){return getWords(t).map((t=>t.toLowerCase())).join(" ")}(normalizeForCase(t))};t.lowerFirst=function lowerFirst(t){return t.substring(0,1).toLowerCase()+t.substring(1)};t.mapKeys=function mapKeys(t,e){switch(typeof(e=e??identity)){case"string":case"symbol":case"number":case"object":return mapKeys$1(t,property(e));case"function":return mapKeys$1(t,e)}};t.mapValues=function mapValues(t,e){switch(typeof(e=e??identity)){case"string":case"symbol":case"number":case"object":return mapValues$1(t,property(e));case"function":return mapValues$1(t,e)}};t.matches=matches;t.matchesProperty=matchesProperty;t.max=function max(t=[]){let e,n=t[0];for(const r of t)if(null==e||r>e){e=r;n=r}return n};t.maxBy=function maxBy(t,e){let n=t[0],r=-1/0;for(const o of t){const t=e(o);if(t>r){r=t;n=o}}return n};t.mean=mean;t.meanBy=function meanBy(t,e){return mean(t.map((t=>e(t))))};t.memoize=function memoize(t,e={}){const{cache:n=new Map,getCacheKey:r}=e,memoizedFn=function(e){const o=r?r(e):e;if(n.has(o))return n.get(o);const i=t.call(this,e);n.set(o,i);return i};memoizedFn.cache=n;return memoizedFn};t.merge=function merge(t,...e){return mergeWith(t,...e,noop)};t.mergeWith=mergeWith;t.min=function min(t=[]){let e,n=t[0];for(const r of t)if(null==e||r<e){e=r;n=r}return n};t.minBy=function minBy(t,e){let n=t[0],r=1/0;for(const o of t){const t=e(o);if(t<r){r=t;n=o}}return n};t.negate=function negate(t){return(...e)=>!t(...e)};t.noop=noop;t.omit=function omit(t,...e){if(null==t)return{};const n=cloneDeep$1(t);for(let t=0;t<e.length;t++){let r=e[t];switch(typeof r){case"object":Array.isArray(r)||(r=Array.from(r));for(let t=0;t<r.length;t++){unset(n,r[t])}break;case"string":case"symbol":case"number":unset(n,r)}}return n};t.omitBy=function omitBy(t,e){const n={};for(const[r,o]of Object.entries(t))e(o,r)||(n[r]=o);return n};t.once=function once(t){let e,n=!1;return function(){if(n)return e;const r=t();n=!0;e=r;return r}};t.orderBy=orderBy;t.pad=function pad(t,e,n=" "){return t.padStart(Math.floor((e-t.length)/2)+t.length,n).padEnd(e,n)};t.padEnd=function padEnd(t,e=0,n=" "){return t.padEnd(e,n)};t.padStart=function padStart(t,e=0,n=" "){return t.padStart(e,n)};t.parseInt=function parseInt(t,e=0,n){n&&(e=0);return Number.parseInt(t,e)};t.partial=partial;t.partialRight=partialRight;t.partition=function partition(t,e){const n=[],r=[];for(const o of t)e(o)?n.push(o):r.push(o);return[n,r]};t.pascalCase=function pascalCase(t){return getWords(t).map((t=>capitalize(t))).join("")};t.pick=function pick(t,...e){if(function isNil(t){return null==t}(t))return{};const n={};for(let r of e){switch(typeof r){case"object":Array.isArray(r)||(r=Array.from(r));break;case"string":case"symbol":case"number":r=[r]}for(const e of r){const r=get(t,e);"string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)?n[e]=r:set(n,e,r)}}return n};t.pickBy=function pickBy(t,e){const n={};for(const[r,o]of Object.entries(t))e(o,r)&&(n[r]=o);return n};t.property=property;t.pullAt=function pullAt(t,e){const n=at(t,e),r=new Set(e.slice().sort(((t,e)=>e-t)));for(const e of r)t.splice(e,1);return n};t.random=random;t.randomInt=randomInt;t.range=function range(t,e,n){if(null==e){e=t;t=0}null==n&&(n=1);if(!Number.isInteger(n)||0===n)throw new Error("The step value must be a non-zero integer.");const r=Math.max(Math.ceil((e-t)/n),0),o=new Array(r);for(let e=0;e<r;e++)o[e]=t+e*n;return o};t.rearg=function rearg(t,...e){const n=flatten(e);return function(...e){const r=n.map((t=>e[t])).slice(0,e.length);for(let t=r.length;t<e.length;t++)r.push(e[t]);return t.apply(this,r)}};t.repeat=function repeat(t,e){return t.repeat(e)};t.rest=function rest(t,e=t.length-1){e=Number.parseInt(e,10);(Number.isNaN(e)||e<0)&&(e=t.length-1);return function rest$1(t,e=t.length-1){return function(...n){const r=n.slice(e),o=n.slice(0,e);for(;o.length<e;)o.push(void 0);return t.apply(this,[...o,r])}}(t,e)};t.round=function round(t,e=0){return decimalAdjust("round",t,e)};t.sample=function sample(t){return t[Math.floor(Math.random()*t.length)]};t.sampleSize=function sampleSize(t,e){if(e>t.length)throw new Error("Size must be less than or equal to the length of array.");const n=new Array(e),r=new Set;for(let o=t.length-e,i=0;o<t.length;o++,i++){let e=randomInt(0,o+1);r.has(e)&&(e=o);r.add(e);n[i]=t[e]}return n};t.set=set;t.shuffle=function shuffle(t){const e=t.slice();for(let t=e.length-1;t>=1;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e};t.size=function size(t){return isNil$1(t)?0:t instanceof Map||t instanceof Set?t.size:Object.keys(t).length};t.snakeCase=function snakeCase(t){return function snakeCase$1(t){return getWords(t).map((t=>t.toLowerCase())).join("_")}(normalizeForCase(t))};t.some=function some(t,e,n){null!=n&&(e=void 0);e||(e=identity);if(!Array.isArray(t))return!1;switch(typeof e){case"function":return t.some(e);case"object":if(Array.isArray(e)&&2===e.length){const n=e[0],r=e[1];return t.some(matchesProperty(n,r))}return t.some(matches(e));case"string":return t.some(property(e))}};t.sortBy=function sortBy(t,e){return orderBy(t,e,["asc"])};t.spread=function spread(t,e=0){e=Number.parseInt(e,10);(Number.isNaN(e)||e<0)&&(e=0);return function(...n){const r=n[e],o=n.slice(0,e);r&&o.push(...r);return t.apply(this,o)}};t.startCase=function startCase(t){return function startCase$1(t){const e=getWords(t.trim());let n="";for(const t of e){n&&(n+=" ");t===t.toUpperCase()?n+=t:n+=t[0].toUpperCase()+t.slice(1).toLowerCase()}return n}(normalizeForCase(t))};t.startsWith=function startsWith(t,e,n=0){return t.startsWith(e,n)};t.sum=sum;t.sumBy=function sumBy(t,e){return sum(t.map((t=>e(t))))};t.tail=function tail(t){return t.slice(1)};t.take=function take(t,e){return t.slice(0,e)};t.takeRight=function takeRight(t,e=1){return e<=0?[]:t.slice(-e)};t.takeRightWhile=function takeRightWhile(t,e){for(let n=t.length-1;n>=0;n--)if(!e(t[n]))return t.slice(n+1);return t.slice()};t.takeWhile=function takeWhile(t,e){const n=[];for(const r of t){if(!e(r))break;n.push(r)}return n};t.throttle=function throttle(t,e){let n;return function(...r){const o=Date.now();if(null==n||o-n>=e){n=o;t(...r)}}};t.timeout=timeout;t.toFilled=function toFilled(t,e,n=0,r=t.length){const o=t.length,i=Math.max(n>=0?n:o+n,0),c=Math.min(r>=0?r:o+r,o),u=t.slice();for(let t=i;t<c;t++)u[t]=e;return u};t.toMerged=function toMerged(t,e){return merge$1(cloneDeep$1(t),e)};t.toPath=toPath;t.toString=toString;t.trim=function trim(t,e,n){if(null==t)return"";if(null!=n||null==e)return t.toString().trim();switch(typeof e){case"string":return trim$1(t,e.toString().split(""));case"object":return Array.isArray(e)?trim$1(t,e.map((t=>t.toString()))):trim$1(t,e.toString().split(""))}};t.trimEnd=function trimEnd(t,e,n){if(null==t)return"";if(null!=n||null==e)return t.toString().trimEnd();switch(typeof e){case"string":return trimEnd$1(t,e.toString().split(""));case"object":return Array.isArray(e)?trimEnd$1(t,e.map((t=>t.toString()))):trimEnd$1(t,e.toString().split(""))}};t.trimStart=function trimStart(t,e,n){if(null==t)return"";if(null!=n||null==e)return t.toString().trimStart();switch(typeof e){case"string":return trimStart$1(t,e.toString().split(""));case"object":return Array.isArray(e)?trimStart$1(t,e.map((t=>t.toString()))):trimStart$1(t,e.toString().split(""))}};t.unary=function unary(t){return ary$1(t,1)};t.unescape=function unescape(t){return t.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,(t=>W[t]||"'"))};t.union=union;t.unionBy=unionBy;t.unionWith=unionWith;t.uniq=uniq;t.uniqBy=function uniqBy(t,e){const n=new Map;for(const r of t){const t=e(r);n.has(t)||n.set(t,r)}return Array.from(n.values())};t.uniqWith=uniqWith;t.unset=unset;t.unzip=function unzip(t){let e=0;for(let n=0;n<t.length;n++)t[n].length>e&&(e=t[n].length);const n=new Array(e);for(let r=0;r<e;r++){n[r]=new Array(t.length);for(let e=0;e<t.length;e++)n[r][e]=t[e][r]}return n};t.unzipWith=function unzipWith(t,e){const n=Math.max(...t.map((t=>t.length))),r=new Array(n);for(let o=0;o<n;o++){const n=new Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e][o];r[o]=e(...n)}return r};t.upperCase=function upperCase(t){const e=getWords(t);let n="";for(let t=0;t<e.length;t++){n+=e[t].toUpperCase();t<e.length-1&&(n+=" ")}return n};t.upperFirst=function upperFirst(t){return t.substring(0,1).toUpperCase()+t.substring(1)};t.withTimeout=async function withTimeout(t,e){return Promise.race([t(),timeout(e)])};t.without=function without(t,...e){const n=new Set(e);return t.filter((t=>!n.has(t)))};t.xor=function xor(t,e){return difference$1(union(t,e),intersection(t,e))};t.xorBy=function xorBy(t,e,n){return differenceBy(unionBy(t,e,n),intersectionBy(t,e,n),n)};t.xorWith=function xorWith(t,e,n){return differenceWith(unionWith(t,e,n),intersectionWith(t,e,n),n)};t.zip=zip;t.zipObject=function zipObject(t,e){const n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n};t.zipObjectDeep=function zipObjectDeep(t,e){const n={},r=zip(t,e);for(let t=0;t<r.length;t++){const[e,o]=r[t];null!=e&&set(n,e,o)}return n};t.zipWith=function zipWith(t,...e){const n=[t,...e.slice(0,-1)],r=e[e.length-1],o=[],i=Math.max(...n.map((t=>t.length)));for(let t=0;t<i;t++){const e=n.map((e=>e[t]));o.push(r(...e))}return o};Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});return t}({});
//# sourceMappingURL=browser.global.js.map

@@ -17,4 +17,4 @@ /**

*/
declare function flatten<T, D extends number = 1>(value: T[] | object, depth?: D): Array<FlatArray<T[], D>> | [];
declare function flatten<T, D extends number = 1>(value: readonly T[] | object, depth?: D): Array<FlatArray<T[], D>> | [];
export { flatten };

@@ -17,4 +17,4 @@ /**

*/
declare function flattenDepth<T, D extends number = 1>(value: T[] | object, depth?: D): Array<FlatArray<T[], D>> | [];
declare function flattenDepth<T, D extends number = 1>(value: readonly T[] | object, depth?: D): Array<FlatArray<T[], D>> | [];
export { flattenDepth };

@@ -19,4 +19,4 @@ /**

*/
declare function indexOf<T>(array: T[] | null | undefined, searchElement: T, fromIndex?: number): number;
declare function indexOf<T>(array: readonly T[] | null | undefined, searchElement: T, fromIndex?: number): number;
export { indexOf };

@@ -32,4 +32,4 @@ type Criterion<T> = ((item: T) => unknown) | PropertyKey | PropertyKey[] | null | undefined;

*/
declare function orderBy<T>(collection: T[] | object | number | null | undefined, criteria?: Criterion<T> | Array<Criterion<T>>, orders?: unknown | unknown[]): T[];
declare function orderBy<T>(collection: readonly T[] | object | number | null | undefined, criteria?: Criterion<T> | Array<Criterion<T>>, orders?: unknown | unknown[]): T[];
export { type Criterion, orderBy };

@@ -37,4 +37,4 @@ /**

*/
declare function size<T>(target: T[] | object | string | Map<unknown, T> | Set<T> | null | undefined): number;
declare function size<T>(target: readonly T[] | object | string | Map<unknown, T> | Set<T> | null | undefined): number;
export { size };

@@ -32,4 +32,4 @@ import { Criterion } from './orderBy.js';

*/
declare function sortBy<T>(collection: T[] | object | number | null | undefined, criteria?: Criterion<T> | Array<Criterion<T>>): T[];
declare function sortBy<T>(collection: readonly T[] | object | number | null | undefined, criteria?: Criterion<T> | Array<Criterion<T>>): T[];
export { sortBy };

@@ -34,3 +34,3 @@ /**

*/
declare function zipObjectDeep<P extends PropertyKey, V>(keys: P[] | P[][], values: V[]): {
declare function zipObjectDeep<P extends PropertyKey, V>(keys: readonly P[] | readonly P[][], values: readonly V[]): {
[K in P]: V;

@@ -37,0 +37,0 @@ };

@@ -63,2 +63,3 @@ export { at } from '../array/at.js';

export { partialRight } from '../function/partialRight.js';
export { curry } from '../function/curry.js';
export { clamp } from '../math/clamp.js';

@@ -70,9 +71,6 @@ export { inRange } from '../math/inRange.js';

export { randomInt } from '../math/randomInt.js';
export { round } from '../math/round.js';
export { sum } from '../math/sum.js';
export { sumBy } from '../math/sumBy.js';
export { range } from '../math/range.js';
export { omit } from '../object/omit.js';
export { omitBy } from '../object/omitBy.js';
export { pick } from '../object/pick.js';
export { pickBy } from '../object/pickBy.js';

@@ -84,2 +82,3 @@ export { invert } from '../object/invert.js';

export { toMerged } from '../object/toMerged.js';
export { isDate } from '../predicate/isDate.js';
export { isEqual } from '../predicate/isEqual.js';

@@ -96,6 +95,3 @@ export { isNil } from '../predicate/isNil.js';

export { timeout } from '../promise/timeout.js';
export { snakeCase } from '../string/snakeCase.js';
export { kebabCase } from '../string/kebabCase.js';
export { lowerCase } from '../string/lowerCase.js';
export { startCase } from '../string/startCase.js';
export { upperCase } from '../string/upperCase.js';
export { capitalize } from '../string/capitalize.js';

@@ -137,2 +133,4 @@ export { pascalCase } from '../string/pascalCase.js';

export { set } from './object/set.js';
export { pick } from './object/pick.js';
export { omit } from './object/omit.js';
export { has } from './object/has.js';

@@ -145,2 +143,3 @@ export { property } from './object/property.js';

export { fromPairs } from './object/fromPairs.js';
export { unset } from './object/unset.js';
export { isPlainObject } from './predicate/isPlainObject.js';

@@ -164,3 +163,9 @@ export { isArray } from './predicate/isArray.js';

export { conformsTo } from './predicate/conformsTo.js';
export { isInteger } from './predicate/isInteger.js';
export { isSafeInteger } from './predicate/isSafeInteger.js';
export { camelCase } from './string/camelCase.js';
export { kebabCase } from './string/kebabCase.js';
export { snakeCase } from './string/snakeCase.js';
export { startCase } from './string/startCase.js';
export { lowerCase } from './string/lowerCase.js';
export { startsWith } from './string/startsWith.js';

@@ -171,4 +176,12 @@ export { endsWith } from './string/endsWith.js';

export { repeat } from './string/repeat.js';
export { trim } from './string/trim.js';
export { trimStart } from './string/trimStart.js';
export { trimEnd } from './string/trimEnd.js';
export { max } from './math/max.js';
export { min } from './math/min.js';
export { ceil } from './math/ceil.js';
export { floor } from './math/floor.js';
export { round } from './math/round.js';
export { parseInt } from './math/parseInt.js';
export { toPath } from './util/toPath.js';
export { toString } from './util/toString.js';

@@ -5,10 +5,10 @@ 'use strict';

const zipWith = require('../_chunk/zipWith-CYaH1Y.js');
const zipWith = require('../_chunk/zipWith-B-5AMf.js');
const promise_index = require('../_chunk/index-BGZDR9.js');
const rest$1 = require('../_chunk/rest-CXt9w3.js');
const math_index = require('../math/index.js');
const curry = require('../_chunk/curry-BmwJrK.js');
const range = require('../_chunk/range-BXlMmn.js');
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
const toMerged = require('../_chunk/toMerged-DN1PPP.js');
const isWeakSet$1 = require('../_chunk/isWeakSet-CogETi.js');
const isTypedArray$1 = require('../_chunk/isTypedArray-Dsrnb1.js');
const toMerged = require('../_chunk/toMerged-Bzkqyz.js');
const isWeakSet$1 = require('../_chunk/isWeakSet-E_VMwB.js');
const isPlainObject$1 = require('../_chunk/isPlainObject-BIekvL.js');
const string_index = require('../string/index.js');

@@ -53,4 +53,2 @@

const IS_PLAIN = /^\w*$/;
const IS_DEEP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
function isDeepKey(key) {

@@ -63,3 +61,3 @@ switch (typeof key) {

case 'string': {
return !IS_PLAIN.test(key) && IS_DEEP.test(key);
return key.includes('.') || key.includes('[') || key.includes(']');
}

@@ -69,27 +67,24 @@ }

function isSymbol(value) {
return typeof value === 'symbol' || (value != null && value instanceof Symbol);
}
function toKey(value) {
if (typeof value === 'string' || isSymbol(value)) {
return value;
}
if (Object.is(value?.valueOf(), -0)) {
if (Object.is(value, -0)) {
return '-0';
}
return `${value}`;
return value.toString();
}
const DOTS_KEY = /^[\w.]+$/g;
const ESCAPE_REGEXP = /\\(\\)?/g;
const PROPERTY_REGEXP = RegExp('[^.[\\]]+' +
'|' +
'\\[(?:' +
'([^"\'][^[]*)' +
'|' +
'(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2' +
')\\]' +
'|' +
'(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))', 'g');
function toPath(deepKey) {
const ESCAPE_REGEXP = /\\(\\)?/g;
const PROPERTY_REGEXP = RegExp('[^.[\\]]+' +
'|' +
'\\[(?:' +
'([^"\'][^[]*)' +
'|' +
'(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2' +
')\\]' +
'|' +
'(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))', 'g');
if (DOTS_KEY.test(deepKey)) {
return deepKey.split('.');
}
const result = [];

@@ -99,5 +94,4 @@ if (deepKey[0] === '.') {

}
let match;
let lastIndex = 0;
while ((match = PROPERTY_REGEXP.exec(deepKey)) !== null) {
const matches = deepKey.matchAll(PROPERTY_REGEXP);
for (const match of matches) {
let key = match[0];

@@ -114,8 +108,2 @@ const expr = match[1];

result.push(key);
if (PROPERTY_REGEXP.lastIndex === lastIndex) {
PROPERTY_REGEXP.lastIndex++;
}
else {
lastIndex = PROPERTY_REGEXP.lastIndex;
}
}

@@ -126,25 +114,62 @@ return result;

function get(object, path, defaultValue) {
let resolvedPath;
if (Array.isArray(path)) {
resolvedPath = path;
if (object == null) {
return defaultValue;
}
else if (typeof path === 'string' && isDeepKey(path) && object?.[path] == null) {
resolvedPath = toPath(path);
switch (typeof path) {
case 'string': {
const result = object[path];
if (result === undefined) {
if (isDeepKey(path)) {
return get(object, toPath(path), defaultValue);
}
else {
return defaultValue;
}
}
return result;
}
case 'number':
case 'symbol': {
if (typeof path === 'number') {
path = toKey(path);
}
const result = object[path];
if (result === undefined) {
return defaultValue;
}
return result;
}
default: {
if (Array.isArray(path)) {
return getWithPath(object, path, defaultValue);
}
if (Object.is(path?.valueOf(), -0)) {
path = '-0';
}
else {
path = String(path);
}
const result = object[path];
if (result === undefined) {
return defaultValue;
}
return result;
}
}
else {
resolvedPath = [path];
}
if (resolvedPath.length === 0) {
}
function getWithPath(object, path, defaultValue) {
if (path.length === 0) {
return defaultValue;
}
let current = object;
let index;
for (index = 0; index < resolvedPath.length && current != null; index++) {
const key = toKey(resolvedPath[index]);
current = current[key];
for (let index = 0; index < path.length; index++) {
if (current == null) {
return defaultValue;
}
current = current[path[index]];
}
if (current === null && index === resolvedPath.length) {
return current;
if (current === undefined) {
return defaultValue;
}
return current ?? defaultValue;
return current;
}

@@ -158,48 +183,2 @@

function isArrayMatch(target, source) {
if (source.length === 0) {
return true;
}
if (!Array.isArray(target)) {
return false;
}
const countedIndex = new Set();
for (let i = 0; i < source.length; i++) {
const sourceItem = source[i];
const index = target.findIndex((targetItem, index) => {
return isMatch(targetItem, sourceItem) && !countedIndex.has(index);
});
if (index === -1) {
return false;
}
countedIndex.add(index);
}
return true;
}
function isMapMatch(target, source) {
if (source.size === 0) {
return true;
}
if (!(target instanceof Map)) {
return false;
}
for (const [key, value] of source.entries()) {
if (!isMatch(target.get(key), value)) {
return false;
}
}
return true;
}
function isSetMatch(target, source) {
if (source.size === 0) {
return true;
}
if (!(target instanceof Set)) {
return false;
}
return isArrayMatch([...target], [...source]);
}
function isMatch(target, source) {

@@ -232,3 +211,3 @@ if (source === target) {

const key = keys[i];
if (!isTypedArray$1.isPrimitive(target) && !(key in target)) {
if (!isPlainObject$1.isPrimitive(target) && !(key in target)) {
return false;

@@ -256,2 +235,45 @@ }

}
function isMapMatch(target, source) {
if (source.size === 0) {
return true;
}
if (!(target instanceof Map)) {
return false;
}
for (const [key, value] of source.entries()) {
if (!isMatch(target.get(key), value)) {
return false;
}
}
return true;
}
function isArrayMatch(target, source) {
if (source.length === 0) {
return true;
}
if (!Array.isArray(target)) {
return false;
}
const countedIndex = new Set();
for (let i = 0; i < source.length; i++) {
const sourceItem = source[i];
const index = target.findIndex((targetItem, index) => {
return isMatch(targetItem, sourceItem) && !countedIndex.has(index);
});
if (index === -1) {
return false;
}
countedIndex.add(index);
}
return true;
}
function isSetMatch(target, source) {
if (source.size === 0) {
return true;
}
if (!(target instanceof Set)) {
return false;
}
return isArrayMatch([...target], [...source]);
}

@@ -338,3 +360,14 @@ function matches(source) {

function matchesProperty(property, source) {
property = Array.isArray(property) ? property : toKey(property);
switch (typeof property) {
case 'object': {
if (Object.is(property?.valueOf(), -0)) {
property = '-0';
}
break;
}
case 'number': {
property = toKey(property);
break;
}
}
source = cloneDeep(source);

@@ -533,2 +566,6 @@ return function (target) {

function isSymbol(value) {
return typeof value === 'symbol' || (value != null && value instanceof Symbol);
}
const regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;

@@ -699,3 +736,3 @@ const regexIsPlainProp = /^\w*$/;

}
return rest$1.ary(func, n);
return curry.ary(func, n);
}

@@ -760,3 +797,3 @@

}
return rest$1.rest(func, start);
return curry.rest(func, start);
}

@@ -799,2 +836,130 @@

function isNil(x) {
return x == null;
}
function pick(obj, ...keysArr) {
if (isNil(obj)) {
return {};
}
const result = {};
for (let keys of keysArr) {
switch (typeof keys) {
case 'object': {
if (!Array.isArray(keys)) {
keys = Array.from(keys);
}
break;
}
case 'string':
case 'symbol':
case 'number': {
keys = [keys];
break;
}
}
for (const key of keys) {
const value = get(obj, key);
if (typeof key === 'string' && Object.prototype.hasOwnProperty.call(obj, key)) {
result[key] = value;
}
else {
set(result, key, value);
}
}
}
return result;
}
function unset(obj, path) {
if (obj == null) {
return true;
}
switch (typeof path) {
case 'symbol':
case 'number':
case 'object': {
if (Array.isArray(path)) {
return unsetWithPath(obj, path);
}
if (typeof path === 'number') {
path = toKey(path);
}
else if (typeof path === 'object') {
if (Object.is(path?.valueOf(), -0)) {
path = '-0';
}
else {
path = String(path);
}
}
if (obj?.[path] === undefined) {
return true;
}
try {
delete obj[path];
return true;
}
catch {
return false;
}
}
case 'string': {
if (obj?.[path] === undefined && isDeepKey(path)) {
return unsetWithPath(obj, toPath(path));
}
try {
delete obj[path];
return true;
}
catch {
return false;
}
}
}
}
function unsetWithPath(obj, path) {
const parent = get(obj, path.slice(0, -1), obj);
const lastKey = path[path.length - 1];
if (parent?.[lastKey] === undefined) {
return true;
}
try {
delete parent[lastKey];
return true;
}
catch {
return false;
}
}
function omit(obj, ...keysArr) {
if (obj == null) {
return {};
}
const result = toMerged.cloneDeep(obj);
for (let i = 0; i < keysArr.length; i++) {
let keys = keysArr[i];
switch (typeof keys) {
case 'object': {
if (!Array.isArray(keys)) {
keys = Array.from(keys);
}
for (let j = 0; j < keys.length; j++) {
const key = keys[j];
unset(result, key);
}
break;
}
case 'string':
case 'symbol':
case 'number': {
unset(result, keys);
break;
}
}
}
return result;
}
function mapKeys(object, getNewKey) {

@@ -859,3 +1024,3 @@ getNewKey = getNewKey ?? identity;

function isTypedArray(x) {
return isTypedArray$1.isTypedArray(x);
return isPlainObject$1.isTypedArray(x);
}

@@ -887,3 +1052,3 @@

}
const sourceKeys = Object.keys(source);
const sourceKeys = [...Object.keys(source), ...isWeakSet$1.getSymbols(source)];
for (let i = 0; i < sourceKeys.length; i++) {

@@ -903,3 +1068,14 @@ const key = sourceKeys[i];

if (Array.isArray(sourceValue)) {
targetValue = typeof targetValue === 'object' ? Array.from(targetValue ?? []) : [];
if (typeof targetValue === 'object') {
const cloned = [];
const targetKeys = Reflect.ownKeys(targetValue);
for (let i = 0; i < targetKeys.length; i++) {
const targetKey = targetKeys[i];
cloned[targetKey] = targetValue[targetKey];
}
targetValue = cloned;
}
else {
targetValue = [];
}
}

@@ -930,3 +1106,3 @@ const merged = merge(targetValue, sourceValue, key, target, source, stack);

function merge(object, ...sources) {
return mergeWith(object, ...sources, rest$1.noop);
return mergeWith(object, ...sources, curry.noop);
}

@@ -1013,8 +1189,29 @@

function isInteger(value) {
return Number.isInteger(value);
}
function isSafeInteger(value) {
return Number.isSafeInteger(value);
}
function toString(value) {
if (value == null) {
return '';
}
if (Array.isArray(value)) {
return value.map(toString).join(',');
}
const result = String(value);
if (result === '0' && Object.is(Number(value), -0)) {
return '-0';
}
return result;
}
function normalizeForCase(str) {
if (typeof str === 'object') {
str = str.toString();
if (typeof str !== 'string') {
str = toString(str);
}
str = str.replace(/['\u2019]/g, '');
return str;
return str.replace(/['\u2019]/g, '');
}

@@ -1026,2 +1223,18 @@

function kebabCase(str) {
return string_index.kebabCase(normalizeForCase(str));
}
function snakeCase(str) {
return string_index.snakeCase(normalizeForCase(str));
}
function startCase(str) {
return string_index.startCase(normalizeForCase(str));
}
function lowerCase(str) {
return string_index.lowerCase(normalizeForCase(str));
}
function startsWith(str, target, position = 0) {

@@ -1047,2 +1260,68 @@ return str.startsWith(target, position);

function trim(str, chars, guard) {
if (str == null) {
return '';
}
if (guard != null || chars == null) {
return str.toString().trim();
}
switch (typeof chars) {
case 'string': {
return string_index.trim(str, chars.toString().split(''));
}
case 'object': {
if (Array.isArray(chars)) {
return string_index.trim(str, chars.map(x => x.toString()));
}
else {
return string_index.trim(str, chars.toString().split(''));
}
}
}
}
function trimStart(str, chars, guard) {
if (str == null) {
return '';
}
if (guard != null || chars == null) {
return str.toString().trimStart();
}
switch (typeof chars) {
case 'string': {
return string_index.trimStart(str, chars.toString().split(''));
}
case 'object': {
if (Array.isArray(chars)) {
return string_index.trimStart(str, chars.map(x => x.toString()));
}
else {
return string_index.trimStart(str, chars.toString().split(''));
}
}
}
}
function trimEnd(str, chars, guard) {
if (str == null) {
return '';
}
if (guard != null || chars == null) {
return str.toString().trimEnd();
}
switch (typeof chars) {
case 'string': {
return string_index.trimEnd(str, chars.toString().split(''));
}
case 'object': {
if (Array.isArray(chars)) {
return string_index.trimEnd(str, chars.map(x => x.toString()));
}
else {
return string_index.trimEnd(str, chars.toString().split(''));
}
}
}
}
function max(items = []) {

@@ -1072,2 +1351,32 @@ let maxElement = items[0];

function decimalAdjust(type, number, precision = 0) {
number = Number(number);
if (Object.is(number, -0)) {
number = '-0';
}
precision = Math.min(Number.parseInt(precision, 10), 292);
if (precision) {
const [magnitude, exponent = 0] = number.toString().split('e');
let adjustedValue = Math[type](Number(`${magnitude}e${Number(exponent) + precision}`));
if (Object.is(adjustedValue, -0)) {
adjustedValue = '-0';
}
const [newMagnitude, newExponent = 0] = adjustedValue.toString().split('e');
return Number(`${newMagnitude}e${Number(newExponent) - precision}`);
}
return Math[type](Number(number));
}
function ceil(number, precision = 0) {
return decimalAdjust('ceil', number, precision);
}
function floor(number, precision = 0) {
return decimalAdjust('floor', number, precision);
}
function round(number, precision = 0) {
return decimalAdjust('round', number, precision);
}
function parseInt(string, radix = 0, guard) {

@@ -1135,21 +1444,21 @@ if (guard) {

exports.withTimeout = promise_index.withTimeout;
exports.after = rest$1.after;
exports.before = rest$1.before;
exports.debounce = rest$1.debounce;
exports.memoize = rest$1.memoize;
exports.negate = rest$1.negate;
exports.noop = rest$1.noop;
exports.once = rest$1.once;
exports.partial = rest$1.partial;
exports.partialRight = rest$1.partialRight;
exports.throttle = rest$1.throttle;
exports.unary = rest$1.unary;
exports.clamp = math_index.clamp;
exports.inRange = math_index.inRange;
exports.mean = math_index.mean;
exports.meanBy = math_index.meanBy;
exports.range = math_index.range;
exports.round = math_index.round;
exports.sum = math_index.sum;
exports.sumBy = math_index.sumBy;
exports.after = curry.after;
exports.before = curry.before;
exports.curry = curry.curry;
exports.debounce = curry.debounce;
exports.memoize = curry.memoize;
exports.negate = curry.negate;
exports.noop = curry.noop;
exports.once = curry.once;
exports.partial = curry.partial;
exports.partialRight = curry.partialRight;
exports.throttle = curry.throttle;
exports.unary = curry.unary;
exports.clamp = range.clamp;
exports.inRange = range.inRange;
exports.mean = range.mean;
exports.meanBy = range.meanBy;
exports.range = range.range;
exports.sum = range.sum;
exports.sumBy = range.sumBy;
exports.random = randomInt.random;

@@ -1162,7 +1471,6 @@ exports.randomInt = randomInt.randomInt;

exports.isObjectLike = toMerged.isObjectLike;
exports.omit = toMerged.omit;
exports.omitBy = toMerged.omitBy;
exports.pick = toMerged.pick;
exports.pickBy = toMerged.pickBy;
exports.toMerged = toMerged.toMerged;
exports.isDate = isWeakSet$1.isDate;
exports.isEqual = isWeakSet$1.isEqual;

@@ -1175,3 +1483,3 @@ exports.isFunction = isWeakSet$1.isFunction;

exports.isUndefined = isWeakSet$1.isUndefined;
exports.isPrimitive = isTypedArray$1.isPrimitive;
exports.isPrimitive = isPlainObject$1.isPrimitive;
exports.capitalize = string_index.capitalize;

@@ -1181,10 +1489,7 @@ exports.deburr = string_index.deburr;

exports.escapeRegExp = string_index.escapeRegExp;
exports.kebabCase = string_index.kebabCase;
exports.lowerCase = string_index.lowerCase;
exports.lowerFirst = string_index.lowerFirst;
exports.pad = string_index.pad;
exports.pascalCase = string_index.pascalCase;
exports.snakeCase = string_index.snakeCase;
exports.startCase = string_index.startCase;
exports.unescape = string_index.unescape;
exports.upperCase = string_index.upperCase;
exports.upperFirst = string_index.upperFirst;

@@ -1197,2 +1502,3 @@ exports.ary = ary;

exports.castArray = castArray;
exports.ceil = ceil;
exports.chunk = chunk;

@@ -1211,2 +1517,3 @@ exports.concat = concat;

exports.flattenDepth = flattenDepth;
exports.floor = floor;
exports.fromPairs = fromPairs;

@@ -1220,2 +1527,3 @@ exports.get = get;

exports.isBoolean = isBoolean;
exports.isInteger = isInteger;
exports.isMatch = isMatch;

@@ -1225,2 +1533,3 @@ exports.isObject = isObject;

exports.isRegExp = isRegExp;
exports.isSafeInteger = isSafeInteger;
exports.isString = isString;

@@ -1232,2 +1541,4 @@ exports.isSymbol = isSymbol;

exports.join = join;
exports.kebabCase = kebabCase;
exports.lowerCase = lowerCase;
exports.mapKeys = mapKeys;

@@ -1241,2 +1552,3 @@ exports.mapValues = mapValues;

exports.min = min;
exports.omit = omit;
exports.orderBy = orderBy;

@@ -1246,2 +1558,3 @@ exports.padEnd = padEnd;

exports.parseInt = parseInt;
exports.pick = pick;
exports.property = property;

@@ -1251,8 +1564,17 @@ exports.rearg = rearg;

exports.rest = rest;
exports.round = round;
exports.set = set;
exports.size = size;
exports.snakeCase = snakeCase;
exports.some = some;
exports.sortBy = sortBy;
exports.spread = spread;
exports.startCase = startCase;
exports.startsWith = startsWith;
exports.toPath = toPath;
exports.toString = toString;
exports.trim = trim;
exports.trimEnd = trimEnd;
exports.trimStart = trimStart;
exports.unset = unset;
exports.zipObjectDeep = zipObjectDeep;

@@ -12,3 +12,3 @@ /**

*/
declare function fromPairs(pairs: any[]): Record<string, any>;
declare function fromPairs(pairs: readonly any[]): Record<string, any>;
/**

@@ -28,4 +28,4 @@ * Converts an array of key-value pairs into an object.

*/
declare function fromPairs<T extends PropertyKey, U>(pairs: Array<[T, U]> | Map<T, U>): Record<T, U>;
declare function fromPairs<T extends PropertyKey, U>(pairs: ReadonlyArray<[T, U]> | Map<T, U>): Record<T, U>;
export { fromPairs };

@@ -14,3 +14,3 @@ import { Get } from './get.types.js';

*/
declare function get<T extends object, K extends keyof T>(object: T, path: K | [K]): T[K];
declare function get<T extends object, K extends keyof T>(object: T, path: K | readonly [K]): T[K];
/**

@@ -26,3 +26,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K extends keyof T>(object: T | null | undefined, path: K | [K]): T[K] | undefined;
declare function get<T extends object, K extends keyof T>(object: T | null | undefined, path: K | readonly [K]): T[K] | undefined;
/**

@@ -40,3 +40,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K extends keyof T, D>(object: T | null | undefined, path: K | [K], defaultValue: D): Exclude<T[K], undefined> | D;
declare function get<T extends object, K extends keyof T, D>(object: T | null | undefined, path: K | readonly [K], defaultValue: D): Exclude<T[K], undefined> | D;
/**

@@ -53,3 +53,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, path: [K1, K2]): T[K1][K2];
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, path: readonly [K1, K2]): T[K1][K2];
/**

@@ -66,3 +66,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T | null | undefined, path: [K1, K2]): T[K1][K2] | undefined;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1]>(object: T | null | undefined, path: readonly [K1, K2]): T[K1][K2] | undefined;
/**

@@ -81,3 +81,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], D>(object: T | null | undefined, path: [K1, K2], defaultValue: D): Exclude<T[K1][K2], undefined> | D;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], D>(object: T | null | undefined, path: readonly [K1, K2], defaultValue: D): Exclude<T[K1][K2], undefined> | D;
/**

@@ -95,3 +95,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T, path: [K1, K2, K3]): T[K1][K2][K3];
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T, path: readonly [K1, K2, K3]): T[K1][K2][K3];
/**

@@ -109,3 +109,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T | null | undefined, path: [K1, K2, K3]): T[K1][K2][K3] | undefined;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(object: T | null | undefined, path: readonly [K1, K2, K3]): T[K1][K2][K3] | undefined;
/**

@@ -125,3 +125,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], D>(object: T | null | undefined, path: [K1, K2, K3], defaultValue: D): Exclude<T[K1][K2][K3], undefined> | D;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], D>(object: T | null | undefined, path: readonly [K1, K2, K3], defaultValue: D): Exclude<T[K1][K2][K3], undefined> | D;
/**

@@ -140,3 +140,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T, path: [K1, K2, K3, K4]): T[K1][K2][K3][K4];
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T, path: readonly [K1, K2, K3, K4]): T[K1][K2][K3][K4];
/**

@@ -155,3 +155,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T | null | undefined, path: [K1, K2, K3, K4]): T[K1][K2][K3][K4] | undefined;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3]>(object: T | null | undefined, path: readonly [K1, K2, K3, K4]): T[K1][K2][K3][K4] | undefined;
/**

@@ -172,3 +172,3 @@ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.

*/
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3], D>(object: T | null | undefined, path: [K1, K2, K3, K4], defaultValue: D): Exclude<T[K1][K2][K3][K4], undefined> | D;
declare function get<T extends object, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2], K4 extends keyof T[K1][K2][K3], D>(object: T | null | undefined, path: readonly [K1, K2, K3, K4], defaultValue: D): Exclude<T[K1][K2][K3][K4], undefined> | D;
/**

@@ -175,0 +175,0 @@ * Retrieves the value at a given path from an object with numeric keys. If the resolved value is undefined, the defaultValue is returned instead.

@@ -19,6 +19,6 @@ /**

*
* console.log(isArray(value1)); // true
* console.log(isArray(value2)); // true
* console.log(isArray(value3)); // true
* console.log(isArray(value4)); // false
* console.log(isObject(value1)); // true
* console.log(isObject(value2)); // true
* console.log(isObject(value3)); // true
* console.log(isObject(value4)); // false
*/

@@ -25,0 +25,0 @@ declare function isObject(value: unknown): value is object;

@@ -14,2 +14,3 @@ export { before } from './before.js';

export { rest } from './rest.js';
export { curry } from './curry.js';
export { spread } from './spread.js';

@@ -5,3 +5,3 @@ 'use strict';

const rest = require('../_chunk/rest-CXt9w3.js');
const curry = require('../_chunk/curry-BmwJrK.js');

@@ -14,15 +14,16 @@ function spread(func) {

exports.after = rest.after;
exports.ary = rest.ary;
exports.before = rest.before;
exports.debounce = rest.debounce;
exports.memoize = rest.memoize;
exports.negate = rest.negate;
exports.noop = rest.noop;
exports.once = rest.once;
exports.partial = rest.partial;
exports.partialRight = rest.partialRight;
exports.rest = rest.rest;
exports.throttle = rest.throttle;
exports.unary = rest.unary;
exports.after = curry.after;
exports.ary = curry.ary;
exports.before = curry.before;
exports.curry = curry.curry;
exports.debounce = curry.debounce;
exports.memoize = curry.memoize;
exports.negate = curry.negate;
exports.noop = curry.noop;
exports.once = curry.once;
exports.partial = curry.partial;
exports.partialRight = curry.partialRight;
exports.rest = curry.rest;
exports.throttle = curry.throttle;
exports.unary = curry.unary;
exports.spread = spread;

@@ -72,2 +72,3 @@ export { at } from './array/at.js';

export { rest } from './function/rest.js';
export { curry } from './function/curry.js';
export { spread } from './function/spread.js';

@@ -97,2 +98,3 @@ export { clamp } from './math/clamp.js';

export { mergeWith } from './object/mergeWith.js';
export { isDate } from './predicate/isDate.js';
export { isEqual } from './predicate/isEqual.js';

@@ -120,2 +122,3 @@ export { isNil } from './predicate/isNil.js';

export { kebabCase } from './string/kebabCase.js';
export { upperCase } from './string/upperCase.js';
export { lowerCase } from './string/lowerCase.js';

@@ -125,2 +128,5 @@ export { startCase } from './string/startCase.js';

export { pascalCase } from './string/pascalCase.js';
export { trim } from './string/trim.js';
export { trimStart } from './string/trimStart.js';
export { trimEnd } from './string/trimEnd.js';
export { upperFirst } from './string/upperFirst.js';

@@ -127,0 +133,0 @@ export { lowerFirst } from './string/lowerFirst.js';

@@ -5,13 +5,14 @@ 'use strict';

const zipWith = require('./_chunk/zipWith-CYaH1Y.js');
const zipWith = require('./_chunk/zipWith-B-5AMf.js');
const array_index = require('./array/index.js');
const promise_index = require('./_chunk/index-BGZDR9.js');
const rest = require('./_chunk/rest-CXt9w3.js');
const curry = require('./_chunk/curry-BmwJrK.js');
const function_index = require('./function/index.js');
const range = require('./_chunk/range-BXlMmn.js');
const randomInt = require('./_chunk/randomInt-CF7bZK.js');
const math_index = require('./math/index.js');
const randomInt = require('./_chunk/randomInt-CF7bZK.js');
const toMerged = require('./_chunk/toMerged-DN1PPP.js');
const object_index = require('./object/index.js');
const isWeakSet = require('./_chunk/isWeakSet-CogETi.js');
const isTypedArray = require('./_chunk/isTypedArray-Dsrnb1.js');
const toMerged = require('./_chunk/toMerged-Bzkqyz.js');
const isWeakSet = require('./_chunk/isWeakSet-E_VMwB.js');
const isPlainObject = require('./_chunk/isPlainObject-BIekvL.js');
const predicate_index = require('./predicate/index.js');

@@ -83,26 +84,30 @@ const string_index = require('./string/index.js');

exports.withTimeout = promise_index.withTimeout;
exports.after = rest.after;
exports.ary = rest.ary;
exports.before = rest.before;
exports.debounce = rest.debounce;
exports.memoize = rest.memoize;
exports.negate = rest.negate;
exports.noop = rest.noop;
exports.once = rest.once;
exports.partial = rest.partial;
exports.partialRight = rest.partialRight;
exports.rest = rest.rest;
exports.throttle = rest.throttle;
exports.unary = rest.unary;
exports.after = curry.after;
exports.ary = curry.ary;
exports.before = curry.before;
exports.curry = curry.curry;
exports.debounce = curry.debounce;
exports.memoize = curry.memoize;
exports.negate = curry.negate;
exports.noop = curry.noop;
exports.once = curry.once;
exports.partial = curry.partial;
exports.partialRight = curry.partialRight;
exports.rest = curry.rest;
exports.throttle = curry.throttle;
exports.unary = curry.unary;
exports.spread = function_index.spread;
exports.clamp = math_index.clamp;
exports.inRange = math_index.inRange;
exports.mean = math_index.mean;
exports.meanBy = math_index.meanBy;
exports.range = math_index.range;
exports.round = math_index.round;
exports.sum = math_index.sum;
exports.sumBy = math_index.sumBy;
exports.clamp = range.clamp;
exports.inRange = range.inRange;
exports.mean = range.mean;
exports.meanBy = range.meanBy;
exports.range = range.range;
exports.sum = range.sum;
exports.sumBy = range.sumBy;
exports.random = randomInt.random;
exports.randomInt = randomInt.randomInt;
exports.round = math_index.round;
exports.mergeWith = object_index.mergeWith;
exports.omit = object_index.omit;
exports.pick = object_index.pick;
exports.clone = toMerged.clone;

@@ -115,8 +120,6 @@ exports.cloneDeep = toMerged.cloneDeep;

exports.merge = toMerged.merge;
exports.omit = toMerged.omit;
exports.omitBy = toMerged.omitBy;
exports.pick = toMerged.pick;
exports.pickBy = toMerged.pickBy;
exports.toMerged = toMerged.toMerged;
exports.mergeWith = object_index.mergeWith;
exports.isDate = isWeakSet.isDate;
exports.isEqual = isWeakSet.isEqual;

@@ -131,5 +134,5 @@ exports.isFunction = isWeakSet.isFunction;

exports.isWeakSet = isWeakSet.isWeakSet;
exports.isPlainObject = isTypedArray.isPlainObject;
exports.isPrimitive = isTypedArray.isPrimitive;
exports.isTypedArray = isTypedArray.isTypedArray;
exports.isPlainObject = isPlainObject.isPlainObject;
exports.isPrimitive = isPlainObject.isPrimitive;
exports.isTypedArray = isPlainObject.isTypedArray;
exports.isBoolean = predicate_index.isBoolean;

@@ -151,3 +154,7 @@ exports.isRegExp = predicate_index.isRegExp;

exports.startCase = string_index.startCase;
exports.trim = string_index.trim;
exports.trimEnd = string_index.trimEnd;
exports.trimStart = string_index.trimStart;
exports.unescape = string_index.unescape;
exports.upperCase = string_index.upperCase;
exports.upperFirst = string_index.upperFirst;

@@ -5,39 +5,5 @@ 'use strict';

const range = require('../_chunk/range-BXlMmn.js');
const randomInt = require('../_chunk/randomInt-CF7bZK.js');
function clamp(value, bound1, bound2) {
if (bound2 == null) {
return Math.min(value, bound1);
}
return Math.min(Math.max(value, bound1), bound2);
}
function inRange(value, minimum, maximum) {
if (maximum == null) {
maximum = minimum;
minimum = 0;
}
if (minimum >= maximum) {
throw new Error('The maximum value must be greater than the minimum value.');
}
return minimum <= value && value < maximum;
}
function sum(nums) {
let result = 0;
for (let i = 0; i < nums.length; i++) {
result += nums[i];
}
return result;
}
function mean(nums) {
return sum(nums) / nums.length;
}
function meanBy(items, getValue) {
const nums = items.map(x => getValue(x));
return mean(nums);
}
function round(value, precision = 0) {

@@ -51,35 +17,11 @@ if (!Number.isInteger(precision)) {

function sumBy(items, getValue) {
const nums = items.map(x => getValue(x));
return sum(nums);
}
function range(start, end, step) {
if (end == null) {
end = start;
start = 0;
}
if (step == null) {
step = 1;
}
if (!Number.isInteger(step) || step === 0) {
throw new Error(`The step value must be a non-zero integer.`);
}
const length = Math.max(Math.ceil((end - start) / step), 0);
const result = new Array(length);
for (let i = 0; i < length; i++) {
result[i] = start + i * step;
}
return result;
}
exports.clamp = range.clamp;
exports.inRange = range.inRange;
exports.mean = range.mean;
exports.meanBy = range.meanBy;
exports.range = range.range;
exports.sum = range.sum;
exports.sumBy = range.sumBy;
exports.random = randomInt.random;
exports.randomInt = randomInt.randomInt;
exports.clamp = clamp;
exports.inRange = inRange;
exports.mean = mean;
exports.meanBy = meanBy;
exports.range = range;
exports.round = round;
exports.sum = sum;
exports.sumBy = sumBy;

@@ -5,4 +5,20 @@ 'use strict';

const toMerged = require('../_chunk/toMerged-DN1PPP.js');
const toMerged = require('../_chunk/toMerged-Bzkqyz.js');
function omit(obj, keys) {
const result = { ...obj };
for (const key of keys) {
delete result[key];
}
return result;
}
function pick(obj, keys) {
const result = {};
for (const key of keys) {
result[key] = obj[key];
}
return result;
}
function mergeWith(target, source, merge) {

@@ -38,7 +54,7 @@ const sourceKeys = Object.keys(source);

exports.merge = toMerged.merge;
exports.omit = toMerged.omit;
exports.omitBy = toMerged.omitBy;
exports.pick = toMerged.pick;
exports.pickBy = toMerged.pickBy;
exports.toMerged = toMerged.toMerged;
exports.mergeWith = mergeWith;
exports.omit = omit;
exports.pick = pick;

@@ -18,4 +18,4 @@ /**

*/
declare function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
declare function pick<T extends Record<string, any>, K extends keyof T>(obj: T, keys: readonly K[]): Pick<T, K>;
export { pick };

@@ -0,1 +1,2 @@

export { isDate } from './isDate.js';
export { isEqual } from './isEqual.js';

@@ -2,0 +3,0 @@ export { isNil } from './isNil.js';

@@ -5,4 +5,4 @@ 'use strict';

const isWeakSet = require('../_chunk/isWeakSet-CogETi.js');
const isTypedArray = require('../_chunk/isTypedArray-Dsrnb1.js');
const isWeakSet = require('../_chunk/isWeakSet-E_VMwB.js');
const isPlainObject = require('../_chunk/isPlainObject-BIekvL.js');

@@ -25,2 +25,3 @@ function isRegExp(value) {

exports.isDate = isWeakSet.isDate;
exports.isEqual = isWeakSet.isEqual;

@@ -35,5 +36,5 @@ exports.isFunction = isWeakSet.isFunction;

exports.isWeakSet = isWeakSet.isWeakSet;
exports.isPlainObject = isTypedArray.isPlainObject;
exports.isPrimitive = isTypedArray.isPrimitive;
exports.isTypedArray = isTypedArray.isTypedArray;
exports.isPlainObject = isPlainObject.isPlainObject;
exports.isPrimitive = isPlainObject.isPrimitive;
exports.isTypedArray = isPlainObject.isTypedArray;
exports.isBoolean = isBoolean;

@@ -40,0 +41,0 @@ exports.isRegExp = isRegExp;

@@ -13,3 +13,4 @@ /**

declare function capitalize<T extends string>(str: T): Capitalize<T>;
type Capitalize<T extends string> = T extends `${infer F}${infer R}` ? `${Uppercase<F>}${Lowercase<R>}` : T;
export { capitalize };
export { camelCase } from './camelCase.js';
export { snakeCase } from './snakeCase.js';
export { kebabCase } from './kebabCase.js';
export { upperCase } from './upperCase.js';
export { lowerCase } from './lowerCase.js';

@@ -8,2 +9,5 @@ export { startCase } from './startCase.js';

export { pascalCase } from './pascalCase.js';
export { trim } from './trim.js';
export { trimStart } from './trimStart.js';
export { trimEnd } from './trimEnd.js';
export { upperFirst } from './upperFirst.js';

@@ -10,0 +14,0 @@ export { lowerFirst } from './lowerFirst.js';

@@ -33,2 +33,14 @@ 'use strict';

function upperCase(str) {
const words = getWords(str);
let result = '';
for (let i = 0; i < words.length; i++) {
result += words[i].toUpperCase();
if (i < words.length - 1) {
result += ' ';
}
}
return result;
}
function lowerCase(str) {

@@ -61,2 +73,51 @@ const words = getWords(str);

function trimStart(str, chars) {
if (chars === undefined) {
return str.trimStart();
}
let startIndex = 0;
switch (typeof chars) {
case 'string': {
while (startIndex < str.length && str[startIndex] === chars) {
startIndex++;
}
break;
}
case 'object': {
while (startIndex < str.length && chars.includes(str[startIndex])) {
startIndex++;
}
}
}
return str.substring(startIndex);
}
function trimEnd(str, chars) {
if (chars === undefined) {
return str.trimEnd();
}
let endIndex = str.length;
switch (typeof chars) {
case 'string': {
while (endIndex > 0 && str[endIndex - 1] === chars) {
endIndex--;
}
break;
}
case 'object': {
while (endIndex > 0 && chars.includes(str[endIndex - 1])) {
endIndex--;
}
}
}
return str.substring(0, endIndex);
}
function trim(str, chars) {
if (chars === undefined) {
return str.trim();
}
return trimStart(trimEnd(str, chars), chars);
}
function upperFirst(str) {

@@ -156,3 +217,7 @@ return str.substring(0, 1).toUpperCase() + str.substring(1);

exports.startCase = startCase;
exports.trim = trim;
exports.trimEnd = trimEnd;
exports.trimStart = trimStart;
exports.unescape = unescape;
exports.upperCase = upperCase;
exports.upperFirst = upperFirst;

@@ -10,3 +10,3 @@ /**

* const result1 = startCase('hello world'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'Hello World'
* const result2 = startCase('HELLO WORLD'); // result will be 'HELLO WORLD'
* const result3 = startCase('hello-world'); // result will be 'Hello World'

@@ -13,0 +13,0 @@ * const result4 = startCase('hello_world'); // result will be 'Hello World'

{
"name": "es-toolkit",
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
"version": "1.18.0",
"version": "1.19.0-dev.603+72186bb8",
"homepage": "https://es-toolkit.slash.page",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/toss/es-toolkit/issues",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc