@gbozee/ultimate 0.0.2-121 → 0.0.2-123

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.
package/dist/index.js CHANGED
@@ -229,7 +229,8 @@ var init_errors = __esm(() => {
229
229
 
230
230
  // node_modules/jose/dist/node/esm/runtime/random.js
231
231
  import { randomFillSync } from "node:crypto";
232
- var init_random = () => {};
232
+ var init_random = () => {
233
+ };
233
234
 
234
235
  // node_modules/jose/dist/node/esm/lib/iv.js
235
236
  function bitLength(alg) {
@@ -270,7 +271,8 @@ var init_check_iv_length = __esm(() => {
270
271
  // node_modules/jose/dist/node/esm/runtime/is_key_object.js
271
272
  import * as util2 from "node:util";
272
273
  var is_key_object_default = (obj) => util2.types.isKeyObject(obj);
273
- var init_is_key_object = () => {};
274
+ var init_is_key_object = () => {
275
+ };
274
276
 
275
277
  // node_modules/jose/dist/node/esm/runtime/check_cek_length.js
276
278
  var checkCekLength = (enc, cek) => {
@@ -532,7 +534,8 @@ var ciphers, ciphers_default = (algorithm) => {
532
534
  ciphers ||= new Set(getCiphers());
533
535
  return ciphers.has(algorithm);
534
536
  };
535
- var init_ciphers = () => {};
537
+ var init_ciphers = () => {
538
+ };
536
539
 
537
540
  // node_modules/jose/dist/node/esm/runtime/is_key_like.js
538
541
  var is_key_like_default = (key) => is_key_object_default(key) || isCryptoKey(key), types3;
@@ -563,7 +566,8 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
563
566
  let macCheckPassed;
564
567
  try {
565
568
  macCheckPassed = timing_safe_equal_default(tag, expectedTag);
566
- } catch {}
569
+ } catch {
570
+ }
567
571
  if (!macCheckPassed) {
568
572
  throw new JWEDecryptionFailed;
569
573
  }
@@ -571,7 +575,8 @@ function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
571
575
  try {
572
576
  const decipher = createDecipheriv(algorithm, encKey, iv);
573
577
  plaintext = concat(decipher.update(ciphertext), decipher.final());
574
- } catch {}
578
+ } catch {
579
+ }
575
580
  if (!plaintext) {
576
581
  throw new JWEDecryptionFailed;
577
582
  }
@@ -749,7 +754,8 @@ function isPublicJWK(key) {
749
754
  function isSecretJWK(key) {
750
755
  return isJWK(key) && key.kty === "oct" && typeof key.k === "string";
751
756
  }
752
- var init_is_jwk = () => {};
757
+ var init_is_jwk = () => {
758
+ };
753
759
 
754
760
  // node_modules/jose/dist/node/esm/runtime/get_named_curve.js
755
761
  import { KeyObject as KeyObject3 } from "node:crypto";
@@ -932,12 +938,14 @@ var check_key_length_default = (key, alg) => {
932
938
  } else {
933
939
  modulusLength = Buffer.from(key.n, "base64url").byteLength << 3;
934
940
  }
935
- } catch {}
941
+ } catch {
942
+ }
936
943
  if (typeof modulusLength !== "number" || modulusLength < 2048) {
937
944
  throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
938
945
  }
939
946
  };
940
- var init_check_key_length = () => {};
947
+ var init_check_key_length = () => {
948
+ };
941
949
 
942
950
  // node_modules/jose/dist/node/esm/runtime/rsaes.js
943
951
  import { KeyObject as KeyObject7, publicEncrypt, constants, privateDecrypt } from "node:crypto";
@@ -1691,7 +1699,8 @@ async function generalDecrypt(jwe, key, options) {
1691
1699
  tag: jwe.tag,
1692
1700
  unprotected: jwe.unprotected
1693
1701
  }, key, options);
1694
- } catch {}
1702
+ } catch {
1703
+ }
1695
1704
  }
1696
1705
  throw new JWEDecryptionFailed;
1697
1706
  }
@@ -2576,7 +2585,8 @@ async function generalVerify(jws, key, options) {
2576
2585
  protected: signature.protected,
2577
2586
  signature: signature.signature
2578
2587
  }, key, options);
2579
- } catch {}
2588
+ } catch {
2589
+ }
2580
2590
  }
2581
2591
  throw new JWSSignatureVerificationFailed;
2582
2592
  }
@@ -2659,7 +2669,8 @@ var normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, ""),
2659
2669
  let payload;
2660
2670
  try {
2661
2671
  payload = JSON.parse(decoder.decode(encodedPayload));
2662
- } catch {}
2672
+ } catch {
2673
+ }
2663
2674
  if (!isObject(payload)) {
2664
2675
  throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
2665
2676
  }
@@ -3344,7 +3355,8 @@ class LocalJWKSet {
3344
3355
  for (const jwk2 of candidates) {
3345
3356
  try {
3346
3357
  yield await importWithAlgCache(_cached, jwk2, alg);
3347
- } catch {}
3358
+ } catch {
3359
+ }
3348
3360
  }
3349
3361
  };
3350
3362
  throw error;
