@foldkit/devtools-mcp 0.16.1-canary.85e5fda4e854 → 0.16.1-canary.9869cf777983

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +997 -661
  2. package/package.json +5 -5
package/dist/server.js CHANGED
@@ -9315,7 +9315,7 @@ var require_websocket = __commonJS({
9315
9315
  * not to skip UTF-8 validation for text and close messages
9316
9316
  * @private
9317
9317
  */
9318
- setSocket(socket, head2, options) {
9318
+ setSocket(socket, head4, options) {
9319
9319
  const receiver = new Receiver2({
9320
9320
  allowSynchronousEvents: options.allowSynchronousEvents,
9321
9321
  binaryType: this.binaryType,
@@ -9342,7 +9342,7 @@ var require_websocket = __commonJS({
9342
9342
  sender.onerror = senderOnError;
9343
9343
  if (socket.setTimeout) socket.setTimeout(0);
9344
9344
  if (socket.setNoDelay) socket.setNoDelay();
9345
- if (head2.length > 0) socket.unshift(head2);
9345
+ if (head4.length > 0) socket.unshift(head4);
9346
9346
  socket.on("close", socketOnClose);
9347
9347
  socket.on("data", socketOnData);
9348
9348
  socket.on("end", socketOnEnd);
@@ -9803,7 +9803,7 @@ var require_websocket = __commonJS({
9803
9803
  );
9804
9804
  }
9805
9805
  });
9806
- req.on("upgrade", (res, socket, head2) => {
9806
+ req.on("upgrade", (res, socket, head4) => {
9807
9807
  websocket.emit("upgrade", res);
9808
9808
  if (websocket.readyState !== WebSocket2.CONNECTING) return;
9809
9809
  req = websocket._req = null;
@@ -9863,7 +9863,7 @@ var require_websocket = __commonJS({
9863
9863
  }
9864
9864
  websocket._extensions[PerMessageDeflate2.extensionName] = perMessageDeflate;
9865
9865
  }
9866
- websocket.setSocket(socket, head2, {
9866
+ websocket.setSocket(socket, head4, {
9867
9867
  allowSynchronousEvents: opts.allowSynchronousEvents,
9868
9868
  generateMask: opts.generateMask,
9869
9869
  maxBufferedChunks: opts.maxBufferedChunks,
@@ -10282,8 +10282,8 @@ var require_websocket_server = __commonJS({
10282
10282
  this._removeListeners = addListeners(this._server, {
10283
10283
  listening: this.emit.bind(this, "listening"),
10284
10284
  error: this.emit.bind(this, "error"),
10285
- upgrade: (req, socket, head2) => {
10286
- this.handleUpgrade(req, socket, head2, emitConnection);
10285
+ upgrade: (req, socket, head4) => {
10286
+ this.handleUpgrade(req, socket, head4, emitConnection);
10287
10287
  }
10288
10288
  });
10289
10289
  }
@@ -10378,7 +10378,7 @@ var require_websocket_server = __commonJS({
10378
10378
  * @param {Function} cb Callback
10379
10379
  * @public
10380
10380
  */
10381
- handleUpgrade(req, socket, head2, cb) {
10381
+ handleUpgrade(req, socket, head4, cb) {
10382
10382
  socket.on("error", socketOnError);
10383
10383
  const key = req.headers["sec-websocket-key"];
10384
10384
  const upgrade = req.headers.upgrade;
@@ -10457,7 +10457,7 @@ var require_websocket_server = __commonJS({
10457
10457
  protocols,
10458
10458
  req,
10459
10459
  socket,
10460
- head2,
10460
+ head4,
10461
10461
  cb
10462
10462
  );
10463
10463
  });
@@ -10465,7 +10465,7 @@ var require_websocket_server = __commonJS({
10465
10465
  }
10466
10466
  if (!this.options.verifyClient(info2)) return abortHandshake(socket, 401);
10467
10467
  }
10468
- this.completeUpgrade(extensions, key, protocols, req, socket, head2, cb);
10468
+ this.completeUpgrade(extensions, key, protocols, req, socket, head4, cb);
10469
10469
  }
10470
10470
  /**
10471
10471
  * Upgrade the connection to WebSocket.
@@ -10480,7 +10480,7 @@ var require_websocket_server = __commonJS({
10480
10480
  * @throws {Error} If called more than once with the same socket
10481
10481
  * @private
10482
10482
  */
10483
- completeUpgrade(extensions, key, protocols, req, socket, head2, cb) {
10483
+ completeUpgrade(extensions, key, protocols, req, socket, head4, cb) {
10484
10484
  if (!socket.readable || !socket.writable) return socket.destroy();
10485
10485
  if (socket[kWebSocket]) {
10486
10486
  throw new Error(
@@ -10514,7 +10514,7 @@ var require_websocket_server = __commonJS({
10514
10514
  this.emit("headers", headers, req);
10515
10515
  socket.write(headers.concat("\r\n").join("\r\n"));
10516
10516
  socket.removeListener("error", socketOnError);
10517
- ws.setSocket(socket, head2, {
10517
+ ws.setSocket(socket, head4, {
10518
10518
  allowSynchronousEvents: this.options.allowSynchronousEvents,
10519
10519
  maxBufferedChunks: this.options.maxBufferedChunks,
10520
10520
  maxFragments: this.options.maxFragments,
@@ -10575,7 +10575,7 @@ var require_websocket_server = __commonJS({
10575
10575
  }
10576
10576
  });
10577
10577
 
10578
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Pipeable.js
10578
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Pipeable.js
10579
10579
  var pipeArguments = (self, args2) => {
10580
10580
  switch (args2.length) {
10581
10581
  case 0:
@@ -10619,7 +10619,7 @@ var Class = /* @__PURE__ */ (function() {
10619
10619
  return PipeableBase;
10620
10620
  })();
10621
10621
 
10622
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Function.js
10622
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Function.js
10623
10623
  var dual = function(arity, body) {
10624
10624
  if (typeof arity === "function") {
10625
10625
  return function() {
@@ -10692,7 +10692,7 @@ function memoizeIdempotent(f) {
10692
10692
  };
10693
10693
  }
10694
10694
 
10695
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Array.js
10695
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Array.js
10696
10696
  var Array_exports = {};
10697
10697
  __export(Array_exports, {
10698
10698
  Array: () => Array2,
@@ -10830,7 +10830,7 @@ __export(Array_exports, {
10830
10830
  zipWith: () => zipWith2
10831
10831
  });
10832
10832
 
10833
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/equal.js
10833
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/equal.js
10834
10834
  var getAllObjectKeys = (obj) => {
10835
10835
  const keys4 = new Set(Reflect.ownKeys(obj));
10836
10836
  if (obj.constructor === Object) return keys4;
@@ -10853,7 +10853,7 @@ var getAllObjectKeys = (obj) => {
10853
10853
  };
10854
10854
  var byReferenceInstances = /* @__PURE__ */ new WeakSet();
10855
10855
 
10856
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Predicate.js
10856
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Predicate.js
10857
10857
  function isString(input) {
10858
10858
  return typeof input === "string";
10859
10859
  }
@@ -10911,7 +10911,7 @@ function isIterable(input) {
10911
10911
  return hasProperty(input, Symbol.iterator) || isString(input);
10912
10912
  }
10913
10913
 
10914
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Hash.js
10914
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Hash.js
10915
10915
  var symbol = "~effect/interfaces/Hash";
10916
10916
  var hash = (self) => {
10917
10917
  switch (typeof self) {
@@ -11025,17 +11025,17 @@ var hashSet = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string("Set"), hash);
11025
11025
  var randomHashCache = /* @__PURE__ */ new WeakMap();
11026
11026
  var hashCache = /* @__PURE__ */ new WeakMap();
11027
11027
  var visitedObjects = /* @__PURE__ */ new WeakSet();
11028
- function withVisitedTracking(obj, fn3) {
11028
+ function withVisitedTracking(obj, fn5) {
11029
11029
  if (visitedObjects.has(obj)) {
11030
11030
  return string("[Circular]");
11031
11031
  }
11032
11032
  visitedObjects.add(obj);
11033
- const result5 = fn3();
11033
+ const result5 = fn5();
11034
11034
  visitedObjects.delete(obj);
11035
11035
  return result5;
11036
11036
  }
11037
11037
 
11038
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Equal.js
11038
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Equal.js
11039
11039
  var symbol2 = "~effect/interfaces/Equal";
11040
11040
  function equals() {
11041
11041
  if (arguments.length === 1) {
@@ -11061,7 +11061,7 @@ function compareBoth(self, that) {
11061
11061
  }
11062
11062
  return withCache(self, that, compareObjects);
11063
11063
  }
11064
- function withVisitedTracking2(self, that, fn3) {
11064
+ function withVisitedTracking2(self, that, fn5) {
11065
11065
  const hasLeft = visitedLeft.has(self);
11066
11066
  const hasRight = visitedRight.has(that);
11067
11067
  if (hasLeft && hasRight) {
@@ -11072,7 +11072,7 @@ function withVisitedTracking2(self, that, fn3) {
11072
11072
  }
11073
11073
  visitedLeft.add(self);
11074
11074
  visitedRight.add(that);
11075
- const result5 = fn3();
11075
+ const result5 = fn5();
11076
11076
  visitedLeft.delete(self);
11077
11077
  visitedRight.delete(that);
11078
11078
  return result5;
@@ -11232,7 +11232,7 @@ var byReferenceUnsafe = (obj) => {
11232
11232
  return obj;
11233
11233
  };
11234
11234
 
11235
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Reducer.js
11235
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Reducer.js
11236
11236
  function make(combine2, initialValue, combineAll2) {
11237
11237
  return {
11238
11238
  combine: combine2,
@@ -11247,7 +11247,7 @@ function make(combine2, initialValue, combineAll2) {
11247
11247
  };
11248
11248
  }
11249
11249
 
11250
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Equivalence.js
11250
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Equivalence.js
11251
11251
  var make2 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
11252
11252
  var isStrictEquivalent = (x, y) => x === y;
11253
11253
  var strictEqual = () => isStrictEquivalent;
@@ -11261,10 +11261,10 @@ function Array_(item) {
11261
11261
  });
11262
11262
  }
11263
11263
 
11264
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/array.js
11264
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/array.js
11265
11265
  var isArrayNonEmpty = (self) => self.length > 0;
11266
11266
 
11267
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/doNotation.js
11267
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/doNotation.js
11268
11268
  var let_ = (map14) => dual(3, (self, name, f) => map14(self, (a) => ({
11269
11269
  ...a,
11270
11270
  [name]: f(a)
@@ -11277,7 +11277,7 @@ var bind = (map14, flatMap8) => dual(3, (self, name, f) => flatMap8(self, (a) =>
11277
11277
  [name]: b
11278
11278
  }))));
11279
11279
 
11280
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/record.js
11280
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/record.js
11281
11281
  function assignProperty(self, key, value5) {
11282
11282
  if (key === "__proto__") {
11283
11283
  Object.defineProperty(self, key, {
@@ -11299,7 +11299,7 @@ function assignProperties(self, source) {
11299
11299
  }
11300
11300
  }
11301
11301
 
11302
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Option.js
11302
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Option.js
11303
11303
  var Option_exports = {};
11304
11304
  __export(Option_exports, {
11305
11305
  Do: () => Do,
@@ -11364,7 +11364,7 @@ __export(Option_exports, {
11364
11364
  zipWith: () => zipWith
11365
11365
  });
11366
11366
 
11367
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Combiner.js
11367
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Combiner.js
11368
11368
  function make3(combine2) {
11369
11369
  return {
11370
11370
  combine: combine2
@@ -11377,7 +11377,7 @@ function max(order) {
11377
11377
  return make3((self, that) => order(self, that) === 1 ? self : that);
11378
11378
  }
11379
11379
 
11380
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Redactable.js
11380
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Redactable.js
11381
11381
  var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
11382
11382
  var isRedactable = (u) => hasProperty(u, symbolRedactable);
11383
11383
  function redact(u) {
@@ -11399,7 +11399,7 @@ var emptyContext = {
11399
11399
  }
11400
11400
  };
11401
11401
 
11402
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Formatter.js
11402
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Formatter.js
11403
11403
  function format(input, options) {
11404
11404
  const space = options?.space ?? 0;
11405
11405
  const ancestors = /* @__PURE__ */ new WeakSet();
@@ -11500,7 +11500,7 @@ function formatJson(input, options) {
11500
11500
  }, options?.space) ?? "null";
11501
11501
  }
11502
11502
 
11503
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Inspectable.js
11503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Inspectable.js
11504
11504
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
11505
11505
  var toJson = (input) => {
11506
11506
  try {
@@ -11567,7 +11567,7 @@ var Class2 = class {
11567
11567
  }
11568
11568
  };
11569
11569
 
11570
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Utils.js
11570
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Utils.js
11571
11571
  var SingleShotGen = class _SingleShotGen {
11572
11572
  called = false;
11573
11573
  self;
@@ -11627,7 +11627,7 @@ var pickInternalCall = () => {
11627
11627
  };
11628
11628
  var internalCall = /* @__PURE__ */ pickInternalCall();
11629
11629
 
11630
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/core.js
11630
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/core.js
11631
11631
  var EffectTypeId = `~effect/Effect`;
11632
11632
  var ExitTypeId = `~effect/Exit`;
11633
11633
  var effectVariance = {
@@ -11988,7 +11988,7 @@ var done = (value5) => {
11988
11988
  return exitFail(Done(value5));
11989
11989
  };
11990
11990
 
11991
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/option.js
11991
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/option.js
11992
11992
  var TypeId = "~effect/data/Option";
11993
11993
  var CommonProto = {
11994
11994
  [TypeId]: {
@@ -12054,7 +12054,7 @@ var some = (value5) => {
12054
12054
  return a;
12055
12055
  };
12056
12056
 
12057
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/result.js
12057
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/result.js
12058
12058
  var TypeId2 = "~effect/data/Result";
12059
12059
  var CommonProto2 = {
12060
12060
  [TypeId2]: {
@@ -12124,7 +12124,7 @@ var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
12124
12124
  var getSuccess = (self) => isFailure(self) ? none : some(self.success);
12125
12125
  var fromOption = /* @__PURE__ */ dual(2, (self, onNone) => isNone(self) ? fail(onNone()) : succeed(self.value));
12126
12126
 
12127
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Order.js
12127
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Order.js
12128
12128
  function make4(compare) {
12129
12129
  return (self, that) => self === that ? 0 : compare(self, that);
12130
12130
  }
@@ -12172,7 +12172,7 @@ var max2 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ?
12172
12172
  var clamp = (O) => dual(2, (self, options) => min2(O)(options.maximum, max2(O)(options.minimum, self)));
12173
12173
  var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.minimum) && !isGreaterThan(O)(self, options.maximum));
12174
12174
 
12175
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Option.js
12175
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Option.js
12176
12176
  var none2 = () => none;
12177
12177
  var some2 = some;
12178
12178
  var isOption2 = isOption;
@@ -12350,7 +12350,7 @@ function makeReducerFailFast(reducer2) {
12350
12350
  });
12351
12351
  }
12352
12352
 
12353
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Result.js
12353
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Result.js
12354
12354
  var succeed2 = succeed;
12355
12355
  var fail2 = fail;
12356
12356
  var fromOption2 = fromOption;
@@ -12407,10 +12407,10 @@ var all2 = (input) => {
12407
12407
  return succeed2(out);
12408
12408
  };
12409
12409
 
12410
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Tuple.js
12410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tuple.js
12411
12411
  var make5 = (...elements) => elements;
12412
12412
 
12413
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Iterable.js
12413
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Iterable.js
12414
12414
  var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
12415
12415
  let i = 0;
12416
12416
  for (const a of self) {
@@ -12453,7 +12453,7 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
12453
12453
  }
12454
12454
  }));
12455
12455
 
12456
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Record.js
12456
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Record.js
12457
12457
  var collect = /* @__PURE__ */ dual(2, (self, f) => {
12458
12458
  const out = [];
12459
12459
  for (const key of keys(self)) {
@@ -12473,7 +12473,7 @@ var map3 = /* @__PURE__ */ dual(2, (self, f) => {
12473
12473
  });
12474
12474
  var keys = (self) => Object.keys(self);
12475
12475
 
12476
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Array.js
12476
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Array.js
12477
12477
  var Array2 = globalThis.Array;
12478
12478
  var make6 = (...elements) => elements;
12479
12479
  var allocate = (n) => new Array2(n);
@@ -12503,7 +12503,7 @@ var matchRight = /* @__PURE__ */ dual(2, (self, {
12503
12503
  onEmpty,
12504
12504
  onNonEmpty
12505
12505
  }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
12506
- var prepend = /* @__PURE__ */ dual(2, (self, head2) => [head2, ...self]);
12506
+ var prepend = /* @__PURE__ */ dual(2, (self, head4) => [head4, ...self]);
12507
12507
  var prependAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(that).concat(fromIterable2(self)));
12508
12508
  var append = /* @__PURE__ */ dual(2, (self, last2) => [...self, last2]);
12509
12509
  var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(self).concat(fromIterable2(that)));
@@ -13178,7 +13178,7 @@ var countBy = /* @__PURE__ */ dual(2, (self, f) => {
13178
13178
  return count2;
13179
13179
  });
13180
13180
 
13181
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/BigDecimal.js
13181
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/BigDecimal.js
13182
13182
  var FINITE_INT_REGEXP = /^[+-]?\d+$/;
13183
13183
  var TypeId3 = "~effect/BigDecimal";
13184
13184
  var BigDecimalProto = {
@@ -13373,9 +13373,9 @@ var toExponential = (n) => {
13373
13373
  }
13374
13374
  const normalized = normalize(n);
13375
13375
  const digits = `${abs(normalized).value}`;
13376
- const head2 = digits.slice(0, 1);
13376
+ const head4 = digits.slice(0, 1);
13377
13377
  const tail2 = digits.slice(1);
13378
- let output = `${isNegative(normalized) ? "-" : ""}${head2}`;
13378
+ let output = `${isNegative(normalized) ? "-" : ""}${head4}`;
13379
13379
  if (tail2 !== "") {
13380
13380
  output += `.${tail2}`;
13381
13381
  }
@@ -13407,11 +13407,11 @@ var floor = /* @__PURE__ */ dual(isBigDecimalArgs, (self, scale2 = 0) => {
13407
13407
  return truncated;
13408
13408
  });
13409
13409
 
13410
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Boolean.js
13410
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Boolean.js
13411
13411
  var Boolean2 = globalThis.Boolean;
13412
13412
  var ReducerOr = /* @__PURE__ */ make((a, b) => a || b, false);
13413
13413
 
13414
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaAST.js
13414
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
13415
13415
  var SchemaAST_exports = {};
13416
13416
  __export(SchemaAST_exports, {
13417
13417
  Any: () => Any,
@@ -13547,13 +13547,13 @@ __export(SchemaAST_exports, {
13547
13547
  withConstructorDefault: () => withConstructorDefault
13548
13548
  });
13549
13549
 
13550
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Effectable.js
13550
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effectable.js
13551
13551
  var Prototype2 = (options) => makePrimitiveProto({
13552
13552
  op: options.label,
13553
13553
  [evaluate]: options.evaluate
13554
13554
  });
13555
13555
 
13556
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Context.js
13556
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Context.js
13557
13557
  var ServiceTypeId = "~effect/Context/Service";
13558
13558
  var Service = function() {
13559
13559
  function KeyClass() {
@@ -13653,13 +13653,13 @@ var lookup = (self, key) => {
13653
13653
  };
13654
13654
  var makeUnsafe = (mapUnsafe) => makeImpl(void 0, mapUnsafe, void 0, 0);
13655
13655
  var Proto = {
13656
+ get mapUnsafe() {
13657
+ return flatten3(this);
13658
+ },
13656
13659
  ...PipeInspectableProto,
13657
13660
  [TypeId4]: {
13658
13661
  _Services: (_) => _
13659
13662
  },
13660
- get mapUnsafe() {
13661
- return flatten3(this);
13662
- },
13663
13663
  toJSON() {
13664
13664
  return {
13665
13665
  _id: "Context",
@@ -13755,7 +13755,7 @@ var mergeAll = (...ctxs) => {
13755
13755
  };
13756
13756
  var Reference = Service;
13757
13757
 
13758
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Duration.js
13758
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Duration.js
13759
13759
  var Duration_exports = {};
13760
13760
  __export(Duration_exports, {
13761
13761
  CombinerMax: () => CombinerMax,
@@ -14343,7 +14343,7 @@ var ReducerSum = /* @__PURE__ */ make(sum2, zero2);
14343
14343
  var CombinerMax = /* @__PURE__ */ max(Order2);
14344
14344
  var CombinerMin = /* @__PURE__ */ min(Order2);
14345
14345
 
14346
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Filter.js
14346
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Filter.js
14347
14347
  var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14348
14348
  const leftOut = left(input);
14349
14349
  if (isFailure2(leftOut)) return fail2(input);
@@ -14352,7 +14352,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14352
14352
  return rightOut;
14353
14353
  });
14354
14354
 
14355
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Scheduler.js
14355
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scheduler.js
14356
14356
  var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
14357
14357
  fiberCached: true,
14358
14358
  defaultValue: () => new MixedScheduler()
@@ -14489,7 +14489,199 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
14489
14489
  defaultValue: () => false
14490
14490
  });
14491
14491
 
14492
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Tracer.js
14492
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Data.js
14493
+ var Class3 = class extends Class {
14494
+ constructor(props) {
14495
+ super();
14496
+ if (props) {
14497
+ assignProperties(this, props);
14498
+ }
14499
+ }
14500
+ };
14501
+ var TaggedError2 = TaggedError;
14502
+
14503
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Encoding.js
14504
+ var EncodingErrorTypeId = "~effect/encoding/EncodingError";
14505
+ var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
14506
+ /**
14507
+ * Marks this value as an encoding or decoding error for runtime guards.
14508
+ *
14509
+ * **When to use**
14510
+ *
14511
+ * Use to identify `EncodingError` instances through `isEncodingError`.
14512
+ *
14513
+ * @since 4.0.0
14514
+ */
14515
+ [EncodingErrorTypeId] = EncodingErrorTypeId;
14516
+ };
14517
+ var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
14518
+ var decodeBase64 = (str) => {
14519
+ const stripped = stripCrlf(str);
14520
+ const length2 = stripped.length;
14521
+ if (length2 % 4 !== 0) {
14522
+ return fail2(new EncodingError({
14523
+ kind: "Decode",
14524
+ module: "Base64",
14525
+ input: stripped,
14526
+ message: `Length must be a multiple of 4, but is ${length2}`
14527
+ }));
14528
+ }
14529
+ const index2 = stripped.indexOf("=");
14530
+ if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
14531
+ return fail2(new EncodingError({
14532
+ kind: "Decode",
14533
+ module: "Base64",
14534
+ input: stripped,
14535
+ message: `Found a '=' character, but it is not at the end`
14536
+ }));
14537
+ }
14538
+ try {
14539
+ const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
14540
+ const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
14541
+ for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
14542
+ const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
14543
+ result5[j] = buffer >> 16;
14544
+ result5[j + 1] = buffer >> 8 & 255;
14545
+ result5[j + 2] = buffer & 255;
14546
+ }
14547
+ return succeed2(result5);
14548
+ } catch (e) {
14549
+ return fail2(new EncodingError({
14550
+ kind: "Decode",
14551
+ module: "Base64",
14552
+ input: stripped,
14553
+ message: e instanceof Error ? e.message : "Invalid input"
14554
+ }));
14555
+ }
14556
+ };
14557
+ var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
14558
+ var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
14559
+ var decodeBase64Url = (str) => {
14560
+ const stripped = stripCrlf(str);
14561
+ const length2 = stripped.length;
14562
+ if (length2 % 4 === 1) {
14563
+ return fail2(new EncodingError({
14564
+ module: "Base64Url",
14565
+ kind: "Decode",
14566
+ input: stripped,
14567
+ message: `Length should be a multiple of 4, but is ${length2}`
14568
+ }));
14569
+ }
14570
+ if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
14571
+ return fail2(new EncodingError({
14572
+ module: "Base64Url",
14573
+ kind: "Decode",
14574
+ input: stripped,
14575
+ message: "Invalid input"
14576
+ }));
14577
+ }
14578
+ let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
14579
+ sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
14580
+ return decodeBase64(sanitized);
14581
+ };
14582
+ var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
14583
+ var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
14584
+ var randomHex = (length2) => {
14585
+ let result5 = "";
14586
+ for (let i = length2 >>> 3; i > 0; i--) {
14587
+ const word = Math.random() * 4294967296 >>> 0;
14588
+ result5 += byteToHex[word >>> 24] + byteToHex[word >>> 16 & 255] + byteToHex[word >>> 8 & 255] + byteToHex[word & 255];
14589
+ }
14590
+ return result5;
14591
+ };
14592
+ var decodeHex = (str) => {
14593
+ const bytes = new TextEncoder().encode(str);
14594
+ if (bytes.length % 2 !== 0) {
14595
+ return fail2(new EncodingError({
14596
+ module: "Hex",
14597
+ kind: "Decode",
14598
+ input: str,
14599
+ message: `Length must be a multiple of 2, but is ${bytes.length}`
14600
+ }));
14601
+ }
14602
+ try {
14603
+ const length2 = bytes.length / 2;
14604
+ const result5 = new Uint8Array(length2);
14605
+ for (let i = 0; i < length2; i++) {
14606
+ const a = fromHexChar(bytes[i * 2]);
14607
+ const b = fromHexChar(bytes[i * 2 + 1]);
14608
+ result5[i] = a << 4 | b;
14609
+ }
14610
+ return succeed2(result5);
14611
+ } catch (e) {
14612
+ return fail2(new EncodingError({
14613
+ module: "Hex",
14614
+ kind: "Decode",
14615
+ input: str,
14616
+ message: e instanceof Error ? e.message : "Invalid input"
14617
+ }));
14618
+ }
14619
+ };
14620
+ var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
14621
+ var encoder = /* @__PURE__ */ new TextEncoder();
14622
+ var decoder = /* @__PURE__ */ new TextDecoder();
14623
+ var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
14624
+ var base64EncodeUint8Array = (bytes) => {
14625
+ const length2 = bytes.length;
14626
+ let result5 = "";
14627
+ let i;
14628
+ for (i = 2; i < length2; i += 3) {
14629
+ result5 += base64abc[bytes[i - 2] >> 2];
14630
+ result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
14631
+ result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
14632
+ result5 += base64abc[bytes[i] & 63];
14633
+ }
14634
+ if (i === length2 + 1) {
14635
+ result5 += base64abc[bytes[i - 2] >> 2];
14636
+ result5 += base64abc[(bytes[i - 2] & 3) << 4];
14637
+ result5 += "==";
14638
+ }
14639
+ if (i === length2) {
14640
+ result5 += base64abc[bytes[i - 2] >> 2];
14641
+ result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
14642
+ result5 += base64abc[(bytes[i - 1] & 15) << 2];
14643
+ result5 += "=";
14644
+ }
14645
+ return result5;
14646
+ };
14647
+ function getBase64Code(charCode) {
14648
+ if (charCode >= base64codes.length) {
14649
+ throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
14650
+ }
14651
+ const code = base64codes[charCode];
14652
+ if (code === 255) {
14653
+ throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
14654
+ }
14655
+ return code;
14656
+ }
14657
+ var base64abc = ["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", "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", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
14658
+ var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
14659
+ var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
14660
+ var byteToHex = [];
14661
+ for (let i = 0; i < 256; i++) {
14662
+ byteToHex.push(i.toString(16).padStart(2, "0"));
14663
+ }
14664
+ var hexEncodeUint8Array = (bytes) => {
14665
+ let result5 = "";
14666
+ for (let i = 0; i < bytes.length; i++) {
14667
+ result5 += byteToHex[bytes[i]];
14668
+ }
14669
+ return result5;
14670
+ };
14671
+ var fromHexChar = (byte) => {
14672
+ if (48 <= byte && byte <= 57) {
14673
+ return byte - 48;
14674
+ }
14675
+ if (97 <= byte && byte <= 102) {
14676
+ return byte - 97 + 10;
14677
+ }
14678
+ if (65 <= byte && byte <= 70) {
14679
+ return byte - 65 + 10;
14680
+ }
14681
+ throw new TypeError("Invalid input");
14682
+ };
14683
+
14684
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Tracer.js
14493
14685
  var ParentSpanKey = "effect/Tracer/ParentSpan";
14494
14686
  var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey, {
14495
14687
  fiberCached: true
@@ -14539,8 +14731,8 @@ var NativeSpan = class {
14539
14731
  startTime: options.startTime
14540
14732
  };
14541
14733
  this.attributes = /* @__PURE__ */ new Map();
14542
- this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHexString(32);
14543
- this.spanId = randomHexString(16);
14734
+ this.traceId = getOrUndefined(options.parent)?.traceId ?? randomHex(32);
14735
+ this.spanId = randomHex(16);
14544
14736
  }
14545
14737
  end(endTime, exit3) {
14546
14738
  this.status = {
@@ -14560,22 +14752,11 @@ var NativeSpan = class {
14560
14752
  this.links.push(...links);
14561
14753
  }
14562
14754
  };
14563
- var randomHexString = /* @__PURE__ */ (function() {
14564
- const characters = "abcdef0123456789";
14565
- const charactersLength = characters.length;
14566
- return function(length2) {
14567
- let result5 = "";
14568
- for (let i = 0; i < length2; i++) {
14569
- result5 += characters.charAt(Math.floor(Math.random() * charactersLength));
14570
- }
14571
- return result5;
14572
- };
14573
- })();
14574
14755
 
14575
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/metric.js
14756
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/metric.js
14576
14757
  var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
14577
14758
 
14578
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/references.js
14759
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/references.js
14579
14760
  var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
14580
14761
  defaultValue: () => /* @__PURE__ */ new Set()
14581
14762
  });
@@ -14610,7 +14791,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
14610
14791
  defaultValue: () => []
14611
14792
  });
14612
14793
 
14613
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/stackTraceLimit.js
14794
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/stackTraceLimit.js
14614
14795
  var isStackTraceLimitWritable = () => {
14615
14796
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
14616
14797
  if (desc === void 0) {
@@ -14627,7 +14808,7 @@ var setStackTraceLimit = (value5) => {
14627
14808
  }
14628
14809
  };
14629
14810
 
14630
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/tracer.js
14811
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/tracer.js
14631
14812
  var addSpanStackTrace = (options) => {
14632
14813
  if (options?.captureStackTrace === false) {
14633
14814
  return options;
@@ -14658,7 +14839,7 @@ var makeStackCleaner = (line) => (stack) => {
14658
14839
  };
14659
14840
  var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
14660
14841
 
14661
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/effect.js
14842
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/effect.js
14662
14843
  var Interrupt = class extends ReasonBase {
14663
14844
  fiberId;
14664
14845
  constructor(fiberId3, annotations = constEmptyAnnotations) {
@@ -14961,6 +15142,7 @@ var FiberImpl = class {
14961
15142
  }
14962
15143
  this._observers.push(cb);
14963
15144
  return () => {
15145
+ if (this._exit) return;
14964
15146
  const index2 = this._observers.indexOf(cb);
14965
15147
  if (index2 >= 0) {
14966
15148
  this._observers.splice(index2, 1);
@@ -15353,7 +15535,7 @@ var callback = (register) => callbackOptions(register, register.length >= 2);
15353
15535
  var never = /* @__PURE__ */ callback(constVoid);
15354
15536
  var gen2 = (...args2) => suspend(() => fromIteratorUnsafe(args2.length === 1 ? args2[0]() : args2[1].call(args2[0].self)));
15355
15537
  var fnUntraced = (body, ...pipeables) => {
15356
- const fn3 = pipeables.length === 0 ? function() {
15538
+ const fn5 = pipeables.length === 0 ? function() {
15357
15539
  return suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
15358
15540
  } : function() {
15359
15541
  let effect = suspend(() => fromIteratorUnsafe(body.apply(this, arguments)));
@@ -15362,9 +15544,9 @@ var fnUntraced = (body, ...pipeables) => {
15362
15544
  }
15363
15545
  return effect;
15364
15546
  };
15365
- return defineFunctionLength(body.length, fn3);
15547
+ return defineFunctionLength(body.length, fn5);
15366
15548
  };
15367
- var defineFunctionLength = (length2, fn3) => Object.defineProperty(fn3, "length", {
15549
+ var defineFunctionLength = (length2, fn5) => Object.defineProperty(fn5, "length", {
15368
15550
  value: length2,
15369
15551
  configurable: true
15370
15552
  });
@@ -15383,7 +15565,7 @@ var fn = function() {
15383
15565
  return makeFn(name, arguments[0], defError, Array.prototype.slice.call(arguments, 1), nameFirst, spanOptions);
15384
15566
  };
15385
15567
  var makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
15386
- const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.pop().bind(bodyOrOptions.self);
15568
+ const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
15387
15569
  return defineFunctionLength(body.length, function(...args2) {
15388
15570
  let result5 = suspend(() => {
15389
15571
  const iter = body.apply(this, arguments);
@@ -15958,6 +16140,7 @@ var scopeCloseUnsafe = (self, exit_) => {
15958
16140
  }
15959
16141
  return scopeCloseFinalizers(self, finalizers, exit_);
15960
16142
  };
16143
+ var combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause(finalizer, (cause) => failCause(causeCombine(exit_.cause, cause)));
15961
16144
  var scopeCloseFinalizers = /* @__PURE__ */ fnUntraced(function* (self, finalizers, exit_) {
15962
16145
  let exits = [];
15963
16146
  const fibers = [];
@@ -16057,7 +16240,7 @@ var onExitPrimitive = /* @__PURE__ */ makePrimitive({
16057
16240
  [contE](cause, _, exit3) {
16058
16241
  exit3 ??= exitFailCause(cause);
16059
16242
  const eff = this[args][1](exit3);
16060
- return eff ? flatMap4(eff, (_2) => exit3) : exit3;
16243
+ return eff ? flatMap4(combineFinalizerCause(exit3, eff), (_2) => exit3) : exit3;
16061
16244
  }
16062
16245
  });
16063
16246
  var onExit = /* @__PURE__ */ dual(2, onExitPrimitive);
@@ -16273,6 +16456,10 @@ var forEach2 = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (
16273
16456
  });
16274
16457
  return eff ? as2(eff, out) : succeed3(out);
16275
16458
  }));
16459
+ var head2 = (self) => flatMap4(self, (elements) => {
16460
+ const result5 = elements[Symbol.iterator]().next();
16461
+ return result5.done ? fail3(new NoSuchElementError()) : succeed3(result5.value);
16462
+ });
16276
16463
  var forEachSequential = (iterable, f, options) => suspend(() => {
16277
16464
  const out = options?.discard ? void 0 : [];
16278
16465
  const iterator = iterable[Symbol.iterator]();
@@ -16761,7 +16948,7 @@ var makeSpanUnsafe = (fiber3, name, options) => {
16761
16948
  const annotationsFromEnv = fiber3.getRef(TracerSpanAnnotations);
16762
16949
  const linksFromEnv = fiber3.getRef(TracerSpanLinks);
16763
16950
  const level = options?.level ?? fiber3.getRef(CurrentTraceLevel);
16764
- const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.slice();
16951
+ const links = options?.links !== void 0 ? [...linksFromEnv, ...options.links] : linksFromEnv.length === 0 ? [] : linksFromEnv.slice();
16765
16952
  span2 = tracer3.span({
16766
16953
  name,
16767
16954
  parent,
@@ -16772,12 +16959,12 @@ var makeSpanUnsafe = (fiber3, name, options) => {
16772
16959
  root: options?.root ?? isNone2(parent),
16773
16960
  sampled: options?.sampled ?? (isSome2(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber3.getRef(MinimumTraceLevel), level))
16774
16961
  });
16775
- for (const [key, value5] of Object.entries(annotationsFromEnv)) {
16776
- span2.attribute(key, value5);
16962
+ for (const key in annotationsFromEnv) {
16963
+ span2.attribute(key, annotationsFromEnv[key]);
16777
16964
  }
16778
16965
  if (options?.attributes !== void 0) {
16779
- for (const [key, value5] of Object.entries(options.attributes)) {
16780
- span2.attribute(key, value5);
16966
+ for (const key in options.attributes) {
16967
+ span2.attribute(key, options.attributes[key]);
16781
16968
  }
16782
16969
  }
16783
16970
  }
@@ -17219,7 +17406,7 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
17219
17406
  reporters.forEach((reporter) => reporter.report(opts));
17220
17407
  };
17221
17408
 
17222
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Cause.js
17409
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cause.js
17223
17410
  var isCause2 = isCause;
17224
17411
  var isReason = isCauseReason;
17225
17412
  var isFailReason2 = isFailReason;
@@ -17229,13 +17416,12 @@ var makeFailReason = (error3) => new Fail(error3);
17229
17416
  var makeDieReason = (defect) => new Die(defect);
17230
17417
  var makeInterruptReason2 = makeInterruptReason;
17231
17418
  var map6 = causeMap;
17232
- var findError2 = findError;
17233
17419
  var pretty = causePretty;
17234
17420
  var isDone2 = isDone;
17235
17421
  var done2 = done;
17236
17422
  var IllegalArgumentError2 = IllegalArgumentError;
17237
17423
 
17238
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Effect.js
17424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
17239
17425
  var Effect_exports = {};
17240
17426
  __export(Effect_exports, {
17241
17427
  Do: () => Do4,
@@ -17319,6 +17505,7 @@ __export(Effect_exports, {
17319
17505
  fromOption: () => fromOption5,
17320
17506
  fromResult: () => fromResult2,
17321
17507
  gen: () => gen3,
17508
+ head: () => head3,
17322
17509
  ignore: () => ignore2,
17323
17510
  ignoreCause: () => ignoreCause2,
17324
17511
  interrupt: () => interrupt4,
@@ -17467,7 +17654,7 @@ __export(Effect_exports, {
17467
17654
  zipWith: () => zipWith4
17468
17655
  });
17469
17656
 
17470
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Exit.js
17657
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Exit.js
17471
17658
  var Exit_exports = {};
17472
17659
  __export(Exit_exports, {
17473
17660
  asVoid: () => asVoid3,
@@ -17480,7 +17667,7 @@ __export(Exit_exports, {
17480
17667
  filterSuccess: () => filterSuccess,
17481
17668
  filterValue: () => filterValue,
17482
17669
  findDefect: () => findDefect2,
17483
- findError: () => findError3,
17670
+ findError: () => findError2,
17484
17671
  findErrorOption: () => findErrorOption2,
17485
17672
  getCause: () => getCause,
17486
17673
  getSuccess: () => getSuccess3,
@@ -17514,7 +17701,7 @@ var filterSuccess = exitFilterSuccess;
17514
17701
  var filterValue = exitFilterValue;
17515
17702
  var filterFailure = exitFilterFailure;
17516
17703
  var filterCause = exitFilterCause;
17517
- var findError3 = exitFindError;
17704
+ var findError2 = exitFindError;
17518
17705
  var findDefect2 = exitFindDefect;
17519
17706
  var match6 = exitMatch;
17520
17707
  var map7 = exitMap;
@@ -17526,7 +17713,7 @@ var getSuccess3 = exitGetSuccess;
17526
17713
  var getCause = exitGetCause;
17527
17714
  var findErrorOption2 = exitFindErrorOption;
17528
17715
 
17529
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Deferred.js
17716
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Deferred.js
17530
17717
  var Deferred_exports = {};
17531
17718
  __export(Deferred_exports, {
17532
17719
  await: () => _await,
@@ -17603,25 +17790,26 @@ var doneUnsafe = (self, effect) => {
17603
17790
  if (self.effect) return false;
17604
17791
  self.effect = effect;
17605
17792
  if (self.resumes) {
17606
- for (let i = 0; i < self.resumes.length; i++) {
17607
- self.resumes[i](effect);
17608
- }
17793
+ const resumes = self.resumes;
17609
17794
  self.resumes = void 0;
17795
+ for (let i = 0; i < resumes.length; i++) {
17796
+ resumes[i](effect);
17797
+ }
17610
17798
  }
17611
17799
  return true;
17612
17800
  };
17613
17801
  var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap4(exit(restore(self)), (exit3) => done3(deferred, exit3))));
17614
17802
 
17615
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/References.js
17803
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/References.js
17616
17804
  var CurrentLogAnnotations2 = CurrentLogAnnotations;
17617
17805
  var CurrentLogSpans2 = CurrentLogSpans;
17618
17806
 
17619
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Scope.js
17807
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Scope.js
17620
17808
  var makeUnsafe3 = scopeMakeUnsafe;
17621
17809
  var forkUnsafe2 = scopeForkUnsafe;
17622
17810
  var close = scopeClose;
17623
17811
 
17624
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Layer.js
17812
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Layer.js
17625
17813
  var TypeId7 = "~effect/Layer";
17626
17814
  var MemoMapTypeId = "~effect/Layer/MemoMap";
17627
17815
  var memoMapReuse = (entry, scope3) => {
@@ -17716,7 +17904,7 @@ var mergeAll2 = (...layers) => fromBuild((memoMap, scope3) => mergeAllEffect(lay
17716
17904
  var provideWith = (self, that, f) => fromBuild((memoMap, scope3) => flatMap4(Array.isArray(that) ? mergeAllEffect(that, memoMap, scope3) : that.build(memoMap, scope3), (context3) => self.build(memoMap, scope3).pipe(provideContext(context3), map5((merged) => f(merged, context3)))));
17717
17905
  var provide2 = /* @__PURE__ */ dual(2, (self, that) => provideWith(self, that, identity));
17718
17906
 
17719
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/ExecutionPlan.js
17907
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/ExecutionPlan.js
17720
17908
  var TypeId8 = "~effect/ExecutionPlan";
17721
17909
  var Proto2 = {
17722
17910
  [TypeId8]: TypeId8,
@@ -17743,7 +17931,7 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
17743
17931
  })
17744
17932
  });
17745
17933
 
17746
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schedule.js
17934
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
17747
17935
  var Schedule_exports = {};
17748
17936
  __export(Schedule_exports, {
17749
17937
  CurrentMetadata: () => CurrentMetadata2,
@@ -17779,18 +17967,7 @@ __export(Schedule_exports, {
17779
17967
  windowed: () => windowed
17780
17968
  });
17781
17969
 
17782
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Data.js
17783
- var Class3 = class extends Class {
17784
- constructor(props) {
17785
- super();
17786
- if (props) {
17787
- assignProperties(this, props);
17788
- }
17789
- }
17790
- };
17791
- var TaggedError2 = TaggedError;
17792
-
17793
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/dateTime.js
17970
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/dateTime.js
17794
17971
  var TypeId9 = "~effect/time/DateTime";
17795
17972
  var TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
17796
17973
  var Proto3 = {
@@ -18196,7 +18373,7 @@ var formatIsoOffset = (self) => {
18196
18373
  };
18197
18374
  var formatIsoZoned = (self) => self.zone._tag === "Offset" ? formatIsoOffset(self) : `${formatIsoOffset(self)}[${self.zone.id}]`;
18198
18375
 
18199
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Number.js
18376
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Number.js
18200
18377
  var Number3 = globalThis.Number;
18201
18378
  var Order4 = Number2;
18202
18379
  var remainder = /* @__PURE__ */ dual(2, (self, divisor) => {
@@ -18238,13 +18415,13 @@ function toScientificInteger(n) {
18238
18415
  var ReducerMax = /* @__PURE__ */ make((a, b) => Math.max(a, b), -Infinity);
18239
18416
  var ReducerMin = /* @__PURE__ */ make((a, b) => Math.min(a, b), Infinity);
18240
18417
 
18241
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/String.js
18418
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/String.js
18242
18419
  var String2 = globalThis.String;
18243
18420
  var toLowerCase = (self) => self.toLowerCase();
18244
18421
  var trim = (self) => self.trim();
18245
18422
  var isNonEmpty = (self) => self.length > 0;
18246
18423
 
18247
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Cron.js
18424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Cron.js
18248
18425
  var TypeId10 = "~effect/time/Cron";
18249
18426
  function toPojo(cron2) {
18250
18427
  const out = {
@@ -18763,7 +18940,7 @@ function aliasOrValue(field, aliases) {
18763
18940
  }
18764
18941
  var decimalRegex = /^\d+$/;
18765
18942
 
18766
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/random.js
18943
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/random.js
18767
18944
  var Random = /* @__PURE__ */ Reference("effect/Random", {
18768
18945
  defaultValue: () => ({
18769
18946
  nextIntUnsafe() {
@@ -18775,10 +18952,26 @@ var Random = /* @__PURE__ */ Reference("effect/Random", {
18775
18952
  })
18776
18953
  });
18777
18954
 
18778
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Pull.js
18955
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Pull.js
18779
18956
  var catchDone = /* @__PURE__ */ dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
18780
- var filterDone = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e) : fail2(e));
18781
- var filterDoneLeftover = /* @__PURE__ */ composePassthrough(findError2, (e) => isDone2(e) ? succeed2(e.value) : fail2(e));
18957
+ var isDoneFailure = (failure) => failure._tag === "Fail" && isDone2(failure.error);
18958
+ var filterDone = (cause) => {
18959
+ let done4;
18960
+ let hasFailure = false;
18961
+ for (const reason of cause.reasons) {
18962
+ if (isDoneFailure(reason)) {
18963
+ done4 ??= reason.error;
18964
+ } else if (reason._tag !== "Interrupt") {
18965
+ hasFailure = true;
18966
+ }
18967
+ }
18968
+ if (done4 === void 0) return fail2(cause);
18969
+ return hasFailure ? fail2(fromReasons(cause.reasons.filter((reason) => !isDoneFailure(reason)))) : succeed2(done4);
18970
+ };
18971
+ var filterDoneLeftover = (cause) => {
18972
+ const done4 = filterDone(cause);
18973
+ return isFailure2(done4) ? done4 : succeed2(done4.success.value);
18974
+ };
18782
18975
  var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(self, {
18783
18976
  onSuccess: options.onSuccess,
18784
18977
  onFailure: (cause) => {
@@ -18787,7 +18980,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
18787
18980
  }
18788
18981
  }));
18789
18982
 
18790
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schedule.js
18983
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schedule.js
18791
18984
  var TypeId11 = "~effect/Schedule";
18792
18985
  var randomNext = /* @__PURE__ */ Random.useSync((random2) => random2.nextDoubleUnsafe());
18793
18986
  var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
@@ -19077,11 +19270,11 @@ var constIdentity = /* @__PURE__ */ fromStep(/* @__PURE__ */ succeed3((_now, inp
19077
19270
  var identity_ = () => constIdentity;
19078
19271
  var setInputType = () => (self) => self;
19079
19272
 
19080
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/layer.js
19273
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/layer.js
19081
19274
  var provideLayer = (self, layer, options) => scopedWith((scope3) => flatMap4(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope3) : buildWithScope(layer, scope3), (context3) => provideContext(self, context3)));
19082
19275
  var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
19083
19276
 
19084
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schedule.js
19277
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schedule.js
19085
19278
  var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule2, orElse4) => flatMap4(toStepWithMetadata(schedule2), (step) => {
19086
19279
  let meta3 = CurrentMetadata2.defaultValue();
19087
19280
  return catch_(forever(tap2(flatMap4(suspend(() => provideService(self, CurrentMetadata2, meta3)), step), (meta_) => sync(() => {
@@ -19152,7 +19345,7 @@ var buildFromOptions = (options) => {
19152
19345
  return schedule2;
19153
19346
  };
19154
19347
 
19155
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/executionPlan.js
19348
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/executionPlan.js
19156
19349
  var makeEventEmitter = (onEvent, currentMetadata) => {
19157
19350
  let lastStepIndex = -1;
19158
19351
  let stepAttempt = 0;
@@ -19257,7 +19450,7 @@ var scheduleFromStep = (step, first) => {
19257
19450
  };
19258
19451
  var scheduleOnce = /* @__PURE__ */ recurs(1);
19259
19452
 
19260
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Request.js
19453
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Request.js
19261
19454
  var TypeId12 = "~effect/Request";
19262
19455
  var requestVariance = /* @__PURE__ */ byReferenceUnsafe({
19263
19456
  /* c8 ignore next */
@@ -19273,7 +19466,7 @@ var RequestPrototype = {
19273
19466
  };
19274
19467
  var makeEntry = (options) => options;
19275
19468
 
19276
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/request.js
19469
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/request.js
19277
19470
  var request = /* @__PURE__ */ dual(2, (self, resolver) => {
19278
19471
  const withResolver = (resolver2) => callback((resume) => {
19279
19472
  const entry = addEntry(resolver2, self, resume, getCurrentFiber());
@@ -19383,7 +19576,7 @@ function runBatch(batch) {
19383
19576
  return batch.run;
19384
19577
  }
19385
19578
 
19386
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Metric.js
19579
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Metric.js
19387
19580
  var CurrentMetricAttributesKey = "effect/Metric/CurrentMetricAttributes";
19388
19581
  var CurrentMetricAttributes = /* @__PURE__ */ Reference(CurrentMetricAttributesKey, {
19389
19582
  defaultValue: () => ({})
@@ -19483,7 +19676,7 @@ function attributesToRecord(attributes) {
19483
19676
  return attributes;
19484
19677
  }
19485
19678
 
19486
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Effect.js
19679
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Effect.js
19487
19680
  var TypeId14 = EffectTypeId;
19488
19681
  var isEffect2 = isEffect;
19489
19682
  var all4 = all3;
@@ -19493,6 +19686,7 @@ var validate2 = validate;
19493
19686
  var findFirst4 = findFirst3;
19494
19687
  var findFirstFilter2 = findFirstFilter;
19495
19688
  var forEach3 = forEach2;
19689
+ var head3 = head2;
19496
19690
  var whileLoop2 = whileLoop;
19497
19691
  var promise2 = promise;
19498
19692
  var tryPromise2 = tryPromise;
@@ -19816,9 +20010,9 @@ var txRetry = /* @__PURE__ */ flatMap5(Transaction, (state) => {
19816
20010
  state.retry = true;
19817
20011
  return interrupt4;
19818
20012
  });
19819
- var effectify = (fn3, onError3, onSyncError) => (...args2) => callback2((resume) => {
20013
+ var effectify = (fn5, onError3, onSyncError) => (...args2) => callback2((resume) => {
19820
20014
  try {
19821
- fn3(...args2, (err, result5) => {
20015
+ fn5(...args2, (err, result5) => {
19822
20016
  if (err) {
19823
20017
  resume(fail6(onError3 ? onError3(err, args2) : err));
19824
20018
  } else {
@@ -19839,7 +20033,7 @@ var flatMapEager2 = flatMapEager;
19839
20033
  var catchEager2 = catchEager;
19840
20034
  var fnUntracedEager2 = fnUntracedEager;
19841
20035
 
19842
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/annotations.js
20036
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/annotations.js
19843
20037
  function resolve(ast) {
19844
20038
  return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
19845
20039
  }
@@ -19863,7 +20057,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
19863
20057
  });
19864
20058
  var annotationExcludedKeys = /* @__PURE__ */ new Set([SENTINELS_ANNOTATION_KEY, STRUCTURAL_ANNOTATION_KEY, "representation", "arbitrary", "brands", "toJsonSchema", "toCode", "toArbitrary", "toEquivalence", "toFormatter", "toCodec", "toCodecJson", "toCodecStringTree", "toCodecIso"]);
19865
20059
 
19866
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/parser.js
20060
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/parser.js
19867
20061
  var missing = /* @__PURE__ */ Symbol();
19868
20062
  var succeed7 = succeed4;
19869
20063
  var missingExit = /* @__PURE__ */ succeed7(missing);
@@ -19871,7 +20065,7 @@ var sameExit = /* @__PURE__ */ succeed7(missing);
19871
20065
  var toOption2 = (value5) => value5 === missing ? none2() : some2(value5);
19872
20066
  var fromOptionExit = (option5) => option5._tag === "None" ? missingExit : succeed7(option5.value);
19873
20067
 
19874
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaIssue.js
20068
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaIssue.js
19875
20069
  var TypeId15 = "~effect/SchemaIssue/Issue";
19876
20070
  function isIssue(u) {
19877
20071
  return hasProperty(u, TypeId15) && u[TypeId15] === TypeId15;
@@ -20214,7 +20408,7 @@ function findMessage(issue2) {
20214
20408
  if (typeof message === "string") return message;
20215
20409
  }
20216
20410
 
20217
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/cause.js
20411
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/cause.js
20218
20412
  function getSchemaIssue(cause) {
20219
20413
  let issue2;
20220
20414
  for (const reason of cause.reasons) {
@@ -20235,7 +20429,7 @@ function getSchemaIssueOrThrow(cause, message) {
20235
20429
  return issue2;
20236
20430
  }
20237
20431
 
20238
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/DateTime.js
20432
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/DateTime.js
20239
20433
  var isDateTime2 = isDateTime;
20240
20434
  var isTimeZone2 = isTimeZone;
20241
20435
  var isTimeZoneOffset2 = isTimeZoneOffset;
@@ -20259,177 +20453,7 @@ var toEpochMillis2 = toEpochMillis;
20259
20453
  var formatIso2 = formatIso;
20260
20454
  var formatIsoZoned2 = formatIsoZoned;
20261
20455
 
20262
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Encoding.js
20263
- var EncodingErrorTypeId = "~effect/encoding/EncodingError";
20264
- var EncodingError = class extends (/* @__PURE__ */ TaggedError2("EncodingError")) {
20265
- /**
20266
- * Marks this value as an encoding or decoding error for runtime guards.
20267
- *
20268
- * **When to use**
20269
- *
20270
- * Use to identify `EncodingError` instances through `isEncodingError`.
20271
- *
20272
- * @since 4.0.0
20273
- */
20274
- [EncodingErrorTypeId] = EncodingErrorTypeId;
20275
- };
20276
- var encodeBase64 = (input) => typeof input === "string" ? base64EncodeUint8Array(encoder.encode(input)) : base64EncodeUint8Array(input);
20277
- var decodeBase64 = (str) => {
20278
- const stripped = stripCrlf(str);
20279
- const length2 = stripped.length;
20280
- if (length2 % 4 !== 0) {
20281
- return fail2(new EncodingError({
20282
- kind: "Decode",
20283
- module: "Base64",
20284
- input: stripped,
20285
- message: `Length must be a multiple of 4, but is ${length2}`
20286
- }));
20287
- }
20288
- const index2 = stripped.indexOf("=");
20289
- if (index2 !== -1 && (index2 < length2 - 2 || index2 === length2 - 2 && stripped[length2 - 1] !== "=")) {
20290
- return fail2(new EncodingError({
20291
- kind: "Decode",
20292
- module: "Base64",
20293
- input: stripped,
20294
- message: `Found a '=' character, but it is not at the end`
20295
- }));
20296
- }
20297
- try {
20298
- const missingOctets = stripped.endsWith("==") ? 2 : stripped.endsWith("=") ? 1 : 0;
20299
- const result5 = new Uint8Array(3 * (length2 / 4) - missingOctets);
20300
- for (let i = 0, j = 0; i < length2; i += 4, j += 3) {
20301
- const buffer = getBase64Code(stripped.charCodeAt(i)) << 18 | getBase64Code(stripped.charCodeAt(i + 1)) << 12 | getBase64Code(stripped.charCodeAt(i + 2)) << 6 | getBase64Code(stripped.charCodeAt(i + 3));
20302
- result5[j] = buffer >> 16;
20303
- result5[j + 1] = buffer >> 8 & 255;
20304
- result5[j + 2] = buffer & 255;
20305
- }
20306
- return succeed2(result5);
20307
- } catch (e) {
20308
- return fail2(new EncodingError({
20309
- kind: "Decode",
20310
- module: "Base64",
20311
- input: stripped,
20312
- message: e instanceof Error ? e.message : "Invalid input"
20313
- }));
20314
- }
20315
- };
20316
- var decodeBase64String = (str) => map2(decodeBase64(str), (_) => decoder.decode(_));
20317
- var encodeBase64Url = (input) => typeof input === "string" ? base64UrlEncodeUint8Array(encoder.encode(input)) : base64UrlEncodeUint8Array(input);
20318
- var decodeBase64Url = (str) => {
20319
- const stripped = stripCrlf(str);
20320
- const length2 = stripped.length;
20321
- if (length2 % 4 === 1) {
20322
- return fail2(new EncodingError({
20323
- module: "Base64Url",
20324
- kind: "Decode",
20325
- input: stripped,
20326
- message: `Length should be a multiple of 4, but is ${length2}`
20327
- }));
20328
- }
20329
- if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) {
20330
- return fail2(new EncodingError({
20331
- module: "Base64Url",
20332
- kind: "Decode",
20333
- input: stripped,
20334
- message: "Invalid input"
20335
- }));
20336
- }
20337
- let sanitized = length2 % 4 === 2 ? `${stripped}==` : length2 % 4 === 3 ? `${stripped}=` : stripped;
20338
- sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
20339
- return decodeBase64(sanitized);
20340
- };
20341
- var decodeBase64UrlString = (str) => map2(decodeBase64Url(str), (_) => decoder.decode(_));
20342
- var encodeHex = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
20343
- var decodeHex = (str) => {
20344
- const bytes = new TextEncoder().encode(str);
20345
- if (bytes.length % 2 !== 0) {
20346
- return fail2(new EncodingError({
20347
- module: "Hex",
20348
- kind: "Decode",
20349
- input: str,
20350
- message: `Length must be a multiple of 2, but is ${bytes.length}`
20351
- }));
20352
- }
20353
- try {
20354
- const length2 = bytes.length / 2;
20355
- const result5 = new Uint8Array(length2);
20356
- for (let i = 0; i < length2; i++) {
20357
- const a = fromHexChar(bytes[i * 2]);
20358
- const b = fromHexChar(bytes[i * 2 + 1]);
20359
- result5[i] = a << 4 | b;
20360
- }
20361
- return succeed2(result5);
20362
- } catch (e) {
20363
- return fail2(new EncodingError({
20364
- module: "Hex",
20365
- kind: "Decode",
20366
- input: str,
20367
- message: e instanceof Error ? e.message : "Invalid input"
20368
- }));
20369
- }
20370
- };
20371
- var decodeHexString = (str) => map2(decodeHex(str), (_) => decoder.decode(_));
20372
- var encoder = /* @__PURE__ */ new TextEncoder();
20373
- var decoder = /* @__PURE__ */ new TextDecoder();
20374
- var stripCrlf = (str) => str.replace(/[\n\r]/g, "");
20375
- var base64EncodeUint8Array = (bytes) => {
20376
- const length2 = bytes.length;
20377
- let result5 = "";
20378
- let i;
20379
- for (i = 2; i < length2; i += 3) {
20380
- result5 += base64abc[bytes[i - 2] >> 2];
20381
- result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
20382
- result5 += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
20383
- result5 += base64abc[bytes[i] & 63];
20384
- }
20385
- if (i === length2 + 1) {
20386
- result5 += base64abc[bytes[i - 2] >> 2];
20387
- result5 += base64abc[(bytes[i - 2] & 3) << 4];
20388
- result5 += "==";
20389
- }
20390
- if (i === length2) {
20391
- result5 += base64abc[bytes[i - 2] >> 2];
20392
- result5 += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
20393
- result5 += base64abc[(bytes[i - 1] & 15) << 2];
20394
- result5 += "=";
20395
- }
20396
- return result5;
20397
- };
20398
- function getBase64Code(charCode) {
20399
- if (charCode >= base64codes.length) {
20400
- throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
20401
- }
20402
- const code = base64codes[charCode];
20403
- if (code === 255) {
20404
- throw new TypeError(`Invalid character ${String.fromCharCode(charCode)}`);
20405
- }
20406
- return code;
20407
- }
20408
- var base64abc = ["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", "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", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
20409
- var base64codes = [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 0, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
20410
- var base64UrlEncodeUint8Array = (data) => base64EncodeUint8Array(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
20411
- var hexEncodeUint8Array = (bytes) => {
20412
- let result5 = "";
20413
- for (let i = 0; i < bytes.length; ++i) {
20414
- result5 += bytesToHex[bytes[i]];
20415
- }
20416
- return result5;
20417
- };
20418
- var fromHexChar = (byte) => {
20419
- if (48 <= byte && byte <= 57) {
20420
- return byte - 48;
20421
- }
20422
- if (97 <= byte && byte <= 102) {
20423
- return byte - 97 + 10;
20424
- }
20425
- if (65 <= byte && byte <= 70) {
20426
- return byte - 65 + 10;
20427
- }
20428
- throw new TypeError("Invalid input");
20429
- };
20430
- var bytesToHex = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
20431
-
20432
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaGetter.js
20456
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaGetter.js
20433
20457
  var Getter = class _Getter extends Class {
20434
20458
  run;
20435
20459
  constructor(run2) {
@@ -20716,7 +20740,7 @@ function collectBracketPathEntries(isLeaf) {
20716
20740
  };
20717
20741
  }
20718
20742
 
20719
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaTransformation.js
20743
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaTransformation.js
20720
20744
  var Middleware = class _Middleware {
20721
20745
  _tag = "Middleware";
20722
20746
  decode;
@@ -20957,7 +20981,7 @@ var dateTimeZonedFromString = /* @__PURE__ */ transformOrFail2({
20957
20981
  encode: (zoned) => succeed6(formatIsoZoned2(zoned))
20958
20982
  });
20959
20983
 
20960
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaAST.js
20984
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaAST.js
20961
20985
  function makeGuard(tag4) {
20962
20986
  return (ast) => ast._tag === tag4;
20963
20987
  }
@@ -21360,7 +21384,7 @@ var Number5 = class extends Base2 {
21360
21384
  if (this.checks && (hasCheck(this.checks, "effect/schema/isFinite") || hasCheck(this.checks, "effect/schema/isInt"))) {
21361
21385
  return this;
21362
21386
  }
21363
- return replaceEncoding(this, [numberToJson(this.checks)]);
21387
+ return replaceEncoding(this, [numberToJson]);
21364
21388
  }
21365
21389
  /** @internal */
21366
21390
  toCodecStringTree() {
@@ -21377,10 +21401,6 @@ var Number5 = class extends Base2 {
21377
21401
  function hasCheck(checks, id2) {
21378
21402
  return checks.some((check3) => check3.annotations?.representation?.id === id2 || check3._tag === "FilterGroup" && hasCheck(check3.checks, id2));
21379
21403
  }
21380
- function numberToJson(checks) {
21381
- const encodedFinite = !checks ? finite : appendChecks(finite, checks);
21382
- return new Link(new Union([encodedFinite, nonFiniteLiterals], "anyOf"), new Transformation(Number4(), transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
21383
- }
21384
21404
  var number2 = /* @__PURE__ */ new Number5();
21385
21405
  var Boolean3 = class extends Base2 {
21386
21406
  _tag = "Boolean";
@@ -22405,6 +22425,7 @@ function isFinite2(annotations) {
22405
22425
  });
22406
22426
  }
22407
22427
  var finite = /* @__PURE__ */ appendChecks(number2, [/* @__PURE__ */ isFinite2()]);
22428
+ var numberToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([finite, nonFiniteLiterals], "anyOf"), /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number4(), /* @__PURE__ */ transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
22408
22429
  function isPattern(regExp, annotations) {
22409
22430
  const source = regExp.source;
22410
22431
  const pattern = new globalThis.RegExp(source, regExp.flags);
@@ -22974,7 +22995,7 @@ var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast, options)
22974
22995
  });
22975
22996
  var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
22976
22997
 
22977
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Chunk.js
22998
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Chunk.js
22978
22999
  var TypeId18 = "~effect/collections/Chunk";
22979
23000
  function copy2(src, srcPos, dest, destPos, len) {
22980
23001
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
@@ -23158,7 +23179,7 @@ var getUnsafe3 = /* @__PURE__ */ dual(2, (self, index2) => {
23158
23179
  });
23159
23180
  var size = (self) => self.length;
23160
23181
 
23161
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Fiber.js
23182
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Fiber.js
23162
23183
  var Fiber_exports = {};
23163
23184
  __export(Fiber_exports, {
23164
23185
  await: () => await_,
@@ -23185,7 +23206,7 @@ var isFiber = (u) => hasProperty(u, FiberTypeId);
23185
23206
  var getCurrent = getCurrentFiber;
23186
23207
  var runIn = fiberRunIn;
23187
23208
 
23188
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/MutableRef.js
23209
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/MutableRef.js
23189
23210
  var TypeId19 = "~effect/MutableRef";
23190
23211
  var MutableRefProto = {
23191
23212
  [TypeId19]: TypeId19,
@@ -23207,7 +23228,7 @@ var set = /* @__PURE__ */ dual(2, (self, value5) => {
23207
23228
  return self;
23208
23229
  });
23209
23230
 
23210
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schema.js
23231
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
23211
23232
  var Schema_exports = {};
23212
23233
  __export(Schema_exports, {
23213
23234
  Any: () => Any2,
@@ -23258,12 +23279,15 @@ __export(Schema_exports, {
23258
23279
  FiniteFromString: () => FiniteFromString,
23259
23280
  FormData: () => FormData2,
23260
23281
  FormDataReviver: () => FormDataReviver,
23282
+ Graph: () => Graph,
23283
+ GraphReviver: () => GraphReviver,
23261
23284
  HashMap: () => HashMap,
23262
23285
  HashMapReviver: () => HashMapReviver,
23263
23286
  HashSet: () => HashSet,
23264
23287
  HashSetReviver: () => HashSetReviver,
23265
23288
  Int: () => Int,
23266
23289
  Json: () => Json2,
23290
+ JsonObject: () => JsonObject,
23267
23291
  JsonReviver: () => JsonReviver,
23268
23292
  Literal: () => Literal2,
23269
23293
  Literals: () => Literals,
@@ -23501,7 +23525,7 @@ __export(Schema_exports, {
23501
23525
  isUppercased: () => isUppercased,
23502
23526
  isUppercasedReviver: () => isUppercasedReviver,
23503
23527
  link: () => link,
23504
- make: () => make24,
23528
+ make: () => make25,
23505
23529
  makeFilter: () => makeFilter2,
23506
23530
  makeFilterGroup: () => makeFilterGroup,
23507
23531
  makeIsBetween: () => makeIsBetween,
@@ -23557,7 +23581,157 @@ __export(Schema_exports, {
23557
23581
  withDecodingDefaultTypeKey: () => withDecodingDefaultTypeKey
23558
23582
  });
23559
23583
 
23560
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashMap.js
23584
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/graph.js
23585
+ var TypeId20 = "~effect/collections/Graph";
23586
+ var toImpl = (graph) => graph;
23587
+ var edgeEquals = (type3, self, that) => (type3 === "directed" ? self.source === that.source && self.target === that.target : self.source === that.source && self.target === that.target || self.source === that.target && self.target === that.source) && equals(self.data, that.data);
23588
+ var edgeHash = (type3, edge) => type3 === "directed" ? hash(edge) : optimize(hash(edge.data) ^ hash(edge.source) + hash(edge.target));
23589
+ var ProtoGraph = {
23590
+ [TypeId20]: {
23591
+ _N: (_) => _,
23592
+ _E: (_) => _
23593
+ },
23594
+ [Symbol.iterator]() {
23595
+ return this.nodes[Symbol.iterator]();
23596
+ },
23597
+ [NodeInspectSymbol]() {
23598
+ return this.toJSON();
23599
+ },
23600
+ [symbol2](that) {
23601
+ if (hasProperty(that, TypeId20)) {
23602
+ const thatImpl = toImpl(that);
23603
+ if (this.nodes.size !== thatImpl.nodes.size || this.edges.size !== thatImpl.edges.size || this.type !== thatImpl.type) {
23604
+ return false;
23605
+ }
23606
+ for (const [nodeIndex, nodeData] of this.nodes) {
23607
+ if (!thatImpl.nodes.has(nodeIndex) || !equals(nodeData, thatImpl.nodes.get(nodeIndex))) {
23608
+ return false;
23609
+ }
23610
+ }
23611
+ for (const [edgeIndex, edgeData] of this.edges) {
23612
+ const otherEdge = thatImpl.edges.get(edgeIndex);
23613
+ if (otherEdge === void 0 || !edgeEquals(this.type, edgeData, otherEdge)) {
23614
+ return false;
23615
+ }
23616
+ }
23617
+ return true;
23618
+ }
23619
+ return false;
23620
+ },
23621
+ [symbol]() {
23622
+ let hash3 = string("Graph");
23623
+ hash3 = hash3 ^ string(this.type);
23624
+ hash3 = hash3 ^ number(this.nodes.size);
23625
+ hash3 = hash3 ^ number(this.edges.size);
23626
+ for (const [nodeIndex, nodeData] of this.nodes) {
23627
+ hash3 = hash3 ^ hash(nodeIndex) + hash(nodeData);
23628
+ }
23629
+ for (const [edgeIndex, edgeData] of this.edges) {
23630
+ hash3 = hash3 ^ hash(edgeIndex) + edgeHash(this.type, edgeData);
23631
+ }
23632
+ return hash3;
23633
+ },
23634
+ toJSON() {
23635
+ return {
23636
+ _id: "Graph",
23637
+ nodeCount: this.nodes.size,
23638
+ edgeCount: this.edges.size,
23639
+ type: this.type
23640
+ };
23641
+ },
23642
+ toString() {
23643
+ return `Graph(${this.type}, ${this.nodes.size}, ${this.edges.size})`;
23644
+ },
23645
+ pipe() {
23646
+ return pipeArguments(this, arguments);
23647
+ }
23648
+ };
23649
+ var make17 = (type3, mutable2) => {
23650
+ const graph = Object.create(ProtoGraph);
23651
+ graph.type = type3;
23652
+ graph.mutable = mutable2;
23653
+ graph.transforming = false;
23654
+ graph.nodes = /* @__PURE__ */ new Map();
23655
+ graph.edges = /* @__PURE__ */ new Map();
23656
+ graph.adjacency = /* @__PURE__ */ new Map();
23657
+ graph.reverseAdjacency = /* @__PURE__ */ new Map();
23658
+ graph.nextNodeIndex = 0;
23659
+ graph.nextEdgeIndex = 0;
23660
+ graph.acyclic = some2(true);
23661
+ return graph;
23662
+ };
23663
+ var snapshot = (graph) => {
23664
+ const impl = toImpl(graph);
23665
+ return {
23666
+ type: graph.type,
23667
+ nodes: Array.from(impl.nodes, ([index2, data]) => ({
23668
+ index: index2,
23669
+ data
23670
+ })).sort((a, b) => a.index - b.index),
23671
+ edges: Array.from(impl.edges, ([index2, edge]) => ({
23672
+ index: index2,
23673
+ source: edge.source,
23674
+ target: edge.target,
23675
+ data: edge.data
23676
+ })).sort((a, b) => a.index - b.index)
23677
+ };
23678
+ };
23679
+ var hydrate = (snapshot2) => {
23680
+ const graph = make17(snapshot2.type, false);
23681
+ for (const node of snapshot2.nodes) {
23682
+ graph.nodes.set(node.index, node.data);
23683
+ graph.adjacency.set(node.index, []);
23684
+ graph.reverseAdjacency.set(node.index, []);
23685
+ }
23686
+ for (const edge of snapshot2.edges) {
23687
+ graph.edges.set(edge.index, {
23688
+ source: edge.source,
23689
+ target: edge.target,
23690
+ data: edge.data
23691
+ });
23692
+ graph.adjacency.get(edge.source).push(edge.index);
23693
+ graph.reverseAdjacency.get(edge.target).push(edge.index);
23694
+ if (snapshot2.type === "undirected") {
23695
+ graph.adjacency.get(edge.target).push(edge.index);
23696
+ graph.reverseAdjacency.get(edge.source).push(edge.index);
23697
+ }
23698
+ }
23699
+ graph.nextNodeIndex = snapshot2.nodes.length === 0 ? 0 : snapshot2.nodes[snapshot2.nodes.length - 1].index + 1;
23700
+ graph.nextEdgeIndex = snapshot2.edges.length === 0 ? 0 : snapshot2.edges[snapshot2.edges.length - 1].index + 1;
23701
+ graph.acyclic = none2();
23702
+ return graph;
23703
+ };
23704
+
23705
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Graph.js
23706
+ var TypeId21 = TypeId20;
23707
+ var isGraph = (u) => hasProperty(u, TypeId21);
23708
+ var EdgeIdentity = class _EdgeIdentity {
23709
+ type;
23710
+ source;
23711
+ target;
23712
+ identity;
23713
+ constructor(type3, source, target, identity2) {
23714
+ this.type = type3;
23715
+ this.source = source;
23716
+ this.target = target;
23717
+ this.identity = identity2;
23718
+ }
23719
+ [symbol2](that) {
23720
+ if (!(that instanceof _EdgeIdentity) || this.type !== that.type || !equals(this.identity, that.identity)) {
23721
+ return false;
23722
+ }
23723
+ if (this.type === "directed") {
23724
+ return equals(this.source, that.source) && equals(this.target, that.target);
23725
+ }
23726
+ return equals(this.source, that.source) && equals(this.target, that.target) || equals(this.source, that.target) && equals(this.target, that.source);
23727
+ }
23728
+ [symbol]() {
23729
+ const hash3 = hash(this.identity);
23730
+ return this.type === "directed" ? combine(hash(this.target))(combine(hash(this.source))(hash3)) : optimize(hash3 ^ hash(this.source) + hash(this.target));
23731
+ }
23732
+ };
23733
+
23734
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
23561
23735
  var HashMap_exports = {};
23562
23736
  __export(HashMap_exports, {
23563
23737
  beginMutation: () => beginMutation2,
@@ -23581,7 +23755,7 @@ __export(HashMap_exports, {
23581
23755
  isEmpty: () => isEmpty2,
23582
23756
  isHashMap: () => isHashMap2,
23583
23757
  keys: () => keys3,
23584
- make: () => make18,
23758
+ make: () => make19,
23585
23759
  map: () => map11,
23586
23760
  modify: () => modify3,
23587
23761
  modifyAt: () => modifyAt2,
@@ -23600,7 +23774,7 @@ __export(HashMap_exports, {
23600
23774
  values: () => values2
23601
23775
  });
23602
23776
 
23603
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/hashMap.js
23777
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashMap.js
23604
23778
  var HashMapTypeId = "~effect/collections/HashMap";
23605
23779
  var SHIFT = 5;
23606
23780
  var BUCKET_SIZE = 1 << SHIFT;
@@ -24162,7 +24336,7 @@ var HashMapImpl = class {
24162
24336
  var emptyNode = /* @__PURE__ */ new EmptyNode();
24163
24337
  var isHashMap = (u) => hasProperty(u, HashMapTypeId);
24164
24338
  var empty5 = () => new HashMapImpl(false, 0, emptyNode, 0);
24165
- var make17 = (...entries3) => fromIterable4(entries3);
24339
+ var make18 = (...entries3) => fromIterable4(entries3);
24166
24340
  var fromIterable4 = (entries3) => {
24167
24341
  let root = emptyNode;
24168
24342
  let size6 = 0;
@@ -24443,10 +24617,10 @@ var every2 = /* @__PURE__ */ dual(2, (self, predicate) => {
24443
24617
  return true;
24444
24618
  });
24445
24619
 
24446
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashMap.js
24620
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashMap.js
24447
24621
  var isHashMap2 = isHashMap;
24448
24622
  var empty6 = empty5;
24449
- var make18 = make17;
24623
+ var make19 = make18;
24450
24624
  var fromIterable5 = fromIterable4;
24451
24625
  var isEmpty2 = isEmpty;
24452
24626
  var get4 = get3;
@@ -24483,7 +24657,7 @@ var findFirst6 = findFirst5;
24483
24657
  var some5 = some4;
24484
24658
  var every3 = every2;
24485
24659
 
24486
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/hashSet.js
24660
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/hashSet.js
24487
24661
  var HashSetTypeId = "~effect/collections/HashSet";
24488
24662
  var HashSetProto = {
24489
24663
  [symbol]() {
@@ -24537,12 +24711,12 @@ var every4 = (self, predicate) => {
24537
24711
  return true;
24538
24712
  };
24539
24713
 
24540
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/HashSet.js
24714
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/HashSet.js
24541
24715
  var fromIterable7 = fromIterable6;
24542
24716
  var isHashSet2 = isHashSet;
24543
24717
  var size5 = size4;
24544
24718
 
24545
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/SchemaParser.js
24719
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/SchemaParser.js
24546
24720
  function makeEffect(schema) {
24547
24721
  const parser = runWithCompiler(constructorCompiler, toType(schema.ast));
24548
24722
  return (input, options) => {
@@ -24565,7 +24739,7 @@ function makeOption(schema) {
24565
24739
  return none2();
24566
24740
  };
24567
24741
  }
24568
- function make20(schema) {
24742
+ function make21(schema) {
24569
24743
  const parser = makeEffect(schema);
24570
24744
  return (input, options) => {
24571
24745
  const exit3 = runSyncExit2(parser(input, options));
@@ -24840,8 +25014,8 @@ function makeParser(ast, compile, compileConstructorDefault2, constructorDefault
24840
25014
  };
24841
25015
  }
24842
25016
 
24843
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/schema.js
24844
- var TypeId20 = "~effect/Schema/Schema";
25017
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/schema.js
25018
+ var TypeId22 = "~effect/Schema/Schema";
24845
25019
  function makeDeclarationReviver(id2, payloadSchema, revive) {
24846
25020
  return {
24847
25021
  id: id2,
@@ -24857,7 +25031,7 @@ function makeFilterReviver(id2, payloadSchema, revive) {
24857
25031
  };
24858
25032
  }
24859
25033
  var SchemaProto = {
24860
- [TypeId20]: TypeId20,
25034
+ [TypeId22]: TypeId22,
24861
25035
  pipe() {
24862
25036
  return pipeArguments(this, arguments);
24863
25037
  },
@@ -24871,21 +25045,21 @@ var SchemaProto = {
24871
25045
  return this.rebuild(appendChecks(this.ast, checks));
24872
25046
  }
24873
25047
  };
24874
- function make21(ast, options) {
25048
+ function make22(ast, options) {
24875
25049
  function Schema() {
24876
25050
  }
24877
25051
  const self = Object.defineProperties(Object.setPrototypeOf(Schema, SchemaProto), Object.getOwnPropertyDescriptors({
24878
25052
  ...options
24879
25053
  }));
24880
25054
  self.ast = ast;
24881
- self.rebuild = (ast2) => make21(ast2, options);
25055
+ self.rebuild = (ast2) => make22(ast2, options);
24882
25056
  self.makeEffect = makeEffect(self);
24883
- self.make = make20(self);
25057
+ self.make = make21(self);
24884
25058
  self.makeOption = makeOption(self);
24885
25059
  return self;
24886
25060
  }
24887
25061
 
24888
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Struct.js
25062
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Struct.js
24889
25063
  var pick = /* @__PURE__ */ dual(2, (self, keys4) => {
24890
25064
  return buildStruct(self, (k, v) => keys4.includes(k) ? [k, v] : void 0);
24891
25065
  });
@@ -24928,7 +25102,7 @@ function makeCombiner(combiners, options) {
24928
25102
  });
24929
25103
  }
24930
25104
 
24931
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/UndefinedOr.js
25105
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/UndefinedOr.js
24932
25106
  function makeReducer2(combiner2) {
24933
25107
  return make((self, that) => {
24934
25108
  if (self === void 0) return that;
@@ -24937,7 +25111,7 @@ function makeReducer2(combiner2) {
24937
25111
  }, void 0);
24938
25112
  }
24939
25113
 
24940
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/errors.js
25114
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/errors.js
24941
25115
  function errorWithPath(message, path) {
24942
25116
  if (path.length > 0) {
24943
25117
  message += `
@@ -24946,7 +25120,7 @@ function errorWithPath(message, path) {
24946
25120
  return new Error(message);
24947
25121
  }
24948
25122
 
24949
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toArbitrary.js
25123
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toArbitrary.js
24950
25124
  var arbitraryMemoMap = /* @__PURE__ */ new WeakMap();
24951
25125
  var suspendDepthIdentifierMap = /* @__PURE__ */ new WeakMap();
24952
25126
  var emptyRecursionStack = [];
@@ -25388,10 +25562,10 @@ function base(ast, path) {
25388
25562
  }
25389
25563
  let out = fc.tuple(...elementArbitraries).map(getSomes);
25390
25564
  if (isReadonlyArrayNonEmpty(rest)) {
25391
- const [head2, ...tail2] = rest;
25565
+ const [head4, ...tail2] = rest;
25392
25566
  const restCtx = ast.elements.length === 0 ? ctx : reset;
25393
25567
  const minRestLength = Math.max(0, minLength - length2 - tail2.length);
25394
- const headArbitrary = minRestLength === 0 ? void 0 : head2.arbitrary.terminal(fc, reset, recursionStack);
25568
+ const headArbitrary = minRestLength === 0 ? void 0 : head4.arbitrary.terminal(fc, reset, recursionStack);
25395
25569
  if (minRestLength > 0 && headArbitrary === void 0) {
25396
25570
  return void 0;
25397
25571
  }
@@ -25429,10 +25603,10 @@ function base(ast, path) {
25429
25603
  });
25430
25604
  let out = fc.tuple(...elementArbitraries).map((elements2) => getSomes(takeWhile(elements2, isSome2)));
25431
25605
  if (isReadonlyArrayNonEmpty(rest)) {
25432
- const [head2, ...tail2] = rest.map(({
25606
+ const [head4, ...tail2] = rest.map(({
25433
25607
  arbitrary
25434
25608
  }) => arbitrary(fc, reset, recursionStack));
25435
- const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset, head2);
25609
+ const restArbitrary = array2(fc, ast.elements.length === 0 ? ctx : reset, head4);
25436
25610
  out = appendArray(fc, out, len, restArbitrary);
25437
25611
  if (tail2.length > 0) {
25438
25612
  const t = fc.tuple(...tail2);
@@ -25608,7 +25782,7 @@ function base(ast, path) {
25608
25782
  }
25609
25783
  }
25610
25784
 
25611
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toEquivalence.js
25785
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toEquivalence.js
25612
25786
  var toEquivalence = /* @__PURE__ */ memoize((ast) => {
25613
25787
  return recur2(ast, []);
25614
25788
  });
@@ -25656,9 +25830,9 @@ function recur2(ast, path) {
25656
25830
  }
25657
25831
  }
25658
25832
  if (rest.length > 0) {
25659
- const [head2, ...tail2] = rest;
25833
+ const [head4, ...tail2] = rest;
25660
25834
  for (; i < len2 - tail2.length; i++) {
25661
- if (!head2(a[i], b[i])) {
25835
+ if (!head4(a[i], b[i])) {
25662
25836
  return false;
25663
25837
  }
25664
25838
  }
@@ -25731,7 +25905,7 @@ function recur2(ast, path) {
25731
25905
  }
25732
25906
  }
25733
25907
 
25734
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonPointer.js
25908
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPointer.js
25735
25909
  function escapeToken(token) {
25736
25910
  return token.replace(/~/g, "~0").replace(/\//g, "~1");
25737
25911
  }
@@ -25739,7 +25913,7 @@ function unescapeToken(token) {
25739
25913
  return token.replace(/~1/g, "/").replace(/~0/g, "~");
25740
25914
  }
25741
25915
 
25742
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonSchema.js
25916
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonSchema.js
25743
25917
  var RE_DEFS = /^#\/\$defs(?=\/|$)/;
25744
25918
  var DRAFT_04_COPY_KEYWORDS = /* @__PURE__ */ new Set(["$ref", "type", "required", "enum", "title", "description", "default", "format", "pattern", "minLength", "maxLength", "minItems", "maxItems", "minProperties", "maxProperties", "multipleOf", "uniqueItems"]);
25745
25919
  var DRAFT_07_COPY_KEYWORDS = /* @__PURE__ */ new Set([...DRAFT_04_COPY_KEYWORDS, "const", "examples", "readOnly", "writeOnly", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"]);
@@ -25854,15 +26028,12 @@ function mapObject(value5, f) {
25854
26028
  return isObject(value5) ? map3(value5, f) : void 0;
25855
26029
  }
25856
26030
 
25857
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/RegExp.js
26031
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/RegExp.js
25858
26032
  var RegExp2 = globalThis.RegExp;
25859
26033
  var escape2 = (string6) => string6.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
25860
26034
 
25861
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
26035
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toJsonSchemaDocument.js
25862
26036
  var jsonSchemaAnnotationExcludedKeys = /* @__PURE__ */ new Set([...annotationExcludedKeys, IDENTIFIER_FALLBACK_KEY, ...jsonSchemaAnnotationKeys]);
25863
- var toRepresentationOptions = {
25864
- isAnonymousReferenceAllowed: (ast) => !isDeclaration(ast)
25865
- };
25866
26037
  function collectJsonSchemaAnnotations(annotations, options) {
25867
26038
  if (annotations === void 0) return void 0;
25868
26039
  const out = {};
@@ -25937,7 +26108,16 @@ function extractJsonSchemaNumberType(schema) {
25937
26108
  function isJsonSchemaNumberEncoding(schema) {
25938
26109
  return Array.isArray(schema.anyOf) && schema.anyOf.length === 4 && schema.anyOf[0]?.type === "number" && schema.anyOf.slice(1).every((member) => member.type === "string");
25939
26110
  }
25940
- function appendJsonSchema(left, right) {
26111
+ var inlineableCheckKeywords = "|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|";
26112
+ function hasOnlyKeywords(schema, allowed) {
26113
+ return Object.keys(schema).every((key) => allowed.includes(`|${key}|`));
26114
+ }
26115
+ function hasNoCollisions(left, rightKeys) {
26116
+ return typeof left.$ref !== "string" && rightKeys.every((key) => !Object.hasOwn(left, key));
26117
+ }
26118
+ var promotableAnnotationKeywords = "|title|description|default|examples|readOnly|writeOnly|";
26119
+ var inlineableAnnotatedCheckKeywords = inlineableCheckKeywords + promotableAnnotationKeywords;
26120
+ function appendJsonSchema(left, right, inlineCheck) {
25941
26121
  if (Object.keys(left).length === 0) return right;
25942
26122
  const rightKeys = Object.keys(right);
25943
26123
  if (rightKeys.length === 0) return left;
@@ -25952,9 +26132,20 @@ function appendJsonSchema(left, right) {
25952
26132
  type: type3
25953
26133
  };
25954
26134
  if (isNumberEncoding) delete base2.anyOf;
25955
- return Object.keys(extracted.schema).length === 0 ? base2 : appendJsonSchema(base2, extracted.schema);
26135
+ const extractedKeys = Object.keys(extracted.schema);
26136
+ if (extractedKeys.length === 0) return base2;
26137
+ return hasOnlyKeywords(extracted.schema, promotableAnnotationKeywords) && hasNoCollisions(base2, extractedKeys) ? {
26138
+ ...base2,
26139
+ ...extracted.schema
26140
+ } : appendJsonSchema(base2, extracted.schema, inlineCheck);
25956
26141
  }
25957
26142
  }
26143
+ if (inlineCheck && hasNoCollisions(left, rightKeys)) {
26144
+ return {
26145
+ ...left,
26146
+ ...right
26147
+ };
26148
+ }
25958
26149
  const members = Array.isArray(right.allOf) && rightKeys.length === 1 ? right.allOf : [right];
25959
26150
  if (Array.isArray(left.allOf)) {
25960
26151
  return {
@@ -26044,21 +26235,24 @@ function compileJsonSchema(representations, rootPaths, references, options) {
26044
26235
  schemas: schemas2
26045
26236
  });
26046
26237
  const ordinary2 = collectJsonSchemaAnnotations(annotations, options);
26047
- return ordinary2 === void 0 ? fragment : {
26238
+ const schema = ordinary2 === void 0 ? fragment : {
26048
26239
  ...fragment,
26049
26240
  ...ordinary2
26050
26241
  };
26242
+ const allowed = ordinary2 === void 0 ? inlineableCheckKeywords : inlineableAnnotatedCheckKeywords;
26243
+ return check3._tag === "Filter" && hasOnlyKeywords(schema, allowed) && (ordinary2 === void 0 || hasOnlyKeywords(ordinary2, promotableAnnotationKeywords)) ? [schema, true] : [schema];
26051
26244
  }
26052
26245
  if (check3._tag === "Filter") return void 0;
26053
26246
  const children = check3.checks.map((child, index2) => compileCheck(child, type3, [...path, "checks", index2])).filter((child) => child !== void 0);
26054
26247
  if (children.length === 0) return void 0;
26055
26248
  const ordinary = collectJsonSchemaAnnotations(annotations, options);
26056
- return ordinary === void 0 ? {
26057
- allOf: children
26249
+ const allOf = children.map(([schema]) => schema);
26250
+ return [ordinary === void 0 ? {
26251
+ allOf
26058
26252
  } : {
26059
- allOf: children,
26253
+ allOf,
26060
26254
  ...ordinary
26061
- };
26255
+ }];
26062
26256
  }
26063
26257
  function recur3(representation, path) {
26064
26258
  if (representation._tag === "Reference") {
@@ -26081,7 +26275,7 @@ function compileJsonSchema(representations, rootPaths, references, options) {
26081
26275
  const type3 = typeof output.type === "string" && isJsonSchemaType(output.type) ? output.type : void 0;
26082
26276
  const check3 = compileCheck(representation.checks[index2], type3, [...path, "checks", index2]);
26083
26277
  if (check3 !== void 0) {
26084
- output = appendJsonSchema(output, check3);
26278
+ output = appendJsonSchema(output, ...check3);
26085
26279
  }
26086
26280
  }
26087
26281
  compiledRepresentations.set(representation, output);
@@ -26241,22 +26435,35 @@ function compileJsonSchema(representations, rootPaths, references, options) {
26241
26435
  }
26242
26436
  if (representation.propertySignatures.length > 0) out.properties = properties;
26243
26437
  if (required3.length > 0) out.required = required3;
26244
- out.additionalProperties = options?.additionalProperties ?? false;
26245
26438
  const patternProperties = {};
26439
+ const additionalProperties = [];
26246
26440
  for (let index2 = 0; index2 < representation.indexSignatures.length; index2++) {
26247
26441
  const signature = representation.indexSignatures[index2];
26248
26442
  let type3 = recur3(signature.type, [...path, "indexSignatures", index2, "type"]);
26249
26443
  if (Object.keys(type3).length === 1 && "not" in type3) type3 = false;
26250
26444
  const patterns = getParameterPatterns(signature.parameter, [...path, "indexSignatures", index2, "parameter"], /* @__PURE__ */ new Set());
26251
26445
  if (patterns.length === 0) {
26252
- out.additionalProperties = type3;
26446
+ additionalProperties.push(type3);
26253
26447
  } else {
26254
- for (const pattern of patterns) assignProperty(patternProperties, pattern, type3);
26448
+ for (const pattern of patterns) {
26449
+ const previous = patternProperties[pattern];
26450
+ assignProperty(patternProperties, pattern, previous === void 0 ? type3 : previous === false || type3 === false ? false : appendJsonSchema(previous, type3));
26451
+ }
26255
26452
  }
26256
26453
  }
26257
- if (Object.keys(patternProperties).length > 0) {
26454
+ const hasPatternProperties = Object.keys(patternProperties).length > 0;
26455
+ if (hasPatternProperties) {
26258
26456
  out.patternProperties = patternProperties;
26259
- delete out.additionalProperties;
26457
+ }
26458
+ if (representation.indexSignatures.length === 0) {
26459
+ out.additionalProperties = options?.additionalProperties ?? false;
26460
+ } else if (additionalProperties.length === 1 && representation.propertySignatures.length === 0 && !hasPatternProperties) {
26461
+ out.additionalProperties = additionalProperties[0];
26462
+ } else if (additionalProperties.length > 0) {
26463
+ out.allOf = additionalProperties.map((type3) => ({
26464
+ type: "object",
26465
+ additionalProperties: type3
26466
+ }));
26260
26467
  }
26261
26468
  if (typeof out.additionalProperties === "object" && out.additionalProperties !== null && Object.keys(out.additionalProperties).length === 0) {
26262
26469
  delete out.additionalProperties;
@@ -26362,7 +26569,15 @@ function toJsonSchemaDocument(document, options) {
26362
26569
  };
26363
26570
  }
26364
26571
 
26365
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/schema/toRepresentation.js
26572
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/schema/toRepresentation.js
26573
+ var defaultReferencePolicy = ({
26574
+ identifier: identifier2
26575
+ }) => identifier2;
26576
+ function annotationsField(annotations) {
26577
+ return annotations === void 0 ? void 0 : {
26578
+ annotations
26579
+ };
26580
+ }
26366
26581
  function toRepresentation(ast, options) {
26367
26582
  const {
26368
26583
  references,
@@ -26374,67 +26589,28 @@ function toRepresentation(ast, options) {
26374
26589
  };
26375
26590
  }
26376
26591
  function toRepresentations(asts, options) {
26377
- return fromASTs(asts, options);
26378
- }
26379
- function annotationsField(annotations) {
26380
- return annotations === void 0 ? void 0 : {
26381
- annotations
26382
- };
26383
- }
26384
- function hasShareableStructure(ast, isAnonymousReferenceAllowed) {
26385
- if (isAnonymousReferenceAllowed?.(ast) === false) return false;
26386
- switch (ast._tag) {
26387
- case "Arrays":
26388
- case "Objects":
26389
- case "Suspend":
26390
- return true;
26391
- case "Declaration":
26392
- return true;
26393
- case "Union":
26394
- return ast.types.some((ast2) => hasShareableStructure(ast2, isAnonymousReferenceAllowed));
26395
- default:
26396
- return false;
26397
- }
26398
- }
26399
- function isWorthReferencing(bodyCost, occurrences) {
26400
- return occurrences * bodyCost > bodyCost + occurrences + 1;
26401
- }
26402
- function isAnonymousReferenceEligible(ast, occurrences, isAnonymousReferenceAllowed) {
26403
- if (isAnonymousReferenceAllowed?.(ast) === false) return false;
26404
- if (hasShareableStructure(ast, isAnonymousReferenceAllowed)) return true;
26405
- switch (ast._tag) {
26406
- case "Union":
26407
- return isWorthReferencing(ast.types.length + 1, occurrences);
26408
- case "Enum":
26409
- return isWorthReferencing(ast.enums.length + 1, occurrences);
26410
- case "TemplateLiteral":
26411
- return isWorthReferencing(ast.parts.length + 1, occurrences);
26412
- case "Literal":
26413
- return typeof ast.literal === "string" && isWorthReferencing(ast.literal.length / 32 + 1, occurrences);
26414
- default:
26415
- return false;
26416
- }
26417
- }
26418
- function resolveReferenceIdentifier(input, encoded) {
26419
- const identifier2 = resolveIdentifier(encoded);
26420
- if (identifier2 !== void 0) return {
26421
- identifier: identifier2
26422
- };
26423
- const fallback = (encoded !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(encoded);
26424
- return fallback === void 0 ? void 0 : {
26425
- identifier: `${fallback}Encoded`,
26426
- fallback
26427
- };
26428
- }
26429
- function fromASTs(asts, options) {
26430
26592
  const references = {};
26431
- const anonymousReferences = /* @__PURE__ */ new Map();
26432
26593
  const referenceOwners = /* @__PURE__ */ new Map();
26433
26594
  const buildingReferences = /* @__PURE__ */ new Set();
26434
- const visiting = /* @__PURE__ */ new Set();
26435
- const occurrences = /* @__PURE__ */ new Map();
26436
- const shared = /* @__PURE__ */ new Set();
26595
+ const candidates = /* @__PURE__ */ new Map();
26596
+ const visitingCandidates = /* @__PURE__ */ new Set();
26437
26597
  for (const ast of asts) visit(ast);
26598
+ const referencePolicy = options?.referencePolicy ?? defaultReferencePolicy;
26599
+ for (const candidatesByIdentifier of candidates.values()) {
26600
+ for (const candidate of candidatesByIdentifier.values()) {
26601
+ const requestedReference = referencePolicy({
26602
+ ast: candidate.ast,
26603
+ occurrences: candidate.occurrences,
26604
+ identifier: candidate.identifier
26605
+ });
26606
+ if (requestedReference !== void 0) {
26607
+ const separator = requestedReference === candidate.identifier || !requestedReference.endsWith("_") ? "_" : "";
26608
+ candidate.reference = getReference(requestedReference, candidate, separator);
26609
+ } else if (candidate.isRecursive) {
26610
+ candidate.reference = getReference(`${candidate.ast._tag}_`, candidate, "");
26611
+ }
26612
+ }
26613
+ }
26438
26614
  const representations = map4(asts, (ast) => recur3(ast));
26439
26615
  return {
26440
26616
  representations,
@@ -26450,14 +26626,14 @@ function fromASTs(asts, options) {
26450
26626
  referenceOwners.set(candidate, owner);
26451
26627
  return candidate;
26452
26628
  }
26453
- function annotateReference(ast, referenceIdentifier, reference) {
26454
- const fallback = referenceIdentifier.fallback;
26629
+ function annotateReference(ast, candidate, reference) {
26630
+ const fallback = candidate.fallback;
26455
26631
  if (fallback !== void 0) {
26456
26632
  return resolveIdentifierFallback(ast) === fallback ? ast : annotate(ast, {
26457
26633
  [IDENTIFIER_FALLBACK_KEY]: fallback
26458
26634
  });
26459
26635
  }
26460
- return reference === referenceIdentifier.identifier ? ast : annotate(ast, {
26636
+ return reference === candidate.identifier ? ast : annotate(ast, {
26461
26637
  identifier: reference
26462
26638
  });
26463
26639
  }
@@ -26473,15 +26649,41 @@ function fromASTs(asts, options) {
26473
26649
  $ref: reference
26474
26650
  };
26475
26651
  }
26476
- function visit(input) {
26652
+ function getCandidate(input) {
26477
26653
  const ast = getLastEncoding(input);
26478
26654
  const owner = getContextOwner(ast);
26479
- const count2 = (occurrences.get(owner) ?? 0) + 1;
26480
- occurrences.set(owner, count2);
26481
- if (count2 > 1) {
26482
- if (!shared.has(owner) && isAnonymousReferenceEligible(owner, count2, options?.isAnonymousReferenceAllowed)) shared.add(owner);
26655
+ let identifier2 = resolveIdentifier(ast);
26656
+ const fallback = identifier2 === void 0 ? (ast !== input ? resolveIdentifier(input) : void 0) ?? resolveIdentifierFallback(ast) : void 0;
26657
+ if (fallback !== void 0) identifier2 = `${fallback}Encoded`;
26658
+ let candidatesByIdentifier = candidates.get(owner);
26659
+ if (candidatesByIdentifier === void 0) {
26660
+ candidatesByIdentifier = /* @__PURE__ */ new Map();
26661
+ candidates.set(owner, candidatesByIdentifier);
26662
+ }
26663
+ let candidate = candidatesByIdentifier.get(identifier2);
26664
+ if (candidate === void 0) {
26665
+ candidate = {
26666
+ ast: owner,
26667
+ identifier: identifier2,
26668
+ fallback,
26669
+ occurrences: 0,
26670
+ isRecursive: false,
26671
+ reference: void 0
26672
+ };
26673
+ candidatesByIdentifier.set(identifier2, candidate);
26674
+ }
26675
+ return candidate;
26676
+ }
26677
+ function visit(input) {
26678
+ const candidate = getCandidate(input);
26679
+ const ast = candidate.ast;
26680
+ candidate.occurrences++;
26681
+ if (visitingCandidates.has(candidate)) {
26682
+ candidate.isRecursive = true;
26483
26683
  return;
26484
26684
  }
26685
+ if (candidate.occurrences > 1) return;
26686
+ visitingCandidates.add(candidate);
26485
26687
  visitChecks(ast.checks);
26486
26688
  switch (ast._tag) {
26487
26689
  case "Declaration":
@@ -26500,6 +26702,7 @@ function fromASTs(asts, options) {
26500
26702
  visit(ast.thunk());
26501
26703
  break;
26502
26704
  }
26705
+ visitingCandidates.delete(candidate);
26503
26706
  }
26504
26707
  function visitChecks(checks) {
26505
26708
  checks?.forEach((check3) => {
@@ -26508,41 +26711,14 @@ function fromASTs(asts, options) {
26508
26711
  });
26509
26712
  }
26510
26713
  function recur3(input) {
26511
- const ast = getLastEncoding(input);
26512
- const owner = getContextOwner(ast);
26513
- const referenceIdentifier = resolveReferenceIdentifier(input, ast);
26514
- if (referenceIdentifier !== void 0) {
26515
- const reference2 = getReference(referenceIdentifier.identifier, owner);
26516
- return makeReference(reference2, annotateReference(ast, referenceIdentifier, reference2));
26517
- }
26518
- const found = anonymousReferences.get(owner);
26519
- if (found !== void 0) {
26520
- return {
26521
- _tag: "Reference",
26522
- $ref: found
26523
- };
26524
- }
26525
- const isShared = shared.has(owner);
26526
- if (isShared || visiting.has(owner)) {
26527
- const reference2 = getReference(`${ast._tag}_`, owner, "");
26528
- anonymousReferences.set(owner, reference2);
26529
- return isShared ? makeReference(reference2, ast) : {
26530
- _tag: "Reference",
26531
- $ref: reference2
26532
- };
26533
- }
26534
- visiting.add(owner);
26535
- const representation = on(ast);
26536
- visiting.delete(owner);
26537
- const reference = anonymousReferences.get(owner);
26714
+ const candidate = getCandidate(input);
26715
+ const ast = candidate.ast;
26716
+ const reference = candidate.reference;
26538
26717
  if (reference !== void 0) {
26539
- assignProperty(references, reference, representation);
26540
- return {
26541
- _tag: "Reference",
26542
- $ref: reference
26543
- };
26718
+ const annotated = candidate.identifier === void 0 ? ast : annotateReference(ast, candidate, reference);
26719
+ return makeReference(reference, annotated);
26544
26720
  }
26545
- return representation;
26721
+ return on(ast);
26546
26722
  }
26547
26723
  function on(ast) {
26548
26724
  const checks = fromChecks(ast.checks);
@@ -26708,7 +26884,7 @@ function fromASTs(asts, options) {
26708
26884
  }
26709
26885
  }
26710
26886
 
26711
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/JsonPatch.js
26887
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/JsonPatch.js
26712
26888
  function get5(oldValue, newValue) {
26713
26889
  const patches = [];
26714
26890
  getLoop(oldValue, newValue, "", patches);
@@ -26889,12 +27065,12 @@ function rebuildFromStack(stack, newParent) {
26889
27065
  return acc;
26890
27066
  }
26891
27067
 
26892
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Optic.js
27068
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Optic.js
26893
27069
  function makeIso(get7, set6) {
26894
- return make22(primitiveNode("Iso", get7, set6));
27070
+ return make23(primitiveNode("Iso", get7, set6));
26895
27071
  }
26896
27072
  function makeLens(get7, replace2) {
26897
- return make22(primitiveNode("Lens", get7, replace2));
27073
+ return make23(primitiveNode("Lens", get7, replace2));
26898
27074
  }
26899
27075
  function primitiveNode(kind, get7, set6) {
26900
27076
  return [{
@@ -26967,7 +27143,7 @@ function compose(a, b) {
26967
27143
  return nodes;
26968
27144
  }
26969
27145
  function makeOptional(getResult, set6) {
26970
- return make22(primitiveNode("Optional", getResult, set6));
27146
+ return make23(primitiveNode("Optional", getResult, set6));
26971
27147
  }
26972
27148
  var OptionalImpl = class {
26973
27149
  /** @internal */
@@ -26986,13 +27162,13 @@ var OptionalImpl = class {
26986
27162
  return (s) => getOrElse2(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
26987
27163
  }
26988
27164
  compose(that) {
26989
- return make22(compose(this.node, that.node));
27165
+ return make23(compose(this.node, that.node));
26990
27166
  }
26991
27167
  key(key) {
26992
- return make22(compose(this.node, [new PathNode([key])]));
27168
+ return make23(compose(this.node, [new PathNode([key])]));
26993
27169
  }
26994
27170
  optionalKey(key) {
26995
- return make22(compose(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
27171
+ return make23(compose(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
26996
27172
  const copy3 = cloneShallow(s);
26997
27173
  if (a === void 0) {
26998
27174
  if (Array.isArray(copy3) && typeof key === "number") {
@@ -27007,20 +27183,20 @@ var OptionalImpl = class {
27007
27183
  })));
27008
27184
  }
27009
27185
  check(...checks) {
27010
- return make22(compose(this.node, [new CheckNode(checks)]));
27186
+ return make23(compose(this.node, [new CheckNode(checks)]));
27011
27187
  }
27012
27188
  refine(refinement, annotations) {
27013
- return make22(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
27189
+ return make23(compose(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations)])]));
27014
27190
  }
27015
27191
  tag(tag4) {
27016
27192
  const err = fail2(new InvalidValue({
27017
27193
  expected: `${JSON.stringify(tag4)} tag`
27018
27194
  }));
27019
- return make22(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
27195
+ return make23(compose(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
27020
27196
  }
27021
27197
  at(key, ..._rest) {
27022
27198
  const err = fail2(new Pointer([key], new MissingKey(void 0)));
27023
- return make22(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
27199
+ return make23(compose(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
27024
27200
  if (Object.hasOwn(s, key)) {
27025
27201
  const copy3 = cloneShallow(s);
27026
27202
  assignProperty(copy3, key, a);
@@ -27126,7 +27302,7 @@ var PrismImpl = class extends OptionalImpl {
27126
27302
  return (s) => getOrElse2(map2(this.getResult(s), (a) => this.set(f(a))), () => s);
27127
27303
  }
27128
27304
  };
27129
- function make22(node) {
27305
+ function make23(node) {
27130
27306
  let op = node[0] ?? identityOperation;
27131
27307
  if (node.length > 1) {
27132
27308
  const kind = node.reduce((kind2, step) => composeKind(kind2, step.kind), "Iso");
@@ -27230,12 +27406,12 @@ function composeKind(a, b) {
27230
27406
  if (b === "Iso" || a === b) return a;
27231
27407
  return "Optional";
27232
27408
  }
27233
- var identityIso = /* @__PURE__ */ make22([]);
27409
+ var identityIso = /* @__PURE__ */ make23([]);
27234
27410
  function id() {
27235
27411
  return identityIso;
27236
27412
  }
27237
27413
 
27238
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/redacted.js
27414
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/redacted.js
27239
27415
  var redactedRegistry = /* @__PURE__ */ new WeakMap();
27240
27416
  var value = (self) => {
27241
27417
  if (redactedRegistry.has(self)) {
@@ -27245,10 +27421,10 @@ var value = (self) => {
27245
27421
  }
27246
27422
  };
27247
27423
 
27248
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Redacted.js
27249
- var TypeId21 = "~effect/data/Redacted";
27250
- var isRedacted = (u) => hasProperty(u, TypeId21);
27251
- var make23 = (value5, options) => {
27424
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Redacted.js
27425
+ var TypeId23 = "~effect/data/Redacted";
27426
+ var isRedacted = (u) => hasProperty(u, TypeId23);
27427
+ var make24 = (value5, options) => {
27252
27428
  const self = Object.create(Proto4);
27253
27429
  if (options?.label) {
27254
27430
  self.label = options.label;
@@ -27257,7 +27433,7 @@ var make23 = (value5, options) => {
27257
27433
  return self;
27258
27434
  };
27259
27435
  var Proto4 = {
27260
- [TypeId21]: {
27436
+ [TypeId23]: {
27261
27437
  _A: (_) => _
27262
27438
  },
27263
27439
  label: void 0,
@@ -27278,11 +27454,11 @@ var Proto4 = {
27278
27454
  var value2 = value;
27279
27455
  var makeEquivalence5 = (isEquivalent) => make2((x, y) => isEquivalent(value2(x), value2(y)));
27280
27456
 
27281
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Schema.js
27282
- var TypeId22 = TypeId20;
27457
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Schema.js
27458
+ var TypeId24 = TypeId22;
27283
27459
  function declareConstructor() {
27284
27460
  return (typeParameters, run2, annotations) => {
27285
- return make24(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make24(ast))), annotations));
27461
+ return make25(new Declaration(typeParameters.map(getAST), (typeParameters2) => run2(typeParameters2.map((ast) => make25(ast))), annotations));
27286
27462
  };
27287
27463
  }
27288
27464
  function declare(is5, annotations) {
@@ -27533,29 +27709,29 @@ function encodeUnknownSync2(schema, options) {
27533
27709
  };
27534
27710
  }
27535
27711
  var encodeSync2 = encodeUnknownSync2;
27536
- var make24 = make21;
27712
+ var make25 = make22;
27537
27713
  function isSchema(u) {
27538
- return hasProperty(u, TypeId22) && u[TypeId22] === TypeId22;
27714
+ return hasProperty(u, TypeId24) && u[TypeId24] === TypeId24;
27539
27715
  }
27540
- var optionalKey2 = /* @__PURE__ */ lambda((schema) => make24(optionalKey(schema.ast), {
27716
+ var optionalKey2 = /* @__PURE__ */ lambda((schema) => make25(optionalKey(schema.ast), {
27541
27717
  schema
27542
27718
  }));
27543
27719
  var requiredKey = /* @__PURE__ */ lambda((self) => self.schema);
27544
27720
  var optional2 = /* @__PURE__ */ lambda((self) => {
27545
27721
  const schema = UndefinedOr(self);
27546
- return make24(optional(self.ast), {
27722
+ return make25(optional(self.ast), {
27547
27723
  schema
27548
27724
  });
27549
27725
  });
27550
27726
  var required = /* @__PURE__ */ lambda((self) => self.schema.members[0]);
27551
- var mutableKey2 = /* @__PURE__ */ lambda((schema) => make24(mutableKey(schema.ast), {
27727
+ var mutableKey2 = /* @__PURE__ */ lambda((schema) => make25(mutableKey(schema.ast), {
27552
27728
  schema
27553
27729
  }));
27554
27730
  var readonlyKey = /* @__PURE__ */ lambda((self) => self.schema);
27555
- var toType2 = /* @__PURE__ */ lambda((schema) => make24(toType(schema.ast), {
27731
+ var toType2 = /* @__PURE__ */ lambda((schema) => make25(toType(schema.ast), {
27556
27732
  schema
27557
27733
  }));
27558
- var toEncoded2 = /* @__PURE__ */ lambda((schema) => make24(toEncoded(schema.ast), {
27734
+ var toEncoded2 = /* @__PURE__ */ lambda((schema) => make25(toEncoded(schema.ast), {
27559
27735
  schema
27560
27736
  }));
27561
27737
  var FlipTypeId = "~effect/Schema/flip";
@@ -27566,13 +27742,13 @@ function flip4(schema) {
27566
27742
  if (isFlip$(schema)) {
27567
27743
  return schema.schema.rebuild(flip3(schema.ast));
27568
27744
  }
27569
- return make24(flip3(schema.ast), {
27745
+ return make25(flip3(schema.ast), {
27570
27746
  [FlipTypeId]: FlipTypeId,
27571
27747
  schema
27572
27748
  });
27573
27749
  }
27574
27750
  function Literal2(literal2) {
27575
- const out = make24(new Literal(literal2), {
27751
+ const out = make25(new Literal(literal2), {
27576
27752
  literal: literal2,
27577
27753
  transform(to) {
27578
27754
  return out.pipe(decodeTo2(Literal2(to), {
@@ -27587,37 +27763,37 @@ function templateLiteralFromParts(parts2) {
27587
27763
  return new TemplateLiteral(parts2.map((part) => isSchema(part) ? part.ast : new Literal(part)));
27588
27764
  }
27589
27765
  function TemplateLiteral2(parts2) {
27590
- return make24(templateLiteralFromParts(parts2), {
27766
+ return make25(templateLiteralFromParts(parts2), {
27591
27767
  parts: parts2
27592
27768
  });
27593
27769
  }
27594
27770
  function TemplateLiteralParser(parts2) {
27595
- return make24(templateLiteralFromParts(parts2).asTemplateLiteralParser(), {
27771
+ return make25(templateLiteralFromParts(parts2).asTemplateLiteralParser(), {
27596
27772
  parts: parts2
27597
27773
  });
27598
27774
  }
27599
27775
  function Enum2(enums) {
27600
- return make24(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
27776
+ return make25(new Enum(Object.keys(enums).filter((key) => typeof enums[enums[key]] !== "number").map((key) => [key, enums[key]])), {
27601
27777
  enums
27602
27778
  });
27603
27779
  }
27604
- var Never2 = /* @__PURE__ */ make24(never3);
27605
- var Any2 = /* @__PURE__ */ make24(any);
27606
- var Unknown2 = /* @__PURE__ */ make24(unknown);
27607
- var Null2 = /* @__PURE__ */ make24(null_);
27608
- var Undefined2 = /* @__PURE__ */ make24(undefined_3);
27609
- var String5 = /* @__PURE__ */ make24(string2);
27610
- var Number6 = /* @__PURE__ */ make24(number2);
27611
- var Boolean4 = /* @__PURE__ */ make24(boolean);
27612
- var Symbol3 = /* @__PURE__ */ make24(symbol3);
27613
- var BigInt5 = /* @__PURE__ */ make24(bigInt);
27614
- var Void2 = /* @__PURE__ */ make24(void_5);
27615
- var ObjectKeyword2 = /* @__PURE__ */ make24(objectKeyword);
27780
+ var Never2 = /* @__PURE__ */ make25(never3);
27781
+ var Any2 = /* @__PURE__ */ make25(any);
27782
+ var Unknown2 = /* @__PURE__ */ make25(unknown);
27783
+ var Null2 = /* @__PURE__ */ make25(null_);
27784
+ var Undefined2 = /* @__PURE__ */ make25(undefined_3);
27785
+ var String5 = /* @__PURE__ */ make25(string2);
27786
+ var Number6 = /* @__PURE__ */ make25(number2);
27787
+ var Boolean4 = /* @__PURE__ */ make25(boolean);
27788
+ var Symbol3 = /* @__PURE__ */ make25(symbol3);
27789
+ var BigInt5 = /* @__PURE__ */ make25(bigInt);
27790
+ var Void2 = /* @__PURE__ */ make25(void_5);
27791
+ var ObjectKeyword2 = /* @__PURE__ */ make25(objectKeyword);
27616
27792
  function UniqueSymbol2(symbol6) {
27617
- return make24(new UniqueSymbol(symbol6));
27793
+ return make25(new UniqueSymbol(symbol6));
27618
27794
  }
27619
27795
  function makeStruct(ast, fields) {
27620
- return make24(ast, {
27796
+ return make25(ast, {
27621
27797
  fields,
27622
27798
  mapFields(f, options) {
27623
27799
  const fields2 = f(this.fields);
@@ -27693,19 +27869,19 @@ function extendTo(fields, derive) {
27693
27869
  };
27694
27870
  }
27695
27871
  function Record(key, value5) {
27696
- return make24(record(key.ast, value5.ast), {
27872
+ return make25(record(key.ast, value5.ast), {
27697
27873
  key,
27698
27874
  value: value5
27699
27875
  });
27700
27876
  }
27701
27877
  function StructWithRest(schema, records) {
27702
- return make24(structWithRest(schema.ast, records.map(getAST)), {
27878
+ return make25(structWithRest(schema.ast, records.map(getAST)), {
27703
27879
  schema,
27704
27880
  records
27705
27881
  });
27706
27882
  }
27707
27883
  function makeTuple(ast, elements) {
27708
- return make24(ast, {
27884
+ return make25(ast, {
27709
27885
  elements,
27710
27886
  mapElements(f, options) {
27711
27887
  const elements2 = f(this.elements);
@@ -27717,15 +27893,15 @@ function Tuple(elements) {
27717
27893
  return makeTuple(tuple(elements), elements);
27718
27894
  }
27719
27895
  function TupleWithRest(schema, rest) {
27720
- return make24(tupleWithRest(schema.ast, rest.map(getAST)), {
27896
+ return make25(tupleWithRest(schema.ast, rest.map(getAST)), {
27721
27897
  schema,
27722
27898
  rest
27723
27899
  });
27724
27900
  }
27725
- var ArraySchema = /* @__PURE__ */ lambda((schema) => make24(new Arrays(false, [], [schema.ast]), {
27901
+ var ArraySchema = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [], [schema.ast]), {
27726
27902
  value: schema
27727
27903
  }));
27728
- var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make24(new Arrays(false, [schema.ast], [schema.ast]), {
27904
+ var NonEmptyArray = /* @__PURE__ */ lambda((schema) => make25(new Arrays(false, [schema.ast], [schema.ast]), {
27729
27905
  value: schema
27730
27906
  }));
27731
27907
  function ArrayEnsure(schema) {
@@ -27738,12 +27914,12 @@ function UniqueArray(item) {
27738
27914
  return ArraySchema(item).check(isUnique());
27739
27915
  }
27740
27916
  var mutable = /* @__PURE__ */ lambda((schema) => {
27741
- return make24(new Arrays(true, schema.ast.elements, schema.ast.rest), {
27917
+ return make25(new Arrays(true, schema.ast.elements, schema.ast.rest), {
27742
27918
  schema
27743
27919
  });
27744
27920
  });
27745
27921
  function makeUnion(ast, members) {
27746
- return make24(ast, {
27922
+ return make25(ast, {
27747
27923
  members,
27748
27924
  mapMembers(f, options) {
27749
27925
  const members2 = f(this.members);
@@ -27756,7 +27932,7 @@ function Union2(members, options) {
27756
27932
  }
27757
27933
  function Literals(literals) {
27758
27934
  const members = literals.map(Literal2);
27759
- return make24(union2(members, "anyOf", void 0), {
27935
+ return make25(union2(members, "anyOf", void 0), {
27760
27936
  literals,
27761
27937
  members,
27762
27938
  mapMembers(f) {
@@ -27774,18 +27950,18 @@ var NullOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2]));
27774
27950
  var UndefinedOr = /* @__PURE__ */ lambda((self) => Union2([self, Undefined2]));
27775
27951
  var NullishOr = /* @__PURE__ */ lambda((self) => Union2([self, Null2, Undefined2]));
27776
27952
  function suspend3(f) {
27777
- return make24(new Suspend(() => f().ast));
27953
+ return make25(new Suspend(() => f().ast));
27778
27954
  }
27779
27955
  function check(...checks) {
27780
27956
  return (self) => self.check(...checks);
27781
27957
  }
27782
27958
  function refine(refinement, annotations) {
27783
- return (schema) => make24(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
27959
+ return (schema) => make25(appendChecks(schema.ast, [makeFilterByGuard(refinement, annotations)]), {
27784
27960
  schema
27785
27961
  });
27786
27962
  }
27787
27963
  function brand2(identifier2) {
27788
- return (schema) => make24(brand(schema.ast, identifier2), {
27964
+ return (schema) => make25(brand(schema.ast, identifier2), {
27789
27965
  schema,
27790
27966
  identifier: identifier2
27791
27967
  });
@@ -27796,12 +27972,12 @@ function fromBrand(identifier2, ctor) {
27796
27972
  };
27797
27973
  }
27798
27974
  function middlewareDecoding2(decode4) {
27799
- return (schema) => make24(middlewareDecoding(schema.ast, new Middleware(decode4, identity)), {
27975
+ return (schema) => make25(middlewareDecoding(schema.ast, new Middleware(decode4, identity)), {
27800
27976
  schema
27801
27977
  });
27802
27978
  }
27803
27979
  function middlewareEncoding2(encode4) {
27804
- return (schema) => make24(middlewareEncoding(schema.ast, new Middleware(identity, encode4)), {
27980
+ return (schema) => make25(middlewareEncoding(schema.ast, new Middleware(identity, encode4)), {
27805
27981
  schema
27806
27982
  });
27807
27983
  }
@@ -27819,7 +27995,7 @@ function catchEncodingWithContext(f) {
27819
27995
  }
27820
27996
  function decodeTo2(to, transformation) {
27821
27997
  return (from) => {
27822
- return make24(decodeTo(from.ast, to.ast, transformation ? make15(transformation) : passthrough3()), {
27998
+ return make25(decodeTo(from.ast, to.ast, transformation ? make15(transformation) : passthrough3()), {
27823
27999
  from,
27824
28000
  to
27825
28001
  });
@@ -27841,7 +28017,7 @@ function encode(transformation) {
27841
28017
  };
27842
28018
  }
27843
28019
  function withConstructorDefault2(defaultValue) {
27844
- return (schema) => make24(withConstructorDefault(schema.ast, defaultValue), {
28020
+ return (schema) => make25(withConstructorDefault(schema.ast, defaultValue), {
27845
28021
  schema
27846
28022
  });
27847
28023
  }
@@ -27958,7 +28134,7 @@ function TaggedUnion(casesByTag) {
27958
28134
  isAnyOf,
27959
28135
  match: match9
27960
28136
  } = toTaggedUnion("_tag")(union7);
27961
- return make24(union7.ast, {
28137
+ return make25(union7.ast, {
27962
28138
  cases,
27963
28139
  isAnyOf,
27964
28140
  guards,
@@ -28380,7 +28556,7 @@ function isUncapitalized(annotations) {
28380
28556
  var isUncapitalizedReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isUncapitalized", Null2, ({
28381
28557
  annotations
28382
28558
  }) => isUncapitalized(annotations));
28383
- var Finite = /* @__PURE__ */ make24(finite);
28559
+ var Finite = /* @__PURE__ */ make25(finite);
28384
28560
  var isFinite3 = isFinite2;
28385
28561
  var isFiniteReviver = /* @__PURE__ */ makeFilterReviver("effect/schema/isFinite", Null2, ({
28386
28562
  annotations
@@ -29364,7 +29540,7 @@ function Option(value5) {
29364
29540
  onSome: (t) => `some(${value6(t)})`
29365
29541
  })
29366
29542
  });
29367
- return make24(schema.ast, {
29543
+ return make25(schema.ast, {
29368
29544
  value: value5
29369
29545
  });
29370
29546
  }
@@ -29455,7 +29631,7 @@ function Result(success2, failure) {
29455
29631
  onFailure: (t) => `failure(${failure2(t)})`
29456
29632
  })
29457
29633
  });
29458
- return make24(schema.ast, {
29634
+ return make25(schema.ast, {
29459
29635
  success: success2,
29460
29636
  failure
29461
29637
  });
@@ -29521,23 +29697,23 @@ function Redacted(value5, options) {
29521
29697
  }),
29522
29698
  expected: "Redacted",
29523
29699
  toCodecJson: ([value6]) => link()(value6, {
29524
- decode: transform((e) => make23(e, {
29700
+ decode: transform((e) => make24(e, {
29525
29701
  label
29526
29702
  })),
29527
29703
  encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
29528
29704
  }),
29529
29705
  toArbitrary: ([value6]) => () => ({
29530
- arbitrary: value6.arbitrary.map((a) => make23(a, {
29706
+ arbitrary: value6.arbitrary.map((a) => make24(a, {
29531
29707
  label
29532
29708
  })),
29533
- terminal: value6.terminal?.map((a) => make23(a, {
29709
+ terminal: value6.terminal?.map((a) => make24(a, {
29534
29710
  label
29535
29711
  }))
29536
29712
  }),
29537
29713
  toFormatter: () => globalThis.String,
29538
29714
  toEquivalence: ([value6]) => makeEquivalence5(value6)
29539
29715
  });
29540
- return make24(schema.ast, {
29716
+ return make25(schema.ast, {
29541
29717
  value: value5
29542
29718
  });
29543
29719
  }
@@ -29554,7 +29730,7 @@ function RedactedFromValue(value5, options) {
29554
29730
  label: options?.label,
29555
29731
  disallowJsonEncode: options?.disallowEncode
29556
29732
  }), {
29557
- decode: transform((t) => make23(t, {
29733
+ decode: transform((t) => make24(t, {
29558
29734
  label: options?.label
29559
29735
  })),
29560
29736
  encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome2(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform(value2)
@@ -29618,7 +29794,7 @@ function CauseReason(error3, defect) {
29618
29794
  toEquivalence: ([error4, defect2]) => causeReasonToEquivalence(error4, defect2),
29619
29795
  toFormatter: ([error4, defect2]) => causeReasonToFormatter(error4, defect2)
29620
29796
  });
29621
- return make24(schema.ast, {
29797
+ return make25(schema.ast, {
29622
29798
  error: error3,
29623
29799
  defect
29624
29800
  });
@@ -29699,7 +29875,7 @@ function Cause(error3, defect) {
29699
29875
  toEquivalence: ([error4, defect2]) => causeToEquivalence(error4, defect2),
29700
29876
  toFormatter: ([error4, defect2]) => causeToFormatter(error4, defect2)
29701
29877
  });
29702
- return make24(schema.ast, {
29878
+ return make25(schema.ast, {
29703
29879
  error: error3,
29704
29880
  defect
29705
29881
  });
@@ -29876,7 +30052,7 @@ function Exit(value5, error3, defect) {
29876
30052
  };
29877
30053
  }
29878
30054
  });
29879
- return make24(schema.ast, {
30055
+ return make25(schema.ast, {
29880
30056
  value: value5,
29881
30057
  error: error3,
29882
30058
  defect
@@ -29970,7 +30146,7 @@ function ReadonlyMap(key, value5) {
29970
30146
  return `ReadonlyMap(${size6}) { ${entries3.join(", ")} }`;
29971
30147
  }
29972
30148
  });
29973
- return make24(schema.ast, {
30149
+ return make25(schema.ast, {
29974
30150
  key,
29975
30151
  value: value5
29976
30152
  });
@@ -29982,6 +30158,157 @@ var ReadonlyMapReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/R
29982
30158
  const schema = ReadonlyMap(typeParameters[0], typeParameters[1]);
29983
30159
  return annotations === void 0 ? schema : schema.annotate(annotations);
29984
30160
  });
30161
+ function graphEncodedSchema(type3, node, edge) {
30162
+ return Struct({
30163
+ type: Literal2(type3),
30164
+ nodes: ArraySchema(Struct({
30165
+ index: Natural,
30166
+ data: node
30167
+ })),
30168
+ edges: ArraySchema(Struct({
30169
+ index: Natural,
30170
+ source: Natural,
30171
+ target: Natural,
30172
+ data: edge
30173
+ }))
30174
+ });
30175
+ }
30176
+ function graphDecode(input, options) {
30177
+ let previous = -1;
30178
+ const indexes = /* @__PURE__ */ new Set();
30179
+ for (let i = 0; i < input.nodes.length; i++) {
30180
+ const index2 = input.nodes[i].index;
30181
+ if (index2 <= previous) {
30182
+ return fail6(new Pointer(["nodes", i, "index"], new InvalidValue({
30183
+ expected: "a strictly increasing node index"
30184
+ }, index2, options)));
30185
+ }
30186
+ previous = index2;
30187
+ indexes.add(index2);
30188
+ }
30189
+ previous = -1;
30190
+ for (let i = 0; i < input.edges.length; i++) {
30191
+ const edge = input.edges[i];
30192
+ if (edge.index <= previous) {
30193
+ return fail6(new Pointer(["edges", i, "index"], new InvalidValue({
30194
+ expected: "a strictly increasing edge index"
30195
+ }, edge.index, options)));
30196
+ }
30197
+ previous = edge.index;
30198
+ if (!indexes.has(edge.source)) {
30199
+ return fail6(new Pointer(["edges", i, "source"], new InvalidValue({
30200
+ expected: "an encoded node index"
30201
+ }, edge.source, options)));
30202
+ }
30203
+ if (!indexes.has(edge.target)) {
30204
+ return fail6(new Pointer(["edges", i, "target"], new InvalidValue({
30205
+ expected: "an encoded node index"
30206
+ }, edge.target, options)));
30207
+ }
30208
+ }
30209
+ return succeed6(hydrate(input));
30210
+ }
30211
+ function graphEncode(input, type3, options) {
30212
+ if (!isGraph(input) || input.mutable || input.type !== type3) {
30213
+ return fail6(new InvalidValue({
30214
+ expected: `an immutable ${type3} Graph`
30215
+ }, input, options));
30216
+ }
30217
+ return succeed6(snapshot(input));
30218
+ }
30219
+ function graphToEquivalence(node, edge) {
30220
+ return (self, that) => {
30221
+ const a = snapshot(self);
30222
+ const b = snapshot(that);
30223
+ if (a.type !== b.type || a.nodes.length !== b.nodes.length || a.edges.length !== b.edges.length) return false;
30224
+ for (let i = 0; i < a.nodes.length; i++) {
30225
+ if (a.nodes[i].index !== b.nodes[i].index || !node(a.nodes[i].data, b.nodes[i].data)) return false;
30226
+ }
30227
+ for (let i = 0; i < a.edges.length; i++) {
30228
+ const ae = a.edges[i];
30229
+ const be = b.edges[i];
30230
+ const sameEndpoints = a.type === "directed" ? ae.source === be.source && ae.target === be.target : ae.source === be.source && ae.target === be.target || ae.source === be.target && ae.target === be.source;
30231
+ if (ae.index !== be.index || !sameEndpoints || !edge(ae.data, be.data)) return false;
30232
+ }
30233
+ return true;
30234
+ };
30235
+ }
30236
+ function graphToArbitrary(type3, node, edge) {
30237
+ return (fc, ctx) => {
30238
+ const empty8 = hydrate({
30239
+ type: type3,
30240
+ nodes: [],
30241
+ edges: []
30242
+ });
30243
+ const terminal = fc.constant(empty8);
30244
+ const arbitrary = fc.array(node.arbitrary).chain((values3) => {
30245
+ const nodes = values3.map((data, index2) => ({
30246
+ index: index2,
30247
+ data
30248
+ }));
30249
+ if (nodes.length === 0) return terminal;
30250
+ const endpoint = fc.integer({
30251
+ min: 0,
30252
+ max: nodes.length - 1
30253
+ });
30254
+ return fc.array(fc.tuple(endpoint, endpoint, edge.arbitrary)).map((values4) => hydrate({
30255
+ type: type3,
30256
+ nodes,
30257
+ edges: values4.map(([source, target, data], index2) => ({
30258
+ index: index2,
30259
+ source,
30260
+ target,
30261
+ data
30262
+ }))
30263
+ }));
30264
+ });
30265
+ return withRecursion(fc, ctx, terminal, arbitrary);
30266
+ };
30267
+ }
30268
+ function Graph(type3, node, edge) {
30269
+ const schema = declareConstructor()([node, edge], ([node2, edge2]) => {
30270
+ const encoded = graphEncodedSchema(type3, node2, edge2);
30271
+ return (input, ast, options) => {
30272
+ if (!isGraph(input) || input.mutable || input.type !== type3) {
30273
+ return fail6(new InvalidType(ast, input, options));
30274
+ }
30275
+ return flatMap5(decodeUnknownEffect(encoded)(snapshot(input), options), (snapshot2) => graphDecode(snapshot2, options));
30276
+ };
30277
+ }, {
30278
+ representation: {
30279
+ id: "effect/schema/Graph",
30280
+ payload: type3
30281
+ },
30282
+ toCode: ({
30283
+ typeParameters
30284
+ }) => ({
30285
+ runtime: `Schema.Graph(${format(type3)}, ${typeParameters[0].runtime}, ${typeParameters[1].runtime})`,
30286
+ Type: `Graph.Graph<${typeParameters[0].Type}, ${typeParameters[1].Type}, ${format(type3)}>`,
30287
+ importDeclarations: [`import * as Graph from "effect/Graph"`]
30288
+ }),
30289
+ expected: `an immutable ${type3} Graph`,
30290
+ toCodec: ([node2, edge2]) => link()(graphEncodedSchema(type3, node2, edge2), transformOrFail2({
30291
+ decode: graphDecode,
30292
+ encode: (graph, options) => graphEncode(graph, type3, options)
30293
+ })),
30294
+ toArbitrary: ([node2, edge2]) => graphToArbitrary(type3, node2, edge2),
30295
+ toEquivalence: ([node2, edge2]) => graphToEquivalence(node2, edge2),
30296
+ toFormatter: () => globalThis.String
30297
+ });
30298
+ return make25(schema.ast, {
30299
+ type: type3,
30300
+ node,
30301
+ edge
30302
+ });
30303
+ }
30304
+ var GraphReviver = /* @__PURE__ */ makeDeclarationReviver("effect/schema/Graph", /* @__PURE__ */ Literals(["directed", "undirected"]), ({
30305
+ annotations,
30306
+ payload,
30307
+ typeParameters
30308
+ }) => {
30309
+ const schema = Graph(payload, typeParameters[0], typeParameters[1]);
30310
+ return annotations === void 0 ? schema : schema.annotate(annotations);
30311
+ });
29985
30312
  function HashMap(key, value5) {
29986
30313
  const schema = declareConstructor()([key, value5], ([key2, value6]) => {
29987
30314
  const entries3 = ArraySchema(Tuple([key2, value6]));
@@ -30022,7 +30349,7 @@ function HashMap(key, value5) {
30022
30349
  return `HashMap(${size6}) { ${entries3.join(", ")} }`;
30023
30350
  }
30024
30351
  });
30025
- return make24(schema.ast, {
30352
+ return make25(schema.ast, {
30026
30353
  key,
30027
30354
  value: value5
30028
30355
  });
@@ -30073,7 +30400,7 @@ function ReadonlySet(value5) {
30073
30400
  return `ReadonlySet(${size6}) { ${values3.join(", ")} }`;
30074
30401
  }
30075
30402
  });
30076
- return make24(schema.ast, {
30403
+ return make25(schema.ast, {
30077
30404
  value: value5
30078
30405
  });
30079
30406
  }
@@ -30123,7 +30450,7 @@ function HashSet(value5) {
30123
30450
  return `HashSet(${size6}) { ${values3.join(", ")} }`;
30124
30451
  }
30125
30452
  });
30126
- return make24(schema.ast, {
30453
+ return make25(schema.ast, {
30127
30454
  value: value5
30128
30455
  });
30129
30456
  }
@@ -30173,7 +30500,7 @@ function Chunk(value5) {
30173
30500
  return `Chunk(${size6}) { ${values3.join(", ")} }`;
30174
30501
  }
30175
30502
  });
30176
- return make24(schema.ast, {
30503
+ return make25(schema.ast, {
30177
30504
  value: value5
30178
30505
  });
30179
30506
  }
@@ -30563,7 +30890,7 @@ var NumberFromString = /* @__PURE__ */ String5.annotate({
30563
30890
  var FiniteFromString = /* @__PURE__ */ String5.annotate({
30564
30891
  expected: "a string that will be decoded as a finite number"
30565
30892
  }).pipe(/* @__PURE__ */ decodeTo2(Finite, numberFromString));
30566
- var BigIntFromString = /* @__PURE__ */ make24(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt5, bigintFromString));
30893
+ var BigIntFromString = /* @__PURE__ */ make25(bigIntString).pipe(/* @__PURE__ */ decodeTo2(BigInt5, bigintFromString));
30567
30894
  var Trimmed = /* @__PURE__ */ String5.check(/* @__PURE__ */ isTrimmed());
30568
30895
  var Trim = /* @__PURE__ */ String5.annotate({
30569
30896
  expected: "a string that will be decoded as a trimmed string"
@@ -30766,7 +31093,7 @@ function makeClass(Inherited, identifier2, struct2, annotations, proto) {
30766
31093
  }
30767
31094
  });
30768
31095
  }
30769
- static [TypeId22] = TypeId22;
31096
+ static [TypeId24] = TypeId24;
30770
31097
  get [ClassTypeId]() {
30771
31098
  return ClassTypeId;
30772
31099
  }
@@ -30842,7 +31169,7 @@ function getClassSchemaFactory(from, identifier2, annotations) {
30842
31169
  const ClassTypeId = getClassTypeId(identifier2);
30843
31170
  const isClassValue = (input) => input instanceof self || hasProperty(input, ClassTypeId);
30844
31171
  const transformation = getClassTransformation(self);
30845
- const to = make24(new Declaration([from.ast], () => (input, ast, options) => {
31172
+ const to = make25(new Declaration([from.ast], () => (input, ast, options) => {
30846
31173
  return isClassValue(input) ? succeed6(input) : fail6(new InvalidType(ast, input, options));
30847
31174
  }, {
30848
31175
  identifier: identifier2,
@@ -30954,9 +31281,9 @@ function toFormatter(schema, options) {
30954
31281
  }
30955
31282
  }
30956
31283
  if (rest.length > 0) {
30957
- const [head2, ...tail2] = rest;
31284
+ const [head4, ...tail2] = rest;
30958
31285
  for (; i < t.length - tail2.length; i++) {
30959
- out.push(head2(t[i]));
31286
+ out.push(head4(t[i]));
30960
31287
  }
30961
31288
  for (let j = 0; j < tail2.length; j++) {
30962
31289
  out.push(tail2[j](t[i + j]));
@@ -31026,15 +31353,15 @@ function overrideToEquivalence(toEquivalence3) {
31026
31353
  function toEquivalence2(schema) {
31027
31354
  return toEquivalence(schema.ast);
31028
31355
  }
31029
- function toRepresentation2(schema) {
31030
- return toRepresentation(schema.ast);
31356
+ function toRepresentation2(schema, options) {
31357
+ return toRepresentation(schema.ast, options);
31031
31358
  }
31032
31359
  function toJsonSchemaDocument2(schema, options) {
31033
- const document = toRepresentation(toCodecJsonAST(schema.ast), toRepresentationOptions);
31360
+ const document = toRepresentation(toCodecJsonAST(schema.ast), options);
31034
31361
  return toJsonSchemaDocument(document, options);
31035
31362
  }
31036
31363
  function toCodecJson(schema) {
31037
- return make24(toCodecJsonAST(schema.ast), {
31364
+ return make25(toCodecJsonAST(schema.ast), {
31038
31365
  schema
31039
31366
  });
31040
31367
  }
@@ -31090,7 +31417,7 @@ function toCodecJsonASTStep(ast, recur3) {
31090
31417
  if (!isFunction(getLink)) {
31091
31418
  return replaceEncoding(ast, [unknownToJson]);
31092
31419
  }
31093
- const typeParameters = ast.typeParameters.map((tp) => make21(toEncoded(tp)));
31420
+ const typeParameters = ast.typeParameters.map((tp) => make22(toEncoded(tp)));
31094
31421
  const link2 = getLink(typeParameters);
31095
31422
  return link2 === void 0 ? ast : replaceEncoding(ast, [mapLink(link2, recur3)]);
31096
31423
  }
@@ -31125,7 +31452,7 @@ function toCodecJsonASTStep(ast, recur3) {
31125
31452
  return ast;
31126
31453
  }
31127
31454
  function toCodecIso(schema) {
31128
- return make24(toCodecIsoAST(toType(schema.ast)));
31455
+ return make25(toCodecIsoAST(toType(schema.ast)));
31129
31456
  }
31130
31457
  var toCodecIsoAST = /* @__PURE__ */ memoize((ast) => {
31131
31458
  const out = toCodecIsoASTStep(ast, toCodecIsoAST);
@@ -31136,7 +31463,7 @@ function toCodecIsoASTStep(ast, recur3) {
31136
31463
  case "Declaration": {
31137
31464
  const getLink = ast.annotations?.toCodecIso ?? ast.annotations?.toCodec;
31138
31465
  if (isFunction(getLink)) {
31139
- const link2 = getLink(ast.typeParameters.map((tp) => make21(tp)));
31466
+ const link2 = getLink(ast.typeParameters.map((tp) => make22(tp)));
31140
31467
  return replaceEncoding(ast, [mapLink(link2, recur3)]);
31141
31468
  }
31142
31469
  return ast;
@@ -31150,12 +31477,12 @@ function toCodecIsoASTStep(ast, recur3) {
31150
31477
  return ast;
31151
31478
  }
31152
31479
  function toCodecStringTree(schema) {
31153
- return make24(toCodecStringTreeAST(schema.ast), {
31480
+ return make25(toCodecStringTreeAST(schema.ast), {
31154
31481
  schema
31155
31482
  });
31156
31483
  }
31157
31484
  function toCodecArrayFromSingle(schema) {
31158
- return make24(toCodecArrayFromSingleAST(schema.ast));
31485
+ return make25(toCodecArrayFromSingleAST(schema.ast));
31159
31486
  }
31160
31487
  function toEncoderXml(codec2, options) {
31161
31488
  const rootName = resolveIdentifier(codec2.ast) ?? resolveTitle(codec2.ast);
@@ -31270,7 +31597,7 @@ var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
31270
31597
  function toCodecStringTreeASTStep(ast, recur3, onMissingAnnotation) {
31271
31598
  switch (ast._tag) {
31272
31599
  case "Declaration": {
31273
- const typeParameters = ast.typeParameters.map((tp) => make24(recur3(toEncoded(tp))));
31600
+ const typeParameters = ast.typeParameters.map((tp) => make25(recur3(toEncoded(tp))));
31274
31601
  const getStringTreeLink = ast.annotations?.toCodecStringTree;
31275
31602
  if (isFunction(getStringTreeLink)) {
31276
31603
  const link3 = getStringTreeLink(typeParameters);
@@ -31423,7 +31750,7 @@ function toIsoFocus(_) {
31423
31750
  }
31424
31751
  function overrideToCodecIso(to, transformation) {
31425
31752
  return (schema) => {
31426
- return make24(annotate(schema.ast, {
31753
+ return make25(annotate(schema.ast, {
31427
31754
  toCodecIso: () => new Link(to.ast, make15(transformation))
31428
31755
  }), {
31429
31756
  schema
@@ -31450,12 +31777,13 @@ function Tree(node) {
31450
31777
  const Tree2 = Union2([node, ArraySchema(Tree$ref), Record(String5, Tree$ref)]);
31451
31778
  return Tree2;
31452
31779
  }
31453
- var Json2 = /* @__PURE__ */ make24(/* @__PURE__ */ annotate(Json, {
31780
+ var Json2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(Json, {
31454
31781
  toCode: () => ({
31455
31782
  runtime: "Schema.Json",
31456
31783
  Type: "Schema.Json"
31457
31784
  })
31458
31785
  }));
31786
+ var JsonObject = /* @__PURE__ */ Record(String5, Json2);
31459
31787
  var JsonReviver = /* @__PURE__ */ makeFixedDeclarationReviver("effect/schema/Json", Json2);
31460
31788
  var JsonError = /* @__PURE__ */ Struct({
31461
31789
  message: String5,
@@ -31463,7 +31791,7 @@ var JsonError = /* @__PURE__ */ Struct({
31463
31791
  stack: /* @__PURE__ */ optionalKey2(String5),
31464
31792
  cause: /* @__PURE__ */ optionalKey2(Json2)
31465
31793
  });
31466
- var MutableJson2 = /* @__PURE__ */ make24(/* @__PURE__ */ annotate(MutableJson, {
31794
+ var MutableJson2 = /* @__PURE__ */ make25(/* @__PURE__ */ annotate(MutableJson, {
31467
31795
  toCode: () => ({
31468
31796
  runtime: "Schema.MutableJson",
31469
31797
  Type: "Schema.MutableJson"
@@ -31477,7 +31805,7 @@ function resolveAnnotationsKey(schema) {
31477
31805
  return schema.ast.context?.annotations;
31478
31806
  }
31479
31807
 
31480
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Console.js
31808
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Console.js
31481
31809
  var Console_exports = {};
31482
31810
  __export(Console_exports, {
31483
31811
  Console: () => Console,
@@ -31574,7 +31902,7 @@ var withTime = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, label)
31574
31902
  console2.timeEnd(label);
31575
31903
  }))));
31576
31904
 
31577
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Match.js
31905
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
31578
31906
  var Match_exports = {};
31579
31907
  __export(Match_exports, {
31580
31908
  any: () => any3,
@@ -31587,6 +31915,7 @@ __export(Match_exports, {
31587
31915
  discriminators: () => discriminators2,
31588
31916
  discriminatorsExhaustive: () => discriminatorsExhaustive2,
31589
31917
  exhaustive: () => exhaustive2,
31918
+ fn: () => fn4,
31590
31919
  instanceOf: () => instanceOf3,
31591
31920
  instanceOfUnsafe: () => instanceOfUnsafe,
31592
31921
  is: () => is4,
@@ -31616,35 +31945,38 @@ __export(Match_exports, {
31616
31945
  withReturnType: () => withReturnType2
31617
31946
  });
31618
31947
 
31619
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/internal/matcher.js
31620
- var TypeId23 = "~effect/match/Match/Matcher";
31948
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/internal/matcher.js
31949
+ var TypeId25 = "~effect/match/Match/Matcher";
31621
31950
  var TypeMatcherProto = {
31622
- [TypeId23]: {
31951
+ [TypeId25]: {
31623
31952
  _input: identity,
31624
31953
  _filters: identity,
31625
31954
  _remaining: identity,
31626
31955
  _result: identity,
31627
- _return: identity
31956
+ _return: identity,
31957
+ _args: identity
31628
31958
  },
31629
31959
  _tag: "TypeMatcher",
31630
31960
  add(_case) {
31631
- return makeTypeMatcher([...this.cases, _case]);
31961
+ return makeTypeMatcher(this.select, [...this.cases, _case]);
31632
31962
  },
31633
31963
  pipe() {
31634
31964
  return pipeArguments(this, arguments);
31635
31965
  }
31636
31966
  };
31637
- function makeTypeMatcher(cases) {
31967
+ function makeTypeMatcher(select, cases) {
31638
31968
  const matcher = Object.create(TypeMatcherProto);
31969
+ matcher.select = select;
31639
31970
  matcher.cases = cases;
31640
31971
  return matcher;
31641
31972
  }
31642
31973
  var ValueMatcherProto = {
31643
- [TypeId23]: {
31974
+ [TypeId25]: {
31644
31975
  _input: identity,
31645
31976
  _filters: identity,
31646
31977
  _result: identity,
31647
- _return: identity
31978
+ _return: identity,
31979
+ _flavor: identity
31648
31980
  },
31649
31981
  _tag: "ValueMatcher",
31650
31982
  add(_case) {
@@ -31737,14 +32069,15 @@ var makeAndPredicate = (patterns) => {
31737
32069
  return true;
31738
32070
  };
31739
32071
  };
31740
- var type = () => makeTypeMatcher([]);
32072
+ var type = () => makeTypeMatcher(identity, []);
32073
+ var fn3 = (select) => makeTypeMatcher(select, []);
31741
32074
  var value3 = (i) => makeValueMatcher(i, fail2(i));
31742
32075
  var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
31743
- const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
32076
+ const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
31744
32077
  return match9(input);
31745
32078
  });
31746
32079
  var typeTags = () => (fields) => {
31747
- const match9 = tagsExhaustive(fields)(makeTypeMatcher([]));
32080
+ const match9 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
31748
32081
  return (input) => match9(input);
31749
32082
  };
31750
32083
  var withReturnType = () => (self) => self;
@@ -31802,9 +32135,9 @@ var orElse2 = (f) => (self) => {
31802
32135
  if (isResult2(toResult)) {
31803
32136
  return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
31804
32137
  }
31805
- return (input) => {
31806
- const a = toResult(input);
31807
- return isSuccess2(a) ? a.success : f(a.failure);
32138
+ return (...args2) => {
32139
+ const a = toResult(...args2);
32140
+ return isSuccess2(a) ? a.success : f(a.failure, ...args2);
31808
32141
  };
31809
32142
  };
31810
32143
  var orElseAbsurd = (self) => orElse2(() => {
@@ -31817,22 +32150,24 @@ var result3 = (self) => {
31817
32150
  const len = self.cases.length;
31818
32151
  if (len === 1) {
31819
32152
  const _case = self.cases[0];
31820
- return (input) => {
32153
+ return (...args2) => {
32154
+ const input = self.select(...args2);
31821
32155
  if (_case._tag === "When" && _case.guard(input) === true) {
31822
- return succeed2(_case.evaluate(input));
32156
+ return succeed2(_case.evaluate(input, ...args2));
31823
32157
  } else if (_case._tag === "Not" && _case.guard(input) === false) {
31824
- return succeed2(_case.evaluate(input));
32158
+ return succeed2(_case.evaluate(input, ...args2));
31825
32159
  }
31826
32160
  return fail2(input);
31827
32161
  };
31828
32162
  }
31829
- return (input) => {
32163
+ return (...args2) => {
32164
+ const input = self.select(...args2);
31830
32165
  for (let i = 0; i < len; i++) {
31831
32166
  const _case = self.cases[i];
31832
32167
  if (_case._tag === "When" && _case.guard(input) === true) {
31833
- return succeed2(_case.evaluate(input));
32168
+ return succeed2(_case.evaluate(input, ...args2));
31834
32169
  } else if (_case._tag === "Not" && _case.guard(input) === false) {
31835
- return succeed2(_case.evaluate(input));
32170
+ return succeed2(_case.evaluate(input, ...args2));
31836
32171
  }
31837
32172
  }
31838
32173
  return fail2(input);
@@ -31846,7 +32181,7 @@ var option3 = (self) => {
31846
32181
  onSuccess: some2
31847
32182
  });
31848
32183
  }
31849
- return (input) => match2(toResult(input), {
32184
+ return (...args2) => match2(toResult(...args2), {
31850
32185
  onFailure: () => none2(),
31851
32186
  onSuccess: some2
31852
32187
  });
@@ -31860,8 +32195,8 @@ var exhaustive = (self) => {
31860
32195
  }
31861
32196
  throw new Error(getExhaustiveAbsurdErrorMessage);
31862
32197
  }
31863
- return (u) => {
31864
- const result5 = toResult(u);
32198
+ return (...args2) => {
32199
+ const result5 = toResult(...args2);
31865
32200
  if (isSuccess2(result5)) {
31866
32201
  return result5.success;
31867
32202
  }
@@ -31869,8 +32204,9 @@ var exhaustive = (self) => {
31869
32204
  };
31870
32205
  };
31871
32206
 
31872
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Match.js
32207
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Match.js
31873
32208
  var type2 = type;
32209
+ var fn4 = fn3;
31874
32210
  var value4 = value3;
31875
32211
  var valueTags2 = valueTags;
31876
32212
  var typeTags2 = typeTags;
@@ -31908,7 +32244,7 @@ var result4 = result3;
31908
32244
  var option4 = option3;
31909
32245
  var exhaustive2 = exhaustive;
31910
32246
 
31911
- // ../../node_modules/.pnpm/effect@4.0.0-rc.109/node_modules/effect/dist/Ref.js
32247
+ // ../../node_modules/.pnpm/effect@4.0.0-rc.111/node_modules/effect/dist/Ref.js
31912
32248
  var Ref_exports = {};
31913
32249
  __export(Ref_exports, {
31914
32250
  get: () => get6,
@@ -31916,7 +32252,7 @@ __export(Ref_exports, {
31916
32252
  getAndUpdate: () => getAndUpdate,
31917
32253
  getAndUpdateSome: () => getAndUpdateSome,
31918
32254
  getUnsafe: () => getUnsafe6,
31919
- make: () => make25,
32255
+ make: () => make26,
31920
32256
  makeUnsafe: () => makeUnsafe5,
31921
32257
  modify: () => modify4,
31922
32258
  modifySome: () => modifySome,
@@ -31927,9 +32263,9 @@ __export(Ref_exports, {
31927
32263
  updateSome: () => updateSome,
31928
32264
  updateSomeAndGet: () => updateSomeAndGet
31929
32265
  });
31930
- var TypeId24 = "~effect/Ref";
32266
+ var TypeId26 = "~effect/Ref";
31931
32267
  var RefProto = {
31932
- [TypeId24]: {
32268
+ [TypeId26]: {
31933
32269
  _A: identity
31934
32270
  },
31935
32271
  ...PipeInspectableProto,
@@ -31945,7 +32281,7 @@ var makeUnsafe5 = (value5) => {
31945
32281
  self.ref = make16(value5);
31946
32282
  return self;
31947
32283
  };
31948
- var make25 = (value5) => sync3(() => makeUnsafe5(value5));
32284
+ var make26 = (value5) => sync3(() => makeUnsafe5(value5));
31949
32285
  var get6 = (self) => sync3(() => self.ref.current);
31950
32286
  var set4 = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => set(self.ref, value5)));
31951
32287
  var getAndSet = /* @__PURE__ */ dual(2, (self, value5) => sync3(() => {
@@ -35179,7 +35515,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35179
35515
  });
35180
35516
  }
35181
35517
  const params = { errorMap: ctx.common.contextualErrorMap };
35182
- const fn3 = ctx.data;
35518
+ const fn5 = ctx.data;
35183
35519
  if (this._def.returns instanceof ZodPromise) {
35184
35520
  const me = this;
35185
35521
  return OK(async function(...args2) {
@@ -35188,7 +35524,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35188
35524
  error3.addIssue(makeArgsIssue(args2, e));
35189
35525
  throw error3;
35190
35526
  });
35191
- const result5 = await Reflect.apply(fn3, this, parsedArgs);
35527
+ const result5 = await Reflect.apply(fn5, this, parsedArgs);
35192
35528
  const parsedReturns = await me._def.returns._def.type.parseAsync(result5, params).catch((e) => {
35193
35529
  error3.addIssue(makeReturnsIssue(result5, e));
35194
35530
  throw error3;
@@ -35202,7 +35538,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
35202
35538
  if (!parsedArgs.success) {
35203
35539
  throw new ZodError([makeArgsIssue(args2, parsedArgs.error)]);
35204
35540
  }
35205
- const result5 = Reflect.apply(fn3, this, parsedArgs.data);
35541
+ const result5 = Reflect.apply(fn5, this, parsedArgs.data);
35206
35542
  const parsedReturns = me._def.returns.safeParse(result5, params);
35207
35543
  if (!parsedReturns.success) {
35208
35544
  throw new ZodError([makeReturnsIssue(result5, parsedReturns.error)]);
@@ -35911,8 +36247,8 @@ function $constructor(name, initializer3, params) {
35911
36247
  const inst = params?.Parent ? new Definition() : this;
35912
36248
  init2(inst, def);
35913
36249
  (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
35914
- for (const fn3 of inst._zod.deferred) {
35915
- fn3();
36250
+ for (const fn5 of inst._zod.deferred) {
36251
+ fn5();
35916
36252
  }
35917
36253
  return inst;
35918
36254
  }
@@ -35965,7 +36301,7 @@ __export(util_exports, {
35965
36301
  captureStackTrace: () => captureStackTrace,
35966
36302
  cleanEnum: () => cleanEnum,
35967
36303
  cleanRegex: () => cleanRegex,
35968
- clone: () => clone,
36304
+ clone: () => clone2,
35969
36305
  cloneDef: () => cloneDef,
35970
36306
  createTransparentProxy: () => createTransparentProxy,
35971
36307
  defineLazy: () => defineLazy,
@@ -36246,7 +36582,7 @@ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boo
36246
36582
  function escapeRegex(str) {
36247
36583
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
36248
36584
  }
36249
- function clone(inst, def, params) {
36585
+ function clone2(inst, def, params) {
36250
36586
  const cl = new inst._zod.constr(def ?? inst._zod.def);
36251
36587
  if (!def || params?.parent)
36252
36588
  cl._zod.parent = inst;
@@ -36347,7 +36683,7 @@ function pick2(schema, mask2) {
36347
36683
  },
36348
36684
  checks: []
36349
36685
  });
36350
- return clone(schema, def);
36686
+ return clone2(schema, def);
36351
36687
  }
36352
36688
  function omit3(schema, mask2) {
36353
36689
  const currDef = schema._zod.def;
@@ -36372,7 +36708,7 @@ function omit3(schema, mask2) {
36372
36708
  },
36373
36709
  checks: []
36374
36710
  });
36375
- return clone(schema, def);
36711
+ return clone2(schema, def);
36376
36712
  }
36377
36713
  function extend2(schema, shape) {
36378
36714
  if (!isPlainObject(shape)) {
@@ -36395,7 +36731,7 @@ function extend2(schema, shape) {
36395
36731
  return _shape;
36396
36732
  }
36397
36733
  });
36398
- return clone(schema, def);
36734
+ return clone2(schema, def);
36399
36735
  }
36400
36736
  function safeExtend(schema, shape) {
36401
36737
  if (!isPlainObject(shape)) {
@@ -36408,7 +36744,7 @@ function safeExtend(schema, shape) {
36408
36744
  return _shape;
36409
36745
  }
36410
36746
  });
36411
- return clone(schema, def);
36747
+ return clone2(schema, def);
36412
36748
  }
36413
36749
  function merge3(a, b) {
36414
36750
  const def = mergeDefs(a._zod.def, {
@@ -36423,7 +36759,7 @@ function merge3(a, b) {
36423
36759
  checks: []
36424
36760
  // delete existing checks
36425
36761
  });
36426
- return clone(a, def);
36762
+ return clone2(a, def);
36427
36763
  }
36428
36764
  function partial(Class6, schema, mask2) {
36429
36765
  const currDef = schema._zod.def;
@@ -36461,7 +36797,7 @@ function partial(Class6, schema, mask2) {
36461
36797
  },
36462
36798
  checks: []
36463
36799
  });
36464
- return clone(schema, def);
36800
+ return clone2(schema, def);
36465
36801
  }
36466
36802
  function required2(Class6, schema, mask2) {
36467
36803
  const def = mergeDefs(schema._zod.def, {
@@ -36492,7 +36828,7 @@ function required2(Class6, schema, mask2) {
36492
36828
  return shape;
36493
36829
  }
36494
36830
  });
36495
- return clone(schema, def);
36831
+ return clone2(schema, def);
36496
36832
  }
36497
36833
  function aborted(x, startIndex = 0) {
36498
36834
  if (x.aborted === true)
@@ -37483,9 +37819,9 @@ var Doc = class {
37483
37819
  if (this)
37484
37820
  this.args = args2;
37485
37821
  }
37486
- indented(fn3) {
37822
+ indented(fn5) {
37487
37823
  this.indent += 1;
37488
- fn3(this);
37824
+ fn5(this);
37489
37825
  this.indent -= 1;
37490
37826
  }
37491
37827
  write(arg) {
@@ -37530,8 +37866,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
37530
37866
  checks.unshift(inst);
37531
37867
  }
37532
37868
  for (const ch of checks) {
37533
- for (const fn3 of ch._zod.onattach) {
37534
- fn3(inst);
37869
+ for (const fn5 of ch._zod.onattach) {
37870
+ fn5(inst);
37535
37871
  }
37536
37872
  }
37537
37873
  if (checks.length === 0) {
@@ -38354,8 +38690,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
38354
38690
  }
38355
38691
  doc.write(`payload.value = newResult;`);
38356
38692
  doc.write(`return payload;`);
38357
- const fn3 = doc.compile();
38358
- return (payload, ctx) => fn3(shape, payload, ctx);
38693
+ const fn5 = doc.compile();
38694
+ return (payload, ctx) => fn5(shape, payload, ctx);
38359
38695
  };
38360
38696
  let fastpass;
38361
38697
  const isObject3 = isObject2;
@@ -40304,29 +40640,29 @@ function _file(Class6, params) {
40304
40640
  });
40305
40641
  }
40306
40642
  // @__NO_SIDE_EFFECTS__
40307
- function _custom(Class6, fn3, _params) {
40643
+ function _custom(Class6, fn5, _params) {
40308
40644
  const norm = normalizeParams(_params);
40309
40645
  norm.abort ?? (norm.abort = true);
40310
40646
  const schema = new Class6({
40311
40647
  type: "custom",
40312
40648
  check: "custom",
40313
- fn: fn3,
40649
+ fn: fn5,
40314
40650
  ...norm
40315
40651
  });
40316
40652
  return schema;
40317
40653
  }
40318
40654
  // @__NO_SIDE_EFFECTS__
40319
- function _refine(Class6, fn3, _params) {
40655
+ function _refine(Class6, fn5, _params) {
40320
40656
  const schema = new Class6({
40321
40657
  type: "custom",
40322
40658
  check: "custom",
40323
- fn: fn3,
40659
+ fn: fn5,
40324
40660
  ...normalizeParams(_params)
40325
40661
  });
40326
40662
  return schema;
40327
40663
  }
40328
40664
  // @__NO_SIDE_EFFECTS__
40329
- function _superRefine(fn3) {
40665
+ function _superRefine(fn5) {
40330
40666
  const ch = /* @__PURE__ */ _check((payload) => {
40331
40667
  payload.addIssue = (issue2) => {
40332
40668
  if (typeof issue2 === "string") {
@@ -40342,17 +40678,17 @@ function _superRefine(fn3) {
40342
40678
  payload.issues.push(issue(_issue2));
40343
40679
  }
40344
40680
  };
40345
- return fn3(payload.value, payload);
40681
+ return fn5(payload.value, payload);
40346
40682
  });
40347
40683
  return ch;
40348
40684
  }
40349
40685
  // @__NO_SIDE_EFFECTS__
40350
- function _check(fn3, params) {
40686
+ function _check(fn5, params) {
40351
40687
  const ch = new $ZodCheck({
40352
40688
  check: "custom",
40353
40689
  ...normalizeParams(params)
40354
40690
  });
40355
- ch._zod.check = fn3;
40691
+ ch._zod.check = fn5;
40356
40692
  return ch;
40357
40693
  }
40358
40694
  // @__NO_SIDE_EFFECTS__
@@ -40516,7 +40852,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
40516
40852
  const meta3 = ctx.metadataRegistry.get(schema);
40517
40853
  if (meta3)
40518
40854
  Object.assign(result5.schema, meta3);
40519
- if (ctx.io === "input" && isTransforming(schema)) {
40855
+ if (ctx.io === "input" && isTransforming2(schema)) {
40520
40856
  delete result5.schema.examples;
40521
40857
  delete result5.schema.default;
40522
40858
  }
@@ -40616,7 +40952,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
40616
40952
  }
40617
40953
  }
40618
40954
  }
40619
- function finalize(ctx, schema) {
40955
+ function finalize2(ctx, schema) {
40620
40956
  const root = ctx.seen.get(schema);
40621
40957
  if (!root)
40622
40958
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -40737,7 +41073,7 @@ function finalize(ctx, schema) {
40737
41073
  throw new Error("Error converting schema to JSON.");
40738
41074
  }
40739
41075
  }
40740
- function isTransforming(_schema, _ctx) {
41076
+ function isTransforming2(_schema, _ctx) {
40741
41077
  const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
40742
41078
  if (ctx.seen.has(_schema))
40743
41079
  return false;
@@ -40746,43 +41082,43 @@ function isTransforming(_schema, _ctx) {
40746
41082
  if (def.type === "transform")
40747
41083
  return true;
40748
41084
  if (def.type === "array")
40749
- return isTransforming(def.element, ctx);
41085
+ return isTransforming2(def.element, ctx);
40750
41086
  if (def.type === "set")
40751
- return isTransforming(def.valueType, ctx);
41087
+ return isTransforming2(def.valueType, ctx);
40752
41088
  if (def.type === "lazy")
40753
- return isTransforming(def.getter(), ctx);
41089
+ return isTransforming2(def.getter(), ctx);
40754
41090
  if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
40755
- return isTransforming(def.innerType, ctx);
41091
+ return isTransforming2(def.innerType, ctx);
40756
41092
  }
40757
41093
  if (def.type === "intersection") {
40758
- return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
41094
+ return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
40759
41095
  }
40760
41096
  if (def.type === "record" || def.type === "map") {
40761
- return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
41097
+ return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
40762
41098
  }
40763
41099
  if (def.type === "pipe") {
40764
- return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
41100
+ return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
40765
41101
  }
40766
41102
  if (def.type === "object") {
40767
41103
  for (const key in def.shape) {
40768
- if (isTransforming(def.shape[key], ctx))
41104
+ if (isTransforming2(def.shape[key], ctx))
40769
41105
  return true;
40770
41106
  }
40771
41107
  return false;
40772
41108
  }
40773
41109
  if (def.type === "union") {
40774
41110
  for (const option5 of def.options) {
40775
- if (isTransforming(option5, ctx))
41111
+ if (isTransforming2(option5, ctx))
40776
41112
  return true;
40777
41113
  }
40778
41114
  return false;
40779
41115
  }
40780
41116
  if (def.type === "tuple") {
40781
41117
  for (const item of def.items) {
40782
- if (isTransforming(item, ctx))
41118
+ if (isTransforming2(item, ctx))
40783
41119
  return true;
40784
41120
  }
40785
- if (def.rest && isTransforming(def.rest, ctx))
41121
+ if (def.rest && isTransforming2(def.rest, ctx))
40786
41122
  return true;
40787
41123
  return false;
40788
41124
  }
@@ -40792,14 +41128,14 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
40792
41128
  const ctx = initializeContext({ ...params, processors });
40793
41129
  process2(schema, ctx);
40794
41130
  extractDefs(ctx, schema);
40795
- return finalize(ctx, schema);
41131
+ return finalize2(ctx, schema);
40796
41132
  };
40797
41133
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
40798
41134
  const { libraryOptions, target } = params ?? {};
40799
41135
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
40800
41136
  process2(schema, ctx);
40801
41137
  extractDefs(ctx, schema);
40802
- return finalize(ctx, schema);
41138
+ return finalize2(ctx, schema);
40803
41139
  };
40804
41140
 
40805
41141
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
@@ -41663,7 +41999,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41663
41999
  });
41664
42000
  };
41665
42001
  inst.with = inst.check;
41666
- inst.clone = (def2, params) => clone(inst, def2, params);
42002
+ inst.clone = (def2, params) => clone2(inst, def2, params);
41667
42003
  inst.brand = () => inst;
41668
42004
  inst.register = ((reg, meta3) => {
41669
42005
  reg.add(inst, meta3);
@@ -41684,7 +42020,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41684
42020
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
41685
42021
  inst.refine = (check3, params) => inst.check(refine2(check3, params));
41686
42022
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
41687
- inst.overwrite = (fn3) => inst.check(_overwrite(fn3));
42023
+ inst.overwrite = (fn5) => inst.check(_overwrite(fn5));
41688
42024
  inst.optional = () => optional3(inst);
41689
42025
  inst.exactOptional = () => exactOptional(inst);
41690
42026
  inst.nullable = () => nullable(inst);
@@ -41720,7 +42056,7 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
41720
42056
  };
41721
42057
  inst.isOptional = () => inst.safeParse(void 0).success;
41722
42058
  inst.isNullable = () => inst.safeParse(null).success;
41723
- inst.apply = (fn3) => fn3(inst);
42059
+ inst.apply = (fn5) => fn5(inst);
41724
42060
  return inst;
41725
42061
  });
41726
42062
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -42276,7 +42612,7 @@ function record3(keyType, valueType, params) {
42276
42612
  });
42277
42613
  }
42278
42614
  function partialRecord(keyType, valueType, params) {
42279
- const k = clone(keyType);
42615
+ const k = clone2(keyType);
42280
42616
  k._zod.values = void 0;
42281
42617
  return new ZodRecord2({
42282
42618
  type: "record",
@@ -42446,10 +42782,10 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
42446
42782
  return payload;
42447
42783
  };
42448
42784
  });
42449
- function transform3(fn3) {
42785
+ function transform3(fn5) {
42450
42786
  return new ZodTransform({
42451
42787
  type: "transform",
42452
- transform: fn3
42788
+ transform: fn5
42453
42789
  });
42454
42790
  }
42455
42791
  var ZodOptional2 = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
@@ -42662,22 +42998,22 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
42662
42998
  ZodType2.init(inst, def);
42663
42999
  inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
42664
43000
  });
42665
- function check2(fn3) {
43001
+ function check2(fn5) {
42666
43002
  const ch = new $ZodCheck({
42667
43003
  check: "custom"
42668
43004
  // ...util.normalizeParams(params),
42669
43005
  });
42670
- ch._zod.check = fn3;
43006
+ ch._zod.check = fn5;
42671
43007
  return ch;
42672
43008
  }
42673
- function custom(fn3, _params) {
42674
- return _custom(ZodCustom, fn3 ?? (() => true), _params);
43009
+ function custom(fn5, _params) {
43010
+ return _custom(ZodCustom, fn5 ?? (() => true), _params);
42675
43011
  }
42676
- function refine2(fn3, _params = {}) {
42677
- return _refine(ZodCustom, fn3, _params);
43012
+ function refine2(fn5, _params = {}) {
43013
+ return _refine(ZodCustom, fn5, _params);
42678
43014
  }
42679
- function superRefine(fn3) {
42680
- return _superRefine(fn3);
43015
+ function superRefine(fn5) {
43016
+ return _superRefine(fn5);
42681
43017
  }
42682
43018
  var describe2 = describe;
42683
43019
  var meta2 = meta;
@@ -42714,8 +43050,8 @@ function json(params) {
42714
43050
  });
42715
43051
  return jsonSchema;
42716
43052
  }
42717
- function preprocess(fn3, schema) {
42718
- return pipe2(transform3(fn3), schema);
43053
+ function preprocess(fn5, schema) {
43054
+ return pipe2(transform3(fn5), schema);
42719
43055
  }
42720
43056
 
42721
43057
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
@@ -46159,28 +46495,28 @@ var getDirectPropertyNames = (propertySignatures) => {
46159
46495
  var makeCallable = (tag4, fields) => {
46160
46496
  const schema = Schema_exports.TaggedStruct(tag4, fields);
46161
46497
  const propertyNames = Object.hasOwn(fields, "_tag") ? void 0 : getDirectPropertyNames(schema.ast.propertySignatures);
46162
- const make26 = (value5) => schema.make(
46498
+ const make27 = (value5) => schema.make(
46163
46499
  /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
46164
46500
  value5 ?? {}
46165
46501
  );
46166
46502
  const construct = propertyNames !== void 0 ? (value5) => {
46167
46503
  const input = value5 ?? {};
46168
46504
  if (Object(input) !== input) {
46169
- return make26(value5);
46505
+ return make27(value5);
46170
46506
  }
46171
46507
  const output = {};
46172
46508
  for (const name of propertyNames) {
46173
46509
  const descriptor = Object.getOwnPropertyDescriptor(input, name);
46174
46510
  if (name !== "_tag" && descriptor === void 0 && Reflect.has(input, name)) {
46175
- return make26(value5);
46511
+ return make27(value5);
46176
46512
  }
46177
46513
  if (descriptor !== void 0 && !("value" in descriptor)) {
46178
- return make26(value5);
46514
+ return make27(value5);
46179
46515
  }
46180
46516
  const inputValue = descriptor === void 0 ? void 0 : input[name];
46181
46517
  if (name === "_tag") {
46182
46518
  if (inputValue !== void 0 && inputValue !== tag4) {
46183
- return make26(value5);
46519
+ return make27(value5);
46184
46520
  }
46185
46521
  if (descriptor !== void 0 && inputValue === void 0) {
46186
46522
  assignPlainProperty(output, name, inputValue);
@@ -46191,7 +46527,7 @@ var makeCallable = (tag4, fields) => {
46191
46527
  }
46192
46528
  }
46193
46529
  return output;
46194
- } : make26;
46530
+ } : make27;
46195
46531
  return new Proxy(function() {
46196
46532
  }, {
46197
46533
  apply(_target, _thisArg, argumentsList) {