@effect-ak/tg-bot 1.2.1 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +114 -89
  2. package/dist/index.js +114 -89
  3. package/package.json +4 -4
package/dist/index.cjs CHANGED
@@ -41,7 +41,7 @@ __export(index_exports, {
41
41
  });
42
42
  module.exports = __toCommonJS(index_exports);
43
43
 
44
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Function.js
44
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Function.js
45
45
  var isFunction = (input) => typeof input === "function";
46
46
  var dual = function(arity, body) {
47
47
  if (typeof arity === "function") {
@@ -140,38 +140,34 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
140
140
  }
141
141
  }
142
142
 
143
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Equivalence.js
143
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Equivalence.js
144
144
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
145
145
 
146
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/version.js
147
- var moduleVersion = "3.12.0";
148
- var getCurrentVersion = () => moduleVersion;
149
-
150
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/GlobalValue.js
151
- var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
152
- if (!(globalStoreId in globalThis)) {
153
- ;
154
- globalThis[globalStoreId] = /* @__PURE__ */ new Map();
155
- }
156
- var globalStore = globalThis[globalStoreId];
146
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/GlobalValue.js
147
+ var globalStoreId = `effect/GlobalValue`;
148
+ var globalStore;
157
149
  var globalValue = (id, compute) => {
150
+ if (!globalStore) {
151
+ globalThis[globalStoreId] ??= /* @__PURE__ */ new Map();
152
+ globalStore = globalThis[globalStoreId];
153
+ }
158
154
  if (!globalStore.has(id)) {
159
155
  globalStore.set(id, compute());
160
156
  }
161
157
  return globalStore.get(id);
162
158
  };
163
159
 
164
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Predicate.js
160
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Predicate.js
165
161
  var isFunction2 = isFunction;
166
162
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
167
163
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
168
164
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
169
165
  var isTagged = /* @__PURE__ */ dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag);
170
166
 
171
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/errors.js
167
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/errors.js
172
168
  var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
173
169
 
174
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Utils.js
170
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Utils.js
175
171
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
176
172
  var GenKindImpl = class {
177
173
  value;
@@ -281,10 +277,25 @@ var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructur
281
277
  enabled: false,
282
278
  tester: void 0
283
279
  }));
280
+ var standard = {
281
+ effect_internal_function: (body) => {
282
+ return body();
283
+ }
284
+ };
285
+ var forced = {
286
+ effect_internal_function: (body) => {
287
+ try {
288
+ return body();
289
+ } finally {
290
+ }
291
+ }
292
+ };
293
+ var isNotOptimizedAway = /* @__PURE__ */ standard.effect_internal_function(() => new Error().stack)?.includes("effect_internal_function") === true;
294
+ var internalCall = isNotOptimizedAway ? standard.effect_internal_function : forced.effect_internal_function;
284
295
  var genConstructor = function* () {
285
296
  }.constructor;
286
297
 
