@blackglory/structures 0.11.2 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.min.js","sources":["../../src/box.ts","../../node_modules/@blackglory/types/lib/es2018/array.js","../../node_modules/@blackglory/types/lib/es2018/null.js","../../node_modules/@blackglory/types/lib/es2018/undefined.js","../../node_modules/@blackglory/types/lib/es2018/function.js","../../node_modules/@blackglory/types/lib/es2018/async-iterable.js","../../node_modules/@blackglory/types/lib/es2018/bigint.js","../../node_modules/@blackglory/types/lib/es2018/boolean.js","../../node_modules/@blackglory/types/lib/es2018/string.js","../../node_modules/@blackglory/types/lib/es2018/char.js","../../node_modules/@blackglory/types/lib/es2018/date.js","../../node_modules/@blackglory/types/lib/es2018/enum.js","../../node_modules/@blackglory/types/lib/es2018/error.js","../../node_modules/@blackglory/types/lib/es2018/falsy.js","../../node_modules/@blackglory/types/lib/es2018/iterable.js","../../node_modules/@blackglory/types/lib/es2018/number.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_getPrototype.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isPlainObject.js","../../node_modules/@blackglory/types/lib/es2018/object.js","../../node_modules/@blackglory/types/lib/es2018/json.js","../../node_modules/@blackglory/types/lib/es2018/promise.js","../../node_modules/@blackglory/types/lib/es2018/url.js","../../node_modules/@blackglory/types/lib/es2018/regexp.js","../../node_modules/@blackglory/types/lib/es2018/symbol.js","../../node_modules/@blackglory/types/lib/es2018/index.js","../../node_modules/@blackglory/go/lib/es2018/go.js","../../node_modules/@blackglory/go/lib/es2018/go-microtask.js","../../node_modules/extra-rand/lib/es2018/random.js","../../node_modules/extra-rand/lib/es2018/random-int.js","../../node_modules/extra-rand/lib/es2018/random-int-inclusive.js","../../node_modules/extra-rand/lib/es2018/index.js","../../node_modules/extra-timers/lib/es2018/exponential-backoff.js","../../node_modules/extra-timers/lib/es2018/set-timeout.js","../../node_modules/extra-timers/lib/es2018/set-schedule.js","../../node_modules/extra-timers/lib/es2018/set-interval.js","../../node_modules/extra-timers/lib/es2018/set-immediate.js","../../node_modules/extra-timers/lib/es2018/set-timeout-loop.js","../../node_modules/extra-timers/lib/es2018/set-dynamic-timeout-loop.js","../../node_modules/extra-timers/lib/es2018/index.js","../../node_modules/@blackglory/go/lib/es2018/go-macrotask.js","../../node_modules/@blackglory/go/lib/es2018/index.js","../../src/emitter.ts","../../src/hash-map.ts","../../src/hash-set.ts","../../src/queue.ts","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/array.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/null.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/undefined.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/function.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/async-iterable.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/bigint.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/boolean.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/string.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/char.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/date.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/enum.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/error.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/falsy.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/iterable.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/number.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/object.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/json.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/promise.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/url.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/regexp.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/index.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/concat-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/concat.js","../../node_modules/iterable-operator/lib/es2018/utils.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-until-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-until.js","../../node_modules/iterable-operator/lib/es2018/middleware/filter-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/filter.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-deep-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-deep.js","../../node_modules/iterable-operator/lib/es2018/middleware/map-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/map.js","../../node_modules/iterable-operator/lib/es2018/middleware/repeat-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/repeat.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/split.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-until-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-until.js","../../node_modules/iterable-operator/lib/es2018/middleware/tap-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/tap.js","../../node_modules/iterable-operator/lib/es2018/middleware/to-async-iterable.js","../../node_modules/iterable-operator/lib/es2018/middleware/transform-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/transform.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq.js","../../node_modules/iterable-operator/lib/es2018/middleware/zip-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/index.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-right-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-right.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten.js","../../node_modules/iterable-operator/lib/es2018/middleware/slice-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/slice.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-right-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-right.js","../../node_modules/iterable-operator/lib/es2018/middleware/take.js","../../node_modules/iterable-operator/lib/es2018/middleware/zip.js","../../node_modules/iterable-operator/lib/es2018/output/consume.js","../../node_modules/iterable-operator/lib/es2018/output/each-async.js","../../node_modules/iterable-operator/lib/es2018/output/each.js","../../node_modules/iterable-operator/lib/es2018/output/every-async.js","../../node_modules/iterable-operator/lib/es2018/output/every.js","../../node_modules/iterable-operator/lib/es2018/output/find-async.js","../../node_modules/iterable-operator/lib/es2018/output/find.js","../../node_modules/iterable-operator/lib/es2018/output/first-async.js","../../node_modules/iterable-operator/lib/es2018/output/first.js","../../node_modules/iterable-operator/lib/es2018/output/includes-async.js","../../node_modules/iterable-operator/lib/es2018/output/includes.js","../../node_modules/iterable-operator/lib/es2018/output/match-async.js","../../node_modules/iterable-operator/lib/es2018/output/match.js","../../node_modules/iterable-operator/lib/es2018/output/reduce-async.js","../../node_modules/iterable-operator/lib/es2018/output/reduce.js","../../node_modules/iterable-operator/lib/es2018/output/some-async.js","../../node_modules/iterable-operator/lib/es2018/output/some.js","../../node_modules/iterable-operator/lib/es2018/output/last-async.js","../../node_modules/iterable-operator/lib/es2018/output/last.js","../../node_modules/iterable-operator/lib/es2018/output/to-array-async.js","../../node_modules/iterable-operator/lib/es2018/output/to-array.js","../../node_modules/iterable-operator/lib/es2018/output/to-set-async.js","../../node_modules/iterable-operator/lib/es2018/output/to-set.js","../../node_modules/iterable-operator/lib/es2018/output/count.js","../../node_modules/iterable-operator/lib/es2018/output/count-async.js","../../node_modules/iterable-operator/lib/es2018/output/group-by.js","../../node_modules/iterable-operator/lib/es2018/output/group-by-async.js","../../node_modules/iterable-operator/lib/es2018/index.js","../../node_modules/iterable-operator/lib/es2018/output/index.js","../../node_modules/@blackglory/errors/lib/es2018/traverse-error-prototype-chain.js","../../node_modules/@blackglory/errors/lib/es2018/get-error-names.js","../../node_modules/@blackglory/errors/lib/es2018/serializable-error.js","../../node_modules/@blackglory/errors/lib/es2018/custom-error.js","../../node_modules/@blackglory/errors/lib/es2018/assertion-error.js","../../node_modules/@blackglory/pass/lib/es2018/pass.js","../../node_modules/@blackglory/pass/lib/es2018/pass-async.js","../../node_modules/@blackglory/pass/lib/es2018/index.js","../../node_modules/@blackglory/errors/lib/es2018/hydrate.js","../../node_modules/@blackglory/errors/lib/es2018/index.js","../../node_modules/@blackglory/errors/lib/es2018/normalize.js","../../node_modules/@blackglory/errors/lib/es2018/assert.js","../../src/lru-map.ts","../../src/expirable-map.ts","../../src/tlru-map.ts","../../src/trie-map.ts","../../src/sparse-set.ts","../../src/sparse-map.ts","../../src/typed-sparse-map.ts","../../src/typed-sparse-set.ts","../../src/dynamic-typed-array.ts","../../src/utils/skip-list.ts","../../src/sorted-set.ts","../../src/utils/trailing-zeros.ts","../../src/bit-set.ts","../../src/typed-bit-set.ts","../../src/cons.ts","../../src/array.ts"],"sourcesContent":["export class Box<T> {\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n constructor(private value: T) {}\n\n set(value: T): void {\n this.value = value\n }\n\n get(): T {\n return this.value\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyArray = exports.isEmptyArray = exports.isntArray = exports.isArray = void 0;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isntArray(val) {\n return !isArray(val);\n}\nexports.isntArray = isntArray;\nfunction isEmptyArray(val) {\n return val.length === 0;\n}\nexports.isEmptyArray = isEmptyArray;\nfunction isntEmptyArray(val) {\n return val.length !== 0;\n}\nexports.isntEmptyArray = isntEmptyArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNull = exports.isNull = void 0;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isntNull(val) {\n return !isNull(val);\n}\nexports.isntNull = isntNull;\n//# sourceMappingURL=null.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntUndefined = exports.isUndefined = void 0;\nfunction isUndefined(val) {\n return val === undefined;\n}\nexports.isUndefined = isUndefined;\nfunction isntUndefined(val) {\n return !isUndefined(val);\n}\nexports.isntUndefined = isntUndefined;\n//# sourceMappingURL=undefined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFunction = exports.isFunction = void 0;\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isntFunction(val) {\n return !isFunction(val);\n}\nexports.isntFunction = isntFunction;\n//# sourceMappingURL=function.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntAsyncIterable = exports.isAsyncIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isAsyncIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.asyncIterator]);\n}\nexports.isAsyncIterable = isAsyncIterable;\nfunction isntAsyncIterable(val) {\n return !isAsyncIterable(val);\n}\nexports.isntAsyncIterable = isntAsyncIterable;\n//# sourceMappingURL=async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBigInt = exports.isBigInt = void 0;\nfunction isBigInt(val) {\n return typeof val === 'bigint';\n}\nexports.isBigInt = isBigInt;\nfunction isntBigInt(val) {\n return !isBigInt(val);\n}\nexports.isntBigInt = isntBigInt;\n//# sourceMappingURL=bigint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBoolean = exports.isBoolean = void 0;\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nexports.isBoolean = isBoolean;\nfunction isntBoolean(val) {\n return !isBoolean(val);\n}\nexports.isntBoolean = isntBoolean;\n//# sourceMappingURL=boolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntString = exports.isString = void 0;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\nfunction isntString(val) {\n return !isString(val);\n}\nexports.isntString = isntString;\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntChar = exports.isChar = void 0;\nconst string_1 = require(\"./string\");\nfunction isChar(val) {\n return (0, string_1.isString)(val)\n && val.length === 1;\n}\nexports.isChar = isChar;\nfunction isntChar(val) {\n return !isChar(val);\n}\nexports.isntChar = isntChar;\n//# sourceMappingURL=char.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntDate = exports.isDate = void 0;\nfunction isDate(val) {\n return val instanceof Date;\n}\nexports.isDate = isDate;\nfunction isntDate(val) {\n return !isDate(val);\n}\nexports.isntDate = isntDate;\n//# sourceMappingURL=date.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inEnum = void 0;\nfunction inEnum(val, _enum) {\n return Object.values(_enum).includes(val);\n}\nexports.inEnum = inEnum;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntError = exports.isError = void 0;\nfunction isError(val) {\n return val instanceof Error;\n}\nexports.isError = isError;\nfunction isntError(val) {\n return !isError(val);\n}\nexports.isntError = isntError;\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFalsy = exports.isFalsy = void 0;\nfunction isFalsy(val) {\n return !val;\n}\nexports.isFalsy = isFalsy;\nfunction isntFalsy(val) {\n return !isFalsy(val);\n}\nexports.isntFalsy = isntFalsy;\n//# sourceMappingURL=falsy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntIterable = exports.isIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.iterator]);\n}\nexports.isIterable = isIterable;\nfunction isntIterable(val) {\n return !isIterable(val);\n}\nexports.isntIterable = isntIterable;\n//# sourceMappingURL=iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNaN = exports.isNaN = exports.isNegativeInfinity = exports.isPositiveInfinity = exports.isFinite = exports.isntNumber = exports.isNumber = void 0;\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nexports.isNumber = isNumber;\nfunction isntNumber(val) {\n return !isNumber(val);\n}\nexports.isntNumber = isntNumber;\nfunction isFinite(val) {\n return Number.isFinite(val);\n}\nexports.isFinite = isFinite;\nfunction isPositiveInfinity(val) {\n return val === Infinity;\n}\nexports.isPositiveInfinity = isPositiveInfinity;\nfunction isNegativeInfinity(val) {\n return val === -Infinity;\n}\nexports.isNegativeInfinity = isNegativeInfinity;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isntNaN(val) {\n return !isNaN(val);\n}\nexports.isntNaN = isntNaN;\n//# sourceMappingURL=number.js.map","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyObject = exports.isEmptyObject = exports.isntPlainObject = exports.isPlainObject = exports.isntObject = exports.isObject = void 0;\nconst isPlainObject_1 = __importDefault(require(\"lodash/isPlainObject\"));\nfunction isObject(val) {\n return val !== null\n && typeof val === 'object';\n}\nexports.isObject = isObject;\nfunction isntObject(val) {\n return !isObject(val);\n}\nexports.isntObject = isntObject;\nfunction isPlainObject(val) {\n return (0, isPlainObject_1.default)(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isntPlainObject(val) {\n return !isPlainObject(val);\n}\nexports.isntPlainObject = isntPlainObject;\nfunction isEmptyObject(val) {\n return Object.keys(val).length === 0;\n}\nexports.isEmptyObject = isEmptyObject;\nfunction isntEmptyObject(val) {\n return Object.keys(val).length !== 0;\n}\nexports.isntEmptyObject = isntEmptyObject;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntJsonable = exports.isJsonable = exports.isntJson = exports.isJson = void 0;\nconst null_1 = require(\"./null\");\nconst boolean_1 = require(\"./boolean\");\nconst string_1 = require(\"./string\");\nconst number_1 = require(\"./number\");\nconst array_1 = require(\"./array\");\nconst object_1 = require(\"./object\");\nfunction isJson(val) {\n return (0, null_1.isNull)(val)\n || (0, boolean_1.isBoolean)(val)\n || (0, string_1.isString)(val)\n || (0, number_1.isNumber)(val)\n || ((0, array_1.isArray)(val) && val.every(isJson))\n || ((0, object_1.isPlainObject)(val) && Object.values(val).every(isJson));\n}\nexports.isJson = isJson;\nfunction isntJson(val) {\n return !isJson(val);\n}\nexports.isntJson = isntJson;\nfunction isJsonable(val) {\n try {\n JSON.stringify(val);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isJsonable = isJsonable;\nfunction isntJsonable(val) {\n return !isntJsonable(val);\n}\nexports.isntJsonable = isntJsonable;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPromiseLike = exports.isntPromiseLike = exports.isntPromise = exports.isPromise = void 0;\nconst object_1 = require(\"./object\");\nconst function_1 = require(\"./function\");\nfunction isPromise(val) {\n return val instanceof Promise;\n}\nexports.isPromise = isPromise;\nfunction isntPromise(val) {\n return !isPromise(val);\n}\nexports.isntPromise = isntPromise;\nfunction isntPromiseLike(val) {\n return !isPromiseLike(val);\n}\nexports.isntPromiseLike = isntPromiseLike;\nfunction isPromiseLike(val) {\n return (0, object_1.isObject)(val)\n && (0, function_1.isFunction)(val.then);\n}\nexports.isPromiseLike = isPromiseLike;\n//# sourceMappingURL=promise.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsoluteURL = void 0;\nfunction isAbsoluteURL(str) {\n try {\n new URL(str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isAbsoluteURL = isAbsoluteURL;\n//# sourceMappingURL=url.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntRegExp = exports.isRegExp = void 0;\nfunction isRegExp(val) {\n return val instanceof RegExp;\n}\nexports.isRegExp = isRegExp;\nfunction isntRegExp(val) {\n return !isRegExp(val);\n}\nexports.isntRegExp = isntRegExp;\n//# sourceMappingURL=regexp.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntSymbol = exports.isSymbol = void 0;\nfunction isSymbol(val) {\n return typeof val === 'symbol';\n}\nexports.isSymbol = isSymbol;\nfunction isntSymbol(val) {\n return !isSymbol(val);\n}\nexports.isntSymbol = isntSymbol;\n//# sourceMappingURL=symbol.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./async-iterable\"), exports);\n__exportStar(require(\"./bigint\"), exports);\n__exportStar(require(\"./boolean\"), exports);\n__exportStar(require(\"./char\"), exports);\n__exportStar(require(\"./date\"), exports);\n__exportStar(require(\"./enum\"), exports);\n__exportStar(require(\"./error\"), exports);\n__exportStar(require(\"./falsy\"), exports);\n__exportStar(require(\"./function\"), exports);\n__exportStar(require(\"./iterable\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./null\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./promise\"), exports);\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./undefined\"), exports);\n__exportStar(require(\"./url\"), exports);\n__exportStar(require(\"./regexp\"), exports);\n__exportStar(require(\"./symbol\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.go = void 0;\nfunction go(fn) {\n return fn();\n}\nexports.go = go;\n//# sourceMappingURL=go.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.goMicrotask = void 0;\nfunction goMicrotask(fn) {\n return new Promise((resolve, reject) => {\n queueMicrotask(async () => {\n try {\n resolve(await fn());\n }\n catch (e) {\n reject(e);\n }\n });\n });\n}\nexports.goMicrotask = goMicrotask;\n//# sourceMappingURL=go-microtask.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.random = void 0;\nfunction random(min, max) {\n return Math.random() * (max - min) + min;\n}\nexports.random = random;\n//# sourceMappingURL=random.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomInt = void 0;\nfunction randomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n}\nexports.randomInt = randomInt;\n//# sourceMappingURL=random-int.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomIntInclusive = void 0;\nfunction randomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\nexports.randomIntInclusive = randomIntInclusive;\n//# sourceMappingURL=random-int-inclusive.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./random\"), exports);\n__exportStar(require(\"./random-int\"), exports);\n__exportStar(require(\"./random-int-inclusive\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateExponentialBackoffTimeout = void 0;\nconst extra_rand_1 = require(\"extra-rand\");\nfunction calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {\n const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);\n if (jitter) {\n return (0, extra_rand_1.randomIntInclusive)(0, timeout);\n }\n else {\n return timeout;\n }\n}\nexports.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;\n//# sourceMappingURL=exponential-backoff.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimeout = void 0;\nfunction setTimeout(timeout, cb) {\n const timer = globalThis.setTimeout(cb, timeout);\n return () => clearTimeout(timer);\n}\nexports.setTimeout = setTimeout;\n//# sourceMappingURL=set-timeout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setSchedule = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setSchedule(timestamp, cb) {\n const timeout = timestamp - Date.now();\n return (0, set_timeout_1.setTimeout)(timeout, cb);\n}\nexports.setSchedule = setSchedule;\n//# sourceMappingURL=set-schedule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setInterval = void 0;\nfunction setInterval(timeout, cb) {\n const timer = globalThis.setInterval(cb, timeout);\n return () => clearInterval(timer);\n}\nexports.setInterval = setInterval;\n//# sourceMappingURL=set-interval.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setImmediate = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setImmediate(cb) {\n if (globalThis.setImmediate) {\n const timer = globalThis.setImmediate(cb);\n return () => clearImmediate(timer);\n }\n else {\n return (0, set_timeout_1.setTimeout)(0, cb);\n }\n}\nexports.setImmediate = setImmediate;\n//# sourceMappingURL=set-immediate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimeoutLoop = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setTimeoutLoop(timeout, cb) {\n let isCancelled = false;\n let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n return () => {\n isCancelled = true;\n cancel();\n };\n async function loop() {\n await cb();\n if (!isCancelled) {\n cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n }\n }\n}\nexports.setTimeoutLoop = setTimeoutLoop;\n//# sourceMappingURL=set-timeout-loop.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setDynamicTimeoutLoop = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setDynamicTimeoutLoop(timeout, cb) {\n let isCancelled = false;\n let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n return () => {\n isCancelled = true;\n cancel();\n };\n async function loop() {\n const start = Date.now();\n await cb();\n const elapsed = Date.now() - start;\n if (!isCancelled) {\n cancel = (0, set_timeout_1.setTimeout)(Math.max(timeout - elapsed, 0), loop);\n }\n }\n}\nexports.setDynamicTimeoutLoop = setDynamicTimeoutLoop;\n//# sourceMappingURL=set-dynamic-timeout-loop.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./exponential-backoff\"), exports);\n__exportStar(require(\"./set-timeout\"), exports);\n__exportStar(require(\"./set-schedule\"), exports);\n__exportStar(require(\"./set-interval\"), exports);\n__exportStar(require(\"./set-immediate\"), exports);\n__exportStar(require(\"./set-timeout-loop\"), exports);\n__exportStar(require(\"./set-dynamic-timeout-loop\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.goMacrotask = void 0;\nconst extra_timers_1 = require(\"extra-timers\");\nfunction goMacrotask(fn) {\n return new Promise((resolve, reject) => {\n (0, extra_timers_1.setImmediate)(async () => {\n try {\n resolve(await fn());\n }\n catch (e) {\n reject(e);\n }\n });\n });\n}\nexports.goMacrotask = goMacrotask;\n//# sourceMappingURL=go-macrotask.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./go\"), exports);\n__exportStar(require(\"./go-microtask\"), exports);\n__exportStar(require(\"./go-macrotask\"), exports);\n//# sourceMappingURL=index.js.map","import { go } from '@blackglory/go'\n\ntype Listener<Args extends unknown[]> = (...args: Args) => void\n\nexport class Emitter<EventToArgs extends Record<string, unknown[]>> {\n private map = new Map<\n keyof EventToArgs\n , Set<Listener<EventToArgs[keyof EventToArgs]>>\n >()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n on<T extends keyof EventToArgs>(\n event: T\n , listener: Listener<EventToArgs[T]>\n ): () => void {\n const set = go(() => {\n const set = this.map.get(event)\n if (set) {\n return set\n } else {\n const set = new Set<Listener<EventToArgs[keyof EventToArgs]>>()\n this.map.set(event, set)\n return set\n }\n })\n set.add(handler as Listener<EventToArgs[keyof EventToArgs]>)\n\n return () => {\n const handlers = this.map.get(event)\n if (handlers) {\n const deleted = handlers.delete(\n handler as Listener<EventToArgs[keyof EventToArgs]>\n )\n if (deleted && handlers.size === 0) {\n this.map.delete(event)\n }\n }\n }\n\n function handler(...args: Parameters<Listener<EventToArgs[T]>>): void {\n listener(...args)\n }\n }\n\n once<T extends keyof EventToArgs>(\n event: T\n , listener: Listener<EventToArgs[T]>\n ): () => void {\n const removeListener = this.on(\n event\n , (...args: Parameters<Listener<EventToArgs[T]>>) => {\n listener(...args)\n removeListener()\n }\n )\n\n return removeListener\n }\n\n emit<T extends keyof EventToArgs>(event: T, ...args: EventToArgs[T]): void {\n this.map.get(event)?.forEach(cb => cb(...args))\n }\n}\n","export class HashMap<K, V, Hash = unknown> {\n private map = new Map<Hash, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(private hash: (key: K) => Hash) {}\n\n set(key: K, value: V): this {\n this.map.set(this.hash(key), value)\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(this.hash(key))\n }\n\n get(key: K): V | undefined {\n return this.map.get(this.hash(key))\n }\n\n delete(key: K): boolean {\n return this.map.delete(this.hash(key))\n }\n\n clear(): void {\n this.map.clear()\n }\n}\n","export class HashSet<V, Hash = unknown> implements Iterable<V> {\n private map = new Map<Hash, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n [Symbol.iterator](): IterableIterator<V> {\n return this.map.values()\n }\n\n constructor(private hash: (value: V) => Hash) {}\n\n add(value: V): this {\n this.map.set(this.hash(value), value)\n return this\n }\n\n delete(value: V): boolean {\n return this.map.delete(this.hash(value))\n }\n\n has(value: V): boolean {\n return this.map.has(this.hash(value))\n }\n\n clear(): void {\n this.map.clear()\n }\n\n values(): IterableIterator<V> {\n return this.map.values()\n }\n}\n","export class Queue<T> {\n private items: T[] = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.items.length\n }\n\n empty(): void {\n this.items.length = 0\n }\n\n enqueue(...items: T[]): void {\n this.items.push(...items)\n }\n\n dequeue(): T | undefined {\n return this.items.shift()\n }\n\n remove(item: T): void {\n let index: number\n while ((index = this.items.indexOf(item)) >= 0) {\n this.items.splice(index, 1)\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyArray = exports.isEmptyArray = exports.isntArray = exports.isArray = void 0;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isntArray(val) {\n return !isArray(val);\n}\nexports.isntArray = isntArray;\nfunction isEmptyArray(val) {\n return val.length === 0;\n}\nexports.isEmptyArray = isEmptyArray;\nfunction isntEmptyArray(val) {\n return val.length !== 0;\n}\nexports.isntEmptyArray = isntEmptyArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNull = exports.isNull = void 0;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isntNull(val) {\n return !isNull(val);\n}\nexports.isntNull = isntNull;\n//# sourceMappingURL=null.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntUndefined = exports.isUndefined = void 0;\nfunction isUndefined(val) {\n return val === undefined;\n}\nexports.isUndefined = isUndefined;\nfunction isntUndefined(val) {\n return !isUndefined(val);\n}\nexports.isntUndefined = isntUndefined;\n//# sourceMappingURL=undefined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFunction = exports.isFunction = void 0;\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isntFunction(val) {\n return !isFunction(val);\n}\nexports.isntFunction = isntFunction;\n//# sourceMappingURL=function.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntAsyncIterable = exports.isAsyncIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isAsyncIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.asyncIterator]);\n}\nexports.isAsyncIterable = isAsyncIterable;\nfunction isntAsyncIterable(val) {\n return !isAsyncIterable(val);\n}\nexports.isntAsyncIterable = isntAsyncIterable;\n//# sourceMappingURL=async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBigInt = exports.isBigInt = void 0;\nfunction isBigInt(val) {\n return typeof val === 'bigint';\n}\nexports.isBigInt = isBigInt;\nfunction isntBigInt(val) {\n return !isBigInt(val);\n}\nexports.isntBigInt = isntBigInt;\n//# sourceMappingURL=bigint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBoolean = exports.isBoolean = void 0;\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nexports.isBoolean = isBoolean;\nfunction isntBoolean(val) {\n return !isBoolean(val);\n}\nexports.isntBoolean = isntBoolean;\n//# sourceMappingURL=boolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntString = exports.isString = void 0;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\nfunction isntString(val) {\n return !isString(val);\n}\nexports.isntString = isntString;\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntChar = exports.isChar = void 0;\nconst string_1 = require(\"./string\");\nfunction isChar(val) {\n return (0, string_1.isString)(val)\n && val.length === 1;\n}\nexports.isChar = isChar;\nfunction isntChar(val) {\n return !isChar(val);\n}\nexports.isntChar = isntChar;\n//# sourceMappingURL=char.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntDate = exports.isDate = void 0;\nfunction isDate(val) {\n return val instanceof Date;\n}\nexports.isDate = isDate;\nfunction isntDate(val) {\n return !isDate(val);\n}\nexports.isntDate = isntDate;\n//# sourceMappingURL=date.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inEnum = void 0;\nfunction inEnum(val, _enum) {\n return Object.values(_enum).includes(val);\n}\nexports.inEnum = inEnum;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntError = exports.isError = void 0;\nfunction isError(val) {\n return val instanceof Error;\n}\nexports.isError = isError;\nfunction isntError(val) {\n return !isError(val);\n}\nexports.isntError = isntError;\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFalsy = exports.isFalsy = void 0;\nfunction isFalsy(val) {\n return !val;\n}\nexports.isFalsy = isFalsy;\nfunction isntFalsy(val) {\n return !isFalsy(val);\n}\nexports.isntFalsy = isntFalsy;\n//# sourceMappingURL=falsy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntIterable = exports.isIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.iterator]);\n}\nexports.isIterable = isIterable;\nfunction isntIterable(val) {\n return !isIterable(val);\n}\nexports.isntIterable = isntIterable;\n//# sourceMappingURL=iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNaN = exports.isNaN = exports.isNegativeInfinity = exports.isPositiveInfinity = exports.isFinite = exports.isntNumber = exports.isNumber = void 0;\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nexports.isNumber = isNumber;\nfunction isntNumber(val) {\n return !isNumber(val);\n}\nexports.isntNumber = isntNumber;\nfunction isFinite(val) {\n return Number.isFinite(val);\n}\nexports.isFinite = isFinite;\nfunction isPositiveInfinity(val) {\n return val === Infinity;\n}\nexports.isPositiveInfinity = isPositiveInfinity;\nfunction isNegativeInfinity(val) {\n return val === -Infinity;\n}\nexports.isNegativeInfinity = isNegativeInfinity;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isntNaN(val) {\n return !isNaN(val);\n}\nexports.isntNaN = isntNaN;\n//# sourceMappingURL=number.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyObject = exports.isEmptyObject = exports.isntPlainObject = exports.isPlainObject = exports.isntObject = exports.isObject = void 0;\nconst isPlainObject_1 = __importDefault(require(\"lodash/isPlainObject\"));\nfunction isObject(val) {\n return val !== null\n && typeof val === 'object';\n}\nexports.isObject = isObject;\nfunction isntObject(val) {\n return !isObject(val);\n}\nexports.isntObject = isntObject;\nfunction isPlainObject(val) {\n return (0, isPlainObject_1.default)(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isntPlainObject(val) {\n return !isPlainObject(val);\n}\nexports.isntPlainObject = isntPlainObject;\nfunction isEmptyObject(val) {\n return Object.keys(val).length === 0;\n}\nexports.isEmptyObject = isEmptyObject;\nfunction isntEmptyObject(val) {\n return Object.keys(val).length !== 0;\n}\nexports.isntEmptyObject = isntEmptyObject;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntJsonable = exports.isJsonable = exports.isntJson = exports.isJson = void 0;\nconst null_1 = require(\"./null\");\nconst boolean_1 = require(\"./boolean\");\nconst string_1 = require(\"./string\");\nconst number_1 = require(\"./number\");\nconst array_1 = require(\"./array\");\nconst object_1 = require(\"./object\");\nfunction isJson(val) {\n return (0, null_1.isNull)(val)\n || (0, boolean_1.isBoolean)(val)\n || (0, string_1.isString)(val)\n || (0, number_1.isNumber)(val)\n || ((0, array_1.isArray)(val) && val.every(isJson))\n || ((0, object_1.isPlainObject)(val) && Object.values(val).every(isJson));\n}\nexports.isJson = isJson;\nfunction isntJson(val) {\n return !isJson(val);\n}\nexports.isntJson = isntJson;\nfunction isJsonable(val) {\n try {\n JSON.stringify(val);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isJsonable = isJsonable;\nfunction isntJsonable(val) {\n return !isntJsonable(val);\n}\nexports.isntJsonable = isntJsonable;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPromiseLike = exports.isntPromiseLike = exports.isntPromise = exports.isPromise = void 0;\nconst object_1 = require(\"./object\");\nconst function_1 = require(\"./function\");\nfunction isPromise(val) {\n return val instanceof Promise;\n}\nexports.isPromise = isPromise;\nfunction isntPromise(val) {\n return !isPromise(val);\n}\nexports.isntPromise = isntPromise;\nfunction isntPromiseLike(val) {\n return !isPromiseLike(val);\n}\nexports.isntPromiseLike = isntPromiseLike;\nfunction isPromiseLike(val) {\n return (0, object_1.isObject)(val)\n && (0, function_1.isFunction)(val.then);\n}\nexports.isPromiseLike = isPromiseLike;\n//# sourceMappingURL=promise.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsoluteURL = void 0;\nfunction isAbsoluteURL(str) {\n try {\n new URL(str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isAbsoluteURL = isAbsoluteURL;\n//# sourceMappingURL=url.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntRegExp = exports.isRegExp = void 0;\nfunction isRegExp(val) {\n return val instanceof RegExp;\n}\nexports.isRegExp = isRegExp;\nfunction isntRegExp(val) {\n return !isRegExp(val);\n}\nexports.isntRegExp = isntRegExp;\n//# sourceMappingURL=regexp.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./async-iterable\"), exports);\n__exportStar(require(\"./bigint\"), exports);\n__exportStar(require(\"./boolean\"), exports);\n__exportStar(require(\"./char\"), exports);\n__exportStar(require(\"./date\"), exports);\n__exportStar(require(\"./enum\"), exports);\n__exportStar(require(\"./error\"), exports);\n__exportStar(require(\"./falsy\"), exports);\n__exportStar(require(\"./function\"), exports);\n__exportStar(require(\"./iterable\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./null\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./promise\"), exports);\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./undefined\"), exports);\n__exportStar(require(\"./url\"), exports);\n__exportStar(require(\"./regexp\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction chunkByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return chunkByAsyncIterable(iterable, predicate);\n }\n else {\n return chunkByIterable(iterable, predicate);\n }\n}\nexports.chunkByAsync = chunkByAsync;\nasync function* chunkByAsyncIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for await (const element of iterable) {\n buffer.push(element);\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\nasync function* chunkByIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n buffer.push(element);\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\n//# sourceMappingURL=chunk-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkBy = void 0;\nfunction* chunkBy(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n buffer.push(element);\n if (predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\nexports.chunkBy = chunkBy;\n//# sourceMappingURL=chunk-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.concatAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nconst go_1 = require(\"@blackglory/go\");\nfunction concatAsync(iterable, ...otherIterables) {\n return (0, go_1.go)(async function* () {\n for (const iter of [iterable, ...otherIterables]) {\n if ((0, types_1.isAsyncIterable)(iter)) {\n for await (const element of iter) {\n yield element;\n }\n }\n else {\n for (const element of iter) {\n yield element;\n }\n }\n }\n });\n}\nexports.concatAsync = concatAsync;\n//# sourceMappingURL=concat-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.concat = void 0;\nconst go_1 = require(\"@blackglory/go\");\nfunction concat(iterable, ...otherIterables) {\n return (0, go_1.go)(function* () {\n for (const iter of [iterable, ...otherIterables]) {\n yield* iter;\n }\n });\n}\nexports.concat = concat;\n//# sourceMappingURL=concat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.copyIterable = exports.copyAsyncIterable = void 0;\nasync function* copyAsyncIterable(iterable) {\n for await (const element of iterable) {\n yield element;\n }\n}\nexports.copyAsyncIterable = copyAsyncIterable;\nfunction* copyIterable(iterable) {\n for (const element of iterable) {\n yield element;\n }\n}\nexports.copyIterable = copyIterable;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropUntilAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction dropUntilAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return dropUntilAsyncIterable(iterable, predicate);\n }\n else {\n return dropUntilIterable(iterable, predicate);\n }\n}\nexports.dropUntilAsync = dropUntilAsync;\nasync function* dropUntilAsyncIterable(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n if (await predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = await iterator.next());\n }\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n}\nasync function* dropUntilIterable(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (await predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\n//# sourceMappingURL=drop-until-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropUntil = void 0;\nfunction* dropUntil(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\nexports.dropUntil = dropUntil;\n//# sourceMappingURL=drop-until.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction filterAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return filterAsyncIterable(iterable, predicate);\n }\n else {\n return filterIterable(iterable, predicate);\n }\n}\nexports.filterAsync = filterAsync;\nasync function* filterAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n yield element;\n index++;\n }\n}\nasync function* filterIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=filter-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filter = void 0;\nfunction* filter(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n yield element;\n index++;\n }\n}\nexports.filter = filter;\n//# sourceMappingURL=filter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction flattenByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return flattenByAsyncIterable(iterable, predicate);\n }\n else {\n return flattenByIterable(iterable, predicate);\n }\n}\nexports.flattenByAsync = flattenByAsync;\nasync function* flattenByAsyncIterable(iterable, predicate) {\n const level = 1;\n for await (const element of iterable) {\n if (isFiniteIterable(element) && await predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction flattenByIterable(iterable, predicate) {\n return flatten(iterable, predicate, 1);\n}\nasync function* flatten(iterable, predicate, level) {\n for (const element of iterable) {\n if (isFiniteIterable(element) && await predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction isFiniteIterable(val) {\n return (0, types_1.isIterable)(val) && (0, types_1.isntChar)(val);\n}\n//# sourceMappingURL=flatten-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenDeepAsync = void 0;\nconst flatten_by_async_1 = require(\"./flatten-by-async\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction flattenDeepAsync(iterable, depth = Infinity) {\n (0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');\n (0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');\n return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);\n}\nexports.flattenDeepAsync = flattenDeepAsync;\n//# sourceMappingURL=flatten-deep-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenBy = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction flattenBy(iterable, predicate) {\n return flatten(iterable, predicate, 1);\n}\nexports.flattenBy = flattenBy;\nfunction* flatten(iterable, predicate, level) {\n for (const element of iterable) {\n if (isFiniteIterable(element) && predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction isFiniteIterable(val) {\n return (0, types_1.isIterable)(val) && (0, types_1.isntChar)(val);\n}\n//# sourceMappingURL=flatten-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenDeep = void 0;\nconst flatten_by_1 = require(\"./flatten-by\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction flattenDeep(iterable, depth = Infinity) {\n (0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');\n (0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');\n return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);\n}\nexports.flattenDeep = flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction mapAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return mapAsyncIterable(iterable, fn);\n }\n else {\n return mapIterable(iterable, fn);\n }\n}\nexports.mapAsync = mapAsync;\nasync function* mapAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n yield await fn(element, index);\n index++;\n }\n}\nasync function* mapIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n yield await fn(element, index);\n index++;\n }\n}\n//# sourceMappingURL=map-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.map = void 0;\nfunction* map(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n yield fn(element, index);\n index++;\n }\n}\nexports.map = map;\n//# sourceMappingURL=map.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.repeatAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction repeatAsync(iterable, times) {\n (0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');\n (0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');\n if (times === Infinity)\n warnInfiniteLoop();\n return (0, go_1.go)(async function* () {\n const cache = [];\n if (times > 0) {\n for await (const element of iterable) {\n yield element;\n cache.push(element);\n }\n times--;\n }\n while (times > 0) {\n yield* cache;\n times--;\n }\n });\n}\nexports.repeatAsync = repeatAsync;\nfunction warnInfiniteLoop() {\n if (isProduction())\n return;\n console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');\n}\nfunction isProduction() {\n return process.env.NODE_ENV === 'production';\n}\n//# sourceMappingURL=repeat-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.repeat = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction repeat(iterable, times) {\n (0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');\n (0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');\n if (times === Infinity)\n warnInfiniteLoop();\n return (0, go_1.go)(function* () {\n const cache = [];\n if (times > 0) {\n for (const element of iterable) {\n yield element;\n cache.push(element);\n }\n times--;\n }\n while (times > 0) {\n yield* cache;\n times--;\n }\n });\n}\nexports.repeat = repeat;\nfunction warnInfiniteLoop() {\n if (isProduction())\n return;\n console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');\n}\nfunction isProduction() {\n return process.env.NODE_ENV === 'production';\n}\n//# sourceMappingURL=repeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitAsync = void 0;\nasync function* splitAsync(iterable, separator) {\n let buffer = [];\n for await (const element of iterable) {\n if (element === separator) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n }\n yield buffer;\n}\nexports.splitAsync = splitAsync;\n//# sourceMappingURL=split-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction splitByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return splitByAsyncIterable(iterable, predicate);\n }\n else {\n return splitByIterable(iterable, predicate);\n }\n}\nexports.splitByAsync = splitByAsync;\nasync function* splitByIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\nasync function* splitByAsyncIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\n//# sourceMappingURL=split-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitBy = void 0;\nfunction* splitBy(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\nexports.splitBy = splitBy;\n//# sourceMappingURL=split-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.split = void 0;\nfunction* split(iterable, separator) {\n let buffer = [];\n for (const element of iterable) {\n if (element === separator) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n }\n yield buffer;\n}\nexports.split = split;\n//# sourceMappingURL=split.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeUntilAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction takeUntilAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return takeUntilAsyncIterable(iterable, predicate);\n }\n else {\n return takeUntilIterable(iterable, predicate);\n }\n}\nexports.takeUntilAsync = takeUntilAsync;\nasync function* takeUntilAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\nasync function* takeUntilIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=take-until-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeUntil = void 0;\nfunction* takeUntil(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\nexports.takeUntil = takeUntil;\n//# sourceMappingURL=take-until.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tapAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction tapAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return tapAsyncIterable(iterable, fn);\n }\n else {\n return tapIterable(iterable, fn);\n }\n}\nexports.tapAsync = tapAsync;\nasync function* tapIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n await fn(element, index);\n yield element;\n index++;\n }\n}\nasync function* tapAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n await fn(element, index);\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=tap-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tap = void 0;\nfunction* tap(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n fn(element, index);\n yield element;\n index++;\n }\n}\nexports.tap = tap;\n//# sourceMappingURL=tap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAsyncIterable = void 0;\nasync function* toAsyncIterable(iterable) {\n for (const value of iterable) {\n yield value;\n }\n}\nexports.toAsyncIterable = toAsyncIterable;\n//# sourceMappingURL=to-async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformAsync = void 0;\nasync function* transformAsync(iterable, transformer) {\n yield* transformer(iterable);\n}\nexports.transformAsync = transformAsync;\n//# sourceMappingURL=transform-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transform = void 0;\nfunction* transform(iterable, transformer) {\n yield* transformer(iterable);\n}\nexports.transform = transform;\n//# sourceMappingURL=transform.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqAsync = void 0;\nasync function* uniqAsync(iterable) {\n const bucket = new Set();\n for await (const element of iterable) {\n if (!bucket.has(element)) {\n yield element;\n bucket.add(element);\n }\n }\n}\nexports.uniqAsync = uniqAsync;\n//# sourceMappingURL=uniq-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction uniqByAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return uniqByAsyncIterable(iterable, fn);\n }\n else {\n return uniqByIterable(iterable, fn);\n }\n}\nexports.uniqByAsync = uniqByAsync;\nasync function* uniqByAsyncIterable(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for await (const element of iterable) {\n const result = await fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\nasync function* uniqByIterable(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for (const element of iterable) {\n const result = await fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\n//# sourceMappingURL=uniq-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqBy = void 0;\nfunction* uniqBy(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for (const element of iterable) {\n const result = fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\nexports.uniqBy = uniqBy;\n//# sourceMappingURL=uniq-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniq = void 0;\nfunction* uniq(iterable) {\n const bucket = new Set();\n for (const element of iterable) {\n if (!bucket.has(element)) {\n yield element;\n bucket.add(element);\n }\n }\n}\nexports.uniq = uniq;\n//# sourceMappingURL=uniq.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zipAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nvar Kind;\n(function (Kind) {\n Kind[Kind[\"Sync\"] = 0] = \"Sync\";\n Kind[Kind[\"Async\"] = 1] = \"Async\";\n})(Kind || (Kind = {}));\nfunction zipAsync(iterable, ...otherIterables) {\n return zipWithSize(iterable, ...otherIterables);\n}\nexports.zipAsync = zipAsync;\nasync function* zipWithSize(...iterables) {\n var _a, _b, _c, _d;\n const length = iterables.length;\n const iterators = iterables.map(iterable => {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return [Kind.Async, iterable[Symbol.asyncIterator]()];\n }\n else {\n return [Kind.Sync, iterable[Symbol.iterator]()];\n }\n });\n const dones = iterators.map(() => false);\n try {\n while (true) {\n const result = new Array(length);\n for (let i = 0; i < length; i++) {\n const [kind, iterator] = iterators[i];\n let temp;\n if (kind === Kind.Async) {\n temp = await iterator.next();\n }\n else {\n temp = iterator.next();\n }\n if (temp.done) {\n dones[i] = true;\n return;\n }\n result[i] = temp.value;\n }\n yield result;\n }\n }\n finally {\n const undoneIterators = iterators.filter((_, i) => !dones[i]);\n for (const [kind, iterator] of undoneIterators) {\n if (kind === Kind.Async) {\n await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));\n }\n else {\n (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n }\n }\n}\n//# sourceMappingURL=zip-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./chunk-async\"), exports);\n__exportStar(require(\"./chunk-by-async\"), exports);\n__exportStar(require(\"./chunk-by\"), exports);\n__exportStar(require(\"./chunk\"), exports);\n__exportStar(require(\"./concat-async\"), exports);\n__exportStar(require(\"./concat\"), exports);\n__exportStar(require(\"./drop-async\"), exports);\n__exportStar(require(\"./drop-right-async\"), exports);\n__exportStar(require(\"./drop-right\"), exports);\n__exportStar(require(\"./drop-until-async\"), exports);\n__exportStar(require(\"./drop-until\"), exports);\n__exportStar(require(\"./drop\"), exports);\n__exportStar(require(\"./filter-async\"), exports);\n__exportStar(require(\"./filter\"), exports);\n__exportStar(require(\"./flatten-async\"), exports);\n__exportStar(require(\"./flatten-by-async\"), exports);\n__exportStar(require(\"./flatten-by\"), exports);\n__exportStar(require(\"./flatten-deep-async\"), exports);\n__exportStar(require(\"./flatten-deep\"), exports);\n__exportStar(require(\"./flatten\"), exports);\n__exportStar(require(\"./map-async\"), exports);\n__exportStar(require(\"./map\"), exports);\n__exportStar(require(\"./repeat-async\"), exports);\n__exportStar(require(\"./repeat\"), exports);\n__exportStar(require(\"./slice-async\"), exports);\n__exportStar(require(\"./slice\"), exports);\n__exportStar(require(\"./split-async\"), exports);\n__exportStar(require(\"./split-by-async\"), exports);\n__exportStar(require(\"./split-by\"), exports);\n__exportStar(require(\"./split\"), exports);\n__exportStar(require(\"./take-async\"), exports);\n__exportStar(require(\"./take-right-async\"), exports);\n__exportStar(require(\"./take-right\"), exports);\n__exportStar(require(\"./take-until-async\"), exports);\n__exportStar(require(\"./take-until\"), exports);\n__exportStar(require(\"./take\"), exports);\n__exportStar(require(\"./tap-async\"), exports);\n__exportStar(require(\"./tap\"), exports);\n__exportStar(require(\"./to-async-iterable\"), exports);\n__exportStar(require(\"./transform-async\"), exports);\n__exportStar(require(\"./transform\"), exports);\n__exportStar(require(\"./uniq-async\"), exports);\n__exportStar(require(\"./uniq-by-async\"), exports);\n__exportStar(require(\"./uniq-by\"), exports);\n__exportStar(require(\"./uniq\"), exports);\n__exportStar(require(\"./zip-async\"), exports);\n__exportStar(require(\"./zip\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction chunkAsync(iterable, size) {\n (0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');\n (0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');\n return (0, go_1.go)(async function* () {\n let buffer = [];\n for await (const element of iterable) {\n buffer.push(element);\n if (buffer.length >= size) {\n yield buffer;\n buffer = [];\n }\n }\n if (buffer.length)\n yield buffer;\n });\n}\nexports.chunkAsync = chunkAsync;\n//# sourceMappingURL=chunk-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunk = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction chunk(iterable, size) {\n (0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');\n (0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');\n return (0, go_1.go)(function* () {\n let buffer = [];\n for (const element of iterable) {\n buffer.push(element);\n if (buffer.length >= size) {\n yield buffer;\n buffer = [];\n }\n }\n if (buffer.length)\n yield buffer;\n });\n}\nexports.chunk = chunk;\n//# sourceMappingURL=chunk.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyAsyncIterable)(iterable);\n return (0, go_1.go)(async function* () {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n if (count <= 0)\n break;\n count--;\n }\n while (!done) {\n yield value;\n ({ value, done } = await iterator.next());\n }\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n });\n}\nexports.dropAsync = dropAsync;\n//# sourceMappingURL=drop-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRightAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropRightAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyAsyncIterable)(iterable);\n return (0, go_1.go)(async function* () {\n const arr = await toArrayAsync(iterable);\n const result = arr.slice(0, -count);\n for (const value of result) {\n yield value;\n }\n });\n}\nexports.dropRightAsync = dropRightAsync;\nasync function toArrayAsync(iterable) {\n const result = [];\n for await (const element of iterable) {\n result.push(element);\n }\n return result;\n}\n//# sourceMappingURL=drop-right-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRight = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropRight(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyIterable)(iterable);\n return (0, go_1.go)(function* () {\n const arr = Array.from(iterable);\n yield* arr.slice(0, -count);\n });\n}\nexports.dropRight = dropRight;\n//# sourceMappingURL=drop-right.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.drop = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction drop(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyIterable)(iterable);\n return (0, go_1.go)(function* () {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (count <= 0)\n break;\n count--;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n });\n}\nexports.drop = drop;\n//# sourceMappingURL=drop.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenAsync = void 0;\nconst flatten_deep_async_1 = require(\"./flatten-deep-async\");\nfunction flattenAsync(iterable) {\n return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);\n}\nexports.flattenAsync = flattenAsync;\n//# sourceMappingURL=flatten-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flatten = void 0;\nconst flatten_deep_1 = require(\"./flatten-deep\");\nfunction flatten(iterable) {\n return (0, flatten_deep_1.flattenDeep)(iterable, 1);\n}\nexports.flatten = flatten;\n//# sourceMappingURL=flatten.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sliceAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction sliceAsync(iterable, start, end = Infinity) {\n (0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');\n (0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');\n (0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');\n (0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');\n return (0, go_1.go)(async function* () {\n let index = 0;\n for await (const element of iterable) {\n if (index >= end)\n break;\n if (index >= start)\n yield element;\n index++;\n }\n });\n}\nexports.sliceAsync = sliceAsync;\n//# sourceMappingURL=slice-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slice = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction slice(iterable, start, end = Infinity) {\n (0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');\n (0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');\n (0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');\n (0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');\n return (0, go_1.go)(function* () {\n let index = 0;\n for (const element of iterable) {\n if (index >= end)\n break;\n if (index >= start)\n yield element;\n index++;\n }\n });\n}\nexports.slice = slice;\n//# sourceMappingURL=slice.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(async function* () {\n if (count === 0)\n return;\n for await (const element of iterable) {\n yield element;\n count--;\n if (count === 0)\n break;\n }\n });\n}\nexports.takeAsync = takeAsync;\n//# sourceMappingURL=take-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeRightAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeRightAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(async function* () {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n const buffer = [];\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n buffer.push(value);\n if (buffer.length > count)\n buffer.shift();\n }\n yield* buffer;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n });\n}\nexports.takeRightAsync = takeRightAsync;\n//# sourceMappingURL=take-right-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeRight = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeRight(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(function* () {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n const buffer = [];\n let value;\n while ({ value, done } = iterator.next(), !done) {\n buffer.push(value);\n if (buffer.length > count)\n buffer.shift();\n }\n yield* buffer;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n });\n}\nexports.takeRight = takeRight;\n//# sourceMappingURL=take-right.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.take = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction take(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(function* () {\n if (count === 0)\n return;\n for (const element of iterable) {\n yield element;\n count--;\n if (count === 0)\n break;\n }\n });\n}\nexports.take = take;\n//# sourceMappingURL=take.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zip = void 0;\nfunction zip(iterable, ...otherIterables) {\n return zipWithSize(iterable, ...otherIterables);\n}\nexports.zip = zip;\nfunction* zipWithSize(...iterables) {\n const length = iterables.length;\n const iterators = iterables.map(iterable => iterable[Symbol.iterator]());\n const dones = iterators.map(() => false);\n try {\n while (true) {\n const result = new Array(length);\n for (let i = 0; i < length; i++) {\n const { value, done } = iterators[i].next();\n if (done) {\n dones[i] = true;\n return;\n }\n result[i] = value;\n }\n yield result;\n }\n }\n finally {\n const undoneIterators = iterators.filter((_, i) => !dones[i]);\n undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });\n }\n}\n//# sourceMappingURL=zip.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.consume = void 0;\nfunction consume(iterable, consumer) {\n return consumer(iterable);\n}\nexports.consume = consume;\n//# sourceMappingURL=consume.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.eachAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction eachAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return eachAsyncIterable(iterable, fn);\n }\n else {\n return eachIterable(iterable, fn);\n }\n}\nexports.eachAsync = eachAsync;\nasync function eachAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n await fn(element, index);\n index++;\n }\n}\nasync function eachIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n await fn(element, index);\n index++;\n }\n}\n//# sourceMappingURL=each-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.each = void 0;\nfunction each(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n fn(element, index);\n index++;\n }\n}\nexports.each = each;\n//# sourceMappingURL=each.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.everyAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction everyAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return everyAsyncIterable(iterable, predicate);\n }\n else {\n return everyIterable(iterable, predicate);\n }\n}\nexports.everyAsync = everyAsync;\nasync function everyIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (!await predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\nasync function everyAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (!await predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\n//# sourceMappingURL=every-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.every = void 0;\nfunction every(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (!predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\nexports.every = every;\n//# sourceMappingURL=every.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction findAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return findAsyncIterable(iterable, predicate);\n }\n else {\n return findIterable(iterable, predicate);\n }\n}\nexports.findAsync = findAsync;\nasync function findIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\nasync function findAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\n//# sourceMappingURL=find-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.find = void 0;\nfunction find(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\nexports.find = find;\n//# sourceMappingURL=find.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.firstAsync = void 0;\nasync function firstAsync(iterable) {\n for await (const element of iterable) {\n return element;\n }\n return undefined;\n}\nexports.firstAsync = firstAsync;\n//# sourceMappingURL=first-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.first = void 0;\nfunction first(iterable) {\n for (const element of iterable) {\n return element;\n }\n return undefined;\n}\nexports.first = first;\n//# sourceMappingURL=first.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.includesAsync = void 0;\nasync function includesAsync(iterable, value) {\n for await (const element of iterable) {\n if (element === value)\n return true;\n }\n return false;\n}\nexports.includesAsync = includesAsync;\n//# sourceMappingURL=includes-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.includes = void 0;\nfunction includes(iterable, value) {\n for (const element of iterable) {\n if (element === value)\n return true;\n }\n return false;\n}\nexports.includes = includes;\n//# sourceMappingURL=includes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matchAsync = void 0;\nasync function matchAsync(iterable, sequence) {\n const sequenceLength = sequence.length;\n let matchCount = 0;\n for await (const element of iterable) {\n if (element === sequence[matchCount])\n matchCount++;\n if (matchCount === sequenceLength)\n return true;\n }\n return false;\n}\nexports.matchAsync = matchAsync;\n//# sourceMappingURL=match-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.match = void 0;\nfunction match(iterable, sequence) {\n const sequenceLength = sequence.length;\n let matchCount = 0;\n for (const element of iterable) {\n if (element === sequence[matchCount])\n matchCount++;\n if (matchCount === sequenceLength)\n return true;\n }\n return false;\n}\nexports.match = match;\n//# sourceMappingURL=match.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduceAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction reduceAsync(iterable, fn, initialValue) {\n if ((0, types_1.isUndefined)(initialValue)) {\n return reduceAsyncWithoutInitialValue(iterable, fn);\n }\n else {\n return reduceAsyncWithInitialValue(iterable, fn, initialValue);\n }\n}\nexports.reduceAsync = reduceAsync;\nfunction reduceAsyncWithInitialValue(iterable, fn, initialValue) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return reduceAsyncIterable(iterable);\n }\n else {\n return reduceIterable(iterable);\n }\n async function reduceIterable(iterable) {\n let result = initialValue, index = 0;\n for (const currentValue of iterable) {\n result = await fn(result, currentValue, index++);\n }\n return result;\n }\n async function reduceAsyncIterable(iterable) {\n let result = initialValue, index = 0;\n for await (const currentValue of iterable) {\n result = await fn(result, currentValue, index++);\n }\n return result;\n }\n}\nfunction reduceAsyncWithoutInitialValue(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return reduceAsyncIterable(iterable);\n }\n else {\n return reduceIterable(iterable);\n }\n async function reduceAsyncIterable(iterable) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let result = await readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n result = await fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n async function readInitialValue(iterator) {\n const result = await iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n }\n async function reduceIterable(iterable) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let result = readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n result = await fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n function readInitialValue(iterator) {\n const result = iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n }\n}\n//# sourceMappingURL=reduce-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduce = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction reduce(iterable, fn, initialValue) {\n if ((0, types_1.isUndefined)(initialValue)) {\n return reduceWithoutInitialValue(iterable, fn);\n }\n else {\n return reduceWithInitialValue(iterable, fn, initialValue);\n }\n}\nexports.reduce = reduce;\nfunction reduceWithInitialValue(iterable, fn, initialValue) {\n let result = initialValue, index = 0;\n for (const currentValue of iterable) {\n result = fn(result, currentValue, index++);\n }\n return result;\n}\nfunction reduceWithoutInitialValue(iterable, fn) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let result = readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n result = fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n function readInitialValue(iterator) {\n const result = iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n}\n//# sourceMappingURL=reduce.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.someAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction someAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return someAsyncIterable(iterable, predicate);\n }\n else {\n return someIterable(iterable, predicate);\n }\n}\nexports.someAsync = someAsync;\nasync function someIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\nasync function someAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\n//# sourceMappingURL=some-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.some = void 0;\nfunction some(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\nexports.some = some;\n//# sourceMappingURL=some.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lastAsync = void 0;\nasync function lastAsync(iterable) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let value;\n let result;\n while ({ value, done } = await iterator.next(), !done) {\n result = value;\n }\n return result;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n}\nexports.lastAsync = lastAsync;\n//# sourceMappingURL=last-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.last = void 0;\nfunction last(iterable) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let value;\n let result;\n while ({ value, done } = iterator.next(), !done) {\n result = value;\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\nexports.last = last;\n//# sourceMappingURL=last.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toArrayAsync = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toArrayAsync(iterable) {\n return (0, consume_1.consume)(iterable, async (iterable) => {\n const result = [];\n for await (const element of iterable) {\n result.push(element);\n }\n return result;\n });\n}\nexports.toArrayAsync = toArrayAsync;\n//# sourceMappingURL=to-array-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toArray = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toArray(iterable) {\n return (0, consume_1.consume)(iterable, iterable => Array.from(iterable));\n}\nexports.toArray = toArray;\n//# sourceMappingURL=to-array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSetAsync = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toSetAsync(iterable) {\n return (0, consume_1.consume)(iterable, async (iterable) => {\n const result = new Set();\n for await (const element of iterable) {\n result.add(element);\n }\n return result;\n });\n}\nexports.toSetAsync = toSetAsync;\n//# sourceMappingURL=to-set-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSet = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toSet(iterable) {\n return (0, consume_1.consume)(iterable, iterable => new Set(iterable));\n}\nexports.toSet = toSet;\n//# sourceMappingURL=to-set.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.count = void 0;\nfunction count(iterable) {\n let count = 0;\n for (const _ of iterable) {\n count++;\n }\n return count;\n}\nexports.count = count;\n//# sourceMappingURL=count.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.countAsync = void 0;\nasync function countAsync(iterable) {\n let count = 0;\n for await (const _ of iterable) {\n count++;\n }\n return count;\n}\nexports.countAsync = countAsync;\n//# sourceMappingURL=count-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.groupBy = void 0;\nconst each_1 = require(\"./each\");\nfunction groupBy(iterable, fn) {\n const map = new Map();\n (0, each_1.each)(iterable, (element, index) => {\n const group = fn(element, index);\n if (!map.has(group)) {\n map.set(group, []);\n }\n map.get(group).push(element);\n });\n return map;\n}\nexports.groupBy = groupBy;\n//# sourceMappingURL=group-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.groupByAsync = void 0;\nconst each_async_1 = require(\"./each-async\");\nasync function groupByAsync(iterable, fn) {\n const map = new Map();\n await (0, each_async_1.eachAsync)(iterable, async (element, index) => {\n const group = await fn(element, index);\n if (!map.has(group)) {\n map.set(group, []);\n }\n map.get(group).push(element);\n });\n return map;\n}\nexports.groupByAsync = groupByAsync;\n//# sourceMappingURL=group-by-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./middleware\"), exports);\n__exportStar(require(\"./output\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./consume\"), exports);\n__exportStar(require(\"./each-async\"), exports);\n__exportStar(require(\"./each\"), exports);\n__exportStar(require(\"./every-async\"), exports);\n__exportStar(require(\"./every\"), exports);\n__exportStar(require(\"./find-async\"), exports);\n__exportStar(require(\"./find\"), exports);\n__exportStar(require(\"./first-async\"), exports);\n__exportStar(require(\"./first\"), exports);\n__exportStar(require(\"./includes-async\"), exports);\n__exportStar(require(\"./includes\"), exports);\n__exportStar(require(\"./match-async\"), exports);\n__exportStar(require(\"./match\"), exports);\n__exportStar(require(\"./reduce-async\"), exports);\n__exportStar(require(\"./reduce\"), exports);\n__exportStar(require(\"./some-async\"), exports);\n__exportStar(require(\"./some\"), exports);\n__exportStar(require(\"./last-async\"), exports);\n__exportStar(require(\"./last\"), exports);\n__exportStar(require(\"./to-array-async\"), exports);\n__exportStar(require(\"./to-array\"), exports);\n__exportStar(require(\"./to-set-async\"), exports);\n__exportStar(require(\"./to-set\"), exports);\n__exportStar(require(\"./count\"), exports);\n__exportStar(require(\"./count-async\"), exports);\n__exportStar(require(\"./group-by\"), exports);\n__exportStar(require(\"./group-by-async\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.traverseErrorPrototypeChain = void 0;\nfunction* traverseErrorPrototypeChain(err) {\n let current = err;\n while ((current = Object.getPrototypeOf(current))) {\n yield current;\n if (current === Error.prototype)\n break;\n }\n}\nexports.traverseErrorPrototypeChain = traverseErrorPrototypeChain;\n//# sourceMappingURL=traverse-error-prototype-chain.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorNames = void 0;\nconst types_1 = require(\"@blackglory/types\");\nconst traverse_error_prototype_chain_1 = require(\"./traverse-error-prototype-chain\");\nfunction* getErrorNames(err) {\n var _a;\n if ((0, types_1.isError)(err)) {\n for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {\n if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {\n yield prototype.constructor.name;\n }\n }\n }\n else {\n yield err.name;\n yield* err.ancestors;\n }\n}\nexports.getErrorNames = getErrorNames;\n//# sourceMappingURL=get-error-names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSerializableError = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction isSerializableError(val) {\n return (0, types_1.isObject)(val)\n && (0, types_1.isString)(val.name)\n && (0, types_1.isString)(val.message)\n && ((0, types_1.isString)(val.stack) || (0, types_1.isNull)(val.stack))\n && ((0, types_1.isArray)(val.ancestors) && val.ancestors.every(types_1.isString));\n}\nexports.isSerializableError = isSerializableError;\n//# sourceMappingURL=serializable-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CustomError = void 0;\nconst iterable_operator_1 = require(\"iterable-operator\");\nconst get_error_names_1 = require(\"./get-error-names\");\nconst types_1 = require(\"@blackglory/types\");\nconst serializable_error_1 = require(\"./serializable-error\");\nclass CustomError extends Error {\n get name() {\n var _a, _b;\n return (_b = (_a = (0, iterable_operator_1.first)((0, get_error_names_1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';\n }\n static [Symbol.hasInstance](instance) {\n var _a;\n if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {\n const reversedClassNames = [\n (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,\n ...(0, get_error_names_1.getErrorNames)(this.prototype)\n ].reverse();\n const reversedInstanceNames = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(instance)).reverse();\n return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);\n }\n else {\n return false;\n }\n }\n}\nexports.CustomError = CustomError;\n//# sourceMappingURL=custom-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssertionError = void 0;\nconst custom_error_1 = require(\"./custom-error\");\nclass AssertionError extends custom_error_1.CustomError {\n}\nexports.AssertionError = AssertionError;\n//# sourceMappingURL=assertion-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pass = void 0;\nfunction pass() { }\nexports.pass = pass;\n//# sourceMappingURL=pass.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.passAsync = void 0;\nasync function passAsync() { }\nexports.passAsync = passAsync;\n//# sourceMappingURL=pass-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./pass\"), exports);\n__exportStar(require(\"./pass-async\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hydrate = void 0;\nconst pass_1 = require(\"@blackglory/pass\");\nfunction hydrate(err) {\n var _a;\n const errorNames = [err.name, ...err.ancestors]\n .slice(0, -1)\n .reverse();\n let errorConstructor = Error;\n for (const name of errorNames) {\n errorConstructor = createChildErrorConstructor(errorConstructor, name);\n }\n const result = new errorConstructor();\n result.name = err.name;\n result.message = err.message;\n result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;\n return result;\n}\nexports.hydrate = hydrate;\nfunction createChildErrorConstructor(parentErrorConstructor, name) {\n const constructor = function () { (0, pass_1.pass)(); };\n constructor.prototype = Object.create(parentErrorConstructor.prototype);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'name', { value: name });\n return constructor;\n}\n//# sourceMappingURL=hydrate.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./custom-error\"), exports);\n__exportStar(require(\"./assertion-error\"), exports);\n__exportStar(require(\"./serializable-error\"), exports);\n__exportStar(require(\"./normalize\"), exports);\n__exportStar(require(\"./hydrate\"), exports);\n__exportStar(require(\"./assert\"), exports);\n__exportStar(require(\"./get-error-names\"), exports);\n__exportStar(require(\"./traverse-error-prototype-chain\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalize = void 0;\nconst get_error_names_1 = require(\"./get-error-names\");\nconst iterable_operator_1 = require(\"iterable-operator\");\nfunction normalize(err) {\n var _a;\n const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));\n return {\n name,\n ancestors,\n message: err.message,\n stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null\n };\n}\nexports.normalize = normalize;\n//# sourceMappingURL=normalize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = void 0;\nconst assertion_error_1 = require(\"./assertion-error\");\nfunction assert(condition, message) {\n if (!condition)\n throw new assertion_error_1.AssertionError(message);\n}\nexports.assert = assert;\n//# sourceMappingURL=assert.js.map","import { assert } from '@blackglory/errors'\nimport { first } from 'iterable-operator'\n\nexport class LRUMap<K, V> {\n private limit: number\n private map = new Map<K, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(limit: number) {\n assert(Number.isInteger(limit), 'The parameter limit must be an integer')\n assert(limit > 0, 'The parameter limit must be a positive value')\n\n this.limit = limit\n }\n\n set(key: K, value: V): this {\n if (this.map.has(key)) {\n this.updateItem(key, value)\n } else {\n if (this.map.size === this.limit) {\n this.map.delete(this.getColdestKey()!)\n }\n this.map.set(key, value)\n }\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n if (!this.has(key)) return undefined\n\n const value = this.map.get(key)!\n this.updateItem(key, value)\n return value\n }\n\n delete(key: K): boolean {\n return this.map.delete(key)\n }\n\n clear(): void {\n this.map.clear()\n }\n\n /**\n * Reinsert the item.\n */\n private updateItem(key: K, value: V): void {\n this.map.delete(key)\n this.map.set(key, value)\n }\n\n /**\n * Return the earliest key inserted in the Map\n */\n private getColdestKey(): K | undefined {\n return first(this.map.keys())\n }\n}\n","import { setSchedule } from 'extra-timers'\n\nexport class ExpirableMap<K, V> {\n private map = new Map<K, V>()\n private cancelClearTimeout?: () => void\n /**\n * 按过期时间升序排列所有项目的元数据\n */ \n itemMetadataSortedByExpirationTime: Array<{ key: K; expirationTime: number }> = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n set(key: K, value: V, maxAge: number): this {\n this.map.set(key, value)\n this.removeItemMetadata(key)\n this.addItemMetadata(key, Date.now() + maxAge)\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n return this.map.get(key)\n }\n\n delete(key: K): boolean {\n const exists = this.map.delete(key)\n if (exists) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被删除的项目是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n return exists\n }\n\n clear(): void {\n this.map.clear()\n this.cancelClearTimeout?.()\n this.itemMetadataSortedByExpirationTime = []\n }\n\n private addItemMetadata(key: K, expirationTime: number): void {\n for (let i = 0; i < this.itemMetadataSortedByExpirationTime.length; i++) {\n const item = this.itemMetadataSortedByExpirationTime[i]\n if (expirationTime < item.expirationTime) {\n this.itemMetadataSortedByExpirationTime.splice(i, 0, { key, expirationTime })\n\n // 如果本次插入导致原先的第一个项目不再是低一个项目, 则需要重新规划过期回调\n if (i === 0) {\n this.rescheduleClearTimeout()\n }\n return\n }\n }\n\n // 如果代码运行到此处, 意味着数组要么为空, 要么新项目过期时间大于数组内的所有项目, 故直接插入到数组尾端.\n this.itemMetadataSortedByExpirationTime.push({ key, expirationTime })\n // 如果新插入的项目是唯一而项目, 则需要重新规划过期回调\n if (this.itemMetadataSortedByExpirationTime.length === 1) {\n this.rescheduleClearTimeout()\n }\n }\n\n private removeItemMetadata(key: K): void {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n if (index >= 0) {\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被移除的是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n }\n\n private clearExpiredItems(timestamp: number): void {\n const indexOfFirstUnexpired = this.itemMetadataSortedByExpirationTime.findIndex(\n x => x.expirationTime > timestamp\n )\n const expiredItemKeys =\n indexOfFirstUnexpired >= 0\n ? this.itemMetadataSortedByExpirationTime.splice(0, indexOfFirstUnexpired)\n : this.itemMetadataSortedByExpirationTime.splice(0, this.itemMetadataSortedByExpirationTime.length)\n expiredItemKeys.forEach(x => this.map.delete(x.key))\n }\n\n private rescheduleClearTimeout(): void {\n this.cancelClearTimeout?.()\n\n if (this.itemMetadataSortedByExpirationTime.length > 0) {\n const item = this.itemMetadataSortedByExpirationTime[0]\n if (Number.isFinite(item.expirationTime)) {\n const cancel = setSchedule(item.expirationTime, () => {\n this.clearExpiredItems(Date.now())\n this.rescheduleClearTimeout()\n })\n this.cancelClearTimeout = () => {\n cancel()\n this.cancelClearTimeout = undefined\n }\n }\n }\n }\n}\n","import { assert } from '@blackglory/errors'\nimport { first } from 'iterable-operator'\nimport { setSchedule } from 'extra-timers'\n\n/**\n * TLRUMap = LRUMap + ExpirableMap\n */\nexport class TLRUMap<K, V> {\n private limit: number\n private map = new Map<K, V>()\n private cancelClearTimeout?: () => void\n /**\n * 按过期时间升序排列所有项目的元数据\n */ \n protected itemMetadataSortedByExpirationTime: Array<{ key: K; expirationTime: number }> = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(limit: number) {\n assert(Number.isInteger(limit), 'The parameter limit must be an integer')\n assert(limit > 0, 'The parameter limit must be a positive value')\n\n this.limit = limit\n }\n\n set(key: K, value: V, maxAge: number): this {\n if (this.map.has(key)) {\n this.updateItem(key, value)\n this.removeItemMetadata(key)\n this.addItemMetadata(key, Date.now() + maxAge)\n } else {\n if (this.map.size === this.limit) {\n this.map.delete(this.getColdestKey()!)\n }\n this.map.set(key, value)\n this.addItemMetadata(key, Date.now() + maxAge)\n }\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n if (this.has(key)) {\n const value = this.map.get(key)!\n this.updateItem(key, value)\n return value\n } else {\n return undefined\n }\n }\n\n delete(key: K): boolean {\n const result = this.map.delete(key)\n if (result) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被删除的项目是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n return result\n }\n\n clear(): void {\n this.map.clear()\n this.cancelClearTimeout?.()\n this.itemMetadataSortedByExpirationTime = []\n }\n\n /**\n * 重新插入项目, 这会使项目置于#map迭代器的末端.\n */\n private updateItem(key: K, value: V): void {\n this.map.delete(key)\n this.map.set(key, value)\n }\n\n private addItemMetadata(key: K, expirationTime: number) {\n for (let i = 0; i < this.itemMetadataSortedByExpirationTime.length; i++) {\n const item = this.itemMetadataSortedByExpirationTime[i]\n if (expirationTime < item.expirationTime) {\n this.itemMetadataSortedByExpirationTime.splice(i, 0, { key, expirationTime })\n\n // 如果本次插入导致原先的第一个项目不再是低一个项目, 则需要重新规划过期回调\n if (i === 0) {\n this.rescheduleClearTimeout()\n }\n return\n }\n }\n\n // 如果代码运行到此处, 意味着数组要么为空, 要么新项目过期时间大于数组内的所有项目, 故直接插入到数组尾端.\n this.itemMetadataSortedByExpirationTime.push({ key, expirationTime })\n // 如果新插入的项目是唯一而项目, 则需要重新规划过期回调\n if (this.itemMetadataSortedByExpirationTime.length === 1) {\n this.rescheduleClearTimeout()\n }\n }\n\n private removeItemMetadata(key: K) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n if (index >= 0) {\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被移除的是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n }\n\n private clearExpiredItems(timestamp: number) {\n const indexOfFirstUnexpiredItem = this.itemMetadataSortedByExpirationTime.findIndex(\n x => x.expirationTime > timestamp\n )\n const expiredItemKeys =\n indexOfFirstUnexpiredItem >= 0\n ? this.itemMetadataSortedByExpirationTime.splice(0, indexOfFirstUnexpiredItem)\n : this.itemMetadataSortedByExpirationTime.splice(0, this.itemMetadataSortedByExpirationTime.length)\n expiredItemKeys.forEach(x => this.map.delete(x.key))\n }\n\n private rescheduleClearTimeout() {\n this.cancelClearTimeout?.()\n\n if (this.itemMetadataSortedByExpirationTime.length > 0) {\n const item = this.itemMetadataSortedByExpirationTime[0]\n if (Number.isFinite(item.expirationTime)) {\n const cancel = setSchedule(item.expirationTime, () => {\n this.clearExpiredItems(Date.now())\n this.rescheduleClearTimeout()\n })\n this.cancelClearTimeout = () => {\n cancel()\n this.cancelClearTimeout = undefined\n }\n }\n }\n }\n\n /**\n * Return the earliest key inserted in the Map\n */\n private getColdestKey(): K | undefined {\n return first(this.map.keys())\n }\n}\n","import { zip, toArray, map } from 'iterable-operator'\nimport { isntUndefined } from '@blackglory/types'\n\nclass TrieNode<T, U> {\n children = new Map<T, TrieNode<T, U>>()\n\n constructor(public value?: U) {}\n}\n\nexport class TrieMap<K extends Iterable<T>, V, T = unknown> {\n private root = new TrieNode<T, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n * entries(): IterableIterator<[key: T[], value: V]> {\n yield* dfs(this.root, [])\n\n function* dfs(node: TrieNode<T, V>, paths: T[]): IterableIterator<[key: T[], value: V]> {\n for (const [path, childNode] of node.children) {\n const newPaths = [...paths, path]\n if (isntUndefined(childNode.value)) {\n yield [newPaths, childNode.value]\n }\n\n yield* dfs(childNode, newPaths)\n }\n }\n }\n\n keys(): IterableIterator<T[]> {\n return map(this.entries(), ([key]) => key)\n }\n\n values(): IterableIterator<V> {\n return map(this.entries(), ([_, value]) => value)\n }\n\n set(key: K, value: V): this {\n let node = this.root\n for (const part of key) {\n if (!node.children.has(part)) {\n node.children.set(part, new TrieNode<T, V>())\n }\n node = node.children.get(part)!\n }\n\n node.value = value\n return this\n }\n\n has(key: K): boolean {\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n node = node.children.get(part)!\n } else {\n return false\n }\n }\n\n return node.value !== undefined\n }\n\n get(key: K): V | undefined {\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n node = node.children.get(part)!\n } else {\n return undefined\n }\n }\n\n return node.value\n }\n\n delete(key: K): boolean {\n const parentNodes: TrieNode<T, V>[] = []\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n parentNodes.push(node)\n node = node.children.get(part)!\n } else {\n return false\n }\n }\n\n delete node.value\n\n // 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀\n if (node.children.size === 0) {\n for (const [part, parentNode] of toArray(zip(key, parentNodes)).reverse()) {\n parentNode.children.delete(part)\n if (parentNode.children.size !== 0) break\n }\n }\n return true\n }\n}\n","export class SparseSet implements Iterable<number> {\n private indexToValue: number[] = []\n private valueToIndex: Array<number | undefined>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.indexToValue[Symbol.iterator]()\n }\n\n constructor(array: number[] = []) {\n const valueToIndex: Array<number | undefined> = []\n if (array.length > 0) {\n for (const [index, value] of array.entries()) {\n valueToIndex[value] = index\n }\n }\n\n this.valueToIndex = valueToIndex\n }\n\n values(): IterableIterator<number> {\n return this.indexToValue[Symbol.iterator]()\n }\n\n has(value: number): boolean {\n // 跟一般的实现不同, 不需要访问values数组.\n return value in this.valueToIndex\n }\n\n add(value: number): void {\n if (!this.has(value)) {\n const index = this.indexToValue.length\n this.indexToValue.push(value)\n this.valueToIndex[value] = index\n }\n }\n\n delete(value: number): boolean {\n if (this.has(value)) {\n const lastValue = this.indexToValue.pop()!\n if (value === lastValue) {\n delete this.valueToIndex[value]\n } else {\n const index = this.valueToIndex[value]!\n this.indexToValue[index] = lastValue\n this.valueToIndex[lastValue] = index\n // 跟一般的实现不同, 直接删除值的索引.\n delete this.valueToIndex[value]\n }\n return true\n } else {\n return false\n }\n }\n}\n","export class SparseMap<T> {\n private keyToIndex: Array<number | undefined> = []\n private indexToKey: number[] = []\n private indexToValue: T[] = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.indexToKey.length\n }\n\n get internalArray(): T[] {\n return this.indexToValue\n }\n\n * entries(): IterableIterator<[key: number, value: T]> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield [this.indexToKey[i], this.indexToValue[i]]\n }\n }\n\n keys(): IterableIterator<number> {\n return this.indexToKey.values()\n }\n\n values(): IterableIterator<T> {\n return this.indexToValue.values()\n }\n\n getInternalIndexOfKey(key: number): number | undefined {\n return this.keyToIndex[key]\n }\n\n has(key: number): boolean {\n // 跟一般的稀疏集实现不同, 不需要访问values数组.\n return key in this.keyToIndex\n }\n\n get(key: number): T | undefined {\n if (this.has(key)) {\n const index = this.keyToIndex[key]!\n return this.indexToValue[index]\n } else {\n return undefined\n }\n }\n\n set(key: number, value: T): void {\n if (this.has(key)) {\n const index = this.keyToIndex[key]!\n this.indexToValue[index] = value\n } else {\n const index = this.indexToKey.length\n this.indexToKey.push(key)\n this.indexToValue.push(value)\n this.keyToIndex[key] = index\n }\n }\n\n delete(key: number): void {\n if (this.has(key)) {\n const lastKey = this.indexToKey.pop()!\n const lastValue = this.indexToValue.pop()!\n if (key === lastKey) {\n delete this.keyToIndex[key]\n } else {\n const index = this.keyToIndex[key]!\n this.indexToKey[index] = lastKey\n this.indexToValue[index] = lastValue\n this.keyToIndex[lastKey] = index\n delete this.keyToIndex[key]\n }\n }\n }\n}\n","import { assert } from '@blackglory/errors'\nimport { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'\nimport { DynamicTypedArray } from './dynamic-typed-array'\n\nexport class TypedSparseMap<T extends TypedArrayConstructor> {\n private keyToIndex: Array<number | undefined> = []\n private indexToKey: number[] = []\n private indexToValue: DynamicTypedArray<T>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.indexToKey.length\n }\n\n get internalTypedArray(): TypedArrayOfConstructor<T> {\n return this.indexToValue.internalTypedArray\n }\n\n constructor(array: DynamicTypedArray<T>) {\n assert(array.length === 0, 'array should be empty')\n\n this.indexToValue = array\n }\n\n * entries(): IterableIterator<[key: number, value: number]> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield [\n this.indexToKey[i]\n , this.indexToValue.internalTypedArray[i]\n ]\n }\n }\n\n keys(): IterableIterator<number> {\n return this.indexToKey.values()\n }\n\n * values(): IterableIterator<number> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield this.indexToValue.internalTypedArray[i]\n }\n }\n\n getInternalIndexOfKey(key: number): number | undefined {\n return this.keyToIndex[key]\n }\n\n has(key: number): boolean {\n const index = this.keyToIndex[key]\n return this.indexToKey[index!] === key\n }\n\n get(key: number): number | undefined {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n return this.indexToValue.internalTypedArray[index!]\n } else {\n return undefined\n }\n }\n\n set(key: number, value: number): void {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n this.indexToValue.internalTypedArray[index!] = value\n } else {\n const index = this.indexToKey.length\n this.indexToKey.push(key)\n this.indexToValue.push(value)\n this.keyToIndex[key] = index\n }\n }\n\n delete(key: number): void {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n const lastKey = this.indexToKey.pop()!\n const lastValue = this.indexToValue.pop()!\n if (key !== lastKey) {\n this.indexToKey[index!] = lastKey\n this.indexToValue.internalTypedArray[index!] = lastValue\n this.keyToIndex[lastKey] = index\n }\n }\n }\n}\n","import { UnsignedTypedArrayConstructor } from 'justypes'\nimport { DynamicTypedArray } from './dynamic-typed-array'\n\nexport class TypedSparseSet<\n T extends UnsignedTypedArrayConstructor\n> implements Iterable<number> {\n private valueToIndex: Array<number | undefined>\n private indexToValue: DynamicTypedArray<T>\n\n constructor(array: DynamicTypedArray<T>) {\n const valueToIndex: Array<number | undefined> = []\n if (array.length > 0) {\n for (const [index, value] of array.internalTypedArray.entries()) {\n valueToIndex[value] = index\n }\n }\n\n this.indexToValue = array\n this.valueToIndex = valueToIndex\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n for (let i = 0; i < this.indexToValue.length; i++) {\n yield this.indexToValue.internalTypedArray[i]\n }\n }\n\n has(value: number): boolean {\n const index = this.valueToIndex[value]\n return this.indexToValue.internalTypedArray[index!] === value\n }\n\n add(value: number): void {\n if (!this.has(value)) {\n const index = this.indexToValue.length\n this.indexToValue.push(value)\n this.valueToIndex[value] = index\n }\n }\n\n delete(value: number): boolean {\n const index = this.valueToIndex[value]\n if (this.indexToValue.internalTypedArray[index!] === value) {\n const lastValue = this.indexToValue.pop()!\n if (value !== lastValue) {\n this.indexToValue.internalTypedArray[index!] = lastValue\n this.valueToIndex[lastValue] = index\n }\n return true\n } else {\n return false\n }\n }\n}\n","import { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'\nimport { assert } from '@blackglory/errors'\n\ninterface IDynamicTypedArrayOptions {\n capacity?: number\n growthFactor?: number\n}\n\n// 相关提案: https://github.com/tc39/proposal-resizablearraybuffer\nexport class DynamicTypedArray<T extends TypedArrayConstructor> {\n private array: TypedArrayOfConstructor<T>\n private _length: number = 0\n readonly growthFactor: number\n\n get internalTypedArray(): TypedArrayOfConstructor<T> {\n return this.array\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get BYTES_PER_ELEMENT(): number {\n return this.typedArrayConstructor.BYTES_PER_ELEMENT\n }\n\n /**\n * 数组当前的容量.\n */\n get capacity(): number {\n return this.array.length\n }\n\n /**\n * 数组逻辑上的长度, 总是小于或等于capacity.\n */\n get length(): number {\n return this._length\n }\n\n constructor(\n private typedArrayConstructor: T\n , {\n capacity = 0\n , growthFactor = 1.5\n }: IDynamicTypedArrayOptions = {}\n ) {\n assert(Number.isInteger(capacity), 'capacity must be an integer')\n assert(capacity >= 0, 'capacity must be greater than or equal to 0')\n assert(growthFactor >= 1, 'growthFactory must be greater than or equal to 1')\n\n this.array = new typedArrayConstructor(capacity) as TypedArrayOfConstructor<T>\n this.growthFactor = growthFactor\n }\n\n set(index: number, value: number): void {\n if (index >= this.capacity) {\n const newCapacity = computeNewCapacity(\n this.capacity\n , index + 1\n , this.growthFactor\n )\n this.resize(newCapacity)\n }\n\n if (index >= this._length) {\n this._length = index + 1\n }\n\n this.array[index] = value\n }\n\n get(index: number): number | undefined {\n return index < this._length\n ? this.array[index]\n : undefined\n }\n\n push(...values: number[]): void {\n const newLength = this._length + values.length\n if (newLength > this.capacity) {\n const newCapacity = computeNewCapacity(\n this.capacity\n , newLength\n , this.growthFactor\n )\n this.resize(newCapacity)\n }\n\n for (const value of values) {\n this.array[this._length++] = value\n }\n }\n\n pop(): number | undefined {\n if (this._length > 0) {\n const value = this.array[this._length - 1]\n this._length--\n\n const newCapacity = computeNewCapacity(\n this.capacity\n , this.length\n , this.growthFactor\n )\n this.resize(newCapacity)\n\n return value\n } else {\n return undefined\n }\n }\n\n sort(compare?: (a: number, b: number) => number): void {\n const capacity = this.capacity\n this.resize(this.length)\n this.array.sort(compare)\n this.resize(capacity)\n }\n\n private resize(newCapacity: number): void {\n if (this.array.length === newCapacity) {\n return\n } else if (this.array.length < newCapacity) {\n const newArray = new this.typedArrayConstructor(newCapacity)\n newArray.set(this.array)\n this.array = newArray as TypedArrayOfConstructor<T>\n } else if (this.array.length > newCapacity) {\n const newArray = new this.typedArrayConstructor(newCapacity)\n // 不需要的部分将被舍弃.\n for (let i = newCapacity; i--;) {\n newArray[i] = this.array[i]\n }\n this.array = newArray as TypedArrayOfConstructor<T>\n }\n }\n}\n\nexport function computeNewCapacity(\n oldCapacity: number\n, targetLength: number\n, growthFactor: number\n): number {\n if (growthFactor === 1) {\n return targetLength\n } else {\n if (oldCapacity === targetLength) {\n return targetLength\n } else if (oldCapacity < targetLength) { \n // 增加容量以适配targetLength\n let newCapacity = Math.max(oldCapacity, 1)\n while (newCapacity < targetLength) {\n newCapacity *= growthFactor\n }\n return Math.floor(newCapacity)\n } else {\n // 尝试减少容量以适配targetLength\n\n // `targetLength = 0`是特殊情况,\n // 此时无论怎么将oldCapacity除以growthFactory几次, 都不可能得到比targetLength小的结果.\n if (targetLength === 0) {\n return 0\n } else {\n let newCapacity = oldCapacity\n while (true) {\n const temp = newCapacity / growthFactor\n if (temp < targetLength) {\n break\n } else {\n newCapacity = temp\n }\n }\n return Math.floor(newCapacity)\n }\n }\n }\n}\n","import { isntNull } from '@blackglory/types'\n\nexport class SkipListNode<T> {\n previous: SkipListNode<T> | null = null\n next: SkipListNode<T> | null = null\n up: SkipListNode<T> | null = null\n down: SkipListNode<T> | null = null\n\n constructor(public value: T | null) {}\n}\n\nexport class SkipList<T> {\n // 最顶层的首个节点\n private head: SkipListNode<T> = new SkipListNode<T>(null)\n // 最顶层的最后一个节点\n private tail: SkipListNode<T> = new SkipListNode<T>(null)\n\n private height: number = 0\n private _size: number = 0\n\n // 元素数量\n get size(): number {\n return this._size\n }\n\n constructor(private compare: (a: T, b: T) => number) {\n this.head.next = this.tail\n this.tail.previous = this.head\n }\n\n * elements(): IterableIterator<SkipListNode<T>> {\n let currentNode: SkipListNode<T> = this.head\n\n while (currentNode.down) {\n currentNode = currentNode.down\n }\n\n while (currentNode.next && isntNull(currentNode.next.value)) {\n currentNode = currentNode.next\n yield currentNode\n }\n }\n\n dumpList(): Array<Array<T | null | undefined>> {\n const result: Array<Array<T | null | undefined>> = []\n let head: SkipListNode<T> | null = this.head\n\n do {\n result.push([])\n let currentNode: SkipListNode<T> | null = head\n do {\n result[result.length - 1].push(currentNode.value)\n currentNode = currentNode.next\n } while (currentNode)\n } while (head = head.down)\n\n return result\n }\n\n delete(value: T): void {\n let currentNode: SkipListNode<T> | null = this.findNode(value)\n\n while (currentNode) {\n // 被删除的节点肯定不会是head或tail, 因此一定有previous\n currentNode.previous!.next = currentNode.next\n\n // 被删除的节点肯定不会是head或tail, 因此一定有next\n currentNode.next!.previous = currentNode.previous\n\n currentNode = currentNode.down\n }\n\n this._size--\n }\n\n has(value: T): boolean {\n return isntNull(this.findNode(value))\n }\n\n findNode(value: T): SkipListNode<T> | null {\n let currentNode: SkipListNode<T> = this.head\n\n while (true) {\n while (currentNode.next && isntNull(currentNode.next.value)) {\n const result = this.compare(currentNode.next.value, value)\n if (result === 0) {\n return currentNode.next\n } else if (result < 0) {\n currentNode = currentNode.next\n } else {\n break\n }\n }\n\n if (currentNode.down) {\n currentNode = currentNode.down\n } else {\n return null\n }\n }\n }\n\n add(value: T): void {\n let previousNode: SkipListNode<T> = this.findPreviousNode(value)\n\n // 如果previousNode.next.value等于value, 则说明value已经存在\n if (\n previousNode.next &&\n isntNull(previousNode.next.value) &&\n this.compare(previousNode.next.value, value) === 0\n ) {\n return\n }\n\n let newNode: SkipListNode<T> = new SkipListNode(value)\n // 在底层加入新节点\n if (previousNode.next) {\n newNode.next = previousNode.next\n previousNode.next.previous = newNode\n }\n previousNode.next = newNode\n newNode.previous = previousNode\n\n // 在高层加入新节点, 具体加到多高是随机的, 从第一层(将其视作索引值0)开始建造\n // 层数非常高是极为罕见的, 因为每次建造层都会导致下一层被建造的概率减半.\n let level = 0\n while (Math.random() < 0.5) {\n // currentLevel的索引与当前跳跃列表的高度相同, 需要在这之上建立一个新层\n if (level === this.height) {\n const newHead: SkipListNode<T> = new SkipListNode<T>(null)\n const newTail: SkipListNode<T> = new SkipListNode<T>(null)\n\n newHead.next = newTail\n newHead.down = this.head\n\n newTail.previous = newHead\n newTail.down = this.tail\n\n this.head.up = newHead\n this.tail.up = newTail\n\n this.head = newHead\n this.tail = newTail\n\n this.height++\n }\n\n // 从新节点的前一个节点遍历, 直到找到能够通往上层的节点\n while (!previousNode.up) {\n // head节点必然会有up, 所以不可能访问进入循环体, 不可能访问`head.previous`\n previousNode = previousNode.previous!\n }\n // 上一层的对应节点\n previousNode = previousNode.up!\n\n // 创建新节点的上层节点\n const upperNewNode: SkipListNode<T> = new SkipListNode<T>(value)\n if (previousNode.next) {\n upperNewNode.next = previousNode.next\n previousNode.next.previous = upperNewNode\n }\n previousNode.next = upperNewNode\n upperNewNode.previous = previousNode\n\n upperNewNode.down = newNode\n newNode.up = upperNewNode\n newNode = upperNewNode\n\n level++\n }\n\n this._size++\n }\n\n private findPreviousNode(value: T): SkipListNode<T> {\n let currentNode: SkipListNode<T> = this.head\n\n while (true) {\n while (currentNode.next && isntNull(currentNode.next.value)) {\n const result = this.compare(currentNode.next.value, value)\n if (result >= 0) {\n break\n } else {\n currentNode = currentNode.next\n }\n }\n\n if (currentNode.down) {\n currentNode = currentNode.down\n } else {\n return currentNode\n }\n }\n }\n}\n","import { SkipList } from '@utils/skip-list'\nimport { map } from 'iterable-operator'\n\nexport class SortedSet<T> implements Iterable<T> {\n private skipList: SkipList<T>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<T> {\n return this.values()\n }\n\n constructor(compare: (a: T, b: T) => number) {\n this.skipList = new SkipList(compare)\n }\n\n values(): IterableIterator<T> {\n return map(this.skipList.elements(), node => node.value!)\n }\n\n has(value: T): boolean {\n return this.skipList.has(value)\n }\n\n add(value: T): void {\n this.skipList.add(value)\n }\n\n delete(value: T): void {\n this.skipList.delete(value)\n }\n}\n","// http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup\nconst mod37BitPositions: number[] = [\n 32, 0, 1, 26, 2, 23, 27, 0, 3, 16\n, 24, 30, 28, 11, 0, 13, 4, 7, 17, 0\n, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21\n, 14, 9, 5, 20, 8, 19, 18\n]\n\n/**\n * 该函数在找不到结果时返回32, 与Rust内置函数的表现一致.\n * https://doc.rust-lang.org/std/primitive.u32.html#method.trailing_zeros\n */\nexport function trailingZeros(value: number): number {\n return mod37BitPositions[(-value & value) % 37]\n}\n","import { assert } from '@blackglory/errors'\nimport { trailingZeros } from '@utils/trailing-zeros'\n\nexport class BitSet {\n private array: number[] = []\n private length = 0\n private _size = 0\n\n constructor(private bitsPerElement: number = 8) {\n assert(\n Number.isInteger(bitsPerElement)\n , 'The parameter bitsPerElement must be an integer'\n )\n assert(\n bitsPerElement > 0\n , 'The parameter bitsPerElement must be greater than 0'\n )\n // `31`是该数据结构中能够处理的最大值\n assert(\n bitsPerElement <= 31\n , 'The mask of bitsPerElement must be less than or equal to 31'\n )\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this._size\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n if (this.length > 0) {\n // maxArrayLength = Math.ceil(this.length / this.bitsPerElement)\n const maxArrayLength = ~~(this.length / this.bitsPerElement) + 1\n\n for (let index = 0; index < maxArrayLength; index++) {\n let element = this.array[index]\n let offset = 0\n let indexOfBit: number\n while ((indexOfBit = trailingZeros(element)) !== 32) {\n yield index * this.bitsPerElement + offset + indexOfBit\n offset += indexOfBit + 1\n element >>= indexOfBit + 1\n }\n }\n }\n }\n\n _dumpBinaryStrings(): string[] {\n const result: string[] = []\n for (let i = 0; i < this.array.length; i++) {\n const binary = this.array[i].toString(2)\n if (binary.length < this.bitsPerElement) {\n result.push('0'.repeat(this.bitsPerElement - binary.length) + binary)\n } else {\n result.push(binary)\n }\n }\n return result\n }\n\n has(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n return ((this.array[index] ?? 0) & mask) === mask\n }\n\n add(value: number): boolean {\n assert(value >= 0, 'value must be greater than or equal to 0')\n if (value >= this.length) {\n this.length = value + 1\n }\n\n const [index, mask] = this.getPosition(value)\n\n const element = this.array[index] ?? 0\n this.array[index] = element | mask\n\n const added = (element & mask) !== mask\n if (added) {\n this._size++\n }\n return added\n }\n\n delete(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n const element = (this.array[index] ?? 0)\n this.array[index] = element & ~mask\n\n const deleted = (element & mask) === mask\n if (deleted) {\n this._size--\n }\n\n return deleted\n }\n\n clear(): void {\n for (let i = this.array.length; i--;) {\n this.array[i] = 0\n }\n }\n\n private getPosition(value: number): [index: number, mask: number] {\n const remainder = value % this.bitsPerElement\n const quotient = (value - remainder) / this.bitsPerElement\n const index = quotient\n const mask = this.getMask(remainder)\n return [index, mask]\n }\n\n // 输入一定是一个小于bitsPerElement的值, 取值范围是[0, bitsPerElement)\n private getMask(value: number): number {\n // return 2 ** value\n return 1 << value\n }\n}\n","import { DynamicTypedArray } from './dynamic-typed-array'\nimport { UnsignedTypedArrayConstructor } from 'justypes'\nimport { assert } from '@blackglory/errors'\nimport { trailingZeros } from '@utils/trailing-zeros'\n\nexport class TypedBitSet<T extends UnsignedTypedArrayConstructor> {\n private bitsPerElement: number\n private length = 0\n private _size = 0\n\n constructor(private array: DynamicTypedArray<T>) {\n const bitsPerElement = array.BYTES_PER_ELEMENT * 8\n\n assert(\n Number.isInteger(bitsPerElement)\n , 'The parameter bitsPerElement must be an integer'\n )\n assert(\n bitsPerElement > 0\n , 'The parameter bitsPerElement must be greater than 0'\n )\n // `31`是该数据结构中能够处理的最大值\n assert(\n bitsPerElement <= 31\n , 'The mask of bitsPerElement must be less than or equal to 31'\n )\n\n this.bitsPerElement = bitsPerElement\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this._size\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n if (this.length > 0) {\n // maxArrayLength = Math.ceil(this.length / this.bitsPerElement)\n const maxArrayLength = ~~(this.length / this.bitsPerElement) + 1\n\n for (let index = 0; index < maxArrayLength; index++) {\n let element = this.array.internalTypedArray[index]\n let offset = 0\n let indexOfBit: number\n while ((indexOfBit = trailingZeros(element)) !== 32) {\n yield index * this.bitsPerElement + offset + indexOfBit\n offset += indexOfBit + 1\n element >>= indexOfBit + 1\n }\n }\n }\n }\n\n _dumpBinaryStrings(): string[] {\n const result: string[] = []\n for (let i = 0; i < this.array.length; i++) {\n const binary = this.array.internalTypedArray[i].toString(2)\n if (binary.length < this.bitsPerElement) {\n result.push('0'.repeat(this.bitsPerElement - binary.length) + binary)\n } else {\n result.push(binary)\n }\n }\n return result\n }\n\n has(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n return ((this.array.get(index) ?? 0) & mask) === mask\n }\n\n add(value: number): boolean {\n assert(value >= 0, 'value must be greater than or equal to 0')\n if (value >= this.length) {\n this.length = value + 1\n }\n\n const [index, mask] = this.getPosition(value)\n\n const element = this.array.get(index) ?? 0\n this.array.set(index, element | mask)\n\n const added = (element & mask) !== mask\n if (added) {\n this._size++\n }\n return added\n }\n\n delete(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n const element = (this.array.get(index) ?? 0)\n this.array.set(index, element & ~mask)\n\n const deleted = (element & mask) === mask\n if (deleted) {\n this._size--\n }\n return deleted\n }\n\n clear(): void {\n for (let i = this.array.length; i--;) {\n this.array.set(i, 0)\n }\n }\n\n private getPosition(value: number): [index: number, mask: number] {\n const remainder = value % this.bitsPerElement\n const quotient = (value - remainder) / this.bitsPerElement\n const index = quotient\n const mask = this.getMask(remainder)\n return [index, mask]\n }\n\n // 输入一定是一个小于bitsPerElement的值, 取值范围是[0, bitsPerElement)\n private getMask(value: number): number {\n // return 2 ** value\n return 1 << value\n }\n}\n","import { isNull } from '@blackglory/types'\nimport { Cons } from 'justypes'\nexport { Cons } from 'justypes'\n\nexport function convertConsToArray<T>([value, next]: Cons<T>): T[] {\n if (isNull(next)) {\n return [value]\n } else {\n return [value, ...convertConsToArray(next)]\n }\n}\n\nexport function convertArrayToCons<T>([value, ...next]: T[]): Cons<T> {\n return [value, next.length ? convertArrayToCons(next) : null]\n}\n","export function sliceArrayLeft<T>(arr: T[], num: number): T[] {\n return arr.slice(0, num)\n}\n\nexport function sliceArrayRight<T>(arr: T[], num: number): T[] {\n const startIndex = arr.length - num\n return arr.slice(startIndex >= 0 ? startIndex : 0)\n}\n\nexport function truncateArrayLeft<T>(arr: T[], num: number): void {\n if (arr.length > num) {\n arr.length = num\n }\n}\n\nexport function truncateArrayRight<T>(arr: T[], num: number): void {\n const startIndex = arr.length - num\n arr.splice(0, startIndex)\n}\n"],"names":["Box","[object Object]","value","this","get","Symbol","toStringTag","constructor","name","isArray","val","Array","array","isntEmptyArray","isEmptyArray","isntArray","array$1","length","isNull","_null$1","isntNull","isUndefined","undefined","_undefined$1","isntUndefined","isFunction","_function$1","isntFunction","asyncIterable$1","isntAsyncIterable","null_1","require$$0","undefined_1","require$$1","function_1","require$$2","isAsyncIterable","asyncIterator","isBigInt","bigint$1","isntBigInt","isBoolean","boolean$1","isntBoolean","isString","string$1","isntString","char$1","isntChar","string_1","isChar","isDate","Date","date$1","isntDate","_enum","inEnum","_enum$1","Object","values","includes","isError","Error","error$1","isntError","isFalsy","falsy$1","isntFalsy","iterable$1","isntIterable","isIterable","iterator","isNumber","isNaN","Number","number","isntNaN","isPositiveInfinity","isFinite","isntNumber","number$1","Infinity","isNegativeInfinity","freeGlobal","global","freeSelf","self","_Symbol","Function","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","_getRawTag","isOwn","call","tag","unmasked","e","result","getRawTag","objectToString","_baseGetTag","getPrototype","func","transform","arg","overArg","getPrototypeOf","baseGetTag","isObjectLike","funcProto","funcToString","objectCtorString","isPlainObject_1","proto","Ctor","__importDefault","mod","__esModule","default","object","isntEmptyObject","isEmptyObject","isntPlainObject","isPlainObject","isObject","object$1","isntObject","keys","json","isntJsonable","isJsonable","isntJson","isJson","boolean_1","number_1","require$$3","array_1","require$$4","object_1","require$$5","every","json$1","JSON","stringify","_a","promise","isPromiseLike","isntPromiseLike","isntPromise","isPromise","Promise","then","promise$1","url","isAbsoluteURL","url$1","str","URL","isRegExp","RegExp","regexp$1","isntRegExp","isSymbol","symbol","isntSymbol","__createBinding","create","o","m","k","k2","desc","getOwnPropertyDescriptor","writable","configurable","enumerable","defineProperty","__exportStar","exports","p","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","require$$17","require$$18","require$$19","require$$20","go_1","go","go$1","fn","goMicrotask_1","goMicrotask","goMicrotask$1","resolve","reject","queueMicrotask","async","random_1","random","random$1","min","max","Math","randomInt_1","randomInt","randomInt$1","ceil","floor","randomIntInclusive_1","randomIntInclusive","randomIntInclusive$1","exponentialBackoff","calculateExponentialBackoffTimeout","extra_rand_1","baseTimeout","retries","maxTimeout","factor","jitter","timeout","setTimeout_1","setTimeout","setTimeout$1","cb","timer","globalThis","clearTimeout","setSchedule_1","set_timeout_1","setSchedule$1","setSchedule","timestamp","now","setInterval_1","setInterval","setInterval$1","clearInterval","setImmediate_1","setImmediate$1","setImmediate","clearImmediate","setTimeoutLoop_1","setTimeoutLoop$1","setTimeoutLoop","isCancelled","cancel","loop","setDynamicTimeoutLoop_1","setDynamicTimeoutLoop$1","setDynamicTimeoutLoop","start","elapsed","goMacrotask_1","goMacrotask","extra_timers_1","goMacrotask$1","Emitter","map","Map","event","listener","set","Set","add","handler","handlers","delete","size","args","removeListener","on","forEach","HashMap","hash","key","has","clear","HashSet","Queue","items","push","shift","item","index","indexOf","splice","_null","_undefined","_function","asyncIterable","bigint","boolean","string","char","date","error","falsy","iterable","regexp","chunkByAsync_1","chunkByAsync","types_1","predicate","buffer","element","chunkByAsyncIterable","chunkByIterable","chunkBy_1","chunkBy","chunkBy$1","concatAsync_1","concatAsync$1","concatAsync","otherIterables","iter","concat_1","concat$1","concat","utils","copyIterable","copyAsyncIterable","dropUntilAsync_1","dropUntilAsync","done","next","return","dropUntilAsyncIterable","dropUntilIterable","dropUntil_1","dropUntil","dropUntil$1","filterAsync_1","filterAsync","filterAsyncIterable","filterIterable","filter_1","filter","filter$1","flattenByAsync_1","flatten","level","isFiniteIterable","flattenDeepAsync_1","flattenDeepAsync","flatten_by_async_1","errors_1","depth","assert","isInteger","flattenByAsync","_","flattenByAsyncIterable","flattenByIterable","flattenBy_1","flattenBy","flattenDeep_1","flattenDeep","flatten_by_1","mapAsync_1","mapAsync","mapAsyncIterable","mapIterable","map_1","map$1","repeatAsync_1","repeatAsync","times","process","env","NODE_ENV","console","warn","warnInfiniteLoop","cache","repeat_1","repeat","splitAsync_1","splitAsync","splitAsync$1","separator","splitByAsync_1","splitByAsync","splitByAsyncIterable","splitByIterable","splitBy_1","splitBy","splitBy$1","split_1","split","split$1","takeUntilAsync_1","takeUntilAsync","takeUntilAsyncIterable","takeUntilIterable","takeUntil_1","takeUntil","takeUntil$1","tapAsync_1","tapAsync","tapAsyncIterable","tapIterable","tap_1","tap","tap$1","toAsyncIterable_1","toAsyncIterable","toAsyncIterable$1","transformAsync_1","transformAsync","transformAsync$1","transformer","transform_1","transform$1","uniqAsync_1","uniqAsync","uniqAsync$1","bucket","uniqByAsync_1","uniqByAsync","uniqByAsyncIterable","uniqByIterable","uniqBy_1","uniqBy","uniqBy$1","uniq_1","uniq","uniq$1","zipAsync_1","Kind","zipAsync","iterables","_b","_c","_d","iterators","Async","Sync","dones","i","kind","temp","undoneIterators","zipWithSize","chunkAsync_1","chunkAsync","chunk_1","chunk","dropAsync_1","dropAsync","utils_1","count","dropRightAsync_1","dropRightAsync","toArrayAsync","slice","dropRight_1","dropRight","arr","from","drop_1","drop","flattenAsync_1","flattenAsync","flatten_deep_async_1","flatten_1","flatten_deep_1","require$$21","require$$22","require$$23","sliceAsync_1","sliceAsync","end","require$$24","slice_1","require$$25","require$$26","require$$27","require$$28","require$$29","takeAsync_1","takeAsync","require$$30","takeRightAsync_1","takeRightAsync","require$$31","takeRight_1","takeRight","require$$32","require$$33","require$$34","take_1","take","require$$35","require$$36","require$$37","require$$38","require$$39","require$$40","require$$41","require$$42","require$$43","require$$44","require$$45","require$$46","zip_1","zip","x","consume_1","consume","consume$1","consumer","eachAsync_1","eachAsync","eachAsyncIterable","eachIterable","each_1","each","each$1","everyAsync_1","everyAsync","everyAsyncIterable","everyIterable","every_1","every$1","findAsync_1","findAsync","findAsyncIterable","findIterable","find_1","find","find$1","firstAsync_1","firstAsync","firstAsync$1","first_1","first","first$1","includesAsync_1","includesAsync","includesAsync$1","includes_1","includes$1","matchAsync_1","matchAsync","matchAsync$1","sequence","sequenceLength","matchCount","match_1","match","match$1","reduceAsync_1","reduceAsync","initialValue","reduceAsyncIterable","reduceIterable","readInitialValue","reduceAsyncWithoutInitialValue","currentValue","reduceAsyncWithInitialValue","reduce_1","reduce","reduceWithoutInitialValue","reduceWithInitialValue","someAsync_1","someAsync","someAsyncIterable","someIterable","some_1","some","some$1","lastAsync_1","lastAsync","lastAsync$1","last_1","last","last$1","toArrayAsync_1","toArrayAsync$1","toArray_1","toArray$1","toArray","toSetAsync_1","toSetAsync$1","toSetAsync","toSet_1","toSet$1","toSet","count_1","count$1","countAsync_1","countAsync","countAsync$1","groupBy_1","groupBy$1","groupBy","group","groupByAsync_1","each_async_1","groupByAsync$1","groupByAsync","traverseErrorPrototypeChain_1","traverseErrorPrototypeChain","traverseErrorPrototypeChain$1","err","current","getErrorNames_1","getErrorNames","traverse_error_prototype_chain_1","getErrorNames$1","ancestors","isSerializableError","customError","CustomError","iterable_operator_1","get_error_names_1","serializable_error_1","hasInstance","instance","reversedClassNames","reverse","reversedInstanceNames","serializableError","message","stack","assertionError","AssertionError","custom_error_1","pass_1","pass","pass$1","passAsync_1","passAsync","passAsync$1","hydrate_1","hydrate","createChildErrorConstructor","parentErrorConstructor","errorNames","errorConstructor","normalize_1","normalize","assert_1","assertion_error_1","condition","LRUMap","limit","updateItem","getColdestKey","ExpirableMap","itemMetadataSortedByExpirationTime","maxAge","removeItemMetadata","addItemMetadata","exists","findIndex","rescheduleClearTimeout","cancelClearTimeout","expirationTime","indexOfFirstUnexpired","clearExpiredItems","TLRUMap","indexOfFirstUnexpiredItem","TrieNode","children","TrieMap","root","dfs","node","paths","path","childNode","newPaths","entries","part","parentNodes","parentNode","SparseSet","indexToValue","valueToIndex","lastValue","pop","SparseMap","keyToIndex","indexToKey","internalArray","lastKey","TypedSparseMap","internalTypedArray","TypedSparseSet","DynamicTypedArray","typedArrayConstructor","capacity","growthFactor","_length","BYTES_PER_ELEMENT","newCapacity","computeNewCapacity","resize","newLength","compare","sort","newArray","oldCapacity","targetLength","SkipListNode","previous","up","down","SkipList","head","tail","height","_size","currentNode","findNode","previousNode","findPreviousNode","newNode","newHead","newTail","upperNewNode","SortedSet","skipList","elements","mod37BitPositions","trailingZeros","BitSet","bitsPerElement","maxArrayLength","indexOfBit","offset","binary","mask","getPosition","added","deleted","remainder","getMask","TypedBitSet","convertArrayToCons","convertConsToArray","num","startIndex"],"mappings":"wPAAaA,EAKXC,YAAoBC,GAAAC,KAAKD,MAALA,EAJpBE,IAAKC,OAAOC,eACV,OAAOH,KAAKI,YAAYC,KAK1BP,IAAIC,GACFC,KAAKD,MAAQA,EAGfD,MACE,OAAOE,KAAKD,sKCThB,SAASO,EAAQC,GACb,OAAOC,MAAMF,QAAQC,GAFHE,EAAAC,eAAuBD,EAAAE,aAAoBF,EAAAG,UAAkBH,EAAAH,aAAG,EAIvEO,EAAAP,QAAGA,EAIDO,EAAAD,UAHjB,SAAmBL,GACf,OAAQD,EAAQC,IAMAM,EAAAF,aAHpB,SAAsBJ,GAClB,OAAsB,IAAfA,EAAIO,QAMOD,EAAAH,eAHtB,SAAwBH,GACpB,OAAsB,IAAfA,EAAIO,sBCbf,SAASC,EAAOR,GACZ,OAAe,OAARA,EAFKS,EAAAC,uBAAoB,EAItBD,EAAAD,OAAGA,EAIDC,EAAAC,SA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/U,GAED,CAACA,KAAUgvB,EAAmBja,sBCRzB,SAAkBqI,EAAU6R,GAC1C,OAAO7R,EAAIH,MAAM,EAAGgS,sBAGN,SAAmB7R,EAAU6R,GAC3C,MAAMC,EAAa9R,EAAIrc,OAASkuB,EAChC,OAAO7R,EAAIH,MAAMiS,GAAc,EAAIA,EAAa,wBAGlC,SAAqB9R,EAAU6R,GACzC7R,EAAIrc,OAASkuB,IACf7R,EAAIrc,OAASkuB,yBAID,SAAsB7R,EAAU6R,GAC9C,MAAMC,EAAa9R,EAAIrc,OAASkuB,EAChC7R,EAAI5K,OAAO,EAAG0c"}
1
+ {"version":3,"file":"index.umd.min.js","sources":["../../src/box.ts","../../node_modules/@blackglory/types/lib/es2018/array.js","../../node_modules/@blackglory/types/lib/es2018/null.js","../../node_modules/@blackglory/types/lib/es2018/undefined.js","../../node_modules/@blackglory/types/lib/es2018/function.js","../../node_modules/@blackglory/types/lib/es2018/async-iterable.js","../../node_modules/@blackglory/types/lib/es2018/bigint.js","../../node_modules/@blackglory/types/lib/es2018/boolean.js","../../node_modules/@blackglory/types/lib/es2018/string.js","../../node_modules/@blackglory/types/lib/es2018/char.js","../../node_modules/@blackglory/types/lib/es2018/date.js","../../node_modules/@blackglory/types/lib/es2018/enum.js","../../node_modules/@blackglory/types/lib/es2018/error.js","../../node_modules/@blackglory/types/lib/es2018/falsy.js","../../node_modules/@blackglory/types/lib/es2018/iterable.js","../../node_modules/@blackglory/types/lib/es2018/number.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_getPrototype.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isPlainObject.js","../../node_modules/@blackglory/types/lib/es2018/object.js","../../node_modules/@blackglory/types/lib/es2018/json.js","../../node_modules/@blackglory/types/lib/es2018/promise.js","../../node_modules/@blackglory/types/lib/es2018/url.js","../../node_modules/@blackglory/types/lib/es2018/regexp.js","../../node_modules/@blackglory/types/lib/es2018/symbol.js","../../node_modules/@blackglory/types/lib/es2018/index.js","../../node_modules/@blackglory/go/lib/es2018/go.js","../../node_modules/@blackglory/go/lib/es2018/go-microtask.js","../../node_modules/extra-rand/lib/es2018/random.js","../../node_modules/extra-rand/lib/es2018/random-int.js","../../node_modules/extra-rand/lib/es2018/random-int-inclusive.js","../../node_modules/extra-rand/lib/es2018/index.js","../../node_modules/extra-timers/lib/es2018/exponential-backoff.js","../../node_modules/extra-timers/lib/es2018/set-timeout.js","../../node_modules/extra-timers/lib/es2018/set-schedule.js","../../node_modules/extra-timers/lib/es2018/set-interval.js","../../node_modules/extra-timers/lib/es2018/set-immediate.js","../../node_modules/extra-timers/lib/es2018/set-timeout-loop.js","../../node_modules/extra-timers/lib/es2018/set-dynamic-timeout-loop.js","../../node_modules/extra-timers/lib/es2018/index.js","../../node_modules/@blackglory/go/lib/es2018/go-macrotask.js","../../node_modules/@blackglory/go/lib/es2018/index.js","../../src/emitter.ts","../../src/hash-map.ts","../../src/hash-set.ts","../../src/queue.ts","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/array.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/null.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/undefined.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/function.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/async-iterable.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/bigint.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/boolean.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/string.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/char.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/date.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/enum.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/error.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/falsy.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/iterable.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/number.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/object.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/json.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/promise.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/url.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/regexp.js","../../node_modules/iterable-operator/node_modules/@blackglory/types/lib/es2018/index.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/concat-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/concat.js","../../node_modules/iterable-operator/lib/es2018/utils.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-until-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-until.js","../../node_modules/iterable-operator/lib/es2018/middleware/filter-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/filter.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-deep-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-deep.js","../../node_modules/iterable-operator/lib/es2018/middleware/map-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/map.js","../../node_modules/iterable-operator/lib/es2018/middleware/repeat-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/repeat.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/split-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/split.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-until-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-until.js","../../node_modules/iterable-operator/lib/es2018/middleware/tap-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/tap.js","../../node_modules/iterable-operator/lib/es2018/middleware/to-async-iterable.js","../../node_modules/iterable-operator/lib/es2018/middleware/transform-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/transform.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-by-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq-by.js","../../node_modules/iterable-operator/lib/es2018/middleware/uniq.js","../../node_modules/iterable-operator/lib/es2018/middleware/zip-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/index.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/chunk.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-right-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop-right.js","../../node_modules/iterable-operator/lib/es2018/middleware/drop.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/flatten.js","../../node_modules/iterable-operator/lib/es2018/middleware/slice-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/slice.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-right-async.js","../../node_modules/iterable-operator/lib/es2018/middleware/take-right.js","../../node_modules/iterable-operator/lib/es2018/middleware/take.js","../../node_modules/iterable-operator/lib/es2018/middleware/zip.js","../../node_modules/iterable-operator/lib/es2018/output/consume.js","../../node_modules/iterable-operator/lib/es2018/output/each-async.js","../../node_modules/iterable-operator/lib/es2018/output/each.js","../../node_modules/iterable-operator/lib/es2018/output/every-async.js","../../node_modules/iterable-operator/lib/es2018/output/every.js","../../node_modules/iterable-operator/lib/es2018/output/find-async.js","../../node_modules/iterable-operator/lib/es2018/output/find.js","../../node_modules/iterable-operator/lib/es2018/output/first-async.js","../../node_modules/iterable-operator/lib/es2018/output/first.js","../../node_modules/iterable-operator/lib/es2018/output/includes-async.js","../../node_modules/iterable-operator/lib/es2018/output/includes.js","../../node_modules/iterable-operator/lib/es2018/output/match-async.js","../../node_modules/iterable-operator/lib/es2018/output/match.js","../../node_modules/iterable-operator/lib/es2018/output/reduce-async.js","../../node_modules/iterable-operator/lib/es2018/output/reduce.js","../../node_modules/iterable-operator/lib/es2018/output/some-async.js","../../node_modules/iterable-operator/lib/es2018/output/some.js","../../node_modules/iterable-operator/lib/es2018/output/last-async.js","../../node_modules/iterable-operator/lib/es2018/output/last.js","../../node_modules/iterable-operator/lib/es2018/output/to-array-async.js","../../node_modules/iterable-operator/lib/es2018/output/to-array.js","../../node_modules/iterable-operator/lib/es2018/output/to-set-async.js","../../node_modules/iterable-operator/lib/es2018/output/to-set.js","../../node_modules/iterable-operator/lib/es2018/output/count.js","../../node_modules/iterable-operator/lib/es2018/output/count-async.js","../../node_modules/iterable-operator/lib/es2018/output/group-by.js","../../node_modules/iterable-operator/lib/es2018/output/group-by-async.js","../../node_modules/iterable-operator/lib/es2018/index.js","../../node_modules/iterable-operator/lib/es2018/output/index.js","../../node_modules/@blackglory/errors/lib/es2018/traverse-error-prototype-chain.js","../../node_modules/@blackglory/errors/lib/es2018/get-error-names.js","../../node_modules/@blackglory/errors/lib/es2018/serializable-error.js","../../node_modules/@blackglory/errors/lib/es2018/custom-error.js","../../node_modules/@blackglory/errors/lib/es2018/assertion-error.js","../../node_modules/@blackglory/pass/lib/es2018/pass.js","../../node_modules/@blackglory/pass/lib/es2018/pass-async.js","../../node_modules/@blackglory/pass/lib/es2018/index.js","../../node_modules/@blackglory/errors/lib/es2018/hydrate.js","../../node_modules/@blackglory/errors/lib/es2018/index.js","../../node_modules/@blackglory/errors/lib/es2018/normalize.js","../../node_modules/@blackglory/errors/lib/es2018/assert.js","../../src/lru-map.ts","../../src/expirable-map.ts","../../src/tlru-map.ts","../../src/trie-map.ts","../../src/sparse-set.ts","../../src/sparse-map.ts","../../src/typed-sparse-map.ts","../../src/typed-sparse-set.ts","../../src/dynamic-typed-array.ts","../../src/utils/skip-list.ts","../../src/sorted-set.ts","../../src/utils/trailing-zeros.ts","../../src/bit-set.ts","../../src/typed-bit-set.ts","../../src/cons.ts","../../src/array.ts"],"sourcesContent":["export class Box<T> {\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n constructor(private value: T) {}\n\n set(value: T): void {\n this.value = value\n }\n\n get(): T {\n return this.value\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyArray = exports.isEmptyArray = exports.isntArray = exports.isArray = void 0;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isntArray(val) {\n return !isArray(val);\n}\nexports.isntArray = isntArray;\nfunction isEmptyArray(val) {\n return val.length === 0;\n}\nexports.isEmptyArray = isEmptyArray;\nfunction isntEmptyArray(val) {\n return val.length !== 0;\n}\nexports.isntEmptyArray = isntEmptyArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNull = exports.isNull = void 0;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isntNull(val) {\n return !isNull(val);\n}\nexports.isntNull = isntNull;\n//# sourceMappingURL=null.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntUndefined = exports.isUndefined = void 0;\nfunction isUndefined(val) {\n return val === undefined;\n}\nexports.isUndefined = isUndefined;\nfunction isntUndefined(val) {\n return !isUndefined(val);\n}\nexports.isntUndefined = isntUndefined;\n//# sourceMappingURL=undefined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFunction = exports.isFunction = void 0;\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isntFunction(val) {\n return !isFunction(val);\n}\nexports.isntFunction = isntFunction;\n//# sourceMappingURL=function.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntAsyncIterable = exports.isAsyncIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isAsyncIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.asyncIterator]);\n}\nexports.isAsyncIterable = isAsyncIterable;\nfunction isntAsyncIterable(val) {\n return !isAsyncIterable(val);\n}\nexports.isntAsyncIterable = isntAsyncIterable;\n//# sourceMappingURL=async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBigInt = exports.isBigInt = void 0;\nfunction isBigInt(val) {\n return typeof val === 'bigint';\n}\nexports.isBigInt = isBigInt;\nfunction isntBigInt(val) {\n return !isBigInt(val);\n}\nexports.isntBigInt = isntBigInt;\n//# sourceMappingURL=bigint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBoolean = exports.isBoolean = void 0;\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nexports.isBoolean = isBoolean;\nfunction isntBoolean(val) {\n return !isBoolean(val);\n}\nexports.isntBoolean = isntBoolean;\n//# sourceMappingURL=boolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntString = exports.isString = void 0;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\nfunction isntString(val) {\n return !isString(val);\n}\nexports.isntString = isntString;\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntChar = exports.isChar = void 0;\nconst string_1 = require(\"./string\");\nfunction isChar(val) {\n return (0, string_1.isString)(val)\n && val.length === 1;\n}\nexports.isChar = isChar;\nfunction isntChar(val) {\n return !isChar(val);\n}\nexports.isntChar = isntChar;\n//# sourceMappingURL=char.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntDate = exports.isDate = void 0;\nfunction isDate(val) {\n return val instanceof Date;\n}\nexports.isDate = isDate;\nfunction isntDate(val) {\n return !isDate(val);\n}\nexports.isntDate = isntDate;\n//# sourceMappingURL=date.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inEnum = void 0;\nfunction inEnum(val, _enum) {\n return Object.values(_enum).includes(val);\n}\nexports.inEnum = inEnum;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntError = exports.isError = void 0;\nfunction isError(val) {\n return val instanceof Error;\n}\nexports.isError = isError;\nfunction isntError(val) {\n return !isError(val);\n}\nexports.isntError = isntError;\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFalsy = exports.isFalsy = void 0;\nfunction isFalsy(val) {\n return !val;\n}\nexports.isFalsy = isFalsy;\nfunction isntFalsy(val) {\n return !isFalsy(val);\n}\nexports.isntFalsy = isntFalsy;\n//# sourceMappingURL=falsy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntIterable = exports.isIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.iterator]);\n}\nexports.isIterable = isIterable;\nfunction isntIterable(val) {\n return !isIterable(val);\n}\nexports.isntIterable = isntIterable;\n//# sourceMappingURL=iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNaN = exports.isNaN = exports.isNegativeInfinity = exports.isPositiveInfinity = exports.isFinite = exports.isntNumber = exports.isNumber = void 0;\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nexports.isNumber = isNumber;\nfunction isntNumber(val) {\n return !isNumber(val);\n}\nexports.isntNumber = isntNumber;\nfunction isFinite(val) {\n return Number.isFinite(val);\n}\nexports.isFinite = isFinite;\nfunction isPositiveInfinity(val) {\n return val === Infinity;\n}\nexports.isPositiveInfinity = isPositiveInfinity;\nfunction isNegativeInfinity(val) {\n return val === -Infinity;\n}\nexports.isNegativeInfinity = isNegativeInfinity;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isntNaN(val) {\n return !isNaN(val);\n}\nexports.isntNaN = isntNaN;\n//# sourceMappingURL=number.js.map","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyObject = exports.isEmptyObject = exports.isntPlainObject = exports.isPlainObject = exports.isntObject = exports.isObject = void 0;\nconst isPlainObject_1 = __importDefault(require(\"lodash/isPlainObject\"));\nfunction isObject(val) {\n return val !== null\n && typeof val === 'object';\n}\nexports.isObject = isObject;\nfunction isntObject(val) {\n return !isObject(val);\n}\nexports.isntObject = isntObject;\nfunction isPlainObject(val) {\n return (0, isPlainObject_1.default)(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isntPlainObject(val) {\n return !isPlainObject(val);\n}\nexports.isntPlainObject = isntPlainObject;\nfunction isEmptyObject(val) {\n return Object.keys(val).length === 0;\n}\nexports.isEmptyObject = isEmptyObject;\nfunction isntEmptyObject(val) {\n return Object.keys(val).length !== 0;\n}\nexports.isntEmptyObject = isntEmptyObject;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntJsonable = exports.isJsonable = exports.isntJson = exports.isJson = void 0;\nconst null_1 = require(\"./null\");\nconst boolean_1 = require(\"./boolean\");\nconst string_1 = require(\"./string\");\nconst number_1 = require(\"./number\");\nconst array_1 = require(\"./array\");\nconst object_1 = require(\"./object\");\nfunction isJson(val) {\n return (0, null_1.isNull)(val)\n || (0, boolean_1.isBoolean)(val)\n || (0, string_1.isString)(val)\n || (0, number_1.isNumber)(val)\n || ((0, array_1.isArray)(val) && val.every(isJson))\n || ((0, object_1.isPlainObject)(val) && Object.values(val).every(isJson));\n}\nexports.isJson = isJson;\nfunction isntJson(val) {\n return !isJson(val);\n}\nexports.isntJson = isntJson;\nfunction isJsonable(val) {\n try {\n JSON.stringify(val);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isJsonable = isJsonable;\nfunction isntJsonable(val) {\n return !isntJsonable(val);\n}\nexports.isntJsonable = isntJsonable;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPromiseLike = exports.isntPromiseLike = exports.isntPromise = exports.isPromise = void 0;\nconst object_1 = require(\"./object\");\nconst function_1 = require(\"./function\");\nfunction isPromise(val) {\n return val instanceof Promise;\n}\nexports.isPromise = isPromise;\nfunction isntPromise(val) {\n return !isPromise(val);\n}\nexports.isntPromise = isntPromise;\nfunction isntPromiseLike(val) {\n return !isPromiseLike(val);\n}\nexports.isntPromiseLike = isntPromiseLike;\nfunction isPromiseLike(val) {\n return (0, object_1.isObject)(val)\n && (0, function_1.isFunction)(val.then);\n}\nexports.isPromiseLike = isPromiseLike;\n//# sourceMappingURL=promise.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsoluteURL = void 0;\nfunction isAbsoluteURL(str) {\n try {\n new URL(str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isAbsoluteURL = isAbsoluteURL;\n//# sourceMappingURL=url.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntRegExp = exports.isRegExp = void 0;\nfunction isRegExp(val) {\n return val instanceof RegExp;\n}\nexports.isRegExp = isRegExp;\nfunction isntRegExp(val) {\n return !isRegExp(val);\n}\nexports.isntRegExp = isntRegExp;\n//# sourceMappingURL=regexp.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntSymbol = exports.isSymbol = void 0;\nfunction isSymbol(val) {\n return typeof val === 'symbol';\n}\nexports.isSymbol = isSymbol;\nfunction isntSymbol(val) {\n return !isSymbol(val);\n}\nexports.isntSymbol = isntSymbol;\n//# sourceMappingURL=symbol.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./async-iterable\"), exports);\n__exportStar(require(\"./bigint\"), exports);\n__exportStar(require(\"./boolean\"), exports);\n__exportStar(require(\"./char\"), exports);\n__exportStar(require(\"./date\"), exports);\n__exportStar(require(\"./enum\"), exports);\n__exportStar(require(\"./error\"), exports);\n__exportStar(require(\"./falsy\"), exports);\n__exportStar(require(\"./function\"), exports);\n__exportStar(require(\"./iterable\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./null\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./promise\"), exports);\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./undefined\"), exports);\n__exportStar(require(\"./url\"), exports);\n__exportStar(require(\"./regexp\"), exports);\n__exportStar(require(\"./symbol\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.go = void 0;\nfunction go(fn) {\n return fn();\n}\nexports.go = go;\n//# sourceMappingURL=go.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.goMicrotask = void 0;\nfunction goMicrotask(fn) {\n return new Promise((resolve, reject) => {\n queueMicrotask(async () => {\n try {\n resolve(await fn());\n }\n catch (e) {\n reject(e);\n }\n });\n });\n}\nexports.goMicrotask = goMicrotask;\n//# sourceMappingURL=go-microtask.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.random = void 0;\nfunction random(min, max) {\n return Math.random() * (max - min) + min;\n}\nexports.random = random;\n//# sourceMappingURL=random.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomInt = void 0;\nfunction randomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min)) + min;\n}\nexports.randomInt = randomInt;\n//# sourceMappingURL=random-int.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomIntInclusive = void 0;\nfunction randomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\nexports.randomIntInclusive = randomIntInclusive;\n//# sourceMappingURL=random-int-inclusive.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./random\"), exports);\n__exportStar(require(\"./random-int\"), exports);\n__exportStar(require(\"./random-int-inclusive\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.calculateExponentialBackoffTimeout = void 0;\nconst extra_rand_1 = require(\"extra-rand\");\nfunction calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {\n const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);\n if (jitter) {\n return (0, extra_rand_1.randomIntInclusive)(0, timeout);\n }\n else {\n return timeout;\n }\n}\nexports.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;\n//# sourceMappingURL=exponential-backoff.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimeout = void 0;\nfunction setTimeout(timeout, cb) {\n const timer = globalThis.setTimeout(cb, timeout);\n return () => clearTimeout(timer);\n}\nexports.setTimeout = setTimeout;\n//# sourceMappingURL=set-timeout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setSchedule = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setSchedule(timestamp, cb) {\n const timeout = timestamp - Date.now();\n return (0, set_timeout_1.setTimeout)(timeout, cb);\n}\nexports.setSchedule = setSchedule;\n//# sourceMappingURL=set-schedule.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setInterval = void 0;\nfunction setInterval(timeout, cb) {\n const timer = globalThis.setInterval(cb, timeout);\n return () => clearInterval(timer);\n}\nexports.setInterval = setInterval;\n//# sourceMappingURL=set-interval.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setImmediate = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setImmediate(cb) {\n if (globalThis.setImmediate) {\n const timer = globalThis.setImmediate(cb);\n return () => clearImmediate(timer);\n }\n else {\n return (0, set_timeout_1.setTimeout)(0, cb);\n }\n}\nexports.setImmediate = setImmediate;\n//# sourceMappingURL=set-immediate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimeoutLoop = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setTimeoutLoop(timeout, cb) {\n let isCancelled = false;\n let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n return () => {\n isCancelled = true;\n cancel();\n };\n async function loop() {\n await cb();\n if (!isCancelled) {\n cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n }\n }\n}\nexports.setTimeoutLoop = setTimeoutLoop;\n//# sourceMappingURL=set-timeout-loop.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setDynamicTimeoutLoop = void 0;\nconst set_timeout_1 = require(\"./set-timeout\");\nfunction setDynamicTimeoutLoop(timeout, cb) {\n let isCancelled = false;\n let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);\n return () => {\n isCancelled = true;\n cancel();\n };\n async function loop() {\n const start = Date.now();\n await cb();\n const elapsed = Date.now() - start;\n if (!isCancelled) {\n cancel = (0, set_timeout_1.setTimeout)(Math.max(timeout - elapsed, 0), loop);\n }\n }\n}\nexports.setDynamicTimeoutLoop = setDynamicTimeoutLoop;\n//# sourceMappingURL=set-dynamic-timeout-loop.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./exponential-backoff\"), exports);\n__exportStar(require(\"./set-timeout\"), exports);\n__exportStar(require(\"./set-schedule\"), exports);\n__exportStar(require(\"./set-interval\"), exports);\n__exportStar(require(\"./set-immediate\"), exports);\n__exportStar(require(\"./set-timeout-loop\"), exports);\n__exportStar(require(\"./set-dynamic-timeout-loop\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.goMacrotask = void 0;\nconst extra_timers_1 = require(\"extra-timers\");\nfunction goMacrotask(fn) {\n return new Promise((resolve, reject) => {\n (0, extra_timers_1.setImmediate)(async () => {\n try {\n resolve(await fn());\n }\n catch (e) {\n reject(e);\n }\n });\n });\n}\nexports.goMacrotask = goMacrotask;\n//# sourceMappingURL=go-macrotask.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./go\"), exports);\n__exportStar(require(\"./go-microtask\"), exports);\n__exportStar(require(\"./go-macrotask\"), exports);\n//# sourceMappingURL=index.js.map","import { go } from '@blackglory/go'\n\ntype Listener<Args extends unknown[]> = (...args: Args) => void\n\nexport class Emitter<\n EventToArgs extends Record<Key, unknown[]> = Record<\n string | number | symbol\n , unknown[]\n >\n, Key extends string | number | symbol = keyof EventToArgs\n> {\n private map = new Map<\n Key\n , Set<Listener<EventToArgs[Key]>>\n >()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n on<T extends Key>(\n event: T\n , listener: Listener<EventToArgs[T]>\n ): () => void {\n const set = go(() => {\n const set = this.map.get(event)\n if (set) {\n return set\n } else {\n const set = new Set<Listener<EventToArgs[keyof EventToArgs]>>()\n this.map.set(event, set)\n return set\n }\n })\n set.add(handler as Listener<EventToArgs[Key]>)\n\n return () => {\n const handlers = this.map.get(event)\n if (handlers) {\n const deleted = handlers.delete(\n handler as Listener<EventToArgs[Key]>\n )\n if (deleted && handlers.size === 0) {\n this.map.delete(event)\n }\n }\n }\n\n function handler(...args: Parameters<Listener<EventToArgs[T]>>): void {\n listener(...args)\n }\n }\n\n once<T extends Key>(\n event: T\n , listener: Listener<EventToArgs[T]>\n ): () => void {\n const removeListener = this.on(\n event\n , (...args: Parameters<Listener<EventToArgs[T]>>) => {\n listener(...args)\n removeListener()\n }\n )\n\n return removeListener\n }\n\n emit<T extends Key>(event: T, ...args: EventToArgs[T]): void {\n this.map.get(event)?.forEach(cb => cb(...args))\n }\n}\n","export class HashMap<K, V, Hash = unknown> {\n private map = new Map<Hash, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(private hash: (key: K) => Hash) {}\n\n set(key: K, value: V): this {\n this.map.set(this.hash(key), value)\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(this.hash(key))\n }\n\n get(key: K): V | undefined {\n return this.map.get(this.hash(key))\n }\n\n delete(key: K): boolean {\n return this.map.delete(this.hash(key))\n }\n\n clear(): void {\n this.map.clear()\n }\n}\n","export class HashSet<V, Hash = unknown> implements Iterable<V> {\n private map = new Map<Hash, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n [Symbol.iterator](): IterableIterator<V> {\n return this.map.values()\n }\n\n constructor(private hash: (value: V) => Hash) {}\n\n add(value: V): this {\n this.map.set(this.hash(value), value)\n return this\n }\n\n delete(value: V): boolean {\n return this.map.delete(this.hash(value))\n }\n\n has(value: V): boolean {\n return this.map.has(this.hash(value))\n }\n\n clear(): void {\n this.map.clear()\n }\n\n values(): IterableIterator<V> {\n return this.map.values()\n }\n}\n","export class Queue<T> {\n private items: T[] = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.items.length\n }\n\n empty(): void {\n this.items.length = 0\n }\n\n enqueue(...items: T[]): void {\n this.items.push(...items)\n }\n\n dequeue(): T | undefined {\n return this.items.shift()\n }\n\n remove(item: T): void {\n let index: number\n while ((index = this.items.indexOf(item)) >= 0) {\n this.items.splice(index, 1)\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyArray = exports.isEmptyArray = exports.isntArray = exports.isArray = void 0;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isntArray(val) {\n return !isArray(val);\n}\nexports.isntArray = isntArray;\nfunction isEmptyArray(val) {\n return val.length === 0;\n}\nexports.isEmptyArray = isEmptyArray;\nfunction isntEmptyArray(val) {\n return val.length !== 0;\n}\nexports.isntEmptyArray = isntEmptyArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNull = exports.isNull = void 0;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isntNull(val) {\n return !isNull(val);\n}\nexports.isntNull = isntNull;\n//# sourceMappingURL=null.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntUndefined = exports.isUndefined = void 0;\nfunction isUndefined(val) {\n return val === undefined;\n}\nexports.isUndefined = isUndefined;\nfunction isntUndefined(val) {\n return !isUndefined(val);\n}\nexports.isntUndefined = isntUndefined;\n//# sourceMappingURL=undefined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFunction = exports.isFunction = void 0;\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nexports.isFunction = isFunction;\nfunction isntFunction(val) {\n return !isFunction(val);\n}\nexports.isntFunction = isntFunction;\n//# sourceMappingURL=function.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntAsyncIterable = exports.isAsyncIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isAsyncIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.asyncIterator]);\n}\nexports.isAsyncIterable = isAsyncIterable;\nfunction isntAsyncIterable(val) {\n return !isAsyncIterable(val);\n}\nexports.isntAsyncIterable = isntAsyncIterable;\n//# sourceMappingURL=async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBigInt = exports.isBigInt = void 0;\nfunction isBigInt(val) {\n return typeof val === 'bigint';\n}\nexports.isBigInt = isBigInt;\nfunction isntBigInt(val) {\n return !isBigInt(val);\n}\nexports.isntBigInt = isntBigInt;\n//# sourceMappingURL=bigint.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntBoolean = exports.isBoolean = void 0;\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nexports.isBoolean = isBoolean;\nfunction isntBoolean(val) {\n return !isBoolean(val);\n}\nexports.isntBoolean = isntBoolean;\n//# sourceMappingURL=boolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntString = exports.isString = void 0;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\nfunction isntString(val) {\n return !isString(val);\n}\nexports.isntString = isntString;\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntChar = exports.isChar = void 0;\nconst string_1 = require(\"./string\");\nfunction isChar(val) {\n return (0, string_1.isString)(val)\n && val.length === 1;\n}\nexports.isChar = isChar;\nfunction isntChar(val) {\n return !isChar(val);\n}\nexports.isntChar = isntChar;\n//# sourceMappingURL=char.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntDate = exports.isDate = void 0;\nfunction isDate(val) {\n return val instanceof Date;\n}\nexports.isDate = isDate;\nfunction isntDate(val) {\n return !isDate(val);\n}\nexports.isntDate = isntDate;\n//# sourceMappingURL=date.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inEnum = void 0;\nfunction inEnum(val, _enum) {\n return Object.values(_enum).includes(val);\n}\nexports.inEnum = inEnum;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntError = exports.isError = void 0;\nfunction isError(val) {\n return val instanceof Error;\n}\nexports.isError = isError;\nfunction isntError(val) {\n return !isError(val);\n}\nexports.isntError = isntError;\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntFalsy = exports.isFalsy = void 0;\nfunction isFalsy(val) {\n return !val;\n}\nexports.isFalsy = isFalsy;\nfunction isntFalsy(val) {\n return !isFalsy(val);\n}\nexports.isntFalsy = isntFalsy;\n//# sourceMappingURL=falsy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntIterable = exports.isIterable = void 0;\nconst null_1 = require(\"./null\");\nconst undefined_1 = require(\"./undefined\");\nconst function_1 = require(\"./function\");\nfunction isIterable(val) {\n return (0, null_1.isntNull)(val)\n && (0, undefined_1.isntUndefined)(val)\n && (0, function_1.isFunction)(val[Symbol.iterator]);\n}\nexports.isIterable = isIterable;\nfunction isntIterable(val) {\n return !isIterable(val);\n}\nexports.isntIterable = isntIterable;\n//# sourceMappingURL=iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntNaN = exports.isNaN = exports.isNegativeInfinity = exports.isPositiveInfinity = exports.isFinite = exports.isntNumber = exports.isNumber = void 0;\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nexports.isNumber = isNumber;\nfunction isntNumber(val) {\n return !isNumber(val);\n}\nexports.isntNumber = isntNumber;\nfunction isFinite(val) {\n return Number.isFinite(val);\n}\nexports.isFinite = isFinite;\nfunction isPositiveInfinity(val) {\n return val === Infinity;\n}\nexports.isPositiveInfinity = isPositiveInfinity;\nfunction isNegativeInfinity(val) {\n return val === -Infinity;\n}\nexports.isNegativeInfinity = isNegativeInfinity;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isntNaN(val) {\n return !isNaN(val);\n}\nexports.isntNaN = isntNaN;\n//# sourceMappingURL=number.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntEmptyObject = exports.isEmptyObject = exports.isntPlainObject = exports.isPlainObject = exports.isntObject = exports.isObject = void 0;\nconst isPlainObject_1 = __importDefault(require(\"lodash/isPlainObject\"));\nfunction isObject(val) {\n return val !== null\n && typeof val === 'object';\n}\nexports.isObject = isObject;\nfunction isntObject(val) {\n return !isObject(val);\n}\nexports.isntObject = isntObject;\nfunction isPlainObject(val) {\n return (0, isPlainObject_1.default)(val);\n}\nexports.isPlainObject = isPlainObject;\nfunction isntPlainObject(val) {\n return !isPlainObject(val);\n}\nexports.isntPlainObject = isntPlainObject;\nfunction isEmptyObject(val) {\n return Object.keys(val).length === 0;\n}\nexports.isEmptyObject = isEmptyObject;\nfunction isntEmptyObject(val) {\n return Object.keys(val).length !== 0;\n}\nexports.isntEmptyObject = isntEmptyObject;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntJsonable = exports.isJsonable = exports.isntJson = exports.isJson = void 0;\nconst null_1 = require(\"./null\");\nconst boolean_1 = require(\"./boolean\");\nconst string_1 = require(\"./string\");\nconst number_1 = require(\"./number\");\nconst array_1 = require(\"./array\");\nconst object_1 = require(\"./object\");\nfunction isJson(val) {\n return (0, null_1.isNull)(val)\n || (0, boolean_1.isBoolean)(val)\n || (0, string_1.isString)(val)\n || (0, number_1.isNumber)(val)\n || ((0, array_1.isArray)(val) && val.every(isJson))\n || ((0, object_1.isPlainObject)(val) && Object.values(val).every(isJson));\n}\nexports.isJson = isJson;\nfunction isntJson(val) {\n return !isJson(val);\n}\nexports.isntJson = isntJson;\nfunction isJsonable(val) {\n try {\n JSON.stringify(val);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isJsonable = isJsonable;\nfunction isntJsonable(val) {\n return !isntJsonable(val);\n}\nexports.isntJsonable = isntJsonable;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPromiseLike = exports.isntPromiseLike = exports.isntPromise = exports.isPromise = void 0;\nconst object_1 = require(\"./object\");\nconst function_1 = require(\"./function\");\nfunction isPromise(val) {\n return val instanceof Promise;\n}\nexports.isPromise = isPromise;\nfunction isntPromise(val) {\n return !isPromise(val);\n}\nexports.isntPromise = isntPromise;\nfunction isntPromiseLike(val) {\n return !isPromiseLike(val);\n}\nexports.isntPromiseLike = isntPromiseLike;\nfunction isPromiseLike(val) {\n return (0, object_1.isObject)(val)\n && (0, function_1.isFunction)(val.then);\n}\nexports.isPromiseLike = isPromiseLike;\n//# sourceMappingURL=promise.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsoluteURL = void 0;\nfunction isAbsoluteURL(str) {\n try {\n new URL(str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexports.isAbsoluteURL = isAbsoluteURL;\n//# sourceMappingURL=url.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isntRegExp = exports.isRegExp = void 0;\nfunction isRegExp(val) {\n return val instanceof RegExp;\n}\nexports.isRegExp = isRegExp;\nfunction isntRegExp(val) {\n return !isRegExp(val);\n}\nexports.isntRegExp = isntRegExp;\n//# sourceMappingURL=regexp.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./async-iterable\"), exports);\n__exportStar(require(\"./bigint\"), exports);\n__exportStar(require(\"./boolean\"), exports);\n__exportStar(require(\"./char\"), exports);\n__exportStar(require(\"./date\"), exports);\n__exportStar(require(\"./enum\"), exports);\n__exportStar(require(\"./error\"), exports);\n__exportStar(require(\"./falsy\"), exports);\n__exportStar(require(\"./function\"), exports);\n__exportStar(require(\"./iterable\"), exports);\n__exportStar(require(\"./json\"), exports);\n__exportStar(require(\"./null\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./promise\"), exports);\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./undefined\"), exports);\n__exportStar(require(\"./url\"), exports);\n__exportStar(require(\"./regexp\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction chunkByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return chunkByAsyncIterable(iterable, predicate);\n }\n else {\n return chunkByIterable(iterable, predicate);\n }\n}\nexports.chunkByAsync = chunkByAsync;\nasync function* chunkByAsyncIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for await (const element of iterable) {\n buffer.push(element);\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\nasync function* chunkByIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n buffer.push(element);\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\n//# sourceMappingURL=chunk-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkBy = void 0;\nfunction* chunkBy(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n buffer.push(element);\n if (predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n index++;\n }\n if (buffer.length)\n yield buffer;\n}\nexports.chunkBy = chunkBy;\n//# sourceMappingURL=chunk-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.concatAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nconst go_1 = require(\"@blackglory/go\");\nfunction concatAsync(iterable, ...otherIterables) {\n return (0, go_1.go)(async function* () {\n for (const iter of [iterable, ...otherIterables]) {\n if ((0, types_1.isAsyncIterable)(iter)) {\n for await (const element of iter) {\n yield element;\n }\n }\n else {\n for (const element of iter) {\n yield element;\n }\n }\n }\n });\n}\nexports.concatAsync = concatAsync;\n//# sourceMappingURL=concat-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.concat = void 0;\nconst go_1 = require(\"@blackglory/go\");\nfunction concat(iterable, ...otherIterables) {\n return (0, go_1.go)(function* () {\n for (const iter of [iterable, ...otherIterables]) {\n yield* iter;\n }\n });\n}\nexports.concat = concat;\n//# sourceMappingURL=concat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.copyIterable = exports.copyAsyncIterable = void 0;\nasync function* copyAsyncIterable(iterable) {\n for await (const element of iterable) {\n yield element;\n }\n}\nexports.copyAsyncIterable = copyAsyncIterable;\nfunction* copyIterable(iterable) {\n for (const element of iterable) {\n yield element;\n }\n}\nexports.copyIterable = copyIterable;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropUntilAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction dropUntilAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return dropUntilAsyncIterable(iterable, predicate);\n }\n else {\n return dropUntilIterable(iterable, predicate);\n }\n}\nexports.dropUntilAsync = dropUntilAsync;\nasync function* dropUntilAsyncIterable(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n if (await predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = await iterator.next());\n }\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n}\nasync function* dropUntilIterable(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (await predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\n//# sourceMappingURL=drop-until-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropUntil = void 0;\nfunction* dropUntil(iterable, predicate) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let index = 0;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (predicate(value, index++))\n break;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\nexports.dropUntil = dropUntil;\n//# sourceMappingURL=drop-until.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction filterAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return filterAsyncIterable(iterable, predicate);\n }\n else {\n return filterIterable(iterable, predicate);\n }\n}\nexports.filterAsync = filterAsync;\nasync function* filterAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n yield element;\n index++;\n }\n}\nasync function* filterIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=filter-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filter = void 0;\nfunction* filter(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n yield element;\n index++;\n }\n}\nexports.filter = filter;\n//# sourceMappingURL=filter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction flattenByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return flattenByAsyncIterable(iterable, predicate);\n }\n else {\n return flattenByIterable(iterable, predicate);\n }\n}\nexports.flattenByAsync = flattenByAsync;\nasync function* flattenByAsyncIterable(iterable, predicate) {\n const level = 1;\n for await (const element of iterable) {\n if (isFiniteIterable(element) && await predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction flattenByIterable(iterable, predicate) {\n return flatten(iterable, predicate, 1);\n}\nasync function* flatten(iterable, predicate, level) {\n for (const element of iterable) {\n if (isFiniteIterable(element) && await predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction isFiniteIterable(val) {\n return (0, types_1.isIterable)(val) && (0, types_1.isntChar)(val);\n}\n//# sourceMappingURL=flatten-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenDeepAsync = void 0;\nconst flatten_by_async_1 = require(\"./flatten-by-async\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction flattenDeepAsync(iterable, depth = Infinity) {\n (0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');\n (0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');\n return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);\n}\nexports.flattenDeepAsync = flattenDeepAsync;\n//# sourceMappingURL=flatten-deep-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenBy = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction flattenBy(iterable, predicate) {\n return flatten(iterable, predicate, 1);\n}\nexports.flattenBy = flattenBy;\nfunction* flatten(iterable, predicate, level) {\n for (const element of iterable) {\n if (isFiniteIterable(element) && predicate(element, level)) {\n yield* flatten(element, predicate, level + 1);\n }\n else {\n yield element;\n }\n }\n}\nfunction isFiniteIterable(val) {\n return (0, types_1.isIterable)(val) && (0, types_1.isntChar)(val);\n}\n//# sourceMappingURL=flatten-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenDeep = void 0;\nconst flatten_by_1 = require(\"./flatten-by\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction flattenDeep(iterable, depth = Infinity) {\n (0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');\n (0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');\n return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);\n}\nexports.flattenDeep = flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mapAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction mapAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return mapAsyncIterable(iterable, fn);\n }\n else {\n return mapIterable(iterable, fn);\n }\n}\nexports.mapAsync = mapAsync;\nasync function* mapAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n yield await fn(element, index);\n index++;\n }\n}\nasync function* mapIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n yield await fn(element, index);\n index++;\n }\n}\n//# sourceMappingURL=map-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.map = void 0;\nfunction* map(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n yield fn(element, index);\n index++;\n }\n}\nexports.map = map;\n//# sourceMappingURL=map.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.repeatAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction repeatAsync(iterable, times) {\n (0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');\n (0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');\n if (times === Infinity)\n warnInfiniteLoop();\n return (0, go_1.go)(async function* () {\n const cache = [];\n if (times > 0) {\n for await (const element of iterable) {\n yield element;\n cache.push(element);\n }\n times--;\n }\n while (times > 0) {\n yield* cache;\n times--;\n }\n });\n}\nexports.repeatAsync = repeatAsync;\nfunction warnInfiniteLoop() {\n if (isProduction())\n return;\n console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');\n}\nfunction isProduction() {\n return process.env.NODE_ENV === 'production';\n}\n//# sourceMappingURL=repeat-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.repeat = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction repeat(iterable, times) {\n (0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');\n (0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');\n if (times === Infinity)\n warnInfiniteLoop();\n return (0, go_1.go)(function* () {\n const cache = [];\n if (times > 0) {\n for (const element of iterable) {\n yield element;\n cache.push(element);\n }\n times--;\n }\n while (times > 0) {\n yield* cache;\n times--;\n }\n });\n}\nexports.repeat = repeat;\nfunction warnInfiniteLoop() {\n if (isProduction())\n return;\n console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');\n}\nfunction isProduction() {\n return process.env.NODE_ENV === 'production';\n}\n//# sourceMappingURL=repeat.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitAsync = void 0;\nasync function* splitAsync(iterable, separator) {\n let buffer = [];\n for await (const element of iterable) {\n if (element === separator) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n }\n yield buffer;\n}\nexports.splitAsync = splitAsync;\n//# sourceMappingURL=split-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction splitByAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return splitByAsyncIterable(iterable, predicate);\n }\n else {\n return splitByIterable(iterable, predicate);\n }\n}\nexports.splitByAsync = splitByAsync;\nasync function* splitByIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\nasync function* splitByAsyncIterable(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\n//# sourceMappingURL=split-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitBy = void 0;\nfunction* splitBy(iterable, predicate) {\n let buffer = [];\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index)) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n index++;\n }\n yield buffer;\n}\nexports.splitBy = splitBy;\n//# sourceMappingURL=split-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.split = void 0;\nfunction* split(iterable, separator) {\n let buffer = [];\n for (const element of iterable) {\n if (element === separator) {\n yield buffer;\n buffer = [];\n }\n else {\n buffer.push(element);\n }\n }\n yield buffer;\n}\nexports.split = split;\n//# sourceMappingURL=split.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeUntilAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction takeUntilAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return takeUntilAsyncIterable(iterable, predicate);\n }\n else {\n return takeUntilIterable(iterable, predicate);\n }\n}\nexports.takeUntilAsync = takeUntilAsync;\nasync function* takeUntilAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\nasync function* takeUntilIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=take-until-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeUntil = void 0;\nfunction* takeUntil(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n break;\n yield element;\n index++;\n }\n}\nexports.takeUntil = takeUntil;\n//# sourceMappingURL=take-until.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tapAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction tapAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return tapAsyncIterable(iterable, fn);\n }\n else {\n return tapIterable(iterable, fn);\n }\n}\nexports.tapAsync = tapAsync;\nasync function* tapIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n await fn(element, index);\n yield element;\n index++;\n }\n}\nasync function* tapAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n await fn(element, index);\n yield element;\n index++;\n }\n}\n//# sourceMappingURL=tap-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tap = void 0;\nfunction* tap(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n fn(element, index);\n yield element;\n index++;\n }\n}\nexports.tap = tap;\n//# sourceMappingURL=tap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAsyncIterable = void 0;\nasync function* toAsyncIterable(iterable) {\n for (const value of iterable) {\n yield value;\n }\n}\nexports.toAsyncIterable = toAsyncIterable;\n//# sourceMappingURL=to-async-iterable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformAsync = void 0;\nasync function* transformAsync(iterable, transformer) {\n yield* transformer(iterable);\n}\nexports.transformAsync = transformAsync;\n//# sourceMappingURL=transform-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transform = void 0;\nfunction* transform(iterable, transformer) {\n yield* transformer(iterable);\n}\nexports.transform = transform;\n//# sourceMappingURL=transform.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqAsync = void 0;\nasync function* uniqAsync(iterable) {\n const bucket = new Set();\n for await (const element of iterable) {\n if (!bucket.has(element)) {\n yield element;\n bucket.add(element);\n }\n }\n}\nexports.uniqAsync = uniqAsync;\n//# sourceMappingURL=uniq-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqByAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction uniqByAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return uniqByAsyncIterable(iterable, fn);\n }\n else {\n return uniqByIterable(iterable, fn);\n }\n}\nexports.uniqByAsync = uniqByAsync;\nasync function* uniqByAsyncIterable(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for await (const element of iterable) {\n const result = await fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\nasync function* uniqByIterable(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for (const element of iterable) {\n const result = await fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\n//# sourceMappingURL=uniq-by-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniqBy = void 0;\nfunction* uniqBy(iterable, fn) {\n const bucket = new Set();\n let index = 0;\n for (const element of iterable) {\n const result = fn(element, index);\n if (!bucket.has(result)) {\n yield element;\n bucket.add(result);\n }\n index++;\n }\n}\nexports.uniqBy = uniqBy;\n//# sourceMappingURL=uniq-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uniq = void 0;\nfunction* uniq(iterable) {\n const bucket = new Set();\n for (const element of iterable) {\n if (!bucket.has(element)) {\n yield element;\n bucket.add(element);\n }\n }\n}\nexports.uniq = uniq;\n//# sourceMappingURL=uniq.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zipAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nvar Kind;\n(function (Kind) {\n Kind[Kind[\"Sync\"] = 0] = \"Sync\";\n Kind[Kind[\"Async\"] = 1] = \"Async\";\n})(Kind || (Kind = {}));\nfunction zipAsync(iterable, ...otherIterables) {\n return zipWithSize(iterable, ...otherIterables);\n}\nexports.zipAsync = zipAsync;\nasync function* zipWithSize(...iterables) {\n var _a, _b, _c, _d;\n const length = iterables.length;\n const iterators = iterables.map(iterable => {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return [Kind.Async, iterable[Symbol.asyncIterator]()];\n }\n else {\n return [Kind.Sync, iterable[Symbol.iterator]()];\n }\n });\n const dones = iterators.map(() => false);\n try {\n while (true) {\n const result = new Array(length);\n for (let i = 0; i < length; i++) {\n const [kind, iterator] = iterators[i];\n let temp;\n if (kind === Kind.Async) {\n temp = await iterator.next();\n }\n else {\n temp = iterator.next();\n }\n if (temp.done) {\n dones[i] = true;\n return;\n }\n result[i] = temp.value;\n }\n yield result;\n }\n }\n finally {\n const undoneIterators = iterators.filter((_, i) => !dones[i]);\n for (const [kind, iterator] of undoneIterators) {\n if (kind === Kind.Async) {\n await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));\n }\n else {\n (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);\n }\n }\n }\n}\n//# sourceMappingURL=zip-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./chunk-async\"), exports);\n__exportStar(require(\"./chunk-by-async\"), exports);\n__exportStar(require(\"./chunk-by\"), exports);\n__exportStar(require(\"./chunk\"), exports);\n__exportStar(require(\"./concat-async\"), exports);\n__exportStar(require(\"./concat\"), exports);\n__exportStar(require(\"./drop-async\"), exports);\n__exportStar(require(\"./drop-right-async\"), exports);\n__exportStar(require(\"./drop-right\"), exports);\n__exportStar(require(\"./drop-until-async\"), exports);\n__exportStar(require(\"./drop-until\"), exports);\n__exportStar(require(\"./drop\"), exports);\n__exportStar(require(\"./filter-async\"), exports);\n__exportStar(require(\"./filter\"), exports);\n__exportStar(require(\"./flatten-async\"), exports);\n__exportStar(require(\"./flatten-by-async\"), exports);\n__exportStar(require(\"./flatten-by\"), exports);\n__exportStar(require(\"./flatten-deep-async\"), exports);\n__exportStar(require(\"./flatten-deep\"), exports);\n__exportStar(require(\"./flatten\"), exports);\n__exportStar(require(\"./map-async\"), exports);\n__exportStar(require(\"./map\"), exports);\n__exportStar(require(\"./repeat-async\"), exports);\n__exportStar(require(\"./repeat\"), exports);\n__exportStar(require(\"./slice-async\"), exports);\n__exportStar(require(\"./slice\"), exports);\n__exportStar(require(\"./split-async\"), exports);\n__exportStar(require(\"./split-by-async\"), exports);\n__exportStar(require(\"./split-by\"), exports);\n__exportStar(require(\"./split\"), exports);\n__exportStar(require(\"./take-async\"), exports);\n__exportStar(require(\"./take-right-async\"), exports);\n__exportStar(require(\"./take-right\"), exports);\n__exportStar(require(\"./take-until-async\"), exports);\n__exportStar(require(\"./take-until\"), exports);\n__exportStar(require(\"./take\"), exports);\n__exportStar(require(\"./tap-async\"), exports);\n__exportStar(require(\"./tap\"), exports);\n__exportStar(require(\"./to-async-iterable\"), exports);\n__exportStar(require(\"./transform-async\"), exports);\n__exportStar(require(\"./transform\"), exports);\n__exportStar(require(\"./uniq-async\"), exports);\n__exportStar(require(\"./uniq-by-async\"), exports);\n__exportStar(require(\"./uniq-by\"), exports);\n__exportStar(require(\"./uniq\"), exports);\n__exportStar(require(\"./zip-async\"), exports);\n__exportStar(require(\"./zip\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunkAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction chunkAsync(iterable, size) {\n (0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');\n (0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');\n return (0, go_1.go)(async function* () {\n let buffer = [];\n for await (const element of iterable) {\n buffer.push(element);\n if (buffer.length >= size) {\n yield buffer;\n buffer = [];\n }\n }\n if (buffer.length)\n yield buffer;\n });\n}\nexports.chunkAsync = chunkAsync;\n//# sourceMappingURL=chunk-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.chunk = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction chunk(iterable, size) {\n (0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');\n (0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');\n return (0, go_1.go)(function* () {\n let buffer = [];\n for (const element of iterable) {\n buffer.push(element);\n if (buffer.length >= size) {\n yield buffer;\n buffer = [];\n }\n }\n if (buffer.length)\n yield buffer;\n });\n}\nexports.chunk = chunk;\n//# sourceMappingURL=chunk.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyAsyncIterable)(iterable);\n return (0, go_1.go)(async function* () {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n if (count <= 0)\n break;\n count--;\n }\n while (!done) {\n yield value;\n ({ value, done } = await iterator.next());\n }\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n });\n}\nexports.dropAsync = dropAsync;\n//# sourceMappingURL=drop-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRightAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropRightAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyAsyncIterable)(iterable);\n return (0, go_1.go)(async function* () {\n const arr = await toArrayAsync(iterable);\n const result = arr.slice(0, -count);\n for (const value of result) {\n yield value;\n }\n });\n}\nexports.dropRightAsync = dropRightAsync;\nasync function toArrayAsync(iterable) {\n const result = [];\n for await (const element of iterable) {\n result.push(element);\n }\n return result;\n}\n//# sourceMappingURL=drop-right-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRight = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction dropRight(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyIterable)(iterable);\n return (0, go_1.go)(function* () {\n const arr = Array.from(iterable);\n yield* arr.slice(0, -count);\n });\n}\nexports.dropRight = dropRight;\n//# sourceMappingURL=drop-right.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.drop = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction drop(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n if (count === 0)\n return (0, utils_1.copyIterable)(iterable);\n return (0, go_1.go)(function* () {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let value;\n while ({ value, done } = iterator.next(), !done) {\n if (count <= 0)\n break;\n count--;\n }\n while (!done) {\n yield value;\n ({ value, done } = iterator.next());\n }\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n });\n}\nexports.drop = drop;\n//# sourceMappingURL=drop.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenAsync = void 0;\nconst flatten_deep_async_1 = require(\"./flatten-deep-async\");\nfunction flattenAsync(iterable) {\n return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);\n}\nexports.flattenAsync = flattenAsync;\n//# sourceMappingURL=flatten-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flatten = void 0;\nconst flatten_deep_1 = require(\"./flatten-deep\");\nfunction flatten(iterable) {\n return (0, flatten_deep_1.flattenDeep)(iterable, 1);\n}\nexports.flatten = flatten;\n//# sourceMappingURL=flatten.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sliceAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction sliceAsync(iterable, start, end = Infinity) {\n (0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');\n (0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');\n (0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');\n (0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');\n return (0, go_1.go)(async function* () {\n let index = 0;\n for await (const element of iterable) {\n if (index >= end)\n break;\n if (index >= start)\n yield element;\n index++;\n }\n });\n}\nexports.sliceAsync = sliceAsync;\n//# sourceMappingURL=slice-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slice = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction slice(iterable, start, end = Infinity) {\n (0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');\n (0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');\n (0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');\n (0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');\n return (0, go_1.go)(function* () {\n let index = 0;\n for (const element of iterable) {\n if (index >= end)\n break;\n if (index >= start)\n yield element;\n index++;\n }\n });\n}\nexports.slice = slice;\n//# sourceMappingURL=slice.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(async function* () {\n if (count === 0)\n return;\n for await (const element of iterable) {\n yield element;\n count--;\n if (count === 0)\n break;\n }\n });\n}\nexports.takeAsync = takeAsync;\n//# sourceMappingURL=take-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeRightAsync = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeRightAsync(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(async function* () {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n const buffer = [];\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n buffer.push(value);\n if (buffer.length > count)\n buffer.shift();\n }\n yield* buffer;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n });\n}\nexports.takeRightAsync = takeRightAsync;\n//# sourceMappingURL=take-right-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.takeRight = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction takeRight(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(function* () {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n const buffer = [];\n let value;\n while ({ value, done } = iterator.next(), !done) {\n buffer.push(value);\n if (buffer.length > count)\n buffer.shift();\n }\n yield* buffer;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n });\n}\nexports.takeRight = takeRight;\n//# sourceMappingURL=take-right.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.take = void 0;\nconst go_1 = require(\"@blackglory/go\");\nconst errors_1 = require(\"@blackglory/errors\");\nfunction take(iterable, count) {\n (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');\n (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');\n return (0, go_1.go)(function* () {\n if (count === 0)\n return;\n for (const element of iterable) {\n yield element;\n count--;\n if (count === 0)\n break;\n }\n });\n}\nexports.take = take;\n//# sourceMappingURL=take.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.zip = void 0;\nfunction zip(iterable, ...otherIterables) {\n return zipWithSize(iterable, ...otherIterables);\n}\nexports.zip = zip;\nfunction* zipWithSize(...iterables) {\n const length = iterables.length;\n const iterators = iterables.map(iterable => iterable[Symbol.iterator]());\n const dones = iterators.map(() => false);\n try {\n while (true) {\n const result = new Array(length);\n for (let i = 0; i < length; i++) {\n const { value, done } = iterators[i].next();\n if (done) {\n dones[i] = true;\n return;\n }\n result[i] = value;\n }\n yield result;\n }\n }\n finally {\n const undoneIterators = iterators.filter((_, i) => !dones[i]);\n undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });\n }\n}\n//# sourceMappingURL=zip.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.consume = void 0;\nfunction consume(iterable, consumer) {\n return consumer(iterable);\n}\nexports.consume = consume;\n//# sourceMappingURL=consume.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.eachAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction eachAsync(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return eachAsyncIterable(iterable, fn);\n }\n else {\n return eachIterable(iterable, fn);\n }\n}\nexports.eachAsync = eachAsync;\nasync function eachAsyncIterable(iterable, fn) {\n let index = 0;\n for await (const element of iterable) {\n await fn(element, index);\n index++;\n }\n}\nasync function eachIterable(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n await fn(element, index);\n index++;\n }\n}\n//# sourceMappingURL=each-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.each = void 0;\nfunction each(iterable, fn) {\n let index = 0;\n for (const element of iterable) {\n fn(element, index);\n index++;\n }\n}\nexports.each = each;\n//# sourceMappingURL=each.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.everyAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction everyAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return everyAsyncIterable(iterable, predicate);\n }\n else {\n return everyIterable(iterable, predicate);\n }\n}\nexports.everyAsync = everyAsync;\nasync function everyIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (!await predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\nasync function everyAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (!await predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\n//# sourceMappingURL=every-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.every = void 0;\nfunction every(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (!predicate(element, index))\n return false;\n index++;\n }\n return true;\n}\nexports.every = every;\n//# sourceMappingURL=every.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction findAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return findAsyncIterable(iterable, predicate);\n }\n else {\n return findIterable(iterable, predicate);\n }\n}\nexports.findAsync = findAsync;\nasync function findIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\nasync function findAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\n//# sourceMappingURL=find-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.find = void 0;\nfunction find(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n return element;\n index++;\n }\n return undefined;\n}\nexports.find = find;\n//# sourceMappingURL=find.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.firstAsync = void 0;\nasync function firstAsync(iterable) {\n for await (const element of iterable) {\n return element;\n }\n return undefined;\n}\nexports.firstAsync = firstAsync;\n//# sourceMappingURL=first-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.first = void 0;\nfunction first(iterable) {\n for (const element of iterable) {\n return element;\n }\n return undefined;\n}\nexports.first = first;\n//# sourceMappingURL=first.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.includesAsync = void 0;\nasync function includesAsync(iterable, value) {\n for await (const element of iterable) {\n if (element === value)\n return true;\n }\n return false;\n}\nexports.includesAsync = includesAsync;\n//# sourceMappingURL=includes-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.includes = void 0;\nfunction includes(iterable, value) {\n for (const element of iterable) {\n if (element === value)\n return true;\n }\n return false;\n}\nexports.includes = includes;\n//# sourceMappingURL=includes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matchAsync = void 0;\nasync function matchAsync(iterable, sequence) {\n const sequenceLength = sequence.length;\n let matchCount = 0;\n for await (const element of iterable) {\n if (element === sequence[matchCount])\n matchCount++;\n if (matchCount === sequenceLength)\n return true;\n }\n return false;\n}\nexports.matchAsync = matchAsync;\n//# sourceMappingURL=match-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.match = void 0;\nfunction match(iterable, sequence) {\n const sequenceLength = sequence.length;\n let matchCount = 0;\n for (const element of iterable) {\n if (element === sequence[matchCount])\n matchCount++;\n if (matchCount === sequenceLength)\n return true;\n }\n return false;\n}\nexports.match = match;\n//# sourceMappingURL=match.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduceAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction reduceAsync(iterable, fn, initialValue) {\n if ((0, types_1.isUndefined)(initialValue)) {\n return reduceAsyncWithoutInitialValue(iterable, fn);\n }\n else {\n return reduceAsyncWithInitialValue(iterable, fn, initialValue);\n }\n}\nexports.reduceAsync = reduceAsync;\nfunction reduceAsyncWithInitialValue(iterable, fn, initialValue) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return reduceAsyncIterable(iterable);\n }\n else {\n return reduceIterable(iterable);\n }\n async function reduceIterable(iterable) {\n let result = initialValue, index = 0;\n for (const currentValue of iterable) {\n result = await fn(result, currentValue, index++);\n }\n return result;\n }\n async function reduceAsyncIterable(iterable) {\n let result = initialValue, index = 0;\n for await (const currentValue of iterable) {\n result = await fn(result, currentValue, index++);\n }\n return result;\n }\n}\nfunction reduceAsyncWithoutInitialValue(iterable, fn) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return reduceAsyncIterable(iterable);\n }\n else {\n return reduceIterable(iterable);\n }\n async function reduceAsyncIterable(iterable) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let result = await readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = await iterator.next(), !done) {\n result = await fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n async function readInitialValue(iterator) {\n const result = await iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n }\n async function reduceIterable(iterable) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let result = readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n result = await fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n function readInitialValue(iterator) {\n const result = iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n }\n}\n//# sourceMappingURL=reduce-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduce = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction reduce(iterable, fn, initialValue) {\n if ((0, types_1.isUndefined)(initialValue)) {\n return reduceWithoutInitialValue(iterable, fn);\n }\n else {\n return reduceWithInitialValue(iterable, fn, initialValue);\n }\n}\nexports.reduce = reduce;\nfunction reduceWithInitialValue(iterable, fn, initialValue) {\n let result = initialValue, index = 0;\n for (const currentValue of iterable) {\n result = fn(result, currentValue, index++);\n }\n return result;\n}\nfunction reduceWithoutInitialValue(iterable, fn) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let result = readInitialValue(iterator);\n let index = 1;\n let value;\n while ({ value, done } = iterator.next(), !done) {\n result = fn(result, value, index++);\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n function readInitialValue(iterator) {\n const result = iterator.next();\n if (result.done) {\n done = true;\n throw new Error('Reduce of empty iterable with no initial value');\n }\n return result.value;\n }\n}\n//# sourceMappingURL=reduce.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.someAsync = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction someAsync(iterable, predicate) {\n if ((0, types_1.isAsyncIterable)(iterable)) {\n return someAsyncIterable(iterable, predicate);\n }\n else {\n return someIterable(iterable, predicate);\n }\n}\nexports.someAsync = someAsync;\nasync function someIterable(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (await predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\nasync function someAsyncIterable(iterable, predicate) {\n let index = 0;\n for await (const element of iterable) {\n if (await predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\n//# sourceMappingURL=some-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.some = void 0;\nfunction some(iterable, predicate) {\n let index = 0;\n for (const element of iterable) {\n if (predicate(element, index))\n return true;\n index++;\n }\n return false;\n}\nexports.some = some;\n//# sourceMappingURL=some.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lastAsync = void 0;\nasync function lastAsync(iterable) {\n var _a;\n const iterator = iterable[Symbol.asyncIterator]();\n let done;\n try {\n let value;\n let result;\n while ({ value, done } = await iterator.next(), !done) {\n result = value;\n }\n return result;\n }\n finally {\n if (!done)\n await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));\n }\n}\nexports.lastAsync = lastAsync;\n//# sourceMappingURL=last-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.last = void 0;\nfunction last(iterable) {\n var _a;\n const iterator = iterable[Symbol.iterator]();\n let done;\n try {\n let value;\n let result;\n while ({ value, done } = iterator.next(), !done) {\n result = value;\n }\n return result;\n }\n finally {\n if (!done)\n (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);\n }\n}\nexports.last = last;\n//# sourceMappingURL=last.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toArrayAsync = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toArrayAsync(iterable) {\n return (0, consume_1.consume)(iterable, async (iterable) => {\n const result = [];\n for await (const element of iterable) {\n result.push(element);\n }\n return result;\n });\n}\nexports.toArrayAsync = toArrayAsync;\n//# sourceMappingURL=to-array-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toArray = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toArray(iterable) {\n return (0, consume_1.consume)(iterable, iterable => Array.from(iterable));\n}\nexports.toArray = toArray;\n//# sourceMappingURL=to-array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSetAsync = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toSetAsync(iterable) {\n return (0, consume_1.consume)(iterable, async (iterable) => {\n const result = new Set();\n for await (const element of iterable) {\n result.add(element);\n }\n return result;\n });\n}\nexports.toSetAsync = toSetAsync;\n//# sourceMappingURL=to-set-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toSet = void 0;\nconst consume_1 = require(\"./consume\");\nfunction toSet(iterable) {\n return (0, consume_1.consume)(iterable, iterable => new Set(iterable));\n}\nexports.toSet = toSet;\n//# sourceMappingURL=to-set.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.count = void 0;\nfunction count(iterable) {\n let count = 0;\n for (const _ of iterable) {\n count++;\n }\n return count;\n}\nexports.count = count;\n//# sourceMappingURL=count.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.countAsync = void 0;\nasync function countAsync(iterable) {\n let count = 0;\n for await (const _ of iterable) {\n count++;\n }\n return count;\n}\nexports.countAsync = countAsync;\n//# sourceMappingURL=count-async.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.groupBy = void 0;\nconst each_1 = require(\"./each\");\nfunction groupBy(iterable, fn) {\n const map = new Map();\n (0, each_1.each)(iterable, (element, index) => {\n const group = fn(element, index);\n if (!map.has(group)) {\n map.set(group, []);\n }\n map.get(group).push(element);\n });\n return map;\n}\nexports.groupBy = groupBy;\n//# sourceMappingURL=group-by.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.groupByAsync = void 0;\nconst each_async_1 = require(\"./each-async\");\nasync function groupByAsync(iterable, fn) {\n const map = new Map();\n await (0, each_async_1.eachAsync)(iterable, async (element, index) => {\n const group = await fn(element, index);\n if (!map.has(group)) {\n map.set(group, []);\n }\n map.get(group).push(element);\n });\n return map;\n}\nexports.groupByAsync = groupByAsync;\n//# sourceMappingURL=group-by-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./middleware\"), exports);\n__exportStar(require(\"./output\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./consume\"), exports);\n__exportStar(require(\"./each-async\"), exports);\n__exportStar(require(\"./each\"), exports);\n__exportStar(require(\"./every-async\"), exports);\n__exportStar(require(\"./every\"), exports);\n__exportStar(require(\"./find-async\"), exports);\n__exportStar(require(\"./find\"), exports);\n__exportStar(require(\"./first-async\"), exports);\n__exportStar(require(\"./first\"), exports);\n__exportStar(require(\"./includes-async\"), exports);\n__exportStar(require(\"./includes\"), exports);\n__exportStar(require(\"./match-async\"), exports);\n__exportStar(require(\"./match\"), exports);\n__exportStar(require(\"./reduce-async\"), exports);\n__exportStar(require(\"./reduce\"), exports);\n__exportStar(require(\"./some-async\"), exports);\n__exportStar(require(\"./some\"), exports);\n__exportStar(require(\"./last-async\"), exports);\n__exportStar(require(\"./last\"), exports);\n__exportStar(require(\"./to-array-async\"), exports);\n__exportStar(require(\"./to-array\"), exports);\n__exportStar(require(\"./to-set-async\"), exports);\n__exportStar(require(\"./to-set\"), exports);\n__exportStar(require(\"./count\"), exports);\n__exportStar(require(\"./count-async\"), exports);\n__exportStar(require(\"./group-by\"), exports);\n__exportStar(require(\"./group-by-async\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.traverseErrorPrototypeChain = void 0;\nfunction* traverseErrorPrototypeChain(err) {\n let current = err;\n while ((current = Object.getPrototypeOf(current))) {\n yield current;\n if (current === Error.prototype)\n break;\n }\n}\nexports.traverseErrorPrototypeChain = traverseErrorPrototypeChain;\n//# sourceMappingURL=traverse-error-prototype-chain.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorNames = void 0;\nconst types_1 = require(\"@blackglory/types\");\nconst traverse_error_prototype_chain_1 = require(\"./traverse-error-prototype-chain\");\nfunction* getErrorNames(err) {\n var _a;\n if ((0, types_1.isError)(err)) {\n for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {\n if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {\n yield prototype.constructor.name;\n }\n }\n }\n else {\n yield err.name;\n yield* err.ancestors;\n }\n}\nexports.getErrorNames = getErrorNames;\n//# sourceMappingURL=get-error-names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isSerializableError = void 0;\nconst types_1 = require(\"@blackglory/types\");\nfunction isSerializableError(val) {\n return (0, types_1.isObject)(val)\n && (0, types_1.isString)(val.name)\n && (0, types_1.isString)(val.message)\n && ((0, types_1.isString)(val.stack) || (0, types_1.isNull)(val.stack))\n && ((0, types_1.isArray)(val.ancestors) && val.ancestors.every(types_1.isString));\n}\nexports.isSerializableError = isSerializableError;\n//# sourceMappingURL=serializable-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CustomError = void 0;\nconst iterable_operator_1 = require(\"iterable-operator\");\nconst get_error_names_1 = require(\"./get-error-names\");\nconst types_1 = require(\"@blackglory/types\");\nconst serializable_error_1 = require(\"./serializable-error\");\nclass CustomError extends Error {\n get name() {\n var _a, _b;\n return (_b = (_a = (0, iterable_operator_1.first)((0, get_error_names_1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';\n }\n static [Symbol.hasInstance](instance) {\n var _a;\n if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {\n const reversedClassNames = [\n (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,\n ...(0, get_error_names_1.getErrorNames)(this.prototype)\n ].reverse();\n const reversedInstanceNames = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(instance)).reverse();\n return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);\n }\n else {\n return false;\n }\n }\n}\nexports.CustomError = CustomError;\n//# sourceMappingURL=custom-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssertionError = void 0;\nconst custom_error_1 = require(\"./custom-error\");\nclass AssertionError extends custom_error_1.CustomError {\n}\nexports.AssertionError = AssertionError;\n//# sourceMappingURL=assertion-error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pass = void 0;\nfunction pass() { }\nexports.pass = pass;\n//# sourceMappingURL=pass.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.passAsync = void 0;\nasync function passAsync() { }\nexports.passAsync = passAsync;\n//# sourceMappingURL=pass-async.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./pass\"), exports);\n__exportStar(require(\"./pass-async\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hydrate = void 0;\nconst pass_1 = require(\"@blackglory/pass\");\nfunction hydrate(err) {\n var _a;\n const errorNames = [err.name, ...err.ancestors]\n .slice(0, -1)\n .reverse();\n let errorConstructor = Error;\n for (const name of errorNames) {\n errorConstructor = createChildErrorConstructor(errorConstructor, name);\n }\n const result = new errorConstructor();\n result.name = err.name;\n result.message = err.message;\n result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;\n return result;\n}\nexports.hydrate = hydrate;\nfunction createChildErrorConstructor(parentErrorConstructor, name) {\n const constructor = function () { (0, pass_1.pass)(); };\n constructor.prototype = Object.create(parentErrorConstructor.prototype);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'name', { value: name });\n return constructor;\n}\n//# sourceMappingURL=hydrate.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./custom-error\"), exports);\n__exportStar(require(\"./assertion-error\"), exports);\n__exportStar(require(\"./serializable-error\"), exports);\n__exportStar(require(\"./normalize\"), exports);\n__exportStar(require(\"./hydrate\"), exports);\n__exportStar(require(\"./assert\"), exports);\n__exportStar(require(\"./get-error-names\"), exports);\n__exportStar(require(\"./traverse-error-prototype-chain\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalize = void 0;\nconst get_error_names_1 = require(\"./get-error-names\");\nconst iterable_operator_1 = require(\"iterable-operator\");\nfunction normalize(err) {\n var _a;\n const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));\n return {\n name,\n ancestors,\n message: err.message,\n stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null\n };\n}\nexports.normalize = normalize;\n//# sourceMappingURL=normalize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assert = void 0;\nconst assertion_error_1 = require(\"./assertion-error\");\nfunction assert(condition, message) {\n if (!condition)\n throw new assertion_error_1.AssertionError(message);\n}\nexports.assert = assert;\n//# sourceMappingURL=assert.js.map","import { assert } from '@blackglory/errors'\nimport { first } from 'iterable-operator'\n\nexport class LRUMap<K, V> {\n private limit: number\n private map = new Map<K, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(limit: number) {\n assert(Number.isInteger(limit), 'The parameter limit must be an integer')\n assert(limit > 0, 'The parameter limit must be a positive value')\n\n this.limit = limit\n }\n\n set(key: K, value: V): this {\n if (this.map.has(key)) {\n this.updateItem(key, value)\n } else {\n if (this.map.size === this.limit) {\n this.map.delete(this.getColdestKey()!)\n }\n this.map.set(key, value)\n }\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n if (!this.has(key)) return undefined\n\n const value = this.map.get(key)!\n this.updateItem(key, value)\n return value\n }\n\n delete(key: K): boolean {\n return this.map.delete(key)\n }\n\n clear(): void {\n this.map.clear()\n }\n\n /**\n * Reinsert the item.\n */\n private updateItem(key: K, value: V): void {\n this.map.delete(key)\n this.map.set(key, value)\n }\n\n /**\n * Return the earliest key inserted in the Map\n */\n private getColdestKey(): K | undefined {\n return first(this.map.keys())\n }\n}\n","import { setSchedule } from 'extra-timers'\n\nexport class ExpirableMap<K, V> {\n private map = new Map<K, V>()\n private cancelClearTimeout?: () => void\n /**\n * 按过期时间升序排列所有项目的元数据\n */ \n itemMetadataSortedByExpirationTime: Array<{ key: K; expirationTime: number }> = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n set(key: K, value: V, maxAge: number): this {\n this.map.set(key, value)\n this.removeItemMetadata(key)\n this.addItemMetadata(key, Date.now() + maxAge)\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n return this.map.get(key)\n }\n\n delete(key: K): boolean {\n const exists = this.map.delete(key)\n if (exists) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被删除的项目是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n return exists\n }\n\n clear(): void {\n this.map.clear()\n this.cancelClearTimeout?.()\n this.itemMetadataSortedByExpirationTime = []\n }\n\n private addItemMetadata(key: K, expirationTime: number): void {\n for (let i = 0; i < this.itemMetadataSortedByExpirationTime.length; i++) {\n const item = this.itemMetadataSortedByExpirationTime[i]\n if (expirationTime < item.expirationTime) {\n this.itemMetadataSortedByExpirationTime.splice(i, 0, { key, expirationTime })\n\n // 如果本次插入导致原先的第一个项目不再是低一个项目, 则需要重新规划过期回调\n if (i === 0) {\n this.rescheduleClearTimeout()\n }\n return\n }\n }\n\n // 如果代码运行到此处, 意味着数组要么为空, 要么新项目过期时间大于数组内的所有项目, 故直接插入到数组尾端.\n this.itemMetadataSortedByExpirationTime.push({ key, expirationTime })\n // 如果新插入的项目是唯一而项目, 则需要重新规划过期回调\n if (this.itemMetadataSortedByExpirationTime.length === 1) {\n this.rescheduleClearTimeout()\n }\n }\n\n private removeItemMetadata(key: K): void {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n if (index >= 0) {\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被移除的是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n }\n\n private clearExpiredItems(timestamp: number): void {\n const indexOfFirstUnexpired = this.itemMetadataSortedByExpirationTime.findIndex(\n x => x.expirationTime > timestamp\n )\n const expiredItemKeys =\n indexOfFirstUnexpired >= 0\n ? this.itemMetadataSortedByExpirationTime.splice(0, indexOfFirstUnexpired)\n : this.itemMetadataSortedByExpirationTime.splice(0, this.itemMetadataSortedByExpirationTime.length)\n expiredItemKeys.forEach(x => this.map.delete(x.key))\n }\n\n private rescheduleClearTimeout(): void {\n this.cancelClearTimeout?.()\n\n if (this.itemMetadataSortedByExpirationTime.length > 0) {\n const item = this.itemMetadataSortedByExpirationTime[0]\n if (Number.isFinite(item.expirationTime)) {\n const cancel = setSchedule(item.expirationTime, () => {\n this.clearExpiredItems(Date.now())\n this.rescheduleClearTimeout()\n })\n this.cancelClearTimeout = () => {\n cancel()\n this.cancelClearTimeout = undefined\n }\n }\n }\n }\n}\n","import { assert } from '@blackglory/errors'\nimport { first } from 'iterable-operator'\nimport { setSchedule } from 'extra-timers'\n\n/**\n * TLRUMap = LRUMap + ExpirableMap\n */\nexport class TLRUMap<K, V> {\n private limit: number\n private map = new Map<K, V>()\n private cancelClearTimeout?: () => void\n /**\n * 按过期时间升序排列所有项目的元数据\n */ \n protected itemMetadataSortedByExpirationTime: Array<{ key: K; expirationTime: number }> = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.map.size\n }\n\n constructor(limit: number) {\n assert(Number.isInteger(limit), 'The parameter limit must be an integer')\n assert(limit > 0, 'The parameter limit must be a positive value')\n\n this.limit = limit\n }\n\n set(key: K, value: V, maxAge: number): this {\n if (this.map.has(key)) {\n this.updateItem(key, value)\n this.removeItemMetadata(key)\n this.addItemMetadata(key, Date.now() + maxAge)\n } else {\n if (this.map.size === this.limit) {\n this.map.delete(this.getColdestKey()!)\n }\n this.map.set(key, value)\n this.addItemMetadata(key, Date.now() + maxAge)\n }\n return this\n }\n\n has(key: K): boolean {\n return this.map.has(key)\n }\n\n get(key: K): V | undefined {\n if (this.has(key)) {\n const value = this.map.get(key)!\n this.updateItem(key, value)\n return value\n } else {\n return undefined\n }\n }\n\n delete(key: K): boolean {\n const result = this.map.delete(key)\n if (result) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被删除的项目是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n return result\n }\n\n clear(): void {\n this.map.clear()\n this.cancelClearTimeout?.()\n this.itemMetadataSortedByExpirationTime = []\n }\n\n /**\n * 重新插入项目, 这会使项目置于#map迭代器的末端.\n */\n private updateItem(key: K, value: V): void {\n this.map.delete(key)\n this.map.set(key, value)\n }\n\n private addItemMetadata(key: K, expirationTime: number) {\n for (let i = 0; i < this.itemMetadataSortedByExpirationTime.length; i++) {\n const item = this.itemMetadataSortedByExpirationTime[i]\n if (expirationTime < item.expirationTime) {\n this.itemMetadataSortedByExpirationTime.splice(i, 0, { key, expirationTime })\n\n // 如果本次插入导致原先的第一个项目不再是低一个项目, 则需要重新规划过期回调\n if (i === 0) {\n this.rescheduleClearTimeout()\n }\n return\n }\n }\n\n // 如果代码运行到此处, 意味着数组要么为空, 要么新项目过期时间大于数组内的所有项目, 故直接插入到数组尾端.\n this.itemMetadataSortedByExpirationTime.push({ key, expirationTime })\n // 如果新插入的项目是唯一而项目, 则需要重新规划过期回调\n if (this.itemMetadataSortedByExpirationTime.length === 1) {\n this.rescheduleClearTimeout()\n }\n }\n\n private removeItemMetadata(key: K) {\n const index = this.itemMetadataSortedByExpirationTime.findIndex(x => x.key === key)\n if (index >= 0) {\n this.itemMetadataSortedByExpirationTime.splice(index, 1)\n\n // 如果被移除的是第一个项目, 则需要重新规划过期回调\n if (index === 0) {\n this.rescheduleClearTimeout()\n }\n }\n }\n\n private clearExpiredItems(timestamp: number) {\n const indexOfFirstUnexpiredItem = this.itemMetadataSortedByExpirationTime.findIndex(\n x => x.expirationTime > timestamp\n )\n const expiredItemKeys =\n indexOfFirstUnexpiredItem >= 0\n ? this.itemMetadataSortedByExpirationTime.splice(0, indexOfFirstUnexpiredItem)\n : this.itemMetadataSortedByExpirationTime.splice(0, this.itemMetadataSortedByExpirationTime.length)\n expiredItemKeys.forEach(x => this.map.delete(x.key))\n }\n\n private rescheduleClearTimeout() {\n this.cancelClearTimeout?.()\n\n if (this.itemMetadataSortedByExpirationTime.length > 0) {\n const item = this.itemMetadataSortedByExpirationTime[0]\n if (Number.isFinite(item.expirationTime)) {\n const cancel = setSchedule(item.expirationTime, () => {\n this.clearExpiredItems(Date.now())\n this.rescheduleClearTimeout()\n })\n this.cancelClearTimeout = () => {\n cancel()\n this.cancelClearTimeout = undefined\n }\n }\n }\n }\n\n /**\n * Return the earliest key inserted in the Map\n */\n private getColdestKey(): K | undefined {\n return first(this.map.keys())\n }\n}\n","import { zip, toArray, map } from 'iterable-operator'\nimport { isntUndefined } from '@blackglory/types'\n\nclass TrieNode<T, U> {\n children = new Map<T, TrieNode<T, U>>()\n\n constructor(public value?: U) {}\n}\n\nexport class TrieMap<K extends Iterable<T>, V, T = unknown> {\n private root = new TrieNode<T, V>()\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n * entries(): IterableIterator<[key: T[], value: V]> {\n yield* dfs(this.root, [])\n\n function* dfs(node: TrieNode<T, V>, paths: T[]): IterableIterator<[key: T[], value: V]> {\n for (const [path, childNode] of node.children) {\n const newPaths = [...paths, path]\n if (isntUndefined(childNode.value)) {\n yield [newPaths, childNode.value]\n }\n\n yield* dfs(childNode, newPaths)\n }\n }\n }\n\n keys(): IterableIterator<T[]> {\n return map(this.entries(), ([key]) => key)\n }\n\n values(): IterableIterator<V> {\n return map(this.entries(), ([_, value]) => value)\n }\n\n set(key: K, value: V): this {\n let node = this.root\n for (const part of key) {\n if (!node.children.has(part)) {\n node.children.set(part, new TrieNode<T, V>())\n }\n node = node.children.get(part)!\n }\n\n node.value = value\n return this\n }\n\n has(key: K): boolean {\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n node = node.children.get(part)!\n } else {\n return false\n }\n }\n\n return node.value !== undefined\n }\n\n get(key: K): V | undefined {\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n node = node.children.get(part)!\n } else {\n return undefined\n }\n }\n\n return node.value\n }\n\n delete(key: K): boolean {\n const parentNodes: TrieNode<T, V>[] = []\n let node = this.root\n for (const part of key) {\n if (node.children.has(part)) {\n parentNodes.push(node)\n node = node.children.get(part)!\n } else {\n return false\n }\n }\n\n delete node.value\n\n // 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀\n if (node.children.size === 0) {\n for (const [part, parentNode] of toArray(zip(key, parentNodes)).reverse()) {\n parentNode.children.delete(part)\n if (parentNode.children.size !== 0) break\n }\n }\n return true\n }\n}\n","export class SparseSet implements Iterable<number> {\n private indexToValue: number[] = []\n private valueToIndex: Array<number | undefined>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.indexToValue[Symbol.iterator]()\n }\n\n constructor(array: number[] = []) {\n const valueToIndex: Array<number | undefined> = []\n if (array.length > 0) {\n for (const [index, value] of array.entries()) {\n valueToIndex[value] = index\n }\n }\n\n this.valueToIndex = valueToIndex\n }\n\n values(): IterableIterator<number> {\n return this.indexToValue[Symbol.iterator]()\n }\n\n has(value: number): boolean {\n // 跟一般的实现不同, 不需要访问values数组.\n return value in this.valueToIndex\n }\n\n add(value: number): void {\n if (!this.has(value)) {\n const index = this.indexToValue.length\n this.indexToValue.push(value)\n this.valueToIndex[value] = index\n }\n }\n\n delete(value: number): boolean {\n if (this.has(value)) {\n const lastValue = this.indexToValue.pop()!\n if (value === lastValue) {\n delete this.valueToIndex[value]\n } else {\n const index = this.valueToIndex[value]!\n this.indexToValue[index] = lastValue\n this.valueToIndex[lastValue] = index\n // 跟一般的实现不同, 直接删除值的索引.\n delete this.valueToIndex[value]\n }\n return true\n } else {\n return false\n }\n }\n}\n","export class SparseMap<T> {\n private keyToIndex: Array<number | undefined> = []\n private indexToKey: number[] = []\n private indexToValue: T[] = []\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.indexToKey.length\n }\n\n get internalArray(): T[] {\n return this.indexToValue\n }\n\n * entries(): IterableIterator<[key: number, value: T]> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield [this.indexToKey[i], this.indexToValue[i]]\n }\n }\n\n keys(): IterableIterator<number> {\n return this.indexToKey.values()\n }\n\n values(): IterableIterator<T> {\n return this.indexToValue.values()\n }\n\n getInternalIndexOfKey(key: number): number | undefined {\n return this.keyToIndex[key]\n }\n\n has(key: number): boolean {\n // 跟一般的稀疏集实现不同, 不需要访问values数组.\n return key in this.keyToIndex\n }\n\n get(key: number): T | undefined {\n if (this.has(key)) {\n const index = this.keyToIndex[key]!\n return this.indexToValue[index]\n } else {\n return undefined\n }\n }\n\n set(key: number, value: T): void {\n if (this.has(key)) {\n const index = this.keyToIndex[key]!\n this.indexToValue[index] = value\n } else {\n const index = this.indexToKey.length\n this.indexToKey.push(key)\n this.indexToValue.push(value)\n this.keyToIndex[key] = index\n }\n }\n\n delete(key: number): void {\n if (this.has(key)) {\n const lastKey = this.indexToKey.pop()!\n const lastValue = this.indexToValue.pop()!\n if (key === lastKey) {\n delete this.keyToIndex[key]\n } else {\n const index = this.keyToIndex[key]!\n this.indexToKey[index] = lastKey\n this.indexToValue[index] = lastValue\n this.keyToIndex[lastKey] = index\n delete this.keyToIndex[key]\n }\n }\n }\n}\n","import { assert } from '@blackglory/errors'\nimport { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'\nimport { DynamicTypedArray } from './dynamic-typed-array'\n\nexport class TypedSparseMap<T extends TypedArrayConstructor> {\n private keyToIndex: Array<number | undefined> = []\n private indexToKey: number[] = []\n private indexToValue: DynamicTypedArray<T>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this.indexToKey.length\n }\n\n get internalTypedArray(): TypedArrayOfConstructor<T> {\n return this.indexToValue.internalTypedArray\n }\n\n constructor(array: DynamicTypedArray<T>) {\n assert(array.length === 0, 'array should be empty')\n\n this.indexToValue = array\n }\n\n * entries(): IterableIterator<[key: number, value: number]> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield [\n this.indexToKey[i]\n , this.indexToValue.internalTypedArray[i]\n ]\n }\n }\n\n keys(): IterableIterator<number> {\n return this.indexToKey.values()\n }\n\n * values(): IterableIterator<number> {\n for (let i = 0; i < this.indexToKey.length; i++) {\n yield this.indexToValue.internalTypedArray[i]\n }\n }\n\n getInternalIndexOfKey(key: number): number | undefined {\n return this.keyToIndex[key]\n }\n\n has(key: number): boolean {\n const index = this.keyToIndex[key]\n return this.indexToKey[index!] === key\n }\n\n get(key: number): number | undefined {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n return this.indexToValue.internalTypedArray[index!]\n } else {\n return undefined\n }\n }\n\n set(key: number, value: number): void {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n this.indexToValue.internalTypedArray[index!] = value\n } else {\n const index = this.indexToKey.length\n this.indexToKey.push(key)\n this.indexToValue.push(value)\n this.keyToIndex[key] = index\n }\n }\n\n delete(key: number): void {\n const index = this.keyToIndex[key]\n if (this.indexToKey[index!] === key) {\n const lastKey = this.indexToKey.pop()!\n const lastValue = this.indexToValue.pop()!\n if (key !== lastKey) {\n this.indexToKey[index!] = lastKey\n this.indexToValue.internalTypedArray[index!] = lastValue\n this.keyToIndex[lastKey] = index\n }\n }\n }\n}\n","import { UnsignedTypedArrayConstructor } from 'justypes'\nimport { DynamicTypedArray } from './dynamic-typed-array'\n\nexport class TypedSparseSet<\n T extends UnsignedTypedArrayConstructor\n> implements Iterable<number> {\n private valueToIndex: Array<number | undefined>\n private indexToValue: DynamicTypedArray<T>\n\n constructor(array: DynamicTypedArray<T>) {\n const valueToIndex: Array<number | undefined> = []\n if (array.length > 0) {\n for (const [index, value] of array.internalTypedArray.entries()) {\n valueToIndex[value] = index\n }\n }\n\n this.indexToValue = array\n this.valueToIndex = valueToIndex\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n for (let i = 0; i < this.indexToValue.length; i++) {\n yield this.indexToValue.internalTypedArray[i]\n }\n }\n\n has(value: number): boolean {\n const index = this.valueToIndex[value]\n return this.indexToValue.internalTypedArray[index!] === value\n }\n\n add(value: number): void {\n if (!this.has(value)) {\n const index = this.indexToValue.length\n this.indexToValue.push(value)\n this.valueToIndex[value] = index\n }\n }\n\n delete(value: number): boolean {\n const index = this.valueToIndex[value]\n if (this.indexToValue.internalTypedArray[index!] === value) {\n const lastValue = this.indexToValue.pop()!\n if (value !== lastValue) {\n this.indexToValue.internalTypedArray[index!] = lastValue\n this.valueToIndex[lastValue] = index\n }\n return true\n } else {\n return false\n }\n }\n}\n","import { TypedArrayConstructor, TypedArrayOfConstructor } from 'justypes'\nimport { assert } from '@blackglory/errors'\n\ninterface IDynamicTypedArrayOptions {\n capacity?: number\n growthFactor?: number\n}\n\n// 相关提案: https://github.com/tc39/proposal-resizablearraybuffer\nexport class DynamicTypedArray<T extends TypedArrayConstructor> {\n private array: TypedArrayOfConstructor<T>\n private _length: number = 0\n readonly growthFactor: number\n\n get internalTypedArray(): TypedArrayOfConstructor<T> {\n return this.array\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get BYTES_PER_ELEMENT(): number {\n return this.typedArrayConstructor.BYTES_PER_ELEMENT\n }\n\n /**\n * 数组当前的容量.\n */\n get capacity(): number {\n return this.array.length\n }\n\n /**\n * 数组逻辑上的长度, 总是小于或等于capacity.\n */\n get length(): number {\n return this._length\n }\n\n constructor(\n private typedArrayConstructor: T\n , {\n capacity = 0\n , growthFactor = 1.5\n }: IDynamicTypedArrayOptions = {}\n ) {\n assert(Number.isInteger(capacity), 'capacity must be an integer')\n assert(capacity >= 0, 'capacity must be greater than or equal to 0')\n assert(growthFactor >= 1, 'growthFactory must be greater than or equal to 1')\n\n this.array = new typedArrayConstructor(capacity) as TypedArrayOfConstructor<T>\n this.growthFactor = growthFactor\n }\n\n set(index: number, value: number): void {\n if (index >= this.capacity) {\n const newCapacity = computeNewCapacity(\n this.capacity\n , index + 1\n , this.growthFactor\n )\n this.resize(newCapacity)\n }\n\n if (index >= this._length) {\n this._length = index + 1\n }\n\n this.array[index] = value\n }\n\n get(index: number): number | undefined {\n return index < this._length\n ? this.array[index]\n : undefined\n }\n\n push(...values: number[]): void {\n const newLength = this._length + values.length\n if (newLength > this.capacity) {\n const newCapacity = computeNewCapacity(\n this.capacity\n , newLength\n , this.growthFactor\n )\n this.resize(newCapacity)\n }\n\n for (const value of values) {\n this.array[this._length++] = value\n }\n }\n\n pop(): number | undefined {\n if (this._length > 0) {\n const value = this.array[this._length - 1]\n this._length--\n\n const newCapacity = computeNewCapacity(\n this.capacity\n , this.length\n , this.growthFactor\n )\n this.resize(newCapacity)\n\n return value\n } else {\n return undefined\n }\n }\n\n sort(compare?: (a: number, b: number) => number): void {\n const capacity = this.capacity\n this.resize(this.length)\n this.array.sort(compare)\n this.resize(capacity)\n }\n\n private resize(newCapacity: number): void {\n if (this.array.length === newCapacity) {\n return\n } else if (this.array.length < newCapacity) {\n const newArray = new this.typedArrayConstructor(newCapacity)\n newArray.set(this.array)\n this.array = newArray as TypedArrayOfConstructor<T>\n } else if (this.array.length > newCapacity) {\n const newArray = new this.typedArrayConstructor(newCapacity)\n // 不需要的部分将被舍弃.\n for (let i = newCapacity; i--;) {\n newArray[i] = this.array[i]\n }\n this.array = newArray as TypedArrayOfConstructor<T>\n }\n }\n}\n\nexport function computeNewCapacity(\n oldCapacity: number\n, targetLength: number\n, growthFactor: number\n): number {\n if (growthFactor === 1) {\n return targetLength\n } else {\n if (oldCapacity === targetLength) {\n return targetLength\n } else if (oldCapacity < targetLength) { \n // 增加容量以适配targetLength\n let newCapacity = Math.max(oldCapacity, 1)\n while (newCapacity < targetLength) {\n newCapacity *= growthFactor\n }\n return Math.floor(newCapacity)\n } else {\n // 尝试减少容量以适配targetLength\n\n // `targetLength = 0`是特殊情况,\n // 此时无论怎么将oldCapacity除以growthFactory几次, 都不可能得到比targetLength小的结果.\n if (targetLength === 0) {\n return 0\n } else {\n let newCapacity = oldCapacity\n while (true) {\n const temp = newCapacity / growthFactor\n if (temp < targetLength) {\n break\n } else {\n newCapacity = temp\n }\n }\n return Math.floor(newCapacity)\n }\n }\n }\n}\n","import { isntNull } from '@blackglory/types'\n\nexport class SkipListNode<T> {\n previous: SkipListNode<T> | null = null\n next: SkipListNode<T> | null = null\n up: SkipListNode<T> | null = null\n down: SkipListNode<T> | null = null\n\n constructor(public value: T | null) {}\n}\n\nexport class SkipList<T> {\n // 最顶层的首个节点\n private head: SkipListNode<T> = new SkipListNode<T>(null)\n // 最顶层的最后一个节点\n private tail: SkipListNode<T> = new SkipListNode<T>(null)\n\n private height: number = 0\n private _size: number = 0\n\n // 元素数量\n get size(): number {\n return this._size\n }\n\n constructor(private compare: (a: T, b: T) => number) {\n this.head.next = this.tail\n this.tail.previous = this.head\n }\n\n * elements(): IterableIterator<SkipListNode<T>> {\n let currentNode: SkipListNode<T> = this.head\n\n while (currentNode.down) {\n currentNode = currentNode.down\n }\n\n while (currentNode.next && isntNull(currentNode.next.value)) {\n currentNode = currentNode.next\n yield currentNode\n }\n }\n\n dumpList(): Array<Array<T | null | undefined>> {\n const result: Array<Array<T | null | undefined>> = []\n let head: SkipListNode<T> | null = this.head\n\n do {\n result.push([])\n let currentNode: SkipListNode<T> | null = head\n do {\n result[result.length - 1].push(currentNode.value)\n currentNode = currentNode.next\n } while (currentNode)\n } while (head = head.down)\n\n return result\n }\n\n delete(value: T): void {\n let currentNode: SkipListNode<T> | null = this.findNode(value)\n\n while (currentNode) {\n // 被删除的节点肯定不会是head或tail, 因此一定有previous\n currentNode.previous!.next = currentNode.next\n\n // 被删除的节点肯定不会是head或tail, 因此一定有next\n currentNode.next!.previous = currentNode.previous\n\n currentNode = currentNode.down\n }\n\n this._size--\n }\n\n has(value: T): boolean {\n return isntNull(this.findNode(value))\n }\n\n findNode(value: T): SkipListNode<T> | null {\n let currentNode: SkipListNode<T> = this.head\n\n while (true) {\n while (currentNode.next && isntNull(currentNode.next.value)) {\n const result = this.compare(currentNode.next.value, value)\n if (result === 0) {\n return currentNode.next\n } else if (result < 0) {\n currentNode = currentNode.next\n } else {\n break\n }\n }\n\n if (currentNode.down) {\n currentNode = currentNode.down\n } else {\n return null\n }\n }\n }\n\n add(value: T): void {\n let previousNode: SkipListNode<T> = this.findPreviousNode(value)\n\n // 如果previousNode.next.value等于value, 则说明value已经存在\n if (\n previousNode.next &&\n isntNull(previousNode.next.value) &&\n this.compare(previousNode.next.value, value) === 0\n ) {\n return\n }\n\n let newNode: SkipListNode<T> = new SkipListNode(value)\n // 在底层加入新节点\n if (previousNode.next) {\n newNode.next = previousNode.next\n previousNode.next.previous = newNode\n }\n previousNode.next = newNode\n newNode.previous = previousNode\n\n // 在高层加入新节点, 具体加到多高是随机的, 从第一层(将其视作索引值0)开始建造\n // 层数非常高是极为罕见的, 因为每次建造层都会导致下一层被建造的概率减半.\n let level = 0\n while (Math.random() < 0.5) {\n // currentLevel的索引与当前跳跃列表的高度相同, 需要在这之上建立一个新层\n if (level === this.height) {\n const newHead: SkipListNode<T> = new SkipListNode<T>(null)\n const newTail: SkipListNode<T> = new SkipListNode<T>(null)\n\n newHead.next = newTail\n newHead.down = this.head\n\n newTail.previous = newHead\n newTail.down = this.tail\n\n this.head.up = newHead\n this.tail.up = newTail\n\n this.head = newHead\n this.tail = newTail\n\n this.height++\n }\n\n // 从新节点的前一个节点遍历, 直到找到能够通往上层的节点\n while (!previousNode.up) {\n // head节点必然会有up, 所以不可能访问进入循环体, 不可能访问`head.previous`\n previousNode = previousNode.previous!\n }\n // 上一层的对应节点\n previousNode = previousNode.up!\n\n // 创建新节点的上层节点\n const upperNewNode: SkipListNode<T> = new SkipListNode<T>(value)\n if (previousNode.next) {\n upperNewNode.next = previousNode.next\n previousNode.next.previous = upperNewNode\n }\n previousNode.next = upperNewNode\n upperNewNode.previous = previousNode\n\n upperNewNode.down = newNode\n newNode.up = upperNewNode\n newNode = upperNewNode\n\n level++\n }\n\n this._size++\n }\n\n private findPreviousNode(value: T): SkipListNode<T> {\n let currentNode: SkipListNode<T> = this.head\n\n while (true) {\n while (currentNode.next && isntNull(currentNode.next.value)) {\n const result = this.compare(currentNode.next.value, value)\n if (result >= 0) {\n break\n } else {\n currentNode = currentNode.next\n }\n }\n\n if (currentNode.down) {\n currentNode = currentNode.down\n } else {\n return currentNode\n }\n }\n }\n}\n","import { SkipList } from '@utils/skip-list'\nimport { map } from 'iterable-operator'\n\nexport class SortedSet<T> implements Iterable<T> {\n private skipList: SkipList<T>\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n [Symbol.iterator](): IterableIterator<T> {\n return this.values()\n }\n\n constructor(compare: (a: T, b: T) => number) {\n this.skipList = new SkipList(compare)\n }\n\n values(): IterableIterator<T> {\n return map(this.skipList.elements(), node => node.value!)\n }\n\n has(value: T): boolean {\n return this.skipList.has(value)\n }\n\n add(value: T): void {\n this.skipList.add(value)\n }\n\n delete(value: T): void {\n this.skipList.delete(value)\n }\n}\n","// http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup\nconst mod37BitPositions: number[] = [\n 32, 0, 1, 26, 2, 23, 27, 0, 3, 16\n, 24, 30, 28, 11, 0, 13, 4, 7, 17, 0\n, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21\n, 14, 9, 5, 20, 8, 19, 18\n]\n\n/**\n * 该函数在找不到结果时返回32, 与Rust内置函数的表现一致.\n * https://doc.rust-lang.org/std/primitive.u32.html#method.trailing_zeros\n */\nexport function trailingZeros(value: number): number {\n return mod37BitPositions[(-value & value) % 37]\n}\n","import { assert } from '@blackglory/errors'\nimport { trailingZeros } from '@utils/trailing-zeros'\n\nexport class BitSet {\n private array: number[] = []\n private length = 0\n private _size = 0\n\n constructor(private bitsPerElement: number = 8) {\n assert(\n Number.isInteger(bitsPerElement)\n , 'The parameter bitsPerElement must be an integer'\n )\n assert(\n bitsPerElement > 0\n , 'The parameter bitsPerElement must be greater than 0'\n )\n // `31`是该数据结构中能够处理的最大值\n assert(\n bitsPerElement <= 31\n , 'The mask of bitsPerElement must be less than or equal to 31'\n )\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this._size\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n if (this.length > 0) {\n // maxArrayLength = Math.ceil(this.length / this.bitsPerElement)\n const maxArrayLength = ~~(this.length / this.bitsPerElement) + 1\n\n for (let index = 0; index < maxArrayLength; index++) {\n let element = this.array[index]\n let offset = 0\n let indexOfBit: number\n while ((indexOfBit = trailingZeros(element)) !== 32) {\n yield index * this.bitsPerElement + offset + indexOfBit\n offset += indexOfBit + 1\n element >>= indexOfBit + 1\n }\n }\n }\n }\n\n _dumpBinaryStrings(): string[] {\n const result: string[] = []\n for (let i = 0; i < this.array.length; i++) {\n const binary = this.array[i].toString(2)\n if (binary.length < this.bitsPerElement) {\n result.push('0'.repeat(this.bitsPerElement - binary.length) + binary)\n } else {\n result.push(binary)\n }\n }\n return result\n }\n\n has(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n return ((this.array[index] ?? 0) & mask) === mask\n }\n\n add(value: number): boolean {\n assert(value >= 0, 'value must be greater than or equal to 0')\n if (value >= this.length) {\n this.length = value + 1\n }\n\n const [index, mask] = this.getPosition(value)\n\n const element = this.array[index] ?? 0\n this.array[index] = element | mask\n\n const added = (element & mask) !== mask\n if (added) {\n this._size++\n }\n return added\n }\n\n delete(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n const element = (this.array[index] ?? 0)\n this.array[index] = element & ~mask\n\n const deleted = (element & mask) === mask\n if (deleted) {\n this._size--\n }\n\n return deleted\n }\n\n clear(): void {\n for (let i = this.array.length; i--;) {\n this.array[i] = 0\n }\n }\n\n private getPosition(value: number): [index: number, mask: number] {\n const remainder = value % this.bitsPerElement\n const quotient = (value - remainder) / this.bitsPerElement\n const index = quotient\n const mask = this.getMask(remainder)\n return [index, mask]\n }\n\n // 输入一定是一个小于bitsPerElement的值, 取值范围是[0, bitsPerElement)\n private getMask(value: number): number {\n // return 2 ** value\n return 1 << value\n }\n}\n","import { DynamicTypedArray } from './dynamic-typed-array'\nimport { UnsignedTypedArrayConstructor } from 'justypes'\nimport { assert } from '@blackglory/errors'\nimport { trailingZeros } from '@utils/trailing-zeros'\n\nexport class TypedBitSet<T extends UnsignedTypedArrayConstructor> {\n private bitsPerElement: number\n private length = 0\n private _size = 0\n\n constructor(private array: DynamicTypedArray<T>) {\n const bitsPerElement = array.BYTES_PER_ELEMENT * 8\n\n assert(\n Number.isInteger(bitsPerElement)\n , 'The parameter bitsPerElement must be an integer'\n )\n assert(\n bitsPerElement > 0\n , 'The parameter bitsPerElement must be greater than 0'\n )\n // `31`是该数据结构中能够处理的最大值\n assert(\n bitsPerElement <= 31\n , 'The mask of bitsPerElement must be less than or equal to 31'\n )\n\n this.bitsPerElement = bitsPerElement\n }\n\n get [Symbol.toStringTag](): string {\n return this.constructor.name\n }\n\n get size(): number {\n return this._size\n }\n\n [Symbol.iterator](): IterableIterator<number> {\n return this.values()\n }\n\n * values(): IterableIterator<number> {\n if (this.length > 0) {\n // maxArrayLength = Math.ceil(this.length / this.bitsPerElement)\n const maxArrayLength = ~~(this.length / this.bitsPerElement) + 1\n\n for (let index = 0; index < maxArrayLength; index++) {\n let element = this.array.internalTypedArray[index]\n let offset = 0\n let indexOfBit: number\n while ((indexOfBit = trailingZeros(element)) !== 32) {\n yield index * this.bitsPerElement + offset + indexOfBit\n offset += indexOfBit + 1\n element >>= indexOfBit + 1\n }\n }\n }\n }\n\n _dumpBinaryStrings(): string[] {\n const result: string[] = []\n for (let i = 0; i < this.array.length; i++) {\n const binary = this.array.internalTypedArray[i].toString(2)\n if (binary.length < this.bitsPerElement) {\n result.push('0'.repeat(this.bitsPerElement - binary.length) + binary)\n } else {\n result.push(binary)\n }\n }\n return result\n }\n\n has(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n return ((this.array.get(index) ?? 0) & mask) === mask\n }\n\n add(value: number): boolean {\n assert(value >= 0, 'value must be greater than or equal to 0')\n if (value >= this.length) {\n this.length = value + 1\n }\n\n const [index, mask] = this.getPosition(value)\n\n const element = this.array.get(index) ?? 0\n this.array.set(index, element | mask)\n\n const added = (element & mask) !== mask\n if (added) {\n this._size++\n }\n return added\n }\n\n delete(value: number): boolean {\n const [index, mask] = this.getPosition(value)\n\n const element = (this.array.get(index) ?? 0)\n this.array.set(index, element & ~mask)\n\n const deleted = (element & mask) === mask\n if (deleted) {\n this._size--\n }\n return deleted\n }\n\n clear(): void {\n for (let i = this.array.length; i--;) {\n this.array.set(i, 0)\n }\n }\n\n private getPosition(value: number): [index: number, mask: number] {\n const remainder = value % this.bitsPerElement\n const quotient = (value - remainder) / this.bitsPerElement\n const index = quotient\n const mask = this.getMask(remainder)\n return [index, mask]\n }\n\n // 输入一定是一个小于bitsPerElement的值, 取值范围是[0, bitsPerElement)\n private getMask(value: number): number {\n // return 2 ** value\n return 1 << value\n }\n}\n","import { isNull } from '@blackglory/types'\nimport { Cons } from 'justypes'\nexport { Cons } from 'justypes'\n\nexport function convertConsToArray<T>([value, next]: Cons<T>): T[] {\n if (isNull(next)) {\n return [value]\n } else {\n return [value, ...convertConsToArray(next)]\n }\n}\n\nexport function convertArrayToCons<T>([value, ...next]: T[]): Cons<T> {\n return [value, next.length ? convertArrayToCons(next) : null]\n}\n","export function sliceArrayLeft<T>(arr: T[], num: number): T[] {\n return arr.slice(0, num)\n}\n\nexport function sliceArrayRight<T>(arr: T[], num: number): T[] {\n const startIndex = arr.length - num\n return arr.slice(startIndex >= 0 ? startIndex : 0)\n}\n\nexport function truncateArrayLeft<T>(arr: T[], num: number): void {\n if (arr.length > num) {\n arr.length = num\n }\n}\n\nexport function truncateArrayRight<T>(arr: T[], num: number): void {\n const startIndex = arr.length - num\n arr.splice(0, startIndex)\n}\n"],"names":["Box","[object Object]","value","this","get","Symbol","toStringTag","constructor","name","isArray","val","Array","array","isntEmptyArray","isEmptyArray","isntArray","array$1","length","isNull","_null$1","isntNull","isUndefined","undefined","_undefined$1","isntUndefined","isFunction","_function$1","isntFunction","asyncIterable$1","isntAsyncIterable","null_1","require$$0","undefined_1","require$$1","function_1","require$$2","isAsyncIterable","asyncIterator","isBigInt","bigint$1","isntBigInt","isBoolean","boolean$1","isntBoolean","isString","string$1","isntString","char$1","isntChar","string_1","isChar","isDate","Date","date$1","isntDate","_enum","inEnum","_enum$1","Object","values","includes","isError","Error","error$1","isntError","isFalsy","falsy$1","isntFalsy","iterable$1","isntIterable","isIterable","iterator","isNumber","isNaN","Number","number","isntNaN","isPositiveInfinity","isFinite","isntNumber","number$1","Infinity","isNegativeInfinity","freeGlobal","global","freeSelf","self","_Symbol","Function","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","_getRawTag","isOwn","call","tag","unmasked","e","result","getRawTag","objectToString","_baseGetTag","getPrototype","func","transform","arg","overArg","getPrototypeOf","baseGetTag","isObjectLike","funcProto","funcToString","objectCtorString","isPlainObject_1","proto","Ctor","__importDefault","mod","__esModule","default","object","isntEmptyObject","isEmptyObject","isntPlainObject","isPlainObject","isObject","object$1","isntObject","keys","json","isntJsonable","isJsonable","isntJson","isJson","boolean_1","number_1","require$$3","array_1","require$$4","object_1","require$$5","every","json$1","JSON","stringify","_a","promise","isPromiseLike","isntPromiseLike","isntPromise","isPromise","Promise","then","promise$1","url","isAbsoluteURL","url$1","str","URL","isRegExp","RegExp","regexp$1","isntRegExp","isSymbol","symbol","isntSymbol","__createBinding","create","o","m","k","k2","desc","getOwnPropertyDescriptor","writable","configurable","enumerable","defineProperty","__exportStar","exports","p","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","require$$17","require$$18","require$$19","require$$20","go_1","go","go$1","fn","goMicrotask_1","goMicrotask","goMicrotask$1","resolve","reject","queueMicrotask","async","random_1","random","random$1","min","max","Math","randomInt_1","randomInt","randomInt$1","ceil","floor","randomIntInclusive_1","randomIntInclusive","randomIntInclusive$1","exponentialBackoff","calculateExponentialBackoffTimeout","extra_rand_1","baseTimeout","retries","maxTimeout","factor","jitter","timeout","setTimeout_1","setTimeout","setTimeout$1","cb","timer","globalThis","clearTimeout","setSchedule_1","set_timeout_1","setSchedule$1","setSchedule","timestamp","now","setInterval_1","setInterval","setInterval$1","clearInterval","setImmediate_1","setImmediate$1","setImmediate","clearImmediate","setTimeoutLoop_1","setTimeoutLoop$1","setTimeoutLoop","isCancelled","cancel","loop","setDynamicTimeoutLoop_1","setDynamicTimeoutLoop$1","setDynamicTimeoutLoop","start","elapsed","goMacrotask_1","goMacrotask","extra_timers_1","goMacrotask$1","Emitter","map","Map","event","listener","set","Set","add","handler","handlers","delete","size","args","removeListener","on","forEach","HashMap","hash","key","has","clear","HashSet","Queue","items","push","shift","item","index","indexOf","splice","_null","_undefined","_function","asyncIterable","bigint","boolean","string","char","date","error","falsy","iterable","regexp","chunkByAsync_1","chunkByAsync","types_1","predicate","buffer","element","chunkByAsyncIterable","chunkByIterable","chunkBy_1","chunkBy","chunkBy$1","concatAsync_1","concatAsync$1","concatAsync","otherIterables","iter","concat_1","concat$1","concat","utils","copyIterable","copyAsyncIterable","dropUntilAsync_1","dropUntilAsync","done","next","return","dropUntilAsyncIterable","dropUntilIterable","dropUntil_1","dropUntil","dropUntil$1","filterAsync_1","filterAsync","filterAsyncIterable","filterIterable","filter_1","filter","filter$1","flattenByAsync_1","flatten","level","isFiniteIterable","flattenDeepAsync_1","flattenDeepAsync","flatten_by_async_1","errors_1","depth","assert","isInteger","flattenByAsync","_","flattenByAsyncIterable","flattenByIterable","flattenBy_1","flattenBy","flattenDeep_1","flattenDeep","flatten_by_1","mapAsync_1","mapAsync","mapAsyncIterable","mapIterable","map_1","map$1","repeatAsync_1","repeatAsync","times","process","env","NODE_ENV","console","warn","warnInfiniteLoop","cache","repeat_1","repeat","splitAsync_1","splitAsync","splitAsync$1","separator","splitByAsync_1","splitByAsync","splitByAsyncIterable","splitByIterable","splitBy_1","splitBy","splitBy$1","split_1","split","split$1","takeUntilAsync_1","takeUntilAsync","takeUntilAsyncIterable","takeUntilIterable","takeUntil_1","takeUntil","takeUntil$1","tapAsync_1","tapAsync","tapAsyncIterable","tapIterable","tap_1","tap","tap$1","toAsyncIterable_1","toAsyncIterable","toAsyncIterable$1","transformAsync_1","transformAsync","transformAsync$1","transformer","transform_1","transform$1","uniqAsync_1","uniqAsync","uniqAsync$1","bucket","uniqByAsync_1","uniqByAsync","uniqByAsyncIterable","uniqByIterable","uniqBy_1","uniqBy","uniqBy$1","uniq_1","uniq","uniq$1","zipAsync_1","Kind","zipAsync","iterables","_b","_c","_d","iterators","Async","Sync","dones","i","kind","temp","undoneIterators","zipWithSize","chunkAsync_1","chunkAsync","chunk_1","chunk","dropAsync_1","dropAsync","utils_1","count","dropRightAsync_1","dropRightAsync","toArrayAsync","slice","dropRight_1","dropRight","arr","from","drop_1","drop","flattenAsync_1","flattenAsync","flatten_deep_async_1","flatten_1","flatten_deep_1","require$$21","require$$22","require$$23","sliceAsync_1","sliceAsync","end","require$$24","slice_1","require$$25","require$$26","require$$27","require$$28","require$$29","takeAsync_1","takeAsync","require$$30","takeRightAsync_1","takeRightAsync","require$$31","takeRight_1","takeRight","require$$32","require$$33","require$$34","take_1","take","require$$35","require$$36","require$$37","require$$38","require$$39","require$$40","require$$41","require$$42","require$$43","require$$44","require$$45","require$$46","zip_1","zip","x","consume_1","consume","consume$1","consumer","eachAsync_1","eachAsync","eachAsyncIterable","eachIterable","each_1","each","each$1","everyAsync_1","everyAsync","everyAsyncIterable","everyIterable","every_1","every$1","findAsync_1","findAsync","findAsyncIterable","findIterable","find_1","find","find$1","firstAsync_1","firstAsync","firstAsync$1","first_1","first","first$1","includesAsync_1","includesAsync","includesAsync$1","includes_1","includes$1","matchAsync_1","matchAsync","matchAsync$1","sequence","sequenceLength","matchCount","match_1","match","match$1","reduceAsync_1","reduceAsync","initialValue","reduceAsyncIterable","reduceIterable","readInitialValue","reduceAsyncWithoutInitialValue","currentValue","reduceAsyncWithInitialValue","reduce_1","reduce","reduceWithoutInitialValue","reduceWithInitialValue","someAsync_1","someAsync","someAsyncIterable","someIterable","some_1","some","some$1","lastAsync_1","lastAsync","lastAsync$1","last_1","last","last$1","toArrayAsync_1","toArrayAsync$1","toArray_1","toArray$1","toArray","toSetAsync_1","toSetAsync$1","toSetAsync","toSet_1","toSet$1","toSet","count_1","count$1","countAsync_1","countAsync","countAsync$1","groupBy_1","groupBy$1","groupBy","group","groupByAsync_1","each_async_1","groupByAsync$1","groupByAsync","traverseErrorPrototypeChain_1","traverseErrorPrototypeChain","traverseErrorPrototypeChain$1","err","current","getErrorNames_1","getErrorNames","traverse_error_prototype_chain_1","getErrorNames$1","ancestors","isSerializableError","customError","CustomError","iterable_operator_1","get_error_names_1","serializable_error_1","hasInstance","instance","reversedClassNames","reverse","reversedInstanceNames","serializableError","message","stack","assertionError","AssertionError","custom_error_1","pass_1","pass","pass$1","passAsync_1","passAsync","passAsync$1","hydrate_1","hydrate","createChildErrorConstructor","parentErrorConstructor","errorNames","errorConstructor","normalize_1","normalize","assert_1","assertion_error_1","condition","LRUMap","limit","updateItem","getColdestKey","ExpirableMap","itemMetadataSortedByExpirationTime","maxAge","removeItemMetadata","addItemMetadata","exists","findIndex","rescheduleClearTimeout","cancelClearTimeout","expirationTime","indexOfFirstUnexpired","clearExpiredItems","TLRUMap","indexOfFirstUnexpiredItem","TrieNode","children","TrieMap","root","dfs","node","paths","path","childNode","newPaths","entries","part","parentNodes","parentNode","SparseSet","indexToValue","valueToIndex","lastValue","pop","SparseMap","keyToIndex","indexToKey","internalArray","lastKey","TypedSparseMap","internalTypedArray","TypedSparseSet","DynamicTypedArray","typedArrayConstructor","capacity","growthFactor","_length","BYTES_PER_ELEMENT","newCapacity","computeNewCapacity","resize","newLength","compare","sort","newArray","oldCapacity","targetLength","SkipListNode","previous","up","down","SkipList","head","tail","height","_size","currentNode","findNode","previousNode","findPreviousNode","newNode","newHead","newTail","upperNewNode","SortedSet","skipList","elements","mod37BitPositions","trailingZeros","BitSet","bitsPerElement","maxArrayLength","indexOfBit","offset","binary","mask","getPosition","added","deleted","remainder","getMask","TypedBitSet","convertArrayToCons","convertConsToArray","num","startIndex"],"mappings":"wPAAaA,EAKXC,YAAoBC,GAAAC,KAAKD,MAALA,EAJpBE,IAAKC,OAAOC,eACV,OAAOH,KAAKI,YAAYC,KAK1BP,IAAIC,GACFC,KAAKD,MAAQA,EAGfD,MACE,OAAOE,KAAKD,sKCThB,SAASO,EAAQC,GACb,OAAOC,MAAMF,QAAQC,GAFHE,EAAAC,eAAuBD,EAAAE,aAAoBF,EAAAG,UAAkBH,EAAAH,aAAG,EAIvEO,EAAAP,QAAGA,E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