@ledgerhq/ledger-wallet-provider-core 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +280 -280
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12102,7 +12102,7 @@ function QN() {
12102
12102
  }, Xy;
12103
12103
  }
12104
12104
  var Jy, v1;
12105
- function e$() {
12105
+ function e2() {
12106
12106
  if (v1) return Jy;
12107
12107
  v1 = 1;
12108
12108
  var t = /* @__PURE__ */ JE(), e = /* @__PURE__ */ QN(), r = /* @__PURE__ */ ip(), n = /* @__PURE__ */ _u(), i = t("%Map%", !0), s = e("Map.prototype.get", !0), o = e("Map.prototype.set", !0), a = e("Map.prototype.has", !0), c = e("Map.prototype.delete", !0), u = e("Map.prototype.size", !0);
@@ -12138,7 +12138,7 @@ var Qy, _1;
12138
12138
  function kH() {
12139
12139
  if (_1) return Qy;
12140
12140
  _1 = 1;
12141
- var t = /* @__PURE__ */ JE(), e = /* @__PURE__ */ QN(), r = /* @__PURE__ */ ip(), n = e$(), i = /* @__PURE__ */ _u(), s = t("%WeakMap%", !0), o = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), c = e("WeakMap.prototype.has", !0), u = e("WeakMap.prototype.delete", !0);
12141
+ var t = /* @__PURE__ */ JE(), e = /* @__PURE__ */ QN(), r = /* @__PURE__ */ ip(), n = e2(), i = /* @__PURE__ */ _u(), s = t("%WeakMap%", !0), o = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), c = e("WeakMap.prototype.has", !0), u = e("WeakMap.prototype.delete", !0);
12142
12142
  return Qy = s ? (
12143
12143
  /** @type {Exclude<import('.'), false>} */
12144
12144
  function() {
@@ -12173,7 +12173,7 @@ var em, w1;
12173
12173
  function RH() {
12174
12174
  if (w1) return em;
12175
12175
  w1 = 1;
12176
- var t = /* @__PURE__ */ _u(), e = /* @__PURE__ */ ip(), r = sH(), n = e$(), i = kH(), s = i || n || r;
12176
+ var t = /* @__PURE__ */ _u(), e = /* @__PURE__ */ ip(), r = sH(), n = e2(), i = kH(), s = i || n || r;
12177
12177
  return em = function() {
12178
12178
  var a, c = {
12179
12179
  assert: function(u) {
@@ -12219,7 +12219,7 @@ function QE() {
12219
12219
  }, tm;
12220
12220
  }
12221
12221
  var rm, b1;
12222
- function t$() {
12222
+ function t2() {
12223
12223
  if (b1) return rm;
12224
12224
  b1 = 1;
12225
12225
  var t = /* @__PURE__ */ QE(), e = Object.prototype.hasOwnProperty, r = Array.isArray, n = function() {
@@ -12347,7 +12347,7 @@ var nm, E1;
12347
12347
  function PH() {
12348
12348
  if (E1) return nm;
12349
12349
  E1 = 1;
12350
- var t = RH(), e = /* @__PURE__ */ t$(), r = /* @__PURE__ */ QE(), n = Object.prototype.hasOwnProperty, i = {
12350
+ var t = RH(), e = /* @__PURE__ */ t2(), r = /* @__PURE__ */ QE(), n = Object.prototype.hasOwnProperty, i = {
12351
12351
  brackets: function(_) {
12352
12352
  return _ + "[]";
12353
12353
  },
@@ -12538,7 +12538,7 @@ var im, C1;
12538
12538
  function OH() {
12539
12539
  if (C1) return im;
12540
12540
  C1 = 1;
12541
- var t = /* @__PURE__ */ t$(), e = Object.prototype.hasOwnProperty, r = Array.isArray, n = {
12541
+ var t = /* @__PURE__ */ t2(), e = Object.prototype.hasOwnProperty, r = Array.isArray, n = {
12542
12542
  allowDots: !1,
12543
12543
  allowEmptyArrays: !1,
12544
12544
  allowPrototypes: !1,
@@ -13005,7 +13005,7 @@ let E_ = class {
13005
13005
  E_ = FH([ae(), BH(0, G(kc.SecureChannelDataSource))], E_);
13006
13006
  const HH = ({ stub: t, config: e }) => new Ke(({ bind: r }) => {
13007
13007
  r(kc.DmkConfig).toConstantValue(e), r(kc.SecureChannelDataSource).to(b_), r(kc.SecureChannelService).to(E_);
13008
- }), r$ = "wss://scriptrunner.api.live.ledger.com/update";
13008
+ }), r2 = "wss://scriptrunner.api.live.ledger.com/update";
13009
13009
  var VH = (t, e, r, n) => {
13010
13010
  for (var i = e, s = t.length - 1, o; s >= 0; s--) (o = t[s]) && (i = o(i) || i);
13011
13011
  return i;
@@ -13062,7 +13062,7 @@ let x_ = class {
13062
13062
  x_ = zH([ae(), Ja(0, G(Xn.TransportsInput)), Ja(1, G(Xn.DmkConfig)), Ja(2, G(Ft.LoggerPublisherServiceFactory)), Ja(3, G(HN.DeviceModelDataSource)), Ja(4, G(ft.ApduSenderServiceFactory)), Ja(5, G(ft.ApduReceiverServiceFactory))], x_);
13063
13063
  const jH = ({ stub: t = !1, transports: e = [], config: r } = {}) => new Ke(({ bind: n }) => {
13064
13064
  n(Xn.TransportsInput).toConstantValue(e), n(Xn.TransportService).to(x_).inSingletonScope(), n(Xn.DmkConfig).toConstantValue(r);
13065
- }), KH = ({ stub: t = !1, transports: e = [], loggers: r = [], config: n = { mockUrl: jN, managerApiUrl: zN, webSocketUrl: r$, provider: ZE, firmwareDistributionSalt: YE } }) => {
13065
+ }), KH = ({ stub: t = !1, transports: e = [], loggers: r = [], config: n = { mockUrl: jN, managerApiUrl: zN, webSocketUrl: r2, provider: ZE, firmwareDistributionSalt: YE } }) => {
13066
13066
  const i = new np();
13067
13067
  return i.loadSync(s8({ stub: t }), o8({ stub: t }), jH({ stub: t, transports: e, config: n }), eH({ stub: t, config: n }), HH({ stub: t, config: n }), O8({ stub: t }), L8({ subscribers: r }), f8({ stub: t }), GH({ stub: t }), V4({ stub: t }), z4({ stub: t })), i;
13068
13068
  };
@@ -13138,7 +13138,7 @@ let qH = class {
13138
13138
  stub = !1;
13139
13139
  loggers = [];
13140
13140
  transports = [];
13141
- config = { managerApiUrl: zN, mockUrl: jN, webSocketUrl: r$, provider: ZE, firmwareDistributionSalt: YE };
13141
+ config = { managerApiUrl: zN, mockUrl: jN, webSocketUrl: r2, provider: ZE, firmwareDistributionSalt: YE };
13142
13142
  build() {
13143
13143
  return new qH({ stub: this.stub, transports: this.transports, loggers: this.loggers, config: this.config });
13144
13144
  }
@@ -13191,7 +13191,7 @@ let qH = class {
13191
13191
  }
13192
13192
  };
13193
13193
  const YH = 1e4;
13194
- let n$ = class {
13194
+ let n2 = class {
13195
13195
  deviceId;
13196
13196
  deviceAdpuSender;
13197
13197
  machineActor;
@@ -13790,7 +13790,7 @@ class _he extends Ye {
13790
13790
  super(e, "LedgerSyncError", r);
13791
13791
  }
13792
13792
  }
13793
- class i$ extends Ye {
13793
+ class i2 extends Ye {
13794
13794
  constructor(e, r) {
13795
13795
  super(e, "LedgerSyncAuthContextMissingError", r);
13796
13796
  }
@@ -13884,7 +13884,7 @@ function p5(t) {
13884
13884
  };
13885
13885
  }
13886
13886
  var g5 = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, om = Math.ceil, Hn = Math.floor, dn = "[BigNumber Error] ", D1 = dn + "Number primitive has more than 15 significant digits: ", ii = 1e14, ze = 14, am = 9007199254740991, cm = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Rs = 1e7, mr = 1e9;
13887
- function s$(t) {
13887
+ function s2(t) {
13888
13888
  var e, r, n, i = m.prototype = { constructor: m, toString: null, valueOf: null }, s = new m(1), o = 20, a = 4, c = -7, u = 21, l = -1e7, d = 1e7, h = !1, f = 1, p = 0, g = {
13889
13889
  prefix: "",
13890
13890
  groupSize: 3,
@@ -13962,7 +13962,7 @@ function s$(t) {
13962
13962
  } else
13963
13963
  D.c = [D.e = 0];
13964
13964
  }
13965
- m.clone = s$, m.ROUND_UP = 0, m.ROUND_DOWN = 1, m.ROUND_CEIL = 2, m.ROUND_FLOOR = 3, m.ROUND_HALF_UP = 4, m.ROUND_HALF_DOWN = 5, m.ROUND_HALF_EVEN = 6, m.ROUND_HALF_CEIL = 7, m.ROUND_HALF_FLOOR = 8, m.EUCLID = 9, m.config = m.set = function(y) {
13965
+ m.clone = s2, m.ROUND_UP = 0, m.ROUND_DOWN = 1, m.ROUND_CEIL = 2, m.ROUND_FLOOR = 3, m.ROUND_HALF_UP = 4, m.ROUND_HALF_DOWN = 5, m.ROUND_HALF_EVEN = 6, m.ROUND_HALF_CEIL = 7, m.ROUND_HALF_FLOOR = 8, m.EUCLID = 9, m.config = m.set = function(y) {
13966
13966
  var w, b;
13967
13967
  if (y != null)
13968
13968
  if (typeof y == "object") {
@@ -14500,7 +14500,7 @@ function ts(t, e, r) {
14500
14500
  } else e < n && (t = t.slice(0, e) + "." + t.slice(e));
14501
14501
  return t;
14502
14502
  }
14503
- var ca = s$(), um, k1;
14503
+ var ca = s2(), um, k1;
14504
14504
  function y5() {
14505
14505
  if (k1) return um;
14506
14506
  k1 = 1;
@@ -14515,7 +14515,7 @@ function tC() {
14515
14515
  return lm = r, lm;
14516
14516
  }
14517
14517
  var dm, P1;
14518
- function o$() {
14518
+ function o2() {
14519
14519
  if (P1) return dm;
14520
14520
  P1 = 1;
14521
14521
  var t = tC(), e = t.Symbol;
@@ -14525,7 +14525,7 @@ var hm, O1;
14525
14525
  function m5() {
14526
14526
  if (O1) return hm;
14527
14527
  O1 = 1;
14528
- var t = o$(), e = Object.prototype, r = e.hasOwnProperty, n = e.toString, i = t ? t.toStringTag : void 0;
14528
+ var t = o2(), e = Object.prototype, r = e.hasOwnProperty, n = e.toString, i = t ? t.toStringTag : void 0;
14529
14529
  function s(o) {
14530
14530
  var a = r.call(o, i), c = o[i];
14531
14531
  try {
@@ -14552,14 +14552,14 @@ var pm, $1;
14552
14552
  function _5() {
14553
14553
  if ($1) return pm;
14554
14554
  $1 = 1;
14555
- var t = o$(), e = m5(), r = v5(), n = "[object Null]", i = "[object Undefined]", s = t ? t.toStringTag : void 0;
14555
+ var t = o2(), e = m5(), r = v5(), n = "[object Null]", i = "[object Undefined]", s = t ? t.toStringTag : void 0;
14556
14556
  function o(a) {
14557
14557
  return a == null ? a === void 0 ? i : n : s && s in Object(a) ? e(a) : r(a);
14558
14558
  }
14559
14559
  return pm = o, pm;
14560
14560
  }
14561
14561
  var gm, U1;
14562
- function a$() {
14562
+ function a2() {
14563
14563
  if (U1) return gm;
14564
14564
  U1 = 1;
14565
14565
  function t(e) {
@@ -14572,7 +14572,7 @@ var ym, L1;
14572
14572
  function w5() {
14573
14573
  if (L1) return ym;
14574
14574
  L1 = 1;
14575
- var t = _5(), e = a$(), r = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", s = "[object Proxy]";
14575
+ var t = _5(), e = a2(), r = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", s = "[object Proxy]";
14576
14576
  function o(a) {
14577
14577
  if (!e(a))
14578
14578
  return !1;
@@ -14625,7 +14625,7 @@ var wm, H1;
14625
14625
  function C5() {
14626
14626
  if (H1) return wm;
14627
14627
  H1 = 1;
14628
- var t = w5(), e = b5(), r = a$(), n = E5(), i = /[\\^$.*+?()[\]{}|]/g, s = /^\[object .+?Constructor\]$/, o = Function.prototype, a = Object.prototype, c = o.toString, u = a.hasOwnProperty, l = RegExp(
14628
+ var t = w5(), e = b5(), r = a2(), n = E5(), i = /[\\^$.*+?()[\]{}|]/g, s = /^\[object .+?Constructor\]$/, o = Function.prototype, a = Object.prototype, c = o.toString, u = a.hasOwnProperty, l = RegExp(
14629
14629
  "^" + c.call(u).replace(i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
14630
14630
  );
14631
14631
  function d(h) {
@@ -14646,7 +14646,7 @@ function x5() {
14646
14646
  return Sm = t, Sm;
14647
14647
  }
14648
14648
  var bm, G1;
14649
- function c$() {
14649
+ function c2() {
14650
14650
  if (G1) return bm;
14651
14651
  G1 = 1;
14652
14652
  var t = C5(), e = x5();
@@ -14660,7 +14660,7 @@ var Em, z1;
14660
14660
  function op() {
14661
14661
  if (z1) return Em;
14662
14662
  z1 = 1;
14663
- var t = c$(), e = t(Object, "create");
14663
+ var t = c2(), e = t(Object, "create");
14664
14664
  return Em = e, Em;
14665
14665
  }
14666
14666
  var Cm, j1;
@@ -14829,7 +14829,7 @@ var Mm, sT;
14829
14829
  function F5() {
14830
14830
  if (sT) return Mm;
14831
14831
  sT = 1;
14832
- var t = c$(), e = tC(), r = t(e, "Map");
14832
+ var t = c2(), e = tC(), r = t(e, "Map");
14833
14833
  return Mm = r, Mm;
14834
14834
  }
14835
14835
  var Fm, oT;
@@ -14997,7 +14997,7 @@ const Z5 = /* @__PURE__ */ Lf(W5), Y5 = {
14997
14997
  return l.slice(0, h);
14998
14998
  }
14999
14999
  return l;
15000
- }, iV = " ", u$ = {
15000
+ }, iV = " ", u2 = {
15001
15001
  locale: "en-EN",
15002
15002
  // show the currency code
15003
15003
  showCode: !1,
@@ -15038,7 +15038,7 @@ function sV(t, e, r) {
15038
15038
  w !== void 0 && (n[y] = w);
15039
15039
  }
15040
15040
  }
15041
- const { showCode: i, alwaysShowSign: s, showAllDigits: o, locale: a, disableRounding: c, useGrouping: u, subMagnitude: l, discreet: d, dynamicSignificantDigits: h, staticSignificantDigits: f } = { ...u$, ...t, ...n }, { magnitude: p, code: g } = t, _ = e.div(new ca(10).pow(p)), E = _.abs(), m = o ? p : 0, x = c ? p + l : Math.max(m, Math.max(
15041
+ const { showCode: i, alwaysShowSign: s, showAllDigits: o, locale: a, disableRounding: c, useGrouping: u, subMagnitude: l, discreet: d, dynamicSignificantDigits: h, staticSignificantDigits: f } = { ...u2, ...t, ...n }, { magnitude: p, code: g } = t, _ = e.div(new ca(10).pow(p)), E = _.abs(), m = o ? p : 0, x = c ? p + l : Math.max(m, Math.max(
15042
15042
  0,
15043
15043
  // dynamic max number of digits based on the value itself. to only show significant part
15044
15044
  Math.min(h - Math.ceil(Math.log10(E.toNumber())), p + l, f)
@@ -15065,7 +15065,7 @@ function sV(t, e, r) {
15065
15065
  }), A.splice(U + 1), A;
15066
15066
  }
15067
15067
  function oV(t, e, r) {
15068
- const n = r && r.joinFragmentsSeparator || u$.joinFragmentsSeparator;
15068
+ const n = r && r.joinFragmentsSeparator || u2.joinFragmentsSeparator;
15069
15069
  return sV(t, e, r).map((i) => i.value).join(n);
15070
15070
  }
15071
15071
  function El(t, e, r, n = {}) {
@@ -15173,10 +15173,10 @@ function Gs() {
15173
15173
  return t === Number.MAX_SAFE_INTEGER ? nC(Object, Zm, Number.MIN_SAFE_INTEGER) : lo(Object, Zm, () => t, (e) => e + 1), t;
15174
15174
  }
15175
15175
  const Jn = { Request: "Request", Singleton: "Singleton", Transient: "Transient" }, lt = { ConstantValue: "ConstantValue", DynamicValue: "DynamicValue", Factory: "Factory", Instance: "Instance", Provider: "Provider", ResolvedValue: "ResolvedValue", ServiceRedirection: "ServiceRedirection" };
15176
- function* l$(...t) {
15176
+ function* l2(...t) {
15177
15177
  for (const e of t) yield* e;
15178
15178
  }
15179
- let iC = class d$ {
15179
+ let iC = class d2 {
15180
15180
  #e;
15181
15181
  #t;
15182
15182
  #n;
@@ -15213,7 +15213,7 @@ let iC = class d$ {
15213
15213
  }
15214
15214
  }
15215
15215
  _buildNewInstance(e) {
15216
- return new d$(e);
15216
+ return new d2(e);
15217
15217
  }
15218
15218
  _cloneModel(e) {
15219
15219
  return e;
@@ -15303,7 +15303,7 @@ let mT = class A_ {
15303
15303
  const r = [], n = this.#e.get(Cl.serviceId, e);
15304
15304
  n !== void 0 && r.push(n);
15305
15305
  const i = this.#t()?.get(e);
15306
- if (i !== void 0 && r.push(i), r.length !== 0) return l$(...r);
15306
+ if (i !== void 0 && r.push(i), r.length !== 0) return l2(...r);
15307
15307
  }
15308
15308
  removeAllByModuleId(e) {
15309
15309
  this.#e.removeByRelation(Cl.moduleId, e);
@@ -15347,9 +15347,9 @@ function cV(t) {
15347
15347
  (function(t) {
15348
15348
  t.id = "id", t.moduleId = "moduleId", t.serviceId = "serviceId";
15349
15349
  })(Cn || (Cn = {}));
15350
- let uV = class h$ extends iC {
15350
+ let uV = class h2 extends iC {
15351
15351
  _buildNewInstance(e) {
15352
- return new h$(e);
15352
+ return new h2(e);
15353
15353
  }
15354
15354
  _cloneModel(e) {
15355
15355
  return cV(e);
@@ -15428,7 +15428,7 @@ let _T = class D_ {
15428
15428
  const r = [], n = this.#e.get(xl.serviceId, e);
15429
15429
  n !== void 0 && r.push(n);
15430
15430
  const i = this.#t()?.get(e);
15431
- if (i !== void 0 && r.push(i), r.length !== 0) return l$(...r);
15431
+ if (i !== void 0 && r.push(i), r.length !== 0) return l2(...r);
15432
15432
  }
15433
15433
  removeAllByModuleId(e) {
15434
15434
  this.#e.removeByRelation(xl.moduleId, e);
@@ -15441,8 +15441,8 @@ const Oc = "@inversifyjs/core/classMetadataReflectKey";
15441
15441
  function Nc() {
15442
15442
  return { constructorArguments: [], lifecycle: { postConstructMethodName: void 0, preDestroyMethodName: void 0 }, properties: /* @__PURE__ */ new Map(), scope: void 0 };
15443
15443
  }
15444
- const f$ = "@inversifyjs/core/pendingClassMetadataCountReflectKey", Ym = Symbol.for("@inversifyjs/core/InversifyCoreError");
15445
- let Kt = class p$ extends Error {
15444
+ const f2 = "@inversifyjs/core/pendingClassMetadataCountReflectKey", Ym = Symbol.for("@inversifyjs/core/InversifyCoreError");
15445
+ let Kt = class p2 extends Error {
15446
15446
  [Ym];
15447
15447
  kind;
15448
15448
  constructor(e, r, n) {
@@ -15452,14 +15452,14 @@ let Kt = class p$ extends Error {
15452
15452
  return typeof e == "object" && e !== null && e[Ym] === !0;
15453
15453
  }
15454
15454
  static isErrorOfKind(e, r) {
15455
- return p$.is(e) && e.kind === r;
15455
+ return p2.is(e) && e.kind === r;
15456
15456
  }
15457
15457
  };
15458
15458
  var Ot, Jc, Un;
15459
15459
  function lp(t) {
15460
15460
  const e = xa(t, Oc) ?? Nc();
15461
15461
  if (!function(r) {
15462
- const n = xa(r, f$);
15462
+ const n = xa(r, f2);
15463
15463
  return n !== void 0 && n !== 0;
15464
15464
  }(t)) return function(r, n) {
15465
15465
  const i = [];
@@ -15497,9 +15497,9 @@ ${i.join(`
15497
15497
  function lV() {
15498
15498
  return 0;
15499
15499
  }
15500
- function g$(t) {
15500
+ function g2(t) {
15501
15501
  return (e) => {
15502
- e !== void 0 && e.kind === Jc.unknown && lo(t, f$, lV, (r) => r - 1);
15502
+ e !== void 0 && e.kind === Jc.unknown && lo(t, f2, lV, (r) => r - 1);
15503
15503
  };
15504
15504
  }
15505
15505
  function dV(t, e) {
@@ -15519,7 +15519,7 @@ function hV(t) {
15519
15519
  }(Jc || (Jc = {})), function(t) {
15520
15520
  t[t.multipleInjection = 0] = "multipleInjection", t[t.singleInjection = 1] = "singleInjection", t[t.unmanaged = 2] = "unmanaged";
15521
15521
  }(Un || (Un = {}));
15522
- const y$ = dV(function(t, e, r) {
15522
+ const y2 = dV(function(t, e, r) {
15523
15523
  return t === Un.multipleInjection ? { chained: r?.chained ?? !1, kind: t, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: e } : { kind: t, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: e };
15524
15524
  }, function(t, e, r, n) {
15525
15525
  return hV(t), e === Un.multipleInjection ? { ...t, chained: n?.chained ?? !1, kind: e, value: r } : { ...t, kind: e, value: r };
@@ -15531,7 +15531,7 @@ function wT(t, e) {
15531
15531
  };
15532
15532
  }
15533
15533
  var Ks;
15534
- function m$(t, e, r, n) {
15534
+ function m2(t, e, r, n) {
15535
15535
  if (Kt.isErrorOfKind(n, Ot.injectionDecoratorConflict)) {
15536
15536
  const i = function(s, o, a) {
15537
15537
  if (a === void 0) {
@@ -15561,7 +15561,7 @@ ${function(s) {
15561
15561
  }
15562
15562
  throw n;
15563
15563
  }
15564
- function v$(t, e) {
15564
+ function v2(t, e) {
15565
15565
  return (r, n, i) => {
15566
15566
  try {
15567
15567
  i === void 0 ? function(s, o) {
@@ -15594,7 +15594,7 @@ Found @inject decorator at method "${u.toString()}" at class "${c.constructor.na
15594
15594
  };
15595
15595
  }(t, e)(r, n, i);
15596
15596
  } catch (s) {
15597
- m$(r, n, i, s);
15597
+ m2(r, n, i, s);
15598
15598
  }
15599
15599
  };
15600
15600
  }
@@ -15605,7 +15605,7 @@ function Xm(t, e) {
15605
15605
  };
15606
15606
  }
15607
15607
  function F(t) {
15608
- return v$(y$(Un.singleInjection, t), g$);
15608
+ return v2(y2(Un.singleInjection, t), g2);
15609
15609
  }
15610
15610
  (function(t) {
15611
15611
  t[t.method = 0] = "method", t[t.parameter = 1] = "parameter", t[t.property = 2] = "property";
@@ -15631,7 +15631,7 @@ function ue(t) {
15631
15631
  };
15632
15632
  }
15633
15633
  function gV(t, e) {
15634
- return v$(y$(Un.multipleInjection, t, e), g$);
15634
+ return v2(y2(Un.multipleInjection, t, e), g2);
15635
15635
  }
15636
15636
  function yV() {
15637
15637
  return (t, e, r) => {
@@ -15641,7 +15641,7 @@ function yV() {
15641
15641
  return i.lifecycle.preDestroyMethodName = n, i;
15642
15642
  }));
15643
15643
  } catch (i) {
15644
- m$(t, e, void 0, i);
15644
+ m2(t, e, void 0, i);
15645
15645
  }
15646
15646
  var n;
15647
15647
  };
@@ -15699,11 +15699,11 @@ class sC {
15699
15699
  function Qc(t) {
15700
15700
  return t.redirections !== void 0;
15701
15701
  }
15702
- function _$(t, e, r, n) {
15702
+ function _2(t, e, r, n) {
15703
15703
  const i = r.elem.serviceIdentifier, s = r.previous?.elem.serviceIdentifier;
15704
15704
  Array.isArray(t) ? function(o, a, c, u, l, d) {
15705
15705
  if (o.length !== 0) {
15706
- const h = d[d.length - 1] ?? c, f = `Ambiguous bindings found for service: "${Gr(h)}".${b$(d)}
15706
+ const h = d[d.length - 1] ?? c, f = `Ambiguous bindings found for service: "${Gr(h)}".${b2(d)}
15707
15707
 
15708
15708
  Registered bindings:
15709
15709
 
@@ -15719,7 +15719,7 @@ ${o.map((p) => function(g) {
15719
15719
  }(p.binding)).join(`
15720
15720
  `)}
15721
15721
 
15722
- Trying to resolve bindings for "${w$(c, u)}".${S$(l)}`;
15722
+ Trying to resolve bindings for "${w2(c, u)}".${S2(l)}`;
15723
15723
  throw new Kt(Ot.planning, f);
15724
15724
  }
15725
15725
  a || bT(c, u, l, d);
@@ -15730,13 +15730,13 @@ Trying to resolve bindings for "${w$(c, u)}".${S$(l)}`;
15730
15730
  function bT(t, e, r, n) {
15731
15731
  const i = n[n.length - 1] ?? t, s = `No bindings found for service: "${Gr(i)}".
15732
15732
 
15733
- Trying to resolve bindings for "${w$(t, e)}".${b$(n)}${S$(r)}`;
15733
+ Trying to resolve bindings for "${w2(t, e)}".${b2(n)}${S2(r)}`;
15734
15734
  throw new Kt(Ot.planning, s);
15735
15735
  }
15736
- function w$(t, e) {
15736
+ function w2(t, e) {
15737
15737
  return e === void 0 ? `${Gr(t)} (Root service)` : Gr(e);
15738
15738
  }
15739
- function S$(t) {
15739
+ function S2(t) {
15740
15740
  const e = t.tags.size === 0 ? "" : `
15741
15741
  - tags:
15742
15742
  - ${[...t.tags.keys()].map((r) => r.toString()).join(`
@@ -15747,28 +15747,28 @@ Binding constraints:
15747
15747
  - service identifier: ${Gr(t.serviceIdentifier)}
15748
15748
  - name: ${t.name?.toString() ?? "-"}${e}`;
15749
15749
  }
15750
- function b$(t) {
15750
+ function b2(t) {
15751
15751
  return t.length === 0 ? "" : `
15752
15752
 
15753
15753
  - service redirections:
15754
15754
  - ${t.map((e) => Gr(e)).join(`
15755
15755
  - `)}`;
15756
15756
  }
15757
- function E$(t, e, r, n) {
15757
+ function E2(t, e, r, n) {
15758
15758
  if (t.redirections.length === 1) {
15759
15759
  const [i] = t.redirections;
15760
- return void (Qc(i) && E$(i, e, r, [...n, i.binding.targetServiceIdentifier]));
15760
+ return void (Qc(i) && E2(i, e, r, [...n, i.binding.targetServiceIdentifier]));
15761
15761
  }
15762
- _$(t.redirections, e, r, n);
15762
+ _2(t.redirections, e, r, n);
15763
15763
  }
15764
15764
  function oC(t, e, r) {
15765
15765
  if (Array.isArray(t.bindings) && t.bindings.length === 1) {
15766
15766
  const [n] = t.bindings;
15767
- return void (Qc(n) && E$(n, e, r, [n.binding.targetServiceIdentifier]));
15767
+ return void (Qc(n) && E2(n, e, r, [n.binding.targetServiceIdentifier]));
15768
15768
  }
15769
- _$(t.bindings, e, r, []);
15769
+ _2(t.bindings, e, r, []);
15770
15770
  }
15771
- function C$(t) {
15771
+ function C2(t) {
15772
15772
  return up.is(t) ? t.unwrap() : t;
15773
15773
  }
15774
15774
  function mV(t, e) {
@@ -15823,7 +15823,7 @@ let Zs = class {
15823
15823
  return this._serviceNode === void 0 && (this._serviceNode = this._buildPlanServiceNode()), this._serviceNode;
15824
15824
  }
15825
15825
  };
15826
- function x$(t, e, r) {
15826
+ function x2(t, e, r) {
15827
15827
  if (t !== void 0 && r.isContextFree) {
15828
15828
  const n = { tree: { root: r } };
15829
15829
  e.setPlan(t, n);
@@ -15835,7 +15835,7 @@ class vV extends Zs {
15835
15835
  super(r), this.#e = e;
15836
15836
  }
15837
15837
  _buildPlanServiceNode() {
15838
- return I$(this.#e);
15838
+ return I2(this.#e);
15839
15839
  }
15840
15840
  }
15841
15841
  class _V extends Zs {
@@ -15846,7 +15846,7 @@ class _V extends Zs {
15846
15846
  super(i), this.#e = e, this.#t = r, this.#n = n;
15847
15847
  }
15848
15848
  _buildPlanServiceNode() {
15849
- return A$(this.#e, this.#t, this.#n);
15849
+ return A2(this.#e, this.#t, this.#n);
15850
15850
  }
15851
15851
  }
15852
15852
  class wV extends Zs {
@@ -15857,10 +15857,10 @@ class wV extends Zs {
15857
15857
  super(i), this.#e = e, this.#t = r, this.#n = n;
15858
15858
  }
15859
15859
  _buildPlanServiceNode() {
15860
- return T$(this.#e, this.#t, this.#n);
15860
+ return T2(this.#e, this.#t, this.#n);
15861
15861
  }
15862
15862
  }
15863
- function I$(t) {
15863
+ function I2(t) {
15864
15864
  const e = function(a) {
15865
15865
  const c = /* @__PURE__ */ new Map();
15866
15866
  return a.rootConstraints.tag !== void 0 && c.set(a.rootConstraints.tag.key, a.rootConstraints.tag.value), new sC({ elem: { getAncestorsCalled: !1, name: a.rootConstraints.name, serviceIdentifier: a.rootConstraints.serviceIdentifier, tags: c }, previous: void 0 });
@@ -15878,7 +15878,7 @@ function SV(t) {
15878
15878
  return s.rootConstraints.isMultiple ? { chained: s.rootConstraints.chained, isMultiple: !0, name: s.rootConstraints.name, optional: s.rootConstraints.isOptional ?? !1, serviceIdentifier: s.rootConstraints.serviceIdentifier, tag: s.rootConstraints.tag } : { isMultiple: !1, name: s.rootConstraints.name, optional: s.rootConstraints.isOptional ?? !1, serviceIdentifier: s.rootConstraints.serviceIdentifier, tag: s.rootConstraints.tag };
15879
15879
  }(t), r = t.operations.getPlan(e);
15880
15880
  if (r !== void 0) return r;
15881
- const n = I$(t), i = { tree: { root: new vV(t, n) } };
15881
+ const n = I2(t), i = { tree: { root: new vV(t, n) } };
15882
15882
  return t.operations.setPlan(e, i), i;
15883
15883
  } catch (e) {
15884
15884
  mV(t, e);
@@ -15886,10 +15886,10 @@ function SV(t) {
15886
15886
  }
15887
15887
  function bV(t, e, r) {
15888
15888
  const n = { binding: e, classMetadata: t.operations.getClassMetadata(e.implementationType), constructorParams: [], propertyParams: /* @__PURE__ */ new Map() };
15889
- return D$({ autobindOptions: t.autobindOptions, node: n, operations: t.operations, servicesBranch: t.servicesBranch }, r);
15889
+ return D2({ autobindOptions: t.autobindOptions, node: n, operations: t.operations, servicesBranch: t.servicesBranch }, r);
15890
15890
  }
15891
- function A$(t, e, r) {
15892
- const n = C$(r.value), i = e.concat({ getAncestorsCalled: !1, name: r.name, serviceIdentifier: n, tags: r.tags }), s = new wu(i.last), o = r.kind === Un.multipleInjection && r.chained, a = dp(t, s, { chained: o }), c = [], u = { bindings: c, isContextFree: !0, serviceIdentifier: n };
15891
+ function A2(t, e, r) {
15892
+ const n = C2(r.value), i = e.concat({ getAncestorsCalled: !1, name: r.name, serviceIdentifier: n, tags: r.tags }), s = new wu(i.last), o = r.kind === Un.multipleInjection && r.chained, a = dp(t, s, { chained: o }), c = [], u = { bindings: c, isContextFree: !0, serviceIdentifier: n };
15893
15893
  if (c.push(...hp(t, i, a, u, o)), u.isContextFree = !i.last.elem.getAncestorsCalled, r.kind === Un.singleInjection) {
15894
15894
  oC(u, r.optional, i.last);
15895
15895
  const [l] = c;
@@ -15897,8 +15897,8 @@ function A$(t, e, r) {
15897
15897
  }
15898
15898
  return u;
15899
15899
  }
15900
- function T$(t, e, r) {
15901
- const n = C$(r.value), i = e.concat({ getAncestorsCalled: !1, name: r.name, serviceIdentifier: n, tags: r.tags }), s = new wu(i.last), o = r.kind === ho.multipleInjection && r.chained, a = dp(t, s, { chained: o }), c = [], u = { bindings: c, isContextFree: !0, serviceIdentifier: n };
15900
+ function T2(t, e, r) {
15901
+ const n = C2(r.value), i = e.concat({ getAncestorsCalled: !1, name: r.name, serviceIdentifier: n, tags: r.tags }), s = new wu(i.last), o = r.kind === ho.multipleInjection && r.chained, a = dp(t, s, { chained: o }), c = [], u = { bindings: c, isContextFree: !0, serviceIdentifier: n };
15902
15902
  if (c.push(...hp(t, i, a, u, o)), u.isContextFree = !i.last.elem.getAncestorsCalled, r.kind === ho.singleInjection) {
15903
15903
  oC(u, r.optional, i.last);
15904
15904
  const [l] = c;
@@ -15908,7 +15908,7 @@ function T$(t, e, r) {
15908
15908
  }
15909
15909
  function EV(t, e, r) {
15910
15910
  const n = { binding: e, params: [] };
15911
- return D$({ autobindOptions: t.autobindOptions, node: n, operations: t.operations, servicesBranch: t.servicesBranch }, r);
15911
+ return D2({ autobindOptions: t.autobindOptions, node: n, operations: t.operations, servicesBranch: t.servicesBranch }, r);
15912
15912
  }
15913
15913
  function hp(t, e, r, n, i) {
15914
15914
  const s = Qc(n) ? n.binding.targetServiceIdentifier : n.serviceIdentifier;
@@ -15954,8 +15954,8 @@ function ET(t, e, r) {
15954
15954
  const o = t.operations.getPlan(n);
15955
15955
  if (o !== void 0 && o.tree.root.isContextFree) return o.tree.root;
15956
15956
  }
15957
- const i = A$(t, e, r), s = new _V(t, e, r, i);
15958
- return x$(n, t.operations, s), s;
15957
+ const i = A2(t, e, r), s = new _V(t, e, r, i);
15958
+ return x2(n, t.operations, s), s;
15959
15959
  }
15960
15960
  function xV(t, e, r) {
15961
15961
  const n = function(o) {
@@ -15975,10 +15975,10 @@ function xV(t, e, r) {
15975
15975
  const o = t.operations.getPlan(n);
15976
15976
  if (o !== void 0 && o.tree.root.isContextFree) return o.tree.root;
15977
15977
  }
15978
- const i = T$(t, e, r), s = new wV(t, e, r, i);
15979
- return x$(n, t.operations, s), s;
15978
+ const i = T2(t, e, r), s = new wV(t, e, r, i);
15979
+ return x2(n, t.operations, s), s;
15980
15980
  }
15981
- function D$(t, e) {
15981
+ function D2(t, e) {
15982
15982
  return t.node.binding.type === lt.Instance ? function(r, n, i) {
15983
15983
  const s = n.classMetadata;
15984
15984
  for (const [o, a] of s.constructorArguments.entries()) n.constructorParams[o] = ET(r, i, a);
@@ -16125,7 +16125,7 @@ class CT {
16125
16125
  }
16126
16126
  }
16127
16127
  }
16128
- function k$(t, e) {
16128
+ function k2(t, e) {
16129
16129
  return fr(e) ? (t.cache = { isRight: !0, value: e }, e.then((r) => xT(t, r))) : xT(t, e);
16130
16130
  }
16131
16131
  function xT(t, e) {
@@ -16157,7 +16157,7 @@ function Lh(t, e, r) {
16157
16157
  return AV(t, e.serviceIdentifier, n);
16158
16158
  }
16159
16159
  function aC(t) {
16160
- return (e, r) => r.cache.isRight ? r.cache.value : k$(r, Lh(e, r, t(e, r)));
16160
+ return (e, r) => r.cache.isRight ? r.cache.value : k2(r, Lh(e, r, t(e, r)));
16161
16161
  }
16162
16162
  const TV = aC(function(t, e) {
16163
16163
  return e.value;
@@ -16170,7 +16170,7 @@ function cC(t, e) {
16170
16170
  const i = t(n);
16171
16171
  switch (i.scope) {
16172
16172
  case Jn.Singleton:
16173
- return i.cache.isRight ? i.cache.value : k$(i, Lh(r, i, e(r, n)));
16173
+ return i.cache.isRight ? i.cache.value : k2(i, Lh(r, i, e(r, n)));
16174
16174
  case Jn.Request: {
16175
16175
  if (r.requestScopeCache.has(i.id)) return r.requestScopeCache.get(i.id);
16176
16176
  const s = Lh(r, i, e(r, n));
@@ -16383,15 +16383,15 @@ let Ht = class {
16383
16383
  return this.#t(e);
16384
16384
  }
16385
16385
  };
16386
- const R$ = Symbol.for("@inversifyjs/container/bindingIdentifier");
16386
+ const R2 = Symbol.for("@inversifyjs/container/bindingIdentifier");
16387
16387
  function LT(t) {
16388
- return typeof t == "object" && t !== null && t[R$] === !0;
16388
+ return typeof t == "object" && t !== null && t[R2] === !0;
16389
16389
  }
16390
16390
  let Bo = class {
16391
16391
  static always = (e) => !0;
16392
16392
  };
16393
16393
  const ev = Symbol.for("@inversifyjs/container/InversifyContainerError");
16394
- let Ss = class P$ extends Error {
16394
+ let Ss = class P2 extends Error {
16395
16395
  [ev];
16396
16396
  kind;
16397
16397
  constructor(e, r, n) {
@@ -16401,12 +16401,12 @@ let Ss = class P$ extends Error {
16401
16401
  return typeof e == "object" && e !== null && e[ev] === !0;
16402
16402
  }
16403
16403
  static isErrorOfKind(e, r) {
16404
- return P$.is(e) && e.kind === r;
16404
+ return P2.is(e) && e.kind === r;
16405
16405
  }
16406
16406
  };
16407
16407
  var fi;
16408
16408
  function lC(t) {
16409
- return { [R$]: !0, id: t.id };
16409
+ return { [R2]: !0, id: t.id };
16410
16410
  }
16411
16411
  function sl(t) {
16412
16412
  return (e) => {
@@ -16463,7 +16463,7 @@ class jV {
16463
16463
  return this.#e.scope = Jn.Transient, new ua(this.#e);
16464
16464
  }
16465
16465
  }
16466
- let O$ = class {
16466
+ let O2 = class {
16467
16467
  #e;
16468
16468
  #t;
16469
16469
  #n;
@@ -16510,7 +16510,7 @@ let O$ = class {
16510
16510
  return n.isMultiple === !0;
16511
16511
  }(r) ? { chained: r.chained ?? !1, kind: ho.multipleInjection, name: r.name, optional: r.optional ?? !1, tags: new Map((r.tags ?? []).map((n) => [n.key, n.value])), value: r.serviceIdentifier } : { kind: ho.singleInjection, name: r.name, optional: r.optional ?? !1, tags: new Map((r.tags ?? []).map((n) => [n.key, n.value])), value: r.serviceIdentifier } : { kind: ho.singleInjection, name: void 0, optional: !1, tags: /* @__PURE__ */ new Map(), value: r }) };
16512
16512
  }
16513
- }, N$ = class {
16513
+ }, N2 = class {
16514
16514
  #e;
16515
16515
  constructor(e) {
16516
16516
  this.#e = e;
@@ -16535,7 +16535,7 @@ class R_ {
16535
16535
  return lC(this.#e);
16536
16536
  }
16537
16537
  when(e) {
16538
- return this.#e.isSatisfiedBy = e, new N$(this.#e);
16538
+ return this.#e.isSatisfiedBy = e, new N2(this.#e);
16539
16539
  }
16540
16540
  whenAnyAncestor(e) {
16541
16541
  return this.when(sl(e));
@@ -16614,7 +16614,7 @@ class R_ {
16614
16614
  let ua = class extends R_ {
16615
16615
  #e;
16616
16616
  constructor(e) {
16617
- super(e), this.#e = new N$(e);
16617
+ super(e), this.#e = new N2(e);
16618
16618
  }
16619
16619
  onActivation(e) {
16620
16620
  return this.#e.onActivation(e);
@@ -16646,7 +16646,7 @@ let KV = class {
16646
16646
  this.#e = e, this.#t = r, this.#n = n;
16647
16647
  }
16648
16648
  bind(e) {
16649
- return new O$((r) => {
16649
+ return new O2((r) => {
16650
16650
  this.#r(r);
16651
16651
  }, void 0, this.#t, e);
16652
16652
  }
@@ -16747,7 +16747,7 @@ let KV = class {
16747
16747
  this.#o(e);
16748
16748
  }
16749
16749
  #i(e) {
16750
- return { bind: (r) => new O$((n) => {
16750
+ return { bind: (r) => new O2((n) => {
16751
16751
  this.#a(n);
16752
16752
  }, e, this.#n, r), isBound: this.#e.isBound.bind(this.#e), onActivation: (r, n) => {
16753
16753
  this.#r.activationService.add(n, { moduleId: e, serviceId: r });
@@ -17236,7 +17236,7 @@ $_ = oG([
17236
17236
  function aG(t) {
17237
17237
  return Uint8Array.from(atob(t), (e) => e.charCodeAt(0));
17238
17238
  }
17239
- const $$ = {
17239
+ const $2 = {
17240
17240
  CloudSyncService: Symbol.for("CloudSyncService")
17241
17241
  }, pp = {
17242
17242
  LedgerSyncService: Symbol.for("LedgerSyncService")
@@ -17259,7 +17259,7 @@ let U_ = class {
17259
17259
  getAuthContextOrThrow() {
17260
17260
  const t = this.ledgerSyncService.authContext;
17261
17261
  if (!t) {
17262
- const e = new i$(
17262
+ const e = new i2(
17263
17263
  "No auth context available"
17264
17264
  );
17265
17265
  throw this.logger.error("Missing auth context for fetching accounts", {
@@ -17280,7 +17280,7 @@ U_ = uG([
17280
17280
  ue(),
17281
17281
  nv(0, F(me.LoggerPublisher)),
17282
17282
  nv(1, F(pp.LedgerSyncService)),
17283
- nv(2, F($$.CloudSyncService))
17283
+ nv(2, F($2.CloudSyncService))
17284
17284
  ], U_);
17285
17285
  var lG = Object.getOwnPropertyDescriptor, dG = (t, e, r, n) => {
17286
17286
  for (var i = n > 1 ? void 0 : n ? lG(e, r) : e, s = t.length - 1, o; s >= 0; s--)
@@ -17731,14 +17731,14 @@ class $c extends Error {
17731
17731
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
17732
17732
  }
17733
17733
  }
17734
- class U$ extends Error {
17734
+ class U2 extends Error {
17735
17735
  constructor(e) {
17736
17736
  super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
17737
17737
  }
17738
17738
  }
17739
- const L$ = {};
17739
+ const L2 = {};
17740
17740
  function Ia(t) {
17741
- return L$;
17741
+ return L2;
17742
17742
  }
17743
17743
  function EG(t) {
17744
17744
  const e = Object.values(t).filter((n) => typeof n == "number");
@@ -17813,7 +17813,7 @@ function Su(...t) {
17813
17813
  function VT(t) {
17814
17814
  return JSON.stringify(t);
17815
17815
  }
17816
- const M$ = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
17816
+ const M2 = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
17817
17817
  };
17818
17818
  function $l(t) {
17819
17819
  return typeof t == "object" && t !== null && !Array.isArray(t);
@@ -17837,7 +17837,7 @@ function Ul(t) {
17837
17837
  const r = e.prototype;
17838
17838
  return !($l(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
17839
17839
  }
17840
- function F$(t) {
17840
+ function F2(t) {
17841
17841
  return Ul(t) ? { ...t } : t;
17842
17842
  }
17843
17843
  const AG = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
@@ -18001,7 +18001,7 @@ function Sc(t, e = 0) {
18001
18001
  return !0;
18002
18002
  return !1;
18003
18003
  }
18004
- function B$(t, e) {
18004
+ function B2(t, e) {
18005
18005
  return e.map((r) => {
18006
18006
  var n;
18007
18007
  return (n = r).path ?? (n.path = []), r.path.unshift(t), r;
@@ -18030,7 +18030,7 @@ function Ll(...t) {
18030
18030
  inst: n
18031
18031
  } : { ...e };
18032
18032
  }
18033
- const H$ = (t, e) => {
18033
+ const H2 = (t, e) => {
18034
18034
  t.name = "$ZodError", Object.defineProperty(t, "_zod", {
18035
18035
  value: t._zod,
18036
18036
  enumerable: !1
@@ -18041,7 +18041,7 @@ const H$ = (t, e) => {
18041
18041
  value: () => t.message,
18042
18042
  enumerable: !1
18043
18043
  });
18044
- }, V$ = re("$ZodError", H$), G$ = re("$ZodError", H$, { Parent: Error });
18044
+ }, V2 = re("$ZodError", H2), G2 = re("$ZodError", H2, { Parent: Error });
18045
18045
  function LG(t, e = (r) => r.message) {
18046
18046
  const r = {}, n = [];
18047
18047
  for (const i of t.issues)
@@ -18077,7 +18077,7 @@ const pC = (t) => (e, r, n, i) => {
18077
18077
  throw new $c();
18078
18078
  if (o.issues.length) {
18079
18079
  const a = new (i?.Err ?? t)(o.issues.map((c) => Aa(c, s, Ia())));
18080
- throw M$(a, i?.callee), a;
18080
+ throw M2(a, i?.callee), a;
18081
18081
  }
18082
18082
  return o.value;
18083
18083
  }, gC = (t) => async (e, r, n, i) => {
@@ -18085,7 +18085,7 @@ const pC = (t) => (e, r, n, i) => {
18085
18085
  let o = e._zod.run({ value: r, issues: [] }, s);
18086
18086
  if (o instanceof Promise && (o = await o), o.issues.length) {
18087
18087
  const a = new (i?.Err ?? t)(o.issues.map((c) => Aa(c, s, Ia())));
18088
- throw M$(a, i?.callee), a;
18088
+ throw M2(a, i?.callee), a;
18089
18089
  }
18090
18090
  return o.value;
18091
18091
  }, yp = (t) => (e, r, n) => {
@@ -18094,16 +18094,16 @@ const pC = (t) => (e, r, n, i) => {
18094
18094
  throw new $c();
18095
18095
  return s.issues.length ? {
18096
18096
  success: !1,
18097
- error: new (t ?? V$)(s.issues.map((o) => Aa(o, i, Ia())))
18097
+ error: new (t ?? V2)(s.issues.map((o) => Aa(o, i, Ia())))
18098
18098
  } : { success: !0, data: s.value };
18099
- }, FG = /* @__PURE__ */ yp(G$), mp = (t) => async (e, r, n) => {
18099
+ }, FG = /* @__PURE__ */ yp(G2), mp = (t) => async (e, r, n) => {
18100
18100
  const i = n ? Object.assign(n, { async: !0 }) : { async: !0 };
18101
18101
  let s = e._zod.run({ value: r, issues: [] }, i);
18102
18102
  return s instanceof Promise && (s = await s), s.issues.length ? {
18103
18103
  success: !1,
18104
18104
  error: new t(s.issues.map((o) => Aa(o, i, Ia())))
18105
18105
  } : { success: !0, data: s.value };
18106
- }, BG = /* @__PURE__ */ mp(G$), HG = (t) => (e, r, n) => {
18106
+ }, BG = /* @__PURE__ */ mp(G2), HG = (t) => (e, r, n) => {
18107
18107
  const i = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
18108
18108
  return pC(t)(e, r, i);
18109
18109
  }, VG = (t) => (e, r, n) => pC(t)(e, r, n), GG = (t) => async (e, r, n) => {
@@ -18119,19 +18119,19 @@ const pC = (t) => (e, r, n, i) => {
18119
18119
  function sz() {
18120
18120
  return new RegExp(iz, "u");
18121
18121
  }
18122
- const oz = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, az = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, cz = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, uz = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, lz = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, z$ = /^[A-Za-z0-9_-]*$/, dz = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, hz = /^\+(?:[0-9]){6,14}[0-9]$/, j$ = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", fz = /* @__PURE__ */ new RegExp(`^${j$}$`);
18123
- function K$(t) {
18122
+ const oz = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, az = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, cz = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, uz = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, lz = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, z2 = /^[A-Za-z0-9_-]*$/, dz = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, hz = /^\+(?:[0-9]){6,14}[0-9]$/, j2 = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", fz = /* @__PURE__ */ new RegExp(`^${j2}$`);
18123
+ function K2(t) {
18124
18124
  const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
18125
18125
  return typeof t.precision == "number" ? t.precision === -1 ? `${e}` : t.precision === 0 ? `${e}:[0-5]\\d` : `${e}:[0-5]\\d\\.\\d{${t.precision}}` : `${e}(?::[0-5]\\d(?:\\.\\d+)?)?`;
18126
18126
  }
18127
18127
  function pz(t) {
18128
- return new RegExp(`^${K$(t)}$`);
18128
+ return new RegExp(`^${K2(t)}$`);
18129
18129
  }
18130
18130
  function gz(t) {
18131
- const e = K$({ precision: t.precision }), r = ["Z"];
18131
+ const e = K2({ precision: t.precision }), r = ["Z"];
18132
18132
  t.local && r.push(""), t.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
18133
18133
  const n = `${e}(?:${r.join("|")})`;
18134
- return new RegExp(`^${j$}T(?:${n})$`);
18134
+ return new RegExp(`^${j2}T(?:${n})$`);
18135
18135
  }
18136
18136
  const yz = (t) => {
18137
18137
  const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
@@ -18139,13 +18139,13 @@ const yz = (t) => {
18139
18139
  }, mz = /^\d+$/, vz = /^-?\d+(?:\.\d+)?/i, _z = /^[^A-Z]*$/, wz = /^[^a-z]*$/, bn = /* @__PURE__ */ re("$ZodCheck", (t, e) => {
18140
18140
  var r;
18141
18141
  t._zod ?? (t._zod = {}), t._zod.def = e, (r = t._zod).onattach ?? (r.onattach = []);
18142
- }), q$ = {
18142
+ }), q2 = {
18143
18143
  number: "number",
18144
18144
  bigint: "bigint",
18145
18145
  object: "date"
18146
- }, W$ = /* @__PURE__ */ re("$ZodCheckLessThan", (t, e) => {
18146
+ }, W2 = /* @__PURE__ */ re("$ZodCheckLessThan", (t, e) => {
18147
18147
  bn.init(t, e);
18148
- const r = q$[typeof e.value];
18148
+ const r = q2[typeof e.value];
18149
18149
  t._zod.onattach.push((n) => {
18150
18150
  const i = n._zod.bag, s = (e.inclusive ? i.maximum : i.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
18151
18151
  e.value < s && (e.inclusive ? i.maximum = e.value : i.exclusiveMaximum = e.value);
@@ -18160,9 +18160,9 @@ const yz = (t) => {
18160
18160
  continue: !e.abort
18161
18161
  });
18162
18162
  };
18163
- }), Z$ = /* @__PURE__ */ re("$ZodCheckGreaterThan", (t, e) => {
18163
+ }), Z2 = /* @__PURE__ */ re("$ZodCheckGreaterThan", (t, e) => {
18164
18164
  bn.init(t, e);
18165
- const r = q$[typeof e.value];
18165
+ const r = q2[typeof e.value];
18166
18166
  t._zod.onattach.push((n) => {
18167
18167
  const i = n._zod.bag, s = (e.inclusive ? i.minimum : i.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
18168
18168
  e.value > s && (e.inclusive ? i.minimum = e.value : i.exclusiveMinimum = e.value);
@@ -18648,7 +18648,7 @@ const Nz = {
18648
18648
  }
18649
18649
  };
18650
18650
  });
18651
- function Y$(t) {
18651
+ function Y2(t) {
18652
18652
  if (t === "")
18653
18653
  return !0;
18654
18654
  if (t.length % 4 !== 0)
@@ -18663,7 +18663,7 @@ const ej = /* @__PURE__ */ re("$ZodBase64", (t, e) => {
18663
18663
  e.pattern ?? (e.pattern = lz), Nt.init(t, e), t._zod.onattach.push((r) => {
18664
18664
  r._zod.bag.contentEncoding = "base64";
18665
18665
  }), t._zod.check = (r) => {
18666
- Y$(r.value) || r.issues.push({
18666
+ Y2(r.value) || r.issues.push({
18667
18667
  code: "invalid_format",
18668
18668
  format: "base64",
18669
18669
  input: r.value,
@@ -18673,13 +18673,13 @@ const ej = /* @__PURE__ */ re("$ZodBase64", (t, e) => {
18673
18673
  };
18674
18674
  });
18675
18675
  function tj(t) {
18676
- if (!z$.test(t))
18676
+ if (!z2.test(t))
18677
18677
  return !1;
18678
18678
  const e = t.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = e.padEnd(Math.ceil(e.length / 4) * 4, "=");
18679
- return Y$(r);
18679
+ return Y2(r);
18680
18680
  }
18681
18681
  const rj = /* @__PURE__ */ re("$ZodBase64URL", (t, e) => {
18682
- e.pattern ?? (e.pattern = z$), Nt.init(t, e), t._zod.onattach.push((r) => {
18682
+ e.pattern ?? (e.pattern = z2), Nt.init(t, e), t._zod.onattach.push((r) => {
18683
18683
  r._zod.bag.contentEncoding = "base64url";
18684
18684
  }), t._zod.check = (r) => {
18685
18685
  tj(r.value) || r.issues.push({
@@ -18717,7 +18717,7 @@ const sj = /* @__PURE__ */ re("$ZodJWT", (t, e) => {
18717
18717
  continue: !e.abort
18718
18718
  });
18719
18719
  };
18720
- }), X$ = /* @__PURE__ */ re("$ZodNumber", (t, e) => {
18720
+ }), X2 = /* @__PURE__ */ re("$ZodNumber", (t, e) => {
18721
18721
  rr.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? vz, t._zod.parse = (r, n) => {
18722
18722
  if (e.coerce)
18723
18723
  try {
@@ -18737,7 +18737,7 @@ const sj = /* @__PURE__ */ re("$ZodJWT", (t, e) => {
18737
18737
  }), r;
18738
18738
  };
18739
18739
  }), oj = /* @__PURE__ */ re("$ZodNumber", (t, e) => {
18740
- bz.init(t, e), X$.init(t, e);
18740
+ bz.init(t, e), X2.init(t, e);
18741
18741
  }), aj = /* @__PURE__ */ re("$ZodUnknown", (t, e) => {
18742
18742
  rr.init(t, e), t._zod.parse = (r) => r;
18743
18743
  }), cj = /* @__PURE__ */ re("$ZodNever", (t, e) => {
@@ -18749,7 +18749,7 @@ const sj = /* @__PURE__ */ re("$ZodJWT", (t, e) => {
18749
18749
  }), r);
18750
18750
  });
18751
18751
  function zT(t, e, r) {
18752
- t.issues.length && e.issues.push(...B$(r, t.issues)), e.value[r] = t.value;
18752
+ t.issues.length && e.issues.push(...B2(r, t.issues)), e.value[r] = t.value;
18753
18753
  }
18754
18754
  const uj = /* @__PURE__ */ re("$ZodArray", (t, e) => {
18755
18755
  rr.init(t, e), t._zod.parse = (r, n) => {
@@ -18774,9 +18774,9 @@ const uj = /* @__PURE__ */ re("$ZodArray", (t, e) => {
18774
18774
  };
18775
18775
  });
18776
18776
  function of(t, e, r, n) {
18777
- t.issues.length && e.issues.push(...B$(r, t.issues)), t.value === void 0 ? r in n && (e.value[r] = void 0) : e.value[r] = t.value;
18777
+ t.issues.length && e.issues.push(...B2(r, t.issues)), t.value === void 0 ? r in n && (e.value[r] = void 0) : e.value[r] = t.value;
18778
18778
  }
18779
- function J$(t) {
18779
+ function J2(t) {
18780
18780
  const e = Object.keys(t.shape);
18781
18781
  for (const n of e)
18782
18782
  if (!t.shape[n]._zod.traits.has("$ZodType"))
@@ -18790,7 +18790,7 @@ function J$(t) {
18790
18790
  optionalKeys: new Set(r)
18791
18791
  };
18792
18792
  }
18793
- function Q$(t, e, r, n, i, s) {
18793
+ function Q2(t, e, r, n, i, s) {
18794
18794
  const o = [], a = i.keySet, c = i.catchall._zod, u = c.def.type;
18795
18795
  for (const l of Object.keys(e)) {
18796
18796
  if (a.has(l))
@@ -18811,7 +18811,7 @@ function Q$(t, e, r, n, i, s) {
18811
18811
  }
18812
18812
  const lj = /* @__PURE__ */ re("$ZodObject", (t, e) => {
18813
18813
  rr.init(t, e);
18814
- const r = gp(() => J$(e));
18814
+ const r = gp(() => J2(e));
18815
18815
  vt(t._zod, "propValues", () => {
18816
18816
  const o = e.shape, a = {};
18817
18817
  for (const c in o) {
@@ -18842,11 +18842,11 @@ const lj = /* @__PURE__ */ re("$ZodObject", (t, e) => {
18842
18842
  const f = l[d]._zod.run({ value: c[d], issues: [] }, a);
18843
18843
  f instanceof Promise ? u.push(f.then((p) => of(p, o, d, c))) : of(f, o, d, c);
18844
18844
  }
18845
- return i ? Q$(u, c, o, a, r.value, t) : u.length ? Promise.all(u).then(() => o) : o;
18845
+ return i ? Q2(u, c, o, a, r.value, t) : u.length ? Promise.all(u).then(() => o) : o;
18846
18846
  };
18847
18847
  }), dj = /* @__PURE__ */ re("$ZodObjectJIT", (t, e) => {
18848
18848
  lj.init(t, e);
18849
- const r = t._zod.parse, n = gp(() => J$(e)), i = (h) => {
18849
+ const r = t._zod.parse, n = gp(() => J2(e)), i = (h) => {
18850
18850
  const f = new Oz(["shape", "payload", "ctx"]), p = n.value, g = (x) => {
18851
18851
  const P = VT(x);
18852
18852
  return `shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`;
@@ -18881,12 +18881,12 @@ const lj = /* @__PURE__ */ re("$ZodObject", (t, e) => {
18881
18881
  return (x, P) => m(h, x, P);
18882
18882
  };
18883
18883
  let s;
18884
- const o = $l, a = !L$.jitless, u = a && IG.value, l = e.catchall;
18884
+ const o = $l, a = !L2.jitless, u = a && IG.value, l = e.catchall;
18885
18885
  let d;
18886
18886
  t._zod.parse = (h, f) => {
18887
18887
  d ?? (d = n.value);
18888
18888
  const p = h.value;
18889
- return o(p) ? a && u && f?.async === !1 && f.jitless !== !0 ? (s || (s = i(e.shape)), h = s(h, f), l ? Q$([], p, h, f, d, t) : h) : r(h, f) : (h.issues.push({
18889
+ return o(p) ? a && u && f?.async === !1 && f.jitless !== !0 ? (s || (s = i(e.shape)), h = s(h, f), l ? Q2([], p, h, f, d, t) : h) : r(h, f) : (h.issues.push({
18890
18890
  expected: "object",
18891
18891
  code: "invalid_type",
18892
18892
  input: p,
@@ -18906,7 +18906,7 @@ function jT(t, e, r, n) {
18906
18906
  errors: t.map((s) => s.issues.map((o) => Aa(o, n, Ia())))
18907
18907
  }), e);
18908
18908
  }
18909
- const e2 = /* @__PURE__ */ re("$ZodUnion", (t, e) => {
18909
+ const e$ = /* @__PURE__ */ re("$ZodUnion", (t, e) => {
18910
18910
  rr.init(t, e), vt(t._zod, "optin", () => e.options.some((i) => i._zod.optin === "optional") ? "optional" : void 0), vt(t._zod, "optout", () => e.options.some((i) => i._zod.optout === "optional") ? "optional" : void 0), vt(t._zod, "values", () => {
18911
18911
  if (e.options.every((i) => i._zod.values))
18912
18912
  return new Set(e.options.flatMap((i) => Array.from(i._zod.values)));
@@ -18938,7 +18938,7 @@ const e2 = /* @__PURE__ */ re("$ZodUnion", (t, e) => {
18938
18938
  return o ? Promise.all(a).then((c) => jT(c, i, t, s)) : jT(a, i, t, s);
18939
18939
  };
18940
18940
  }), hj = /* @__PURE__ */ re("$ZodDiscriminatedUnion", (t, e) => {
18941
- e2.init(t, e);
18941
+ e$.init(t, e);
18942
18942
  const r = t._zod.parse;
18943
18943
  vt(t._zod, "propValues", () => {
18944
18944
  const i = {};
@@ -19064,7 +19064,7 @@ const pj = /* @__PURE__ */ re("$ZodEnum", (t, e) => {
19064
19064
  }), yj = /* @__PURE__ */ re("$ZodTransform", (t, e) => {
19065
19065
  rr.init(t, e), t._zod.parse = (r, n) => {
19066
19066
  if (n.direction === "backward")
19067
- throw new U$(t.constructor.name);
19067
+ throw new U2(t.constructor.name);
19068
19068
  const i = e.transform(r.value, r);
19069
19069
  if (n.async)
19070
19070
  return (i instanceof Promise ? i : Promise.resolve(i)).then((o) => (r.value = o, r));
@@ -19499,7 +19499,7 @@ function n7(t, e) {
19499
19499
  });
19500
19500
  }
19501
19501
  function QT(t, e) {
19502
- return new W$({
19502
+ return new W2({
19503
19503
  check: "less_than",
19504
19504
  ...ke(e),
19505
19505
  value: t,
@@ -19507,7 +19507,7 @@ function QT(t, e) {
19507
19507
  });
19508
19508
  }
19509
19509
  function av(t, e) {
19510
- return new W$({
19510
+ return new W2({
19511
19511
  check: "less_than",
19512
19512
  ...ke(e),
19513
19513
  value: t,
@@ -19515,7 +19515,7 @@ function av(t, e) {
19515
19515
  });
19516
19516
  }
19517
19517
  function eD(t, e) {
19518
- return new Z$({
19518
+ return new Z2({
19519
19519
  check: "greater_than",
19520
19520
  ...ke(e),
19521
19521
  value: t,
@@ -19523,7 +19523,7 @@ function eD(t, e) {
19523
19523
  });
19524
19524
  }
19525
19525
  function cv(t, e) {
19526
- return new Z$({
19526
+ return new Z2({
19527
19527
  check: "greater_than",
19528
19528
  ...ke(e),
19529
19529
  value: t,
@@ -19537,7 +19537,7 @@ function tD(t, e) {
19537
19537
  value: t
19538
19538
  });
19539
19539
  }
19540
- function t2(t, e) {
19540
+ function t$(t, e) {
19541
19541
  return new Ez({
19542
19542
  check: "max_length",
19543
19543
  ...ke(e),
@@ -19551,7 +19551,7 @@ function af(t, e) {
19551
19551
  minimum: t
19552
19552
  });
19553
19553
  }
19554
- function r2(t, e) {
19554
+ function r$(t, e) {
19555
19555
  return new xz({
19556
19556
  check: "length_equals",
19557
19557
  ...ke(e),
@@ -19683,7 +19683,7 @@ function x7(t) {
19683
19683
  return Qj(C7, t);
19684
19684
  }
19685
19685
  const I7 = (t, e) => {
19686
- V$.init(t, e), t.name = "ZodError", Object.defineProperties(t, {
19686
+ V2.init(t, e), t.name = "ZodError", Object.defineProperties(t, {
19687
19687
  format: {
19688
19688
  value: (r) => MG(t, r)
19689
19689
  // enumerable: false,
@@ -19735,18 +19735,18 @@ const I7 = (t, e) => {
19735
19735
  return Zd.get(t);
19736
19736
  const n = t.clone();
19737
19737
  return Zd.add(n, r[0]), n;
19738
- }, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), n2 = /* @__PURE__ */ re("_ZodString", (t, e) => {
19738
+ }, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), n$ = /* @__PURE__ */ re("_ZodString", (t, e) => {
19739
19739
  yC.init(t, e), ar.init(t, e);
19740
19740
  const r = t._zod.bag;
19741
- t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...n) => t.check(i7(...n)), t.includes = (...n) => t.check(a7(...n)), t.startsWith = (...n) => t.check(c7(...n)), t.endsWith = (...n) => t.check(u7(...n)), t.min = (...n) => t.check(af(...n)), t.max = (...n) => t.check(t2(...n)), t.length = (...n) => t.check(r2(...n)), t.nonempty = (...n) => t.check(af(1, ...n)), t.lowercase = (n) => t.check(s7(n)), t.uppercase = (n) => t.check(o7(n)), t.trim = () => t.check(d7()), t.normalize = (...n) => t.check(l7(...n)), t.toLowerCase = () => t.check(h7()), t.toUpperCase = () => t.check(f7());
19741
+ t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...n) => t.check(i7(...n)), t.includes = (...n) => t.check(a7(...n)), t.startsWith = (...n) => t.check(c7(...n)), t.endsWith = (...n) => t.check(u7(...n)), t.min = (...n) => t.check(af(...n)), t.max = (...n) => t.check(t$(...n)), t.length = (...n) => t.check(r$(...n)), t.nonempty = (...n) => t.check(af(1, ...n)), t.lowercase = (n) => t.check(s7(n)), t.uppercase = (n) => t.check(o7(n)), t.trim = () => t.check(d7()), t.normalize = (...n) => t.check(l7(...n)), t.toLowerCase = () => t.check(h7()), t.toUpperCase = () => t.check(f7());
19742
19742
  }), F7 = /* @__PURE__ */ re("ZodString", (t, e) => {
19743
- yC.init(t, e), n2.init(t, e), t.email = (r) => t.check(Dj(B7, r)), t.url = (r) => t.check(Nj(H7, r)), t.jwt = (r) => t.check(Zj(rK, r)), t.emoji = (r) => t.check($j(V7, r)), t.guid = (r) => t.check(JT(rD, r)), t.uuid = (r) => t.check(kj(Yd, r)), t.uuidv4 = (r) => t.check(Rj(Yd, r)), t.uuidv6 = (r) => t.check(Pj(Yd, r)), t.uuidv7 = (r) => t.check(Oj(Yd, r)), t.nanoid = (r) => t.check(Uj(G7, r)), t.guid = (r) => t.check(JT(rD, r)), t.cuid = (r) => t.check(Lj(z7, r)), t.cuid2 = (r) => t.check(Mj(j7, r)), t.ulid = (r) => t.check(Fj(K7, r)), t.base64 = (r) => t.check(Kj(Q7, r)), t.base64url = (r) => t.check(qj(eK, r)), t.xid = (r) => t.check(Bj(q7, r)), t.ksuid = (r) => t.check(Hj(W7, r)), t.ipv4 = (r) => t.check(Vj(Z7, r)), t.ipv6 = (r) => t.check(Gj(Y7, r)), t.cidrv4 = (r) => t.check(zj(X7, r)), t.cidrv6 = (r) => t.check(jj(J7, r)), t.e164 = (r) => t.check(Wj(tK, r)), t.datetime = (r) => t.check(_7(r)), t.date = (r) => t.check(S7(r)), t.time = (r) => t.check(E7(r)), t.duration = (r) => t.check(x7(r));
19743
+ yC.init(t, e), n$.init(t, e), t.email = (r) => t.check(Dj(B7, r)), t.url = (r) => t.check(Nj(H7, r)), t.jwt = (r) => t.check(Zj(rK, r)), t.emoji = (r) => t.check($j(V7, r)), t.guid = (r) => t.check(JT(rD, r)), t.uuid = (r) => t.check(kj(Yd, r)), t.uuidv4 = (r) => t.check(Rj(Yd, r)), t.uuidv6 = (r) => t.check(Pj(Yd, r)), t.uuidv7 = (r) => t.check(Oj(Yd, r)), t.nanoid = (r) => t.check(Uj(G7, r)), t.guid = (r) => t.check(JT(rD, r)), t.cuid = (r) => t.check(Lj(z7, r)), t.cuid2 = (r) => t.check(Mj(j7, r)), t.ulid = (r) => t.check(Fj(K7, r)), t.base64 = (r) => t.check(Kj(Q7, r)), t.base64url = (r) => t.check(qj(eK, r)), t.xid = (r) => t.check(Bj(q7, r)), t.ksuid = (r) => t.check(Hj(W7, r)), t.ipv4 = (r) => t.check(Vj(Z7, r)), t.ipv6 = (r) => t.check(Gj(Y7, r)), t.cidrv4 = (r) => t.check(zj(X7, r)), t.cidrv6 = (r) => t.check(jj(J7, r)), t.e164 = (r) => t.check(Wj(tK, r)), t.datetime = (r) => t.check(_7(r)), t.date = (r) => t.check(S7(r)), t.time = (r) => t.check(E7(r)), t.duration = (r) => t.check(x7(r));
19744
19744
  });
19745
19745
  function Fe(t) {
19746
19746
  return Tj(F7, t);
19747
19747
  }
19748
19748
  const Vt = /* @__PURE__ */ re("ZodStringFormat", (t, e) => {
19749
- Nt.init(t, e), n2.init(t, e);
19749
+ Nt.init(t, e), n$.init(t, e);
19750
19750
  }), B7 = /* @__PURE__ */ re("ZodEmail", (t, e) => {
19751
19751
  Lz.init(t, e), Vt.init(t, e);
19752
19752
  }), rD = /* @__PURE__ */ re("ZodGUID", (t, e) => {
@@ -19785,16 +19785,16 @@ const Vt = /* @__PURE__ */ re("ZodStringFormat", (t, e) => {
19785
19785
  nj.init(t, e), Vt.init(t, e);
19786
19786
  }), rK = /* @__PURE__ */ re("ZodJWT", (t, e) => {
19787
19787
  sj.init(t, e), Vt.init(t, e);
19788
- }), i2 = /* @__PURE__ */ re("ZodNumber", (t, e) => {
19789
- X$.init(t, e), ar.init(t, e), t.gt = (n, i) => t.check(eD(n, i)), t.gte = (n, i) => t.check(cv(n, i)), t.min = (n, i) => t.check(cv(n, i)), t.lt = (n, i) => t.check(QT(n, i)), t.lte = (n, i) => t.check(av(n, i)), t.max = (n, i) => t.check(av(n, i)), t.int = (n) => t.check(nD(n)), t.safe = (n) => t.check(nD(n)), t.positive = (n) => t.check(eD(0, n)), t.nonnegative = (n) => t.check(cv(0, n)), t.negative = (n) => t.check(QT(0, n)), t.nonpositive = (n) => t.check(av(0, n)), t.multipleOf = (n, i) => t.check(tD(n, i)), t.step = (n, i) => t.check(tD(n, i)), t.finite = () => t;
19788
+ }), i$ = /* @__PURE__ */ re("ZodNumber", (t, e) => {
19789
+ X2.init(t, e), ar.init(t, e), t.gt = (n, i) => t.check(eD(n, i)), t.gte = (n, i) => t.check(cv(n, i)), t.min = (n, i) => t.check(cv(n, i)), t.lt = (n, i) => t.check(QT(n, i)), t.lte = (n, i) => t.check(av(n, i)), t.max = (n, i) => t.check(av(n, i)), t.int = (n) => t.check(nD(n)), t.safe = (n) => t.check(nD(n)), t.positive = (n) => t.check(eD(0, n)), t.nonnegative = (n) => t.check(cv(0, n)), t.negative = (n) => t.check(QT(0, n)), t.nonpositive = (n) => t.check(av(0, n)), t.multipleOf = (n, i) => t.check(tD(n, i)), t.step = (n, i) => t.check(tD(n, i)), t.finite = () => t;
19790
19790
  const r = t._zod.bag;
19791
19791
  t.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), t.isFinite = !0, t.format = r.format ?? null;
19792
19792
  });
19793
19793
  function nK(t) {
19794
- return e7(i2, t);
19794
+ return e7(i$, t);
19795
19795
  }
19796
19796
  const iK = /* @__PURE__ */ re("ZodNumberFormat", (t, e) => {
19797
- oj.init(t, e), i2.init(t, e);
19797
+ oj.init(t, e), i$.init(t, e);
19798
19798
  });
19799
19799
  function nD(t) {
19800
19800
  return t7(iK, t);
@@ -19812,13 +19812,13 @@ function aK(t) {
19812
19812
  return n7(oK, t);
19813
19813
  }
19814
19814
  const cK = /* @__PURE__ */ re("ZodArray", (t, e) => {
19815
- uj.init(t, e), ar.init(t, e), t.element = e.element, t.min = (r, n) => t.check(af(r, n)), t.nonempty = (r) => t.check(af(1, r)), t.max = (r, n) => t.check(t2(r, n)), t.length = (r, n) => t.check(r2(r, n)), t.unwrap = () => t.element;
19815
+ uj.init(t, e), ar.init(t, e), t.element = e.element, t.min = (r, n) => t.check(af(r, n)), t.nonempty = (r) => t.check(af(1, r)), t.max = (r, n) => t.check(t$(r, n)), t.length = (r, n) => t.check(r$(r, n)), t.unwrap = () => t.element;
19816
19816
  });
19817
19817
  function Mh(t, e) {
19818
19818
  return p7(cK, t, e);
19819
19819
  }
19820
19820
  const uK = /* @__PURE__ */ re("ZodObject", (t, e) => {
19821
- dj.init(t, e), ar.init(t, e), vt(t, "shape", () => e.shape), t.keyof = () => xs(Object.keys(t._zod.def.shape)), t.catchall = (r) => t.clone({ ...t._zod.def, catchall: r }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: iD() }), t.loose = () => t.clone({ ...t._zod.def, catchall: iD() }), t.strict = () => t.clone({ ...t._zod.def, catchall: aK() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (r) => PG(t, r), t.safeExtend = (r) => OG(t, r), t.merge = (r) => NG(t, r), t.pick = (r) => kG(t, r), t.omit = (r) => RG(t, r), t.partial = (...r) => $G(o2, t, r[0]), t.required = (...r) => UG(a2, t, r[0]);
19821
+ dj.init(t, e), ar.init(t, e), vt(t, "shape", () => e.shape), t.keyof = () => xs(Object.keys(t._zod.def.shape)), t.catchall = (r) => t.clone({ ...t._zod.def, catchall: r }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: iD() }), t.loose = () => t.clone({ ...t._zod.def, catchall: iD() }), t.strict = () => t.clone({ ...t._zod.def, catchall: aK() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (r) => PG(t, r), t.safeExtend = (r) => OG(t, r), t.merge = (r) => NG(t, r), t.pick = (r) => kG(t, r), t.omit = (r) => RG(t, r), t.partial = (...r) => $G(o$, t, r[0]), t.required = (...r) => UG(a$, t, r[0]);
19822
19822
  });
19823
19823
  function Fh(t, e) {
19824
19824
  const r = {
@@ -19830,18 +19830,18 @@ function Fh(t, e) {
19830
19830
  };
19831
19831
  return new uK(r);
19832
19832
  }
19833
- const s2 = /* @__PURE__ */ re("ZodUnion", (t, e) => {
19834
- e2.init(t, e), ar.init(t, e), t.options = e.options;
19833
+ const s$ = /* @__PURE__ */ re("ZodUnion", (t, e) => {
19834
+ e$.init(t, e), ar.init(t, e), t.options = e.options;
19835
19835
  });
19836
19836
  function lK(t, e) {
19837
- return new s2({
19837
+ return new s$({
19838
19838
  type: "union",
19839
19839
  options: t,
19840
19840
  ...ke(e)
19841
19841
  });
19842
19842
  }
19843
19843
  const dK = /* @__PURE__ */ re("ZodDiscriminatedUnion", (t, e) => {
19844
- s2.init(t, e), hj.init(t, e);
19844
+ s$.init(t, e), hj.init(t, e);
19845
19845
  });
19846
19846
  function hK(t, e, r) {
19847
19847
  return new dK({
@@ -19919,7 +19919,7 @@ function pr(t, e) {
19919
19919
  const yK = /* @__PURE__ */ re("ZodTransform", (t, e) => {
19920
19920
  yj.init(t, e), ar.init(t, e), t._zod.parse = (r, n) => {
19921
19921
  if (n.direction === "backward")
19922
- throw new U$(t.constructor.name);
19922
+ throw new U2(t.constructor.name);
19923
19923
  r.addIssue = (s) => {
19924
19924
  if (typeof s == "string")
19925
19925
  r.issues.push(Ll(s, r.value, e));
@@ -19938,11 +19938,11 @@ function mK(t) {
19938
19938
  transform: t
19939
19939
  });
19940
19940
  }
19941
- const o2 = /* @__PURE__ */ re("ZodOptional", (t, e) => {
19941
+ const o$ = /* @__PURE__ */ re("ZodOptional", (t, e) => {
19942
19942
  mj.init(t, e), ar.init(t, e), t.unwrap = () => t._zod.def.innerType;
19943
19943
  });
19944
19944
  function sD(t) {
19945
- return new o2({
19945
+ return new o$({
19946
19946
  type: "optional",
19947
19947
  innerType: t
19948
19948
  });
@@ -19964,7 +19964,7 @@ function wK(t, e) {
19964
19964
  type: "default",
19965
19965
  innerType: t,
19966
19966
  get defaultValue() {
19967
- return typeof e == "function" ? e() : F$(e);
19967
+ return typeof e == "function" ? e() : F2(e);
19968
19968
  }
19969
19969
  });
19970
19970
  }
@@ -19976,15 +19976,15 @@ function bK(t, e) {
19976
19976
  type: "prefault",
19977
19977
  innerType: t,
19978
19978
  get defaultValue() {
19979
- return typeof e == "function" ? e() : F$(e);
19979
+ return typeof e == "function" ? e() : F2(e);
19980
19980
  }
19981
19981
  });
19982
19982
  }
19983
- const a2 = /* @__PURE__ */ re("ZodNonOptional", (t, e) => {
19983
+ const a$ = /* @__PURE__ */ re("ZodNonOptional", (t, e) => {
19984
19984
  Sj.init(t, e), ar.init(t, e), t.unwrap = () => t._zod.def.innerType;
19985
19985
  });
19986
19986
  function EK(t, e) {
19987
- return new a2({
19987
+ return new a$({
19988
19988
  type: "nonoptional",
19989
19989
  innerType: t,
19990
19990
  ...ke(e)
@@ -20454,10 +20454,10 @@ X_ = r9([
20454
20454
  ], X_);
20455
20455
  function n9({ stub: t }) {
20456
20456
  return new Ht(({ bind: e }) => {
20457
- e($$.CloudSyncService).to(X_).inSingletonScope();
20457
+ e($2.CloudSyncService).to(X_).inSingletonScope();
20458
20458
  });
20459
20459
  }
20460
- const i9 = "1.3.0", c2 = {
20460
+ const i9 = "1.3.2", c$ = {
20461
20461
  version: i9
20462
20462
  }, cr = {
20463
20463
  fatal: 0,
@@ -20486,7 +20486,7 @@ let J_ = class {
20486
20486
  }) {
20487
20487
  this.originToken = e, this.dAppIdentifier = r, this.logLevel = cr[n], this.environment = i, this.lkrp = {
20488
20488
  cloudSyncUrl: this.getCloudSyncUrl()
20489
- }, this.version = c2.version;
20489
+ }, this.version = c$.version;
20490
20490
  }
20491
20491
  getCloudSyncUrl() {
20492
20492
  return this.environment === "production" ? "https://cloud-sync-backend.api.aws.prd.ldg-tech.com" : "https://cloud-sync-backend.api.aws.stg.ldg-tech.com";
@@ -20751,16 +20751,16 @@ rw = w9([
20751
20751
  ue(),
20752
20752
  S9(0, F(me.LoggerPublisher))
20753
20753
  ], rw);
20754
- var u2 = ((t) => (t.Authenticate = "lkrp-authenticate", t))(u2 || {}), ro = ((t) => (t.OpenApp = "lkrp.steps.openApp", t.Authenticate = "lkrp.steps.authenticate", t.GetTrustchain = "lkrp.steps.getTrustchain", t.ExtractEncryptionKey = "lkrp.steps.extractEncryptionKey", t))(ro || {}), Bi = ((t) => (t[t.K256 = 0] = "K256", t[t.P256 = 1] = "P256", t))(Bi || {}), $i = ((t) => (t[t.AES256_GCM = 0] = "AES256_GCM", t))($i || {}), tu = ((t) => (t[t.SHA256 = 0] = "SHA256", t))(tu || {});
20754
+ var u$ = ((t) => (t.Authenticate = "lkrp-authenticate", t))(u$ || {}), ro = ((t) => (t.OpenApp = "lkrp.steps.openApp", t.Authenticate = "lkrp.steps.authenticate", t.GetTrustchain = "lkrp.steps.getTrustchain", t.ExtractEncryptionKey = "lkrp.steps.extractEncryptionKey", t))(ro || {}), Bi = ((t) => (t[t.K256 = 0] = "K256", t[t.P256 = 1] = "P256", t))(Bi || {}), $i = ((t) => (t[t.AES256_GCM = 0] = "AES256_GCM", t))($i || {}), tu = ((t) => (t[t.SHA256 = 0] = "SHA256", t))(tu || {});
20755
20755
  const b9 = 32, cf = 16;
20756
20756
  var uf = ((t) => (t[t.COMPACT = 0] = "COMPACT", t[t.DER = 1] = "DER", t))(uf || {});
20757
20757
  const Qa = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
20758
20758
  /*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
20759
- function l2(t) {
20759
+ function l$(t) {
20760
20760
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
20761
20761
  }
20762
20762
  function pn(t, ...e) {
20763
- if (!l2(t))
20763
+ if (!l$(t))
20764
20764
  throw new Error("Uint8Array expected");
20765
20765
  if (e.length > 0 && !e.includes(t.length))
20766
20766
  throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
@@ -20771,7 +20771,7 @@ function lf(t, e = !0) {
20771
20771
  if (e && t.finished)
20772
20772
  throw new Error("Hash#digest() has already been called");
20773
20773
  }
20774
- function d2(t, e) {
20774
+ function d$(t, e) {
20775
20775
  pn(t);
20776
20776
  const r = e.outputLen;
20777
20777
  if (t.length < r)
@@ -20799,7 +20799,7 @@ function x9(t) {
20799
20799
  function Ml(t) {
20800
20800
  if (typeof t == "string")
20801
20801
  t = x9(t);
20802
- else if (l2(t))
20802
+ else if (l$(t))
20803
20803
  t = Fl(t);
20804
20804
  else
20805
20805
  throw new Error("Uint8Array expected, got " + typeof t);
@@ -20873,14 +20873,14 @@ function df(t) {
20873
20873
  function Fl(t) {
20874
20874
  return Uint8Array.from(t);
20875
20875
  }
20876
- function h2(t = 32) {
20876
+ function h$(t = 32) {
20877
20877
  if (Qa && typeof Qa.getRandomValues == "function")
20878
20878
  return Qa.getRandomValues(new Uint8Array(t));
20879
20879
  if (Qa && typeof Qa.randomBytes == "function")
20880
20880
  return Uint8Array.from(Qa.randomBytes(t));
20881
20881
  throw new Error("crypto.getRandomValues must be defined");
20882
20882
  }
20883
- let f2 = class extends UE {
20883
+ let f$ = class extends UE {
20884
20884
  constructor(e, r) {
20885
20885
  super(), this.finished = !1, this.destroyed = !1, pN(e);
20886
20886
  const n = Jf(r);
@@ -20918,8 +20918,8 @@ let f2 = class extends UE {
20918
20918
  this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
20919
20919
  }
20920
20920
  };
20921
- const mC = (t, e, r) => new f2(t, e).update(r).digest();
20922
- mC.create = (t, e) => new f2(t, e);
20921
+ const mC = (t, e, r) => new f$(t, e).update(r).digest();
20922
+ mC.create = (t, e) => new f$(t, e);
20923
20923
  function k9(t, e, r, n) {
20924
20924
  if (typeof t.setBigUint64 == "function")
20925
20925
  return t.setBigUint64(e, r, n);
@@ -20932,7 +20932,7 @@ function R9(t, e, r) {
20932
20932
  function P9(t, e, r) {
20933
20933
  return t & e ^ t & r ^ e & r;
20934
20934
  }
20935
- class p2 extends UE {
20935
+ class p$ extends UE {
20936
20936
  constructor(e, r, n, i) {
20937
20937
  super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = r, this.padOffset = n, this.isLE = i, this.buffer = new Uint8Array(e), this.view = ey(this.buffer);
20938
20938
  }
@@ -21092,7 +21092,7 @@ const Os = /* @__PURE__ */ Uint32Array.from([
21092
21092
  3204031479,
21093
21093
  3329325298
21094
21094
  ]), Ns = /* @__PURE__ */ new Uint32Array(64);
21095
- let N9 = class extends p2 {
21095
+ let N9 = class extends p$ {
21096
21096
  constructor(e = 32) {
21097
21097
  super(64, e, 8, !1), this.A = Os[0] | 0, this.B = Os[1] | 0, this.C = Os[2] | 0, this.D = Os[3] | 0, this.E = Os[4] | 0, this.F = Os[5] | 0, this.G = Os[6] | 0, this.H = Os[7] | 0;
21098
21098
  }
@@ -21125,7 +21125,7 @@ let N9 = class extends p2 {
21125
21125
  this.set(0, 0, 0, 0, 0, 0, 0, 0), _o(this.buffer);
21126
21126
  }
21127
21127
  };
21128
- const g2 = fN([
21128
+ const g$ = fN([
21129
21129
  "0x428a2f98d728ae22",
21130
21130
  "0x7137449123ef65cd",
21131
21131
  "0xb5c0fbcfec4d3b2f",
@@ -21206,8 +21206,8 @@ const g2 = fN([
21206
21206
  "0x597f299cfc657e2a",
21207
21207
  "0x5fcb6fab3ad6faec",
21208
21208
  "0x6c44198c4a475817"
21209
- ].map((t) => BigInt(t))), $9 = g2[0], U9 = g2[1], $s = /* @__PURE__ */ new Uint32Array(80), Us = /* @__PURE__ */ new Uint32Array(80);
21210
- let y2 = class extends p2 {
21209
+ ].map((t) => BigInt(t))), $9 = g$[0], U9 = g$[1], $s = /* @__PURE__ */ new Uint32Array(80), Us = /* @__PURE__ */ new Uint32Array(80);
21210
+ let y$ = class extends p$ {
21211
21211
  constructor(e = 64) {
21212
21212
  super(128, e, 16, !1), this.Ah = Hr[0] | 0, this.Al = Hr[1] | 0, this.Bh = Hr[2] | 0, this.Bl = Hr[3] | 0, this.Ch = Hr[4] | 0, this.Cl = Hr[5] | 0, this.Dh = Hr[6] | 0, this.Dl = Hr[7] | 0, this.Eh = Hr[8] | 0, this.El = Hr[9] | 0, this.Fh = Hr[10] | 0, this.Fl = Hr[11] | 0, this.Gh = Hr[12] | 0, this.Gl = Hr[13] | 0, this.Hh = Hr[14] | 0, this.Hl = Hr[15] | 0;
21213
21213
  }
@@ -21243,12 +21243,12 @@ let y2 = class extends p2 {
21243
21243
  _o(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
21244
21244
  }
21245
21245
  };
21246
- class L9 extends y2 {
21246
+ class L9 extends y$ {
21247
21247
  constructor() {
21248
21248
  super(48), this.Ah = Br[0] | 0, this.Al = Br[1] | 0, this.Bh = Br[2] | 0, this.Bl = Br[3] | 0, this.Ch = Br[4] | 0, this.Cl = Br[5] | 0, this.Dh = Br[6] | 0, this.Dl = Br[7] | 0, this.Eh = Br[8] | 0, this.El = Br[9] | 0, this.Fh = Br[10] | 0, this.Fl = Br[11] | 0, this.Gh = Br[12] | 0, this.Gl = Br[13] | 0, this.Hh = Br[14] | 0, this.Hl = Br[15] | 0;
21249
21249
  }
21250
21250
  }
21251
- const vC = /* @__PURE__ */ Qf(() => new N9()), M9 = /* @__PURE__ */ Qf(() => new y2()), F9 = /* @__PURE__ */ Qf(() => new L9()), iw = vC, os = 16, _C = /* @__PURE__ */ new Uint8Array(16), Ti = ms(_C), B9 = 225, H9 = (t, e, r, n) => {
21251
+ const vC = /* @__PURE__ */ Qf(() => new N9()), M9 = /* @__PURE__ */ Qf(() => new y$()), F9 = /* @__PURE__ */ Qf(() => new L9()), iw = vC, os = 16, _C = /* @__PURE__ */ new Uint8Array(16), Ti = ms(_C), B9 = 225, H9 = (t, e, r, n) => {
21252
21252
  const i = n & 1;
21253
21253
  return {
21254
21254
  s3: r << 31 | n >>> 1,
@@ -21269,7 +21269,7 @@ function V9(t) {
21269
21269
  return t[0] ^= -e & 225, t;
21270
21270
  }
21271
21271
  const G9 = (t) => t > 64 * 1024 ? 8 : t > 1024 ? 4 : 2;
21272
- class m2 {
21272
+ class m$ {
21273
21273
  // We select bits per window adaptively based on expectedLength
21274
21274
  constructor(e, r) {
21275
21275
  this.blockLen = os, this.outputLen = os, this.s0 = 0, this.s1 = 0, this.s2 = 0, this.s3 = 0, this.finished = !1, e = Ml(e), pn(e, 16);
@@ -21325,7 +21325,7 @@ class m2 {
21325
21325
  r.s0 = 0, r.s1 = 0, r.s2 = 0, r.s3 = 0;
21326
21326
  }
21327
21327
  digestInto(e) {
21328
- lf(this), d2(e, this), this.finished = !0;
21328
+ lf(this), d$(e, this), this.finished = !0;
21329
21329
  const { s0: r, s1: n, s2: i, s3: s } = this, o = ms(e);
21330
21330
  return o[0] = r, o[1] = n, o[2] = i, o[3] = s, e;
21331
21331
  }
@@ -21334,7 +21334,7 @@ class m2 {
21334
21334
  return this.digestInto(e), this.destroy(), e;
21335
21335
  }
21336
21336
  }
21337
- class z9 extends m2 {
21337
+ class z9 extends m$ {
21338
21338
  constructor(e, r) {
21339
21339
  e = Ml(e), pn(e);
21340
21340
  const n = V9(Fl(e));
@@ -21348,17 +21348,17 @@ class z9 extends m2 {
21348
21348
  return n && (_C.set(e.subarray(i * os)), this._updateBlock(Kn(Ti[3]), Kn(Ti[2]), Kn(Ti[1]), Kn(Ti[0])), bs(Ti)), this;
21349
21349
  }
21350
21350
  digestInto(e) {
21351
- lf(this), d2(e, this), this.finished = !0;
21351
+ lf(this), d$(e, this), this.finished = !0;
21352
21352
  const { s0: r, s1: n, s2: i, s3: s } = this, o = ms(e);
21353
21353
  return o[0] = r, o[1] = n, o[2] = i, o[3] = s, e.reverse();
21354
21354
  }
21355
21355
  }
21356
- function v2(t) {
21356
+ function v$(t) {
21357
21357
  const e = (n, i) => t(i, n.length).update(Ml(n)).digest(), r = t(new Uint8Array(16), 0);
21358
21358
  return e.outputLen = r.outputLen, e.blockLen = r.blockLen, e.create = (n, i) => t(n, i), e;
21359
21359
  }
21360
- const fD = v2((t, e) => new m2(t, e));
21361
- v2((t, e) => new z9(t, e));
21360
+ const fD = v$((t, e) => new m$(t, e));
21361
+ v$((t, e) => new z9(t, e));
21362
21362
  const sw = 16, j9 = 4, Xd = /* @__PURE__ */ new Uint8Array(sw), K9 = 283;
21363
21363
  function wC(t) {
21364
21364
  return t << 1 ^ K9 & -(t >> 7);
@@ -21392,7 +21392,7 @@ function Z9(t, e) {
21392
21392
  }
21393
21393
  return { sbox: t, sbox2: c, T0: r, T1: n, T2: i, T3: s, T01: o, T23: a };
21394
21394
  }
21395
- const _2 = /* @__PURE__ */ Z9(q9, (t) => pD(t, 3) << 24 | t << 16 | t << 8 | pD(t, 2)), Y9 = /* @__PURE__ */ (() => {
21395
+ const _$ = /* @__PURE__ */ Z9(q9, (t) => pD(t, 3) << 24 | t << 16 | t << 8 | pD(t, 2)), Y9 = /* @__PURE__ */ (() => {
21396
21396
  const t = new Uint8Array(16);
21397
21397
  for (let e = 0, r = 1; e < 16; e++, r = wC(r))
21398
21398
  t[e] = r;
@@ -21403,7 +21403,7 @@ function X9(t) {
21403
21403
  const e = t.length;
21404
21404
  if (![16, 24, 32].includes(e))
21405
21405
  throw new Error("aes: invalid key size, should be 16, 24 or 32, got " + e);
21406
- const { sbox2: r } = _2, n = [];
21406
+ const { sbox2: r } = _$, n = [];
21407
21407
  df(t) || n.push(t = Fl(t));
21408
21408
  const i = ms(t), s = i.length, o = (c) => ol(r, c, c, c, c), a = new Uint32Array(e + 28);
21409
21409
  a.set(i);
@@ -21420,7 +21420,7 @@ function ol(t, e, r, n, i) {
21420
21420
  return t[e & 255 | r & 65280] | t[n >>> 16 & 255 | i >>> 16 & 65280] << 16;
21421
21421
  }
21422
21422
  function gD(t, e, r, n, i) {
21423
- const { sbox2: s, T01: o, T23: a } = _2;
21423
+ const { sbox2: s, T01: o, T23: a } = _$;
21424
21424
  let c = 0;
21425
21425
  e ^= t[c++], r ^= t[c++], n ^= t[c++], i ^= t[c++];
21426
21426
  const u = t.length / 4 - 2;
@@ -21501,7 +21501,7 @@ let mD = class ow {
21501
21501
  }
21502
21502
  static async generate(e = $i.AES256_GCM) {
21503
21503
  if (e !== $i.AES256_GCM) throw new Error(`Unsupported encryption algorithm ${e}`);
21504
- return new ow(h2(b9));
21504
+ return new ow(h$(b9));
21505
21505
  }
21506
21506
  static from(e, r = $i.AES256_GCM) {
21507
21507
  if (r !== $i.AES256_GCM) throw new Error(`Unsupported encryption algorithm ${r}`);
@@ -21535,21 +21535,21 @@ function eh(t) {
21535
21535
  const e = t.toString(16);
21536
21536
  return e.length & 1 ? "0" + e : e;
21537
21537
  }
21538
- function w2(t) {
21538
+ function w$(t) {
21539
21539
  if (typeof t != "string")
21540
21540
  throw new Error("hex string expected, got " + typeof t);
21541
21541
  return t === "" ? SC : BigInt("0x" + t);
21542
21542
  }
21543
21543
  function wp(t) {
21544
- return w2(Tc(t));
21544
+ return w$(Tc(t));
21545
21545
  }
21546
- function S2(t) {
21547
- return ws(t), w2(Tc(Uint8Array.from(t).reverse()));
21546
+ function S$(t) {
21547
+ return ws(t), w$(Tc(Uint8Array.from(t).reverse()));
21548
21548
  }
21549
21549
  function bC(t, e) {
21550
21550
  return rf(t.toString(16).padStart(e * 2, "0"));
21551
21551
  }
21552
- function b2(t, e) {
21552
+ function b$(t, e) {
21553
21553
  return bC(t, e).reverse();
21554
21554
  }
21555
21555
  function fn(t, e, r) {
@@ -21574,7 +21574,7 @@ function eq(t, e, r, n) {
21574
21574
  if (!Q9(e, r, n))
21575
21575
  throw new Error("expected valid " + t + ": " + r + " <= n < " + n + ", got " + e);
21576
21576
  }
21577
- function E2(t) {
21577
+ function E$(t) {
21578
21578
  let e;
21579
21579
  for (e = 0; t > SC; t >>= aw, e += 1)
21580
21580
  ;
@@ -21638,7 +21638,7 @@ function vD(t) {
21638
21638
  };
21639
21639
  }
21640
21640
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
21641
- const vn = BigInt(0), on = BigInt(1), Jo = /* @__PURE__ */ BigInt(2), C2 = /* @__PURE__ */ BigInt(3), x2 = /* @__PURE__ */ BigInt(4), I2 = /* @__PURE__ */ BigInt(5), rq = /* @__PURE__ */ BigInt(7), A2 = /* @__PURE__ */ BigInt(8), nq = /* @__PURE__ */ BigInt(9), T2 = /* @__PURE__ */ BigInt(16);
21641
+ const vn = BigInt(0), on = BigInt(1), Jo = /* @__PURE__ */ BigInt(2), C$ = /* @__PURE__ */ BigInt(3), x$ = /* @__PURE__ */ BigInt(4), I$ = /* @__PURE__ */ BigInt(5), rq = /* @__PURE__ */ BigInt(7), A$ = /* @__PURE__ */ BigInt(8), nq = /* @__PURE__ */ BigInt(9), T$ = /* @__PURE__ */ BigInt(16);
21642
21642
  function si(t, e) {
21643
21643
  const r = t % e;
21644
21644
  return r >= vn ? r : e + r;
@@ -21667,16 +21667,16 @@ function CC(t, e, r) {
21667
21667
  if (!t.eql(t.sqr(e), r))
21668
21668
  throw new Error("Cannot find square root");
21669
21669
  }
21670
- function D2(t, e) {
21671
- const r = (t.ORDER + on) / x2, n = t.pow(e, r);
21670
+ function D$(t, e) {
21671
+ const r = (t.ORDER + on) / x$, n = t.pow(e, r);
21672
21672
  return CC(t, n, e), n;
21673
21673
  }
21674
21674
  function iq(t, e) {
21675
- const r = (t.ORDER - I2) / A2, n = t.mul(e, Jo), i = t.pow(n, r), s = t.mul(e, i), o = t.mul(t.mul(s, Jo), i), a = t.mul(s, t.sub(o, t.ONE));
21675
+ const r = (t.ORDER - I$) / A$, n = t.mul(e, Jo), i = t.pow(n, r), s = t.mul(e, i), o = t.mul(t.mul(s, Jo), i), a = t.mul(s, t.sub(o, t.ONE));
21676
21676
  return CC(t, a, e), a;
21677
21677
  }
21678
21678
  function sq(t) {
21679
- const e = Po(t), r = k2(t), n = r(e, e.neg(e.ONE)), i = r(e, n), s = r(e, e.neg(n)), o = (t + rq) / T2;
21679
+ const e = Po(t), r = k$(t), n = r(e, e.neg(e.ONE)), i = r(e, n), s = r(e, e.neg(n)), o = (t + rq) / T$;
21680
21680
  return (a, c) => {
21681
21681
  let u = a.pow(c, o), l = a.mul(u, n);
21682
21682
  const d = a.mul(u, i), h = a.mul(u, s), f = a.eql(a.sqr(l), c), p = a.eql(a.sqr(d), c);
@@ -21685,8 +21685,8 @@ function sq(t) {
21685
21685
  return CC(a, _, c), _;
21686
21686
  };
21687
21687
  }
21688
- function k2(t) {
21689
- if (t < C2)
21688
+ function k$(t) {
21689
+ if (t < C$)
21690
21690
  throw new Error("sqrt is not defined for small field");
21691
21691
  let e = t - on, r = 0;
21692
21692
  for (; e % Jo === vn; )
@@ -21697,7 +21697,7 @@ function k2(t) {
21697
21697
  if (n++ > 1e3)
21698
21698
  throw new Error("Cannot find square root: probably non-prime P");
21699
21699
  if (r === 1)
21700
- return D2;
21700
+ return D$;
21701
21701
  let s = i.pow(n, e);
21702
21702
  const o = (e + on) / Jo;
21703
21703
  return function(c, u) {
@@ -21720,7 +21720,7 @@ function k2(t) {
21720
21720
  };
21721
21721
  }
21722
21722
  function oq(t) {
21723
- return t % x2 === C2 ? D2 : t % A2 === I2 ? iq : t % T2 === nq ? sq(t) : k2(t);
21723
+ return t % x$ === C$ ? D$ : t % A$ === I$ ? iq : t % T$ === nq ? sq(t) : k$(t);
21724
21724
  }
21725
21725
  const aq = [
21726
21726
  "create",
@@ -21762,7 +21762,7 @@ function uq(t, e, r) {
21762
21762
  r & on && (n = t.mul(n, i)), i = t.sqr(i), r >>= on;
21763
21763
  return n;
21764
21764
  }
21765
- function R2(t, e, r = !1) {
21765
+ function R$(t, e, r = !1) {
21766
21766
  const n = new Array(e.length).fill(r ? t.ZERO : void 0), i = e.reduce((o, a, c) => t.is0(a) ? o : (n[c] = o, t.mul(o, a)), t.ONE), s = t.inv(i);
21767
21767
  return e.reduceRight((o, a, c) => t.is0(a) ? o : (n[c] = t.mul(o, n[c]), t.mul(o, a)), s), n;
21768
21768
  }
@@ -21772,7 +21772,7 @@ function wD(t, e) {
21772
21772
  throw new Error("invalid Legendre symbol result");
21773
21773
  return i ? 1 : s ? 0 : -1;
21774
21774
  }
21775
- function P2(t, e) {
21775
+ function P$(t, e) {
21776
21776
  e !== void 0 && Ol(e);
21777
21777
  const r = e !== void 0 ? e : t.toString(2).length, n = Math.ceil(r / 8);
21778
21778
  return { nBitLength: r, nByteLength: n };
@@ -21788,7 +21788,7 @@ function Po(t, e, r = !1, n = {}) {
21788
21788
  h.BITS && (i = h.BITS), h.sqrt && (s = h.sqrt), typeof h.isLE == "boolean" && (r = h.isLE), typeof h.modFromBytes == "boolean" && (o = h.modFromBytes), a = h.allowedLengths;
21789
21789
  } else
21790
21790
  typeof e == "number" && (i = e), n.sqrt && (s = n.sqrt);
21791
- const { nBitLength: c, nByteLength: u } = P2(t, i);
21791
+ const { nBitLength: c, nByteLength: u } = P$(t, i);
21792
21792
  if (u > 2048)
21793
21793
  throw new Error("invalid field: expected ORDER of <= 2048 bytes");
21794
21794
  let l;
@@ -21826,7 +21826,7 @@ function Po(t, e, r = !1, n = {}) {
21826
21826
  mulN: (h, f) => h * f,
21827
21827
  inv: (h) => _D(h, t),
21828
21828
  sqrt: s || ((h) => (l || (l = oq(t)), l(d, h))),
21829
- toBytes: (h) => r ? b2(h, u) : bC(h, u),
21829
+ toBytes: (h) => r ? b$(h, u) : bC(h, u),
21830
21830
  fromBytes: (h, f = !0) => {
21831
21831
  if (a) {
21832
21832
  if (!a.includes(h.length) || h.length > u)
@@ -21836,35 +21836,35 @@ function Po(t, e, r = !1, n = {}) {
21836
21836
  }
21837
21837
  if (h.length !== u)
21838
21838
  throw new Error("Field.fromBytes: expected " + u + " bytes, got " + h.length);
21839
- let p = r ? S2(h) : wp(h);
21839
+ let p = r ? S$(h) : wp(h);
21840
21840
  if (o && (p = si(p, t)), !f && !d.isValid(p))
21841
21841
  throw new Error("invalid field element: outside of range 0..ORDER");
21842
21842
  return p;
21843
21843
  },
21844
21844
  // TODO: we don't need it here, move out to separate fn
21845
- invertBatch: (h) => R2(d, h),
21845
+ invertBatch: (h) => R$(d, h),
21846
21846
  // We can't move this out because Fp6, Fp12 implement it
21847
21847
  // and it's unclear what to return in there.
21848
21848
  cmov: (h, f, p) => p ? f : h
21849
21849
  });
21850
21850
  return Object.freeze(d);
21851
21851
  }
21852
- function O2(t) {
21852
+ function O$(t) {
21853
21853
  if (typeof t != "bigint")
21854
21854
  throw new Error("field order must be bigint");
21855
21855
  const e = t.toString(2).length;
21856
21856
  return Math.ceil(e / 8);
21857
21857
  }
21858
- function N2(t) {
21859
- const e = O2(t);
21858
+ function N$(t) {
21859
+ const e = O$(t);
21860
21860
  return e + Math.ceil(e / 2);
21861
21861
  }
21862
21862
  function lq(t, e, r = !1) {
21863
- const n = t.length, i = O2(e), s = N2(e);
21863
+ const n = t.length, i = O$(e), s = N$(e);
21864
21864
  if (n < 16 || n < s || n > 1024)
21865
21865
  throw new Error("expected " + s + "-1024 bytes of input, got " + n);
21866
- const o = r ? S2(t) : wp(t), a = si(o, e - on) + on;
21867
- return r ? b2(a, i) : bC(a, i);
21866
+ const o = r ? S$(t) : wp(t), a = si(o, e - on) + on;
21867
+ return r ? b$(a, i) : bC(a, i);
21868
21868
  }
21869
21869
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
21870
21870
  const ru = BigInt(0), Qo = BigInt(1);
@@ -21873,15 +21873,15 @@ function ff(t, e) {
21873
21873
  return t ? r : e;
21874
21874
  }
21875
21875
  function pv(t, e) {
21876
- const r = R2(t.Fp, e.map((n) => n.Z));
21876
+ const r = R$(t.Fp, e.map((n) => n.Z));
21877
21877
  return e.map((n, i) => t.fromAffine(n.toAffine(r[i])));
21878
21878
  }
21879
- function $2(t, e) {
21879
+ function $$(t, e) {
21880
21880
  if (!Number.isSafeInteger(t) || t <= 0 || t > e)
21881
21881
  throw new Error("invalid window size, expected [1.." + e + "], got W=" + t);
21882
21882
  }
21883
21883
  function gv(t, e) {
21884
- $2(t, e);
21884
+ $$(t, e);
21885
21885
  const r = Math.ceil(e / t) + 1, n = 2 ** (t - 1), i = 2 ** t, s = ud(t), o = BigInt(t);
21886
21886
  return { windows: r, windowSize: n, mask: s, maxNumber: i, shiftBy: o };
21887
21887
  }
@@ -21908,9 +21908,9 @@ function hq(t, e) {
21908
21908
  throw new Error("invalid scalar at index " + n);
21909
21909
  });
21910
21910
  }
21911
- const yv = /* @__PURE__ */ new WeakMap(), U2 = /* @__PURE__ */ new WeakMap();
21911
+ const yv = /* @__PURE__ */ new WeakMap(), U$ = /* @__PURE__ */ new WeakMap();
21912
21912
  function mv(t) {
21913
- return U2.get(t) || 1;
21913
+ return U$.get(t) || 1;
21914
21914
  }
21915
21915
  function bD(t) {
21916
21916
  if (t !== ru)
@@ -22000,7 +22000,7 @@ let fq = class {
22000
22000
  // using windowed method. This specifies window size and
22001
22001
  // stores precomputed values. Usually only base point would be precomputed.
22002
22002
  createCache(e, r) {
22003
- $2(r, this.bits), U2.set(e, r), yv.delete(e);
22003
+ $$(r, this.bits), U$.set(e, r), yv.delete(e);
22004
22004
  }
22005
22005
  hasCache(e) {
22006
22006
  return mv(e) !== 1;
@@ -22017,7 +22017,7 @@ function gq(t, e, r, n) {
22017
22017
  const i = r.length, s = n.length;
22018
22018
  if (i !== s)
22019
22019
  throw new Error("arrays of points and scalars must have equal length");
22020
- const o = t.ZERO, a = E2(BigInt(i));
22020
+ const o = t.ZERO, a = E$(BigInt(i));
22021
22021
  let c = 1;
22022
22022
  a > 12 ? c = a - 3 : a > 4 ? c = a - 2 : a > 0 && (c = 2);
22023
22023
  const u = ud(c), l = new Array(Number(u) + 1).fill(o), d = Math.floor((e.BITS - 1) / c) * c;
@@ -22060,13 +22060,13 @@ function yq(t, e, r = {}, n) {
22060
22060
  return e = Object.freeze(Object.assign({}, e)), { CURVE: e, Fp: i, Fn: s };
22061
22061
  }
22062
22062
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22063
- const CD = (t, e) => (t + (t >= 0 ? e : -e) / L2) / e;
22063
+ const CD = (t, e) => (t + (t >= 0 ? e : -e) / L$) / e;
22064
22064
  function mq(t, e, r) {
22065
22065
  const [[n, i], [s, o]] = e, a = CD(o * t, r), c = CD(-i * t, r);
22066
22066
  let u = t - a * n - c * s, l = -a * i - c * o;
22067
22067
  const d = u < fs, h = l < fs;
22068
22068
  d && (u = -u), h && (l = -l);
22069
- const f = ud(Math.ceil(E2(r) / 2)) + Uc;
22069
+ const f = ud(Math.ceil(E$(r) / 2)) + Uc;
22070
22070
  if (u < fs || u >= f || l < fs || l >= f)
22071
22071
  throw new Error("splitScalar (endomorphism): failed, k=" + t);
22072
22072
  return { k1neg: d, k1: u, k2neg: h, k2: l };
@@ -22174,7 +22174,7 @@ const as = {
22174
22174
  const { _tlv: e, _int: r } = as, n = e.encode(2, r.encode(t.r)), i = e.encode(2, r.encode(t.s)), s = n + i;
22175
22175
  return e.encode(48, s);
22176
22176
  }
22177
- }, fs = BigInt(0), Uc = BigInt(1), L2 = BigInt(2), th = BigInt(3), _q = BigInt(4);
22177
+ }, fs = BigInt(0), Uc = BigInt(1), L$ = BigInt(2), th = BigInt(3), _q = BigInt(4);
22178
22178
  function bc(t, e) {
22179
22179
  const { BYTES: r } = t;
22180
22180
  let n;
@@ -22208,7 +22208,7 @@ function wq(t, e = {}) {
22208
22208
  const { endo: c } = e;
22209
22209
  if (c && (!n.is0(s.a) || typeof c.beta != "bigint" || !Array.isArray(c.basises)))
22210
22210
  throw new Error('invalid endo: expected "beta": bigint and "basises": array');
22211
- const u = F2(n, i);
22211
+ const u = F$(n, i);
22212
22212
  function l() {
22213
22213
  if (!n.isOdd)
22214
22214
  throw new Error("compression is not supported: Field does not have .isOdd()");
@@ -22218,7 +22218,7 @@ function wq(t, e = {}) {
22218
22218
  if (hf(C, "isCompressed"), C) {
22219
22219
  l();
22220
22220
  const D = !n.isOdd(S);
22221
- return Ws(M2(D), k);
22221
+ return Ws(M$(D), k);
22222
22222
  } else
22223
22223
  return Ws(Uint8Array.of(4), k, n.toBytes(S));
22224
22224
  }
@@ -22505,10 +22505,10 @@ function wq(t, e = {}) {
22505
22505
  const b = i.BITS, O = new fq(w, e.endo ? Math.ceil(b / 2) : b);
22506
22506
  return w.BASE.precompute(8), w;
22507
22507
  }
22508
- function M2(t) {
22508
+ function M$(t) {
22509
22509
  return Uint8Array.of(t ? 2 : 3);
22510
22510
  }
22511
- function F2(t, e) {
22511
+ function F$(t, e) {
22512
22512
  return {
22513
22513
  secretKey: e.BYTES,
22514
22514
  publicKey: 1 + t.BYTES,
@@ -22518,7 +22518,7 @@ function F2(t, e) {
22518
22518
  };
22519
22519
  }
22520
22520
  function Sq(t, e = {}) {
22521
- const { Fn: r } = t, n = e.randomBytes || mN, i = Object.assign(F2(t.Fp, r), { seed: N2(r.ORDER) });
22521
+ const { Fn: r } = t, n = e.randomBytes || mN, i = Object.assign(F$(t.Fp, r), { seed: N$(r.ORDER) });
22522
22522
  function s(f) {
22523
22523
  try {
22524
22524
  return !!bc(r, f);
@@ -22631,12 +22631,12 @@ function bq(t, e, r = {}) {
22631
22631
  const S = s.ORDER, { r: k, s: D, recovery: $ } = this;
22632
22632
  if ($ == null || ![0, 1, 2, 3].includes($))
22633
22633
  throw new Error("recovery id invalid");
22634
- if (a * L2 < S && $ > 1)
22634
+ if (a * L$ < S && $ > 1)
22635
22635
  throw new Error("recovery id is ambiguous for h>1 curve");
22636
22636
  const B = $ === 2 || $ === 3 ? k + a : k;
22637
22637
  if (!s.isValid(B))
22638
22638
  throw new Error("recovery id 2 or 3 invalid");
22639
- const z = s.toBytes(B), V = t.fromBytes(Ws(M2(($ & 1) === 0), z)), J = o.inv(B), X = A(fn("msgHash", v)), Q = o.create(-X * J), he = o.create(D * J), Le = t.BASE.multiplyUnsafe(Q).add(V.multiplyUnsafe(he));
22639
+ const z = s.toBytes(B), V = t.fromBytes(Ws(M$(($ & 1) === 0), z)), J = o.inv(B), X = A(fn("msgHash", v)), Q = o.create(-X * J), he = o.create(D * J), Le = t.BASE.multiplyUnsafe(Q).add(V.multiplyUnsafe(he));
22640
22640
  if (Le.is0())
22641
22641
  throw new Error("point at infinify");
22642
22642
  return Le.assertValidity(), Le;
@@ -22828,7 +22828,7 @@ function xq(t, e) {
22828
22828
  const r = e.Point;
22829
22829
  return Object.assign({}, e, {
22830
22830
  ProjectivePoint: r,
22831
- CURVE: Object.assign({}, t, P2(r.Fn.ORDER, r.Fn.BITS))
22831
+ CURVE: Object.assign({}, t, P$(r.Fn.ORDER, r.Fn.BITS))
22832
22832
  });
22833
22833
  }
22834
22834
  function Iq(t) {
@@ -22841,7 +22841,7 @@ function Sp(t, e) {
22841
22841
  return { ...r(e), create: r };
22842
22842
  }
22843
22843
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22844
- const B2 = {
22844
+ const B$ = {
22845
22845
  p: BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),
22846
22846
  n: BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),
22847
22847
  h: BigInt(1),
@@ -22849,7 +22849,7 @@ const B2 = {
22849
22849
  b: BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),
22850
22850
  Gx: BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),
22851
22851
  Gy: BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")
22852
- }, H2 = {
22852
+ }, H$ = {
22853
22853
  p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),
22854
22854
  n: BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),
22855
22855
  h: BigInt(1),
@@ -22857,7 +22857,7 @@ const B2 = {
22857
22857
  b: BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),
22858
22858
  Gx: BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),
22859
22859
  Gy: BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")
22860
- }, V2 = {
22860
+ }, V$ = {
22861
22861
  p: BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
22862
22862
  n: BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),
22863
22863
  h: BigInt(1),
@@ -22865,9 +22865,9 @@ const B2 = {
22865
22865
  b: BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),
22866
22866
  Gx: BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),
22867
22867
  Gy: BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")
22868
- }, Aq = Po(B2.p), Tq = Po(H2.p), Dq = Po(V2.p), kq = Sp({ ...B2, Fp: Aq, lowS: !1 }, vC);
22869
- Sp({ ...H2, Fp: Tq, lowS: !1 }, F9);
22870
- Sp({ ...V2, Fp: Dq, lowS: !1, allowedPrivateKeyLengths: [130, 131, 132] }, M9);
22868
+ }, Aq = Po(B$.p), Tq = Po(H$.p), Dq = Po(V$.p), kq = Sp({ ...B$, Fp: Aq, lowS: !1 }, vC);
22869
+ Sp({ ...H$, Fp: Tq, lowS: !1 }, F9);
22870
+ Sp({ ...V$, Fp: Dq, lowS: !1, allowedPrivateKeyLengths: [130, 131, 132] }, M9);
22871
22871
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22872
22872
  const xC = {
22873
22873
  p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
@@ -22933,7 +22933,7 @@ let ID = class al {
22933
22933
  }
22934
22934
  }, bp = class {
22935
22935
  randomBytes(e) {
22936
- return h2(e);
22936
+ return h$(e);
22937
22937
  }
22938
22938
  hash(e, r) {
22939
22939
  switch (r) {
@@ -22982,7 +22982,7 @@ let IC = class extends Dt {
22982
22982
  super(e), this.message = e;
22983
22983
  }
22984
22984
  _tag = "LedgerKeyringProtocolError";
22985
- }, G2 = class extends Dt {
22985
+ }, G$ = class extends Dt {
22986
22986
  constructor(e = "Ledger Sync must be initialized from Ledger Live with this device.") {
22987
22987
  super(e), this.message = e;
22988
22988
  }
@@ -23012,7 +23012,7 @@ let IC = class extends Dt {
23012
23012
  _tag = "LedgerKeyringProtocolError";
23013
23013
  };
23014
23014
  var cl = ((t) => (t[t.OWNER = 4294967295] = "OWNER", t[t.CAN_ENCRYPT = 1] = "CAN_ENCRYPT", t[t.CAN_DERIVE = 2] = "CAN_DERIVE", t[t.CAN_ADD_BLOCK = 4] = "CAN_ADD_BLOCK", t))(cl || {});
23015
- const z2 = { AppBinding: Symbol.for("AppBinder") }, fo = { Dmk: Symbol.for("Dmk"), ApplicationId: Symbol.for("ApplicationId"), CryptoService: Symbol.for("CryptoService") }, pf = { LKRPDataSource: Symbol.for("LKRPDataSource"), BaseUrl: Symbol.for("BaseUrl") };
23015
+ const z$ = { AppBinding: Symbol.for("AppBinder") }, fo = { Dmk: Symbol.for("Dmk"), ApplicationId: Symbol.for("ApplicationId"), CryptoService: Symbol.for("CryptoService") }, pf = { LKRPDataSource: Symbol.for("LKRPDataSource"), BaseUrl: Symbol.for("BaseUrl") };
23016
23016
  let Ki = class {
23017
23017
  constructor(e, r, n = Cr.isSuccessResponse) {
23018
23018
  this._errors = e, this._errorFactory = r, this._isSuccessResponse = n;
@@ -23043,11 +23043,11 @@ let Lq = class {
23043
23043
  return ee(r ? { data: { version: r } } : { error: new Ge("Version is missing") });
23044
23044
  });
23045
23045
  }
23046
- }, j2 = class {
23046
+ }, j$ = class {
23047
23047
  run(e, r) {
23048
23048
  return e.getChallenge().chain((n) => r.run(n)).chain((n) => e.authenticate(n)).run();
23049
23049
  }
23050
- }, K2 = class {
23050
+ }, K$ = class {
23051
23051
  async run(e, r, n) {
23052
23052
  return (await n.getPublishedKey(e, r)).map((i) => i.privateKey).toEither(new Yn("There is no encryption key for the current member in the application stream."));
23053
23053
  }
@@ -23723,7 +23723,7 @@ let AC = class {
23723
23723
  return Lr({ actors: { initCommand: We(r), parseStream: We(n), signBlock: We(i) }, actions: { assignErrorFromEvent: Qr(({ event: s }) => M(new Yn(String(s.error)))) }, guards: { isTustchainEmpty: ({ context: s }) => s.input.toMaybe().chain((o) => o.trustchain.getAppStream(o.appId)).chain((o) => o.parse().toMaybe()).map((o) => o.length === 0).orDefault(!0) } }).createMachine({ id: "AddToTrustchainDeviceAction", context: ({ input: s }) => ({ input: s, intermediateValue: { requiredUserInteraction: ce.None }, _internalState: q({ sessionKeypair: null }) }), initial: "InitSession", states: { InitSession: { entry: W({ intermediateValue: { requiredUserInteraction: ce.None, step: ul.Initialize } }), on: { success: "ParseStream", error: "Error" }, invoke: { id: "initCommand", src: "initCommand", input: ({ context: s }) => s.input.map((o) => o.cryptoService), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map((o) => ({ raise: "success", assign: { sessionKeypair: o } }))) } } }, ParseStream: { entry: W({ intermediateValue: { requiredUserInteraction: ce.None, step: ul.ParseStream } }), on: { success: "CheckApplicationStreamExist", error: "Error" }, invoke: { id: "parseStream", src: "parseStream", input: ({ context: s }) => s.input.chain((o) => zt({ seedBlock: () => mt(o.trustchain.getRootStream().chain((a) => a.parse().toMaybe()).extract()?.[0], "Missing seed block to parse"), applicationStream: () => mt(o.trustchain.getAppStream(o.appId).extract(), "Missing application stream to parse") })), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, CheckApplicationStreamExist: { always: [{ target: "AddToNewStream", guard: "isTustchainEmpty" }, { target: "AddToExistingStream" }] }, AddToExistingStream: { entry: W({ intermediateValue: { requiredUserInteraction: lw.AddMember, step: ul.AddMember } }), on: { success: "Success", error: "Error" }, invoke: { id: "signBlock", src: "signBlock", input: ({ context: s }) => s.input.chain((o) => {
23724
23724
  const a = o.trustchain.getAppStream(o.appId);
23725
23725
  return zt({ cryptoService: o.cryptoService, lkrpDataSource: o.lkrpDataSource, trustchainId: o.trustchain.getId(), jwt: o.jwt, clientName: o.clientName, sessionKeypair: () => s._internalState.chain(({ sessionKeypair: c }) => mt(c, "Missing session keyPair")), path: () => mt(a.chain((c) => c.getPath()).extract(), "Missing application path"), parent: () => mt(a.chain((c) => c.parse().toMaybe()).chainNullable((c) => c.at(-1)?.hash()).chainNullable(Mt).extract(), "Missing parent block"), blockFlow: { type: "addMember", data: { name: o.clientName, publicKey: o.keyPair.getPublicKey(), permissions: o.permissions } } });
23726
- }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, AddToNewStream: { entry: W({ intermediateValue: { requiredUserInteraction: lw.AddMember, step: ul.AddMember } }), on: { success: "Success", error: "Error" }, invoke: { id: "signBlock", src: "signBlock", input: ({ context: s }) => s.input.chain((o) => zt({ lkrpDataSource: o.lkrpDataSource, trustchainId: o.trustchain.getId(), jwt: o.jwt, clientName: o.clientName, sessionKeypair: () => s._internalState.chain(({ sessionKeypair: a }) => mt(a, "Missing session keyPair")), path: `m/0'/${o.appId}'/0'`, parent: () => mt(o.trustchain.getRootStream().chain((a) => a.parse().toMaybe()).chainNullable((a) => a[0]?.hash()).chainNullable(Mt).extract(), "Missing init block"), blockFlow: { type: "derive", data: { name: o.clientName, publicKey: o.keyPair.getPublicKey(), permissions: o.permissions } } }).chain(() => M(new G2()))), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, Success: { type: "final" }, Error: { type: "final" } }, output: ({ context: s }) => s._internalState.map((o) => {
23726
+ }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, AddToNewStream: { entry: W({ intermediateValue: { requiredUserInteraction: lw.AddMember, step: ul.AddMember } }), on: { success: "Success", error: "Error" }, invoke: { id: "signBlock", src: "signBlock", input: ({ context: s }) => s.input.chain((o) => zt({ lkrpDataSource: o.lkrpDataSource, trustchainId: o.trustchain.getId(), jwt: o.jwt, clientName: o.clientName, sessionKeypair: () => s._internalState.chain(({ sessionKeypair: a }) => mt(a, "Missing session keyPair")), path: `m/0'/${o.appId}'/0'`, parent: () => mt(o.trustchain.getRootStream().chain((a) => a.parse().toMaybe()).chainNullable((a) => a[0]?.hash()).chainNullable(Mt).extract(), "Missing init block"), blockFlow: { type: "derive", data: { name: o.clientName, publicKey: o.keyPair.getPublicKey(), permissions: o.permissions } } }).chain(() => M(new G$()))), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, Success: { type: "final" }, Error: { type: "final" } }, output: ({ context: s }) => s._internalState.map((o) => {
23727
23727
  }) });
23728
23728
  }
23729
23729
  extractDependencies(e) {
@@ -23734,10 +23734,10 @@ const kD = "Ledger Sync";
23734
23734
  let nW = class extends qr {
23735
23735
  makeStateMachine(e) {
23736
23736
  const { deviceAuth: r, getTrustchain: n, extractEncryptionKey: i } = this.extractDependencies(e);
23737
- return Lr({ actors: { openAppStateMachine: new Ma({ input: { appName: kD } }).makeStateMachine(e), deviceAuth: We(r), getTrustchain: We(n), addToTrustchainStateMachine: new rW({ input: M(new da("Missing input for GetEncryptionKey")) }).makeStateMachine(e), extractEncryptionKey: We(i) }, actions: { assignErrorFromEvent: Qr(({ event: s }) => M(new Yn(String(s.error)))) }, guards: { isTrustchainMember: ({ context: s }) => s._internalState.toMaybe().map((o) => o.wasAddedToTrustchain || o.trustchain?.getAppStream(s.input.appId).mapOrDefault((a) => a.hasMember(s.input.keyPair.getPublicKeyToHex()), !1)).extract() ?? !1 } }).createMachine({ id: "AuthenticateWithDeviceDeviceAction", context: ({ input: s }) => ({ input: s, intermediateValue: { requiredUserInteraction: ce.None }, _internalState: q({ trustchainId: null, jwt: null, trustchain: null, encryptionKey: null, wasAddedToTrustchain: !1 }) }), initial: "OpenApp", states: { OpenApp: { on: { success: "DeviceAuth", error: "Error" }, invoke: { id: "openApp", src: "openAppStateMachine", onSnapshot: { actions: W({ intermediateValue: ({ event: s }) => ({ ...s.snapshot.context.intermediateValue, step: ro.OpenApp }) }) }, input: { appName: kD }, onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, DeviceAuth: { entry: W({ intermediateValue: { step: ro.Authenticate, requiredUserInteraction: u2.Authenticate } }), on: { success: "GetTrustchain", error: "Error" }, invoke: { id: "deviceAuth", src: "deviceAuth", input: ({ context: s }) => s.input, onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.chain((o) => o.trustchainId.caseOf({ Nothing: () => M(new G2()), Just: (a) => q({ raise: "success", assign: { jwt: o.jwt, trustchainId: a } }) }))) } } }, GetTrustchain: { entry: W({ intermediateValue: { step: ro.GetTrustchain, requiredUserInteraction: ce.None } }), on: { success: "CheckIsMembers", error: "Error" }, invoke: { id: "getTrustchain", src: "getTrustchain", input: ({ context: s }) => s._internalState.chain((o) => zt({ lkrpDataSource: s.input.lkrpDataSource, trustchainId: () => mt(o.trustchainId, "Missing Trustchain ID for GetTrustchain"), jwt: () => mt(o.jwt, "Missing JWT for GetTrustchain") })), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map((o) => ({ raise: "success", assign: { trustchain: o } }))) } } }, CheckIsMembers: { always: [{ target: "ExtractEncryptionKey", guard: "isTrustchainMember" }, { target: "AddToTrustchain" }] }, AddToTrustchain: { on: { success: "GetTrustchain", error: "Error" }, invoke: { id: "AddToTrustchain", src: "addToTrustchainStateMachine", onSnapshot: { actions: W({ intermediateValue: ({ event: s }) => s.snapshot.context.intermediateValue }) }, input: ({ context: s }) => s._internalState.mapLeft(() => new da("Missing data in the input for AddToTrustchain")).chain((o) => zt({ lkrpDataSource: s.input.lkrpDataSource, cryptoService: s.input.cryptoService, keyPair: s.input.keyPair, clientName: s.input.clientName, permissions: s.input.permissions, jwt: () => mt(o.jwt, "Missing JWT for AddToTrustchain"), appId: s.input.appId, trustchain: () => mt(o.trustchain, "Missing Trustchain for AddToTrustchain") })), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success", assign: { wasAddedToTrustchain: !0 } }))) } } }, ExtractEncryptionKey: { entry: W({ intermediateValue: { step: ro.ExtractEncryptionKey, requiredUserInteraction: ce.None } }), on: { success: "Success", error: "Error" }, invoke: { id: "ExtractEncryptionKey", src: "extractEncryptionKey", input: ({ context: s }) => ({ cryptoService: s.input.cryptoService, keyPair: s.input.keyPair, stream: s._internalState.chain(({ trustchain: o }) => mt(o?.getAppStream(s.input.appId).extract(), "Missing application stream for ExtractEncryptionKey")) }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map((o) => ({ raise: "success", assign: { encryptionKey: o } }))) } } }, Success: { type: "final" }, Error: { type: "final" } }, output: ({ context: s }) => s._internalState.chain((o) => zt({ trustchainId: () => mt(o.trustchainId, "Missing Trustchain ID in the output"), jwt: () => mt(o.jwt, "Missing JWT in the output"), applicationPath: () => mt(o.trustchain?.getAppStream(s.input.appId).chain((a) => a.getPath()).extract(), "Missing application path in the output"), encryptionKey: () => mt(o.encryptionKey, "Missing encryption key in the output") })) });
23737
+ return Lr({ actors: { openAppStateMachine: new Ma({ input: { appName: kD } }).makeStateMachine(e), deviceAuth: We(r), getTrustchain: We(n), addToTrustchainStateMachine: new rW({ input: M(new da("Missing input for GetEncryptionKey")) }).makeStateMachine(e), extractEncryptionKey: We(i) }, actions: { assignErrorFromEvent: Qr(({ event: s }) => M(new Yn(String(s.error)))) }, guards: { isTrustchainMember: ({ context: s }) => s._internalState.toMaybe().map((o) => o.wasAddedToTrustchain || o.trustchain?.getAppStream(s.input.appId).mapOrDefault((a) => a.hasMember(s.input.keyPair.getPublicKeyToHex()), !1)).extract() ?? !1 } }).createMachine({ id: "AuthenticateWithDeviceDeviceAction", context: ({ input: s }) => ({ input: s, intermediateValue: { requiredUserInteraction: ce.None }, _internalState: q({ trustchainId: null, jwt: null, trustchain: null, encryptionKey: null, wasAddedToTrustchain: !1 }) }), initial: "OpenApp", states: { OpenApp: { on: { success: "DeviceAuth", error: "Error" }, invoke: { id: "openApp", src: "openAppStateMachine", onSnapshot: { actions: W({ intermediateValue: ({ event: s }) => ({ ...s.snapshot.context.intermediateValue, step: ro.OpenApp }) }) }, input: { appName: kD }, onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success" }))) } } }, DeviceAuth: { entry: W({ intermediateValue: { step: ro.Authenticate, requiredUserInteraction: u$.Authenticate } }), on: { success: "GetTrustchain", error: "Error" }, invoke: { id: "deviceAuth", src: "deviceAuth", input: ({ context: s }) => s.input, onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.chain((o) => o.trustchainId.caseOf({ Nothing: () => M(new G$()), Just: (a) => q({ raise: "success", assign: { jwt: o.jwt, trustchainId: a } }) }))) } } }, GetTrustchain: { entry: W({ intermediateValue: { step: ro.GetTrustchain, requiredUserInteraction: ce.None } }), on: { success: "CheckIsMembers", error: "Error" }, invoke: { id: "getTrustchain", src: "getTrustchain", input: ({ context: s }) => s._internalState.chain((o) => zt({ lkrpDataSource: s.input.lkrpDataSource, trustchainId: () => mt(o.trustchainId, "Missing Trustchain ID for GetTrustchain"), jwt: () => mt(o.jwt, "Missing JWT for GetTrustchain") })), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map((o) => ({ raise: "success", assign: { trustchain: o } }))) } } }, CheckIsMembers: { always: [{ target: "ExtractEncryptionKey", guard: "isTrustchainMember" }, { target: "AddToTrustchain" }] }, AddToTrustchain: { on: { success: "GetTrustchain", error: "Error" }, invoke: { id: "AddToTrustchain", src: "addToTrustchainStateMachine", onSnapshot: { actions: W({ intermediateValue: ({ event: s }) => s.snapshot.context.intermediateValue }) }, input: ({ context: s }) => s._internalState.mapLeft(() => new da("Missing data in the input for AddToTrustchain")).chain((o) => zt({ lkrpDataSource: s.input.lkrpDataSource, cryptoService: s.input.cryptoService, keyPair: s.input.keyPair, clientName: s.input.clientName, permissions: s.input.permissions, jwt: () => mt(o.jwt, "Missing JWT for AddToTrustchain"), appId: s.input.appId, trustchain: () => mt(o.trustchain, "Missing Trustchain for AddToTrustchain") })), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map(() => ({ raise: "success", assign: { wasAddedToTrustchain: !0 } }))) } } }, ExtractEncryptionKey: { entry: W({ intermediateValue: { step: ro.ExtractEncryptionKey, requiredUserInteraction: ce.None } }), on: { success: "Success", error: "Error" }, invoke: { id: "ExtractEncryptionKey", src: "extractEncryptionKey", input: ({ context: s }) => ({ cryptoService: s.input.cryptoService, keyPair: s.input.keyPair, stream: s._internalState.chain(({ trustchain: o }) => mt(o?.getAppStream(s.input.appId).extract(), "Missing application stream for ExtractEncryptionKey")) }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: s }) => s.output.map((o) => ({ raise: "success", assign: { encryptionKey: o } }))) } } }, Success: { type: "final" }, Error: { type: "final" } }, output: ({ context: s }) => s._internalState.chain((o) => zt({ trustchainId: () => mt(o.trustchainId, "Missing Trustchain ID in the output"), jwt: () => mt(o.jwt, "Missing JWT in the output"), applicationPath: () => mt(o.trustchain?.getAppStream(s.input.appId).chain((a) => a.getPath()).extract(), "Missing application path in the output"), encryptionKey: () => mt(o.encryptionKey, "Missing encryption key in the output") })) });
23738
23738
  }
23739
23739
  extractDependencies(e) {
23740
- const r = new j2(), n = new K2();
23740
+ const r = new j$(), n = new K$();
23741
23741
  return { deviceAuth: ({ input: i }) => r.run(i.lkrpDataSource, new Bq(e)), getTrustchain: (i) => fe.liftEither(i.input).chain(({ lkrpDataSource: s, trustchainId: o, jwt: a }) => s.getTrustchainById(o, a)).run(), extractEncryptionKey: async ({ input: i }) => fe.liftEither(i.stream).chain((s) => n.run(i.cryptoService, i.keyPair, s)) };
23742
23742
  }
23743
23743
  }, iW = class {
@@ -23778,7 +23778,7 @@ class sW extends qr {
23778
23778
  return Lr({ actors: { keyPairAuth: We(e), getTrustchain: We(r), extractEncryptionKey: We(n) }, actions: { assignErrorFromEvent: Qr(({ event: i }) => M(new Yn(String(i.error)))) } }).createMachine({ id: "AuthenticateWithKeypairDeviceAction", context: ({ input: i }) => ({ input: i, intermediateValue: { requiredUserInteraction: ce.None }, _internalState: q({ jwt: null, trustchain: null, encryptionKey: null }) }), initial: "KeypairAuth", states: { KeypairAuth: { entry: W({ intermediateValue: { requiredUserInteraction: ce.None, step: ro.Authenticate } }), on: { success: "GetTrustchain", error: "Error" }, invoke: { id: "keyPairAuth", src: "keyPairAuth", input: ({ context: i }) => i.input, onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ context: i, event: s }) => s.output.map(({ jwt: o }) => ({ raise: "success", assign: { jwt: o } })).mapLeft((o) => o instanceof IC && o.status === "UNAUTHORIZED" ? new Nq(i.input.trustchainId) : o)) } } }, GetTrustchain: { entry: W({ intermediateValue: { requiredUserInteraction: ce.None, step: ro.GetTrustchain } }), on: { success: "ExtractEncryptionKey", error: "Error" }, invoke: { id: "getTrustchain", src: "getTrustchain", input: ({ context: i }) => ({ lkrpDataSource: i.input.lkrpDataSource, trustchainId: i.input.trustchainId, jwt: i._internalState.chain(({ jwt: s }) => mt(s, "Missing JWT for GetTrustchain")) }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: i }) => i.output.map((s) => ({ raise: "success", assign: { trustchain: s } }))) } } }, ExtractEncryptionKey: { entry: W({ intermediateValue: { requiredUserInteraction: ce.None, step: ro.ExtractEncryptionKey } }), on: { success: "Success", error: "Error" }, invoke: { id: "ExtractEncryptionKey", src: "extractEncryptionKey", input: ({ context: i }) => ({ cryptoService: i.input.cryptoService, keyPair: i.input.keyPair, stream: i._internalState.chain(({ trustchain: s }) => mt(s?.getAppStream(i.input.appId).extract(), "Missing application stream for ExtractEncryptionKey")) }), onError: { actions: "assignErrorFromEvent" }, onDone: { actions: Qr(({ event: i }) => i.output.map((s) => ({ raise: "success", assign: { encryptionKey: s } }))) } } }, Success: { type: "final" }, Error: { type: "final" } }, output: ({ context: i }) => i._internalState.chain((s) => zt({ trustchainId: i.input.trustchainId, jwt: () => mt(s.jwt, "Missing JWT in the output"), applicationPath: () => mt(s.trustchain?.getAppStream(i.input.appId).chain((o) => o.getPath()).extract(), "Missing application path in the output"), encryptionKey: () => mt(s.encryptionKey, "Missing encryption key in the output") })) });
23779
23779
  }
23780
23780
  extractDependencies() {
23781
- const e = new j2(), r = new K2();
23781
+ const e = new j$(), r = new K$();
23782
23782
  return { keyPairAuth: ({ input: n }) => e.run(n.lkrpDataSource, new iW(n.cryptoService, n.keyPair, n.trustchainId)), getTrustchain: ({ input: n }) => fe.liftEither(n.jwt).chain((i) => n.lkrpDataSource.getTrustchainById(n.trustchainId, i)).run(), extractEncryptionKey: async ({ input: n }) => fe.liftEither(n.stream).chain((i) => r.run(n.cryptoService, n.keyPair, i)) };
23783
23783
  }
23784
23784
  }
@@ -23820,7 +23820,7 @@ let gw = class {
23820
23820
  };
23821
23821
  gw = oW([ae(), rh(0, G(fo.Dmk)), rh(1, G(fo.ApplicationId)), rh(2, G(fo.CryptoService)), rh(3, G(pf.LKRPDataSource))], gw);
23822
23822
  const aW = () => new Ke(({ bind: t }) => {
23823
- t(z2.AppBinding).to(gw);
23823
+ t(z$.AppBinding).to(gw);
23824
23824
  });
23825
23825
  let cW = class yw {
23826
23826
  constructor(e, r) {
@@ -23999,7 +23999,7 @@ let vw = class {
23999
23999
  } };
24000
24000
  }
24001
24001
  };
24002
- vw = pW([ae(), gW(0, G(z2.AppBinding))], vw);
24002
+ vw = pW([ae(), gW(0, G(z$.AppBinding))], vw);
24003
24003
  var yW = (t, e, r, n) => {
24004
24004
  for (var i = e, s = t.length - 1, o; s >= 0; s--) (o = t[s]) && (i = o(i) || i);
24005
24005
  return i;
@@ -24587,7 +24587,7 @@ let WW = class {
24587
24587
  const n = r.device;
24588
24588
  if (!n.gatt) throw new xi("No GATT server available on device");
24589
24589
  n.gatt.connected || (await this._withTimeout(n.gatt.connect(), 6e3, "GATT connect timed out"), await this._sleep(150));
24590
- const { service: i, ledgerServiceInfo: s } = await this._getPrimaryLedgerGattService(n), { writeCharacteristic: o, notifyCharacteristic: a } = await this._resolveLedgerServiceCharacteristics(i, s), c = new qW({ writeCharacteristic: o, notifyCharacteristic: a, apduSenderFactory: this._apduSenderFactory, apduReceiverFactory: this._apduReceiverFactory }, this.loggerFactory), u = new n$({ deviceId: e.deviceId, deviceApduSender: c, timeoutDuration: VW, tryToReconnect: () => {
24590
+ const { service: i, ledgerServiceInfo: s } = await this._getPrimaryLedgerGattService(n), { writeCharacteristic: o, notifyCharacteristic: a } = await this._resolveLedgerServiceCharacteristics(i, s), c = new qW({ writeCharacteristic: o, notifyCharacteristic: a, apduSenderFactory: this._apduSenderFactory, apduReceiverFactory: this._apduReceiverFactory }, this.loggerFactory), u = new n2({ deviceId: e.deviceId, deviceApduSender: c, timeoutDuration: VW, tryToReconnect: () => {
24591
24591
  this._tryToReconnect(e.deviceId, e.onReconnect).catch((d) => this._logger.error("tryToReconnect() threw", { data: { e: d } }));
24592
24592
  }, onTerminated: () => {
24593
24593
  try {
@@ -24837,14 +24837,14 @@ var nZ = Object.prototype.toString;
24837
24837
  function iZ(t, e) {
24838
24838
  return nZ.call(t) === "[object " + e + "]";
24839
24839
  }
24840
- function q2(t) {
24840
+ function q$(t) {
24841
24841
  return iZ(t, "Object");
24842
24842
  }
24843
- function W2(t) {
24843
+ function W$(t) {
24844
24844
  return !!(t && t.then && typeof t.then == "function");
24845
24845
  }
24846
- var Z2 = typeof __SENTRY_DEBUG__ > "u" ? !0 : __SENTRY_DEBUG__, sZ = Oo(), oZ = "Sentry Logger ", Aw = ["debug", "info", "warn", "error", "log", "assert"];
24847
- function Y2(t) {
24846
+ var Z$ = typeof __SENTRY_DEBUG__ > "u" ? !0 : __SENTRY_DEBUG__, sZ = Oo(), oZ = "Sentry Logger ", Aw = ["debug", "info", "warn", "error", "log", "assert"];
24847
+ function Y$(t) {
24848
24848
  var e = Oo();
24849
24849
  if (!("console" in e))
24850
24850
  return t();
@@ -24870,11 +24870,11 @@ function UD() {
24870
24870
  t = !1;
24871
24871
  }
24872
24872
  };
24873
- return Z2 ? Aw.forEach(function(r) {
24873
+ return Z$ ? Aw.forEach(function(r) {
24874
24874
  e[r] = function() {
24875
24875
  for (var n = [], i = 0; i < arguments.length; i++)
24876
24876
  n[i] = arguments[i];
24877
- t && Y2(function() {
24877
+ t && Y$(function() {
24878
24878
  var s;
24879
24879
  (s = sZ.console)[r].apply(s, Ys([oZ + "[" + r + "]:"], n));
24880
24880
  });
@@ -24885,10 +24885,10 @@ function UD() {
24885
24885
  }), e;
24886
24886
  }
24887
24887
  var gf;
24888
- Z2 ? gf = DC("logger", UD) : gf = UD();
24888
+ Z$ ? gf = DC("logger", UD) : gf = UD();
24889
24889
  function Tw(t) {
24890
24890
  var e, r;
24891
- if (q2(t)) {
24891
+ if (q$(t)) {
24892
24892
  var n = {};
24893
24893
  try {
24894
24894
  for (var i = JW(Object.keys(t)), s = i.next(); !s.done; s = i.next()) {
@@ -24936,7 +24936,7 @@ var aZ = (
24936
24936
  r._setResult(2, n);
24937
24937
  }, this._setResult = function(n, i) {
24938
24938
  if (r._state === 0) {
24939
- if (W2(i)) {
24939
+ if (W$(i)) {
24940
24940
  i.then(r._resolve, r._reject);
24941
24941
  return;
24942
24942
  }
@@ -25034,7 +25034,7 @@ var Sv = TC() ? uZ() : cZ(), LD = Sv === void 0 ? Dw : {
25034
25034
  nowSeconds: function() {
25035
25035
  return (Sv.timeOrigin + Sv.now()) / 1e3;
25036
25036
  }
25037
- }, X2 = Dw.nowSeconds.bind(Dw), MD = LD.nowSeconds.bind(LD);
25037
+ }, X$ = Dw.nowSeconds.bind(Dw), MD = LD.nowSeconds.bind(LD);
25038
25038
  (function() {
25039
25039
  var t = Oo().performance;
25040
25040
  if (!(!t || !t.now)) {
@@ -25102,14 +25102,14 @@ var FD = 100, kw = (
25102
25102
  var r = e(this);
25103
25103
  return r instanceof t ? r : this;
25104
25104
  }
25105
- return e instanceof t ? (this._tags = Ne(Ne({}, this._tags), e._tags), this._extra = Ne(Ne({}, this._extra), e._extra), this._contexts = Ne(Ne({}, this._contexts), e._contexts), e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession)) : q2(e) && (e = e, this._tags = Ne(Ne({}, this._tags), e.tags), this._extra = Ne(Ne({}, this._extra), e.extra), this._contexts = Ne(Ne({}, this._contexts), e.contexts), e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession)), this;
25105
+ return e instanceof t ? (this._tags = Ne(Ne({}, this._tags), e._tags), this._extra = Ne(Ne({}, this._extra), e._extra), this._contexts = Ne(Ne({}, this._contexts), e._contexts), e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession)) : q$(e) && (e = e, this._tags = Ne(Ne({}, this._tags), e.tags), this._extra = Ne(Ne({}, this._extra), e.extra), this._contexts = Ne(Ne({}, this._contexts), e.contexts), e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession)), this;
25106
25106
  }, t.prototype.clear = function() {
25107
25107
  return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this;
25108
25108
  }, t.prototype.addBreadcrumb = function(e, r) {
25109
25109
  var n = typeof r == "number" ? Math.min(r, FD) : FD;
25110
25110
  if (n <= 0)
25111
25111
  return this;
25112
- var i = Ne({ timestamp: X2() }, e);
25112
+ var i = Ne({ timestamp: X$() }, e);
25113
25113
  return this._breadcrumbs = Ys(this._breadcrumbs, [i]).slice(-n), this._notifyScopeListeners(), this;
25114
25114
  }, t.prototype.clearBreadcrumbs = function() {
25115
25115
  return this._breadcrumbs = [], this._notifyScopeListeners(), this;
@@ -25130,7 +25130,7 @@ var FD = 100, kw = (
25130
25130
  o(r);
25131
25131
  else {
25132
25132
  var u = c(Ne({}, r), n);
25133
- W2(u) ? u.then(function(l) {
25133
+ W$(u) ? u.then(function(l) {
25134
25134
  return s._notifyEventProcessors(e, l, n, i + 1).then(o);
25135
25135
  }).then(null, a) : s._notifyEventProcessors(e, u, n, i + 1).then(o).then(null, a);
25136
25136
  }
@@ -25264,7 +25264,7 @@ var dZ = (
25264
25264
  if (!(!i || !s)) {
25265
25265
  var o = s.getOptions && s.getOptions() || {}, a = o.beforeBreadcrumb, c = a === void 0 ? null : a, u = o.maxBreadcrumbs, l = u === void 0 ? hZ : u;
25266
25266
  if (!(l <= 0)) {
25267
- var d = X2(), h = Ne({ timestamp: d }, e), f = c ? Y2(function() {
25267
+ var d = X$(), h = Ne({ timestamp: d }, e), f = c ? Y$(function() {
25268
25268
  return c(h, r);
25269
25269
  }) : h;
25270
25270
  f !== null && i.addBreadcrumb(f, l);
@@ -25364,14 +25364,14 @@ function HD(t) {
25364
25364
  }
25365
25365
  function fZ() {
25366
25366
  var t = Ep();
25367
- return (!J2(t) || Xs(t).isOlderThan(kC)) && PC(t, new RC()), TC() ? pZ(t) : Xs(t);
25367
+ return (!J$(t) || Xs(t).isOlderThan(kC)) && PC(t, new RC()), TC() ? pZ(t) : Xs(t);
25368
25368
  }
25369
25369
  function pZ(t) {
25370
25370
  try {
25371
25371
  var e = Ep().__SENTRY__, r = e && e.extensions && e.extensions.domain && e.extensions.domain.active;
25372
25372
  if (!r)
25373
25373
  return Xs(t);
25374
- if (!J2(r) || Xs(r).isOlderThan(kC)) {
25374
+ if (!J$(r) || Xs(r).isOlderThan(kC)) {
25375
25375
  var n = Xs(t).getStackTop();
25376
25376
  PC(r, new RC(n.client, kw.clone(n.scope)));
25377
25377
  }
@@ -25380,7 +25380,7 @@ function pZ(t) {
25380
25380
  return Xs(t);
25381
25381
  }
25382
25382
  }
25383
- function J2(t) {
25383
+ function J$(t) {
25384
25384
  return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
25385
25385
  }
25386
25386
  function Xs(t) {
@@ -25471,9 +25471,9 @@ let vZ = class {
25471
25471
  }
25472
25472
  }
25473
25473
  };
25474
- const Q2 = "WEB-HID";
25474
+ const Q$ = "WEB-HID";
25475
25475
  let _Z = class {
25476
- constructor(e, r, n, i, s = (a) => new n$(a), o = (a, c) => new vZ(a, c)) {
25476
+ constructor(e, r, n, i, s = (a) => new n2(a), o = (a, c) => new vZ(a, c)) {
25477
25477
  this._deviceModelDataSource = e, this._loggerServiceFactory = r, this._apduSenderFactory = n, this._apduReceiverFactory = i, this._deviceConnectionStateMachineFactory = s, this._deviceApduSenderFactory = o, this._logger = r("WebWebHidTransport"), this.startListeningToConnectionEvents();
25478
25478
  }
25479
25479
  _transportDiscoveredDevices = new To([]);
@@ -25482,7 +25482,7 @@ let _Z = class {
25482
25482
  _connectionListenersAbortController = new AbortController();
25483
25483
  _logger;
25484
25484
  connectionType = "USB";
25485
- identifier = Q2;
25485
+ identifier = Q$;
25486
25486
  get hidApi() {
25487
25487
  return this.isSupported() ? q(navigator.hid) : M(new YW("WebHID not supported"));
25488
25488
  }
@@ -25680,7 +25680,7 @@ var SZ = Object.getOwnPropertyDescriptor, bZ = (t, e, r, n) => {
25680
25680
  let Rw = class {
25681
25681
  logger;
25682
25682
  _dmk;
25683
- hidIdentifier = Q2;
25683
+ hidIdentifier = Q$;
25684
25684
  bleIdentifier = ll;
25685
25685
  _currentSessionId;
25686
25686
  _connectedDevice;
@@ -43319,7 +43319,7 @@ let kb = class {
43319
43319
  }
43320
43320
  async decrypt(t) {
43321
43321
  if (!this.authContext?.encryptionKey) {
43322
- const r = new i$("No encryption key");
43322
+ const r = new i2("No encryption key");
43323
43323
  throw this.logger.error("Missing encryption key for decrypt", { error: r }), r;
43324
43324
  }
43325
43325
  const e = await this.lkrpAppKit.decryptData(
@@ -43963,7 +43963,7 @@ let Lb = class {
43963
43963
  this.config = t;
43964
43964
  const e = {
43965
43965
  [dce]: this.config.originToken,
43966
- [PM]: `ledger-button/${c2.version}/${this.config.dAppIdentifier}`
43966
+ [PM]: `ledger-button/${c$.version}/${this.config.dAppIdentifier}`
43967
43967
  };
43968
43968
  this.headers = {
43969
43969
  ...hce,
@@ -46427,7 +46427,7 @@ export {
46427
46427
  Ye as LedgerButtonError,
46428
46428
  mhe as LedgerEIP1193Provider,
46429
46429
  bhe as LedgerKeyringProtocolError,
46430
- i$ as LedgerSyncAuthContextMissingError,
46430
+ i2 as LedgerSyncAuthContextMissingError,
46431
46431
  kh as LedgerSyncAuthenticationError,
46432
46432
  She as LedgerSyncConnectionFailedError,
46433
46433
  _he as LedgerSyncError,