287
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Hash.js
298
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Hash.js
288
299
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
289
300
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
290
301
  var hash = (self) => {
@@ -309,7 +320,12 @@ var hash = (self) => {
309
320
  if (self === null) {
310
321
  return string("null");
311
322
  } else if (self instanceof Date) {
323
+ if (Number.isNaN(self.getTime())) {
324
+ return string("Invalid Date");
325
+ }
312
326
  return hash(self.toISOString());
327
+ } else if (self instanceof URL) {
328
+ return hash(self.href);
313
329
  } else if (isHash(self)) {
314
330
  return self[symbol]();
315
331
  } else {
@@ -388,7 +404,7 @@ var cached = function() {
388
404
  return hash2;
389
405
  };
390
406
 
391
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Equal.js
407
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Equal.js
392
408
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
393
409
  function equals() {
394
410
  if (arguments.length === 1) {
@@ -413,7 +429,11 @@ function compareBoth(self, that) {
413
429
  return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
414
430
  }
415
431
  } else if (self instanceof Date && that instanceof Date) {
416
- return self.toISOString() === that.toISOString();
432
+ const t1 = self.getTime();
433
+ const t2 = that.getTime();
434
+ return t1 === t2 || Number.isNaN(t1) && Number.isNaN(t2);
435
+ } else if (self instanceof URL && that instanceof URL) {
436
+ return self.href === that.href;
417
437
  }
418
438
  }
419
439
  if (structuralRegionState.enabled) {
@@ -439,7 +459,7 @@ function compareBoth(self, that) {
439
459
  }
440
460
  var isEqual = (u) => hasProperty(u, symbol2);
441
461
 
442
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Inspectable.js
462
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Inspectable.js
443
463
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
444
464
  var toJSON = (x) => {
445
465
  try {
@@ -448,7 +468,7 @@ var toJSON = (x) => {
448
468
  } else if (Array.isArray(x)) {
449
469
  return x.map(toJSON);
450
470
  }
451
- } catch (_) {
471
+ } catch {
452
472
  return {};
453
473
  }
454
474
  return redact(x);
@@ -485,7 +505,7 @@ var toStringUnknown = (u, whitespace = 2) => {
485
505
  }
486
506
  try {
487
507
  return typeof u === "object" ? stringifyCircular(u, whitespace) : String(u);
488
- } catch (_) {
508
+ } catch {
489
509
  return String(u);
490
510
  }
491
511
  };
@@ -507,7 +527,7 @@ var redact = (u) => {
507
527
  return u;
508
528
  };
509
529
 
510
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Pipeable.js
530
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Pipeable.js
511
531
  var pipeArguments = (self, args2) => {
512
532
  switch (args2.length) {
513
533
  case 0:
@@ -540,12 +560,16 @@ var pipeArguments = (self, args2) => {
540
560
  }
541
561
  };
542
562
 
543
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/opCodes/effect.js
563
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/opCodes/effect.js
544
564
  var OP_COMMIT = "Commit";
545
565
  var OP_FAILURE = "Failure";
546
566
  var OP_WITH_RUNTIME = "WithRuntime";
547
567
 
548
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/effectable.js
568
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/version.js
569
+ var moduleVersion = "3.19.13";
570
+ var getCurrentVersion = () => moduleVersion;
571
+
572
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/effectable.js
549
573
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
550
574
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
551
575
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -632,7 +656,7 @@ var StructuralCommitPrototype = {
632
656
  ...StructuralPrototype
633
657
  };
634
658
 
635
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/option.js
659
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/option.js
636
660
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
637
661
  var CommonProto = {
638
662
  ...EffectPrototype,
@@ -690,7 +714,7 @@ var some = (value) => {
690
714
  return a;
691
715
  };
692
716
 
693
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/either.js
717
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/either.js
694
718
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
695
719
  var CommonProto2 = {
696
720
  ...EffectPrototype,
@@ -752,11 +776,11 @@ var right = (right3) => {
752
776
  return a;
753
777
  };
754
778
 
755
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Either.js
779
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Either.js
756
780
  var right2 = right;
757
781
  var left2 = left;
758
782
 
759
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Option.js
783
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Option.js
760
784
  var none2 = () => none;
761
785
  var some2 = some;
762
786
  var isNone2 = isNone;
@@ -764,13 +788,13 @@ var isSome2 = isSome;
764
788
  var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone() : self.value);
765
789
  var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
766
790
 
767
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Array.js
791
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Array.js
768
792
  var fromIterable = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
769
793
  var isArray = Array.isArray;
770
794
  var reverse = (self) => Array.from(self).reverse();
771
795
  var reduce = /* @__PURE__ */ dual(3, (self, b, f) => fromIterable(self).reduce((b2, a, i) => f(b2, a, i), b));
772
796
 
773
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Chunk.js
797
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Chunk.js
774
798
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Chunk");
775
799
  function copy(src, srcPos, dest, destPos, len) {
776
800
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
@@ -867,15 +891,12 @@ var _empty = /* @__PURE__ */ makeChunk({
867
891
  _tag: "IEmpty"
868
892
  });
869
893
  var empty = () => _empty;
870
- var make2 = (...as2) => as2.length === 1 ? of(as2[0]) : unsafeFromNonEmptyArray(as2);
894
+ var make2 = (...as2) => unsafeFromNonEmptyArray(as2);
871
895
  var of = (a) => makeChunk({
872
896
  _tag: "ISingleton",
873
897
  a
874
898
  });
875
- var fromIterable2 = (self) => isChunk(self) ? self : makeChunk({
876
- _tag: "IArray",
877
- array: fromIterable(self)
878
- });
899
+ var fromIterable2 = (self) => isChunk(self) ? self : unsafeFromArray(fromIterable(self));
879
900
  var copyToArray = (self, array2, initial) => {
880
901
  switch (self.backing._tag) {
881
902
  case "IArray": {
@@ -949,7 +970,7 @@ var reverseChunk = (self) => {
949
970
  }
950
971
  };
951
972
  var reverse2 = reverseChunk;
952
- var unsafeFromArray = (self) => makeChunk({
973
+ var unsafeFromArray = (self) => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({
953
974
  _tag: "IArray",
954
975
  array: self
955
976
  });
@@ -1069,7 +1090,7 @@ var isNonEmpty = (self) => self.length > 0;
1069
1090
  var unsafeHead = (self) => unsafeGet(self, 0);
1070
1091
  var headNonEmpty = unsafeHead;
1071
1092
 
1072
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/context.js
1093
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/context.js
1073
1094
  var TagTypeId = /* @__PURE__ */ Symbol.for("effect/Context/Tag");
1074
1095
  var ReferenceTypeId = /* @__PURE__ */ Symbol.for("effect/Context/Reference");
1075
1096
  var STMSymbolKey = "effect/STM";
@@ -1233,7 +1254,7 @@ var merge = /* @__PURE__ */ dual(2, (self, that) => {
1233
1254
  return makeContext(map7);
1234
1255
  });
1235
1256
 
1236
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Context.js
1257
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Context.js
1237
1258
  var make4 = make3;
1238
1259
  var add2 = add;
1239
1260
  var unsafeGet3 = unsafeGet2;
@@ -1241,14 +1262,14 @@ var merge2 = merge;
1241
1262
  var Tag2 = Tag;
1242
1263
  var Reference2 = Reference;
1243
1264
 
1244
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/config.js
1265
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/config.js
1245
1266
  var SIZE = 5;
1246
1267
  var BUCKET_SIZE = /* @__PURE__ */ Math.pow(2, SIZE);
1247
1268
  var MASK = BUCKET_SIZE - 1;
1248
1269
  var MAX_INDEX_NODE = BUCKET_SIZE / 2;
1249
1270
  var MIN_ARRAY_NODE = BUCKET_SIZE / 4;
1250
1271
 
1251
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/bitwise.js
1272
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/bitwise.js
1252
1273
  function popcount(x) {
1253
1274
  x -= x >> 1 & 1431655765;
1254
1275
  x = (x & 858993459) + (x >> 2 & 858993459);
@@ -1267,13 +1288,13 @@ function fromBitmap(bitmap, bit) {
1267
1288
  return popcount(bitmap & bit - 1);
1268
1289
  }
1269
1290
 
1270
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/stack.js
1291
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/stack.js
1271
1292
  var make5 = (value, previous) => ({
1272
1293
  value,
1273
1294
  previous
1274
1295
  });
1275
1296
 
1276
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/array.js
1297
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/array.js
1277
1298
  function arrayUpdate(mutate2, at, v, arr) {
1278
1299
  let out = arr;
1279
1300
  if (!mutate2) {
@@ -1295,7 +1316,6 @@ function arraySpliceOut(mutate2, at, arr) {
1295
1316
  out = new Array(newLen);
1296
1317
  while (i < at) out[g++] = arr[i++];
1297
1318
  }
1298
- ;
1299
1319
  ++i;
1300
1320
  while (i <= newLen) out[g++] = arr[i++];
1301
1321
  if (mutate2) {
@@ -1319,7 +1339,7 @@ function arraySpliceIn(mutate2, at, v, arr) {
1319
1339
  return out;
1320
1340
  }
1321
1341
 
1322
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/node.js
1342
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/node.js
1323
1343
  var EmptyNode = class _EmptyNode {
1324
1344
  _tag = "EmptyNode";
1325
1345
  modify(edit, _shift, f, hash2, key, size4) {
@@ -1355,7 +1375,6 @@ var LeafNode = class _LeafNode {
1355
1375
  const v2 = f(this.value);
1356
1376
  if (v2 === this.value) return this;
1357
1377
  else if (isNone2(v2)) {
1358
- ;
1359
1378
  --size4.value;
1360
1379
  return new EmptyNode();
1361
1380
  }
@@ -1402,7 +1421,6 @@ var CollisionNode = class _CollisionNode {
1402
1421
  const newValue2 = f(value);
1403
1422
  if (newValue2 === value) return list;
1404
1423
  if (isNone2(newValue2)) {
1405
- ;
1406
1424
  --size4.value;
1407
1425
  return arraySpliceOut(mutate2, i, list);
1408
1426
  }
@@ -1481,11 +1499,9 @@ var ArrayNode = class _ArrayNode {
1481
1499
  const canEdit = canEditNode(this, edit);
1482
1500
  let newChildren;
1483
1501
  if (isEmptyNode(child) && !isEmptyNode(newChild)) {
1484
- ;
1485
1502
  ++count;
1486
1503
  newChildren = arrayUpdate(canEdit, frag, newChild, children);
1487
1504
  } else if (!isEmptyNode(child) && isEmptyNode(newChild)) {
1488
- ;
1489
1505
  --count;
1490
1506
  if (count <= MIN_ARRAY_NODE) {
1491
1507
  return pack(edit, count, frag, children);
@@ -1558,7 +1574,7 @@ function mergeLeaves(edit, shift, h1, n1, h2, n2) {
1558
1574
  }
1559
1575
  }
1560
1576
 
1561
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap.js
1577
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap.js
1562
1578
  var HashMapSymbolKey = "effect/HashMap";
1563
1579
  var HashMapTypeId = /* @__PURE__ */ Symbol.for(HashMapSymbolKey);
1564
1580
  var HashMapProto = {
@@ -1770,7 +1786,7 @@ var reduce2 = /* @__PURE__ */ dual(3, (self, zero, f) => {
1770
1786
  return zero;
1771
1787
  });
1772
1788
 
1773
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashSet.js
1789
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashSet.js
1774
1790
  var HashSetSymbolKey = "effect/HashSet";
1775
1791
  var HashSetTypeId = /* @__PURE__ */ Symbol.for(HashSetSymbolKey);
1776
1792
  var HashSetProto = {
@@ -1832,13 +1848,13 @@ var union2 = /* @__PURE__ */ dual(2, (self, that) => mutate(empty4(), (set2) =>
1832
1848
  }));
1833
1849
  var forEach2 = /* @__PURE__ */ dual(2, (self, f) => forEach(self._keyMap, (_, k) => f(k)));
1834
1850
 
1835
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/HashSet.js
1851
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/HashSet.js
1836
1852
  var empty5 = empty4;
1837
1853
  var size3 = size2;
1838
1854
  var add4 = add3;
1839
1855
  var union3 = union2;
1840
1856
 
1841
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/data.js
1857
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/data.js
1842
1858
  var ArrayProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Array.prototype), {
1843
1859
  [symbol]() {
1844
1860
  return cached(this, array(this));
@@ -1861,7 +1877,7 @@ var Structural = /* @__PURE__ */ function() {
1861
1877
  return Structural2;
1862
1878
  }();
1863
1879
 
1864
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/opCodes/cause.js
1880
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/opCodes/cause.js
1865
1881
  var OP_DIE = "Die";
1866
1882
  var OP_EMPTY = "Empty";
1867
1883
  var OP_FAIL = "Fail";
@@ -1869,7 +1885,7 @@ var OP_INTERRUPT = "Interrupt";
1869
1885
  var OP_PARALLEL = "Parallel";
1870
1886
  var OP_SEQUENTIAL = "Sequential";
1871
1887
 
1872
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/cause.js
1888
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/cause.js
1873
1889
  var CauseSymbolKey = "effect/Cause";
1874
1890
  var CauseTypeId = /* @__PURE__ */ Symbol.for(CauseSymbolKey);
1875
1891
  var variance = {
@@ -2246,11 +2262,14 @@ var prettyErrorStack = (message, stack, span) => {
2246
2262
  const out = [message];
2247
2263
  const lines = stack.startsWith(message) ? stack.slice(message.length).split("\n") : stack.split("\n");
2248
2264
  for (let i = 1; i < lines.length; i++) {
2265
+ if (lines[i].includes(" at new BaseEffectError") || lines[i].includes(" at new YieldableError")) {
2266
+ i++;
2267
+ continue;
2268
+ }
2249
2269
  if (lines[i].includes("Generator.next")) {
2250
2270
  break;
2251
2271
  }
2252
2272
  if (lines[i].includes("effect_internal_function")) {
2253
- out.pop();
2254
2273
  break;
2255
2274
  }
2256
2275
  out.push(lines[i].replace(/at .*effect_instruction_i.*\((.*)\)/, "at $1").replace(/EffectPrimitive\.\w+/, "<anonymous>"));
@@ -2298,7 +2317,7 @@ var prettyErrors = (cause) => reduceWithContext(cause, void 0, {
2298
2317
  sequentialCase: (_, l, r) => [...l, ...r]
2299
2318
  });
2300
2319
 
2301
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/singleShotGen.js
2320
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/singleShotGen.js
2302
2321
  var SingleShotGen2 = class _SingleShotGen {
2303
2322
  self;
2304
2323
  called = false;
@@ -2328,7 +2347,7 @@ var SingleShotGen2 = class _SingleShotGen {
2328
2347
  }
2329
2348
  };
2330
2349
 
2331
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/core.js
2350
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/core.js
2332
2351
  var EffectTypeId2 = /* @__PURE__ */ Symbol.for("effect/Effect");
2333
2352
  var EffectPrimitive = class {
2334
2353
  _op;
@@ -2468,16 +2487,15 @@ var withFiberRuntime = (withRuntime) => {
2468
2487
  effect.effect_instruction_i0 = withRuntime;
2469
2488
  return effect;
2470
2489
  };
2471
- var spanSymbol2 = /* @__PURE__ */ Symbol.for("effect/SpanAnnotation");
2472
2490
  var originalSymbol = /* @__PURE__ */ Symbol.for("effect/OriginalAnnotation");
2473
2491
  var capture = (obj, span) => {
2474
2492
  if (isSome2(span)) {
2475
2493
  return new Proxy(obj, {
2476
2494
  has(target, p) {
2477
- return p === spanSymbol2 || p === originalSymbol || p in target;
2495
+ return p === spanSymbol || p === originalSymbol || p in target;
2478
2496
  },
2479
2497
  get(target, p) {
2480
- if (p === spanSymbol2) {
2498
+ if (p === spanSymbol) {
2481
2499
  return span.value;
2482
2500
  }
2483
2501
  if (p === originalSymbol) {
@@ -2489,7 +2507,7 @@ var capture = (obj, span) => {
2489
2507
  }
2490
2508
  return obj;
2491
2509
  };
2492
- var fail2 = (error) => isObject(error) && !(spanSymbol2 in error) ? withFiberRuntime((fiber) => failCause(fail(capture(error, currentSpanFromFiber(fiber))))) : failCause(fail(error));
2510
+ var fail2 = (error) => isObject(error) && !(spanSymbol in error) ? withFiberRuntime((fiber) => failCause(fail(capture(error, currentSpanFromFiber(fiber))))) : failCause(fail(error));
2493
2511
  var failCause = (cause) => {
2494
2512
  const effect = new EffectPrimitiveFailure(OP_FAILURE);
2495
2513
  effect.effect_instruction_i0 = cause;
@@ -2549,9 +2567,12 @@ var YieldableError = /* @__PURE__ */ function() {
2549
2567
  return fail2(this);
2550
2568
  }
2551
2569
  toJSON() {
2552
- return {
2570
+ const obj = {
2553
2571
  ...this
2554
2572
  };
2573
+ if (this.message) obj.message = this.message;
2574
+ if (this.cause) obj.cause = this.cause;
2575
+ return obj;
2555
2576
  }
2556
2577
  [NodeInspectSymbol]() {
2557
2578
  if (this.toString !== globalThis.Error.prototype.toString) {
@@ -2610,7 +2631,7 @@ var currentSpanFromFiber = (fiber) => {
2610
2631
  return span !== void 0 && span._tag === "Span" ? some2(span) : none2();
2611
2632
  };
2612
2633
 
2613
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Data.js
2634
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Data.js
2614
2635
  var Class2 = Structural;
2615
2636
  var TaggedClass = (tag) => {
2616
2637
  class Base2 extends Class2 {
@@ -2620,34 +2641,38 @@ var TaggedClass = (tag) => {
2620
2641
  };
2621
2642
  var Error2 = /* @__PURE__ */ function() {
2622
2643
  const plainArgsSymbol = /* @__PURE__ */ Symbol.for("effect/Data/Error/plainArgs");
2623
- return class Base extends YieldableError {
2624
- constructor(args2) {
2625
- super(args2?.message, args2?.cause ? {
2626
- cause: args2.cause
2627
- } : void 0);
2628
- if (args2) {
2629
- Object.assign(this, args2);
2630
- Object.defineProperty(this, plainArgsSymbol, {
2631
- value: args2,
2632
- enumerable: false
2633
- });
2644
+ const O = {
2645
+ BaseEffectError: class extends YieldableError {
2646
+ constructor(args2) {
2647
+ super(args2?.message, args2?.cause ? {
2648
+ cause: args2.cause
2649
+ } : void 0);
2650
+ if (args2) {
2651
+ Object.assign(this, args2);
2652
+ Object.defineProperty(this, plainArgsSymbol, {
2653
+ value: args2,
2654
+ enumerable: false
2655
+ });
2656
+ }
2657
+ }
2658
+ toJSON() {
2659
+ return {
2660
+ ...this[plainArgsSymbol],
2661
+ ...this
2662
+ };
2634
2663
  }
2635
- }
2636
- toJSON() {
2637
- return {
2638
- ...this[plainArgsSymbol],
2639
- ...this
2640
- };
2641
2664
  }
2642
2665
  };
2666
+ return O.BaseEffectError;
2643
2667
  }();
2644
2668
  var TaggedError = (tag) => {
2645
- class Base2 extends Error2 {
2646
- _tag = tag;
2647
- }
2648
- ;
2649
- Base2.prototype.name = tag;
2650
- return Base2;
2669
+ const O = {
2670
+ BaseEffectError: class extends Error2 {
2671
+ _tag = tag;
2672
+ }
2673
+ };
2674
+ O.BaseEffectError.prototype.name = tag;
2675
+ return O.BaseEffectError;
2651
2676
  };
2652
2677
 
2653
2678
  // src/internal/bot-response.ts
@@ -2678,10 +2703,10 @@ var createBotContext = (update) => {
2678
2703
  };
2679
2704
  };
2680
2705
 
2681
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Effectable.js
2706
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Effectable.js
2682
2707
  var EffectPrototype2 = EffectPrototype;
2683
2708
 
2684
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Micro.js
2709
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Micro.js
2685
2710
  var TypeId5 = /* @__PURE__ */ Symbol.for("effect/Micro");
2686
2711
  var MicroExitTypeId = /* @__PURE__ */ Symbol.for("effect/Micro/MicroExit");
2687
2712
  var isMicro = (u) => typeof u === "object" && u !== null && TypeId5 in u;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Function.js
1
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Function.js
2
2
  var isFunction = (input) => typeof input === "function";
3
3
  var dual = function(arity, body) {
4
4
  if (typeof arity === "function") {
@@ -97,38 +97,34 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
97
97
  }
98
98
  }
99
99
 
100
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Equivalence.js
100
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Equivalence.js
101
101
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
102
102
 
103
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/version.js
104
- var moduleVersion = "3.12.0";
105
- var getCurrentVersion = () => moduleVersion;
106
-
107
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/GlobalValue.js
108
- var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
109
- if (!(globalStoreId in globalThis)) {
110
- ;
111
- globalThis[globalStoreId] = /* @__PURE__ */ new Map();
112
- }
113
- var globalStore = globalThis[globalStoreId];
103
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/GlobalValue.js
104
+ var globalStoreId = `effect/GlobalValue`;
105
+ var globalStore;
114
106
  var globalValue = (id, compute) => {
107
+ if (!globalStore) {
108
+ globalThis[globalStoreId] ??= /* @__PURE__ */ new Map();
109
+ globalStore = globalThis[globalStoreId];
110
+ }
115
111
  if (!globalStore.has(id)) {
116
112
  globalStore.set(id, compute());
117
113
  }
118
114
  return globalStore.get(id);
119
115
  };
120
116
 
121
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Predicate.js
117
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Predicate.js
122
118
  var isFunction2 = isFunction;
123
119
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
124
120
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
125
121
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
126
122
  var isTagged = /* @__PURE__ */ dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag);
127
123
 
128
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/errors.js
124
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/errors.js
129
125
  var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
130
126
 
131
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Utils.js
127
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Utils.js
132
128
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
133
129
  var GenKindImpl = class {
134
130
  value;
@@ -238,10 +234,25 @@ var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructur
238
234
  enabled: false,
239
235
  tester: void 0
240
236
  }));
237
+ var standard = {
238
+ effect_internal_function: (body) => {
239
+ return body();
240
+ }
241
+ };
242
+ var forced = {
243
+ effect_internal_function: (body) => {
244
+ try {
245
+ return body();
246
+ } finally {
247
+ }
248
+ }
249
+ };
250
+ var isNotOptimizedAway = /* @__PURE__ */ standard.effect_internal_function(() => new Error().stack)?.includes("effect_internal_function") === true;
251
+ var internalCall = isNotOptimizedAway ? standard.effect_internal_function : forced.effect_internal_function;
241
252
  var genConstructor = function* () {
242
253
  }.constructor;
243
254
 
244
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Hash.js
255
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Hash.js
245
256
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
246
257
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
247
258
  var hash = (self) => {
@@ -266,7 +277,12 @@ var hash = (self) => {
266
277
  if (self === null) {
267
278
  return string("null");
268
279
  } else if (self instanceof Date) {
280
+ if (Number.isNaN(self.getTime())) {
281
+ return string("Invalid Date");
282
+ }
269
283
  return hash(self.toISOString());
284
+ } else if (self instanceof URL) {
285
+ return hash(self.href);
270
286
  } else if (isHash(self)) {
271
287
  return self[symbol]();
272
288
  } else {
@@ -345,7 +361,7 @@ var cached = function() {
345
361
  return hash2;
346
362
  };
347
363
 
348
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Equal.js
364
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Equal.js
349
365
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
350
366
  function equals() {
351
367
  if (arguments.length === 1) {
@@ -370,7 +386,11 @@ function compareBoth(self, that) {
370
386
  return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
371
387
  }
372
388
  } else if (self instanceof Date && that instanceof Date) {
373
- return self.toISOString() === that.toISOString();
389
+ const t1 = self.getTime();
390
+ const t2 = that.getTime();
391
+ return t1 === t2 || Number.isNaN(t1) && Number.isNaN(t2);
392
+ } else if (self instanceof URL && that instanceof URL) {
393
+ return self.href === that.href;
374
394
  }
375
395
  }
376
396
  if (structuralRegionState.enabled) {
@@ -396,7 +416,7 @@ function compareBoth(self, that) {
396
416
  }
397
417
  var isEqual = (u) => hasProperty(u, symbol2);
398
418
 
399
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Inspectable.js
419
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Inspectable.js
400
420
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
401
421
  var toJSON = (x) => {
402
422
  try {
@@ -405,7 +425,7 @@ var toJSON = (x) => {
405
425
  } else if (Array.isArray(x)) {
406
426
  return x.map(toJSON);
407
427
  }
408
- } catch (_) {
428
+ } catch {
409
429
  return {};
410
430
  }
411
431
  return redact(x);
@@ -442,7 +462,7 @@ var toStringUnknown = (u, whitespace = 2) => {
442
462
  }
443
463
  try {
444
464
  return typeof u === "object" ? stringifyCircular(u, whitespace) : String(u);
445
- } catch (_) {
465
+ } catch {
446
466
  return String(u);
447
467
  }
448
468
  };
@@ -464,7 +484,7 @@ var redact = (u) => {
464
484
  return u;
465
485
  };
466
486
 
467
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Pipeable.js
487
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Pipeable.js
468
488
  var pipeArguments = (self, args2) => {
469
489
  switch (args2.length) {
470
490
  case 0:
@@ -497,12 +517,16 @@ var pipeArguments = (self, args2) => {
497
517
  }
498
518
  };
499
519
 
500
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/opCodes/effect.js
520
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/opCodes/effect.js
501
521
  var OP_COMMIT = "Commit";
502
522
  var OP_FAILURE = "Failure";
503
523
  var OP_WITH_RUNTIME = "WithRuntime";
504
524
 
505
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/effectable.js
525
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/version.js
526
+ var moduleVersion = "3.19.13";
527
+ var getCurrentVersion = () => moduleVersion;
528
+
529
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/effectable.js
506
530
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
507
531
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
508
532
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -589,7 +613,7 @@ var StructuralCommitPrototype = {
589
613
  ...StructuralPrototype
590
614
  };
591
615
 
592
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/option.js
616
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/option.js
593
617
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
594
618
  var CommonProto = {
595
619
  ...EffectPrototype,
@@ -647,7 +671,7 @@ var some = (value) => {
647
671
  return a;
648
672
  };
649
673
 
650
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/either.js
674
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/either.js
651
675
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
652
676
  var CommonProto2 = {
653
677
  ...EffectPrototype,
@@ -709,11 +733,11 @@ var right = (right3) => {
709
733
  return a;
710
734
  };
711
735
 
712
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Either.js
736
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Either.js
713
737
  var right2 = right;
714
738
  var left2 = left;
715
739
 
716
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Option.js
740
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Option.js
717
741
  var none2 = () => none;
718
742
  var some2 = some;
719
743
  var isNone2 = isNone;
@@ -721,13 +745,13 @@ var isSome2 = isSome;
721
745
  var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone() : self.value);
722
746
  var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
723
747
 
724
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Array.js
748
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Array.js
725
749
  var fromIterable = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
726
750
  var isArray = Array.isArray;
727
751
  var reverse = (self) => Array.from(self).reverse();
728
752
  var reduce = /* @__PURE__ */ dual(3, (self, b, f) => fromIterable(self).reduce((b2, a, i) => f(b2, a, i), b));
729
753
 
730
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Chunk.js
754
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Chunk.js
731
755
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Chunk");
732
756
  function copy(src, srcPos, dest, destPos, len) {
733
757
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) {
@@ -824,15 +848,12 @@ var _empty = /* @__PURE__ */ makeChunk({
824
848
  _tag: "IEmpty"
825
849
  });
826
850
  var empty = () => _empty;
827
- var make2 = (...as2) => as2.length === 1 ? of(as2[0]) : unsafeFromNonEmptyArray(as2);
851
+ var make2 = (...as2) => unsafeFromNonEmptyArray(as2);
828
852
  var of = (a) => makeChunk({
829
853
  _tag: "ISingleton",
830
854
  a
831
855
  });
832
- var fromIterable2 = (self) => isChunk(self) ? self : makeChunk({
833
- _tag: "IArray",
834
- array: fromIterable(self)
835
- });
856
+ var fromIterable2 = (self) => isChunk(self) ? self : unsafeFromArray(fromIterable(self));
836
857
  var copyToArray = (self, array2, initial) => {
837
858
  switch (self.backing._tag) {
838
859
  case "IArray": {
@@ -906,7 +927,7 @@ var reverseChunk = (self) => {
906
927
  }
907
928
  };
908
929
  var reverse2 = reverseChunk;
909
- var unsafeFromArray = (self) => makeChunk({
930
+ var unsafeFromArray = (self) => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({
910
931
  _tag: "IArray",
911
932
  array: self
912
933
  });
@@ -1026,7 +1047,7 @@ var isNonEmpty = (self) => self.length > 0;
1026
1047
  var unsafeHead = (self) => unsafeGet(self, 0);
1027
1048
  var headNonEmpty = unsafeHead;
1028
1049
 
1029
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/context.js
1050
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/context.js
1030
1051
  var TagTypeId = /* @__PURE__ */ Symbol.for("effect/Context/Tag");
1031
1052
  var ReferenceTypeId = /* @__PURE__ */ Symbol.for("effect/Context/Reference");
1032
1053
  var STMSymbolKey = "effect/STM";
@@ -1190,7 +1211,7 @@ var merge = /* @__PURE__ */ dual(2, (self, that) => {
1190
1211
  return makeContext(map7);
1191
1212
  });
1192
1213
 
1193
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Context.js
1214
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Context.js
1194
1215
  var make4 = make3;
1195
1216
  var add2 = add;
1196
1217
  var unsafeGet3 = unsafeGet2;
@@ -1198,14 +1219,14 @@ var merge2 = merge;
1198
1219
  var Tag2 = Tag;
1199
1220
  var Reference2 = Reference;
1200
1221
 
1201
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/config.js
1222
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/config.js
1202
1223
  var SIZE = 5;
1203
1224
  var BUCKET_SIZE = /* @__PURE__ */ Math.pow(2, SIZE);
1204
1225
  var MASK = BUCKET_SIZE - 1;
1205
1226
  var MAX_INDEX_NODE = BUCKET_SIZE / 2;
1206
1227
  var MIN_ARRAY_NODE = BUCKET_SIZE / 4;
1207
1228
 
1208
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/bitwise.js
1229
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/bitwise.js
1209
1230
  function popcount(x) {
1210
1231
  x -= x >> 1 & 1431655765;
1211
1232
  x = (x & 858993459) + (x >> 2 & 858993459);
@@ -1224,13 +1245,13 @@ function fromBitmap(bitmap, bit) {
1224
1245
  return popcount(bitmap & bit - 1);
1225
1246
  }
1226
1247
 
1227
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/stack.js
1248
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/stack.js
1228
1249
  var make5 = (value, previous) => ({
1229
1250
  value,
1230
1251
  previous
1231
1252
  });
1232
1253
 
1233
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/array.js
1254
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/array.js
1234
1255
  function arrayUpdate(mutate2, at, v, arr) {
1235
1256
  let out = arr;
1236
1257
  if (!mutate2) {
@@ -1252,7 +1273,6 @@ function arraySpliceOut(mutate2, at, arr) {
1252
1273
  out = new Array(newLen);
1253
1274
  while (i < at) out[g++] = arr[i++];
1254
1275
  }
1255
- ;
1256
1276
  ++i;
1257
1277
  while (i <= newLen) out[g++] = arr[i++];
1258
1278
  if (mutate2) {
@@ -1276,7 +1296,7 @@ function arraySpliceIn(mutate2, at, v, arr) {
1276
1296
  return out;
1277
1297
  }
1278
1298
 
1279
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap/node.js
1299
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap/node.js
1280
1300
  var EmptyNode = class _EmptyNode {
1281
1301
  _tag = "EmptyNode";
1282
1302
  modify(edit, _shift, f, hash2, key, size4) {
@@ -1312,7 +1332,6 @@ var LeafNode = class _LeafNode {
1312
1332
  const v2 = f(this.value);
1313
1333
  if (v2 === this.value) return this;
1314
1334
  else if (isNone2(v2)) {
1315
- ;
1316
1335
  --size4.value;
1317
1336
  return new EmptyNode();
1318
1337
  }
@@ -1359,7 +1378,6 @@ var CollisionNode = class _CollisionNode {
1359
1378
  const newValue2 = f(value);
1360
1379
  if (newValue2 === value) return list;
1361
1380
  if (isNone2(newValue2)) {
1362
- ;
1363
1381
  --size4.value;
1364
1382
  return arraySpliceOut(mutate2, i, list);
1365
1383
  }
@@ -1438,11 +1456,9 @@ var ArrayNode = class _ArrayNode {
1438
1456
  const canEdit = canEditNode(this, edit);
1439
1457
  let newChildren;
1440
1458
  if (isEmptyNode(child) && !isEmptyNode(newChild)) {
1441
- ;
1442
1459
  ++count;
1443
1460
  newChildren = arrayUpdate(canEdit, frag, newChild, children);
1444
1461
  } else if (!isEmptyNode(child) && isEmptyNode(newChild)) {
1445
- ;
1446
1462
  --count;
1447
1463
  if (count <= MIN_ARRAY_NODE) {
1448
1464
  return pack(edit, count, frag, children);
@@ -1515,7 +1531,7 @@ function mergeLeaves(edit, shift, h1, n1, h2, n2) {
1515
1531
  }
1516
1532
  }
1517
1533
 
1518
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashMap.js
1534
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashMap.js
1519
1535
  var HashMapSymbolKey = "effect/HashMap";
1520
1536
  var HashMapTypeId = /* @__PURE__ */ Symbol.for(HashMapSymbolKey);
1521
1537
  var HashMapProto = {
@@ -1727,7 +1743,7 @@ var reduce2 = /* @__PURE__ */ dual(3, (self, zero, f) => {
1727
1743
  return zero;
1728
1744
  });
1729
1745
 
1730
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/hashSet.js
1746
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/hashSet.js
1731
1747
  var HashSetSymbolKey = "effect/HashSet";
1732
1748
  var HashSetTypeId = /* @__PURE__ */ Symbol.for(HashSetSymbolKey);
1733
1749
  var HashSetProto = {
@@ -1789,13 +1805,13 @@ var union2 = /* @__PURE__ */ dual(2, (self, that) => mutate(empty4(), (set2) =>
1789
1805
  }));
1790
1806
  var forEach2 = /* @__PURE__ */ dual(2, (self, f) => forEach(self._keyMap, (_, k) => f(k)));
1791
1807
 
1792
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/HashSet.js
1808
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/HashSet.js
1793
1809
  var empty5 = empty4;
1794
1810
  var size3 = size2;
1795
1811
  var add4 = add3;
1796
1812
  var union3 = union2;
1797
1813
 
1798
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/data.js
1814
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/data.js
1799
1815
  var ArrayProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Array.prototype), {
1800
1816
  [symbol]() {
1801
1817
  return cached(this, array(this));
@@ -1818,7 +1834,7 @@ var Structural = /* @__PURE__ */ function() {
1818
1834
  return Structural2;
1819
1835
  }();
1820
1836
 
1821
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/opCodes/cause.js
1837
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/opCodes/cause.js
1822
1838
  var OP_DIE = "Die";
1823
1839
  var OP_EMPTY = "Empty";
1824
1840
  var OP_FAIL = "Fail";
@@ -1826,7 +1842,7 @@ var OP_INTERRUPT = "Interrupt";
1826
1842
  var OP_PARALLEL = "Parallel";
1827
1843
  var OP_SEQUENTIAL = "Sequential";
1828
1844
 
1829
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/cause.js
1845
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/cause.js
1830
1846
  var CauseSymbolKey = "effect/Cause";
1831
1847
  var CauseTypeId = /* @__PURE__ */ Symbol.for(CauseSymbolKey);
1832
1848
  var variance = {
@@ -2203,11 +2219,14 @@ var prettyErrorStack = (message, stack, span) => {
2203
2219
  const out = [message];
2204
2220
  const lines = stack.startsWith(message) ? stack.slice(message.length).split("\n") : stack.split("\n");
2205
2221
  for (let i = 1; i < lines.length; i++) {
2222
+ if (lines[i].includes(" at new BaseEffectError") || lines[i].includes(" at new YieldableError")) {
2223
+ i++;
2224
+ continue;
2225
+ }
2206
2226
  if (lines[i].includes("Generator.next")) {
2207
2227
  break;
2208
2228
  }
2209
2229
  if (lines[i].includes("effect_internal_function")) {
2210
- out.pop();
2211
2230
  break;
2212
2231
  }
2213
2232
  out.push(lines[i].replace(/at .*effect_instruction_i.*\((.*)\)/, "at $1").replace(/EffectPrimitive\.\w+/, "<anonymous>"));
@@ -2255,7 +2274,7 @@ var prettyErrors = (cause) => reduceWithContext(cause, void 0, {
2255
2274
  sequentialCase: (_, l, r) => [...l, ...r]
2256
2275
  });
2257
2276
 
2258
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/singleShotGen.js
2277
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/singleShotGen.js
2259
2278
  var SingleShotGen2 = class _SingleShotGen {
2260
2279
  self;
2261
2280
  called = false;
@@ -2285,7 +2304,7 @@ var SingleShotGen2 = class _SingleShotGen {
2285
2304
  }
2286
2305
  };
2287
2306
 
2288
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/internal/core.js
2307
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/internal/core.js
2289
2308
  var EffectTypeId2 = /* @__PURE__ */ Symbol.for("effect/Effect");
2290
2309
  var EffectPrimitive = class {
2291
2310
  _op;
@@ -2425,16 +2444,15 @@ var withFiberRuntime = (withRuntime) => {
2425
2444
  effect.effect_instruction_i0 = withRuntime;
2426
2445
  return effect;
2427
2446
  };
2428
- var spanSymbol2 = /* @__PURE__ */ Symbol.for("effect/SpanAnnotation");
2429
2447
  var originalSymbol = /* @__PURE__ */ Symbol.for("effect/OriginalAnnotation");
2430
2448
  var capture = (obj, span) => {
2431
2449
  if (isSome2(span)) {
2432
2450
  return new Proxy(obj, {
2433
2451
  has(target, p) {
2434
- return p === spanSymbol2 || p === originalSymbol || p in target;
2452
+ return p === spanSymbol || p === originalSymbol || p in target;
2435
2453
  },
2436
2454
  get(target, p) {
2437
- if (p === spanSymbol2) {
2455
+ if (p === spanSymbol) {
2438
2456
  return span.value;
2439
2457
  }
2440
2458
  if (p === originalSymbol) {
@@ -2446,7 +2464,7 @@ var capture = (obj, span) => {
2446
2464
  }
2447
2465
  return obj;
2448
2466
  };
2449
- var fail2 = (error) => isObject(error) && !(spanSymbol2 in error) ? withFiberRuntime((fiber) => failCause(fail(capture(error, currentSpanFromFiber(fiber))))) : failCause(fail(error));
2467
+ var fail2 = (error) => isObject(error) && !(spanSymbol in error) ? withFiberRuntime((fiber) => failCause(fail(capture(error, currentSpanFromFiber(fiber))))) : failCause(fail(error));
2450
2468
  var failCause = (cause) => {
2451
2469
  const effect = new EffectPrimitiveFailure(OP_FAILURE);
2452
2470
  effect.effect_instruction_i0 = cause;
@@ -2506,9 +2524,12 @@ var YieldableError = /* @__PURE__ */ function() {
2506
2524
  return fail2(this);
2507
2525
  }
2508
2526
  toJSON() {
2509
- return {
2527
+ const obj = {
2510
2528
  ...this
2511
2529
  };
2530
+ if (this.message) obj.message = this.message;
2531
+ if (this.cause) obj.cause = this.cause;
2532
+ return obj;
2512
2533
  }
2513
2534
  [NodeInspectSymbol]() {
2514
2535
  if (this.toString !== globalThis.Error.prototype.toString) {
@@ -2567,7 +2588,7 @@ var currentSpanFromFiber = (fiber) => {
2567
2588
  return span !== void 0 && span._tag === "Span" ? some2(span) : none2();
2568
2589
  };
2569
2590
 
2570
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Data.js
2591
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Data.js
2571
2592
  var Class2 = Structural;
2572
2593
  var TaggedClass = (tag) => {
2573
2594
  class Base2 extends Class2 {
@@ -2577,34 +2598,38 @@ var TaggedClass = (tag) => {
2577
2598
  };
2578
2599
  var Error2 = /* @__PURE__ */ function() {
2579
2600
  const plainArgsSymbol = /* @__PURE__ */ Symbol.for("effect/Data/Error/plainArgs");
2580
- return class Base extends YieldableError {
2581
- constructor(args2) {
2582
- super(args2?.message, args2?.cause ? {
2583
- cause: args2.cause
2584
- } : void 0);
2585
- if (args2) {
2586
- Object.assign(this, args2);
2587
- Object.defineProperty(this, plainArgsSymbol, {
2588
- value: args2,
2589
- enumerable: false
2590
- });
2601
+ const O = {
2602
+ BaseEffectError: class extends YieldableError {
2603
+ constructor(args2) {
2604
+ super(args2?.message, args2?.cause ? {
2605
+ cause: args2.cause
2606
+ } : void 0);
2607
+ if (args2) {
2608
+ Object.assign(this, args2);
2609
+ Object.defineProperty(this, plainArgsSymbol, {
2610
+ value: args2,
2611
+ enumerable: false
2612
+ });
2613
+ }
2614
+ }
2615
+ toJSON() {
2616
+ return {
2617
+ ...this[plainArgsSymbol],
2618
+ ...this
2619
+ };
2591
2620
  }
2592
- }
2593
- toJSON() {
2594
- return {
2595
- ...this[plainArgsSymbol],
2596
- ...this
2597
- };
2598
2621
  }
2599
2622
  };
2623
+ return O.BaseEffectError;
2600
2624
  }();
2601
2625
  var TaggedError = (tag) => {
2602
- class Base2 extends Error2 {
2603
- _tag = tag;
2604
- }
2605
- ;
2606
- Base2.prototype.name = tag;
2607
- return Base2;
2626
+ const O = {
2627
+ BaseEffectError: class extends Error2 {
2628
+ _tag = tag;
2629
+ }
2630
+ };
2631
+ O.BaseEffectError.prototype.name = tag;
2632
+ return O.BaseEffectError;
2608
2633
  };
2609
2634
 
2610
2635
  // src/internal/bot-response.ts
@@ -2635,10 +2660,10 @@ var createBotContext = (update) => {
2635
2660
  };
2636
2661
  };
2637
2662
 
2638
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Effectable.js
2663
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Effectable.js
2639
2664
  var EffectPrototype2 = EffectPrototype;
2640
2665
 
2641
- // ../../node_modules/.pnpm/effect@3.12.0/node_modules/effect/dist/esm/Micro.js
2666
+ // ../../node_modules/.pnpm/effect@3.19.13/node_modules/effect/dist/esm/Micro.js
2642
2667
  var TypeId5 = /* @__PURE__ */ Symbol.for("effect/Micro");
2643
2668
  var MicroExitTypeId = /* @__PURE__ */ Symbol.for("effect/Micro/MicroExit");
2644
2669
  var isMicro = (u) => typeof u === "object" && u !== null && TypeId5 in u;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-ak/tg-bot",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "type": "module",
5
5
  "description": "Telegram Bot runner",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/effect-ak/tg-bot-client",
13
+ "url": "https://github.com/kondaurovDev/tg-bot-client",
14
14
  "directory": "packages/bot"
15
15
  },
16
16
  "bugs": {
@@ -34,8 +34,8 @@
34
34
  "dist/*.d.ts"
35
35
  ],
36
36
  "dependencies": {
37
- "@effect-ak/tg-bot-client": "^1.3.1",
38
- "@effect-ak/tg-bot-api": "^1.0.0"
37
+ "@effect-ak/tg-bot-client": "^1.3.4",
38
+ "@effect-ak/tg-bot-api": "^1.3.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "effect": "^3.12.7"