From 0dd12a36556292c23a0e27d1823e027071ad34fd Mon Sep 17 00:00:00 2001 From: Luke Abby Date: Sat, 18 Oct 2025 21:27:17 -0700 Subject: [PATCH 1/2] Fix accessing outer directories in tsconfig --- ark/attest/cache/ts.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ark/attest/cache/ts.ts b/ark/attest/cache/ts.ts index a3b71d6776..7893517746 100644 --- a/ark/attest/cache/ts.ts +++ b/ark/attest/cache/ts.ts @@ -2,7 +2,7 @@ import { fromCwd, readFile, type SourcePosition } from "@ark/fs" import { printable, throwError, throwInternalError, type dict } from "@ark/util" import * as tsvfs from "@typescript/vfs" import { readFileSync } from "node:fs" -import { dirname, join } from "node:path" +import { resolve, dirname, join } from "node:path" import ts from "typescript" import { getConfig } from "../config.ts" @@ -198,12 +198,14 @@ const instantiateTsconfigFromPath = ( arkConfig.compilerOptions ) + const configPath = resolve(path) + const instantiatedConfig = ts.parseJsonConfigFileContent( rawConfig, ts.sys, - dirname(path), + dirname(configPath), {}, - path + configPath ) if (instantiatedConfig.errors.length > 0) From f2e6be821e43c4eb3963eba1f3abb363917244ac Mon Sep 17 00:00:00 2001 From: David Blass Date: Sun, 19 Oct 2025 17:26:07 -0400 Subject: [PATCH 2/2] disable node 25 in CI --- .github/workflows/pr.yml | 6 ++++-- ark/docs/components/dts/util.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4c1a375fde..4c145c7343 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,8 +34,10 @@ jobs: include: - os: ubuntu-latest node: lts/-1 - - os: ubuntu-latest - node: latest + # reenable once localStorage issue is addressed in node 25: + # https://github.com/nodejs/node/issues/60303 + # - os: ubuntu-latest + # node: latest fail-fast: false runs-on: ${{ matrix.os }} diff --git a/ark/docs/components/dts/util.ts b/ark/docs/components/dts/util.ts index 703832d3f6..081ba99077 100644 --- a/ark/docs/components/dts/util.ts +++ b/ark/docs/components/dts/util.ts @@ -1,3 +1,3 @@ /** THIS FILE IS AUTOGENERATED FROM ark/repo/dtsGen.ts **/ // prettier-ignore -export const utilDts = "declare module \"@ark/util\" {\n import * as buffer from 'buffer';\n\ntype Fn = (...args: args) => returns;\ndeclare const cached: (thunk: () => t) => (() => t);\ndeclare const isThunk: (value: value) => value is Extract extends never ? value & Thunk : Extract;\ntype Thunk = () => ret;\ntype thunkable = t | Thunk;\ndeclare const tryCatch: (fn: () => returns, onError?: (e: unknown) => onError) => returns | onError;\ndeclare const DynamicFunction: DynamicFunction;\ntype DynamicFunction = new (...args: ConstructorParameters) => fn & {\n apply(thisArg: null, args: Parameters): ReturnType;\n call(thisArg: null, ...args: Parameters): ReturnType;\n};\ntype CallableOptions = {\n attach?: attachments;\n bind?: object;\n};\n/** @ts-ignore required to cast function type */\ninterface Callable extends fn, attachments {\n}\ndeclare class Callable {\n constructor(fn: fn, ...[opts]: {} extends attachments ? [opts?: CallableOptions] : [opts: CallableOptions]);\n}\ntype GuardablePredicate = ((In: input) => In is narrowed) | ((In: input) => boolean);\ntype TypeGuard = (In: input) => In is narrowed;\n/**\n * Checks if the environment has Content Security Policy (CSP) enabled,\n * preventing JIT-optimized code from being compiled via new Function().\n *\n * @returns `true` if a function created using new Function() can be\n * successfully invoked in the environment, `false` otherwise.\n *\n * The result is cached for subsequent invocations.\n */\ndeclare const envHasCsp: () => boolean;\n\ndeclare const ecmascriptConstructors: {\n Array: ArrayConstructor;\n Boolean: BooleanConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Number: NumberConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n String: StringConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype ecmascriptConstructors = typeof ecmascriptConstructors;\ntype EcmascriptObjects = satisfy, {\n Array: Array;\n Boolean: Boolean;\n Date: Date;\n Error: Error;\n Function: Function;\n Map: Map;\n Number: Number;\n RegExp: RegExp;\n Set: Set;\n String: String;\n WeakMap: WeakMap;\n WeakSet: WeakSet;\n Promise: Promise;\n}>;\n/** Node18 */\ndeclare const FileConstructor: typeof buffer.File;\ntype platformConstructors = {\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n};\ndeclare const platformConstructors: platformConstructors;\ntype PlatformObjects = instantiateConstructors;\ndeclare const typedArrayConstructors: {\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n};\ntype typedArrayConstructors = typeof typedArrayConstructors;\ntype TypedArrayObjects = instantiateConstructors;\ndeclare const builtinConstructors: {\n String: StringConstructor;\n Number: NumberConstructor;\n Boolean: BooleanConstructor;\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n Array: ArrayConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype builtinConstructors = typeof builtinConstructors;\ntype BuiltinObjectKind = keyof builtinConstructors;\ntype GlobalName = keyof typeof globalThis;\ntype instantiateConstructors = {\n [k in kind]: k extends GlobalName ? InstanceType<(typeof globalThis)[k]> : `${k}Constructor` extends GlobalName ? InstanceType<(typeof globalThis)[`${k}Constructor`]> : never;\n};\ntype BuiltinObjects = instantiateConstructors;\ntype describeObject = objectKindOf extends string ? [\n opts[\"includeArticles\"]\n] extends [true] ? objectKindDescriptions[objectKindOf] : objectKindOf : [opts[\"includeArticles\"]] extends [true] ? domainDescriptions[\"object\"] : \"object\";\ntype instantiableObjectKind = {\n [kind in keyof builtinConstructors]: data extends (InstanceType) ? kind : never;\n}[keyof builtinConstructors];\ntype objectKindOf = object extends data ? keyof builtinConstructors | undefined : data extends Fn ? \"Function\" : instantiableObjectKind extends never ? undefined : instantiableObjectKind;\ndeclare const objectKindOf: (data: data) => objectKindOf | undefined;\ndeclare const objectKindOrDomainOf: (data: data) => (objectKindOf & {}) | domainOf;\ntype objectKindOrDomainOf = data extends object ? objectKindOf extends undefined ? \"object\" : objectKindOf : domainOf;\ndeclare const hasObjectKind: (data: object, kind: kind) => data is InstanceType;\ndeclare const isArray: (data: unknown) => data is readonly unknown[];\ndeclare const ecmascriptDescriptions: {\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ndeclare const platformDescriptions: {\n ArrayBuffer: string;\n Blob: string;\n File: string;\n FormData: string;\n Headers: string;\n Request: string;\n Response: string;\n URL: string;\n};\ndeclare const typedArrayDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n};\n/** Each defaultObjectKind's completion for the phrase \"must be _____\" */\ndeclare const objectKindDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n readonly ArrayBuffer: string;\n readonly Blob: string;\n readonly File: string;\n readonly FormData: string;\n readonly Headers: string;\n readonly Request: string;\n readonly Response: string;\n readonly URL: string;\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ntype objectKindDescriptions = typeof objectKindDescriptions;\n/**\n * this will only return an object kind if it's the root constructor\n * example TypeError would return null not 'Error'\n **/\ndeclare const getBuiltinNameOfConstructor: (ctor: Function) => BuiltinObjectKind | null;\ntype Constructor = abstract new (...args: never[]) => instance;\ntype instanceOf = constructor extends Constructor ? instance : never;\n/**\n * Returns an array of constructors for all ancestors (i.e., prototypes) of a given object.\n */\ndeclare const ancestorsOf: (o: object) => Function[];\ntype normalizedKeyOf = keyof t extends infer k ? k extends number ? `${k}` : k : never;\ndeclare const constructorExtends: (ctor: Constructor, base: Constructor) => boolean;\n\ntype stringifyUnion = join, delimiter>;\ntype unionToTuple = _unionToTuple extends infer result ? conform : never;\ntype _unionToTuple = getLastBranch extends infer current ? [\n t\n] extends [never] ? result : _unionToTuple, [current, ...result]> : never;\ntype getLastBranch = intersectUnion void : never> extends ((x: infer branch) => void) ? branch : never;\ntype intersectUnion = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;\ntype intersectOverloadReturns = intersectUnion>>;\ntype overloadOf = Exclude never) & fn, givenArgs, unknown>, fn extends () => never ? never : () => never>;\ntype collectSignatures = result & fn extends (...args: infer args) => infer returns ? result extends fn ? never : collectSignatures & result & ((...args: args) => returns)> | (args extends givenArgs ? (...args: args) => returns : never) : never;\n\ntype DescribeOptions = {\n includeArticles?: boolean;\n branchDelimiter?: string;\n};\ntype typeToString = stringifyUnion<[\n t\n] extends [anyOrNever] ? unknown extends t ? \"any\" : \"never\" : unknown extends t ? \"unknown\" : boolean extends t ? \"boolean\" | ([t] extends [boolean] ? never : typeToString, opts>) : t extends array ? arrayTypeToString : t extends object ? describeObject : t extends Stringifiable ? stringifiableToString : describeDomainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\ntype stringifiableToString = inferDomain> extends t ? describeDomainOf : `${t}`;\ntype describe = typeToString;\ntype arrayTypeToString = typeToString extends infer element extends string ? opts[\"includeArticles\"] extends true ? describeArrayOf : includesDelimiter extends true ? `(${element})[]` : `${element}[]` : never;\ntype describeArrayOf = element extends \"unknown\" ? \"an array\" : `an array of ${element}`;\ntype includesDelimiter = s extends (`${string}${opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]}${string}`) ? true : false;\ntype describeDefaults = satisfy, {\n includeArticles: false;\n branchDelimiter: \" | \";\n}>;\n\ntype JsTypeOf = \"object\" | \"function\" | \"number\" | \"bigint\" | \"boolean\" | \"string\" | \"symbol\" | \"undefined\" | \"null\";\ndeclare const hasDomain: (data: data, kind: domain) => data is data & inferDomain;\ntype TypesByDomain = {\n bigint: bigint;\n boolean: boolean;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n undefined: undefined;\n null: null;\n};\ntype inferDomain = Domain extends kind ? unknown : TypesByDomain[kind];\ntype Domain = show;\ntype NullishDomain = \"undefined\" | \"null\";\ntype NonNullishDomain = Exclude;\ntype PrimitiveDomain = Exclude;\ntype Primitive = inferDomain;\ntype domainOf = unknown extends data ? Domain : data extends object ? \"object\" : data extends string ? \"string\" : data extends number ? \"number\" : data extends boolean ? \"boolean\" : data extends undefined ? \"undefined\" : data extends null ? \"null\" : data extends bigint ? \"bigint\" : data extends symbol ? \"symbol\" : never;\ndeclare const domainOf: (data: data) => domainOf;\ndeclare const jsTypeOfDescriptions: {\n readonly function: \"a function\";\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\n/** Each domain's completion for the phrase \"must be _____\" */\ndeclare const domainDescriptions: {\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\ntype domainDescriptions = typeof domainDescriptions;\ntype describeDomainOf = stringifyUnion] : domainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\n\ntype Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype NumberLiteral = `${n}`;\ntype BigintLiteral = `${n}n`;\ntype IntegerLiteral = `${n}`;\ntype NonNegativeIntegerLiteral = `${Digit}` | (`${Exclude}${string}` & `${n}`);\n/**\n * Matches a well-formatted numeric expression according to the following rules:\n * 1. Must include an integer portion (i.e. '.321' must be written as '0.321')\n * 2. The first digit of the value must not be 0, unless the entire integer portion is 0\n * 3. If the value includes a decimal, its last digit may not be 0\n * 4. The value may not be \"-0\"\n */\ndeclare const wellFormedNumberMatcher: RegExp;\ndeclare const isWellFormedNumber: RegExp[\"test\"];\n/**\n * Similar to wellFormedNumber but more permissive in the following ways:\n *\n * - Allows numbers without an integer portion like \".5\" (well-formed equivalent is \"0.5\")\n * - Allows decimals with trailing zeroes like \"0.10\" (well-formed equivalent is \"0.1\")\n */\ndeclare const numericStringMatcher: RegExp;\ndeclare const isNumericString: (string: string) => boolean;\ndeclare const numberLikeMatcher: RegExp;\n/**\n * Matches a well-formatted integer according to the following rules:\n * 1. must begin with an integer, the first digit of which cannot be 0 unless the entire value is 0\n * 2. The value may not be \"-0\"\n */\ndeclare const wellFormedIntegerMatcher: RegExp;\ndeclare const isWellFormedInteger: RegExp[\"test\"];\ndeclare const integerLikeMatcher: RegExp;\ntype NumericLiteralKind = \"number\" | \"bigint\" | \"integer\";\ndeclare const numericLiteralDescriptions: {\n readonly number: \"a number\";\n readonly bigint: \"a bigint\";\n readonly integer: \"an integer\";\n};\ntype numericLiteralDescriptions = typeof numericLiteralDescriptions;\ntype writeMalformedNumericLiteralMessage = `'${def}' was parsed as ${numericLiteralDescriptions[kind]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`;\ndeclare const writeMalformedNumericLiteralMessage: (def: def, kind: kind) => writeMalformedNumericLiteralMessage;\ndeclare const tryParseWellFormedNumber: typeof tryParseNumber;\ndeclare const tryParseNumber: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseNumber = token extends `${infer n extends number}` ? number extends n ? writeMalformedNumericLiteralMessage : n : messageOnFail;\ntype parseNumber = token extends `${infer n extends number}` ? n : never;\ndeclare const tryParseInteger: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseInteger = token extends `${infer b extends bigint}` ? bigint extends b ? writeMalformedNumericLiteralMessage : token extends `${infer n extends number}` ? n : never : messageOnFail;\ntype parseInteger = token extends `${bigint}` ? token extends `${infer n extends number}` ? n : never : never;\ntype parseNonNegativeInteger = token extends `-${string}` ? never : parseInteger;\ntype NumericParseOptions = {\n errorOnFail?: errorOnFail;\n strict?: boolean;\n};\ndeclare const tryParseWellFormedBigint: (def: string) => bigint | undefined;\n/**\n * Returns the next or previous representable floating-point number after the given input.\n *\n * @param {\"+\" | \"-\"} [direction=\"+\"] - The direction to find the nearest float. \"+\" for the next float, \"-\" for the previous float.\n * @throws {Error} If the input is not a finite number.\n *\n * @example\n * console.log(nearestFloat(0)); // Smallest positive number\n * console.log(nearestFloat(2)); // 2.0000000000000004\n * console.log(nearestFloat(2.1)); // 2.1000000000000005\n * console.log(nearestFloat(2, \"-\")); // 1.9999999999999998\n * console.log(nearestFloat(2.1, \"-\")); // 2.0999999999999996\n * // as size of input increases, the increments become larger to stay within what\n * // JS can represent in a numeric value\n * console.log(nearestFloat(5555555555555555)); // 5555555555555556\n * console.log(nearestFloat(5555555555555555, \"-\")); // 5555555555555554\n */\ndeclare const nearestFloat: (n: number, direction?: \"+\" | \"-\") => number;\n\ntype Key = string | symbol;\ntype toArkKey = k extends number ? [\n o,\n number\n] extends [array, k] ? NonNegativeIntegerLiteral : `${k}` : k;\ntype arkIndexableOf = arkKeyOf extends infer k ? k extends `${infer index extends number}` ? index | k : k : never;\ntype arkKeyOf = [\n o\n] extends [object] ? [\n o\n] extends [array] ? arkArrayKeyOf : arkObjectLiteralKeyOf : never;\ntype arkArrayKeyOf = number extends a[\"length\"] ? NonNegativeIntegerLiteral : keyof a extends infer i ? i extends `${number}` ? i : never : never;\ntype arkObjectLiteralKeyOf = keyof o extends infer k ? k extends number ? `${k}` : k : never;\ntype arkGet> = o[k extends keyof o ? k : NonNegativeIntegerLiteral extends k ? number & keyof o : k extends number ? `${k}` & keyof o : never];\ntype writeInvalidKeysMessage> = `Key${keys[\"length\"] extends 1 ? \"\" : \"s\"} ${join} ${keys[\"length\"] extends 1 ? \"does\" : \"do\"} not exist on ${o}`;\n\ntype Dict = {\n readonly [_ in k]: v;\n};\ntype dict = {\n [_ in k]: v;\n};\n/** Either:\n * A, with all properties of B undefined\n * OR\n * B, with all properties of A undefined\n **/\ntype propwiseXor = show | show;\ntype unionToPropwiseXor> = props extends infer distributed ? show : never;\ntype requireKeys = o & {\n [requiredKey in key]-?: defined;\n};\ntype require = _require;\ntype _require = depth[\"length\"] extends maxDepth ? o : o extends object ? o extends Fn ? o : {\n [k in keyof o]-?: _require;\n} : o;\ntype PartialRecord = {\n [_ in k]?: v;\n};\n/** Returns true if a type can be homomorphically mapped without losing information.\n * Useful for avoiding e.g. classes with private properties while mapping.\n */\ntype isSafelyMappable = {\n [k in keyof t]: t[k];\n} extends t ? true : false;\ntype KeySet = {\n readonly [_ in key]?: 1;\n};\ntype keySetOf = KeySet>;\ntype mutable = _mutable;\ntype _mutable = depth[\"length\"] extends maxDepth ? o : o extends Primitive ? o : o extends Fn ? o : {\n -readonly [k in keyof o]: _mutable;\n};\n/**\n * extracts entries mimicking Object.entries, accounting for whether the\n * object is an array\n **/\ntype entryOf = {\n [k in keyof o]-?: [k, o[k] & ({} | null)];\n}[o extends readonly unknown[] ? keyof o & number : keyof o] & unknown;\ntype entriesOf = entryOf[];\n/**\n * Object.entries wrapper providing narrowed types for objects with known sets\n * of keys, e.g. those defined internally as configs\n */\ndeclare const entriesOf: (o: o) => entryOf[];\ntype Entry = readonly [key: key, value: value];\ntype fromEntries = show<{\n [entry in entries[number] as entry[0]]: entry[1];\n}>;\ndeclare const fromEntries: (entries: entries) => fromEntries;\n/** Mimics the result of Object.keys(...) */\ntype keyOf = o extends array ? number extends o[\"length\"] ? `${number}` : keyof o & `${number}` : keyof o extends infer k ? k extends string ? k : k extends number ? `${k}` : never : never;\ndeclare const keysOf: (o: o) => keyOf[];\ndeclare const isKeyOf: (k: k, o: o) => k is Extract;\n/** Coalesce keys that exist on one or more branches of a union */\ntype unionKeyOf = t extends unknown ? keyof t : never;\ntype extractKeyed> = Extract;\ndeclare const hasKey: >(o: o, k: k) => o is extractKeyed;\ntype extractDefinedKey> = show & {\n [_ in k]: {} | null;\n}>;\ndeclare const hasDefinedKey: >(o: o, k: k) => o is extractDefinedKey;\ntype requiredKeyOf = keyof o extends infer k ? k extends keyof o ? o extends {\n [_ in k]-?: o[k];\n} ? k : never : never : never;\ntype optionalKeyOf = Exclude>;\ntype merge = base extends unknown ? props extends unknown ? keyof base & keyof props extends never ? show : show & props> : never : never;\ntype override = merge;\ntype propValueOf = o[keyof o];\ndeclare const InnerDynamicBase: new (base: t) => t;\n/** @ts-ignore (needed to extend `t`) **/\ninterface DynamicBase extends t {\n}\ndeclare class DynamicBase {\n constructor(properties: t);\n}\ndeclare const NoopBase: new () => t;\n/** @ts-ignore (needed to extend `t`) **/\ndeclare class CastableBase extends NoopBase {\n}\ndeclare const splitByKeys: >(o: o, leftKeys: leftKeys) => [show>, show>];\n/** Homomorphic implementation of the builtin Pick.\n *\n * Gives different results for certain union expressions like the following:\n *\n * @example\n * // flattens result to { a?: 1 | 2; b?: 1 | 2 }\n * type PickResult = Pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type pickResult = pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n */\ntype pick = o extends unknown ? {\n [k in keyof o as k extends key ? k : never]: o[k];\n} : never;\ndeclare const pick: >(o: o, keys: keys) => pick;\n/** Homomorphic implementation of the builtin Omit.\n *\n * Gives different results for many union expressions like the following:\n *\n * @example\n * // {}\n * type OmitResult = Omit<{ a: 1 } | { b: 2 }, never>\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type omitResult = omit<{ a: 1 } | { b: 2 }, never>\n */\ntype omit = {\n [k in keyof o as k extends key ? never : k]: o[k];\n};\ndeclare const omit: >(o: o, keys: keys) => omit;\n/** Returns onTrue if the type is exactly `{}` and onFalse otherwise*/\ntype ifEmptyObjectLiteral = [\n unknown,\n t & (null | undefined)\n] extends [t | null | undefined, never] ? onTrue : onFalse;\ntype EmptyObject = Record;\ndeclare const isEmptyObject: (o: object) => o is EmptyObject;\ndeclare const stringAndSymbolicEntriesOf: (o: object) => Entry[];\n/** Like Object.assign, but it will preserve getters instead of evaluating them. */\ndeclare const defineProperties: (base: base, merged: merged) => merge;\n/** Copies enumerable keys of o to a new object in alphabetical order */\ndeclare const withAlphabetizedKeys: (o: o) => o;\ntype invert> = {\n [k in t[keyof t]]: {\n [k2 in keyof t]: t[k2] extends k ? k2 : never;\n }[keyof t];\n} & unknown;\ndeclare const invert: >(t: t) => invert;\ndeclare const unset: \" unset​\";\ntype unset = typeof unset;\n/**\n * For each keyof o that also exists on jsDocSource, add associated JsDoc annotations to o.\n * Does not preserve modifiers on o like optionality.\n */\ntype withJsDoc = show : Pick<_withJsDoc, keyof o & keyof jsDocSource> : Pick<_withJsDoc, keyof o & keyof jsDocSource> & {\n [k in Exclude]: o[k];\n}>;\ntype _withJsDoc = {\n [k in keyof jsDocSource]-?: o[k & keyof o];\n};\ntype propertyDescriptorsOf = {\n [k in keyof o]: TypedPropertyDescriptor;\n};\ntype keyWithValue = keyof t extends infer k ? k extends keyof t ? t[k] extends constraint ? k : never : never : never;\ndeclare const enumValues: (tsEnum: tsEnum) => tsEnum[keyof tsEnum][];\n\ndeclare class InternalArktypeError extends Error {\n}\ndeclare const throwInternalError: (message: string) => never;\ndeclare const throwError: (message: string, ctor?: new (message: string) => Error) => never;\ndeclare class ParseError extends Error {\n readonly name = \"ParseError\";\n}\ndeclare const throwParseError: (message: string) => never;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ndeclare const noSuggest: (s: s) => noSuggest;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ntype noSuggest = ` ${s}`;\n/** Unrendered character (U+200B) used to mark a string type */\ndeclare const ZeroWidthSpace = \"\\u200B\";\n/** Unrendered character (U+200B) used to mark a string type */\ntype ZeroWidthSpace = typeof ZeroWidthSpace;\ntype ErrorMessage = `${message}${ZeroWidthSpace}`;\ninterface ErrorType extends CastableBase {\n [brand]: \"ErrorType\";\n}\ntype Completion = `${text}${ZeroWidthSpace}${ZeroWidthSpace}`;\n\ntype Stringifiable = string | boolean | number | bigint | null | undefined;\n/** Force an operation like `{ a: 0 } & { b: 1 }` to be computed so that it displays `{ a: 0; b: 1 }`. */\ntype show = {\n [k in keyof t]: t[k];\n} & unknown;\n/** @deprecated use \"show\" instead */\ntype evaluate = {\n [k in keyof t]: t[k];\n} & unknown;\ntype get = t[k & keyof t];\ntype exact = {\n [k in keyof t]: k extends keyof u ? conform : never;\n};\ntype exactMessageOnError = {\n [k in keyof t]: k extends keyof u ? conform : ErrorMessage<`'${k & string}' is not a valid key`>;\n} & u;\ntype promisable = t | Promise;\ntype leftIfEqual = [l, r] extends [r, l] ? l : r;\ntype UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined;\n/**\n * Interesection (`&`) that avoids evaluating `unknown` to `{}`\n */\ntype andPreserveUnknown = unknown extends l & r ? unknown : show;\n/** Can be used to test for the universal subtypes, `any` and `never`, e.g.:\n *\n * ```ts\n * type isAnyOrNever = [t] extends [anyOrNever] ? true : false\n * ```\n *\n * The actual value is a string literal, but the only realistic subtypes\n * of that literal are `any` and `never`.\n */\ntype anyOrNever = \" anyOrNever\";\ntype conform = t extends base ? t : base;\ntype equals = [l, r] extends [r, l] ? true : false;\ntype exactEquals = (<_>() => _ extends l ? 1 : 2) extends <_>() => _ extends r ? 1 : 2 ? true : false;\ndeclare const brand: \" brand\";\ntype Brand = t & {\n readonly [brand]: [t, id];\n};\ntype unbrand = t extends Brand ? base : never;\ntype satisfy = t;\ntype defined = t & ({} | null);\ntype autocomplete = suggestions | (string & {});\ntype widen = collectWidenedType>;\ntype collectWidenedType = remaining extends [infer head, ...infer tail] ? collectWidenedType : result;\ntype narrowTuple = t extends readonly [infer head, ...infer tail] ? readonly [head, ...narrowTuple] : [];\ntype narrow = t extends Primitive ? t : t extends readonly unknown[] ? narrowTuple : {\n [k in keyof t]: narrow;\n};\ndeclare const narrow: (t: narrow) => t;\n/** primitive key used to represent an inferred type at compile-time */\ndeclare const inferred: \" arkInferred\";\n/** primitive key used to represent an inferred type at compile-time */\ntype inferred = typeof inferred;\n\ndeclare const args: \" args\";\ntype args = typeof args;\ndeclare abstract class Hkt {\n [args]: unknown[];\n constraints: constraints;\n args: this[args] extends infer args extends unknown[] ? args : never;\n 0: this[args] extends [infer arg, ...any] ? arg : never;\n 1: this[args] extends [any, infer arg, ...any] ? arg : never;\n 2: this[args] extends [any, any, infer arg, ...any] ? arg : never;\n 3: this[args] extends [any, any, any, infer arg, ...any] ? arg : never;\n abstract body: unknown;\n description?: string;\n constructor();\n}\n/** A small set of HKT utility types based on https://github.com/gvergnaud/hotscript\n * See https://github.com/gvergnaud/hotscript/blob/main/src/internals/core/Core.ts\n */\ndeclare namespace Hkt {\n type constructor = new () => Hkt;\n type args = typeof args;\n type apply = (hkt & {\n [args]: args;\n })[\"body\"];\n}\n\ninterface AndPreserveUnknown extends Hkt<[unknown, unknown]> {\n body: andPreserveUnknown;\n}\ntype SequenceIntersectionKind = \"array\" | \"parameters\";\ntype intersectArrays = intersectSequences;\ntype intersectParameters = intersectSequences;\ntype intersectSequences = l extends readonly [] ? kind extends \"array\" ? [\n] extends r ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...r, ...postfix] : r extends readonly [] ? kind extends \"array\" ? [\n] extends l ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...l, ...postfix] : [\n l,\n r\n] extends ([\n readonly [(infer lHead)?, ...infer lTail],\n readonly [(infer rHead)?, ...infer rTail]\n]) ? [\n \"0\",\n lHead,\n rHead\n] extends [keyof l | keyof r, l[0], r[0]] ? intersectSequences?\n] : [...acc, Hkt.apply], postfix, operation, kind> : l extends readonly [...infer lInit, infer lLast] ? r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : intersectSequences,\n ...postfix\n], operation, kind> : r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : [...acc, ...Hkt.apply[], ...postfix] : never;\ntype isDisjoint = overlaps extends true ? false : true;\ntype overlaps = l & r extends never ? false : domainOf & domainOf extends never ? false : [l, r] extends [object, object] ? false extends (propValueOf<{\n [k in Extract | requiredKeyOf>]: overlaps;\n}>) ? false : true : true;\n\ntype DuplicateData = {\n element: val;\n indices: number[];\n};\n/**\n * Extracts duplicated elements and their indices from an array, returning them.\n *\n * Note that given `a === b && b === c`, then `c === a` must be `true` for this to give accurate results.\n *\n * @param arr The array to extract duplicate elements from.\n */ declare const getDuplicatesOf: (arr: arr, opts?: ComparisonOptions) => DuplicateData[];\ntype pathToString = segments extends [] ? \"/\" : join;\ndeclare const join: , delimiter extends string>(segments: segments, delimiter: delimiter) => join;\ntype join, delimiter extends string, result extends string = \"\"> = segments extends (readonly [infer head extends string, ...infer tail extends string[]]) ? join : result;\ndeclare const getPath: (root: unknown, path: string[]) => unknown;\ndeclare const intersectUniqueLists: (l: readonly item[], r: readonly item[]) => item[];\ntype filter = t extends readonly [infer head, ...infer tail] ? filter : result;\ntype array = readonly t[];\ndeclare namespace array {\n type multiply = _multiply;\n type _multiply = i[\"length\"] extends count ? result : _multiply;\n type repeat = buildFromSegments, count>;\n type buildFromSegments = next[\"length\"] extends count ? {\n [i in keyof next]: element;\n } : `${count}` extends keyof next ? buildFromSegments, count> : buildFromSegments, count>;\n type nextSegments = segments extends [unknown, ...infer nextSegments extends 1[][]] ? nextSegments : never;\n type minLength = readonly [\n ...multiply<[element], minLength>,\n ...element[]\n ];\n}\ntype listable = t | readonly t[];\ntype flattenListable = t extends array ? element : t;\ntype longerThan = `${n}` extends keyof t ? true : false;\ntype CollapsingList = readonly [] | t | readonly [t, t, ...t[]];\ntype headOf = t[0];\ntype tailOf = t extends readonly [unknown, ...infer tail] ? tail : never;\ntype lastIndexOf = tailOf[\"length\"];\ntype lastOf = t[lastIndexOf];\ntype initOf = t extends readonly [...infer init, unknown] ? init : never;\ntype numericStringKeyOf = Extract;\ntype arrayIndexOf = keyof a extends infer k ? parseNonNegativeInteger : never;\ntype liftArray = t extends array ? [\n t\n] extends [anyOrNever] ? t[] : t : t[];\ndeclare const liftArray: (data: t) => liftArray;\n/**\n * Splits an array into two arrays based on the result of a predicate\n *\n * @param predicate - The guard function used to determine which items to include.\n * @returns A tuple containing two arrays:\n * \t\t\t\t- the first includes items for which `predicate` returns true\n * \t\t\t\t- the second includes items for which `predicate` returns false\n *\n * @example\n * const list = [1, \"2\", \"3\", 4, 5];\n * const [numbers, strings] = spliterate(list, (x) => typeof x === \"number\");\n * // Type: number[]\n * // Output: [1, 4, 5]\n * console.log(evens);\n * // Type: string[]\n * // Output: [\"2\", \"3\"]\n * console.log(odds);\n */\ndeclare const spliterate: (arr: readonly item[], predicate: GuardablePredicate) => [included: included[], excluded: [item] extends [included] ? item[] : Exclude[]];\ndeclare const ReadonlyArray: new (...args: ConstructorParameters>) => ReadonlyArray;\ndeclare const includes: (array: a, element: unknown) => element is a[number];\ndeclare const range: (length: number, offset?: number) => number[];\ntype AppendOptions = {\n /** If true, adds the element to the beginning of the array instead of the end */\n prepend?: boolean;\n};\n/**\n * Adds a value or array to an array, returning the concatenated result\n */\ndeclare const append: >(to: to, value: value, opts?: AppendOptions) => to & {};\ntype appendableValue = to extends array ? element extends array ? array : listable : never;\n/**\n * Concatenates an element or list with a readonly list\n */\ndeclare const conflatenate: (to: readonly element[] | undefined | null, elementOrList: appendableValue | undefined | null) => readonly element[];\n/**\n * Concatenates a variadic list of elements or lists with a readonly list\n */\ndeclare const conflatenateAll: (...elementsOrLists: (listable | undefined | null)[]) => readonly element[];\ninterface ComparisonOptions {\n isEqual?: (l: t, r: t) => boolean;\n}\n/**\n * Appends a value or concatenates an array to an array if it is not already included, returning the array\n */\ndeclare const appendUnique: (to: to | undefined, value: NoInfer | to[number]>, opts?: ComparisonOptions) => to;\ntype groupableKeyOf = keyof o extends infer k ? k extends keyof o ? o[k] extends PropertyKey ? k : never : never : never;\ntype groupBy> = {\n [k in element[discriminant] & PropertyKey]?: (element extends unknown ? isDisjoint extends true ? never : element : never)[];\n} & unknown;\ndeclare const groupBy: >(array: readonly element[], discriminant: discriminant) => groupBy;\ndeclare const arrayEquals: (l: array, r: array, opts?: ComparisonOptions) => boolean;\ntype validateExhaustiveKeys = keys extends readonly [infer head, ...infer tail extends PropertyKey[]] ? readonly [\n conform,\n ...validateExhaustiveKeys>\n] : [expectedKey] extends [never] ? [] : [expectedKey];\ntype applyElementLabels = labels extends [unknown, ...infer labelsTail] ? t extends readonly [infer head, ...infer tail] ? readonly [\n ...labelElement,\n ...applyElementLabels\n] : applyOptionalElementLabels, labels> : t;\ntype applyOptionalElementLabels = labels extends readonly [unknown, ...infer labelsTail] ? t extends readonly [infer head, ...infer tail] ? [\n ...labelOptionalElement,\n ...applyOptionalElementLabels\n] : applyRestElementLabels : t;\ntype applyRestElementLabels = t extends readonly [] ? [] : labels extends readonly [unknown, ...infer tail] ? [\n ...labelOptionalElement,\n ...applyRestElementLabels\n] : t;\ntype labelElement = labels extends readonly [unknown] ? {\n [K in keyof labels]: element;\n} : labels extends readonly [...infer head, unknown] ? labelElement : [_: element];\ntype labelOptionalElement = label extends readonly [unknown] ? {\n [K in keyof label]?: element;\n} : label extends readonly [...infer head, unknown] ? labelOptionalElement : [_?: element];\ntype setIndex = arr extends arr[number][] ? _setIndex : Readonly<_setIndex>;\ntype _setIndex = arr extends readonly [infer head, ...infer tail] ? _setIndex : result;\ntype zero = [];\ntype one = [1];\ntype two = [1, 1];\ntype three = [...two, ...two];\ntype four = [...three, ...three];\ntype five = [...four, ...four];\ntype six = [...five, ...five];\ntype seven = [...six, ...six];\ntype eight = [...seven, ...seven];\ntype nine = [...eight, ...eight];\ntype ten = [...nine, ...nine];\ntype eleven = [...ten, ...ten];\ntype twelve = [...eleven, ...eleven];\ntype thirteen = [...twelve, ...twelve];\ntype fourteen = [...thirteen, ...thirteen];\ntype exponentials = [\n fourteen,\n thirteen,\n twelve,\n eleven,\n ten,\n nine,\n eight,\n seven,\n six,\n five,\n four,\n three,\n two,\n one,\n zero\n];\ndeclare namespace exponentials {\n type max = _max;\n type _max = `${n}` extends keyof filtered[0] ? _max> : filtered;\n}\n\n/** Shallowly copy the properties of the object. */\ndeclare const shallowClone: (input: input) => input;\n/** Deeply copy the properties of the a non-subclassed Object, Array or Date.*/\ndeclare const deepClone: (input: input) => input;\n\ntype objectFromListableEntries = show>>;\ntype fromGroupableEntries = {\n [entry in entries[number] as entry extends GroupedEntry ? entry[0][\"group\"] : conform]: entry extends GroupedEntry ? entry[1][] : entry[1];\n};\ntype arrayFromListableEntries = Entry extends transformed ? transformed[1][] : _arrayFromListableEntries;\ntype _arrayFromListableEntries = [\n transformed\n] extends [never] ? result : Extract> extends (infer next extends Entry) ? Exclude extends infer remaining extends Entry ? [\n transformed\n] extends [remaining] ? [\n ...result,\n ...transformed[1][]\n] : _arrayFromListableEntries : never : [...result, ...transformed[1][]];\ntype extractEntrySets> = e extends readonly GroupableEntry[] ? e : [e];\ntype extractEntries> = e extends readonly Entry[] ? e[number] : e;\ntype entryArgsWithIndex = {\n [k in keyof o]-?: [k: k, v: Exclude, i: number];\n}[keyof o];\ntype numericArrayEntry = number extends a[\"length\"] ? [number, a[number]] : {\n [i in keyof a]: i extends `${infer n extends number}` ? [n, a[i]] : never;\n}[number];\ntype GroupedEntry = readonly [key: {\n group: Key;\n}, value: unknown];\ntype GroupableEntry = Entry | Entry | GroupedEntry;\ntype ListableEntry = listable;\ntype fromMappedEntries = [\n transformed\n] extends [listable>] ? arrayFromListableEntries> : objectFromListableEntries>;\ntype FlatMorph = {\n (o: o, flatMapEntry: (...args: numericArrayEntry) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryOf) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryArgsWithIndex) => transformed): fromMappedEntries;\n};\ndeclare const flatMorph: FlatMorph;\n\ndeclare const isomorphic: {\n fileName: () => string;\n env: Record, string | undefined>;\n};\n\ndeclare const lazily: (thunk: () => t) => t;\n\ntype SerializationOptions = {\n onCycle?: (value: object) => string;\n onSymbol?: (value: symbol) => string;\n onFunction?: (value: Function) => string;\n onUndefined?: string;\n onBigInt?: (value: bigint) => string;\n};\ntype JsonStructure = JsonObject | JsonArray;\ninterface JsonObject {\n [k: string]: Json;\n}\ntype JsonArray = Json[];\ntype JsonPrimitive = string | boolean | number | null;\ntype Json = JsonStructure | JsonPrimitive;\ndeclare const snapshot: (data: t, opts?: SerializationOptions) => snapshot;\ntype snapshot = unknown extends t ? unknown : t extends Primitive ? snapshotPrimitive : t extends {\n toJSON: () => infer serialized;\n} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth[\"length\"] extends 10 ? unknown : t extends array ? array> : {\n [k in keyof t as snapshotPrimitive]: snapshot;\n};\ntype snapshotPrimitive = t extends symbol ? `Symbol(${string})` : t;\ntype PrintableOptions = {\n indent?: number;\n quoteKeys?: boolean;\n};\ndeclare const print: (data: unknown, opts?: PrintableOptions) => void;\ndeclare const printable: (data: unknown, opts?: PrintableOptions) => string;\n/**\n * Converts a Date instance to a human-readable description relative to its precision\n */\ndeclare const describeCollapsibleDate: (date: Date) => string;\n\ntype StringifyPathOptions = requireKeys<{\n stringifySymbol?: (s: symbol) => string;\n stringifyNonKey?: (o: Exclude) => string;\n}, stringifiable extends PropertyKey ? never : \"stringifyNonKey\">;\ntype StringifyPathFn = (path: array, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ntype AppendStringifiedKeyFn = (path: string, prop: stringifiable, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ndeclare const appendStringifiedKey: AppendStringifiedKeyFn;\ndeclare const stringifyPath: StringifyPathFn;\ndeclare class ReadonlyPath extends ReadonlyArray {\n private cache;\n constructor(...items: array);\n toJSON(): JsonArray;\n stringify(): string;\n stringifyAncestors(): readonly string[];\n}\n\ntype SerializedString = `\"${value}\"`;\ntype SerializedPrimitives = {\n string: SerializedString;\n number: `${number}`;\n bigint: BigintLiteral;\n boolean: \"true\" | \"false\";\n null: \"null\";\n undefined: \"undefined\";\n};\ntype SerializedPrimitive = SerializedPrimitives[keyof SerializedPrimitives];\ntype SerializablePrimitive = inferDomain;\ndeclare const serializePrimitive: (value: value) => serializePrimitive;\ntype serializePrimitive = value extends string ? `\"${value}\"` : value extends bigint ? `${value}n` : `${value}`;\n\ndeclare const arkUtilVersion = \"0.49.0\";\ndeclare const initialRegistryContents: {\n version: string;\n filename: string;\n FileConstructor: typeof buffer.File;\n};\ntype InitialRegistryContents = typeof initialRegistryContents;\ninterface ArkRegistry extends InitialRegistryContents {\n [k: string]: unknown;\n}\ndeclare const registry: ArkRegistry;\ndeclare global {\n export interface ArkEnv {\n prototypes(): never;\n }\n export namespace ArkEnv {\n type prototypes = ReturnType;\n }\n}\ndeclare const register: (value: object | symbol) => string;\ndeclare const isDotAccessible: (keyName: string) => boolean;\n\ndeclare const capitalize: (s: s) => Capitalize;\ndeclare const uncapitalize: (s: s) => Uncapitalize;\ntype firstChar = s extends `${infer head}${string}` ? head : \"\";\ntype charsAfterFirst = s extends `${string}${infer tail}` ? tail : \"\";\ntype lastChar = s extends `${infer head}${infer tail}` ? tail extends \"\" ? head : lastChar : s;\ntype charsBeforeLast = s extends `${infer head}${infer tail}` ? tail extends \"\" ? \"\" : `${head}${charsBeforeLast}` : \"\";\ntype contains = s extends `${string}${sub}${string}` ? true : false;\ndeclare const anchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const deanchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const anchoredSource: (regex: RegExp | string) => string;\ndeclare const deanchoredSource: (regex: RegExp | string) => string;\ndeclare const RegexPatterns: {\n negativeLookahead: (pattern: string) => `(?!${string})`;\n nonCapturingGroup: (pattern: string) => `(?:${string})`;\n};\ndeclare const Backslash = \"\\\\\";\ntype Backslash = typeof Backslash;\ndeclare const whitespaceChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n};\ntype WhitespaceChar = keyof typeof whitespaceChars;\ntype trim = trimEnd>;\ntype trimStart = s extends `${WhitespaceChar}${infer tail}` ? trimEnd : s;\ntype trimEnd = s extends `${infer init}${WhitespaceChar}` ? trimEnd : s;\ntype isStringLiteral = [\n t\n] extends [string] ? [\n string\n] extends [t] ? false : Uppercase extends Uppercase> ? Lowercase extends Lowercase> ? true : false : false : false;\ndeclare const emojiToUnicode: (emoji: string) => string;\ndeclare const alphabet: readonly [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n\ndeclare class Scanner {\n chars: string[];\n i: number;\n def: string;\n constructor(def: string);\n /** Get lookahead and advance scanner by one */\n shift(): this[\"lookahead\"];\n get lookahead(): lookahead;\n get nextLookahead(): string;\n get length(): number;\n shiftUntil(condition: Scanner.UntilCondition): string;\n shiftUntilEscapable(condition: Scanner.UntilCondition): string;\n shiftUntilLookahead(charOrSet: string | KeySet): string;\n shiftUntilNonWhitespace(): string;\n jumpToIndex(i: number): void;\n jumpForward(count: number): void;\n get location(): number;\n get unscanned(): string;\n get scanned(): string;\n sliceChars(start: number, end?: number): string;\n lookaheadIs(char: char): this is Scanner;\n lookaheadIsIn(tokens: keySet): this is Scanner>;\n}\ndeclare namespace Scanner {\n type UntilCondition = (scanner: Scanner, shifted: string) => boolean;\n type shift = `${lookahead}${unscanned}`;\n type shiftUntil = unscanned extends shift ? lookahead extends terminator ? [\n appendTo,\n unscanned\n ] : shiftUntil : [appendTo, \"\"];\n type shiftUntilEscapable = unscanned extends shift ? lookahead extends terminator ? [appendTo, unscanned] : lookahead extends Backslash ? nextUnscanned extends (shift) ? shiftUntilEscapable : [`${appendTo}${Backslash}`, \"\"] : shiftUntilEscapable : [appendTo, \"\"];\n type shiftUntilNot = unscanned extends shift ? lookahead extends nonTerminator ? shiftUntilNot : [appendTo, unscanned] : [appendTo, \"\"];\n type skipWhitespace = shiftUntilNot[1];\n type shiftResult = [\n scanned,\n unscanned\n ];\n}\ndeclare const writeUnmatchedGroupCloseMessage: (char: char, unscanned: unscanned) => writeUnmatchedGroupCloseMessage;\ntype writeUnmatchedGroupCloseMessage = `Unmatched ${char}${unscanned extends \"\" ? \"\" : ` before ${unscanned}`}`;\ndeclare const writeUnclosedGroupMessage: (missingChar: missingChar) => writeUnclosedGroupMessage;\ntype writeUnclosedGroupMessage = `Missing ${missingChar}`;\n\ntype TraitImplementation = , s extends CompositionState = composeTraits<[\n ...traits,\n implementation\n], \"implementation\">, cls extends TraitConstructor = TraitConstructor>(...args: [...traits, implementation & ThisType>]) => cls;\ntype TraitComposition = >(...traits: conform) => TraitConstructor;\ndeclare const hasTrait: (traitClass: Constructor) => (o: unknown) => boolean;\ntype TraitDeclaration = {\n abstractMethods?: object;\n abstractProps?: object;\n abstractStatics?: object;\n dynamicBase?: object;\n};\n/** @ts-ignore required to extend NoopBase */\ndeclare abstract class Trait extends NoopBase {\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatic: abstractStatics;\n static get [Symbol.hasInstance](): (o: unknown) => boolean;\n traitsOf(): readonly TraitConstructor[];\n}\ndeclare const compose: TraitComposition;\ndeclare const implement: TraitImplementation;\ntype TraitConstructor = statics & (new (...args: params) => Trait<{\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatics: abstractStatics;\n}> & instance);\ntype CompositionState = {\n validated: array;\n remaining: array;\n params: array;\n kind: TraitCompositionKind;\n implemented: object;\n abstractMethods: object;\n abstractProps: object;\n abstractStatics: object;\n statics: object;\n};\ntype TraitCompositionKind = \"abstract\" | \"implementation\";\ntype composeTraits = _compose<{\n validated: [];\n remaining: traits;\n kind: kind;\n params: [];\n implemented: {};\n abstractMethods: {};\n abstractProps: {};\n abstractStatics: {};\n statics: {};\n}>;\ntype intersectImplementations = {\n [k in keyof l]: k extends keyof r ? l[k] extends (...args: infer lArgs) => infer lReturn ? r[k] extends (...args: infer rArgs) => infer rReturn ? (...args: intersectParameters) => lReturn & rReturn : l[k] & r[k] : l[k] & r[k] : l[k];\n} & Omit;\ntype _compose = s[\"remaining\"] extends (readonly [\n TraitConstructor,\n ...infer tail\n]) ? _compose<{\n validated: [...s[\"validated\"], s[\"remaining\"][0]];\n remaining: tail;\n kind: s[\"kind\"];\n params: intersectParameters;\n implemented: intersectImplementations>;\n statics: intersectImplementations>;\n abstractMethods: intersectImplementations;\n abstractProps: intersectImplementations;\n abstractStatics: intersectImplementations;\n}> : finalizeState;\ntype finalizeState = satisfy;\n statics: show>;\n abstractMethods: show>;\n abstractProps: show>;\n abstractStatics: show>;\n}>;\ntype implementationOf = s[\"abstractMethods\"] & ({} extends s[\"abstractProps\"] ? {} : {\n construct: (...args: s[\"params\"]) => s[\"abstractProps\"];\n}) & ({} extends s[\"abstractStatics\"] ? {} : {\n statics: s[\"abstractStatics\"];\n});\n\nexport { type AndPreserveUnknown, type AppendOptions, type AppendStringifiedKeyFn, type ArkRegistry, Backslash, type BigintLiteral, type Brand, type BuiltinObjectKind, type BuiltinObjects, Callable, type CallableOptions, CastableBase, type CollapsingList, type ComparisonOptions, type Completion, type Constructor, type DescribeOptions, type Dict, type Digit, type Domain, DynamicBase, DynamicFunction, type EcmascriptObjects, type EmptyObject, type Entry, type ErrorMessage, type ErrorType, FileConstructor, type FlatMorph, type Fn, type GlobalName, type GroupableEntry, type GroupedEntry, type GuardablePredicate, Hkt, type InitialRegistryContents, InnerDynamicBase, type IntegerLiteral, InternalArktypeError, type JsTypeOf, type Json, type JsonArray, type JsonObject, type JsonPrimitive, type JsonStructure, type Key, type KeySet, type ListableEntry, type NonNegativeIntegerLiteral, type NonNullishDomain, NoopBase, type NullishDomain, type NumberLiteral, type NumericParseOptions, ParseError, type PartialRecord, type PlatformObjects, type Primitive, type PrimitiveDomain, type PrintableOptions, ReadonlyArray, ReadonlyPath, RegexPatterns, Scanner, type SerializablePrimitive, type SerializationOptions, type SerializedPrimitive, type SerializedPrimitives, type Stringifiable, type StringifyPathFn, type StringifyPathOptions, type Thunk, Trait, type TraitComposition, type TraitCompositionKind, type TraitConstructor, type TraitDeclaration, type TraitImplementation, type TypeGuard, type TypedArrayObjects, type UnknownUnion, type WhitespaceChar, ZeroWidthSpace, alphabet, ancestorsOf, anchoredRegex, anchoredSource, type andPreserveUnknown, type anyOrNever, append, appendStringifiedKey, appendUnique, type appendableValue, type applyElementLabels, type arkGet, type arkIndexableOf, type arkKeyOf, arkUtilVersion, array, arrayEquals, type arrayIndexOf, type autocomplete, brand, builtinConstructors, cached, capitalize, type charsAfterFirst, type charsBeforeLast, compose, type composeTraits, conflatenate, conflatenateAll, type conform, constructorExtends, type contains, deanchoredRegex, deanchoredSource, deepClone, defineProperties, type defined, type describe, describeCollapsibleDate, type describeDefaults, type describeDomainOf, type describeObject, type dict, domainDescriptions, domainOf, ecmascriptConstructors, ecmascriptDescriptions, emojiToUnicode, entriesOf, type entryOf, enumValues, envHasCsp, type equals, type evaluate, type exact, type exactEquals, type exactMessageOnError, type extractDefinedKey, type extractKeyed, type filter, type firstChar, flatMorph, type flattenListable, fromEntries, type fromMappedEntries, type get, getBuiltinNameOfConstructor, getDuplicatesOf, getPath, groupBy, type groupableKeyOf, hasDefinedKey, hasDomain, hasKey, hasObjectKind, hasTrait, type headOf, type ifEmptyObjectLiteral, implement, type implementationOf, includes, type inferDomain, inferred, type initOf, initialRegistryContents, type instanceOf, integerLikeMatcher, type intersectArrays, type intersectOverloadReturns, type intersectParameters, type intersectUnion, intersectUniqueLists, invert, isArray, type isDisjoint, isDotAccessible, isEmptyObject, isKeyOf, isNumericString, type isSafelyMappable, type isStringLiteral, isThunk, isWellFormedInteger, isWellFormedNumber, isomorphic, join, jsTypeOfDescriptions, type keyOf, type keySetOf, type keyWithValue, keysOf, type lastChar, type lastIndexOf, type lastOf, lazily, type leftIfEqual, liftArray, type listable, type longerThan, type merge, type mutable, narrow, nearestFloat, noSuggest, type normalizedKeyOf, numberLikeMatcher, type numericStringKeyOf, numericStringMatcher, objectKindDescriptions, objectKindOf, objectKindOrDomainOf, omit, type optionalKeyOf, type overlaps, type overloadOf, type override, type parseInteger, type parseNonNegativeInteger, type parseNumber, type pathToString, pick, platformConstructors, platformDescriptions, print, printable, type promisable, type propValueOf, type propertyDescriptorsOf, type propwiseXor, range, register, registry, type require, type requireKeys, type requiredKeyOf, type satisfy, serializePrimitive, type setIndex, shallowClone, type show, snapshot, splitByKeys, spliterate, stringAndSymbolicEntriesOf, stringifyPath, type stringifyUnion, type tailOf, throwError, throwInternalError, throwParseError, type thunkable, type toArkKey, type trim, type trimEnd, type trimStart, tryCatch, tryParseInteger, tryParseNumber, tryParseWellFormedBigint, tryParseWellFormedNumber, type typeToString, typedArrayConstructors, typedArrayDescriptions, type unbrand, uncapitalize, type unionKeyOf, type unionToPropwiseXor, type unionToTuple, unset, type validateExhaustiveKeys, wellFormedIntegerMatcher, wellFormedNumberMatcher, whitespaceChars, type widen, withAlphabetizedKeys, type withJsDoc, type writeInvalidKeysMessage, writeMalformedNumericLiteralMessage, writeUnclosedGroupMessage, writeUnmatchedGroupCloseMessage };\n\n}" +export const utilDts = "declare module \"@ark/util\" {\n import * as buffer from 'buffer';\n\ntype Fn = (...args: args) => returns;\ndeclare const cached: (thunk: () => t) => (() => t);\ndeclare const isThunk: (value: value) => value is Extract extends never ? value & Thunk : Extract;\ntype Thunk = () => ret;\ntype thunkable = t | Thunk;\ndeclare const tryCatch: (fn: () => returns, onError?: (e: unknown) => onError) => returns | onError;\ndeclare const DynamicFunction: DynamicFunction;\ntype DynamicFunction = new (...args: ConstructorParameters) => fn & {\n apply(thisArg: null, args: Parameters): ReturnType;\n call(thisArg: null, ...args: Parameters): ReturnType;\n};\ntype CallableOptions = {\n attach?: attachments;\n bind?: object;\n};\n/** @ts-ignore required to cast function type */\ninterface Callable extends fn, attachments {\n}\ndeclare class Callable {\n constructor(fn: fn, ...[opts]: {} extends attachments ? [opts?: CallableOptions] : [opts: CallableOptions]);\n}\ntype GuardablePredicate = ((In: input) => In is narrowed) | ((In: input) => boolean);\ntype TypeGuard = (In: input) => In is narrowed;\n/**\n * Checks if the environment has Content Security Policy (CSP) enabled,\n * preventing JIT-optimized code from being compiled via new Function().\n *\n * @returns `true` if a function created using new Function() can be\n * successfully invoked in the environment, `false` otherwise.\n *\n * The result is cached for subsequent invocations.\n */\ndeclare const envHasCsp: () => boolean;\n\ndeclare const ecmascriptConstructors: {\n Array: ArrayConstructor;\n Boolean: BooleanConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Number: NumberConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n String: StringConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype ecmascriptConstructors = typeof ecmascriptConstructors;\ntype EcmascriptObjects = satisfy, {\n Array: Array;\n Boolean: Boolean;\n Date: Date;\n Error: Error;\n Function: Function;\n Map: Map;\n Number: Number;\n RegExp: RegExp;\n Set: Set;\n String: String;\n WeakMap: WeakMap;\n WeakSet: WeakSet;\n Promise: Promise;\n}>;\n/** Node18 */\ndeclare const FileConstructor: typeof buffer.File;\ntype platformConstructors = {\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n};\ndeclare const platformConstructors: platformConstructors;\ntype PlatformObjects = instantiateConstructors;\ndeclare const typedArrayConstructors: {\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n};\ntype typedArrayConstructors = typeof typedArrayConstructors;\ntype TypedArrayObjects = instantiateConstructors;\ndeclare const builtinConstructors: {\n String: StringConstructor;\n Number: NumberConstructor;\n Boolean: BooleanConstructor;\n Int8Array: Int8ArrayConstructor;\n Uint8Array: Uint8ArrayConstructor;\n Uint8ClampedArray: Uint8ClampedArrayConstructor;\n Int16Array: Int16ArrayConstructor;\n Uint16Array: Uint16ArrayConstructor;\n Int32Array: Int32ArrayConstructor;\n Uint32Array: Uint32ArrayConstructor;\n Float32Array: Float32ArrayConstructor;\n Float64Array: Float64ArrayConstructor;\n BigInt64Array: BigInt64ArrayConstructor;\n BigUint64Array: BigUint64ArrayConstructor;\n ArrayBuffer: ArrayBufferConstructor;\n Blob: typeof Blob;\n File: typeof File;\n FormData: typeof FormData;\n Headers: typeof Headers;\n Request: typeof Request;\n Response: typeof Response;\n URL: typeof URL;\n Array: ArrayConstructor;\n Date: DateConstructor;\n Error: ErrorConstructor;\n Function: FunctionConstructor;\n Map: MapConstructor;\n Promise: PromiseConstructor;\n RegExp: RegExpConstructor;\n Set: SetConstructor;\n WeakMap: WeakMapConstructor;\n WeakSet: WeakSetConstructor;\n};\ntype builtinConstructors = typeof builtinConstructors;\ntype BuiltinObjectKind = keyof builtinConstructors;\ntype GlobalName = keyof typeof globalThis;\ntype instantiateConstructors = {\n [k in kind]: k extends GlobalName ? InstanceType<(typeof globalThis)[k]> : `${k}Constructor` extends GlobalName ? InstanceType<(typeof globalThis)[`${k}Constructor`]> : never;\n};\ntype BuiltinObjects = instantiateConstructors;\ntype describeObject = objectKindOf extends string ? [\n opts[\"includeArticles\"]\n] extends [true] ? objectKindDescriptions[objectKindOf] : objectKindOf : [opts[\"includeArticles\"]] extends [true] ? domainDescriptions[\"object\"] : \"object\";\ntype instantiableObjectKind = {\n [kind in keyof builtinConstructors]: data extends (InstanceType) ? kind : never;\n}[keyof builtinConstructors];\ntype objectKindOf = object extends data ? keyof builtinConstructors | undefined : data extends Fn ? \"Function\" : instantiableObjectKind extends never ? undefined : instantiableObjectKind;\ndeclare const objectKindOf: (data: data) => objectKindOf | undefined;\ndeclare const objectKindOrDomainOf: (data: data) => (objectKindOf & {}) | domainOf;\ntype objectKindOrDomainOf = data extends object ? objectKindOf extends undefined ? \"object\" : objectKindOf : domainOf;\ndeclare const hasObjectKind: (data: object, kind: kind) => data is InstanceType;\ndeclare const isArray: (data: unknown) => data is readonly unknown[];\ndeclare const ecmascriptDescriptions: {\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ndeclare const platformDescriptions: {\n ArrayBuffer: string;\n Blob: string;\n File: string;\n FormData: string;\n Headers: string;\n Request: string;\n Response: string;\n URL: string;\n};\ndeclare const typedArrayDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n};\n/** Each defaultObjectKind's completion for the phrase \"must be _____\" */\ndeclare const objectKindDescriptions: {\n readonly Int8Array: \"an Int8Array\";\n readonly Uint8Array: \"a Uint8Array\";\n readonly Uint8ClampedArray: \"a Uint8ClampedArray\";\n readonly Int16Array: \"an Int16Array\";\n readonly Uint16Array: \"a Uint16Array\";\n readonly Int32Array: \"an Int32Array\";\n readonly Uint32Array: \"a Uint32Array\";\n readonly Float32Array: \"a Float32Array\";\n readonly Float64Array: \"a Float64Array\";\n readonly BigInt64Array: \"a BigInt64Array\";\n readonly BigUint64Array: \"a BigUint64Array\";\n readonly ArrayBuffer: string;\n readonly Blob: string;\n readonly File: string;\n readonly FormData: string;\n readonly Headers: string;\n readonly Request: string;\n readonly Response: string;\n readonly URL: string;\n readonly Array: \"an array\";\n readonly Function: \"a function\";\n readonly Date: \"a Date\";\n readonly RegExp: \"a RegExp\";\n readonly Error: \"an Error\";\n readonly Map: \"a Map\";\n readonly Set: \"a Set\";\n readonly String: \"a String object\";\n readonly Number: \"a Number object\";\n readonly Boolean: \"a Boolean object\";\n readonly Promise: \"a Promise\";\n readonly WeakMap: \"a WeakMap\";\n readonly WeakSet: \"a WeakSet\";\n};\ntype objectKindDescriptions = typeof objectKindDescriptions;\n/**\n * this will only return an object kind if it's the root constructor\n * example TypeError would return null not 'Error'\n **/\ndeclare const getBuiltinNameOfConstructor: (ctor: Function) => BuiltinObjectKind | null;\ntype Constructor = abstract new (...args: never[]) => instance;\ntype instanceOf = constructor extends Constructor ? instance : never;\n/**\n * Returns an array of constructors for all ancestors (i.e., prototypes) of a given object.\n */\ndeclare const ancestorsOf: (o: object) => Function[];\ntype normalizedKeyOf = keyof t extends infer k ? k extends number ? `${k}` : k : never;\ndeclare const constructorExtends: (ctor: Constructor, base: Constructor) => boolean;\n\ntype stringifyUnion = join, delimiter>;\ntype unionToTuple = _unionToTuple extends infer result ? conform : never;\ntype _unionToTuple = getLastBranch extends infer current ? [\n t\n] extends [never] ? result : _unionToTuple, [current, ...result]> : never;\ntype getLastBranch = intersectUnion void : never> extends ((x: infer branch) => void) ? branch : never;\ntype intersectUnion = (t extends unknown ? (_: t) => void : never) extends ((_: infer intersection) => void) ? intersection : never;\ntype intersectOverloadReturns = intersectUnion>>;\ntype overloadOf = Exclude never) & fn, givenArgs, unknown>, fn extends () => never ? never : () => never>;\ntype collectSignatures = result & fn extends (...args: infer args) => infer returns ? result extends fn ? never : collectSignatures & result & ((...args: args) => returns)> | (args extends givenArgs ? (...args: args) => returns : never) : never;\n\ntype DescribeOptions = {\n includeArticles?: boolean;\n branchDelimiter?: string;\n};\ntype typeToString = stringifyUnion<[\n t\n] extends [anyOrNever] ? unknown extends t ? \"any\" : \"never\" : unknown extends t ? \"unknown\" : boolean extends t ? \"boolean\" | ([t] extends [boolean] ? never : typeToString, opts>) : t extends array ? arrayTypeToString : t extends object ? describeObject : t extends Stringifiable ? stringifiableToString : describeDomainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\ntype stringifiableToString = inferDomain> extends t ? describeDomainOf : `${t}`;\ntype describe = typeToString;\ntype arrayTypeToString = typeToString extends infer element extends string ? opts[\"includeArticles\"] extends true ? describeArrayOf : includesDelimiter extends true ? `(${element})[]` : `${element}[]` : never;\ntype describeArrayOf = element extends \"unknown\" ? \"an array\" : `an array of ${element}`;\ntype includesDelimiter = s extends (`${string}${opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]}${string}`) ? true : false;\ntype describeDefaults = satisfy, {\n includeArticles: false;\n branchDelimiter: \" | \";\n}>;\n\ntype JsTypeOf = \"object\" | \"function\" | \"number\" | \"bigint\" | \"boolean\" | \"string\" | \"symbol\" | \"undefined\" | \"null\";\ndeclare const hasDomain: (data: data, kind: domain) => data is data & inferDomain;\ntype TypesByDomain = {\n bigint: bigint;\n boolean: boolean;\n number: number;\n object: object;\n string: string;\n symbol: symbol;\n undefined: undefined;\n null: null;\n};\ntype inferDomain = Domain extends kind ? unknown : TypesByDomain[kind];\ntype Domain = show;\ntype NullishDomain = \"undefined\" | \"null\";\ntype NonNullishDomain = Exclude;\ntype PrimitiveDomain = Exclude;\ntype Primitive = inferDomain;\ntype domainOf = unknown extends data ? Domain : data extends object ? \"object\" : data extends string ? \"string\" : data extends number ? \"number\" : data extends boolean ? \"boolean\" : data extends undefined ? \"undefined\" : data extends null ? \"null\" : data extends bigint ? \"bigint\" : data extends symbol ? \"symbol\" : never;\ndeclare const domainOf: (data: data) => domainOf;\ndeclare const jsTypeOfDescriptions: {\n readonly function: \"a function\";\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\n/** Each domain's completion for the phrase \"must be _____\" */\ndeclare const domainDescriptions: {\n readonly boolean: \"boolean\";\n readonly null: \"null\";\n readonly undefined: \"undefined\";\n readonly bigint: \"a bigint\";\n readonly number: \"a number\";\n readonly object: \"an object\";\n readonly string: \"a string\";\n readonly symbol: \"a symbol\";\n};\ntype domainDescriptions = typeof domainDescriptions;\ntype describeDomainOf = stringifyUnion] : domainOf, opts[\"branchDelimiter\"] extends string ? opts[\"branchDelimiter\"] : describeDefaults[\"branchDelimiter\"]>;\n\ntype Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype NumberLiteral = `${n}`;\ntype BigintLiteral = `${n}n`;\ntype IntegerLiteral = `${n}`;\ntype NonNegativeIntegerLiteral = `${Digit}` | (`${Exclude}${string}` & `${n}`);\n/**\n * Matches a well-formatted numeric expression according to the following rules:\n * 1. Must include an integer portion (i.e. '.321' must be written as '0.321')\n * 2. The first digit of the value must not be 0, unless the entire integer portion is 0\n * 3. If the value includes a decimal, its last digit may not be 0\n * 4. The value may not be \"-0\"\n */\ndeclare const wellFormedNumberMatcher: RegExp;\ndeclare const isWellFormedNumber: RegExp[\"test\"];\n/**\n * Similar to wellFormedNumber but more permissive in the following ways:\n *\n * - Allows numbers without an integer portion like \".5\" (well-formed equivalent is \"0.5\")\n * - Allows decimals with trailing zeroes like \"0.10\" (well-formed equivalent is \"0.1\")\n */\ndeclare const numericStringMatcher: RegExp;\ndeclare const isNumericString: (string: string) => boolean;\ndeclare const numberLikeMatcher: RegExp;\n/**\n * Matches a well-formatted integer according to the following rules:\n * 1. must begin with an integer, the first digit of which cannot be 0 unless the entire value is 0\n * 2. The value may not be \"-0\"\n */\ndeclare const wellFormedIntegerMatcher: RegExp;\ndeclare const isWellFormedInteger: RegExp[\"test\"];\ndeclare const integerLikeMatcher: RegExp;\ntype NumericLiteralKind = \"number\" | \"bigint\" | \"integer\";\ndeclare const numericLiteralDescriptions: {\n readonly number: \"a number\";\n readonly bigint: \"a bigint\";\n readonly integer: \"an integer\";\n};\ntype numericLiteralDescriptions = typeof numericLiteralDescriptions;\ntype writeMalformedNumericLiteralMessage = `'${def}' was parsed as ${numericLiteralDescriptions[kind]} but could not be narrowed to a literal value. Avoid unnecessary leading or trailing zeros and other abnormal notation`;\ndeclare const writeMalformedNumericLiteralMessage: (def: def, kind: kind) => writeMalformedNumericLiteralMessage;\ndeclare const tryParseWellFormedNumber: typeof tryParseNumber;\ndeclare const tryParseNumber: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseNumber = token extends `${infer n extends number}` ? number extends n ? writeMalformedNumericLiteralMessage : n : messageOnFail;\ntype parseNumber = token extends `${infer n extends number}` ? n : never;\ndeclare const tryParseInteger: (token: string, options?: NumericParseOptions) => errorOnFail extends true | string ? number : number | undefined;\ntype tryParseInteger = token extends `${infer b extends bigint}` ? bigint extends b ? writeMalformedNumericLiteralMessage : token extends `${infer n extends number}` ? n : never : messageOnFail;\ntype parseInteger = token extends `${bigint}` ? token extends `${infer n extends number}` ? n : never : never;\ntype parseNonNegativeInteger = token extends `-${string}` ? never : parseInteger;\ntype NumericParseOptions = {\n errorOnFail?: errorOnFail;\n strict?: boolean;\n};\ndeclare const tryParseWellFormedBigint: (def: string) => bigint | undefined;\n/**\n * Returns the next or previous representable floating-point number after the given input.\n *\n * @param {\"+\" | \"-\"} [direction=\"+\"] - The direction to find the nearest float. \"+\" for the next float, \"-\" for the previous float.\n * @throws {Error} If the input is not a finite number.\n *\n * @example\n * console.log(nearestFloat(0)); // Smallest positive number\n * console.log(nearestFloat(2)); // 2.0000000000000004\n * console.log(nearestFloat(2.1)); // 2.1000000000000005\n * console.log(nearestFloat(2, \"-\")); // 1.9999999999999998\n * console.log(nearestFloat(2.1, \"-\")); // 2.0999999999999996\n * // as size of input increases, the increments become larger to stay within what\n * // JS can represent in a numeric value\n * console.log(nearestFloat(5555555555555555)); // 5555555555555556\n * console.log(nearestFloat(5555555555555555, \"-\")); // 5555555555555554\n */\ndeclare const nearestFloat: (n: number, direction?: \"+\" | \"-\") => number;\n\ntype Key = string | symbol;\ntype toArkKey = k extends number ? [\n o,\n number\n] extends [array, k] ? NonNegativeIntegerLiteral : `${k}` : k;\ntype arkIndexableOf = arkKeyOf extends infer k ? k extends `${infer index extends number}` ? index | k : k : never;\ntype arkKeyOf = [\n o\n] extends [object] ? [\n o\n] extends [array] ? arkArrayKeyOf : arkObjectLiteralKeyOf : never;\ntype arkArrayKeyOf = number extends a[\"length\"] ? NonNegativeIntegerLiteral : keyof a extends infer i ? i extends `${number}` ? i : never : never;\ntype arkObjectLiteralKeyOf = keyof o extends infer k ? k extends number ? `${k}` : k : never;\ntype arkGet> = o[k extends keyof o ? k : NonNegativeIntegerLiteral extends k ? number & keyof o : k extends number ? `${k}` & keyof o : never];\ntype writeInvalidKeysMessage> = `Key${keys[\"length\"] extends 1 ? \"\" : \"s\"} ${join} ${keys[\"length\"] extends 1 ? \"does\" : \"do\"} not exist on ${o}`;\n\ntype Dict = {\n readonly [_ in k]: v;\n};\ntype dict = {\n [_ in k]: v;\n};\n/** Either:\n * A, with all properties of B undefined\n * OR\n * B, with all properties of A undefined\n **/\ntype propwiseXor = show | show;\ntype unionToPropwiseXor> = props extends infer distributed ? show : never;\ntype requireKeys = o & {\n [requiredKey in key]-?: defined;\n};\ntype require = _require;\ntype _require = depth[\"length\"] extends maxDepth ? o : o extends object ? o extends Fn ? o : {\n [k in keyof o]-?: _require;\n} : o;\ntype PartialRecord = {\n [_ in k]?: v;\n};\n/** Returns true if a type can be homomorphically mapped without losing information.\n * Useful for avoiding e.g. classes with private properties while mapping.\n */\ntype isSafelyMappable = {\n [k in keyof t]: t[k];\n} extends t ? true : false;\ntype KeySet = {\n readonly [_ in key]?: 1;\n};\ntype keySetOf = KeySet>;\ntype mutable = _mutable;\ntype _mutable = depth[\"length\"] extends maxDepth ? o : o extends Primitive ? o : o extends Fn ? o : {\n -readonly [k in keyof o]: _mutable;\n};\n/**\n * extracts entries mimicking Object.entries, accounting for whether the\n * object is an array\n **/\ntype entryOf = {\n [k in keyof o]-?: [k, o[k] & ({} | null)];\n}[o extends readonly unknown[] ? keyof o & number : keyof o] & unknown;\ntype entriesOf = entryOf[];\n/**\n * Object.entries wrapper providing narrowed types for objects with known sets\n * of keys, e.g. those defined internally as configs\n */\ndeclare const entriesOf: (o: o) => entryOf[];\ntype Entry = readonly [key: key, value: value];\ntype fromEntries = show<{\n [entry in entries[number] as entry[0]]: entry[1];\n}>;\ndeclare const fromEntries: (entries: entries) => fromEntries;\n/** Mimics the result of Object.keys(...) */\ntype keyOf = o extends array ? number extends o[\"length\"] ? `${number}` : keyof o & `${number}` : keyof o extends infer k ? k extends string ? k : k extends number ? `${k}` : never : never;\ndeclare const keysOf: (o: o) => keyOf[];\ndeclare const isKeyOf: (k: k, o: o) => k is Extract;\n/** Coalesce keys that exist on one or more branches of a union */\ntype unionKeyOf = t extends unknown ? keyof t : never;\ntype extractKeyed> = Extract;\ndeclare const hasKey: >(o: o, k: k) => o is extractKeyed;\ntype extractDefinedKey> = show & {\n [_ in k]: {} | null;\n}>;\ndeclare const hasDefinedKey: >(o: o, k: k) => o is extractDefinedKey;\ntype requiredKeyOf = keyof o extends infer k ? k extends keyof o ? o extends {\n [_ in k]-?: o[k];\n} ? k : never : never : never;\ntype optionalKeyOf = Exclude>;\ntype merge = base extends unknown ? props extends unknown ? keyof base & keyof props extends never ? show : show & props> : never : never;\ntype override = merge;\ntype propValueOf = o[keyof o];\ndeclare const InnerDynamicBase: new (base: t) => t;\n/** @ts-ignore (needed to extend `t`) **/\ninterface DynamicBase extends t {\n}\ndeclare class DynamicBase {\n constructor(properties: t);\n}\ndeclare const NoopBase: new () => t;\n/** @ts-ignore (needed to extend `t`) **/\ndeclare class CastableBase extends NoopBase {\n}\ndeclare const splitByKeys: >(o: o, leftKeys: leftKeys) => [show>, show>];\n/** Homomorphic implementation of the builtin Pick.\n *\n * Gives different results for certain union expressions like the following:\n *\n * @example\n * // flattens result to { a?: 1 | 2; b?: 1 | 2 }\n * type PickResult = Pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type pickResult = pick<{ a: 1; b?: 1 } | { a?: 2; b: 2 }, \"a\" | \"b\">\n */\ntype pick = o extends unknown ? {\n [k in keyof o as k extends key ? k : never]: o[k];\n} : never;\ndeclare const pick: >(o: o, keys: keys) => pick;\n/** Homomorphic implementation of the builtin Omit.\n *\n * Gives different results for many union expressions like the following:\n *\n * @example\n * // {}\n * type OmitResult = Omit<{ a: 1 } | { b: 2 }, never>\n *\n * @example\n * // preserves original type w/ modifier groupings\n * type omitResult = omit<{ a: 1 } | { b: 2 }, never>\n */\ntype omit = {\n [k in keyof o as k extends key ? never : k]: o[k];\n};\ndeclare const omit: >(o: o, keys: keys) => omit;\n/** Returns onTrue if the type is exactly `{}` and onFalse otherwise*/\ntype ifEmptyObjectLiteral = [\n unknown,\n t & (null | undefined)\n] extends [t | null | undefined, never] ? onTrue : onFalse;\ntype EmptyObject = Record;\ndeclare const isEmptyObject: (o: object) => o is EmptyObject;\ndeclare const stringAndSymbolicEntriesOf: (o: object) => Entry[];\n/** Like Object.assign, but it will preserve getters instead of evaluating them. */\ndeclare const defineProperties: (base: base, merged: merged) => merge;\n/** Copies enumerable keys of o to a new object in alphabetical order */\ndeclare const withAlphabetizedKeys: (o: o) => o;\ntype invert> = {\n [k in t[keyof t]]: {\n [k2 in keyof t]: t[k2] extends k ? k2 : never;\n }[keyof t];\n} & unknown;\ndeclare const invert: >(t: t) => invert;\ndeclare const unset: \" unset​\";\ntype unset = typeof unset;\n/**\n * For each keyof o that also exists on jsDocSource, add associated JsDoc annotations to o.\n * Does not preserve modifiers on o like optionality.\n */\ntype withJsDoc = show : Pick<_withJsDoc, keyof o & keyof jsDocSource> : Pick<_withJsDoc, keyof o & keyof jsDocSource> & {\n [k in Exclude]: o[k];\n}>;\ntype _withJsDoc = {\n [k in keyof jsDocSource]-?: o[k & keyof o];\n};\ntype propertyDescriptorsOf = {\n [k in keyof o]: TypedPropertyDescriptor;\n};\ntype keyWithValue = keyof t extends infer k ? k extends keyof t ? t[k] extends constraint ? k : never : never : never;\ndeclare const enumValues: (tsEnum: tsEnum) => tsEnum[keyof tsEnum][];\n\ndeclare class InternalArktypeError extends Error {\n}\ndeclare const throwInternalError: (message: string) => never;\ndeclare const throwError: (message: string, ctor?: new (message: string) => Error) => never;\ndeclare class ParseError extends Error {\n readonly name = \"ParseError\";\n}\ndeclare const throwParseError: (message: string) => never;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ndeclare const noSuggest: (s: s) => noSuggest;\n/**\n * TypeScript won't suggest strings beginning with a space as properties.\n * Useful for symbol-like string properties.\n */\ntype noSuggest = ` ${s}`;\n/** Unrendered character (U+200B) used to mark a string type */\ndeclare const ZeroWidthSpace = \"\\u200B\";\n/** Unrendered character (U+200B) used to mark a string type */\ntype ZeroWidthSpace = typeof ZeroWidthSpace;\ntype ErrorMessage = `${message}${ZeroWidthSpace}`;\ninterface ErrorType extends CastableBase {\n [brand]: \"ErrorType\";\n}\ntype Completion = `${text}${ZeroWidthSpace}${ZeroWidthSpace}`;\n\ntype Stringifiable = string | boolean | number | bigint | null | undefined;\n/** Force an operation like `{ a: 0 } & { b: 1 }` to be computed so that it displays `{ a: 0; b: 1 }`. */\ntype show = {\n [k in keyof t]: t[k];\n} & unknown;\n/** @deprecated use \"show\" instead */\ntype evaluate = {\n [k in keyof t]: t[k];\n} & unknown;\ntype get = t[k & keyof t];\ntype exact = {\n [k in keyof t]: k extends keyof u ? conform : never;\n};\ntype exactMessageOnError = {\n [k in keyof t]: k extends keyof u ? conform : ErrorMessage<`'${k & string}' is not a valid key`>;\n} & u;\ntype promisable = t | Promise;\ntype leftIfEqual = [l, r] extends [r, l] ? l : r;\ntype UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined;\n/**\n * Interesection (`&`) that avoids evaluating `unknown` to `{}`\n */\ntype andPreserveUnknown = unknown extends l & r ? unknown : show;\n/** Can be used to test for the universal subtypes, `any` and `never`, e.g.:\n *\n * ```ts\n * type isAnyOrNever = [t] extends [anyOrNever] ? true : false\n * ```\n *\n * The actual value is a string literal, but the only realistic subtypes\n * of that literal are `any` and `never`.\n */\ntype anyOrNever = \" anyOrNever\";\ntype conform = t extends base ? t : base;\ntype equals = [l, r] extends [r, l] ? true : false;\ntype exactEquals = (<_>() => _ extends l ? 1 : 2) extends <_>() => _ extends r ? 1 : 2 ? true : false;\ndeclare const brand: \" brand\";\ntype Brand = t & {\n readonly [brand]: [t, id];\n};\ntype unbrand = t extends Brand ? base : never;\ntype satisfy = t;\ntype defined = t & ({} | null);\ntype autocomplete = suggestions | (string & {});\ntype widen = collectWidenedType>;\ntype collectWidenedType = remaining extends [infer head, ...infer tail] ? collectWidenedType : result;\ntype narrowTuple = t extends readonly [infer head, ...infer tail] ? readonly [head, ...narrowTuple] : [];\ntype narrow = t extends Primitive ? t : t extends readonly unknown[] ? narrowTuple : {\n [k in keyof t]: narrow;\n};\ndeclare const narrow: (t: narrow) => t;\n/** primitive key used to represent an inferred type at compile-time */\ndeclare const inferred: \" arkInferred\";\n/** primitive key used to represent an inferred type at compile-time */\ntype inferred = typeof inferred;\n\ndeclare const args: \" args\";\ntype args = typeof args;\ndeclare abstract class Hkt {\n [args]: unknown[];\n constraints: constraints;\n args: this[args] extends infer args extends unknown[] ? args : never;\n 0: this[args] extends [infer arg, ...any] ? arg : never;\n 1: this[args] extends [any, infer arg, ...any] ? arg : never;\n 2: this[args] extends [any, any, infer arg, ...any] ? arg : never;\n 3: this[args] extends [any, any, any, infer arg, ...any] ? arg : never;\n abstract body: unknown;\n description?: string;\n constructor();\n}\n/** A small set of HKT utility types based on https://github.com/gvergnaud/hotscript\n * See https://github.com/gvergnaud/hotscript/blob/main/src/internals/core/Core.ts\n */\ndeclare namespace Hkt {\n type constructor = new () => Hkt;\n type args = typeof args;\n type apply = (hkt & {\n [args]: args;\n })[\"body\"];\n}\n\ninterface AndPreserveUnknown extends Hkt<[unknown, unknown]> {\n body: andPreserveUnknown;\n}\ntype SequenceIntersectionKind = \"array\" | \"parameters\";\ntype intersectArrays = intersectSequences;\ntype intersectParameters = intersectSequences;\ntype intersectSequences = l extends readonly [] ? kind extends \"array\" ? [\n] extends r ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...r, ...postfix] : r extends readonly [] ? kind extends \"array\" ? [\n] extends l ? [\n ...acc,\n ...postfix\n] : never : [...acc, ...l, ...postfix] : [\n l,\n r\n] extends ([\n readonly [(infer lHead)?, ...infer lTail],\n readonly [(infer rHead)?, ...infer rTail]\n]) ? [\n \"0\",\n lHead,\n rHead\n] extends [keyof l | keyof r, l[0], r[0]] ? intersectSequences?\n] : [...acc, Hkt.apply], postfix, operation, kind> : l extends readonly [...infer lInit, infer lLast] ? r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : intersectSequences,\n ...postfix\n], operation, kind> : r extends readonly [...infer rInit, infer rLast] ? intersectSequences,\n ...postfix\n], operation, kind> : [...acc, ...Hkt.apply[], ...postfix] : never;\ntype isDisjoint = overlaps extends true ? false : true;\ntype overlaps = l & r extends never ? false : domainOf & domainOf extends never ? false : [l, r] extends [object, object] ? false extends (propValueOf<{\n [k in Extract | requiredKeyOf>]: overlaps;\n}>) ? false : true : true;\n\ntype DuplicateData = {\n element: val;\n indices: number[];\n};\n/**\n * Extracts duplicated elements and their indices from an array, returning them.\n *\n * Note that given `a === b && b === c`, then `c === a` must be `true` for this to give accurate results.\n *\n * @param arr The array to extract duplicate elements from.\n */ declare const getDuplicatesOf: (arr: arr, opts?: ComparisonOptions) => DuplicateData[];\ntype pathToString = segments extends [] ? \"/\" : join;\ndeclare const join: , delimiter extends string>(segments: segments, delimiter: delimiter) => join;\ntype join, delimiter extends string, result extends string = \"\"> = segments extends (readonly [infer head extends string, ...infer tail extends string[]]) ? join : result;\ndeclare const getPath: (root: unknown, path: string[]) => unknown;\ndeclare const intersectUniqueLists: (l: readonly item[], r: readonly item[]) => item[];\ntype filter = t extends readonly [infer head, ...infer tail] ? filter : result;\ntype array = readonly t[];\ndeclare namespace array {\n type multiply = _multiply;\n type _multiply = i[\"length\"] extends count ? result : _multiply;\n type repeat = buildFromSegments, count>;\n type buildFromSegments = next[\"length\"] extends count ? {\n [i in keyof next]: element;\n } : `${count}` extends keyof next ? buildFromSegments, count> : buildFromSegments, count>;\n type nextSegments = segments extends [unknown, ...infer nextSegments extends 1[][]] ? nextSegments : never;\n type minLength = readonly [\n ...multiply<[element], minLength>,\n ...element[]\n ];\n}\ntype listable = t | readonly t[];\ntype flattenListable = t extends array ? element : t;\ntype longerThan = `${n}` extends keyof t ? true : false;\ntype CollapsingList = readonly [] | t | readonly [t, t, ...t[]];\ntype headOf = t[0];\ntype tailOf = t extends readonly [unknown, ...infer tail] ? tail : never;\ntype lastIndexOf = tailOf[\"length\"];\ntype lastOf = t[lastIndexOf];\ntype initOf = t extends readonly [...infer init, unknown] ? init : never;\ntype numericStringKeyOf = Extract;\ntype arrayIndexOf = keyof a extends infer k ? parseNonNegativeInteger : never;\ntype liftArray = t extends array ? [\n t\n] extends [anyOrNever] ? t[] : t : t[];\ndeclare const liftArray: (data: t) => liftArray;\n/**\n * Splits an array into two arrays based on the result of a predicate\n *\n * @param predicate - The guard function used to determine which items to include.\n * @returns A tuple containing two arrays:\n * \t\t\t\t- the first includes items for which `predicate` returns true\n * \t\t\t\t- the second includes items for which `predicate` returns false\n *\n * @example\n * const list = [1, \"2\", \"3\", 4, 5];\n * const [numbers, strings] = spliterate(list, (x) => typeof x === \"number\");\n * // Type: number[]\n * // Output: [1, 4, 5]\n * console.log(evens);\n * // Type: string[]\n * // Output: [\"2\", \"3\"]\n * console.log(odds);\n */\ndeclare const spliterate: (arr: readonly item[], predicate: GuardablePredicate) => [included: included[], excluded: [item] extends [included] ? item[] : Exclude[]];\ndeclare const ReadonlyArray: new (...args: ConstructorParameters>) => ReadonlyArray;\ndeclare const includes: (array: a, element: unknown) => element is a[number];\ndeclare const range: (length: number, offset?: number) => number[];\ntype AppendOptions = {\n /** If true, adds the element to the beginning of the array instead of the end */\n prepend?: boolean;\n};\n/**\n * Adds a value or array to an array, returning the concatenated result\n */\ndeclare const append: >(to: to, value: value, opts?: AppendOptions) => to & {};\ntype appendableValue = to extends array ? element extends array ? array : listable : never;\n/**\n * Concatenates an element or list with a readonly list\n */\ndeclare const conflatenate: (to: readonly element[] | undefined | null, elementOrList: appendableValue | undefined | null) => readonly element[];\n/**\n * Concatenates a variadic list of elements or lists with a readonly list\n */\ndeclare const conflatenateAll: (...elementsOrLists: (listable | undefined | null)[]) => readonly element[];\ninterface ComparisonOptions {\n isEqual?: (l: t, r: t) => boolean;\n}\n/**\n * Appends a value or concatenates an array to an array if it is not already included, returning the array\n */\ndeclare const appendUnique: (to: to | undefined, value: NoInfer | to[number]>, opts?: ComparisonOptions) => to;\ntype groupableKeyOf = keyof o extends infer k ? k extends keyof o ? o[k] extends PropertyKey ? k : never : never : never;\ntype groupBy> = {\n [k in element[discriminant] & PropertyKey]?: (element extends unknown ? isDisjoint extends true ? never : element : never)[];\n} & unknown;\ndeclare const groupBy: >(array: readonly element[], discriminant: discriminant) => groupBy;\ndeclare const arrayEquals: (l: array, r: array, opts?: ComparisonOptions) => boolean;\ntype validateExhaustiveKeys = keys extends readonly [infer head, ...infer tail extends PropertyKey[]] ? readonly [\n conform,\n ...validateExhaustiveKeys>\n] : [expectedKey] extends [never] ? [] : [expectedKey];\ntype applyElementLabels = labels extends [unknown, ...infer labelsTail] ? t extends readonly [infer head, ...infer tail] ? readonly [\n ...labelElement,\n ...applyElementLabels\n] : applyOptionalElementLabels, labels> : t;\ntype applyOptionalElementLabels = labels extends readonly [unknown, ...infer labelsTail] ? t extends readonly [infer head, ...infer tail] ? [\n ...labelOptionalElement,\n ...applyOptionalElementLabels\n] : applyRestElementLabels : t;\ntype applyRestElementLabels = t extends readonly [] ? [] : labels extends readonly [unknown, ...infer tail] ? [\n ...labelOptionalElement,\n ...applyRestElementLabels\n] : t;\ntype labelElement = labels extends readonly [unknown] ? {\n [K in keyof labels]: element;\n} : labels extends readonly [...infer head, unknown] ? labelElement : [_: element];\ntype labelOptionalElement = label extends readonly [unknown] ? {\n [K in keyof label]?: element;\n} : label extends readonly [...infer head, unknown] ? labelOptionalElement : [_?: element];\ntype setIndex = arr extends arr[number][] ? _setIndex : Readonly<_setIndex>;\ntype _setIndex = arr extends readonly [infer head, ...infer tail] ? _setIndex : result;\ntype zero = [];\ntype one = [1];\ntype two = [1, 1];\ntype three = [...two, ...two];\ntype four = [...three, ...three];\ntype five = [...four, ...four];\ntype six = [...five, ...five];\ntype seven = [...six, ...six];\ntype eight = [...seven, ...seven];\ntype nine = [...eight, ...eight];\ntype ten = [...nine, ...nine];\ntype eleven = [...ten, ...ten];\ntype twelve = [...eleven, ...eleven];\ntype thirteen = [...twelve, ...twelve];\ntype fourteen = [...thirteen, ...thirteen];\ntype exponentials = [\n fourteen,\n thirteen,\n twelve,\n eleven,\n ten,\n nine,\n eight,\n seven,\n six,\n five,\n four,\n three,\n two,\n one,\n zero\n];\ndeclare namespace exponentials {\n type max = _max;\n type _max = `${n}` extends keyof filtered[0] ? _max> : filtered;\n}\n\n/** Shallowly copy the properties of the object. */\ndeclare const shallowClone: (input: input) => input;\n/** Deeply copy the properties of the a non-subclassed Object, Array or Date.*/\ndeclare const deepClone: (input: input) => input;\n\ntype objectFromListableEntries = show>>;\ntype fromGroupableEntries = {\n [entry in entries[number] as entry extends GroupedEntry ? entry[0][\"group\"] : conform]: entry extends GroupedEntry ? entry[1][] : entry[1];\n};\ntype arrayFromListableEntries = Entry extends transformed ? transformed[1][] : _arrayFromListableEntries;\ntype _arrayFromListableEntries = [\n transformed\n] extends [never] ? result : Extract> extends (infer next extends Entry) ? Exclude extends infer remaining extends Entry ? [\n transformed\n] extends [remaining] ? [\n ...result,\n ...transformed[1][]\n] : _arrayFromListableEntries : never : [...result, ...transformed[1][]];\ntype extractEntrySets> = e extends readonly GroupableEntry[] ? e : [e];\ntype extractEntries> = e extends readonly Entry[] ? e[number] : e;\ntype entryArgsWithIndex = {\n [k in keyof o]-?: [k: k, v: Exclude, i: number];\n}[keyof o];\ntype numericArrayEntry = number extends a[\"length\"] ? [number, a[number]] : {\n [i in keyof a]: i extends `${infer n extends number}` ? [n, a[i]] : never;\n}[number];\ntype GroupedEntry = readonly [key: {\n group: Key;\n}, value: unknown];\ntype GroupableEntry = Entry | Entry | GroupedEntry;\ntype ListableEntry = listable;\ntype fromMappedEntries = [\n transformed\n] extends [listable>] ? arrayFromListableEntries> : objectFromListableEntries>;\ntype FlatMorph = {\n (o: o, flatMapEntry: (...args: numericArrayEntry) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryOf) => transformed): fromMappedEntries;\n (o: o, flatMapEntry: (...args: entryArgsWithIndex) => transformed): fromMappedEntries;\n};\ndeclare const flatMorph: FlatMorph;\n\ndeclare const isomorphic: {\n fileName: () => string;\n env: Record, string | undefined>;\n};\n\ndeclare const lazily: (thunk: () => t) => t;\n\ntype SerializationOptions = {\n onCycle?: (value: object) => string;\n onSymbol?: (value: symbol) => string;\n onFunction?: (value: Function) => string;\n onUndefined?: string;\n onBigInt?: (value: bigint) => string;\n};\ntype JsonStructure = JsonObject | JsonArray;\ninterface JsonObject {\n [k: string]: Json;\n}\ntype JsonArray = Json[];\ntype JsonPrimitive = string | boolean | number | null;\ntype Json = JsonStructure | JsonPrimitive;\ndeclare const snapshot: (data: t, opts?: SerializationOptions) => snapshot;\ntype snapshot = unknown extends t ? unknown : t extends Primitive ? snapshotPrimitive : t extends {\n toJSON: () => infer serialized;\n} ? serialized : t extends Function ? `Function(${string})` : t extends Date ? string : depth[\"length\"] extends 10 ? unknown : t extends array ? array> : {\n [k in keyof t as snapshotPrimitive]: snapshot;\n};\ntype snapshotPrimitive = t extends symbol ? `Symbol(${string})` : t;\ntype PrintableOptions = {\n indent?: number;\n quoteKeys?: boolean;\n};\ndeclare const print: (data: unknown, opts?: PrintableOptions) => void;\ndeclare const printable: (data: unknown, opts?: PrintableOptions) => string;\n/**\n * Converts a Date instance to a human-readable description relative to its precision\n */\ndeclare const describeCollapsibleDate: (date: Date) => string;\n\ntype StringifyPathOptions = requireKeys<{\n stringifySymbol?: (s: symbol) => string;\n stringifyNonKey?: (o: Exclude) => string;\n}, stringifiable extends PropertyKey ? never : \"stringifyNonKey\">;\ntype StringifyPathFn = (path: array, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ntype AppendStringifiedKeyFn = (path: string, prop: stringifiable, ...[opts]: [stringifiable] extends [PropertyKey] ? [\n opts?: StringifyPathOptions\n] : NoInfer<[opts: StringifyPathOptions]>) => string;\ndeclare const appendStringifiedKey: AppendStringifiedKeyFn;\ndeclare const stringifyPath: StringifyPathFn;\ndeclare class ReadonlyPath extends ReadonlyArray {\n private cache;\n constructor(...items: array);\n toJSON(): JsonArray;\n stringify(): string;\n stringifyAncestors(): readonly string[];\n}\n\ntype SerializedString = `\"${value}\"`;\ntype SerializedPrimitives = {\n string: SerializedString;\n number: `${number}`;\n bigint: BigintLiteral;\n boolean: \"true\" | \"false\";\n null: \"null\";\n undefined: \"undefined\";\n};\ntype SerializedPrimitive = SerializedPrimitives[keyof SerializedPrimitives];\ntype SerializablePrimitive = inferDomain;\ndeclare const serializePrimitive: (value: value) => serializePrimitive;\ntype serializePrimitive = value extends string ? `\"${value}\"` : value extends bigint ? `${value}n` : `${value}`;\n\ndeclare const arkUtilVersion = \"0.50.0\";\ndeclare const initialRegistryContents: {\n version: string;\n filename: string;\n FileConstructor: typeof buffer.File;\n};\ntype InitialRegistryContents = typeof initialRegistryContents;\ninterface ArkRegistry extends InitialRegistryContents {\n [k: string]: unknown;\n}\ndeclare const registry: ArkRegistry;\ndeclare global {\n export interface ArkEnv {\n prototypes(): never;\n }\n export namespace ArkEnv {\n type prototypes = ReturnType;\n }\n}\ndeclare const register: (value: object | symbol) => string;\ndeclare const isDotAccessible: (keyName: string) => boolean;\n\ndeclare const capitalize: (s: s) => Capitalize;\ndeclare const uncapitalize: (s: s) => Uncapitalize;\ntype firstChar = s extends `${infer head}${string}` ? head : \"\";\ntype charsAfterFirst = s extends `${string}${infer tail}` ? tail : \"\";\ntype lastChar = s extends `${infer head}${infer tail}` ? tail extends \"\" ? head : lastChar : s;\ntype charsBeforeLast = s extends `${infer head}${infer tail}` ? tail extends \"\" ? \"\" : `${head}${charsBeforeLast}` : \"\";\ntype contains = s extends `${string}${sub}${string}` ? true : false;\ndeclare const anchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const deanchoredRegex: (regex: RegExp | string) => RegExp;\ndeclare const anchoredSource: (regex: RegExp | string) => string;\ndeclare const deanchoredSource: (regex: RegExp | string) => string;\ndeclare const RegexPatterns: {\n negativeLookahead: (pattern: string) => `(?!${string})`;\n nonCapturingGroup: (pattern: string) => `(?:${string})`;\n};\ndeclare const Backslash = \"\\\\\";\ntype Backslash = typeof Backslash;\ndeclare const whitespaceChars: {\n readonly \" \": 1;\n readonly \"\\n\": 1;\n readonly \"\\t\": 1;\n};\ntype WhitespaceChar = keyof typeof whitespaceChars;\ntype trim = trimEnd>;\ntype trimStart = s extends `${WhitespaceChar}${infer tail}` ? trimEnd : s;\ntype trimEnd = s extends `${infer init}${WhitespaceChar}` ? trimEnd : s;\ntype isStringLiteral = [\n t\n] extends [string] ? [\n string\n] extends [t] ? false : Uppercase extends Uppercase> ? Lowercase extends Lowercase> ? true : false : false : false;\ndeclare const emojiToUnicode: (emoji: string) => string;\ndeclare const alphabet: readonly [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n\ndeclare class Scanner {\n chars: string[];\n i: number;\n def: string;\n constructor(def: string);\n /** Get lookahead and advance scanner by one */\n shift(): this[\"lookahead\"];\n get lookahead(): lookahead;\n get nextLookahead(): string;\n get length(): number;\n shiftUntil(condition: Scanner.UntilCondition): string;\n shiftUntilEscapable(condition: Scanner.UntilCondition): string;\n shiftUntilLookahead(charOrSet: string | KeySet): string;\n shiftUntilNonWhitespace(): string;\n jumpToIndex(i: number): void;\n jumpForward(count: number): void;\n get location(): number;\n get unscanned(): string;\n get scanned(): string;\n sliceChars(start: number, end?: number): string;\n lookaheadIs(char: char): this is Scanner;\n lookaheadIsIn(tokens: keySet): this is Scanner>;\n}\ndeclare namespace Scanner {\n type UntilCondition = (scanner: Scanner, shifted: string) => boolean;\n type shift = `${lookahead}${unscanned}`;\n type shiftUntil = unscanned extends shift ? lookahead extends terminator ? [\n appendTo,\n unscanned\n ] : shiftUntil : [appendTo, \"\"];\n type shiftUntilEscapable = unscanned extends shift ? lookahead extends terminator ? [appendTo, unscanned] : lookahead extends Backslash ? nextUnscanned extends (shift) ? shiftUntilEscapable : [`${appendTo}${Backslash}`, \"\"] : shiftUntilEscapable : [appendTo, \"\"];\n type shiftUntilNot = unscanned extends shift ? lookahead extends nonTerminator ? shiftUntilNot : [appendTo, unscanned] : [appendTo, \"\"];\n type skipWhitespace = shiftUntilNot[1];\n type shiftResult = [\n scanned,\n unscanned\n ];\n}\ndeclare const writeUnmatchedGroupCloseMessage: (char: char, unscanned: unscanned) => writeUnmatchedGroupCloseMessage;\ntype writeUnmatchedGroupCloseMessage = `Unmatched ${char}${unscanned extends \"\" ? \"\" : ` before ${unscanned}`}`;\ndeclare const writeUnclosedGroupMessage: (missingChar: missingChar) => writeUnclosedGroupMessage;\ntype writeUnclosedGroupMessage = `Missing ${missingChar}`;\n\ntype TraitImplementation = , s extends CompositionState = composeTraits<[\n ...traits,\n implementation\n], \"implementation\">, cls extends TraitConstructor = TraitConstructor>(...args: [...traits, implementation & ThisType>]) => cls;\ntype TraitComposition = >(...traits: conform) => TraitConstructor;\ndeclare const hasTrait: (traitClass: Constructor) => (o: unknown) => boolean;\ntype TraitDeclaration = {\n abstractMethods?: object;\n abstractProps?: object;\n abstractStatics?: object;\n dynamicBase?: object;\n};\n/** @ts-ignore required to extend NoopBase */\ndeclare abstract class Trait extends NoopBase {\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatic: abstractStatics;\n static get [Symbol.hasInstance](): (o: unknown) => boolean;\n traitsOf(): readonly TraitConstructor[];\n}\ndeclare const compose: TraitComposition;\ndeclare const implement: TraitImplementation;\ntype TraitConstructor = statics & (new (...args: params) => Trait<{\n abstractMethods: abstractMethods;\n abstractProps: abstractProps;\n abstractStatics: abstractStatics;\n}> & instance);\ntype CompositionState = {\n validated: array;\n remaining: array;\n params: array;\n kind: TraitCompositionKind;\n implemented: object;\n abstractMethods: object;\n abstractProps: object;\n abstractStatics: object;\n statics: object;\n};\ntype TraitCompositionKind = \"abstract\" | \"implementation\";\ntype composeTraits = _compose<{\n validated: [];\n remaining: traits;\n kind: kind;\n params: [];\n implemented: {};\n abstractMethods: {};\n abstractProps: {};\n abstractStatics: {};\n statics: {};\n}>;\ntype intersectImplementations = {\n [k in keyof l]: k extends keyof r ? l[k] extends (...args: infer lArgs) => infer lReturn ? r[k] extends (...args: infer rArgs) => infer rReturn ? (...args: intersectParameters) => lReturn & rReturn : l[k] & r[k] : l[k] & r[k] : l[k];\n} & Omit;\ntype _compose = s[\"remaining\"] extends (readonly [\n TraitConstructor,\n ...infer tail\n]) ? _compose<{\n validated: [...s[\"validated\"], s[\"remaining\"][0]];\n remaining: tail;\n kind: s[\"kind\"];\n params: intersectParameters;\n implemented: intersectImplementations>;\n statics: intersectImplementations>;\n abstractMethods: intersectImplementations;\n abstractProps: intersectImplementations;\n abstractStatics: intersectImplementations;\n}> : finalizeState;\ntype finalizeState = satisfy;\n statics: show>;\n abstractMethods: show>;\n abstractProps: show>;\n abstractStatics: show>;\n}>;\ntype implementationOf = s[\"abstractMethods\"] & ({} extends s[\"abstractProps\"] ? {} : {\n construct: (...args: s[\"params\"]) => s[\"abstractProps\"];\n}) & ({} extends s[\"abstractStatics\"] ? {} : {\n statics: s[\"abstractStatics\"];\n});\n\nexport { type AndPreserveUnknown, type AppendOptions, type AppendStringifiedKeyFn, type ArkRegistry, Backslash, type BigintLiteral, type Brand, type BuiltinObjectKind, type BuiltinObjects, Callable, type CallableOptions, CastableBase, type CollapsingList, type ComparisonOptions, type Completion, type Constructor, type DescribeOptions, type Dict, type Digit, type Domain, DynamicBase, DynamicFunction, type EcmascriptObjects, type EmptyObject, type Entry, type ErrorMessage, type ErrorType, FileConstructor, type FlatMorph, type Fn, type GlobalName, type GroupableEntry, type GroupedEntry, type GuardablePredicate, Hkt, type InitialRegistryContents, InnerDynamicBase, type IntegerLiteral, InternalArktypeError, type JsTypeOf, type Json, type JsonArray, type JsonObject, type JsonPrimitive, type JsonStructure, type Key, type KeySet, type ListableEntry, type NonNegativeIntegerLiteral, type NonNullishDomain, NoopBase, type NullishDomain, type NumberLiteral, type NumericParseOptions, ParseError, type PartialRecord, type PlatformObjects, type Primitive, type PrimitiveDomain, type PrintableOptions, ReadonlyArray, ReadonlyPath, RegexPatterns, Scanner, type SerializablePrimitive, type SerializationOptions, type SerializedPrimitive, type SerializedPrimitives, type Stringifiable, type StringifyPathFn, type StringifyPathOptions, type Thunk, Trait, type TraitComposition, type TraitCompositionKind, type TraitConstructor, type TraitDeclaration, type TraitImplementation, type TypeGuard, type TypedArrayObjects, type UnknownUnion, type WhitespaceChar, ZeroWidthSpace, alphabet, ancestorsOf, anchoredRegex, anchoredSource, type andPreserveUnknown, type anyOrNever, append, appendStringifiedKey, appendUnique, type appendableValue, type applyElementLabels, type arkGet, type arkIndexableOf, type arkKeyOf, arkUtilVersion, array, arrayEquals, type arrayIndexOf, type autocomplete, brand, builtinConstructors, cached, capitalize, type charsAfterFirst, type charsBeforeLast, compose, type composeTraits, conflatenate, conflatenateAll, type conform, constructorExtends, type contains, deanchoredRegex, deanchoredSource, deepClone, defineProperties, type defined, type describe, describeCollapsibleDate, type describeDefaults, type describeDomainOf, type describeObject, type dict, domainDescriptions, domainOf, ecmascriptConstructors, ecmascriptDescriptions, emojiToUnicode, entriesOf, type entryOf, enumValues, envHasCsp, type equals, type evaluate, type exact, type exactEquals, type exactMessageOnError, type extractDefinedKey, type extractKeyed, type filter, type firstChar, flatMorph, type flattenListable, fromEntries, type fromMappedEntries, type get, getBuiltinNameOfConstructor, getDuplicatesOf, getPath, groupBy, type groupableKeyOf, hasDefinedKey, hasDomain, hasKey, hasObjectKind, hasTrait, type headOf, type ifEmptyObjectLiteral, implement, type implementationOf, includes, type inferDomain, inferred, type initOf, initialRegistryContents, type instanceOf, integerLikeMatcher, type intersectArrays, type intersectOverloadReturns, type intersectParameters, type intersectUnion, intersectUniqueLists, invert, isArray, type isDisjoint, isDotAccessible, isEmptyObject, isKeyOf, isNumericString, type isSafelyMappable, type isStringLiteral, isThunk, isWellFormedInteger, isWellFormedNumber, isomorphic, join, jsTypeOfDescriptions, type keyOf, type keySetOf, type keyWithValue, keysOf, type lastChar, type lastIndexOf, type lastOf, lazily, type leftIfEqual, liftArray, type listable, type longerThan, type merge, type mutable, narrow, nearestFloat, noSuggest, type normalizedKeyOf, numberLikeMatcher, type numericStringKeyOf, numericStringMatcher, objectKindDescriptions, objectKindOf, objectKindOrDomainOf, omit, type optionalKeyOf, type overlaps, type overloadOf, type override, type parseInteger, type parseNonNegativeInteger, type parseNumber, type pathToString, pick, platformConstructors, platformDescriptions, print, printable, type promisable, type propValueOf, type propertyDescriptorsOf, type propwiseXor, range, register, registry, type require, type requireKeys, type requiredKeyOf, type satisfy, serializePrimitive, type setIndex, shallowClone, type show, snapshot, splitByKeys, spliterate, stringAndSymbolicEntriesOf, stringifyPath, type stringifyUnion, type tailOf, throwError, throwInternalError, throwParseError, type thunkable, type toArkKey, type trim, type trimEnd, type trimStart, tryCatch, tryParseInteger, tryParseNumber, tryParseWellFormedBigint, tryParseWellFormedNumber, type typeToString, typedArrayConstructors, typedArrayDescriptions, type unbrand, uncapitalize, type unionKeyOf, type unionToPropwiseXor, type unionToTuple, unset, type validateExhaustiveKeys, wellFormedIntegerMatcher, wellFormedNumberMatcher, whitespaceChars, type widen, withAlphabetizedKeys, type withJsDoc, type writeInvalidKeysMessage, writeMalformedNumericLiteralMessage, writeUnclosedGroupMessage, writeUnmatchedGroupCloseMessage };\n\n}"