clanka 0.8.3 → 0.8.5

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 (40) hide show
  1. package/dist/AgentExecutor.d.ts.map +1 -1
  2. package/dist/AgentExecutor.js +1 -1
  3. package/dist/AgentExecutor.js.map +1 -1
  4. package/dist/AgentExecutor.test.d.ts +2 -0
  5. package/dist/AgentExecutor.test.d.ts.map +1 -0
  6. package/dist/AgentExecutor.test.js +87 -0
  7. package/dist/AgentExecutor.test.js.map +1 -0
  8. package/dist/AgentSkills.test.js +1 -0
  9. package/dist/AgentSkills.test.js.map +1 -1
  10. package/dist/AgentTools.d.ts.map +1 -1
  11. package/dist/AgentTools.js +2 -1
  12. package/dist/AgentTools.js.map +1 -1
  13. package/dist/Compaction.test.js +1 -0
  14. package/dist/Compaction.test.js.map +1 -1
  15. package/dist/bin/{Effect-BCeySOy1.mjs → Effect-BEUn4I5E.mjs} +339 -288
  16. package/dist/bin/Effect-BEUn4I5E.mjs.map +1 -0
  17. package/dist/bin/{McpClient-DP4jlaD1.mjs → McpClient-C0FVuDj2.mjs} +218 -62
  18. package/dist/bin/McpClient-C0FVuDj2.mjs.map +1 -0
  19. package/dist/bin/{OutputFormatter-Ch8yFytV.mjs → OutputFormatter-DffD5oxX.mjs} +8 -8
  20. package/dist/bin/OutputFormatter-DffD5oxX.mjs.map +1 -0
  21. package/dist/bin/{Schema-C9JQ5hI0.mjs → Schema-CjUGw2Xh.mjs} +480 -384
  22. package/dist/bin/Schema-CjUGw2Xh.mjs.map +1 -0
  23. package/dist/bin/{SemanticSearch-BJGnYhFt.mjs → SemanticSearch-CFB73IPb.mjs} +321 -268
  24. package/dist/bin/SemanticSearch-CFB73IPb.mjs.map +1 -0
  25. package/dist/bin/{Stream-CgH3SuLu.mjs → Stream-Cu6P7ZHo.mjs} +180 -172
  26. package/dist/bin/Stream-Cu6P7ZHo.mjs.map +1 -0
  27. package/dist/bin/cli.mjs +306 -259
  28. package/dist/bin/cli.mjs.map +1 -1
  29. package/package.json +20 -20
  30. package/src/AgentExecutor.test.ts +133 -0
  31. package/src/AgentExecutor.ts +1 -2
  32. package/src/AgentSkills.test.ts +1 -0
  33. package/src/AgentTools.ts +2 -1
  34. package/src/Compaction.test.ts +1 -0
  35. package/dist/bin/Effect-BCeySOy1.mjs.map +0 -1
  36. package/dist/bin/McpClient-DP4jlaD1.mjs.map +0 -1
  37. package/dist/bin/OutputFormatter-Ch8yFytV.mjs.map +0 -1
  38. package/dist/bin/Schema-C9JQ5hI0.mjs.map +0 -1
  39. package/dist/bin/SemanticSearch-BJGnYhFt.mjs.map +0 -1
  40. package/dist/bin/Stream-CgH3SuLu.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Pipeable.js