@@ -3891,7 +3903,8 @@ var require_util = __commonJS((exports) => {
3891
3903
  var util4;
3892
3904
  (function(util5) {
3893
3905
  util5.assertEqual = (val) => val;
3894
- function assertIs(_arg) {}
3906
+ function assertIs(_arg) {
3907
+ }
3895
3908
  util5.assertIs = assertIs;
3896
3909
  function assertNever(_x) {
3897
3910
  throw new Error;
@@ -6307,7 +6320,8 @@ var require_types = __commonJS((exports) => {
6307
6320
  });
6308
6321
  status.dirty();
6309
6322
  }
6310
- } else if (unknownKeys === "strip") {} else {
6323
+ } else if (unknownKeys === "strip") {
6324
+ } else {
6311
6325
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
6312
6326
  }
6313
6327
  } else {
@@ -8459,7 +8473,8 @@ var require_logLevelLogger = __commonJS((exports) => {
8459
8473
  if (typeof theFunc === "function" && maxLevel >= theLevel) {
8460
8474
  return theFunc.bind(logger);
8461
8475
  }
8462
- return function() {};
8476
+ return function() {
8477
+ };
8463
8478
  }
8464
8479
  return {
8465
8480
  error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
@@ -8684,7 +8699,8 @@ var require_NoopMeter = __commonJS((exports) => {
8684
8699
  exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
8685
8700
 
8686
8701
  class NoopMeter {
8687
- constructor() {}
8702
+ constructor() {
8703
+ }
8688
8704
  createGauge(_name, _options) {
8689
8705
  return exports.NOOP_GAUGE_METRIC;
8690
8706
  }
@@ -8706,8 +8722,10 @@ var require_NoopMeter = __commonJS((exports) => {
8706
8722
  createObservableUpDownCounter(_name, _options) {
8707
8723
  return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
8708
8724
  }
8709
- addBatchObservableCallback(_callback, _observables) {}
8710
- removeBatchObservableCallback(_callback) {}
8725
+ addBatchObservableCallback(_callback, _observables) {
8726
+ }
8727
+ removeBatchObservableCallback(_callback) {
8728
+ }
8711
8729
  }
8712
8730
  exports.NoopMeter = NoopMeter;
8713
8731
 
@@ -8716,28 +8734,34 @@ var require_NoopMeter = __commonJS((exports) => {
8716
8734
  exports.NoopMetric = NoopMetric;
8717
8735
 
8718
8736
  class NoopCounterMetric extends NoopMetric {
8719
- add(_value, _attributes) {}
8737
+ add(_value, _attributes) {
8738
+ }
8720
8739
  }
8721
8740
  exports.NoopCounterMetric = NoopCounterMetric;
8722
8741
 
8723
8742
  class NoopUpDownCounterMetric extends NoopMetric {
8724
- add(_value, _attributes) {}
8743
+ add(_value, _attributes) {
8744
+ }
8725
8745
  }
8726
8746
  exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
8727
8747
 
8728
8748
  class NoopGaugeMetric extends NoopMetric {
8729
- record(_value, _attributes) {}
8749
+ record(_value, _attributes) {
8750
+ }
8730
8751
  }
8731
8752
  exports.NoopGaugeMetric = NoopGaugeMetric;
8732
8753
 
8733
8754
  class NoopHistogramMetric extends NoopMetric {
8734
- record(_value, _attributes) {}
8755
+ record(_value, _attributes) {
8756
+ }
8735
8757
  }
8736
8758
  exports.NoopHistogramMetric = NoopHistogramMetric;
8737
8759
 
8738
8760
  class NoopObservableMetric {
8739
- addCallback(_callback) {}
8740
- removeCallback(_callback) {}
8761
+ addCallback(_callback) {
8762
+ }
8763
+ removeCallback(_callback) {
8764
+ }
8741
8765
  }
8742
8766
  exports.NoopObservableMetric = NoopObservableMetric;
8743
8767
 
@@ -8842,7 +8866,8 @@ var require_context2 = __commonJS((exports) => {
8842
8866
  var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
8843
8867
 
8844
8868
  class ContextAPI {
8845
- constructor() {}
8869
+ constructor() {
8870
+ }
8846
8871
  static getInstance() {
8847
8872
  if (!this._instance) {
8848
8873
  this._instance = new ContextAPI;
@@ -8931,11 +8956,13 @@ var require_NonRecordingSpan = __commonJS((exports) => {
8931
8956
  updateName(_name) {
8932
8957
  return this;
8933
8958
  }
8934
- end(_endTime) {}
8959
+ end(_endTime) {
8960
+ }
8935
8961
  isRecording() {
8936
8962
  return false;
8937
8963
  }
8938
- recordException(_exception, _time) {}
8964
+ recordException(_exception, _time) {
8965
+ }
8939
8966
  }
8940
8967
  exports.NonRecordingSpan = NonRecordingSpan;
8941
8968
  });
@@ -9237,7 +9264,8 @@ var require_tracestate_impl = __commonJS((exports) => {
9237
9264
  const value = listMember.slice(i + 1, part.length);
9238
9265
  if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
9239
9266
  agg.set(key, value);
9240
- } else {}
9267
+ } else {
9268
+ }
9241
9269
  }
9242
9270
  return agg;
9243
9271
  }, new Map);
@@ -9309,7 +9337,8 @@ var require_metrics = __commonJS((exports) => {
9309
9337
  var API_NAME2 = "metrics";
9310
9338
 
9311
9339
  class MetricsAPI {
9312
- constructor() {}
9340
+ constructor() {
9341
+ }
9313
9342
  static getInstance() {
9314
9343
  if (!this._instance) {
9315
9344
  this._instance = new MetricsAPI;
@@ -9346,7 +9375,8 @@ var require_NoopTextMapPropagator = __commonJS((exports) => {
9346
9375
  exports.NoopTextMapPropagator = undefined;
9347
9376
 
9348
9377
  class NoopTextMapPropagator {
9349
- inject(_context, _carrier) {}
9378
+ inject(_context, _carrier) {
9379
+ }
9350
9380
  extract(context, _carrier) {
9351
9381
  return context;
9352
9382
  }
@@ -9659,7 +9689,8 @@ class Registry {
9659
9689
  return this.kv.getByKey(identifier);
9660
9690
  }
9661
9691
  }
9662
- var init_registry = () => {};
9692
+ var init_registry = () => {
9693
+ };
9663
9694
 
9664
9695
  // node_modules/superjson/dist/class-registry.js
9665
9696
  var ClassRegistry;
@@ -9744,7 +9775,8 @@ class CustomTransformerRegistry {
9744
9775
  return this.transfomers[name2];
9745
9776
  }
9746
9777
  }
9747
- var init_custom_transformer_registry = () => {};
9778
+ var init_custom_transformer_registry = () => {
9779
+ };
9748
9780
 
9749
9781
  // node_modules/superjson/dist/is.js
9750
9782
  var getType = (payload) => Object.prototype.toString.call(payload).slice(8, -1), isUndefined = (payload) => typeof payload === "undefined", isNull = (payload) => payload === null, isPlainObject = (payload) => {
@@ -10089,7 +10121,8 @@ var getNthKey = (value, n) => {
10089
10121
  }
10090
10122
  return object;
10091
10123
  };
10092
- var init_accessDeep = () => {};
10124
+ var init_accessDeep = () => {
10125
+ };
10093
10126
 
10094
10127
  // node_modules/superjson/dist/plainer.js
10095
10128
  function traverse(tree, walker, origin = []) {
@@ -10678,7 +10711,8 @@ var require_NoopLogger = __commonJS((exports) => {
10678
10711
  exports.NOOP_LOGGER = exports.NoopLogger = undefined;
10679
10712
 
10680
10713
  class NoopLogger {
10681
- emit(_logRecord) {}
10714
+ emit(_logRecord) {
10715
+ }
10682
10716
  }
10683
10717
  exports.NoopLogger = NoopLogger;
10684
10718
  exports.NOOP_LOGGER = new NoopLogger;
@@ -10772,7 +10806,8 @@ var require_logs = __commonJS((exports) => {
10772
10806
  var NoopLoggerProvider_1 = require_NoopLoggerProvider();
10773
10807
 
10774
10808
  class LogsAPI {
10775
- constructor() {}
10809
+ constructor() {
10810
+ }
10776
10811
  static getInstance() {
10777
10812
  if (!this._instance) {
10778
10813
  this._instance = new LogsAPI;
@@ -11240,7 +11275,8 @@ var require_browser = __commonJS((exports, module) => {
11240
11275
  });
11241
11276
  args.splice(lastC, 0, c);
11242
11277
  }
11243
- exports.log = console.debug || console.log || (() => {});
11278
+ exports.log = console.debug || console.log || (() => {
11279
+ });
11244
11280
  function save(namespaces) {
11245
11281
  try {
11246
11282
  if (namespaces) {
@@ -11248,13 +11284,15 @@ var require_browser = __commonJS((exports, module) => {
11248
11284
  } else {
11249
11285
  exports.storage.removeItem("debug");
11250
11286
  }
11251
- } catch (error) {}
11287
+ } catch (error) {
11288
+ }
11252
11289
  }
11253
11290
  function load() {
11254
11291
  let r;
11255
11292
  try {
11256
11293
  r = exports.storage.getItem("debug");
11257
- } catch (error) {}
11294
+ } catch (error) {
11295
+ }
11258
11296
  if (!r && typeof process !== "undefined" && "env" in process) {
11259
11297
  r = process.env.DEBUG;
11260
11298
  }
@@ -11263,7 +11301,8 @@ var require_browser = __commonJS((exports, module) => {
11263
11301
  function localstorage() {
11264
11302
  try {
11265
11303
  return localStorage;
11266
- } catch (error) {}
11304
+ } catch (error) {
11305
+ }
11267
11306
  }
11268
11307
  module.exports = require_common()(exports);
11269
11308
  var { formatters } = module.exports;
@@ -11395,7 +11434,8 @@ var require_node3 = __commonJS((exports, module) => {
11395
11434
  exports.save = save;
11396
11435
  exports.load = load;
11397
11436
  exports.useColors = useColors;
11398
- exports.destroy = util4.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
11437
+ exports.destroy = util4.deprecate(() => {
11438
+ }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
11399
11439
  exports.colors = [6, 2, 3, 4, 5, 1];
11400
11440
  try {
11401
11441
  const supportsColor = require_supports_color();
@@ -11479,7 +11519,8 @@ var require_node3 = __commonJS((exports, module) => {
11479
11519
  221
11480
11520
  ];
11481
11521
  }
11482
- } catch (error) {}
11522
+ } catch (error) {
11523
+ }
11483
11524
  exports.inspectOpts = Object.keys(process.env).filter((key) => {
11484
11525
  return /^debug_/i.test(key);
11485
11526
  }).reduce((obj, key) => {
@@ -13728,7 +13769,8 @@ var require_jsbn = __commonJS((exports, module) => {
13728
13769
  ++this[w];
13729
13770
  }
13730
13771
  }
13731
- function NullExp() {}
13772
+ function NullExp() {
13773
+ }
13732
13774
  function nNop(x) {
13733
13775
  return x;
13734
13776
  }
@@ -14153,7 +14195,8 @@ var require_jsbn = __commonJS((exports, module) => {
14153
14195
  for (i2 = 0;i2 < ba.length; ++i2)
14154
14196
  ba[i2] = rng_get_byte();
14155
14197
  }
14156
- function SecureRandom() {}
14198
+ function SecureRandom() {
14199
+ }
14157
14200
  SecureRandom.prototype.nextBytes = rng_get_bytes;
14158
14201
  function Arcfour() {
14159
14202
  this.i = 0;
@@ -16376,7 +16419,8 @@ var require_delayed_stream = __commonJS((exports, module) => {
16376
16419
  delayedStream._handleEmit(arguments);
16377
16420
  return realEmit.apply(source, arguments);
16378
16421
  };
16379
- source.on("error", function() {});
16422
+ source.on("error", function() {
16423
+ });
16380
16424
  if (delayedStream.pauseStream) {
16381
16425
  source.pause();
16382
16426
  }
@@ -25680,7 +25724,8 @@ var require_implementation = __commonJS((exports, module) => {
25680
25724
  }
25681
25725
  bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
25682
25726
  if (target.prototype) {
25683
- var Empty = function Empty() {};
25727
+ var Empty = function Empty() {
25728
+ };
25684
25729
  Empty.prototype = target.prototype;
25685
25730
  bound.prototype = new Empty;
25686
25731
  Empty.prototype = null;
@@ -25800,7 +25845,8 @@ var require_get_intrinsic = __commonJS((exports, module) => {
25800
25845
  var getEvalledConstructor = function(expressionSyntax) {
25801
25846
  try {
25802
25847
  return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
25803
- } catch (e2) {}
25848
+ } catch (e2) {
25849
+ }
25804
25850
  };
25805
25851
  var $gOPD = require_gopd();
25806
25852
  var $defineProperty = require_es_define_property();
@@ -26539,9 +26585,11 @@ var require_debug = __commonJS((exports, module) => {
26539
26585
  if (!debug) {
26540
26586
  try {
26541
26587
  debug = require_src4()("follow-redirects");
26542
- } catch (error) {}
26588
+ } catch (error) {
26589
+ }
26543
26590
  if (typeof debug !== "function") {
26544
- debug = function() {};
26591
+ debug = function() {
26592
+ };
26545
26593
  }
26546
26594
  }
26547
26595
  debug.apply(null, arguments);
@@ -26916,7 +26964,8 @@ var require_follow_redirects = __commonJS((exports, module) => {
26916
26964
  });
26917
26965
  return exports2;
26918
26966
  }
26919
- function noop2() {}
26967
+ function noop2() {
26968
+ }
26920
26969
  function parseUrl(input) {
26921
26970
  var parsed;
26922
26971
  if (useNativeURL) {
@@ -27299,7 +27348,8 @@ var require_axios = __commonJS((exports, module) => {
27299
27348
  isArray3(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
27300
27349
  return obj;
27301
27350
  };
27302
- var noop2 = () => {};
27351
+ var noop2 = () => {
27352
+ };
27303
27353
  var toFiniteNumber = (value2, defaultValue) => {
27304
27354
  return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
27305
27355
  };
@@ -28752,7 +28802,8 @@ var require_axios = __commonJS((exports, module) => {
28752
28802
  try {
28753
28803
  const knownLength = await util__default["default"].promisify(data.getLength).call(data);
28754
28804
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
28755
- } catch (e2) {}
28805
+ } catch (e2) {
28806
+ }
28756
28807
  }
28757
28808
  } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
28758
28809
  data.size && headers.setContentType(data.type || "application/octet-stream");
@@ -29026,11 +29077,13 @@ var require_axios = __commonJS((exports, module) => {
29026
29077
  this.write(name2, "", Date.now() - 86400000);
29027
29078
  }
29028
29079
  } : {
29029
- write() {},
29080
+ write() {
29081
+ },
29030
29082
  read() {
29031
29083
  return null;
29032
29084
  },
29033
- remove() {}
29085
+ remove() {
29086
+ }
29034
29087
  };
29035
29088
  var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
29036
29089
  function mergeConfig(config1, config2) {
@@ -29524,7 +29577,8 @@ var require_axios = __commonJS((exports, module) => {
29524
29577
  if (fn) {
29525
29578
  try {
29526
29579
  Object.defineProperty(fn, "name", { value: value2 });
29527
- } catch (e2) {}
29580
+ } catch (e2) {
29581
+ }
29528
29582
  Object.defineProperty(fn, "adapterName", { value: value2 });
29529
29583
  }
29530
29584
  });
@@ -29674,7 +29728,8 @@ var require_axios = __commonJS((exports, module) => {
29674
29728
  err.stack += `
29675
29729
  ` + stack;
29676
29730
  }
29677
- } catch (e2) {}
29731
+ } catch (e2) {
29732
+ }
29678
29733
  }
29679
29734
  throw err;
29680
29735
  }
@@ -31747,7 +31802,8 @@ var require_logger = __commonJS((exports) => {
31747
31802
  Object.defineProperty(exports, "__esModule", { value: true });
31748
31803
  exports.DefaultLogger = undefined;
31749
31804
  exports.DefaultLogger = {
31750
- silly: (...params) => {},
31805
+ silly: (...params) => {
31806
+ },
31751
31807
  debug: (...params) => {
31752
31808
  console.log(new Date, params);
31753
31809
  },
@@ -34490,7 +34546,8 @@ var require_constants4 = __commonJS((exports, module) => {
34490
34546
  kListener: Symbol("kListener"),
34491
34547
  kStatusCode: Symbol("status-code"),
34492
34548
  kWebSocket: Symbol("websocket"),
34493
- NOOP: () => {}
34549
+ NOOP: () => {
34550
+ }
34494
34551
  };
34495
34552
  });
34496
34553
 
@@ -34568,7 +34625,8 @@ var require_buffer_util = __commonJS((exports, module) => {
34568
34625
  else
34569
34626
  bufferUtil.unmask(buffer, mask);
34570
34627
  };
34571
- } catch (e2) {}
34628
+ } catch (e2) {
34629
+ }
34572
34630
  }
34573
34631
  });
34574
34632
 
@@ -35047,7 +35105,8 @@ var require_validation = __commonJS((exports, module) => {
35047
35105
  module.exports.isValidUTF8 = function(buf) {
35048
35106
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
35049
35107
  };
35050
- } catch (e2) {}
35108
+ } catch (e2) {
35109
+ }
35051
35110
  }
35052
35111
  });
35053
35112
 
@@ -37472,7 +37531,8 @@ var require_websocket_client = __commonJS((exports) => {
37472
37531
  this.options = Object.assign({ pongTimeout: 7500, pingInterval: 1e4, reconnectTimeout: 500 }, options);
37473
37532
  this.listenKeyStateStore = {};
37474
37533
  this.wsUrlKeyMap = {};
37475
- this.on("error", () => {});
37534
+ this.on("error", () => {
37535
+ });
37476
37536
  }
37477
37537
  getRestClientOptions() {
37478
37538
  return Object.assign(Object.assign(Object.assign({}, this.options), this.options.restOptions), { api_key: this.options.api_key, api_secret: this.options.api_secret });
@@ -38946,7 +39006,8 @@ var require_logger2 = __commonJS((exports) => {
38946
39006
  Object.defineProperty(exports, "__esModule", { value: true });
38947
39007
  exports.DefaultLogger = undefined;
38948
39008
  exports.DefaultLogger = {
38949
- trace: (..._params) => {},
39009
+ trace: (..._params) => {
39010
+ },
38950
39011
  info: (...params) => {
38951
39012
  console.info(params);
38952
39013
  },
@@ -40992,7 +41053,8 @@ var require_BaseWSClient = __commonJS((exports) => {
40992
41053
  if (wsState === null || wsState === undefined ? undefined : wsState.activePongTimer) {
40993
41054
  clearTimeout(wsState.activePongTimer);
40994
41055
  wsState.activePongTimer = undefined;
40995
- } else {}
41056
+ } else {
41057
+ }
40996
41058
  }
40997
41059
  clearReconnectTimer(wsKey) {
40998
41060
  const wsState = this.wsStore.get(wsKey);
@@ -41872,7 +41934,8 @@ __export(exports_app, {
41872
41934
  var util;
41873
41935
  (function(util2) {
41874
41936
  util2.assertEqual = (val) => val;
41875
- function assertIs(_arg) {}
41937
+ function assertIs(_arg) {
41938
+ }
41876
41939
  util2.assertIs = assertIs;
41877
41940
  function assertNever(_x) {
41878
41941
  throw new Error;
@@ -46733,7 +46796,8 @@ var API_NAME = "task-context";
46733
46796
 
46734
46797
  class TaskContextAPI {
46735
46798
  static _instance;
46736
- constructor() {}
46799
+ constructor() {
46800
+ }
46737
46801
  static getInstance() {
46738
46802
  if (!this._instance) {
46739
46803
  this._instance = new TaskContextAPI;
@@ -47153,7 +47217,8 @@ class ParseError extends Error {
47153
47217
  super(message2), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
47154
47218
  }
47155
47219
  }
47156
- function noop(_arg) {}
47220
+ function noop(_arg) {
47221
+ }
47157
47222
  function createParser(callbacks) {
47158
47223
  if (typeof callbacks == "function")
47159
47224
  throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
@@ -47356,7 +47421,8 @@ async function _doZodFetchWithRetries(schema, url, requestInit, options, attempt
47356
47421
  if (error instanceof ApiError) {
47357
47422
  throw error;
47358
47423
  }
47359
- if (error instanceof import_zod_validation_error.ValidationError) {}
47424
+ if (error instanceof import_zod_validation_error.ValidationError) {
47425
+ }
47360
47426
  if (options?.retry) {
47361
47427
  const retry = { ...defaultRetryOptions2, ...options.retry };
47362
47428
  const delay = calculateNextRetryDelay(retry, attempt);
@@ -47830,7 +47896,8 @@ class ApiClientMissingError extends Error {
47830
47896
 
47831
47897
  class APIClientManagerAPI {
47832
47898
  static _instance;
47833
- constructor() {}
47899
+ constructor() {
47900
+ }
47834
47901
  static getInstance() {
47835
47902
  if (!this._instance) {
47836
47903
  this._instance = new APIClientManagerAPI;
@@ -48385,7 +48452,8 @@ var PrefetchQueue = class {
48385
48452
  if (__privateGet(this, _queueTailUrl) && !__privateGet(this, _prefetchQueue).has(__privateGet(this, _queueTailUrl))) {
48386
48453
  __privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, __privateGet(this, _queueTailUrl), args[1]);
48387
48454
  }
48388
- }).catch(() => {});
48455
+ }).catch(() => {
48456
+ });
48389
48457
  return request;
48390
48458
  }
48391
48459
  };
@@ -48416,8 +48484,10 @@ prefetch_fn = function(...args) {
48416
48484
  }
48417
48485
  __privateSet(this, _queueTailUrl, nextUrl);
48418
48486
  return __privateMethod(this, _PrefetchQueue_instances, prefetch_fn).call(this, nextUrl, args[1]);
48419
- }).catch(() => {});
48420
- } catch (_) {}
48487
+ }).catch(() => {
48488
+ });
48489
+ } catch (_) {
48490
+ }
48421
48491
  };
48422
48492
  function getNextChunkUrl(url, res) {
48423
48493
  const shapeHandle = res.headers.get(SHAPE_HANDLE_HEADER);
@@ -48520,7 +48590,8 @@ var ShapeStream = class {
48520
48590
  get lastOffset() {
48521
48591
  return __privateGet(this, _lastOffset);
48522
48592
  }
48523
- subscribe(callback, onError = () => {}) {
48593
+ subscribe(callback, onError = () => {
48594
+ }) {
48524
48595
  const subscriptionId = Math.random();
48525
48596
  __privateGet(this, _subscribers).set(subscriptionId, [callback, onError]);
48526
48597
  return () => {
@@ -49714,7 +49785,8 @@ class SimpleClock {
49714
49785
  const nowStruct = now.toStruct();
49715
49786
  return [nowStruct.seconds, nowStruct.nanos];
49716
49787
  }
49717
- reset() {}
49788
+ reset() {
49789
+ }
49718
49790
  }
49719
49791
 
49720
49792
  // node_modules/@trigger.dev/core/dist/esm/v3/clock/index.js
@@ -49723,7 +49795,8 @@ var SIMPLE_CLOCK = new SimpleClock;
49723
49795
 
49724
49796
  class ClockAPI {
49725
49797
  static _instance;
49726
- constructor() {}
49798
+ constructor() {
49799
+ }
49727
49800
  static getInstance() {
49728
49801
  if (!this._instance) {
49729
49802
  this._instance = new ClockAPI;
@@ -49749,7 +49822,8 @@ var clock = ClockAPI.getInstance();
49749
49822
 
49750
49823
  // node_modules/@trigger.dev/core/dist/esm/v3/usage/noopUsageManager.js
49751
49824
  class NoopUsageManager {
49752
- disable() {}
49825
+ disable() {
49826
+ }
49753
49827
  start() {
49754
49828
  return {
49755
49829
  sample: () => ({ cpuTime: 0, wallTime: 0 })
@@ -49772,7 +49846,8 @@ var NOOP_USAGE_MANAGER = new NoopUsageManager;
49772
49846
 
49773
49847
  class UsageAPI {
49774
49848
  static _instance;
49775
- constructor() {}
49849
+ constructor() {
49850
+ }
49776
49851
  static getInstance() {
49777
49852
  if (!this._instance) {
49778
49853
  this._instance = new UsageAPI;
@@ -49832,7 +49907,8 @@ class NoopRunMetadataManager {
49832
49907
  refresh(requestOptions) {
49833
49908
  throw new Error("Method not implemented.");
49834
49909
  }
49835
- enterWithMetadata(metadata) {}
49910
+ enterWithMetadata(metadata) {
49911
+ }
49836
49912
  current() {
49837
49913
  throw new Error("Method not implemented.");
49838
49914
  }
@@ -49888,7 +49964,8 @@ var NOOP_MANAGER = new NoopRunMetadataManager;
49888
49964
 
49889
49965
  class RunMetadataAPI {
49890
49966
  static _instance;
49891
- constructor() {}
49967
+ constructor() {
49968
+ }
49892
49969
  static getInstance() {
49893
49970
  if (!this._instance) {
49894
49971
  this._instance = new RunMetadataAPI;
@@ -49973,7 +50050,8 @@ var NOOP_TIMEOUT_MANAGER = new NoopTimeoutManager;
49973
50050
 
49974
50051
  class TimeoutAPI {
49975
50052
  static _instance;
49976
- constructor() {}
50053
+ constructor() {
50054
+ }
49977
50055
  static getInstance() {
49978
50056
  if (!this._instance) {
49979
50057
  this._instance = new TimeoutAPI;
@@ -50384,7 +50462,8 @@ function getTokenPayload(e2) {
50384
50462
  return "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2);
50385
50463
  }).join(""));
50386
50464
  return JSON.parse(t2) || {};
50387
- } catch (e3) {}
50465
+ } catch (e3) {
50466
+ }
50388
50467
  return {};
50389
50468
  }
50390
50469
  function isTokenExpired(e2, t2 = 0) {
@@ -50438,7 +50517,8 @@ class BaseAuthStore {
50438
50517
  let n = {};
50439
50518
  try {
50440
50519
  n = JSON.parse(s2), (typeof n === null || typeof n != "object" || Array.isArray(n)) && (n = {});
50441
- } catch (e3) {}
50520
+ } catch (e3) {
50521
+ }
50442
50522
  this.save(n.token || "", n.record || n.model || null);
50443
50523
  }
50444
50524
  exportToCookie(e2, t2 = i) {
@@ -50585,7 +50665,8 @@ class RealtimeService extends BaseService {
50585
50665
  let i3;
50586
50666
  try {
50587
50667
  i3 = JSON.parse(s3?.data);
50588
- } catch {}
50668
+ } catch {
50669
+ }
50589
50670
  t2(i3 || {});
50590
50671
  };
50591
50672
  return this.subscriptions[i2] || (this.subscriptions[i2] = []), this.subscriptions[i2].push(listener), this.isConnected ? this.subscriptions[i2].length === 1 ? await this.submitSubscriptions() : this.eventSource?.addEventListener(i2, listener) : await this.connect(), async () => this.unsubscribeByTopicAndListener(e2, listener);
@@ -51298,7 +51379,8 @@ class Client {
51298
51379
  let s3 = {};
51299
51380
  try {
51300
51381
  s3 = await e3.json();
51301
- } catch (e4) {}
51382
+ } catch (e4) {
51383
+ }
51302
51384
  if (this.afterSend && (s3 = await this.afterSend(e3, s3, t2)), e3.status >= 400)
51303
51385
  throw new ClientResponseError({ url: e3.url, status: e3.status, data: s3 });
51304
51386
  return s3;
@@ -51839,7 +51921,7 @@ class AppDatabase {
51839
51921
  }
51840
51922
  }
51841
51923
  async cancelLimitOrders(payload) {
51842
- const { symbol, kind, account, cancelExchangeOrders } = payload;
51924
+ const { symbol, kind, account, cancelExchangeOrders, raw } = payload;
51843
51925
  const side = kind === "long" ? "buy" : "sell";
51844
51926
  const orders = await this.pb.collection("orders").getFullList({
51845
51927
  filter: `symbol:lower="${symbol.toLowerCase()}" && account.owner:lower="${account.owner.toLowerCase()}" && account.exchange:lower="${account.exchange.toLowerCase()}" && kind="${kind}" && side:lower="${side}" && stop = 0`
@@ -51849,6 +51931,9 @@ class AppDatabase {
51849
51931
  filter: `symbol:lower="${symbol.toLowerCase()}" && account.owner:lower="${account.owner.toLowerCase()}" && account.exchange:lower="${account.exchange.toLowerCase()}" && kind="${kind}" && side:lower="${stop_side}" && stop > 0`
51850
51932
  });
51851
51933
  const exchange_order_ids = orders.concat(existing_stop_orders).map((o) => account.exchange === "bybit" ? o.order_id : parseInt(o.order_id, 10));
51934
+ if (raw) {
51935
+ return exchange_order_ids;
51936
+ }
51852
51937
  try {
51853
51938
  console.log(`Attempting to cancel ${exchange_order_ids.length} orders on ${account.exchange} for ${account.owner}...`);
51854
51939
  const cancel_result = await cancelExchangeOrders({
@@ -52795,7 +52880,8 @@ class Signal {
52795
52880
  support: kind === "long" ? _stop_loss : this.support
52796
52881
  };
52797
52882
  const instance = new Signal(derivedConfig);
52798
- if (kind === "short") {}
52883
+ if (kind === "short") {
52884
+ }
52799
52885
  let result = instance.get_bulk_trade_zones({ current_price, kind });
52800
52886
  return result;
52801
52887
  return result?.filter((x) => {
@@ -53013,7 +53099,8 @@ class Signal {
53013
53099
  kind = "long",
53014
53100
  raw
53015
53101
  }) {
53016
- if (raw) {}
53102
+ if (raw) {
53103
+ }
53017
53104
  const margin_range = this.get_margin_range(current_price, kind);
53018
53105
  let margin_zones = this.get_margin_zones({ current_price });
53019
53106
  let remaining_zones = margin_zones.filter((x) => JSON.stringify(x) != JSON.stringify(margin_range));
@@ -53224,7 +53311,8 @@ class Signal {
53224
53311
  return true;
53225
53312
  });
53226
53313
  let total_orders = limit_trades.concat(market_trades);
53227
- if (kind === "short") {}
53314
+ if (kind === "short") {
53315
+ }
53228
53316
  if (this.minimum_size && total_orders.length > 0) {
53229
53317
  let payload = total_orders;
53230
53318
  let greater_than_min_size = total_orders.filter((o) => o ? o.quantity >= this.minimum_size : true);
@@ -53310,7 +53398,8 @@ class Signal {
53310
53398
  });
53311
53399
  const multiplier = start - index;
53312
53400
  const incurred_fees = fees.reduce((a, b) => a + b, 0) + previous_risks.reduce((a, b) => a + b, 0);
53313
- if (index === 0) {}
53401
+ if (index === 0) {
53402
+ }
53314
53403
  let quantity = determine_position_size2({
53315
53404
  entry,
53316
53405
  stop,
@@ -53408,7 +53497,8 @@ function buildConfig(app_config, {
53408
53497
  return [];
53409
53498
  }
53410
53499
  const condition = (kind === "long" ? entry > app_config.support : entry >= app_config.support) && stop >= app_config.support * 0.999;
53411
- if (kind === "short") {}
53500
+ if (kind === "short") {
53501
+ }
53412
53502
  const result = entry === stop ? [] : condition ? instance.build_entry({
53413
53503
  current_price: entry,
53414
53504
  stop_loss: stop,
@@ -55275,7 +55365,8 @@ async function createLimitPurchaseOrdersParallel(client, symbol, priceFormat, qu
55275
55365
  const splitOrders = (inputOrders) => {
55276
55366
  const result = [];
55277
55367
  for (const o of inputOrders) {
55278
- if (o.take_profit) {}
55368
+ if (o.take_profit) {
55369
+ }
55279
55370
  if (o.stop && !o.side) {
55280
55371
  result.push({
55281
55372
  price: o.price,
@@ -56141,6 +56232,7 @@ async function cancelOrdersParallel(payload) {
56141
56232
 
56142
56233
  // src/exchanges/bybit.ts
56143
56234
  var import_bybit_api = __toESM(require_lib3(), 1);
56235
+ var import_p_limit2 = __toESM(require_p_limit(), 1);
56144
56236
  async function initClient2(credentials, options) {
56145
56237
  const { proxyAgent } = options;
56146
56238
  try {
@@ -56168,7 +56260,8 @@ async function createLimitPurchaseOrders(client, symbol, priceFormat, quantityFo
56168
56260
  const splitOrders = (inputOrders) => {
56169
56261
  const result = [];
56170
56262
  for (const o of inputOrders) {
56171
- if (o.take_profit) {}
56263
+ if (o.take_profit) {
56264
+ }
56172
56265
  if (o.stop && !o.side) {
56173
56266
  result.push({
56174
56267
  price: o.price,
@@ -56246,14 +56339,22 @@ async function getPositionInfo2(client, symbol) {
56246
56339
  const short = result.find((x) => x.side.toLowerCase() === "sell");
56247
56340
  return { long, short };
56248
56341
  }
56342
+ var ORDERS_PER_SECONDS = 10;
56343
+ var BATCH_SIZE2 = 10;
56249
56344
  async function cancelOrders2(payload) {
56250
56345
  const client = payload.custom_client;
56251
56346
  const results = [];
56252
- for (let i2 = 0;i2 < payload.orders.length; i2 += 15) {
56253
- const batch2 = payload.orders.slice(i2, i2 + 15);
56254
- let rr = await client.batchCancelOrders("linear", batch2.map((x) => ({ orderId: x.orderId, symbol: payload.symbol })));
56347
+ const batches = [];
56348
+ for (let i2 = 0;i2 < payload.orders.length; i2 += BATCH_SIZE2) {
56349
+ batches.push(payload.orders.slice(i2, i2 + BATCH_SIZE2));
56350
+ }
56351
+ const limit = import_p_limit2.default(ORDERS_PER_SECONDS);
56352
+ for (let i2 = 0;i2 < batches.length; i2++) {
56353
+ const batch2 = batches[i2];
56354
+ let rr = await limit(async () => {
56355
+ return await client.batchCancelOrders("linear", batch2.map((x) => ({ orderId: x.orderId, symbol: payload.symbol })));
56356
+ });
56255
56357
  results.push(rr);
56256
- await new Promise((resolve) => setTimeout(resolve, 1000));
56257
56358
  }
56258
56359
  return results;
56259
56360
  }
@@ -56710,8 +56811,10 @@ class BybitExchange extends BaseExchange {
56710
56811
  sellLeverage: payload.leverage.toString()
56711
56812
  });
56712
56813
  }
56713
- async generateConfig(payload) {}
56714
- async checkDelistedMovers(payload) {}
56814
+ async generateConfig(payload) {
56815
+ }
56816
+ async checkDelistedMovers(payload) {
56817
+ }
56715
56818
  async getAllOpenOrders() {
56716
56819
  const result = await getAllOpenOrders2({ client: this.client });
56717
56820
  return result;
@@ -56722,11 +56825,13 @@ class BybitExchange extends BaseExchange {
56722
56825
  async getDelistedSpotSymbols() {
56723
56826
  return [];
56724
56827
  }
56725
- async crossAccountTransfer(payload) {}
56828
+ async crossAccountTransfer(payload) {
56829
+ }
56726
56830
  getOpenOrders(payload) {
56727
56831
  return getOpenOrders2(this.client, payload.symbol);
56728
56832
  }
56729
- async placeBadStopEntry(payload) {}
56833
+ async placeBadStopEntry(payload) {
56834
+ }
56730
56835
  }
56731
56836
 
56732
56837
  // src/helpers/accounts.ts
@@ -57665,7 +57770,7 @@ class ExchangeAccount {
57665
57770
  }
57666
57771
  }
57667
57772
  async cancelOrders(payload) {
57668
- const { symbol, kind, price: _price, all, stop, limit } = payload;
57773
+ const { symbol, kind, price: _price, all, stop, limit, raw } = payload;
57669
57774
  let price = _price || 0;
57670
57775
  await this.syncAccount({
57671
57776
  symbol,
@@ -57674,13 +57779,15 @@ class ExchangeAccount {
57674
57779
  });
57675
57780
  if (limit) {
57676
57781
  return await this.app_db.cancelLimitOrders({
57782
+ raw,
57677
57783
  symbol,
57678
57784
  kind,
57679
57785
  account: this.instance,
57680
57786
  cancelExchangeOrders: this.cancelExchangeOrders.bind(this)
57681
57787
  });
57682
57788
  }
57683
- if (all) {} else {
57789
+ if (all) {
57790
+ } else {
57684
57791
  if (!price) {
57685
57792
  const position2 = await this.syncAccount({
57686
57793
  symbol,