UNPKG

@fedify/fedify

Version:

An ActivityPub server framework

1,554 lines (1,517 loc) • 203 kB
import { Temporal } from "@js-temporal/polyfill"; import { URLPattern } from "urlpattern-polyfill"; globalThis.addEventListener = () => {}; import { __export } from "../chunk-HsBuZ-b2.js"; import { assertEquals } from "../assert_equals-CTYbeopb.js"; import { assert } from "../assert-DmFG7ppO.js"; import "../assert_instance_of-CF09JHYM.js"; import "../docloader-C8mmLN-Y.js"; import "../url-kTAI6_KP.js"; import "../multibase-DeCHcK8L.js"; import { Application, Group, Organization, Person, Service } from "../vocab-dDpPQ0fF.js"; import "../langstr-DbWheeIS.js"; import "../lookup-Ozuw-rxN.js"; import "../type-D2s5lmbZ.js"; import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-BP-NTJ2m.js"; import { test } from "../testing-BZ0dJ4qn.js"; import { assertStrictEquals } from "../std__assert-vp0TKMS1.js"; import { assertFalse, assertRejects } from "../assert_rejects-C-sxEMM5.js"; import "../assert_is_error-nrwA1GeT.js"; import "../assert_not_equals-Dc7y-V5Q.js"; import { assertThrows } from "../assert_throws-Cn9C6Jur.js"; import { esm_default } from "../esm-Db4De7AS.js"; //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js var PreconditionFailure = class PreconditionFailure extends Error { constructor(interruptExecution = false) { super(); this.interruptExecution = interruptExecution; this.footprint = PreconditionFailure.SharedFootPrint; } static isFailure(err) { return err != null && err.footprint === PreconditionFailure.SharedFootPrint; } }; PreconditionFailure.SharedFootPrint = Symbol.for("fast-check/PreconditionFailure"); //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/StreamHelpers.js var Nil = class { [Symbol.iterator]() { return this; } next(value) { return { value, done: true }; } }; Nil.nil = new Nil(); function nilHelper() { return Nil.nil; } function* mapHelper(g, f) { for (const v of g) yield f(v); } function* flatMapHelper(g, f) { for (const v of g) yield* f(v); } function* filterHelper(g, f) { for (const v of g) if (f(v)) yield v; } function* takeNHelper(g, n) { for (let i = 0; i < n; ++i) { const cur = g.next(); if (cur.done) break; yield cur.value; } } function* takeWhileHelper(g, f) { let cur = g.next(); while (!cur.done && f(cur.value)) { yield cur.value; cur = g.next(); } } function* joinHelper(g, others) { for (let cur = g.next(); !cur.done; cur = g.next()) yield cur.value; for (const s of others) for (let cur = s.next(); !cur.done; cur = s.next()) yield cur.value; } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/Stream.js const safeSymbolIterator = Symbol.iterator; var Stream = class Stream { static nil() { return new Stream(nilHelper()); } static of(...elements) { return new Stream(elements[safeSymbolIterator]()); } constructor(g) { this.g = g; } next() { return this.g.next(); } [Symbol.iterator]() { return this.g; } map(f) { return new Stream(mapHelper(this.g, f)); } flatMap(f) { return new Stream(flatMapHelper(this.g, f)); } dropWhile(f) { let foundEligible = false; function* helper(v) { if (foundEligible || !f(v)) { foundEligible = true; yield v; } } return this.flatMap(helper); } drop(n) { if (n <= 0) return this; let idx = 0; function helper() { return idx++ < n; } return this.dropWhile(helper); } takeWhile(f) { return new Stream(takeWhileHelper(this.g, f)); } take(n) { return new Stream(takeNHelper(this.g, n)); } filter(f) { return new Stream(filterHelper(this.g, f)); } every(f) { for (const v of this.g) if (!f(v)) return false; return true; } has(f) { for (const v of this.g) if (f(v)) return [true, v]; return [false, null]; } join(...others) { return new Stream(joinHelper(this.g, others)); } getNthOrLast(nth) { let remaining = nth; let last = null; for (const v of this.g) { if (remaining-- === 0) return v; last = v; } return last; } }; function stream(g) { return new Stream(g); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/symbols.js const cloneMethod = Symbol.for("fast-check/cloneMethod"); function hasCloneMethod(instance) { return instance !== null && (typeof instance === "object" || typeof instance === "function") && cloneMethod in instance && typeof instance[cloneMethod] === "function"; } function cloneIfNeeded(instance) { return hasCloneMethod(instance) ? instance[cloneMethod]() : instance; } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js const safeObjectDefineProperty$2 = Object.defineProperty; var Value = class { constructor(value_, context, customGetValue = void 0) { this.value_ = value_; this.context = context; this.hasToBeCloned = customGetValue !== void 0 || hasCloneMethod(value_); this.readOnce = false; if (this.hasToBeCloned) safeObjectDefineProperty$2(this, "value", { get: customGetValue !== void 0 ? customGetValue : this.getValue }); else this.value = value_; } getValue() { if (this.hasToBeCloned) { if (!this.readOnce) { this.readOnce = true; return this.value_; } return this.value_[cloneMethod](); } return this.value_; } }; //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js const safeObjectAssign$4 = Object.assign; var Arbitrary = class { filter(refinement) { return new FilterArbitrary(this, refinement); } map(mapper, unmapper) { return new MapArbitrary(this, mapper, unmapper); } chain(chainer) { return new ChainArbitrary(this, chainer); } noShrink() { return new NoShrinkArbitrary(this); } noBias() { return new NoBiasArbitrary(this); } }; var ChainArbitrary = class extends Arbitrary { constructor(arb, chainer) { super(); this.arb = arb; this.chainer = chainer; } generate(mrng, biasFactor) { const clonedMrng = mrng.clone(); const src = this.arb.generate(mrng, biasFactor); return this.valueChainer(src, mrng, clonedMrng, biasFactor); } canShrinkWithoutContext(value) { return false; } shrink(value, context) { if (this.isSafeContext(context)) return (!context.stoppedForOriginal ? this.arb.shrink(context.originalValue, context.originalContext).map((v) => this.valueChainer(v, context.clonedMrng.clone(), context.clonedMrng, context.originalBias)) : Stream.nil()).join(context.chainedArbitrary.shrink(value, context.chainedContext).map((dst) => { const newContext = safeObjectAssign$4(safeObjectAssign$4({}, context), { chainedContext: dst.context, stoppedForOriginal: true }); return new Value(dst.value_, newContext); })); return Stream.nil(); } valueChainer(v, generateMrng, clonedMrng, biasFactor) { const chainedArbitrary = this.chainer(v.value_); const dst = chainedArbitrary.generate(generateMrng, biasFactor); const context = { originalBias: biasFactor, originalValue: v.value_, originalContext: v.context, stoppedForOriginal: false, chainedArbitrary, chainedContext: dst.context, clonedMrng }; return new Value(dst.value_, context); } isSafeContext(context) { return context != null && typeof context === "object" && "originalBias" in context && "originalValue" in context && "originalContext" in context && "stoppedForOriginal" in context && "chainedArbitrary" in context && "chainedContext" in context && "clonedMrng" in context; } }; var MapArbitrary = class extends Arbitrary { constructor(arb, mapper, unmapper) { super(); this.arb = arb; this.mapper = mapper; this.unmapper = unmapper; this.bindValueMapper = (v) => this.valueMapper(v); } generate(mrng, biasFactor) { const g = this.arb.generate(mrng, biasFactor); return this.valueMapper(g); } canShrinkWithoutContext(value) { if (this.unmapper !== void 0) try { const unmapped = this.unmapper(value); return this.arb.canShrinkWithoutContext(unmapped); } catch (_err) { return false; } return false; } shrink(value, context) { if (this.isSafeContext(context)) return this.arb.shrink(context.originalValue, context.originalContext).map(this.bindValueMapper); if (this.unmapper !== void 0) { const unmapped = this.unmapper(value); return this.arb.shrink(unmapped, void 0).map(this.bindValueMapper); } return Stream.nil(); } mapperWithCloneIfNeeded(v) { const sourceValue = v.value; const mappedValue = this.mapper(sourceValue); if (v.hasToBeCloned && (typeof mappedValue === "object" && mappedValue !== null || typeof mappedValue === "function") && Object.isExtensible(mappedValue) && !hasCloneMethod(mappedValue)) Object.defineProperty(mappedValue, cloneMethod, { get: () => () => this.mapperWithCloneIfNeeded(v)[0] }); return [mappedValue, sourceValue]; } valueMapper(v) { const [mappedValue, sourceValue] = this.mapperWithCloneIfNeeded(v); const context = { originalValue: sourceValue, originalContext: v.context }; return new Value(mappedValue, context); } isSafeContext(context) { return context != null && typeof context === "object" && "originalValue" in context && "originalContext" in context; } }; var FilterArbitrary = class extends Arbitrary { constructor(arb, refinement) { super(); this.arb = arb; this.refinement = refinement; this.bindRefinementOnValue = (v) => this.refinementOnValue(v); } generate(mrng, biasFactor) { while (true) { const g = this.arb.generate(mrng, biasFactor); if (this.refinementOnValue(g)) return g; } } canShrinkWithoutContext(value) { return this.arb.canShrinkWithoutContext(value) && this.refinement(value); } shrink(value, context) { return this.arb.shrink(value, context).filter(this.bindRefinementOnValue); } refinementOnValue(v) { return this.refinement(v.value); } }; var NoShrinkArbitrary = class extends Arbitrary { constructor(arb) { super(); this.arb = arb; } generate(mrng, biasFactor) { return this.arb.generate(mrng, biasFactor); } canShrinkWithoutContext(value) { return this.arb.canShrinkWithoutContext(value); } shrink(_value, _context) { return Stream.nil(); } noShrink() { return this; } }; var NoBiasArbitrary = class extends Arbitrary { constructor(arb) { super(); this.arb = arb; } generate(mrng, _biasFactor) { return this.arb.generate(mrng, void 0); } canShrinkWithoutContext(value) { return this.arb.canShrinkWithoutContext(value); } shrink(value, context) { return this.arb.shrink(value, context); } noBias() { return this; } }; function isArbitrary(instance) { return typeof instance === "object" && instance !== null && "generate" in instance && "shrink" in instance && "canShrinkWithoutContext" in instance; } function assertIsArbitrary(instance) { if (!isArbitrary(instance)) throw new Error("Unexpected value received: not an instance of Arbitrary"); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/apply.js const untouchedApply = Function.prototype.apply; const ApplySymbol = Symbol("apply"); function safeExtractApply(f) { try { return f.apply; } catch (err) { return void 0; } } function safeApplyHacky(f, instance, args) { const ff = f; ff[ApplySymbol] = untouchedApply; const out = ff[ApplySymbol](instance, args); delete ff[ApplySymbol]; return out; } function safeApply(f, instance, args) { if (safeExtractApply(f) === untouchedApply) return f.apply(instance, args); return safeApplyHacky(f, instance, args); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/globals.js const SArray = typeof Array !== "undefined" ? Array : void 0; const SBigInt = typeof BigInt !== "undefined" ? BigInt : void 0; const SBoolean = typeof Boolean !== "undefined" ? Boolean : void 0; const SDate = typeof Date !== "undefined" ? Date : void 0; const SError = typeof Error !== "undefined" ? Error : void 0; const SFloat32Array = typeof Float32Array !== "undefined" ? Float32Array : void 0; const SFloat64Array = typeof Float64Array !== "undefined" ? Float64Array : void 0; const SInt8Array = typeof Int8Array !== "undefined" ? Int8Array : void 0; const SInt16Array = typeof Int16Array !== "undefined" ? Int16Array : void 0; const SInt32Array = typeof Int32Array !== "undefined" ? Int32Array : void 0; const SNumber = typeof Number !== "undefined" ? Number : void 0; const SString = typeof String !== "undefined" ? String : void 0; const SSet = typeof Set !== "undefined" ? Set : void 0; const SUint8Array = typeof Uint8Array !== "undefined" ? Uint8Array : void 0; const SUint8ClampedArray = typeof Uint8ClampedArray !== "undefined" ? Uint8ClampedArray : void 0; const SUint16Array = typeof Uint16Array !== "undefined" ? Uint16Array : void 0; const SUint32Array = typeof Uint32Array !== "undefined" ? Uint32Array : void 0; const SMap = Map; const SSymbol = Symbol; const untouchedForEach = Array.prototype.forEach; const untouchedIndexOf = Array.prototype.indexOf; const untouchedJoin = Array.prototype.join; const untouchedMap = Array.prototype.map; const untouchedFilter = Array.prototype.filter; const untouchedPush = Array.prototype.push; const untouchedPop = Array.prototype.pop; const untouchedSplice = Array.prototype.splice; const untouchedSlice = Array.prototype.slice; const untouchedSort = Array.prototype.sort; const untouchedEvery = Array.prototype.every; function extractForEach(instance) { try { return instance.forEach; } catch (err) { return void 0; } } function extractIndexOf(instance) { try { return instance.indexOf; } catch (err) { return void 0; } } function extractJoin(instance) { try { return instance.join; } catch (err) { return void 0; } } function extractMap(instance) { try { return instance.map; } catch (err) { return void 0; } } function extractFilter(instance) { try { return instance.filter; } catch (err) { return void 0; } } function extractPush(instance) { try { return instance.push; } catch (err) { return void 0; } } function extractPop(instance) { try { return instance.pop; } catch (err) { return void 0; } } function extractSlice(instance) { try { return instance.slice; } catch (err) { return void 0; } } function extractEvery(instance) { try { return instance.every; } catch (err) { return void 0; } } function safeForEach(instance, fn) { if (extractForEach(instance) === untouchedForEach) return instance.forEach(fn); return safeApply(untouchedForEach, instance, [fn]); } function safeIndexOf(instance, ...args) { if (extractIndexOf(instance) === untouchedIndexOf) return instance.indexOf(...args); return safeApply(untouchedIndexOf, instance, args); } function safeJoin(instance, ...args) { if (extractJoin(instance) === untouchedJoin) return instance.join(...args); return safeApply(untouchedJoin, instance, args); } function safeMap(instance, fn) { if (extractMap(instance) === untouchedMap) return instance.map(fn); return safeApply(untouchedMap, instance, [fn]); } function safeFilter(instance, predicate) { if (extractFilter(instance) === untouchedFilter) return instance.filter(predicate); return safeApply(untouchedFilter, instance, [predicate]); } function safePush(instance, ...args) { if (extractPush(instance) === untouchedPush) return instance.push(...args); return safeApply(untouchedPush, instance, args); } function safePop(instance) { if (extractPop(instance) === untouchedPop) return instance.pop(); return safeApply(untouchedPop, instance, []); } function safeSlice(instance, ...args) { if (extractSlice(instance) === untouchedSlice) return instance.slice(...args); return safeApply(untouchedSlice, instance, args); } function safeEvery(instance, ...args) { if (extractEvery(instance) === untouchedEvery) return instance.every(...args); return safeApply(untouchedEvery, instance, args); } const untouchedGetTime = Date.prototype.getTime; const untouchedToISOString = Date.prototype.toISOString; function extractGetTime(instance) { try { return instance.getTime; } catch (err) { return void 0; } } function extractToISOString(instance) { try { return instance.toISOString; } catch (err) { return void 0; } } function safeGetTime(instance) { if (extractGetTime(instance) === untouchedGetTime) return instance.getTime(); return safeApply(untouchedGetTime, instance, []); } function safeToISOString(instance) { if (extractToISOString(instance) === untouchedToISOString) return instance.toISOString(); return safeApply(untouchedToISOString, instance, []); } const untouchedAdd = Set.prototype.add; const untouchedHas = Set.prototype.has; function extractAdd(instance) { try { return instance.add; } catch (err) { return void 0; } } function extractHas(instance) { try { return instance.has; } catch (err) { return void 0; } } function safeAdd(instance, value) { if (extractAdd(instance) === untouchedAdd) return instance.add(value); return safeApply(untouchedAdd, instance, [value]); } function safeHas(instance, value) { if (extractHas(instance) === untouchedHas) return instance.has(value); return safeApply(untouchedHas, instance, [value]); } const untouchedSet = WeakMap.prototype.set; const untouchedGet = WeakMap.prototype.get; function extractSet(instance) { try { return instance.set; } catch (err) { return void 0; } } function extractGet(instance) { try { return instance.get; } catch (err) { return void 0; } } function safeSet(instance, key, value) { if (extractSet(instance) === untouchedSet) return instance.set(key, value); return safeApply(untouchedSet, instance, [key, value]); } function safeGet(instance, key) { if (extractGet(instance) === untouchedGet) return instance.get(key); return safeApply(untouchedGet, instance, [key]); } const untouchedMapSet = Map.prototype.set; const untouchedMapGet = Map.prototype.get; function extractMapSet(instance) { try { return instance.set; } catch (err) { return void 0; } } function extractMapGet(instance) { try { return instance.get; } catch (err) { return void 0; } } function safeMapSet(instance, key, value) { if (extractMapSet(instance) === untouchedMapSet) return instance.set(key, value); return safeApply(untouchedMapSet, instance, [key, value]); } function safeMapGet(instance, key) { if (extractMapGet(instance) === untouchedMapGet) return instance.get(key); return safeApply(untouchedMapGet, instance, [key]); } const untouchedSplit = String.prototype.split; const untouchedStartsWith = String.prototype.startsWith; const untouchedEndsWith = String.prototype.endsWith; const untouchedSubstring = String.prototype.substring; const untouchedToLowerCase = String.prototype.toLowerCase; const untouchedToUpperCase = String.prototype.toUpperCase; const untouchedPadStart = String.prototype.padStart; const untouchedCharCodeAt = String.prototype.charCodeAt; const untouchedNormalize = String.prototype.normalize; const untouchedReplace = String.prototype.replace; function extractSplit(instance) { try { return instance.split; } catch (err) { return void 0; } } function extractSubstring(instance) { try { return instance.substring; } catch (err) { return void 0; } } function extractCharCodeAt(instance) { try { return instance.charCodeAt; } catch (err) { return void 0; } } function extractNormalize(instance) { try { return instance.normalize; } catch (err) { return void 0; } } function extractReplace(instance) { try { return instance.replace; } catch (err) { return void 0; } } function safeSplit(instance, ...args) { if (extractSplit(instance) === untouchedSplit) return instance.split(...args); return safeApply(untouchedSplit, instance, args); } function safeSubstring(instance, ...args) { if (extractSubstring(instance) === untouchedSubstring) return instance.substring(...args); return safeApply(untouchedSubstring, instance, args); } function safeCharCodeAt(instance, index) { if (extractCharCodeAt(instance) === untouchedCharCodeAt) return instance.charCodeAt(index); return safeApply(untouchedCharCodeAt, instance, [index]); } function safeNormalize(instance, form) { if (extractNormalize(instance) === untouchedNormalize) return instance.normalize(form); return safeApply(untouchedNormalize, instance, [form]); } function safeReplace(instance, pattern, replacement) { if (extractReplace(instance) === untouchedReplace) return instance.replace(pattern, replacement); return safeApply(untouchedReplace, instance, [pattern, replacement]); } const untouchedNumberToString = Number.prototype.toString; const untouchedHasOwnProperty = Object.prototype.hasOwnProperty; const untouchedToString = Object.prototype.toString; function safeHasOwnProperty(instance, v) { return safeApply(untouchedHasOwnProperty, instance, [v]); } function safeToString(instance) { return safeApply(untouchedToString, instance, []); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js var LazyIterableIterator = class { constructor(producer) { this.producer = producer; } [Symbol.iterator]() { if (this.it === void 0) this.it = this.producer(); return this.it; } next() { if (this.it === void 0) this.it = this.producer(); return this.it.next(); } }; function makeLazy(producer) { return new LazyIterableIterator(producer); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js const safeArrayIsArray$2 = Array.isArray; const safeObjectDefineProperty$1 = Object.defineProperty; function tupleMakeItCloneable(vs, values) { return safeObjectDefineProperty$1(vs, cloneMethod, { value: () => { const cloned = []; for (let idx = 0; idx !== values.length; ++idx) safePush(cloned, values[idx].value); tupleMakeItCloneable(cloned, values); return cloned; } }); } function tupleWrapper(values) { let cloneable = false; const vs = []; const ctxs = []; for (let idx = 0; idx !== values.length; ++idx) { const v = values[idx]; cloneable = cloneable || v.hasToBeCloned; safePush(vs, v.value); safePush(ctxs, v.context); } if (cloneable) tupleMakeItCloneable(vs, values); return new Value(vs, ctxs); } function tupleShrink(arbs, value, context) { const shrinks = []; const safeContext = safeArrayIsArray$2(context) ? context : []; for (let idx = 0; idx !== arbs.length; ++idx) safePush(shrinks, makeLazy(() => arbs[idx].shrink(value[idx], safeContext[idx]).map((v) => { const nextValues = safeMap(value, (v$1, idx$1) => new Value(cloneIfNeeded(v$1), safeContext[idx$1])); return [ ...safeSlice(nextValues, 0, idx), v, ...safeSlice(nextValues, idx + 1) ]; }).map(tupleWrapper))); return Stream.nil().join(...shrinks); } var TupleArbitrary = class extends Arbitrary { constructor(arbs) { super(); this.arbs = arbs; for (let idx = 0; idx !== arbs.length; ++idx) { const arb = arbs[idx]; if (arb == null || arb.generate == null) throw new Error(`Invalid parameter encountered at index ${idx}: expecting an Arbitrary`); } } generate(mrng, biasFactor) { const mapped = []; for (let idx = 0; idx !== this.arbs.length; ++idx) safePush(mapped, this.arbs[idx].generate(mrng, biasFactor)); return tupleWrapper(mapped); } canShrinkWithoutContext(value) { if (!safeArrayIsArray$2(value) || value.length !== this.arbs.length) return false; for (let index = 0; index !== this.arbs.length; ++index) if (!this.arbs[index].canShrinkWithoutContext(value[index])) return false; return true; } shrink(value, context) { return tupleShrink(this.arbs, value, context); } }; //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/tuple.js function tuple(...arbs) { return new TupleArbitrary(arbs); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IRawProperty.js const safeMathLog$2 = Math.log; function runIdToFrequency(runId) { return 2 + ~~(safeMathLog$2(runId + 1) * .4342944819032518); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js let globalParameters = {}; function readConfigureGlobal() { return globalParameters; } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js const UndefinedContextPlaceholder = Symbol("UndefinedContextPlaceholder"); function noUndefinedAsContext(value) { if (value.context !== void 0) return value; if (value.hasToBeCloned) return new Value(value.value_, UndefinedContextPlaceholder, () => value.value); return new Value(value.value_, UndefinedContextPlaceholder); } //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js var AlwaysShrinkableArbitrary = class extends Arbitrary { constructor(arb) { super(); this.arb = arb; } generate(mrng, biasFactor) { const value = this.arb.generate(mrng, biasFactor); return noUndefinedAsContext(value); } canShrinkWithoutContext(value) { return true; } shrink(value, context) { if (context === void 0 && !this.arb.canShrinkWithoutContext(value)) return Stream.nil(); const safeContext = context !== UndefinedContextPlaceholder ? context : void 0; return this.arb.shrink(value, safeContext).map(noUndefinedAsContext); } }; //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.generic.js var Property = class Property { constructor(arb, predicate) { this.arb = arb; this.predicate = predicate; const { beforeEach = Property.dummyHook, afterEach = Property.dummyHook, asyncBeforeEach, asyncAfterEach } = readConfigureGlobal() || {}; if (asyncBeforeEach !== void 0) throw SError("\"asyncBeforeEach\" can't be set when running synchronous properties"); if (asyncAfterEach !== void 0) throw SError("\"asyncAfterEach\" can't be set when running synchronous properties"); this.beforeEachHook = beforeEach; this.afterEachHook = afterEach; } isAsync() { return false; } generate(mrng, runId) { const value = this.arb.generate(mrng, runId != null ? runIdToFrequency(runId) : void 0); return noUndefinedAsContext(value); } shrink(value) { if (value.context === void 0 && !this.arb.canShrinkWithoutContext(value.value_)) return Stream.nil(); const safeContext = value.context !== UndefinedContextPlaceholder ? value.context : void 0; return this.arb.shrink(value.value_, safeContext).map(noUndefinedAsContext); } runBeforeEach() { this.beforeEachHook(); } runAfterEach() { this.afterEachHook(); } run(v, dontRunHook) { if (!dontRunHook) this.beforeEachHook(); try { const output = this.predicate(v); return output == null || output === true ? null : { error: new SError("Property failed by returning false"), errorMessage: "Error: Property failed by returning false" }; } catch (err) { if (PreconditionFailure.isFailure(err)) return err; if (err instanceof SError && err.stack) return { error: err, errorMessage: err.stack }; return { error: err, errorMessage: SString(err) }; } finally { if (!dontRunHook) this.afterEachHook(); } } beforeEach(hookFunction) { const previousBeforeEachHook = this.beforeEachHook; this.beforeEachHook = () => hookFunction(previousBeforeEachHook); return this; } afterEach(hookFunction) { const previousAfterEachHook = this.afterEachHook; this.afterEachHook = () => hookFunction(previousAfterEachHook); return this; } }; Property.dummyHook = () => {}; //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.js function property(...args) { if (args.length < 2) throw new Error("property expects at least two parameters"); const arbs = safeSlice(args, 0, args.length - 1); const p = args[args.length - 1]; safeForEach(arbs, assertIsArbitrary); const mappedArbs = safeMap(arbs, (arb) => new AlwaysShrinkableArbitrary(arb)); return new Property(tuple(...mappedArbs), (t) => p(...t)); } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js function unsafeGenerateN(rng, num) { var out = []; for (var idx = 0; idx != num; ++idx) out.push(rng.unsafeNext()); return out; } function generateN(rng, num) { var nextRng = rng.clone(); var out = unsafeGenerateN(nextRng, num); return [out, nextRng]; } function unsafeSkipN(rng, num) { for (var idx = 0; idx != num; ++idx) rng.unsafeNext(); } function skipN(rng, num) { var nextRng = rng.clone(); unsafeSkipN(nextRng, num); return nextRng; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js var MULTIPLIER = 214013; var INCREMENT = 2531011; var MASK = 4294967295; var MASK_2 = (1 << 31) - 1; var computeNextSeed = function(seed) { return seed * MULTIPLIER + INCREMENT & MASK; }; var computeValueFromNextSeed = function(nextseed) { return (nextseed & MASK_2) >> 16; }; var LinearCongruential32 = function() { function LinearCongruential32$1(seed) { this.seed = seed; } LinearCongruential32$1.prototype.clone = function() { return new LinearCongruential32$1(this.seed); }; LinearCongruential32$1.prototype.next = function() { var nextRng = new LinearCongruential32$1(this.seed); var out = nextRng.unsafeNext(); return [out, nextRng]; }; LinearCongruential32$1.prototype.unsafeNext = function() { var s1 = computeNextSeed(this.seed); var v1 = computeValueFromNextSeed(s1); var s2 = computeNextSeed(s1); var v2 = computeValueFromNextSeed(s2); this.seed = computeNextSeed(s2); var v3 = computeValueFromNextSeed(this.seed); var vnext = v3 + (v2 + (v1 << 15) << 15); return vnext | 0; }; LinearCongruential32$1.prototype.getState = function() { return [this.seed]; }; return LinearCongruential32$1; }(); function fromState$3(state) { var valid = state.length === 1; if (!valid) throw new Error("The state must have been produced by a congruential32 RandomGenerator"); return new LinearCongruential32(state[0]); } var congruential32 = Object.assign(function(seed) { return new LinearCongruential32(seed); }, { fromState: fromState$3 }); //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js var __read = void 0 && (void 0).__read || function(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spreadArray = void 0 && (void 0).__spreadArray || function(to, from, pack) { if (pack || arguments.length === 2) { for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); }; var MersenneTwister = function() { function MersenneTwister$1(states, index) { this.states = states; this.index = index; } MersenneTwister$1.twist = function(prev) { var mt = prev.slice(); for (var idx = 0; idx !== MersenneTwister$1.N - MersenneTwister$1.M; ++idx) { var y_1 = (mt[idx] & MersenneTwister$1.MASK_UPPER) + (mt[idx + 1] & MersenneTwister$1.MASK_LOWER); mt[idx] = mt[idx + MersenneTwister$1.M] ^ y_1 >>> 1 ^ -(y_1 & 1) & MersenneTwister$1.A; } for (var idx = MersenneTwister$1.N - MersenneTwister$1.M; idx !== MersenneTwister$1.N - 1; ++idx) { var y_2 = (mt[idx] & MersenneTwister$1.MASK_UPPER) + (mt[idx + 1] & MersenneTwister$1.MASK_LOWER); mt[idx] = mt[idx + MersenneTwister$1.M - MersenneTwister$1.N] ^ y_2 >>> 1 ^ -(y_2 & 1) & MersenneTwister$1.A; } var y = (mt[MersenneTwister$1.N - 1] & MersenneTwister$1.MASK_UPPER) + (mt[0] & MersenneTwister$1.MASK_LOWER); mt[MersenneTwister$1.N - 1] = mt[MersenneTwister$1.M - 1] ^ y >>> 1 ^ -(y & 1) & MersenneTwister$1.A; return mt; }; MersenneTwister$1.seeded = function(seed) { var out = Array(MersenneTwister$1.N); out[0] = seed; for (var idx = 1; idx !== MersenneTwister$1.N; ++idx) { var xored = out[idx - 1] ^ out[idx - 1] >>> 30; out[idx] = Math.imul(MersenneTwister$1.F, xored) + idx | 0; } return out; }; MersenneTwister$1.from = function(seed) { return new MersenneTwister$1(MersenneTwister$1.twist(MersenneTwister$1.seeded(seed)), 0); }; MersenneTwister$1.prototype.clone = function() { return new MersenneTwister$1(this.states, this.index); }; MersenneTwister$1.prototype.next = function() { var nextRng = new MersenneTwister$1(this.states, this.index); var out = nextRng.unsafeNext(); return [out, nextRng]; }; MersenneTwister$1.prototype.unsafeNext = function() { var y = this.states[this.index]; y ^= this.states[this.index] >>> MersenneTwister$1.U; y ^= y << MersenneTwister$1.S & MersenneTwister$1.B; y ^= y << MersenneTwister$1.T & MersenneTwister$1.C; y ^= y >>> MersenneTwister$1.L; if (++this.index >= MersenneTwister$1.N) { this.states = MersenneTwister$1.twist(this.states); this.index = 0; } return y; }; MersenneTwister$1.prototype.getState = function() { return __spreadArray([this.index], __read(this.states), false); }; MersenneTwister$1.fromState = function(state) { var valid = state.length === MersenneTwister$1.N + 1 && state[0] >= 0 && state[0] < MersenneTwister$1.N; if (!valid) throw new Error("The state must have been produced by a mersenne RandomGenerator"); return new MersenneTwister$1(state.slice(1), state[0]); }; MersenneTwister$1.N = 624; MersenneTwister$1.M = 397; MersenneTwister$1.R = 31; MersenneTwister$1.A = 2567483615; MersenneTwister$1.F = 1812433253; MersenneTwister$1.U = 11; MersenneTwister$1.S = 7; MersenneTwister$1.B = 2636928640; MersenneTwister$1.T = 15; MersenneTwister$1.C = 4022730752; MersenneTwister$1.L = 18; MersenneTwister$1.MASK_LOWER = Math.pow(2, MersenneTwister$1.R) - 1; MersenneTwister$1.MASK_UPPER = Math.pow(2, MersenneTwister$1.R); return MersenneTwister$1; }(); function fromState$2(state) { return MersenneTwister.fromState(state); } var MersenneTwister_default = Object.assign(function(seed) { return MersenneTwister.from(seed); }, { fromState: fromState$2 }); //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XorShift.js var XorShift128Plus = function() { function XorShift128Plus$1(s01, s00, s11, s10) { this.s01 = s01; this.s00 = s00; this.s11 = s11; this.s10 = s10; } XorShift128Plus$1.prototype.clone = function() { return new XorShift128Plus$1(this.s01, this.s00, this.s11, this.s10); }; XorShift128Plus$1.prototype.next = function() { var nextRng = new XorShift128Plus$1(this.s01, this.s00, this.s11, this.s10); var out = nextRng.unsafeNext(); return [out, nextRng]; }; XorShift128Plus$1.prototype.unsafeNext = function() { var a0 = this.s00 ^ this.s00 << 23; var a1 = this.s01 ^ (this.s01 << 23 | this.s00 >>> 9); var b0 = a0 ^ this.s10 ^ (a0 >>> 18 | a1 << 14) ^ (this.s10 >>> 5 | this.s11 << 27); var b1 = a1 ^ this.s11 ^ a1 >>> 18 ^ this.s11 >>> 5; var out = this.s00 + this.s10 | 0; this.s01 = this.s11; this.s00 = this.s10; this.s11 = b1; this.s10 = b0; return out; }; XorShift128Plus$1.prototype.jump = function() { var nextRng = new XorShift128Plus$1(this.s01, this.s00, this.s11, this.s10); nextRng.unsafeJump(); return nextRng; }; XorShift128Plus$1.prototype.unsafeJump = function() { var ns01 = 0; var ns00 = 0; var ns11 = 0; var ns10 = 0; var jump = [ 1667051007, 2321340297, 1548169110, 304075285 ]; for (var i = 0; i !== 4; ++i) for (var mask = 1; mask; mask <<= 1) { if (jump[i] & mask) { ns01 ^= this.s01; ns00 ^= this.s00; ns11 ^= this.s11; ns10 ^= this.s10; } this.unsafeNext(); } this.s01 = ns01; this.s00 = ns00; this.s11 = ns11; this.s10 = ns10; }; XorShift128Plus$1.prototype.getState = function() { return [ this.s01, this.s00, this.s11, this.s10 ]; }; return XorShift128Plus$1; }(); function fromState$1(state) { var valid = state.length === 4; if (!valid) throw new Error("The state must have been produced by a xorshift128plus RandomGenerator"); return new XorShift128Plus(state[0], state[1], state[2], state[3]); } var xorshift128plus = Object.assign(function(seed) { return new XorShift128Plus(-1, ~seed, seed | 0, 0); }, { fromState: fromState$1 }); //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XoroShiro.js var XoroShiro128Plus = function() { function XoroShiro128Plus$1(s01, s00, s11, s10) { this.s01 = s01; this.s00 = s00; this.s11 = s11; this.s10 = s10; } XoroShiro128Plus$1.prototype.clone = function() { return new XoroShiro128Plus$1(this.s01, this.s00, this.s11, this.s10); }; XoroShiro128Plus$1.prototype.next = function() { var nextRng = new XoroShiro128Plus$1(this.s01, this.s00, this.s11, this.s10); var out = nextRng.unsafeNext(); return [out, nextRng]; }; XoroShiro128Plus$1.prototype.unsafeNext = function() { var out = this.s00 + this.s10 | 0; var a0 = this.s10 ^ this.s00; var a1 = this.s11 ^ this.s01; var s00 = this.s00; var s01 = this.s01; this.s00 = s00 << 24 ^ s01 >>> 8 ^ a0 ^ a0 << 16; this.s01 = s01 << 24 ^ s00 >>> 8 ^ a1 ^ (a1 << 16 | a0 >>> 16); this.s10 = a1 << 5 ^ a0 >>> 27; this.s11 = a0 << 5 ^ a1 >>> 27; return out; }; XoroShiro128Plus$1.prototype.jump = function() { var nextRng = new XoroShiro128Plus$1(this.s01, this.s00, this.s11, this.s10); nextRng.unsafeJump(); return nextRng; }; XoroShiro128Plus$1.prototype.unsafeJump = function() { var ns01 = 0; var ns00 = 0; var ns11 = 0; var ns10 = 0; var jump = [ 3639956645, 3750757012, 1261568508, 386426335 ]; for (var i = 0; i !== 4; ++i) for (var mask = 1; mask; mask <<= 1) { if (jump[i] & mask) { ns01 ^= this.s01; ns00 ^= this.s00; ns11 ^= this.s11; ns10 ^= this.s10; } this.unsafeNext(); } this.s01 = ns01; this.s00 = ns00; this.s11 = ns11; this.s10 = ns10; }; XoroShiro128Plus$1.prototype.getState = function() { return [ this.s01, this.s00, this.s11, this.s10 ]; }; return XoroShiro128Plus$1; }(); function fromState(state) { var valid = state.length === 4; if (!valid) throw new Error("The state must have been produced by a xoroshiro128plus RandomGenerator"); return new XoroShiro128Plus(state[0], state[1], state[2], state[3]); } var xoroshiro128plus = Object.assign(function(seed) { return new XoroShiro128Plus(-1, ~seed, seed | 0, 0); }, { fromState }); //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js function addArrayIntToNew(arrayIntA, arrayIntB) { if (arrayIntA.sign !== arrayIntB.sign) return substractArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); var data = []; var reminder = 0; var dataA = arrayIntA.data; var dataB = arrayIntB.data; for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { var vA = indexA >= 0 ? dataA[indexA] : 0; var vB = indexB >= 0 ? dataB[indexB] : 0; var current = vA + vB + reminder; data.push(current >>> 0); reminder = ~~(current / 4294967296); } if (reminder !== 0) data.push(reminder); return { sign: arrayIntA.sign, data: data.reverse() }; } function addOneToPositiveArrayInt(arrayInt) { arrayInt.sign = 1; var data = arrayInt.data; for (var index = data.length - 1; index >= 0; --index) if (data[index] === 4294967295) data[index] = 0; else { data[index] += 1; return arrayInt; } data.unshift(1); return arrayInt; } function isStrictlySmaller(dataA, dataB) { var maxLength = Math.max(dataA.length, dataB.length); for (var index = 0; index < maxLength; ++index) { var indexA = index + dataA.length - maxLength; var indexB = index + dataB.length - maxLength; var vA = indexA >= 0 ? dataA[indexA] : 0; var vB = indexB >= 0 ? dataB[indexB] : 0; if (vA < vB) return true; if (vA > vB) return false; } return false; } function substractArrayIntToNew(arrayIntA, arrayIntB) { if (arrayIntA.sign !== arrayIntB.sign) return addArrayIntToNew(arrayIntA, { sign: -arrayIntB.sign, data: arrayIntB.data }); var dataA = arrayIntA.data; var dataB = arrayIntB.data; if (isStrictlySmaller(dataA, dataB)) { var out = substractArrayIntToNew(arrayIntB, arrayIntA); out.sign = -out.sign; return out; } var data = []; var reminder = 0; for (var indexA = dataA.length - 1, indexB = dataB.length - 1; indexA >= 0 || indexB >= 0; --indexA, --indexB) { var vA = indexA >= 0 ? dataA[indexA] : 0; var vB = indexB >= 0 ? dataB[indexB] : 0; var current = vA - vB - reminder; data.push(current >>> 0); reminder = current < 0 ? 1 : 0; } return { sign: arrayIntA.sign, data: data.reverse() }; } function trimArrayIntInplace(arrayInt) { var data = arrayInt.data; var firstNonZero = 0; for (; firstNonZero !== data.length && data[firstNonZero] === 0; ++firstNonZero); if (firstNonZero === data.length) { arrayInt.sign = 1; arrayInt.data = [0]; return arrayInt; } data.splice(0, firstNonZero); return arrayInt; } function fromNumberToArrayInt64(out, n) { if (n < 0) { var posN = -n; out.sign = -1; out.data[0] = ~~(posN / 4294967296); out.data[1] = posN >>> 0; } else { out.sign = 1; out.data[0] = ~~(n / 4294967296); out.data[1] = n >>> 0; } return out; } function substractArrayInt64(out, arrayIntA, arrayIntB) { var lowA = arrayIntA.data[1]; var highA = arrayIntA.data[0]; var signA = arrayIntA.sign; var lowB = arrayIntB.data[1]; var highB = arrayIntB.data[0]; var signB = arrayIntB.sign; out.sign = 1; if (signA === 1 && signB === -1) { var low_1 = lowA + lowB; var high = highA + highB + (low_1 > 4294967295 ? 1 : 0); out.data[0] = high >>> 0; out.data[1] = low_1 >>> 0; return out; } var lowFirst = lowA; var highFirst = highA; var lowSecond = lowB; var highSecond = highB; if (signA === -1) { lowFirst = lowB; highFirst = highB; lowSecond = lowA; highSecond = highA; } var reminderLow = 0; var low = lowFirst - lowSecond; if (low < 0) { reminderLow = 1; low = low >>> 0; } out.data[0] = highFirst - highSecond - reminderLow; out.data[1] = low; return out; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js function unsafeUniformIntDistributionInternal(rangeSize, rng) { var MaxAllowed = rangeSize > 2 ? ~~(4294967296 / rangeSize) * rangeSize : 4294967296; var deltaV = rng.unsafeNext() + 2147483648; while (deltaV >= MaxAllowed) deltaV = rng.unsafeNext() + 2147483648; return deltaV % rangeSize; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js function unsafeUniformArrayIntDistributionInternal(out, rangeSize, rng) { var rangeLength = rangeSize.length; while (true) { for (var index = 0; index !== rangeLength; ++index) { var indexRangeSize = index === 0 ? rangeSize[0] + 1 : 4294967296; var g = unsafeUniformIntDistributionInternal(indexRangeSize, rng); out[index] = g; } for (var index = 0; index !== rangeLength; ++index) { var current = out[index]; var currentInRange = rangeSize[index]; if (current < currentInRange) return out; else if (current > currentInRange) break; } } } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js function unsafeUniformArrayIntDistribution(from, to, rng) { var rangeSize = trimArrayIntInplace(addOneToPositiveArrayInt(substractArrayIntToNew(to, from))); var emptyArrayIntData = rangeSize.data.slice(0); var g = unsafeUniformArrayIntDistributionInternal(emptyArrayIntData, rangeSize.data, rng); return trimArrayIntInplace(addArrayIntToNew({ sign: 1, data: g }, from)); } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js function uniformArrayIntDistribution(from, to, rng) { if (rng != null) { var nextRng = rng.clone(); return [unsafeUniformArrayIntDistribution(from, to, nextRng), nextRng]; } return function(rng$1) { var nextRng$1 = rng$1.clone(); return [unsafeUniformArrayIntDistribution(from, to, nextRng$1), nextRng$1]; }; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js var SBigInt$1 = typeof BigInt !== "undefined" ? BigInt : void 0; function unsafeUniformBigIntDistribution(from, to, rng) { var diff = to - from + SBigInt$1(1); var MinRng = SBigInt$1(-2147483648); var NumValues = SBigInt$1(4294967296); var FinalNumValues = NumValues; var NumIterations = 1; while (FinalNumValues < diff) { FinalNumValues *= NumValues; ++NumIterations; } var MaxAcceptedRandom = FinalNumValues - FinalNumValues % diff; while (true) { var value = SBigInt$1(0); for (var num = 0; num !== NumIterations; ++num) { var out = rng.unsafeNext(); value = NumValues * value + (SBigInt$1(out) - MinRng); } if (value < MaxAcceptedRandom) { var inDiff = value % diff; return inDiff + from; } } } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js function uniformBigIntDistribution(from, to, rng) { if (rng != null) { var nextRng = rng.clone(); return [unsafeUniformBigIntDistribution(from, to, nextRng), nextRng]; } return function(rng$1) { var nextRng$1 = rng$1.clone(); return [unsafeUniformBigIntDistribution(from, to, nextRng$1), nextRng$1]; }; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js var safeNumberMaxSafeInteger = Number.MAX_SAFE_INTEGER; var sharedA = { sign: 1, data: [0, 0] }; var sharedB = { sign: 1, data: [0, 0] }; var sharedC = { sign: 1, data: [0, 0] }; var sharedData = [0, 0]; function uniformLargeIntInternal(from, to, rangeSize, rng) { var rangeSizeArrayIntValue = rangeSize <= safeNumberMaxSafeInteger ? fromNumberToArrayInt64(sharedC, rangeSize) : substractArrayInt64(sharedC, fromNumberToArrayInt64(sharedA, to), fromNumberToArrayInt64(sharedB, from)); if (rangeSizeArrayIntValue.data[1] === 4294967295) { rangeSizeArrayIntValue.data[0] += 1; rangeSizeArrayIntValue.data[1] = 0; } else rangeSizeArrayIntValue.data[1] += 1; unsafeUniformArrayIntDistributionInternal(sharedData, rangeSizeArrayIntValue.data, rng); return sharedData[0] * 4294967296 + sharedData[1] + from; } function unsafeUniformIntDistribution(from, to, rng) { var rangeSize = to - from; if (rangeSize <= 4294967295) { var g = unsafeUniformIntDistributionInternal(rangeSize + 1, rng); return g + from; } return uniformLargeIntInternal(from, to, rangeSize, rng); } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js function uniformIntDistribution(from, to, rng) { if (rng != null) { var nextRng = rng.clone(); return [unsafeUniformIntDistribution(from, to, nextRng), nextRng]; } return function(rng$1) { var nextRng$1 = rng$1.clone(); return [unsafeUniformIntDistribution(from, to, nextRng$1), nextRng$1]; }; } //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand-default.js var pure_rand_default_exports = {}; __export(pure_rand_default_exports, { __commitHash: () => __commitHash, __type: () => __type, __version: () => __version, congruential32: () => congruential32, generateN: () => generateN, mersenne: () => MersenneTwister_default, skipN: () => skipN, uniformArrayIntDistribution: () => uniformArrayIntDistribution, uniformBigIntDistribution: () => uniformBigIntDistribution, uniformIntDistribution: () => uniformIntDistribution, unsafeGenerateN: () => unsafeGenerateN, unsafeSkipN: () => unsafeSkipN, unsafeUniformArrayIntDistribution: () => unsafeUniformArrayIntDistribution, unsafeUniformBigIntDistribution: () => unsafeUniformBigIntDistribution, unsafeUniformIntDistribution: () => unsafeUniformIntDistribution, xoroshiro128plus: () => xoroshiro128plus, xorshift128plus: () => xorshift128plus }); var __type = "module"; var __version = "6.1.0"; var __commitHash = "a413dd2b721516be2ef29adffb515c5ae67bfbad"; //#endregion //#region node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand.js var pure_rand_default = pure_rand_default_exports; //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js var VerbosityLevel; (function(VerbosityLevel$1) { VerbosityLevel$1[VerbosityLevel$1["None"] = 0] = "None"; VerbosityLevel$1[VerbosityLevel$1["Verbose"] = 1] = "Verbose"; VerbosityLevel$1[VerbosityLevel$1["VeryVerbose"] = 2] = "VeryVerbose"; })(VerbosityLevel || (VerbosityLevel = {})); //#endregion //#region node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js const safeDateNow$1 = Date.now; const safeMathMin$5 = Math.min; const safeMathRandom = Math.random; var QualifiedParameters = class Quali