1
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Pipeable.js
2
2
  const pipeArguments = (self, args) => {
3
3
  switch (args.length) {
4
4
  case 0: return self;
@@ -27,7 +27,7 @@ const Class$2 = function() {
27
27
  return PipeableBase;
28
28
  }();
29
29
  //#endregion
30
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Function.js
30
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Function.js
31
31
  const dual = function(arity, body) {
32
32
  if (typeof arity === "function") return function() {
33
33
  return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
@@ -112,12 +112,12 @@ function memoizeIdempotent(f) {
112
112
  if (cached !== void 0) return cached;
113
113
  const result = f(a);
114
114
  cache.set(a, result);
115
- cache.set(result, result);
115
+ if (result !== a) cache.set(result, result);
116
116
  return result;
117
117
  };
118
118
  }
119
119
  //#endregion
120
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/equal.js
120
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/equal.js
121
121
  const getAllObjectKeys = (obj) => {
122
122
  const keys = new Set(Reflect.ownKeys(obj));
123
123
  if (obj.constructor === Object) return keys;
@@ -135,13 +135,13 @@ const getAllObjectKeys = (obj) => {
135
135
  const byReferenceInstances = new WeakSet();
136
136
  const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
137
137
  //#endregion
138
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/hash.js
138
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/hash.js
139
139
  let backEdges = 0;
140
140
  const addBackEdge = () => {
141
141
  backEdges++;
142
142
  };
143
143
  //#endregion
144
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Predicate.js
144
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Predicate.js
145
145
  function isString(input) {
146
146
  return typeof input === "string";
147
147
  }
@@ -203,7 +203,7 @@ function isIterable(input) {
203
203
  }
204
204
  const or = dual(2, (self, that) => (a) => self(a) || that(a));
205
205
  //#endregion
206
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Hash.js
206
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Hash.js
207
207
  const symbol$1 = "~effect/Hash";
208
208
  const hash = (self) => {
209
209
  switch (typeof self) {
@@ -292,7 +292,7 @@ const randomHashCache = new WeakMap();
292
292
  const hashCache = new WeakMap();
293
293
  const visitedObjects = new WeakSet();
294
294
  //#endregion
295
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Equal.js
295
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Equal.js
296
296
  const symbol = "~effect/Equal";
297
297
  function equals$1() {
298
298
  if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
@@ -404,7 +404,7 @@ const byReferenceUnsafe = (obj) => {
404
404
  return obj;
405
405
  };
406
406
  //#endregion
407
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Redactable.js
407
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Redactable.js
408
408
  const symbolRedactable = Symbol.for("~effect/Redactable");
409
409
  const isRedactable = (u) => hasProperty(u, symbolRedactable);
410
410
  function redact(u) {
@@ -426,7 +426,7 @@ const emptyContext$1 = {
426
426
  }
427
427
  };
428
428
  //#endregion
429
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Formatter.js
429
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Formatter.js
430
430
  function format$1(input, options) {
431
431
  const space = options?.space ?? 0;
432
432
  const ancestors = new WeakSet();
@@ -532,7 +532,7 @@ function formatJson(input, options) {
532
532
  }, options?.space) ?? "null";
533
533
  }
534
534
  //#endregion
535
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Inspectable.js
535
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Inspectable.js
536
536
  const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
537
537
  const toJson = (input) => {
538
538
  try {
@@ -572,7 +572,7 @@ var Class$1 = class {
572
572
  }
573
573
  };
574
574
  //#endregion
575
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/stackTraceLimit.js
575
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/stackTraceLimit.js
576
576
  const isStackTraceLimitWritable = () => {
577
577
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
578
578
  if (desc === void 0) return Object.isExtensible(Error);
@@ -584,24 +584,22 @@ const setStackTraceLimit = (value) => {
584
584
  if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
585
585
  };
586
586
  //#endregion
587
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Utils.js
588
- var SingleShotGen = class SingleShotGen {
589
- called = false;
590
- self;
587
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Utils.js
588
+ var SingleShotGen = class {
591
589
  constructor(self) {
592
- this.self = self;
590
+ this.value = self;
591
+ this.done = false;
593
592
  }
594
593
  next(a) {
595
- return this.called ? {
596
- value: a,
597
- done: true
598
- } : (this.called = true, {
599
- value: this.self,
594
+ if (this.done) {
595
+ this.value = a;
596
+ return this;
597
+ }
598
+ this.done = true;
599
+ return {
600
+ value: this.value,
600
601
  done: false
601
- });
602
- }
603
- [Symbol.iterator]() {
604
- return new SingleShotGen(this.self);
602
+ };
605
603
  }
606
604
  };
607
605
  const pickInternalCall = () => {
@@ -618,7 +616,7 @@ const pickInternalCall = () => {
618
616
  };
619
617
  const internalCall = pickInternalCall();
620
618
  //#endregion
621
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/record.js
619
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/record.js
622
620
  function assignProperty(self, key, value) {
623
621
  if (key === "__proto__") Object.defineProperty(self, key, {
624
622
  value,
@@ -632,7 +630,7 @@ function assignProperties(self, source) {
632
630
  for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
633
631
  }
634
632
  //#endregion
635
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/core.js
633
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/core.js
636
634
  const EffectTypeId = `~effect/Effect`;
637
635
  const ExitTypeId = `~effect/Exit`;
638
636
  const effectVariance = {
@@ -782,6 +780,25 @@ var Fail = class extends ReasonBase {
782
780
  }
783
781
  };
784
782
  const causeFromReasons = (reasons) => new CauseImpl(reasons);
783
+ const dedupeReasons = (self, that) => {
784
+ const buckets = new Map();
785
+ const out = [];
786
+ for (const reason of self.concat(that)) {
787
+ const hash$2 = hash(reason);
788
+ const bucket = buckets.get(hash$2);
789
+ if (bucket === void 0) buckets.set(hash$2, [reason]);
790
+ else if (bucket.some((previous) => equals$1(previous, reason))) continue;
791
+ else bucket.push(reason);
792
+ out.push(reason);
793
+ }
794
+ return out;
795
+ };
796
+ const causeCombine = dual(2, (self, that) => {
797
+ if (self.reasons.length === 0) return that;
798
+ else if (that.reasons.length === 0) return self;
799
+ const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
800
+ return equals$1(self, newCause) ? self : newCause;
801
+ });
785
802
  const causeEmpty = new CauseImpl([]);
786
803
  const causeFail = (error) => new CauseImpl([new Fail(error)]);
787
804
  var Die = class extends ReasonBase {
@@ -888,7 +905,17 @@ const exitFailCause = makeExit({
888
905
  annotated = true;
889
906
  }
890
907
  let cont = fiber.getCont(contE);
891
- while (fiber.interruptible && fiber._interruptedCause && cont) cont = fiber.getCont(contE);
908
+ const interruptedCause = fiber._interruptedCause;
909
+ if (interruptedCause && fiber.interruptible) {
910
+ let skippedHandler = false;
911
+ while (cont && fiber.interruptible) {
912
+ skippedHandler ||= identifier in cont;
913
+ cont = fiber.getCont(contE);
914
+ }
915
+ if (skippedHandler) cause = causeFromReasons(cause.reasons.filter((reason) => reason._tag !== "Fail"));
916
+ cause = causeCombine(cause, interruptedCause);
917
+ annotated = true;
918
+ }
892
919
  return cont ? cont[contE](cause, fiber, annotated ? void 0 : this) : fiber.yieldWith(annotated ? exitFailCause(cause) : this);
893
920
  }
894
921
  });
@@ -969,13 +996,13 @@ const done$2 = (value) => {
969
996
  return exitFail(Done$1(value));
970
997
  };
971
998
  //#endregion
972
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Effectable.js
999
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Effectable.js
973
1000
  const Prototype = (options) => makePrimitiveProto({
974
1001
  op: options.label,
975
1002
  [evaluate]: options.evaluate
976
1003
  });
977
1004
  //#endregion
978
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Equivalence.js
1005
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Equivalence.js
979
1006
  const make$5 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
980
1007
  const isStrictEquivalent = (x, y) => x === y;
981
1008
  const strictEqual = () => isStrictEquivalent;
@@ -994,7 +1021,7 @@ function Array_(item) {
994
1021
  });
995
1022
  }
996
1023
  //#endregion
997
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/option.js
1024
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/option.js
998
1025
  const TypeId$7 = "~effect/Option";
999
1026
  const CommonProto$1 = {
1000
1027
  [TypeId$7]: { _A: (_) => _ },
@@ -1056,7 +1083,7 @@ const SomeImpl = function(value) {
1056
1083
  SomeImpl.prototype = SomeProto;
1057
1084
  const some$1 = (value) => new SomeImpl(value);
1058
1085
  //#endregion
1059
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/result.js
1086
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/result.js
1060
1087
  const TypeId$6 = "~effect/Result";
1061
1088
  const CommonProto = {
1062
1089
  [TypeId$6]: {
@@ -1122,7 +1149,7 @@ const SuccessImpl = function(success) {
1122
1149
  SuccessImpl.prototype = SuccessProto;
1123
1150
  const succeed$5 = (success) => new SuccessImpl(success);
1124
1151
  //#endregion
1125
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Order.js
1152
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Order.js
1126
1153
  function make$4(compare) {
1127
1154
  return (self, that) => self === that ? 0 : compare(self, that);
1128
1155
  }
@@ -1142,7 +1169,7 @@ const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
1142
1169
  const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
1143
1170
  const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
1144
1171
  //#endregion
1145
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Option.js
1172
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Option.js
1146
1173
  const none = () => none$1;
1147
1174
  const some = some$1;
1148
1175
  const isOption = isOption$1;
@@ -1194,7 +1221,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
1194
1221
  const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
1195
1222
  const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
1196
1223
  //#endregion
1197
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Context.js
1224
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Context.js
1198
1225
  const ServiceTypeId = "~effect/Context/Service";
1199
1226
  const Service = function() {
1200
1227
  function KeyClass() {}
@@ -1277,7 +1304,7 @@ const lookup = (self, key) => {
1277
1304
  for (let overlay = impl.overlay; overlay; overlay = overlay.parent) if (overlay.key === key) return overlay.value;
1278
1305
  const value = impl.base.get(key);
1279
1306
  if (value === void 0 && !impl.base.has(key)) return notFound;
1280
- if (impl.overlay && ++impl.baseHits >= FlattenAfterBaseHits) {
1307
+ if (impl.overlay && ++impl.baseHits >= impl.base.size && impl.baseHits >= FlattenAfterBaseHits) {
1281
1308
  impl.base = flatten$2(impl);
1282
1309
  impl.overlay = void 0;
1283
1310
  impl.depth = 0;
@@ -1380,7 +1407,7 @@ const mergeAll$1 = (...ctxs) => {
1380
1407
  };
1381
1408
  const Reference = Service;
1382
1409
  //#endregion
1383
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Duration.js
1410
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Duration.js
1384
1411
  const TypeId$4 = "~effect/Duration";
1385
1412
  const bigint0$1 = BigInt(0);
1386
1413
  const bigint1 = BigInt(1);
@@ -1676,10 +1703,10 @@ const format = (self) => {
1676
1703
  return pieces.join(" ");
1677
1704
  };
1678
1705
  //#endregion
1679
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/array.js
1706
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/array.js
1680
1707
  const isArrayNonEmpty$1 = (self) => self.length > 0;
1681
1708
  //#endregion
1682
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Result.js
1709
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Result.js
1683
1710
  const succeed$4 = succeed$5;
1684
1711
  const fail$4 = fail$5;
1685
1712
  const failVoid = fail$4(void 0);
@@ -1707,7 +1734,7 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
1707
1734
  });
1708
1735
  const getOrThrow = getOrThrowWith(identity);
1709
1736
  //#endregion
1710
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Iterable.js
1737
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Iterable.js
1711
1738
  const headUnsafe = (self) => {
1712
1739
  const result = self[Symbol.iterator]().next();
1713
1740
  if (result.done) throw new Error("headUnsafe: empty iterable");
@@ -1735,7 +1762,7 @@ const constEmptyIterator = { next() {
1735
1762
  } };
1736
1763
  const empty$2 = () => constEmpty;
1737
1764
  //#endregion
1738
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Array.js
1765
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Array.js
1739
1766
  const Array$1 = globalThis.Array;
1740
1767
  const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
1741
1768
  const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
@@ -1804,7 +1831,7 @@ const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullish
1804
1831
  const makeEquivalence = Array_;
1805
1832
  const join = dual(2, (self, sep) => fromIterable(self).join(sep));
1806
1833
  //#endregion
1807
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Scheduler.js
1834
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Scheduler.js
1808
1835
  const Scheduler = Reference("effect/Scheduler", {
1809
1836
  fiberCached: true,
1810
1837
  defaultValue: () => new MixedScheduler()
@@ -1908,7 +1935,7 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
1908
1935
  defaultValue: () => false
1909
1936
  });
1910
1937
  //#endregion
1911
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/encoding/Hex.js
1938
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/encoding/Hex.js
1912
1939
  const random = (length) => {
1913
1940
  switch (length) {
1914
1941
  case 16: return random16();
@@ -1939,7 +1966,7 @@ const random32 = () => {
1939
1966
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15], hexCharCodes[c >>> 28], hexCharCodes[c >>> 24 & 15], hexCharCodes[c >>> 20 & 15], hexCharCodes[c >>> 16 & 15], hexCharCodes[c >>> 12 & 15], hexCharCodes[c >>> 8 & 15], hexCharCodes[c >>> 4 & 15], hexCharCodes[c & 15], hexCharCodes[d >>> 28], hexCharCodes[d >>> 24 & 15], hexCharCodes[d >>> 20 & 15], hexCharCodes[d >>> 16 & 15], hexCharCodes[d >>> 12 & 15], hexCharCodes[d >>> 8 & 15], hexCharCodes[d >>> 4 & 15], hexCharCodes[d & 15]);
1940
1967
  };
1941
1968
  //#endregion
1942
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Tracer.js
1969
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Tracer.js
1943
1970
  const ParentSpanKey = "effect/Tracer/ParentSpan";
1944
1971
  var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
1945
1972
  const make$1 = (options) => options;
@@ -1947,10 +1974,6 @@ const DisablePropagation = Reference("effect/Tracer/DisablePropagation", { defau
1947
1974
  const CurrentTraceLevel = Reference("effect/Tracer/CurrentTraceLevel", { defaultValue: () => "Info" });
1948
1975
  const MinimumTraceLevel = Reference("effect/Tracer/MinimumTraceLevel", { defaultValue: () => "All" });
1949
1976
  const TracerKey = "effect/Tracer";
1950
- const Tracer = Reference(TracerKey, {
1951
- fiberCached: true,
1952
- defaultValue: () => nativeTracer
1953
- });
1954
1977
  const nativeTracer = make$1({ span: (options) => new NativeSpan(options) });
1955
1978
  var NativeSpan = class {
1956
1979
  _tag = "Span";
@@ -2014,10 +2037,10 @@ var NativeSpan = class {
2014
2037
  }
2015
2038
  };
2016
2039
  //#endregion
2017
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/metric.js
2040
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/metric.js
2018
2041
  const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
2019
2042
  //#endregion
2020
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/references.js
2043
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/references.js
2021
2044
  const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
2022
2045
  fiberCached: true,
2023
2046
  defaultValue: constUndefined
@@ -2040,7 +2063,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
2040
2063
  });
2041
2064
  const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
2042
2065
  //#endregion
2043
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/tracer.js
2066
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/tracer.js
2044
2067
  const addSpanStackTrace = (options) => {
2045
2068
  if (options?.captureStackTrace === false) return options;
2046
2069
  else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
@@ -2072,7 +2095,7 @@ const makeStackCleaner = (line) => (stack) => {
2072
2095
  };
2073
2096
  const spanCleaner = makeStackCleaner(3);
2074
2097
  //#endregion
2075
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/effect.js
2098
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/effect.js
2076
2099
  var Interrupt = class extends ReasonBase {
2077
2100
  constructor(fiberId, annotations = constEmptyAnnotations) {
2078
2101
  super("Interrupt", annotations, "Interrupted");
@@ -2128,25 +2151,6 @@ const causeInterruptors = (self) => {
2128
2151
  };
2129
2152
  const emptySet = new Set();
2130
2153
  const hasInterruptsOnly$1 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason);
2131
- const dedupeReasons = (self, that) => {
2132
- const buckets = new Map();
2133
- const out = [];
2134
- for (const reason of self.concat(that)) {
2135
- const hash$1 = hash(reason);
2136
- const bucket = buckets.get(hash$1);
2137
- if (bucket === void 0) buckets.set(hash$1, [reason]);
2138
- else if (bucket.some((previous) => equals$1(previous, reason))) continue;
2139
- else bucket.push(reason);
2140
- out.push(reason);
2141
- }
2142
- return out;
2143
- };
2144
- const causeCombine = dual(2, (self, that) => {
2145
- if (self.reasons.length === 0) return that;
2146
- else if (that.reasons.length === 0) return self;
2147
- const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
2148
- return equals$1(self, newCause) ? self : newCause;
2149
- });
2150
2154
  const causeMap = dual(2, (self, f) => {
2151
2155
  let hasFail = false;
2152
2156
  const failures = self.reasons.map((failure) => {
@@ -2158,20 +2162,14 @@ const causeMap = dual(2, (self, f) => {
2158
2162
  });
2159
2163
  return hasFail ? causeFromReasons(failures) : self;
2160
2164
  });
2161
- const causePartition = (self) => {
2162
- const obj = {
2163
- Fail: [],
2164
- Die: [],
2165
- Interrupt: []
2166
- };
2167
- for (let i = 0; i < self.reasons.length; i++) obj[self.reasons[i]._tag].push(self.reasons[i]);
2168
- return obj;
2169
- };
2170
2165
  const causeSquash = (self) => {
2171
- const partitioned = causePartition(self);
2172
- if (partitioned.Fail.length > 0) return partitioned.Fail[0].error;
2173
- else if (partitioned.Die.length > 0) return partitioned.Die[0].defect;
2174
- else if (partitioned.Interrupt.length > 0) return new globalThis.Error("All fibers interrupted without error");
2166
+ let die;
2167
+ for (const reason of self.reasons) {
2168
+ if (reason._tag === "Fail") return reason.error;
2169
+ if (reason._tag === "Die") die ??= reason;
2170
+ }
2171
+ if (die !== void 0) return die.defect;
2172
+ if (self.reasons.length > 0) return new globalThis.Error("All fibers interrupted without error");
2175
2173
  return new globalThis.Error("Empty cause");
2176
2174
  };
2177
2175
  const causePrettyErrors = (self, options) => {
@@ -2180,23 +2178,26 @@ const causePrettyErrors = (self, options) => {
2180
2178
  if (self.reasons.length === 0) return errors;
2181
2179
  const prevStackLimit = getStackTraceLimit();
2182
2180
  if (prevStackLimit !== 0) setStackTraceLimit(1);
2183
- for (const failure of self.reasons) {
2184
- if (failure._tag === "Interrupt") {
2185
- interrupts.push(failure);
2186
- continue;
2181
+ try {
2182
+ for (const failure of self.reasons) {
2183
+ if (failure._tag === "Interrupt") {
2184
+ interrupts.push(failure);
2185
+ continue;
2186
+ }
2187
+ errors.push(causePrettyError(failure._tag === "Die" ? failure.defect : failure.error, failure.annotations, options));
2188
+ }
2189
+ if (errors.length === 0) {
2190
+ const cause = new Error("The fiber was interrupted by:");
2191
+ cause.name = "InterruptCause";
2192
+ cause.stack = interruptCauseStack(cause, interrupts);
2193
+ const error = new globalThis.Error("All fibers interrupted without error", { cause });
2194
+ error.name = "InterruptError";
2195
+ error.stack = `${error.name}: ${error.message}`;
2196
+ errors.push(causePrettyError(error, interrupts[0].annotations, options));
2187
2197
  }
2188
- errors.push(causePrettyError(failure._tag === "Die" ? failure.defect : failure.error, failure.annotations, options));
2189
- }
2190
- if (errors.length === 0) {
2191
- const cause = new Error("The fiber was interrupted by:");
2192
- cause.name = "InterruptCause";
2193
- cause.stack = interruptCauseStack(cause, interrupts);
2194
- const error = new globalThis.Error("All fibers interrupted without error", { cause });
2195
- error.name = "InterruptError";
2196
- error.stack = `${error.name}: ${error.message}`;
2197
- errors.push(causePrettyError(error, interrupts[0].annotations, options));
2198
- }
2199
- if (prevStackLimit !== 0) setStackTraceLimit(prevStackLimit);
2198
+ } finally {
2199
+ if (prevStackLimit !== 0) setStackTraceLimit(prevStackLimit);
2200
+ }
2200
2201
  return errors;
2201
2202
  };
2202
2203
  const causePrettyError = (original, annotations, options) => {
@@ -2283,10 +2284,17 @@ const fiberVariance = {
2283
2284
  _E: identity
2284
2285
  };
2285
2286
  const fiberIdStore = { id: 0 };
2287
+ const AsyncResource = (() => {
2288
+ try {
2289
+ return globalThis.process?.getBuiltinModule?.("node:async_hooks")?.AsyncResource;
2290
+ } catch {
2291
+ return;
2292
+ }
2293
+ })();
2294
+ const captureAsyncContext = () => AsyncResource === void 0 ? void 0 : new AsyncResource("effect/Fiber");
2286
2295
  const getCurrentFiber = () => globalThis[currentFiberTypeId];
2287
2296
  var FiberImpl = class {
2288
2297
  constructor(context, interruptible = true) {
2289
- this[FiberTypeId] = fiberVariance;
2290
2298
  this.setContext(context);
2291
2299
  this.id = ++fiberIdStore.id;
2292
2300
  this.currentOpCount = 0;
@@ -2300,24 +2308,12 @@ var FiberImpl = class {
2300
2308
  this._running = false;
2301
2309
  this._deferredInterrupt = false;
2302
2310
  this._parent = void 0;
2311
+ this._asyncContext = void 0;
2303
2312
  this.cache.runtimeMetrics?.recordFiberStart(this.context);
2304
2313
  }
2305
- [FiberTypeId];
2306
- id;
2307
- interruptible;
2308
- currentOpCount;
2309
- _stack;
2310
- _observers;
2311
- _exit;
2312
- _children;
2313
- _interruptedCause;
2314
- _yielded;
2315
- _running;
2316
- _deferredInterrupt;
2317
- _parent;
2318
- context;
2319
- cache;
2320
- _dispatcher = void 0;
2314
+ get [FiberTypeId]() {
2315
+ return fiberVariance;
2316
+ }
2321
2317
  get currentDispatcher() {
2322
2318
  return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
2323
2319
  }
@@ -2331,11 +2327,12 @@ var FiberImpl = class {
2331
2327
  }
2332
2328
  if (this._observers === void 0) this._observers = [cb];
2333
2329
  else this._observers.push(cb);
2334
- return () => {
2335
- if (this._exit || this._observers === void 0) return;
2336
- const index = this._observers.indexOf(cb);
2337
- if (index >= 0) this._observers.splice(index, 1);
2338
- };
2330
+ return () => this.removeObserver(cb);
2331
+ }
2332
+ removeObserver(cb) {
2333
+ if (this._exit || this._observers === void 0) return;
2334
+ const index = this._observers.indexOf(cb);
2335
+ if (index >= 0) this._observers.splice(index, 1);
2339
2336
  }
2340
2337
  interruptUnsafe(fiberId, annotations) {
2341
2338
  if (this._exit) return;
@@ -2353,13 +2350,20 @@ var FiberImpl = class {
2353
2350
  }
2354
2351
  evaluate(effect) {
2355
2352
  if (this._exit) return;
2356
- else if (this._yielded !== void 0) {
2353
+ else if (this._asyncContext !== void 0) {
2354
+ const asyncContext = this._asyncContext;
2355
+ this._asyncContext = void 0;
2356
+ return asyncContext.runInAsyncScope(this.evaluate, this, effect);
2357
+ } else if (this._yielded !== void 0) {
2357
2358
  const yielded = this._yielded;
2358
2359
  this._yielded = void 0;
2359
2360
  yielded();
2360
2361
  }
2361
2362
  const exit = this.runLoop(effect);
2362
- if (exit === Yield) return;
2363
+ if (exit === Yield) {
2364
+ this._asyncContext = captureAsyncContext();
2365
+ return;
2366
+ }
2363
2367
  const interruptChildren = fiberMiddleware.interruptChildren && fiberMiddleware.interruptChildren(this);
2364
2368
  if (interruptChildren !== void 0) return this.evaluate(flatMap$2(interruptChildren, () => exit));
2365
2369
  this._exit = exit;
@@ -2440,6 +2444,11 @@ var FiberImpl = class {
2440
2444
  if (op[symbol]) return op;
2441
2445
  }
2442
2446
  }
2447
+ succeedWith(value) {
2448
+ if ((++this.currentOpCount & maxInlineSteps - 1) === 0) return exitSucceed(value);
2449
+ const cont = this.getCont(contA);
2450
+ return cont ? cont[contA](value, this) : this.yieldWith(exitSucceed(value));
2451
+ }
2443
2452
  yieldWith(value) {
2444
2453
  this._yielded = value;
2445
2454
  return Yield;
@@ -2456,7 +2465,7 @@ var FiberImpl = class {
2456
2465
  if (previous !== void 0 && hasSameCache(previous, context)) return;
2457
2466
  const root = context.cacheRoot;
2458
2467
  const cache = root._fiberCache ??= makeFiberContextCache(context);
2459
- if (this.cache !== void 0 && this.cache.scheduler !== cache.scheduler) this._dispatcher = void 0;
2468
+ if (this.cache?.scheduler !== cache.scheduler) this._dispatcher = void 0;
2460
2469
  this.cache = cache;
2461
2470
  }
2462
2471
  get currentSpanLocal() {
@@ -2488,6 +2497,7 @@ const deferredInterruptCont = {
2488
2497
  return failCause$3(fiber._interruptedCause);
2489
2498
  }
2490
2499
  };
2500
+ const maxInlineSteps = 32;
2491
2501
  const fiberMiddleware = { interruptChildren: void 0 };
2492
2502
  const fiberStackAnnotations = (fiber) => {
2493
2503
  if (!fiber.cache.stackFrame) return void 0;
@@ -2623,17 +2633,17 @@ const tryPromise$1 = (options) => {
2623
2633
  const f = typeof options === "function" ? options : options.try;
2624
2634
  const catcher = typeof options === "function" ? (cause) => new UnknownError$1(cause, "An error occurred in Effect.tryPromise") : options.catch;
2625
2635
  return callbackOptions(function(resume, signal) {
2626
- const failWithCatch = (cause) => {
2636
+ const failWithCatch = (cause) => suspend$1(() => {
2627
2637
  try {
2628
- resume(fail$3(internalCall(() => catcher(cause))));
2638
+ return fail$3(internalCall(() => catcher(cause)));
2629
2639
  } catch (err) {
2630
- resume(die$3(err));
2640
+ return die$3(err);
2631
2641
  }
2632
- };
2642
+ });
2633
2643
  try {
2634
- f(signal).then((a) => resume(succeed$3(a)), failWithCatch);
2644
+ f(signal).then((a) => resume(succeed$3(a)), (e) => resume(failWithCatch(e)));
2635
2645
  } catch (err) {
2636
- failWithCatch(err);
2646
+ resume(failWithCatch(err));
2637
2647
  }
2638
2648
  }, f.length !== 0);
2639
2649
  };
@@ -2642,11 +2652,10 @@ const callbackOptions = function() {
2642
2652
  const Proto = makePrimitiveProto({
2643
2653
  op: "Async",
2644
2654
  [evaluate](fiber) {
2645
- const register = internalCall(() => this.register.bind(fiber.cache.scheduler));
2646
2655
  let resumed = false;
2647
2656
  let yielded = false;
2648
2657
  const controller = this.withSignal ? new AbortController() : void 0;
2649
- const onCancel = register((effect) => {
2658
+ const onCancel = this.register.call(fiber.cache.scheduler, (effect) => {
2650
2659
  if (resumed) return;
2651
2660
  resumed = true;
2652
2661
  if (yielded) fiber.evaluate(effect);
@@ -2684,7 +2693,7 @@ const asyncFinalizer = makePrimitive({
2684
2693
  }
2685
2694
  },
2686
2695
  [contE](cause, _fiber) {
2687
- return hasInterrupts$1(cause) ? flatMap$2(this[args](), () => failCause$3(cause)) : failCause$3(cause);
2696
+ return hasInterrupts$1(cause) ? flatMap$2(combineFinalizerCause(exitFailCause(cause), this[args]()), () => failCause$3(cause)) : failCause$3(cause);
2688
2697
  }
2689
2698
  });
2690
2699
  const callback$1 = (register) => callbackOptions(register, register.length >= 2);
@@ -2728,6 +2737,8 @@ const fn$1 = function() {
2728
2737
  };
2729
2738
  const makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions) => {
2730
2739
  const body = typeof bodyOrOptions === "function" ? bodyOrOptions : pipeables.shift().bind(bodyOrOptions.self);
2740
+ const definitionName = `${name} (definition)`;
2741
+ const definitionStack = defError ? fnStackCleaner(() => defError.stack) : constUndefined;
2731
2742
  return defineFunctionLength(body.length, function(...args) {
2732
2743
  let result = suspend$1(() => {
2733
2744
  const iter = body.apply(this, arguments);
@@ -2746,8 +2757,8 @@ const makeFn = (name, bodyOrOptions, defError, pipeables, addSpan, spanOptions)
2746
2757
  name,
2747
2758
  stack: callError ? fnStackCleaner(() => callError.stack) : constUndefined,
2748
2759
  parent: {
2749
- name: `${name} (definition)`,
2750
- stack: defError ? fnStackCleaner(() => defError.stack) : constUndefined,
2760
+ name: definitionName,
2761
+ stack: definitionStack,
2751
2762
  parent: prev
2752
2763
  }
2753
2764
  }));
@@ -2832,15 +2843,18 @@ ContImpl.prototype = OnSuccessProto;
2832
2843
  const returnPayload = function() {
2833
2844
  return this.payload;
2834
2845
  };
2846
+ const succeedPayload = function(_value, fiber) {
2847
+ return fiber.succeedWith(this.payload);
2848
+ };
2835
2849
  const continuationMarksStack = (() => {
2836
2850
  const marker = "~effect/Effect/stackProbe";
2837
2851
  return { [marker]: function stackProbe() {
2838
2852
  return new Error().stack;
2839
2853
  } }[marker]()?.includes("[as " + marker + "]") === true;
2840
2854
  })();
2841
- const mapCont = function(value) {
2855
+ const mapCont = function(value, fiber) {
2842
2856
  const f = this.payload;
2843
- return succeed$3(continuationMarksStack ? f(value) : internalCall(() => f(value)));
2857
+ return fiber.succeedWith(continuationMarksStack ? f(value) : internalCall(() => f(value)));
2844
2858
  };
2845
2859
  const andThenCont = function(value) {
2846
2860
  const f = this.payload;
@@ -2848,41 +2862,40 @@ const andThenCont = function(value) {
2848
2862
  };
2849
2863
  const tapCont = function(value) {
2850
2864
  const f = this.payload;
2851
- return new ContImpl(f(value), returnPayload, exitSucceed(value));
2865
+ return new ContImpl(f(value), succeedPayload, value);
2852
2866
  };
2853
2867
  const tapEffectCont = function(value) {
2854
- return new ContImpl(this.payload, returnPayload, exitSucceed(value));
2868
+ return new ContImpl(this.payload, succeedPayload, value);
2855
2869
  };
2856
2870
  const asSome$1 = (self) => map$2(self, some);
2857
2871
  const andThen$1 = dual(2, (self, f) => new ContImpl(self, isEffect$1(f) ? returnPayload : andThenCont, f));
2858
2872
  const tap$1 = dual(2, (self, f) => new ContImpl(self, isEffect$1(f) ? tapEffectCont : tapCont, f));
2859
2873
  const asVoid$1 = (self) => new ContImpl(self, returnPayload, exitVoid);
2860
- const raceAllFirst = (all, options) => withFiber$1((parent) => callback$1((resume) => {
2861
- let done = false;
2874
+ const raceAllFirst = (all, options) => withFiber$1((parent) => {
2862
2875
  const fibers = new Set();
2863
- const onExit = (exit) => {
2864
- done = true;
2865
- resume(fibers.size === 0 ? exit : flatMap$2(uninterruptible$1(fiberInterruptAll(fibers)), () => exit));
2866
- };
2867
- let i = 0;
2868
- for (const effect of all) {
2869
- if (done) break;
2870
- const index = i++;
2871
- const fiber = forkUnsafe$1(parent, effect, true, true, false);
2872
- fibers.add(fiber);
2873
- fiber.addObserver((exit) => {
2874
- fibers.delete(fiber);
2875
- const isWinner = !done;
2876
- onExit(exit);
2877
- if (isWinner && options?.onWinner) options.onWinner({
2878
- fiber,
2879
- index,
2880
- parentFiber: parent
2876
+ onExitUnsafe(parent, () => fibers.size === 0 ? void 0 : fiberInterruptAll(fibers));
2877
+ return callback$1((resume) => {
2878
+ let done = false;
2879
+ let i = 0;
2880
+ for (const effect of all) {
2881
+ if (done) break;
2882
+ const index = i++;
2883
+ const fiber = forkUnsafe$1(parent, effect, true, true, false);
2884
+ fibers.add(fiber);
2885
+ fiber.addObserver((exit) => {
2886
+ fibers.delete(fiber);
2887
+ const isWinner = !done;
2888
+ done = true;
2889
+ resume(exit);
2890
+ if (isWinner && options?.onWinner) options.onWinner({
2891
+ fiber,
2892
+ index,
2893
+ parentFiber: parent
2894
+ });
2881
2895
  });
2882
- });
2883
- }
2884
- return fiberInterruptAll(fibers);
2885
- }));
2896
+ }
2897
+ });
2898
+ });
2886
2899
  const raceFirst$1 = dual((args) => isEffect$1(args[1]), (self, that, options) => raceAllFirst([self, that], options));
2887
2900
  const flatMap$2 = dual(2, (self, f) => new ContImpl(self, andThenCont, f));
2888
2901
  const effectIsExit = (effect) => effect[ExitTypeId] !== void 0;
@@ -2976,6 +2989,10 @@ const OnFailureImpl = function(self, f) {
2976
2989
  this[contE] = f;
2977
2990
  };
2978
2991
  OnFailureImpl.prototype = OnFailureProto;
2992
+ const catchCauseIf$1 = dual(3, (self, predicate, f) => catchCause$1(self, (cause) => {
2993
+ if (!predicate(cause)) return failCause$3(cause);
2994
+ return f(cause);
2995
+ }));
2979
2996
  const catchCauseFilter = dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
2980
2997
  const eb = filter(cause);
2981
2998
  return isFailure$1(eb) ? failCause$3(eb.failure) : f(eb.success, cause);
@@ -3056,10 +3073,35 @@ const OnSuccessAndFailureImpl = function(self, onSuccess, onFailure) {
3056
3073
  this[contE] = onFailure;
3057
3074
  };
3058
3075
  OnSuccessAndFailureImpl.prototype = OnSuccessAndFailureProto;
3059
- const matchCause = dual(2, (self, options) => matchCauseEffect$1(self, {
3060
- onFailure: (cause) => continuationMarksStack ? succeed$3(options.onFailure(cause)) : sync$1(() => options.onFailure(cause)),
3061
- onSuccess: (value) => continuationMarksStack ? succeed$3(options.onSuccess(value)) : sync$1(() => options.onSuccess(value))
3062
- }));
3076
+ const matchSuccess = function(value, fiber) {
3077
+ const handlers = this.payload;
3078
+ return fiber.succeedWith(continuationMarksStack ? handlers.onSuccess(value) : internalCall(() => handlers.onSuccess(value)));
3079
+ };
3080
+ const makeMatch = (op, onFailure) => {
3081
+ const Proto = makePrimitiveProto({
3082
+ op,
3083
+ [evaluate]: evaluateCont,
3084
+ [contA]: matchSuccess,
3085
+ [contE]: onFailure
3086
+ });
3087
+ const MatchImpl = function(self, handlers) {
3088
+ this[args] = self;
3089
+ this.payload = handlers;
3090
+ };
3091
+ MatchImpl.prototype = Proto;
3092
+ return MatchImpl;
3093
+ };
3094
+ const MatchImpl = makeMatch("Match", function(cause, fiber) {
3095
+ const fail = cause.reasons.find(isFailReason$1);
3096
+ if (fail === void 0) return failCause$3(cause);
3097
+ const handlers = this.payload;
3098
+ return fiber.succeedWith(continuationMarksStack ? handlers.onFailure(fail.error) : internalCall(() => handlers.onFailure(fail.error)));
3099
+ });
3100
+ const MatchCauseImpl = makeMatch("MatchCause", function(cause, fiber) {
3101
+ const handlers = this.payload;
3102
+ return fiber.succeedWith(continuationMarksStack ? handlers.onFailure(cause) : internalCall(() => handlers.onFailure(cause)));
3103
+ });
3104
+ const matchCause = dual(2, (self, options) => new MatchCauseImpl(self, options));
3063
3105
  const matchEffect$2 = dual(2, (self, options) => matchCauseEffect$1(self, {
3064
3106
  onFailure: (cause) => {
3065
3107
  const fail = cause.reasons.find(isFailReason$1);
@@ -3067,13 +3109,7 @@ const matchEffect$2 = dual(2, (self, options) => matchCauseEffect$1(self, {
3067
3109
  },
3068
3110
  onSuccess: options.onSuccess
3069
3111
  }));
3070
- const match$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
3071
- onFailure: (cause) => {
3072
- const fail = cause.reasons.find(isFailReason$1);
3073
- return fail ? continuationMarksStack ? succeed$3(options.onFailure(fail.error)) : sync$1(() => options.onFailure(fail.error)) : failCause$3(cause);
3074
- },
3075
- onSuccess: (value) => continuationMarksStack ? succeed$3(options.onSuccess(value)) : sync$1(() => options.onSuccess(value))
3076
- }));
3112
+ const match$1 = dual(2, (self, options) => new MatchImpl(self, options));
3077
3113
  const matchEager = dual(2, (self, options) => {
3078
3114
  if (effectIsExit(self)) {
3079
3115
  if (self._tag === "Success") return exitSucceed(options.onSuccess(self.value));
@@ -3097,11 +3133,11 @@ const exitPrimitive = makePrimitive({
3097
3133
  fiber._stack.push(this);
3098
3134
  return this[args];
3099
3135
  },
3100
- [contA](value, _, exit) {
3101
- return succeed$3(exit ?? exitSucceed(value));
3136
+ [contA](value, fiber, exit) {
3137
+ return fiber.succeedWith(exit ?? exitSucceed(value));
3102
3138
  },
3103
- [contE](cause, _, exit) {
3104
- return succeed$3(exit ?? exitFailCause(cause));
3139
+ [contE](cause, fiber, exit) {
3140
+ return fiber.succeedWith(exit ?? exitFailCause(cause));
3105
3141
  }
3106
3142
  });
3107
3143
  const delay$1 = dual(2, (self, duration) => andThen$1(sleep$1(duration), self));
@@ -3118,25 +3154,33 @@ const timeoutOption = dual(2, (self, duration) => raceFirst$1(asSome$1(self), as
3118
3154
  const ScopeTypeId = "~effect/Scope";
3119
3155
  const ScopeCloseableTypeId = "~effect/Scope/Closeable";
3120
3156
  const scopeTag = Service("effect/Scope");
3121
- const scopeClose = (self, exit_) => suspend$1(() => scopeCloseUnsafe(self, exit_) ?? void_$2);
3157
+ const scopeClose = (self, exit_) => withFiber$1((fiber) => {
3158
+ const close = scopeCloseUnsafe(self, exit_);
3159
+ if (close === void 0) return void_$2;
3160
+ fiberEnterUninterruptibleUnsafe(fiber);
3161
+ return close;
3162
+ });
3122
3163
  const scopeCloseUnsafe = (self, exit_) => {
3123
- if (self.state._tag === "Closed") return;
3124
- const closed = {
3164
+ const state = self.state;
3165
+ if (state._tag === "Closed") return;
3166
+ self.state = {
3125
3167
  _tag: "Closed",
3126
3168
  exit: exit_
3127
3169
  };
3128
- if (self.state._tag === "Empty") {
3129
- self.state = closed;
3130
- return;
3131
- }
3132
- const state = self.state;
3133
- self.state = closed;
3134
- if (state.finalizer !== void 0) return state.finalizer(exit_);
3170
+ if (self.parent !== void 0) scopeRemoveFinalizerUnsafe(self.parent, self);
3171
+ if (state._tag === "Empty") return;
3172
+ if (state.finalizer !== void 0) return runFinalizer(state.finalizer, exit_);
3135
3173
  const finalizers = state.finalizers;
3136
- if (finalizers === void 0 || finalizers.size === 0) return;
3137
- else if (finalizers.size === 1) return finalizers.values().next().value(exit_);
3174
+ if (finalizers.size === 1) return runFinalizer(finalizers.values().next().value, exit_);
3138
3175
  return scopeCloseFinalizers(self, finalizers, exit_);
3139
3176
  };
3177
+ const runFinalizer = (finalizer, exit_) => {
3178
+ try {
3179
+ return finalizer(exit_);
3180
+ } catch (defect) {
3181
+ return exitDie(defect);
3182
+ }
3183
+ };
3140
3184
  const combineFinalizerCause = (exit_, finalizer) => exitIsSuccess(exit_) ? finalizer : catchCause$1(finalizer, (cause) => failCause$3(causeCombine(exit_.cause, cause)));
3141
3185
  const scopeCloseFinalizers = fnUntraced$1(function* (self, finalizers, exit_) {
3142
3186
  let exits = [];
@@ -3145,22 +3189,20 @@ const scopeCloseFinalizers = fnUntraced$1(function* (self, finalizers, exit_) {
3145
3189
  const parent = getCurrentFiber();
3146
3190
  for (let i = arr.length - 1; i >= 0; i--) {
3147
3191
  const finalizer = arr[i];
3148
- if (self.strategy === "sequential") exits.push(yield* exit$1(finalizer(exit_)));
3149
- else fibers.push(forkUnsafe$1(parent, finalizer(exit_), true, true, "inherit"));
3192
+ if (self.strategy === "sequential") exits.push(yield* exit$1(runFinalizer(finalizer, exit_)));
3193
+ else fibers.push(forkUnsafe$1(parent, runFinalizer(finalizer, exit_), true, true, "inherit"));
3150
3194
  }
3151
3195
  if (fibers.length > 0) exits = yield* fiberAwaitAll(fibers);
3152
3196
  return yield* exitAsVoidAll(exits);
3153
3197
  });
3154
3198
  const scopeForkUnsafe = (scope, finalizerStrategy) => {
3155
- const newScope = scopeMakeUnsafe(finalizerStrategy);
3199
+ const child = makeScope(finalizerStrategy, scope);
3156
3200
  if (scope.state._tag === "Closed") {
3157
- newScope.state = scope.state;
3158
- return newScope;
3201
+ child.state = scope.state;
3202
+ return child;
3159
3203
  }
3160
- const key = {};
3161
- scopeAddFinalizerUnsafe(scope, key, (exit) => scopeClose(newScope, exit));
3162
- scopeAddFinalizerUnsafe(newScope, key, (_) => sync$1(() => scopeRemoveFinalizerUnsafe(scope, key)));
3163
- return newScope;
3204
+ scopeAddFinalizerUnsafe(scope, child, (exit) => scopeClose(child, exit));
3205
+ return child;
3164
3206
  };
3165
3207
  const scopeAddFinalizerExit = (scope, finalizer) => {
3166
3208
  return suspend$1(() => {
@@ -3184,26 +3226,24 @@ const scopeAddFinalizerUnsafe = (scope, key, finalizer) => {
3184
3226
  state.finalizerKey = void 0;
3185
3227
  state.finalizer = void 0;
3186
3228
  state.finalizers.set(key, finalizer);
3187
- } else if (state.finalizers === void 0) {
3188
- state.finalizerKey = key;
3189
- state.finalizer = finalizer;
3190
3229
  } else state.finalizers.set(key, finalizer);
3191
3230
  }
3192
3231
  };
3193
3232
  const scopeRemoveFinalizerUnsafe = (scope, key) => {
3194
- if (scope.state._tag === "Open") {
3195
- const state = scope.state;
3196
- if (state.finalizerKey === key) {
3197
- state.finalizerKey = void 0;
3198
- state.finalizer = void 0;
3199
- } else if (state.finalizers !== void 0) state.finalizers.delete(key);
3233
+ if (scope.state._tag !== "Open") return;
3234
+ const state = scope.state;
3235
+ if (state.finalizerKey === key) scope.state = constScopeEmpty;
3236
+ else if (state.finalizers !== void 0) {
3237
+ state.finalizers.delete(key);
3238
+ if (state.finalizers.size === 0) scope.state = constScopeEmpty;
3200
3239
  }
3201
3240
  };
3202
- const scopeFinalizerCountUnsafe = (scope) => scope.state._tag !== "Open" ? 0 : scope.state.finalizer !== void 0 ? 1 : scope.state.finalizers?.size ?? 0;
3203
- const scopeMakeUnsafe = (finalizerStrategy = "sequential") => ({
3241
+ const scopeMakeUnsafe = (finalizerStrategy) => makeScope(finalizerStrategy, void 0);
3242
+ const makeScope = (finalizerStrategy = "sequential", parent) => ({
3204
3243
  [ScopeCloseableTypeId]: ScopeCloseableTypeId,
3205
3244
  [ScopeTypeId]: ScopeTypeId,
3206
3245
  strategy: finalizerStrategy,
3246
+ parent,
3207
3247
  state: constScopeEmpty
3208
3248
  });
3209
3249
  const constScopeEmpty = { _tag: "Empty" };
@@ -3241,12 +3281,22 @@ const OnExitImpl = function() {
3241
3281
  },
3242
3282
  [contA](value, _, exit) {
3243
3283
  exit ??= exitSucceed(value);
3244
- const eff = this.onExit(exit);
3284
+ let eff;
3285
+ try {
3286
+ eff = this.onExit(exit);
3287
+ } catch (defect) {
3288
+ eff = exitDie(defect);
3289
+ }
3245
3290
  return eff ? flatMap$2(eff, (_) => exit) : exit;
3246
3291
  },
3247
3292
  [contE](cause, _, exit) {
3248
3293
  exit ??= exitFailCause(cause);
3249
- const eff = this.onExit(exit);
3294
+ let eff;
3295
+ try {
3296
+ eff = this.onExit(exit);
3297
+ } catch (defect) {
3298
+ eff = exitDie(defect);
3299
+ }
3250
3300
  return eff ? flatMap$2(combineFinalizerCause(exit, eff), (_) => exit) : exit;
3251
3301
  }
3252
3302
  });
@@ -3276,58 +3326,46 @@ const onErrorFilter = dual(3, (self, filter, f) => onExit$1(self, (exit) => {
3276
3326
  }));
3277
3327
  const onInterrupt$1 = dual(2, (self, finalizer) => onErrorFilter(causeFilterInterruptors, finalizer)(self));
3278
3328
  const acquireUseRelease$1 = (acquire, use, release) => uninterruptibleMask$1((restore) => flatMap$2(acquire, (a) => onExitPrimitive$1(suspend$1(() => restore(use(a))), (exit) => release(a, exit), true)));
3279
- const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => {
3280
- const ttlMillis = typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl)));
3281
- const latch = makeLatchUnsafe(false);
3329
+ const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => makeCachedUnsafe(self, typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl))))));
3330
+ const infiniteTTL = constant(Infinity);
3331
+ const makeCachedUnsafe = (self, ttlMillis) => {
3282
3332
  let expiresAt = 0;
3283
- let running = false;
3284
3333
  let exit;
3285
- const wait = flatMap$2(latch.await, () => exit);
3334
+ let current;
3335
+ const join = (fiber, run) => {
3336
+ run.awaiters++;
3337
+ onExitUnsafe(fiber, () => {
3338
+ if (--run.awaiters > 0 || current !== run) return;
3339
+ current = void 0;
3340
+ return fiberInterrupt(run.fiber);
3341
+ });
3342
+ return fiberJoin(run.fiber);
3343
+ };
3286
3344
  return [withFiber$1((fiber) => {
3287
- const clock = fiber.getRef(ClockRef);
3288
- const now = expiresAt === Infinity ? 0 : clock.currentTimeMillisUnsafe();
3289
- if (running || now < expiresAt) return exit ?? wait;
3290
- running = true;
3291
- latch.closeUnsafe();
3345
+ if (current !== void 0) return join(fiber, current);
3346
+ if (exit !== void 0 && (expiresAt === Infinity || fiber.getRef(ClockRef).currentTimeMillisUnsafe() < expiresAt)) return exit;
3292
3347
  exit = void 0;
3293
- onExitUnsafe(fiber, (exit_) => sync$1(() => {
3294
- try {
3295
- const duration = ttlMillis(exit_);
3296
- expiresAt = clock.currentTimeMillisUnsafe() + duration;
3297
- exit = exit_;
3298
- } catch (error) {
3299
- const cause = causeDie(error);
3300
- exit = exitFailCause(exitIsFailure(exit_) ? causeCombine(exit_.cause, cause) : cause);
3301
- throw error;
3302
- } finally {
3303
- running = false;
3304
- latch.openUnsafe();
3305
- }
3306
- }));
3307
- return self;
3348
+ const clock = fiber.getRef(ClockRef);
3349
+ const run = {
3350
+ fiber: void 0,
3351
+ awaiters: 0
3352
+ };
3353
+ current = run;
3354
+ run.fiber = forkUnsafe$1(fiber, onExitPrimitive$1(self, (exit_) => {
3355
+ if (current !== run) return;
3356
+ current = void 0;
3357
+ if (exitHasInterrupts(exit_)) return;
3358
+ const duration = ttlMillis(exit_);
3359
+ expiresAt = duration === Infinity ? Infinity : clock.currentTimeMillisUnsafe() + duration;
3360
+ exit = exit_;
3361
+ }), true, true);
3362
+ return run.fiber._exit ?? join(fiber, run);
3308
3363
  }), sync$1(() => {
3309
- expiresAt = 0;
3310
- latch.closeUnsafe();
3311
3364
  exit = void 0;
3312
3365
  })];
3313
- }));
3366
+ };
3314
3367
  const cachedWithTTL$1 = dual(2, (self, timeToLive) => map$2(cachedInvalidateWithTTL(self, timeToLive), (tuple) => tuple[0]));
3315
- const cached$1 = (self) => sync$1(() => {
3316
- const latch = makeLatchUnsafe(false);
3317
- let started = false;
3318
- let exit;
3319
- const wait = flatMap$2(latch.await, () => exit);
3320
- return withFiber$1((fiber) => {
3321
- if (exit !== void 0) return exit;
3322
- if (started) return wait;
3323
- started = true;
3324
- onExitUnsafe(fiber, (result) => sync$1(() => {
3325
- exit = result;
3326
- latch.openUnsafe();
3327
- }));
3328
- return self;
3329
- });
3330
- });
3368
+ const cached$1 = (self) => sync$1(() => makeCachedUnsafe(self, infiniteTTL)[0]);
3331
3369
  const interrupt$2 = withFiber$1((fiber) => failCause$3(causeInterrupt(fiber.id)));
3332
3370
  const uninterruptible$1 = (self) => withFiber$1((fiber) => {
3333
3371
  if (!fiber.interruptible) return self;
@@ -3349,6 +3387,12 @@ const setFiberInterruptible = (fiber) => {
3349
3387
  fiber._stack.push(setInterruptibleFalse);
3350
3388
  if (fiber._interruptedCause) return failCause$3(fiber._interruptedCause);
3351
3389
  };
3390
+ const fiberEnterUninterruptibleUnsafe = (fiber) => {
3391
+ const impl = fiber;
3392
+ if (!impl.interruptible) return;
3393
+ impl.interruptible = false;
3394
+ impl._stack.push(setInterruptibleTrue);
3395
+ };
3352
3396
  const interruptible$1 = (self) => withFiber$1((fiber) => {
3353
3397
  if (fiber.interruptible) return self;
3354
3398
  return setFiberInterruptible(fiber) ?? self;
@@ -3421,11 +3465,12 @@ const resolveConcurrency = (concurrency) => concurrency === "unbounded" ? Number
3421
3465
  const iterateEager = () => (options) => {
3422
3466
  const onItem = options.onItem;
3423
3467
  const step = options.step;
3468
+ const resumeSequential = (state, items, index, end, effect) => flatMap$2(exit$1(effect), (itemExit) => step(state, items[index], itemExit, index) ?? runSequential(state, items, index + 1, end) ?? void_$2);
3424
3469
  const runSequential = (state, items, index = 0, end = items.length) => {
3425
3470
  for (; index < end; index++) {
3426
3471
  const item = items[index];
3427
3472
  const effect = onItem(state, item, index);
3428
- if (!effectIsExit(effect)) return flatMap$2(exit$1(effect), (itemExit) => step(state, item, itemExit, index) ?? runSequential(state, items, index + 1, end) ?? void_$2);
3473
+ if (!effectIsExit(effect)) return resumeSequential(state, items, index, end, effect);
3429
3474
  const terminal = step(state, item, effect, index);
3430
3475
  if (terminal) return terminal._tag === "Failure" ? terminal : void 0;
3431
3476
  }
@@ -3443,15 +3488,13 @@ const iterateConcurrentImpl = (options) => {
3443
3488
  let parentFiber;
3444
3489
  let fibers;
3445
3490
  let resume;
3446
- let interrupted = false;
3447
3491
  let terminal;
3448
3492
  let effect;
3449
3493
  const failDefect = (error) => {
3450
3494
  const defect = exitDie(error);
3451
3495
  terminal = defect;
3452
3496
  done = true;
3453
- interrupted = true;
3454
- return fibers && fibers.size > 0 ? flatMap$2(uninterruptible$1(fiberInterruptAll(Array.from(fibers))), () => defect) : defect;
3497
+ return fibers && fibers.size > 0 ? flatMap$2(uninterruptible$1(fiberInterruptAll(Array.from(fibers))), () => terminal ?? defect) : defect;
3455
3498
  };
3456
3499
  const go = () => {
3457
3500
  let paused = false;
@@ -3474,9 +3517,8 @@ const iterateConcurrentImpl = (options) => {
3474
3517
  }
3475
3518
  if (result) return cb(result);
3476
3519
  return suspend$1(() => {
3477
- terminal = exitVoid;
3478
- interrupted = true;
3479
- return fibers ? fiberInterruptAll(fibers) : void_$2;
3520
+ terminal ??= exitVoid;
3521
+ return flatMap$2(fibers ? fiberInterruptAll(fibers) : void_$2, () => terminal?._tag === "Failure" ? terminal : void_$2);
3480
3522
  });
3481
3523
  });
3482
3524
  else {
@@ -3493,13 +3535,17 @@ const iterateConcurrentImpl = (options) => {
3493
3535
  fibers.delete(fiber);
3494
3536
  try {
3495
3537
  if (terminal) {
3496
- if (!interrupted && exit._tag === "Failure") for (const reason of exit.cause.reasons) if (reason._tag === "Interrupt") continue;
3497
- else if (terminal._tag === "Failure") terminal.cause.reasons.push(reason);
3498
- else terminal = exitFailCause(causeFromReasons([reason]));
3538
+ if (exit._tag === "Failure") {
3539
+ const reasons = exit.cause.reasons.filter((reason) => reason._tag !== "Interrupt");
3540
+ if (reasons.length > 0) {
3541
+ const cause = causeFromReasons(reasons);
3542
+ terminal = exitFailCause(terminal._tag === "Failure" ? causeCombine(terminal.cause, cause) : cause);
3543
+ }
3544
+ }
3499
3545
  } else {
3500
3546
  const result = step(state, item, exit, currentIndex);
3501
3547
  if (result) {
3502
- terminal = result._tag === "Failure" ? exitFailCause(causeFromReasons(result.cause.reasons.slice())) : result;
3548
+ terminal = result;
3503
3549
  go();
3504
3550
  }
3505
3551
  }
@@ -3553,7 +3599,10 @@ const forkUnsafe$1 = (parent, effect, immediate = false, daemon = false, uninter
3553
3599
  const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
3554
3600
  const child = new FiberImpl(parentRuntime.context, interruptible);
3555
3601
  if (immediate) child.evaluate(effect);
3556
- else parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3602
+ else {
3603
+ child._asyncContext = captureAsyncContext();
3604
+ parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3605
+ }
3557
3606
  if (!daemon && !child._exit) {
3558
3607
  parentRuntime.children().add(child);
3559
3608
  child._parent = parentRuntime;
@@ -3713,7 +3762,7 @@ const filterDisablePropagation = (span) => {
3713
3762
  return get(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
3714
3763
  };
3715
3764
  const makeSpanUnsafe = (fiber, name, options) => {
3716
- const disablePropagation = !fiber.getRef(TracerEnabled) || options?.annotations && get(options.annotations, DisablePropagation);
3765
+ const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get(options.annotations, DisablePropagation);
3717
3766
  const parent = options?.parent !== void 0 ? some(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
3718
3767
  let span;
3719
3768
  if (disablePropagation) span = noopSpan({
@@ -3722,7 +3771,7 @@ const makeSpanUnsafe = (fiber, name, options) => {
3722
3771
  annotations: add(options?.annotations ?? empty$3(), DisablePropagation, true)
3723
3772
  });
3724
3773
  else {
3725
- const tracer = fiber.getRef(Tracer);
3774
+ const tracer = fiber.cache.tracer ?? nativeTracer;
3726
3775
  const clock = fiber.getRef(ClockRef);
3727
3776
  const timingEnabled = fiber.getRef(TracerTimingEnabled$1);
3728
3777
  const annotationsFromEnv = fiber.getRef(TracerSpanAnnotations);
@@ -3864,6 +3913,7 @@ const wallTimeNanos = function() {
3864
3913
  const clockWith$1 = (f) => withFiber$1((fiber) => f(fiber.getRef(ClockRef)));
3865
3914
  const sleep$1 = (duration) => clockWith$1((clock) => clock.sleep(fromInputUnsafe(duration)));
3866
3915
  const currentTimeMillis = clockWith$1((clock) => clock.currentTimeMillis);
3916
+ const monotonicTimeNanos = clockWith$1((clock) => clock.monotonicTimeNanos);
3867
3917
  const TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
3868
3918
  const isTimeoutError$1 = (u) => hasProperty(u, TimeoutErrorTypeId);
3869
3919
  var TimeoutError$1 = class extends TaggedError("TimeoutError") {
@@ -4017,7 +4067,7 @@ function interruptChildrenPatch() {
4017
4067
  }
4018
4068
  const undefined_$1 = succeed$3(void 0);
4019
4069
  //#endregion
4020
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Exit.js
4070
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Exit.js
4021
4071
  const isExit = isExit$1;
4022
4072
  const succeed$2 = exitSucceed;
4023
4073
  const failCause$2 = exitFailCause;
@@ -4028,7 +4078,7 @@ const void_$1 = exitVoid;
4028
4078
  const isSuccess = exitIsSuccess;
4029
4079
  const isFailure = exitIsFailure;
4030
4080
  //#endregion
4031
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Deferred.js
4081
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Deferred.js
4032
4082
  const TypeId$3 = "~effect/Deferred";
4033
4083
  const DeferredProto = {
4034
4084
  [TypeId$3]: {
@@ -4074,13 +4124,13 @@ const doneUnsafe = (self, effect) => {
4074
4124
  };
4075
4125
  const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
4076
4126
  //#endregion
4077
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/References.js
4127
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/References.js
4078
4128
  const CurrentLogAnnotations = CurrentLogAnnotations$1;
4079
4129
  const CurrentLogSpans = CurrentLogSpans$1;
4080
4130
  const MinimumLogLevel = MinimumLogLevel$1;
4081
4131
  const TracerTimingEnabled = TracerTimingEnabled$1;
4082
4132
  //#endregion
4083
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Scope.js
4133
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Scope.js
4084
4134
  const Scope = scopeTag;
4085
4135
  const make = scopeMake;
4086
4136
  const makeUnsafe = scopeMakeUnsafe;
@@ -4090,7 +4140,7 @@ const addFinalizer$1 = scopeAddFinalizer;
4090
4140
  const forkUnsafe = scopeForkUnsafe;
4091
4141
  const close = scopeClose;
4092
4142
  //#endregion
4093
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Layer.js
4143
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Layer.js
4094
4144
  const TypeId$2 = "~effect/Layer";
4095
4145
  const MemoMapTypeId = "~effect/Layer/MemoMap";
4096
4146
  const makeMemoMapEntry = (memoMap, layer) => {
@@ -4245,7 +4295,7 @@ const makeUnimplemented = (error) => {
4245
4295
  const StreamTypeId = "~effect/Stream";
4246
4296
  const ChannelTypeId = "~effect/Channel";
4247
4297
  //#endregion
4248
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Cause.js
4298
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Cause.js
4249
4299
  const isCause = isCause$1;
4250
4300
  const isReason = isCauseReason;
4251
4301
  const isFailReason = isFailReason$1;
@@ -4274,7 +4324,7 @@ const UnknownError = UnknownError$1;
4274
4324
  const annotate = causeAnnotate;
4275
4325
  var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
4276
4326
  //#endregion
4277
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/random.js
4327
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/random.js
4278
4328
  const Random = Reference("effect/Random", { defaultValue: () => ({
4279
4329
  nextIntUnsafe() {
4280
4330
  return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
@@ -4294,7 +4344,7 @@ const nextBetween = (min, max, draw) => {
4294
4344
  return view.getFloat64(0);
4295
4345
  };
4296
4346
  //#endregion
4297
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Pull.js
4347
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Pull.js
4298
4348
  const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
4299
4349
  const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
4300
4350
  const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
@@ -4322,7 +4372,7 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
4322
4372
  }
4323
4373
  }));
4324
4374
  //#endregion
4325
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Schedule.js
4375
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Schedule.js
4326
4376
  const TypeId$1 = "~effect/Schedule";
4327
4377
  const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
4328
4378
  const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
@@ -4446,11 +4496,11 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
4446
4496
  })));
4447
4497
  const forever$1 = spaced(zero);
4448
4498
  //#endregion
4449
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/layer.js
4499
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/layer.js
4450
4500
  const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
4451
4501
  const provide$1 = dual((args) => isEffect$1(args[0]), (self, source, options) => isContext(source) ? provideContext$1(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
4452
4502
  //#endregion
4453
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/schedule.js
4503
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/schedule.js
4454
4504
  const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
4455
4505
  let meta = CurrentMetadata.defaultValue();
4456
4506
  return catch_$1(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
@@ -4492,7 +4542,7 @@ const buildFromOptions = (options) => {
4492
4542
  return schedule;
4493
4543
  };
4494
4544
  //#endregion
4495
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Request.js
4545
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Request.js
4496
4546
  const TypeId = "~effect/Request";
4497
4547
  const requestVariance = byReferenceUnsafe({
4498
4548
  _E: (_) => _,
@@ -4517,7 +4567,7 @@ const TaggedClass = (tag) => {
4517
4567
  };
4518
4568
  const makeEntry = (options) => options;
4519
4569
  //#endregion
4520
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/internal/request.js
4570
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/internal/request.js
4521
4571
  const request$1 = dual(2, (self, resolver) => {
4522
4572
  const withResolver = (resolver) => callback$1((resume) => {
4523
4573
  const entry = addEntry(resolver, self, resume, getCurrentFiber());
@@ -4613,7 +4663,7 @@ function runBatch(batch) {
4613
4663
  return batch.run;
4614
4664
  }
4615
4665
  //#endregion
4616
- //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect+effect@b3032f0_f95638f588f5b9b247401a051448b365/node_modules/effect/dist/Effect.js
4666
+ //#region node_modules/.pnpm/effect@4.0.1/node_modules/effect/dist/Effect.js
4617
4667
  const isEffect = isEffect$1;
4618
4668
  const all = all$1;
4619
4669
  const forEach = forEach$1;
@@ -4659,6 +4709,7 @@ const catchDefect = catchDefect$1;
4659
4709
  const catchIf = catchIf$1;
4660
4710
  const catchFilter = catchFilter$1;
4661
4711
  const catchNoSuchElement = catchNoSuchElement$1;
4712
+ const catchCauseIf = catchCauseIf$1;
4662
4713
  const mapError = mapError$1;
4663
4714
  const orDie = orDie$2;
4664
4715
  const tapCause = tapCause$1;
@@ -4753,6 +4804,6 @@ const flatMapEager = flatMapEager$1;
4753
4804
  const catchEager = catchEager$1;
4754
4805
  const fnUntracedEager = fnUntracedEager$1;
4755
4806
  //#endregion
4756
- export { isEffect as $, map$5 as $a, headUnsafe as $i, buildWithScope as $n, symbol$1 as $o, exitInterrupt as $r, uninterruptibleMask as $t, ensuring as A, getOrUndefined$1 as Aa, ParentSpan as Ai, StackTrace as An, assignProperty as Ao, isDone$1 as Ar, memoizeIdempotent as As, result as At, fnUntraced as B, flatMapNullishOr$1 as Ba, headNonEmpty as Bi, hasInterrupts as Bn, formatPath as Bo, succeed$2 as Br, sleep as Bt, catch_ as C, zero as Ca, succeedNone$1 as Ci, isDoneCause as Cn, args as Co, MinimumLogLevel as Cr, constUndefined as Cs, promise as Ct, delay as D, empty$3 as Da, updateContext$1 as Di, Done as Dn, exitSucceed as Do, doneUnsafe as Dr, flow as Ds, raceFirst as Dt, contextWith as E, add as Ea, uninterruptibleMask$1 as Ei, nextBetween as En, exitFailCause as Eo, done$1 as Er, dual as Es, provideService as Et, filterOrFail as F, merge$1 as Fa, findFirst as Fi, done as Fn, NodeInspectSymbol as Fo, failCause$2 as Fr, runSyncExit as Ft, forkIn as G, getOrElse$1 as Ga, last as Gi, isReason as Gn, equals$1 as Go, andThen$1 as Gr, tap as Gt, forEach as H, fromNullOr as Ha, isCanonicalArrayIndex as Hi, interruptors as Hn, redact as Ho, ClockRef as Hr, succeedNone as Ht, flatMap as I, all$2 as Ia, findFirstIndex as Ii, fail$1 as In, toJson as Io, interrupt$1 as Ir, scope as It, fromResult as J, getOrUndefined$2 as Ja, match$2 as Ji, makeFailReason as Jn, combine as Jo, contextWith$1 as Jr, timeoutOrElse as Jt, forkScoped as K, getOrNull as Ka, makeEquivalence as Ki, isTimeoutError as Kn, symbol as Ko, asSome$1 as Kr, tapCause as Kt, flatMapEager as L, exists as La, findLast as Li, filterInterruptors as Ln, format$1 as Lo, isExit as Lr, scoped as Lt, fail as M, getUnsafe$1 as Ma, append as Mi, UnknownError as Mn, setStackTraceLimit as Mo, makeUnsafe$1 as Mr, Class$2 as Ms, runFork as Mt, failCause as N, make$3 as Na, appendAll as Ni, annotate as Nn, BaseProto as No, die$2 as Nr, Prototype$1 as Ns, runForkWith as Nt, die as O, get as Oa, void_$2 as Oi, IllegalArgumentError as On, withFiber$1 as Oo, interruptWith as Or, identity as Os, repeat as Ot, failCauseSync as P, makeUnsafe$2 as Pa, empty$1 as Pi, die$1 as Pn, Class$1 as Po, fail$2 as Pr, pipeArguments as Ps, runSync as Pt, interruptible as Q, liftThrowable as Qa, empty$2 as Qi, squash as Qn, structure as Qo, exitHasInterrupts as Qr, uninterruptible as Qt, flatten as R, filter as Ra, flatMapNullishOr as Ri, findError as Rn, formatDate as Ro, isFailure as Rr, scopedWith as Rt, catchTags as S, toSeconds as Sa, succeed$3 as Si, filterDone as Sn, TaggedError as So, CurrentLogAnnotations as Sr, constTrue as Ss, orElseSucceed as St, context as T, Service as Ta, sync$1 as Ti, Random as Tn, exitFail as To, _await as Tr, constant as Ts, provideContext as Tt, forever as U, fromNullishOr$1 as Ua, isReadonlyArrayNonEmpty as Ui, isCause as Un, symbolRedactable as Uo, ConsoleRef as Ur, suspend as Ut, fnUntracedEager as V, flatten$3 as Va, isArrayNonEmpty as Vi, hasInterruptsOnly as Vn, formatPropertyKey as Vo, void_$1 as Vr, succeed as Vt, forkChild as W, fromUndefinedOr as Wa, join as Wi, isFailReason as Wn, byReferenceUnsafe as Wo, LogToStderr as Wr, sync as Wt, ignore as X, isOption as Xa, reduce as Xi, map$1 as Xn, number as Xo, effectIsExit as Xr, try_ as Xt, gen as Y, isNone as Ya, of as Yi, makeInterruptReason as Yn, hash as Yo, currentTimeMillis as Yr, tryPromise as Yt, interrupt as Z, isSome as Za, sort as Zi, pretty as Zn, string as Zo, endSpan as Zr, undefined_ as Zt, catchFilter as _, minutes as _a, map$2 as _i, min as _n, strictEqual as _o, close as _r, isTagged as _s, onExit as _t, andThen as a, isSuccess$1 as aa, fiberInterruptAllAs as ai, whileLoop as an, toArray as ao, merge as ar, isIterable as as, makeSpanScoped as at, catchReason as b, seconds as ba, resolveConcurrency as bi, catchDone as bn, Error$1 as bo, makeUnsafe as br, or as bs, option as bt, as as c, succeed$4 as ca, fiberRunIn as ci, withParentSpan as cn, Number$1 as co, orDie$1 as cr, isNotNullish as cs, mapEager as ct, cached as d, fromInputUnsafe as da, getCurrentFiber as di, zipWith as dn, isGreaterThanOrEqualTo as do, succeed$1 as dr, isNullish as ds, match as dt, fail$4 as ea, exitVoid as ei, updateContext as en, match$5 as eo, effect as er, hasProperty as es, logDebug as et, cachedWithTTL as f, infinity as fa, iterateConcurrent as fi, Class as fn, isLessThan as fo, succeedContext as fr, isNumber as fs, matchCauseEager as ft, catchEager as g, millis as ga, makeSpanUnsafe as gi, jittered as gn, make$5 as go, addFinalizerExit as gr, isString as gs, onError as gt, catchDefect as h, isZero as ha, makeLatchUnsafe as hi, isSchedule as hn, Tuple as ho, addFinalizer$1 as hr, isPropertyKey as hs, never as ht, all as i, isFailure$1 as ia, fiberInterruptAll as ii, when as in, some as io, fresh as ir, isFunction as is, logWarning as it, exit as j, getOrUndefinedUnsafe as ja, Array$1 as ji, TimeoutError as jn, getStackTraceLimit as jo, isDoneUnsafe as jr, pipe as js, retry as jt, effectify as k, getOption as ka, DisablePropagation as ki, NoSuchElementError as kn, assignProperties as ko, into as kr, memoize as ks, request as kt, asSome as l, try_$2 as la, flatMap$2 as li, withSpan as ln, String$1 as lo, provide$2 as lr, isNotUndefined as ls, mapError as lt, catchCause as m, isFinite as ma, makeLatch as mi, exponential as mn, make$4 as mo, Scope as mr, isObjectKeyword as ms, matchEffect as mt, acquireUseRelease as n, getOrThrow as na, fiberAwait as ni, useSpan as nn, orElse as no, effectDiscard as nr, isBoolean as ns, logFatal as nt, annotateCurrentSpan as o, map$4 as oa, fiberInterruptAs as oi, withFiber as on, BigInt$1 as oo, mergeAll as or, isNever as os, map as ot, callback as p, isDuration as pa, iterateEager as pi, TaggedClass as pn, isLessThanOrEqualTo as po, unwrap as pr, isObject as ps, matchCauseEffect as pt, fromOption as q, getOrThrow$1 as qa, map$3 as qi, makeDieReason as qn, array as qo, callback$1 as qr, timeout as qt, addFinalizer as r, getOrUndefined as ra, fiberInterrupt as ri, void_ as rn, orElseSome as ro, empty as rr, isError as rs, logInfo as rt, annotateLogs as s, match$3 as sa, fiberJoin as si, withLogSpan as sn, Date$1 as so, mock as sr, isNotNull as ss, mapBothEager as st, acquireRelease as t, failVoid as ta, exitZipRight as ti, updateService as tn, none as to, effectContext as tr, isBigInt as ts, logError as tt, asVoid as u, format as ua, forkUnsafe$1 as ui, yieldNow as un, isGreaterThan as uo, provideMerge as ur, isNull as us, mapErrorEager as ut, catchIf as v, nanos as va, onExit$1 as vi, passthrough as vn, Prototype as vo, forkUnsafe as vr, isUndefined as vs, onExitPrimitive as vt, clockWith as w, Reference as wa, suspend$1 as wi, matchEffect$1 as wn, causeFail as wo, TracerTimingEnabled as wr, constVoid as ws, provide as wt, catchTag as x, toMillis as xa, scopeFinalizerCountUnsafe as xi, doneExitFromCause as xn, PipeInspectableProto as xo, provide$3 as xr, constFalse as xs, orDie as xt, catchNoSuchElement as y, negativeInfinity as ya, onExitPrimitive$1 as yi, spaced as yn, Done$1 as yo, make as yr, isUnknown as ys, onInterrupt as yt, fn as z, flatMap$4 as za, fromIterable as zi, fromReasons as zn, formatJson as zo, isSuccess as zr, serviceOption as zt };
4807
+ export { interruptible as $, liftThrowable as $a, empty$2 as $i, squash as $n, structure as $o, exitHasInterrupts as $r, uninterruptible as $t, effectify as A, getOption as Aa, DisablePropagation as Ai, NoSuchElementError as An, assignProperties as Ao, into as Ar, memoize as As, request as At, fn as B, flatMap$4 as Ba, fromIterable as Bi, fromReasons as Bn, formatJson as Bo, isSuccess as Br, serviceOption as Bt, catchTags as C, toSeconds as Ca, succeed$3 as Ci, filterDone as Cn, TaggedError as Co, CurrentLogAnnotations as Cr, constTrue as Cs, orElseSucceed as Ct, contextWith as D, add as Da, uninterruptibleMask$1 as Di, nextBetween as Dn, exitFailCause as Do, done$1 as Dr, dual as Ds, provideService as Dt, context as E, Service as Ea, sync$1 as Ei, Random as En, exitFail as Eo, _await as Er, constant as Es, provideContext as Et, failCauseSync as F, makeUnsafe$2 as Fa, empty$1 as Fi, die$1 as Fn, Class$1 as Fo, fail$2 as Fr, pipeArguments as Fs, runSync as Ft, forkChild as G, fromUndefinedOr as Ga, join as Gi, isFailReason as Gn, byReferenceUnsafe as Go, LogToStderr as Gr, sync as Gt, fnUntracedEager as H, flatten$3 as Ha, isArrayNonEmpty as Hi, hasInterruptsOnly as Hn, formatPropertyKey as Ho, void_$1 as Hr, succeed as Ht, filterOrFail as I, merge$1 as Ia, findFirst as Ii, done as In, NodeInspectSymbol as Io, failCause$2 as Ir, runSyncExit as It, fromOption as J, getOrThrow$1 as Ja, map$3 as Ji, makeDieReason as Jn, array as Jo, callback$1 as Jr, timeout as Jt, forkIn as K, getOrElse$1 as Ka, last as Ki, isReason as Kn, equals$1 as Ko, andThen$1 as Kr, tap as Kt, flatMap as L, all$2 as La, findFirstIndex as Li, fail$1 as Ln, toJson as Lo, interrupt$1 as Lr, scope as Lt, exit as M, getOrUndefinedUnsafe as Ma, Array$1 as Mi, TimeoutError as Mn, getStackTraceLimit as Mo, isDoneUnsafe as Mr, pipe as Ms, retry as Mt, fail as N, getUnsafe$1 as Na, append as Ni, UnknownError as Nn, setStackTraceLimit as No, makeUnsafe$1 as Nr, Class$2 as Ns, runFork as Nt, delay as O, empty$3 as Oa, updateContext$1 as Oi, Done as On, exitSucceed as Oo, doneUnsafe as Or, flow as Os, raceFirst as Ot, failCause as P, make$3 as Pa, appendAll as Pi, annotate as Pn, BaseProto as Po, die$2 as Pr, Prototype$1 as Ps, runForkWith as Pt, interrupt as Q, isSome as Qa, sort as Qi, pretty as Qn, string as Qo, endSpan as Qr, undefined_ as Qt, flatMapEager as R, exists as Ra, findLast as Ri, filterInterruptors as Rn, format$1 as Ro, isExit as Rr, scoped as Rt, catchTag as S, toMillis as Sa, resolveConcurrency as Si, doneExitFromCause as Sn, PipeInspectableProto as So, provide$3 as Sr, constFalse as Ss, orDie as St, clockWith as T, Reference as Ta, suspend$1 as Ti, matchEffect$1 as Tn, causeFail as To, TracerTimingEnabled as Tr, constVoid as Ts, provide as Tt, forEach as U, fromNullOr as Ua, isCanonicalArrayIndex as Ui, interruptors as Un, redact as Uo, ClockRef as Ur, succeedNone as Ut, fnUntraced as V, flatMapNullishOr$1 as Va, headNonEmpty as Vi, hasInterrupts as Vn, formatPath as Vo, succeed$2 as Vr, sleep as Vt, forever as W, fromNullishOr$1 as Wa, isReadonlyArrayNonEmpty as Wi, isCause as Wn, symbolRedactable as Wo, ConsoleRef as Wr, suspend as Wt, gen as X, isNone as Xa, of as Xi, makeInterruptReason as Xn, hash as Xo, currentTimeMillis as Xr, tryPromise as Xt, fromResult as Y, getOrUndefined$2 as Ya, match$2 as Yi, makeFailReason as Yn, combine as Yo, contextWith$1 as Yr, timeoutOrElse as Yt, ignore as Z, isOption as Za, reduce as Zi, map$1 as Zn, number as Zo, effectIsExit as Zr, try_ as Zt, catchEager as _, millis as _a, makeSpanUnsafe as _i, jittered as _n, make$5 as _o, addFinalizerExit as _r, isString as _s, onError as _t, andThen as a, isFailure$1 as aa, fiberInterruptAll as ai, when as an, some as ao, fresh as ar, isFunction as as, logWarning as at, catchNoSuchElement as b, negativeInfinity as ba, onExit$1 as bi, spaced as bn, Done$1 as bo, make as br, isUnknown as bs, onInterrupt as bt, as as c, match$3 as ca, fiberJoin as ci, withLogSpan as cn, Date$1 as co, mock as cr, isNotNull as cs, mapBothEager as ct, cached as d, format as da, forkUnsafe$1 as di, yieldNow as dn, isGreaterThan as do, provideMerge as dr, isNull as ds, mapErrorEager as dt, headUnsafe as ea, exitInterrupt as ei, uninterruptibleMask as en, map$5 as eo, buildWithScope as er, symbol$1 as es, isEffect as et, cachedWithTTL as f, fromInputUnsafe as fa, getCurrentFiber as fi, zipWith as fn, isGreaterThanOrEqualTo as fo, succeed$1 as fr, isNullish as fs, match as ft, catchDefect as g, isZero as ga, makeLatchUnsafe as gi, isSchedule as gn, Tuple as go, addFinalizer$1 as gr, isPropertyKey as gs, never as gt, catchCauseIf as h, isFinite as ha, makeLatch as hi, exponential as hn, make$4 as ho, Scope as hr, isObjectKeyword as hs, matchEffect as ht, all as i, getOrUndefined as ia, fiberInterrupt as ii, void_ as in, orElseSome as io, empty as ir, isError as is, logInfo as it, ensuring as j, getOrUndefined$1 as ja, ParentSpan as ji, StackTrace as jn, assignProperty as jo, isDone$1 as jr, memoizeIdempotent as js, result as jt, die as k, get as ka, void_$2 as ki, IllegalArgumentError as kn, withFiber$1 as ko, interruptWith as kr, identity as ks, repeat as kt, asSome as l, succeed$4 as la, fiberRunIn as li, withParentSpan as ln, Number$1 as lo, orDie$1 as lr, isNotNullish as ls, mapEager as lt, catchCause as m, isDuration as ma, iterateEager as mi, TaggedClass as mn, isLessThanOrEqualTo as mo, unwrap as mr, isObject as ms, matchCauseEffect as mt, acquireUseRelease as n, failVoid as na, exitZipRight as ni, updateService as nn, none as no, effectContext as nr, isBigInt as ns, logError as nt, annotateCurrentSpan as o, isSuccess$1 as oa, fiberInterruptAllAs as oi, whileLoop as on, toArray as oo, merge as or, isIterable as os, makeSpanScoped as ot, callback as p, infinity as pa, iterateConcurrent as pi, Class as pn, isLessThan as po, succeedContext as pr, isNumber as ps, matchCauseEager as pt, forkScoped as q, getOrNull as qa, makeEquivalence as qi, isTimeoutError as qn, symbol as qo, asSome$1 as qr, tapCause as qt, addFinalizer as r, getOrThrow as ra, fiberAwait as ri, useSpan as rn, orElse as ro, effectDiscard as rr, isBoolean as rs, logFatal as rt, annotateLogs as s, map$4 as sa, fiberInterruptAs as si, withFiber as sn, BigInt$1 as so, mergeAll as sr, isNever as ss, map as st, acquireRelease as t, fail$4 as ta, exitVoid as ti, updateContext as tn, match$5 as to, effect as tr, hasProperty as ts, logDebug as tt, asVoid as u, try_$2 as ua, flatMap$2 as ui, withSpan as un, String$1 as uo, provide$2 as ur, isNotUndefined as us, mapError as ut, catchFilter as v, minutes as va, map$2 as vi, min as vn, strictEqual as vo, close as vr, isTagged as vs, onExit as vt, catch_ as w, zero as wa, succeedNone$1 as wi, isDoneCause as wn, args as wo, MinimumLogLevel as wr, constUndefined as ws, promise as wt, catchReason as x, seconds as xa, onExitPrimitive$1 as xi, catchDone as xn, Error$1 as xo, makeUnsafe as xr, or as xs, option as xt, catchIf as y, nanos as ya, monotonicTimeNanos as yi, passthrough as yn, Prototype as yo, forkUnsafe as yr, isUndefined as ys, onExitPrimitive as yt, flatten as z, filter as za, flatMapNullishOr as zi, findError as zn, formatDate as zo, isFailure as zr, scopedWith as zt };
4757
4808
 
4758
- //# sourceMappingURL=Effect-BCeySOy1.mjs.map
4809
+ //# sourceMappingURL=Effect-BEUn4I5E.mjs.map