@aegis-engine/core 0.8.2 → 0.9.0

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.
@@ -52,7 +52,7 @@ function ao(e) {
52
52
  ...typeof o == "object" ? o : {},
53
53
  ...x
54
54
  }));
55
- const tt = S || i || co, J = A === void 0 ? void 0 : P(
55
+ const rt = S || i || co, J = A === void 0 ? void 0 : P(
56
56
  A,
57
57
  // Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:
58
58
  // bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,
@@ -60,7 +60,7 @@ function ao(e) {
60
60
  // setting the content-type at the very beginning to be overwritten.
61
61
  // Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.
62
62
  cn(a, I, b.header)
63
- ), nt = cn(
63
+ ), ot = cn(
64
64
  // with no body, we should not to set Content-Type
65
65
  J === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression
66
66
  J instanceof FormData ? {} : {
@@ -74,22 +74,22 @@ function ao(e) {
74
74
  ...u,
75
75
  ...N,
76
76
  body: J,
77
- headers: nt
77
+ headers: ot
78
78
  };
79
- let rt, ot, be = new C(
80
- lo(h, { baseUrl: ve, params: b, querySerializer: ze, pathSerializer: tt }),
79
+ let st, it, be = new C(
80
+ lo(h, { baseUrl: ve, params: b, querySerializer: ze, pathSerializer: rt }),
81
81
  Ue
82
82
  ), H;
83
83
  for (const W in N)
84
84
  W in be || (be[W] = N[W]);
85
85
  if (re.length) {
86
- rt = io(), ot = Object.freeze({
86
+ st = io(), it = Object.freeze({
87
87
  baseUrl: ve,
88
88
  fetch: E,
89
89
  parseAs: R,
90
90
  querySerializer: ze,
91
91
  bodySerializer: P,
92
- pathSerializer: tt
92
+ pathSerializer: rt
93
93
  });
94
94
  for (const W of re)
95
95
  if (W && typeof W == "object" && typeof W.onRequest == "function") {
@@ -97,8 +97,8 @@ function ao(e) {
97
97
  request: be,
98
98
  schemaPath: h,
99
99
  params: b,
100
- options: ot,
101
- id: rt
100
+ options: it,
101
+ id: st
102
102
  });
103
103
  if (q)
104
104
  if (q instanceof C)
@@ -117,15 +117,15 @@ function ao(e) {
117
117
  let q = W;
118
118
  if (re.length)
119
119
  for (let Ie = re.length - 1; Ie >= 0; Ie--) {
120
- const st = re[Ie];
121
- if (st && typeof st == "object" && typeof st.onError == "function") {
122
- const Fe = await st.onError({
120
+ const at = re[Ie];
121
+ if (at && typeof at == "object" && typeof at.onError == "function") {
122
+ const Fe = await at.onError({
123
123
  request: be,
124
124
  error: q,
125
125
  schemaPath: h,
126
126
  params: b,
127
- options: ot,
128
- id: rt
127
+ options: it,
128
+ id: st
129
129
  });
130
130
  if (Fe) {
131
131
  if (Fe instanceof Response) {
@@ -152,8 +152,8 @@ function ao(e) {
152
152
  response: H,
153
153
  schemaPath: h,
154
154
  params: b,
155
- options: ot,
156
- id: rt
155
+ options: it,
156
+ id: st
157
157
  });
158
158
  if (Ie) {
159
159
  if (!(Ie instanceof Response))
@@ -523,7 +523,7 @@ function ho(e) {
523
523
  }
524
524
  const ir = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
525
525
  };
526
- function We(e) {
526
+ function Xe(e) {
527
527
  return typeof e == "object" && e !== null && !Array.isArray(e);
528
528
  }
529
529
  const po = /* @__PURE__ */ It(() => {
@@ -538,13 +538,13 @@ const po = /* @__PURE__ */ It(() => {
538
538
  }
539
539
  });
540
540
  function Ce(e) {
541
- if (We(e) === !1)
541
+ if (Xe(e) === !1)
542
542
  return !1;
543
543
  const t = e.constructor;
544
544
  if (t === void 0 || typeof t != "function")
545
545
  return !0;
546
546
  const n = t.prototype;
547
- return !(We(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
547
+ return !(Xe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
548
548
  }
549
549
  function ar(e) {
550
550
  return Ce(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
@@ -737,18 +737,18 @@ function we(e, t) {
737
737
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
738
738
  });
739
739
  }
740
- function it(e) {
740
+ function ct(e) {
741
741
  return typeof e == "string" ? e : e == null ? void 0 : e.message;
742
742
  }
743
743
  function me(e, t, n) {
744
744
  var c, u, l, p, h, f;
745
- const r = e.message ? e.message : it((l = (u = (c = e.inst) == null ? void 0 : c._zod.def) == null ? void 0 : u.error) == null ? void 0 : l.call(u, e)) ?? it((p = t == null ? void 0 : t.error) == null ? void 0 : p.call(t, e)) ?? it((h = n.customError) == null ? void 0 : h.call(n, e)) ?? it((f = n.localeError) == null ? void 0 : f.call(n, e)) ?? "Invalid input", { inst: o, continue: s, input: i, ...a } = e;
745
+ const r = e.message ? e.message : ct((l = (u = (c = e.inst) == null ? void 0 : c._zod.def) == null ? void 0 : u.error) == null ? void 0 : l.call(u, e)) ?? ct((p = t == null ? void 0 : t.error) == null ? void 0 : p.call(t, e)) ?? ct((h = n.customError) == null ? void 0 : h.call(n, e)) ?? ct((f = n.localeError) == null ? void 0 : f.call(n, e)) ?? "Invalid input", { inst: o, continue: s, input: i, ...a } = e;
746
746
  return a.path ?? (a.path = []), a.message = r, t != null && t.reportInput && (a.input = i), a;
747
747
  }
748
748
  function Qt(e) {
749
749
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
750
750
  }
751
- function Ke(...e) {
751
+ function Qe(...e) {
752
752
  const [t, n, r] = e;
753
753
  return typeof t == "string" ? {
754
754
  message: t,
@@ -1622,7 +1622,7 @@ const ni = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1622
1622
  }
1623
1623
  return c;
1624
1624
  });
1625
- const o = We, s = t.catchall;
1625
+ const o = Xe, s = t.catchall;
1626
1626
  let i;
1627
1627
  e._zod.parse = (a, c) => {
1628
1628
  i ?? (i = r.value);
@@ -1724,7 +1724,7 @@ const ni = /* @__PURE__ */ m("$ZodObject", (e, t) => {
1724
1724
  return (P, S) => b(h, P, S);
1725
1725
  };
1726
1726
  let s;
1727
- const i = We, a = !Wt.jitless, u = a && po.value, l = t.catchall;
1727
+ const i = Xe, a = !Wt.jitless, u = a && po.value, l = t.catchall;
1728
1728
  let p;
1729
1729
  e._zod.parse = (h, f) => {
1730
1730
  p ?? (p = r.value);
@@ -1814,7 +1814,7 @@ const kr = /* @__PURE__ */ m("$ZodUnion", (e, t) => {
1814
1814
  });
1815
1815
  e._zod.parse = (o, s) => {
1816
1816
  const i = o.value;
1817
- if (!We(i))
1817
+ if (!Xe(i))
1818
1818
  return o.issues.push({
1819
1819
  code: "invalid_type",
1820
1820
  expected: "object",
@@ -2166,13 +2166,13 @@ const gi = /* @__PURE__ */ m("$ZodCatch", (e, t) => {
2166
2166
  Z.init(e, t), T(e._zod, "values", () => t.in._zod.values), T(e._zod, "optin", () => t.in._zod.optin), T(e._zod, "optout", () => t.out._zod.optout), T(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2167
2167
  if (r.direction === "backward") {
2168
2168
  const s = t.out._zod.run(n, r);
2169
- return s instanceof Promise ? s.then((i) => at(i, t.in, r)) : at(s, t.in, r);
2169
+ return s instanceof Promise ? s.then((i) => ut(i, t.in, r)) : ut(s, t.in, r);
2170
2170
  }
2171
2171
  const o = t.in._zod.run(n, r);
2172
- return o instanceof Promise ? o.then((s) => at(s, t.out, r)) : at(o, t.out, r);
2172
+ return o instanceof Promise ? o.then((s) => ut(s, t.out, r)) : ut(o, t.out, r);
2173
2173
  };
2174
2174
  });
2175
- function at(e, t, n) {
2175
+ function ut(e, t, n) {
2176
2176
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues, fallback: e.fallback }, n);
2177
2177
  }
2178
2178
  const bi = /* @__PURE__ */ m("$ZodReadonly", (e, t) => {
@@ -2212,7 +2212,7 @@ function $n(e, t, n, r) {
2212
2212
  continue: !r._zod.def.abort
2213
2213
  // params: inst._zod.def.params,
2214
2214
  };
2215
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(Ke(o));
2215
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(Qe(o));
2216
2216
  }
2217
2217
  }
2218
2218
  var Sn;
@@ -2249,7 +2249,7 @@ function yi() {
2249
2249
  return new _i();
2250
2250
  }
2251
2251
  (Sn = globalThis).__zod_globalRegistry ?? (Sn.__zod_globalRegistry = yi());
2252
- const Be = globalThis.__zod_globalRegistry;
2252
+ const qe = globalThis.__zod_globalRegistry;
2253
2253
  // @__NO_SIDE_EFFECTS__
2254
2254
  function ki(e, t) {
2255
2255
  return new e({
@@ -2736,10 +2736,10 @@ function fa(e, t, n) {
2736
2736
  function ha(e, t) {
2737
2737
  const n = /* @__PURE__ */ pa((r) => (r.addIssue = (o) => {
2738
2738
  if (typeof o == "string")
2739
- r.issues.push(Ke(o, r.value, n._zod.def));
2739
+ r.issues.push(Qe(o, r.value, n._zod.def));
2740
2740
  else {
2741
2741
  const s = o;
2742
- s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = n), s.continue ?? (s.continue = !n._zod.def.abort), r.issues.push(Ke(s));
2742
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = r.value), s.inst ?? (s.inst = n), s.continue ?? (s.continue = !n._zod.def.abort), r.issues.push(Qe(s));
2743
2743
  }
2744
2744
  }, e(r.value, r)), t);
2745
2745
  return n;
@@ -2756,7 +2756,7 @@ function zr(e) {
2756
2756
  let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
2757
2757
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2758
2758
  processors: e.processors ?? {},
2759
- metadataRegistry: (e == null ? void 0 : e.metadata) ?? Be,
2759
+ metadataRegistry: (e == null ? void 0 : e.metadata) ?? qe,
2760
2760
  target: t,
2761
2761
  unrepresentable: (e == null ? void 0 : e.unrepresentable) ?? "throw",
2762
2762
  override: (e == null ? void 0 : e.override) ?? (() => {
@@ -3232,7 +3232,7 @@ const Va = (e, t) => {
3232
3232
  }, ae = /* @__PURE__ */ m("ZodError", Va, {
3233
3233
  Parent: Error
3234
3234
  }), Ga = /* @__PURE__ */ Yt(ae), Wa = /* @__PURE__ */ en(ae), Ka = /* @__PURE__ */ $t(ae), Xa = /* @__PURE__ */ St(ae), Qa = /* @__PURE__ */ Ro(ae), Ya = /* @__PURE__ */ To(ae), ec = /* @__PURE__ */ Po(ae), tc = /* @__PURE__ */ Oo(ae), nc = /* @__PURE__ */ Zo(ae), rc = /* @__PURE__ */ Co(ae), oc = /* @__PURE__ */ No(ae), sc = /* @__PURE__ */ jo(ae), Rn = /* @__PURE__ */ new WeakMap();
3235
- function Qe(e, t, n) {
3235
+ function et(e, t, n) {
3236
3236
  const r = Object.getPrototypeOf(e);
3237
3237
  let o = Rn.get(r);
3238
3238
  if (o || (o = /* @__PURE__ */ new Set(), Rn.set(r, o)), !o.has(t)) {
@@ -3268,7 +3268,7 @@ const j = /* @__PURE__ */ m("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
3268
3268
  input: gt(e, "input"),
3269
3269
  output: gt(e, "output")
3270
3270
  }
3271
- }), e.toJSONSchema = ma(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (n, r) => Ga(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ka(e, n, r), e.parseAsync = async (n, r) => Wa(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Xa(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Qa(e, n, r), e.decode = (n, r) => Ya(e, n, r), e.encodeAsync = async (n, r) => ec(e, n, r), e.decodeAsync = async (n, r) => tc(e, n, r), e.safeEncode = (n, r) => nc(e, n, r), e.safeDecode = (n, r) => rc(e, n, r), e.safeEncodeAsync = async (n, r) => oc(e, n, r), e.safeDecodeAsync = async (n, r) => sc(e, n, r), Qe(e, "ZodType", {
3271
+ }), e.toJSONSchema = ma(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (n, r) => Ga(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ka(e, n, r), e.parseAsync = async (n, r) => Wa(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Xa(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Qa(e, n, r), e.decode = (n, r) => Ya(e, n, r), e.encodeAsync = async (n, r) => ec(e, n, r), e.decodeAsync = async (n, r) => tc(e, n, r), e.safeEncode = (n, r) => nc(e, n, r), e.safeDecode = (n, r) => rc(e, n, r), e.safeEncodeAsync = async (n, r) => oc(e, n, r), e.safeDecodeAsync = async (n, r) => sc(e, n, r), et(e, "ZodType", {
3272
3272
  check(...n) {
3273
3273
  const r = this.def;
3274
3274
  return this.clone(_e(r, {
@@ -3343,13 +3343,13 @@ const j = /* @__PURE__ */ m("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
3343
3343
  },
3344
3344
  describe(n) {
3345
3345
  const r = this.clone();
3346
- return Be.add(r, { description: n }), r;
3346
+ return qe.add(r, { description: n }), r;
3347
3347
  },
3348
3348
  meta(...n) {
3349
3349
  if (n.length === 0)
3350
- return Be.get(this);
3350
+ return qe.get(this);
3351
3351
  const r = this.clone();
3352
- return Be.add(r, n[0]), r;
3352
+ return qe.add(r, n[0]), r;
3353
3353
  },
3354
3354
  isOptional() {
3355
3355
  return this.safeParse(void 0).success;
@@ -3363,13 +3363,13 @@ const j = /* @__PURE__ */ m("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
3363
3363
  }), Object.defineProperty(e, "description", {
3364
3364
  get() {
3365
3365
  var n;
3366
- return (n = Be.get(e)) == null ? void 0 : n.description;
3366
+ return (n = qe.get(e)) == null ? void 0 : n.description;
3367
3367
  },
3368
3368
  configurable: !0
3369
3369
  }), e)), Tr = /* @__PURE__ */ m("_ZodString", (e, t) => {
3370
3370
  tn.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, o, s) => va(e, r, o);
3371
3371
  const n = e._zod.bag;
3372
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Qe(e, "_ZodString", {
3372
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, et(e, "_ZodString", {
3373
3373
  regex(...r) {
3374
3374
  return this.check(/* @__PURE__ */ ea(...r));
3375
3375
  },
@@ -3417,7 +3417,7 @@ const j = /* @__PURE__ */ m("ZodType", (e, t) => (Z.init(e, t), Object.assign(e[
3417
3417
  }
3418
3418
  });
3419
3419
  }), ic = /* @__PURE__ */ m("ZodString", (e, t) => {
3420
- tn.init(e, t), Tr.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ii(ac, n)), e.url = (n) => e.check(/* @__PURE__ */ Ei(cc, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Bi(Ic, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Ai(uc, n)), e.guid = (n) => e.check(/* @__PURE__ */ zn(Tn, n)), e.uuid = (n) => e.check(/* @__PURE__ */ $i(ct, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Si(ct, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ zi(ct, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ xi(ct, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ri(lc, n)), e.guid = (n) => e.check(/* @__PURE__ */ zn(Tn, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ti(dc, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Pi(fc, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Oi(hc, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Ui(_c, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Fi(yc, n)), e.xid = (n) => e.check(/* @__PURE__ */ Zi(pc, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Ci(mc, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Ni(gc, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ ji(vc, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Di(bc, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Li(wc, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Mi(kc, n)), e.datetime = (n) => e.check(Rr(n)), e.date = (n) => e.check(Ma(n)), e.time = (n) => e.check(Ha(n)), e.duration = (n) => e.check(Ja(n));
3420
+ tn.init(e, t), Tr.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ii(ac, n)), e.url = (n) => e.check(/* @__PURE__ */ Ei(cc, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Bi(Ic, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Ai(uc, n)), e.guid = (n) => e.check(/* @__PURE__ */ zn(Tn, n)), e.uuid = (n) => e.check(/* @__PURE__ */ $i(lt, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Si(lt, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ zi(lt, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ xi(lt, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ri(lc, n)), e.guid = (n) => e.check(/* @__PURE__ */ zn(Tn, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ti(dc, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Pi(fc, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Oi(hc, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Ui(_c, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Fi(yc, n)), e.xid = (n) => e.check(/* @__PURE__ */ Zi(pc, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Ci(mc, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Ni(gc, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ ji(vc, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Di(bc, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Li(wc, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Mi(kc, n)), e.datetime = (n) => e.check(Rr(n)), e.date = (n) => e.check(Ma(n)), e.time = (n) => e.check(Ha(n)), e.duration = (n) => e.check(Ja(n));
3421
3421
  });
3422
3422
  function d(e) {
3423
3423
  return /* @__PURE__ */ ki(ic, e);
@@ -3428,7 +3428,7 @@ const L = /* @__PURE__ */ m("ZodStringFormat", (e, t) => {
3428
3428
  xs.init(e, t), L.init(e, t);
3429
3429
  }), Tn = /* @__PURE__ */ m("ZodGUID", (e, t) => {
3430
3430
  Ss.init(e, t), L.init(e, t);
3431
- }), ct = /* @__PURE__ */ m("ZodUUID", (e, t) => {
3431
+ }), lt = /* @__PURE__ */ m("ZodUUID", (e, t) => {
3432
3432
  zs.init(e, t), L.init(e, t);
3433
3433
  }), cc = /* @__PURE__ */ m("ZodURL", (e, t) => {
3434
3434
  Es.init(e, t), L.init(e, t);
@@ -3463,7 +3463,7 @@ const L = /* @__PURE__ */ m("ZodStringFormat", (e, t) => {
3463
3463
  }), Ic = /* @__PURE__ */ m("ZodJWT", (e, t) => {
3464
3464
  Ws.init(e, t), L.init(e, t);
3465
3465
  }), Pr = /* @__PURE__ */ m("ZodNumber", (e, t) => {
3466
- wr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, o, s) => ba(e, r, o), Qe(e, "ZodNumber", {
3466
+ wr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, o, s) => ba(e, r, o), et(e, "ZodNumber", {
3467
3467
  gt(r, o) {
3468
3468
  return this.check(/* @__PURE__ */ En(r, o));
3469
3469
  },
@@ -3547,7 +3547,7 @@ function Ac(e) {
3547
3547
  return /* @__PURE__ */ Yi(Ec, e);
3548
3548
  }
3549
3549
  const Rc = /* @__PURE__ */ m("ZodArray", (e, t) => {
3550
- ti.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => xa(e, n, r, o), e.element = t.element, Qe(e, "ZodArray", {
3550
+ ti.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => xa(e, n, r, o), e.element = t.element, et(e, "ZodArray", {
3551
3551
  min(n, r) {
3552
3552
  return this.check(/* @__PURE__ */ mt(n, r));
3553
3553
  },
@@ -3569,7 +3569,7 @@ function $(e, t) {
3569
3569
  return /* @__PURE__ */ da(Rc, e, t);
3570
3570
  }
3571
3571
  const Or = /* @__PURE__ */ m("ZodObject", (e, t) => {
3572
- ri.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ea(e, n, r, o), T(e, "shape", () => t.shape), Qe(e, "ZodObject", {
3572
+ ri.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ea(e, n, r, o), T(e, "shape", () => t.shape), et(e, "ZodObject", {
3573
3573
  keyof() {
3574
3574
  return y(Object.keys(this._zod.def.shape));
3575
3575
  },
@@ -3750,10 +3750,10 @@ const jc = /* @__PURE__ */ m("ZodTransform", (e, t) => {
3750
3750
  throw new or(e.constructor.name);
3751
3751
  n.addIssue = (s) => {
3752
3752
  if (typeof s == "string")
3753
- n.issues.push(Ke(s, n.value, t));
3753
+ n.issues.push(Qe(s, n.value, t));
3754
3754
  else {
3755
3755
  const i = s;
3756
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(Ke(i));
3756
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(Qe(i));
3757
3757
  }
3758
3758
  };
3759
3759
  const o = t.transform(n.value, n);
@@ -3882,7 +3882,7 @@ function _l(e, t) {
3882
3882
  function yl(e, t) {
3883
3883
  return e.toLowerCase() === t.toLowerCase();
3884
3884
  }
3885
- const nu = /^0x[0-9a-fA-F]{40}$/, ru = /^0x[0-9a-fA-F]*$/, ou = /^\d+$/, su = /^[1-9]\d*$/, Q = d().regex(nu, "Expected a 0x-prefixed 20-byte hex address").transform((e) => e), iu = d().regex(ru, "Expected 0x-prefixed hex data").transform((e) => e), Ot = d().regex(ou, "Expected a base-10 unsigned integer string"), Dn = d().regex(su, "Expected a positive base-10 integer string"), au = Rr({ offset: !0 }), Dr = y(["aegis-direct-v4", "kyber"]), kl = y(["exactIn", "exactOut"]), cu = y(["enabled", "disabled"]), uu = g([1, 56, 130, 8453]), nn = _().int().positive(), lu = v({
3885
+ const nu = /^0x[0-9a-fA-F]{40}$/, ru = /^0x[0-9a-fA-F]*$/, ou = /^\d+$/, su = /^[1-9]\d*$/, Q = d().regex(nu, "Expected a 0x-prefixed 20-byte hex address").transform((e) => e), iu = d().regex(ru, "Expected 0x-prefixed hex data").transform((e) => e), Ot = d().regex(ou, "Expected a base-10 unsigned integer string"), Dn = d().regex(su, "Expected a positive base-10 integer string"), au = Rr({ offset: !0 }), Dr = y(["aegis-direct-v4", "kyber"]), kl = y(["exactIn", "exactOut"]), cu = y(["enabled", "disabled"]), uu = g([1, 56, 130, 8453, 57073]), nn = _().int().positive(), lu = v({
3886
3886
  chainId: nn,
3887
3887
  slug: d(),
3888
3888
  name: d()
@@ -3890,22 +3890,26 @@ const nu = /^0x[0-9a-fA-F]{40}$/, ru = /^0x[0-9a-fA-F]*$/, ou = /^\d+$/, su = /^
3890
3890
  ttlSeconds: _().int().min(1).max(600),
3891
3891
  defaultSlippageBps: _().int().min(0).max(1e4),
3892
3892
  maxSlippageBps: _().int().min(0).max(1e4)
3893
- }), ut = Cc(
3893
+ }), Me = Cc(
3894
3894
  d(),
3895
3895
  Q.optional()
3896
- ), lt = v({
3896
+ ), Be = v({
3897
3897
  routers: $(Q),
3898
3898
  spenders: $(Q)
3899
3899
  }), fu = v({
3900
- 1: ut,
3901
- 56: ut,
3902
- 130: ut,
3903
- 8453: ut
3900
+ 1: Me,
3901
+ 56: Me,
3902
+ 130: Me,
3903
+ 8453: Me,
3904
+ // Older deployed APIs omit Ink; keep it optional while preserving the
3905
+ // registry when a newer /v1/config response includes it.
3906
+ 57073: Me.optional()
3904
3907
  }), hu = v({
3905
- 1: lt,
3906
- 56: lt,
3907
- 130: lt,
3908
- 8453: lt
3908
+ 1: Be,
3909
+ 56: Be,
3910
+ 130: Be,
3911
+ 8453: Be,
3912
+ 57073: Be.optional()
3909
3913
  }), Ln = "0x8ea2C7de60ef1Cd4dcE64ea2DDDe2f99F0127eFC", Lr = v({
3910
3914
  outputFeeBps: _().int().min(0).max(200),
3911
3915
  recipient: Q.refine(
@@ -4302,7 +4306,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4302
4306
  blockHash: Ru,
4303
4307
  blockTimestamp: _().int().nonnegative().max(253402300799),
4304
4308
  deployment: d().min(1).max(256)
4305
- }).strict(), Tu = "engine-portfolio-v1", je = [1, 56, 130, 8453, 4663], Bn = je.length * 50, fe = d().regex(/^0x[0-9a-f]{40}$/), Pu = d().regex(/^0x[0-9a-f]{64}$/), Ve = d().max(230).regex(/^-?(0|[1-9][0-9]*)\.[0-9]{18}$/), Ye = $(d().min(1).max(80)).max(32), Et = v({
4309
+ }).strict(), Tu = "engine-portfolio-v1", je = [1, 56, 130, 8453, 4663], Bn = je.length * 50, fe = d().regex(/^0x[0-9a-f]{40}$/), Pu = d().regex(/^0x[0-9a-f]{64}$/), We = d().max(230).regex(/^-?(0|[1-9][0-9]*)\.[0-9]{18}$/), tt = $(d().min(1).max(80)).max(32), Et = v({
4306
4310
  account: d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()),
4307
4311
  chainIds: d().max(32).regex(new RegExp(`^[0-9]+(,[0-9]+){0,${je.length - 1}}$`)).transform((e) => e.split(",").map(Number)).refine(
4308
4312
  (e) => new Set(e).size === e.length && e.every((t) => je.includes(t)),
@@ -4312,7 +4316,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4312
4316
  snapshotId: d().uuid(),
4313
4317
  cursor: d().max(512).optional(),
4314
4318
  limit: d().regex(/^[1-9][0-9]?$/).transform(Number).refine((e) => e <= 50).default(25)
4315
- }), Ou = v({ usd: Ve.nullable(), knownUsd: Ve, reasons: Ye }).strict(), ce = Ou, Br = v({
4319
+ }), Ou = v({ usd: We.nullable(), knownUsd: We, reasons: tt }).strict(), ce = Ou, Br = v({
4316
4320
  id: d().max(180),
4317
4321
  chainId: _().int(),
4318
4322
  address: fe,
@@ -4320,7 +4324,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4320
4324
  symbol: d().max(64).nullable(),
4321
4325
  status: y(["observed", "assumed", "unavailable"]),
4322
4326
  priceUsd: d().max(280).regex(/^(0|[1-9][0-9]*)\.[0-9]{18,146}$/).nullable(),
4323
- reasons: Ye,
4327
+ reasons: tt,
4324
4328
  source: y(["coingecko", "configured_peg", "pool", "cross_chain", "custom"]).nullable(),
4325
4329
  observedAt: d().datetime().nullable(),
4326
4330
  fetchedAt: d().datetime().nullable(),
@@ -4348,7 +4352,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4348
4352
  token0: fe.nullable(),
4349
4353
  token1: fe.nullable(),
4350
4354
  status: y(["complete", "partial", "unavailable"]),
4351
- reasons: Ye,
4355
+ reasons: tt,
4352
4356
  basis: y(["spot-token-amounts", "interest-preview-estimate"]),
4353
4357
  amounts: v({
4354
4358
  idle: dt,
@@ -4379,9 +4383,9 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4379
4383
  debtUsd: ce,
4380
4384
  netEquityUsd: ce,
4381
4385
  supplyUsd: ce,
4382
- knownPricedAssetsUsd: Ve,
4383
- knownDebtUsd: Ve,
4384
- knownNetSubtotalUsd: Ve,
4386
+ knownPricedAssetsUsd: We,
4387
+ knownDebtUsd: We,
4388
+ knownNetSubtotalUsd: We,
4385
4389
  positionCount: _().int().nonnegative(),
4386
4390
  completePositionCount: _().int().nonnegative()
4387
4391
  }).strict(), Cu = v({
@@ -4391,7 +4395,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4391
4395
  vaultRegistry: fe,
4392
4396
  status: y(["complete", "partial", "unavailable"]),
4393
4397
  discoveryComplete: B(),
4394
- reasons: Ye,
4398
+ reasons: tt,
4395
4399
  discoveryCounts: v({
4396
4400
  evaluatedRowCount: _().int().nonnegative(),
4397
4401
  returnedPositionCount: _().int().nonnegative(),
@@ -4433,7 +4437,7 @@ const Ru = d().regex(/^0x[0-9a-f]{64}$/), ee = d().max(78).regex(/^(0|[1-9][0-9]
4433
4437
  status: y(["fresh", "stale"]),
4434
4438
  lastAttemptAt: d().datetime(),
4435
4439
  refreshOutcome: y(["refreshed", "cached", "pending", "failed"]),
4436
- reasons: Ye
4440
+ reasons: tt
4437
4441
  }).strict(),
4438
4442
  page: qr
4439
4443
  }).strict();
@@ -4461,7 +4465,7 @@ function O() {
4461
4465
  function Jr(e, t) {
4462
4466
  return e.length === t.length && e.every((n, r) => n === t[r]);
4463
4467
  }
4464
- async function et(e, t) {
4468
+ async function nt(e, t) {
4465
4469
  const n = Et.safeParse({
4466
4470
  account: e.account,
4467
4471
  chainIds: [...e.chainIds].sort((i, a) => i - a).join(",")
@@ -4688,7 +4692,7 @@ const qn = Gr.pick({
4688
4692
  ).max(4)
4689
4693
  }).strict();
4690
4694
  v({ error: g("Engine activity unavailable"), code: d() }).strict();
4691
- const Oe = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), de = d().regex(/^0x[0-9a-fA-F]{64}$/).transform((e) => e.toLowerCase()), le = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Me = d().max(16).regex(/^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$/).transform((e) => Number(BigInt(e))).pipe(le);
4695
+ const Oe = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), de = d().regex(/^0x[0-9a-fA-F]{64}$/).transform((e) => e.toLowerCase()), le = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), He = d().max(16).regex(/^0x(0|[1-9a-fA-F][0-9a-fA-F]*)$/).transform((e) => Number(BigInt(e))).pipe(le);
4692
4696
  Et.extend({
4693
4697
  chainId: d().regex(/^[1-9][0-9]{0,5}$/).transform(Number).refine((e) => je.includes(e)),
4694
4698
  txHash: de,
@@ -4705,20 +4709,20 @@ v({
4705
4709
  transactionHash: de,
4706
4710
  from: Oe,
4707
4711
  to: Oe.nullable(),
4708
- blockNumber: Me,
4712
+ blockNumber: He,
4709
4713
  blockHash: de,
4710
- transactionIndex: Me,
4714
+ transactionIndex: He,
4711
4715
  status: y(["0x0", "0x1"]),
4712
4716
  logs: $(
4713
4717
  v({
4714
4718
  address: Oe,
4715
4719
  topics: $(de).max(4),
4716
4720
  data: d().max(131074).regex(/^0x([0-9a-fA-F]{2})*$/),
4717
- blockNumber: Me,
4721
+ blockNumber: He,
4718
4722
  blockHash: de,
4719
4723
  transactionHash: de,
4720
- transactionIndex: Me,
4721
- logIndex: Me,
4724
+ transactionIndex: He,
4725
+ logIndex: He,
4722
4726
  removed: g(!1)
4723
4727
  })
4724
4728
  ).max(256)
@@ -4773,7 +4777,7 @@ v({
4773
4777
  }).strict();
4774
4778
  const Ct = 200, Ht = 25;
4775
4779
  function Rl(e) {
4776
- return et(e, async (t) => {
4780
+ return nt(e, async (t) => {
4777
4781
  var h;
4778
4782
  const n = await De(
4779
4783
  t,
@@ -4825,7 +4829,7 @@ function Rl(e) {
4825
4829
  });
4826
4830
  }
4827
4831
  function Tl(e) {
4828
- return et(e, async (t) => {
4832
+ return nt(e, async (t) => {
4829
4833
  const n = e.limit ?? Ht;
4830
4834
  if (!Number.isInteger(n) || n < 1 || n > 50 || e.cursor !== void 0 && (e.cursor.length < 1 || e.cursor.length > 8192))
4831
4835
  throw new te("invalid-query", 400);
@@ -4869,7 +4873,7 @@ function Tl(e) {
4869
4873
  });
4870
4874
  }
4871
4875
  function Pl(e) {
4872
- return et(e, async (t) => {
4876
+ return nt(e, async (t) => {
4873
4877
  var s, i;
4874
4878
  if (!t.query.chainIds.includes(e.chainId) || !/^0x[0-9a-fA-F]{64}$/.test(e.txHash))
4875
4879
  throw new te("invalid-query", 400);
@@ -4888,8 +4892,8 @@ function Pl(e) {
4888
4892
  return bt(t, o), (o.chainId !== e.chainId || o.txHash !== r) && O(), o.portfolio && !Jr(o.portfolio.chainIds, t.query.chainIds) && O(), o.status === "ready" && (!((s = o.receipt) != null && s.succeeded) || o.receipt.canonicality !== "checked-at-read" || !o.indexed || o.indexed.expectedEvents === 0 || o.indexed.acknowledgedEvents !== o.indexed.expectedEvents || o.indexed.frame.blockNumber < o.receipt.blockNumber || !((i = o.portfolio) != null && i.acknowledged) || o.portfolio.frame.blockNumber < o.receipt.blockNumber || Date.parse(o.portfolio.expiresAt) <= Date.now()) && O(), o;
4889
4893
  });
4890
4894
  }
4891
- const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), Ju = d().regex(/^0x[0-9a-fA-F]{64}$/).transform((e) => e.toLowerCase()), Re = qu, qt = Ju, Vu = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), he = ee, He = d().max(180).regex(/^-?(0|[1-9][0-9]*)$/), $e = v({ value: He.nullable(), reasons: $(d().max(100)) }), Ge = d().max(400).regex(/^-?[0-9]+\.[0-9]+$/).nullable(), Gu = v({ amount0Raw: he, amount1Raw: he }), Jn = v({
4892
- priceUsd: Ge,
4895
+ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), Ju = d().regex(/^0x[0-9a-fA-F]{64}$/).transform((e) => e.toLowerCase()), Re = qu, qt = Ju, Vu = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), he = ee, Je = d().max(180).regex(/^-?(0|[1-9][0-9]*)$/), $e = v({ value: Je.nullable(), reasons: $(d().max(100)) }), Ke = d().max(400).regex(/^-?[0-9]+\.[0-9]+$/).nullable(), Gu = v({ amount0Raw: he, amount1Raw: he }), Jn = v({
4896
+ priceUsd: Ke,
4893
4897
  status: y(["observed", "assumed", "unavailable"]),
4894
4898
  source: d().nullable(),
4895
4899
  effectiveObservedAt: d().datetime().nullable(),
@@ -4908,9 +4912,9 @@ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), J
4908
4912
  assetsQuoteToken1Raw: $e,
4909
4913
  debtQuoteToken1Raw: $e,
4910
4914
  equityQuoteToken1Raw: $e,
4911
- supplyUsd: Ge,
4912
- debtUsd: Ge,
4913
- equityUsd: Ge,
4915
+ supplyUsd: Ke,
4916
+ debtUsd: Ke,
4917
+ equityUsd: Ke,
4914
4918
  token0Price: Jn,
4915
4919
  token1Price: Jn,
4916
4920
  reasons: $(d())
@@ -4959,7 +4963,7 @@ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), J
4959
4963
  to: d().datetime().nullable(),
4960
4964
  netSupplyGrowthLWad: $e,
4961
4965
  borrowInterestLWad: $e,
4962
- historicalUsdPnl: v({ value: Ge, reasons: $(d()) }),
4966
+ historicalUsdPnl: v({ value: Ke, reasons: $(d()) }),
4963
4967
  includesGas: g(!1),
4964
4968
  includesExecutionFees: g(!1)
4965
4969
  }),
@@ -4971,14 +4975,14 @@ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), J
4971
4975
  transactionHash: qt,
4972
4976
  logIndex: _().int().nonnegative(),
4973
4977
  observedAt: d().datetime(),
4974
- deltaIdle0Raw: He,
4975
- deltaIdle1Raw: He,
4976
- deltaPrincipalRlRaw: He,
4977
- deltaSharesRaw: He,
4978
+ deltaIdle0Raw: Je,
4979
+ deltaIdle1Raw: Je,
4980
+ deltaPrincipalRlRaw: Je,
4981
+ deltaSharesRaw: Je,
4978
4982
  externalCapital: y(["known", "internal", "not-applicable", "unsupported"]),
4979
4983
  referencePrice: v({ basis: g("debt-action-token-ratio"), numeratorRaw: he, denominatorRaw: he }).nullable()
4980
4984
  })).max(200)
4981
- }), wt = d().regex(/^0x[0-9a-f]{40}$/), Vn = d().regex(/^0x[0-9a-f]{64}$/), qe = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Ku = v({
4985
+ }), wt = d().regex(/^0x[0-9a-f]{40}$/), Vn = d().regex(/^0x[0-9a-f]{64}$/), Ve = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Ku = v({
4982
4986
  version: y(["v0.4.0", "v1.0.2", "v1.0.3"]),
4983
4987
  engine: wt,
4984
4988
  vaultRegistry: wt
@@ -4999,11 +5003,11 @@ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), J
4999
5003
  indexedOwner: wt,
5000
5004
  createdAt: d().datetime(),
5001
5005
  burnedAt: d().datetime().nullable(),
5002
- burnedAtBlockNumber: qe.nullable()
5006
+ burnedAtBlockNumber: Ve.nullable()
5003
5007
  }).strict()
5004
5008
  ]), Qu = v({
5005
5009
  schemaVersion: g("1"),
5006
- chainId: qe.positive(),
5010
+ chainId: Ve.positive(),
5007
5011
  account: wt,
5008
5012
  deployment: Ku,
5009
5013
  scope: y(["account-lending-and-current-or-last-owned-vaults", "account-lending-and-ever-owned-vaults"]),
@@ -5011,15 +5015,15 @@ const qu = d().regex(/^0x[0-9a-fA-F]{40}$/).transform((e) => e.toLowerCase()), J
5011
5015
  ordering: g("vaults-then-lending-by-source-id"),
5012
5016
  positions: $(Xu).max(50),
5013
5017
  pagination: v({
5014
- limit: qe.min(1).max(50),
5018
+ limit: Ve.min(1).max(50),
5015
5019
  nextCursor: d().max(2048).nullable(),
5016
5020
  expiresAt: d().datetime()
5017
5021
  }).strict(),
5018
5022
  coverage: v({
5019
5023
  status: y(["complete", "partial"]),
5020
5024
  exhausted: B(),
5021
- evaluatedRowCount: qe.max(52),
5022
- returnedPositionCount: qe.max(50),
5025
+ evaluatedRowCount: Ve.max(52),
5026
+ returnedPositionCount: Ve.max(50),
5023
5027
  reasons: $(g("more-positions")).max(1)
5024
5028
  }).strict(),
5025
5029
  freshness: v({
@@ -5034,7 +5038,7 @@ v({
5034
5038
  code: d().max(64)
5035
5039
  }).strict();
5036
5040
  function Ol(e) {
5037
- return et({ ...e, chainIds: [e.chainId] }, async (t) => {
5041
+ return nt({ ...e, chainIds: [e.chainId] }, async (t) => {
5038
5042
  var i, a;
5039
5043
  const n = e.window ?? "7d";
5040
5044
  if (!["1d", "7d", "30d", "since-open"].includes(n) || !/^0x[0-9a-fA-F]{64}$/.test(e.poolId) || !["lend_shares", "borrow_vault"].includes(e.kind) || (e.kind === "borrow_vault" ? !/^(0|[1-9][0-9]{0,77})$/.test(e.vaultId) || BigInt(e.vaultId) >= 2n ** 256n : e.vaultId !== void 0) || e.before !== void 0 && (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/.test(e.before) || !Number.isFinite(Date.parse(e.before))))
@@ -5057,7 +5061,7 @@ function Ol(e) {
5057
5061
  });
5058
5062
  }
5059
5063
  function Zl(e) {
5060
- return et({ ...e, chainIds: [e.chainId] }, async (t) => {
5064
+ return nt({ ...e, chainIds: [e.chainId] }, async (t) => {
5061
5065
  const n = e.limit ?? 25, r = e.ownerScope ?? "current-or-last";
5062
5066
  if (!["current-or-last", "ever-owned"].includes(r) || !Number.isInteger(n) || n < 1 || n > 50 || e.cursor !== void 0 && (!e.cursor.length || e.cursor.length > 2048))
5063
5067
  throw new te("invalid-query", 400);
@@ -5264,18 +5268,18 @@ function Dl(e, t, n) {
5264
5268
  t.addEventListener("abort", i, { once: !0 }), e.then(o, s).finally(() => t.removeEventListener("abort", i));
5265
5269
  });
5266
5270
  }
5267
- const ht = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Xe = ee, Wn = d().max(79).regex(/^(0|-?[1-9][0-9]*)$/).refine((e) => {
5271
+ const ht = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Ye = ee, Wn = d().max(79).regex(/^(0|-?[1-9][0-9]*)$/).refine((e) => {
5268
5272
  if (!/^(0|-?[1-9][0-9]*)$/.test(e)) return !1;
5269
5273
  const t = BigInt(e);
5270
5274
  return t > -(1n << 256n) && t < 1n << 256n;
5271
- }), il = d().regex(/^0x[0-9a-f]{40}$/), Gt = d().regex(/^0x[0-9a-f]{64}$/), yt = v({ amount0Raw: Xe, amount1Raw: Xe }).strict(), Xr = v({ amount0Raw: Wn, amount1Raw: Wn }).strict(), Kn = v({
5275
+ }), il = d().regex(/^0x[0-9a-f]{40}$/), Gt = d().regex(/^0x[0-9a-f]{64}$/), yt = v({ amount0Raw: Ye, amount1Raw: Ye }).strict(), Xr = v({ amount0Raw: Wn, amount1Raw: Wn }).strict(), Kn = v({
5272
5276
  phase: y(["open", "close"]),
5273
5277
  transactionHash: Gt,
5274
5278
  block: v({ number: ht, hash: Gt, timestamp: ht.max(253402300799), transactionIndex: ht }).strict(),
5275
5279
  paid: yt,
5276
5280
  received: yt,
5277
5281
  net: Xr,
5278
- executionGasFeeWei: Xe
5282
+ executionGasFeeWei: Ye
5279
5283
  }).strict(), Xn = {
5280
5284
  schemaVersion: g("1"),
5281
5285
  modelVersion: g("closed-tap-token-pnl-v1"),
@@ -5283,7 +5287,7 @@ const ht = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Xe = ee, Wn = d
5283
5287
  chainId: ht,
5284
5288
  account: il,
5285
5289
  poolId: Gt,
5286
- vaultId: Xe,
5290
+ vaultId: Ye,
5287
5291
  capturedAt: d().datetime(),
5288
5292
  expiresAt: d().datetime(),
5289
5293
  canonicality: g("rpc-checked-at-capture"),
@@ -5304,7 +5308,7 @@ const ht = _().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Xe = ee, Wn = d
5304
5308
  key: Kr,
5305
5309
  opening: Kn,
5306
5310
  closing: Kn,
5307
- totals: v({ paid: yt, received: yt, net: Xr, executionGasFeeWei: Xe }).strict(),
5311
+ totals: v({ paid: yt, received: yt, net: Xr, executionGasFeeWei: Ye }).strict(),
5308
5312
  costs: v({
5309
5313
  tradingAndBorrowing: g("embedded-in-cashflows"),
5310
5314
  gasCoverage: g("opening-and-closing-execution-only"),
@@ -5521,7 +5525,7 @@ const al = v({
5521
5525
  function cl(e) {
5522
5526
  return `aegis-engine:transactions:v1:${e.chainId}:${e.account.toLowerCase()}`;
5523
5527
  }
5524
- function Je(e, t) {
5528
+ function Ge(e, t) {
5525
5529
  if (e === null) return [];
5526
5530
  if (e.length > 128 * 1024) throw new Error("Transaction history is too large.");
5527
5531
  const n = v({ version: g(1), records: $(al).max(128) }).strict().parse(JSON.parse(e)), r = /* @__PURE__ */ new Set();
@@ -5690,7 +5694,7 @@ function jt(e, t) {
5690
5694
  version: 1,
5691
5695
  records: [...e].sort((r, o) => r.hash.localeCompare(o.hash))
5692
5696
  });
5693
- return Je(n, t), n;
5697
+ return Ge(n, t), n;
5694
5698
  }
5695
5699
  function Yn(...e) {
5696
5700
  return e.flat().reduce(Qr, []);
@@ -5734,8 +5738,8 @@ function Kl({ scope: e, storage: t = null }) {
5734
5738
  try {
5735
5739
  const b = (n == null ? void 0 : n.getItem(o)) ?? null, R = Yn(
5736
5740
  s.records,
5737
- I === void 0 ? [] : Je(I, r),
5738
- Je(b, r)
5741
+ I === void 0 ? [] : Ge(I, r),
5742
+ Ge(b, r)
5739
5743
  ), x = jt(R, r), P = !!(n && x !== b);
5740
5744
  P && n.setItem(o, x), c(R, !1), P && u();
5741
5745
  } catch {
@@ -5743,10 +5747,10 @@ function Kl({ scope: e, storage: t = null }) {
5743
5747
  }
5744
5748
  }
5745
5749
  function p(I) {
5746
- const [b] = Je(jt([I], r), r);
5750
+ const [b] = Ge(jt([I], r), r);
5747
5751
  let R = Qr(s.records, b), x = !1;
5748
5752
  try {
5749
- R = Yn(Je((n == null ? void 0 : n.getItem(o)) ?? null, r), R), n == null || n.setItem(o, jt(R, r));
5753
+ R = Yn(Ge((n == null ? void 0 : n.getItem(o)) ?? null, r), R), n == null || n.setItem(o, jt(R, r));
5750
5754
  } catch {
5751
5755
  x = !0;
5752
5756
  }
@@ -5780,20 +5784,20 @@ function Kl({ scope: e, storage: t = null }) {
5780
5784
  if (!s.pending.some((Ue) => Ue.hash === N.hash)) continue;
5781
5785
  const ve = Math.min(8e3, P - Date.now());
5782
5786
  let ze;
5783
- const tt = { status: "unresolved", hash: N.hash }, J = await Promise.race([
5787
+ const rt = { status: "unresolved", hash: N.hash }, J = await Promise.race([
5784
5788
  pl({ publicClient: I, hash: N.hash, timeoutMs: ve }),
5785
5789
  new Promise((Ue) => {
5786
- ze = setTimeout(() => Ue(tt), ve);
5790
+ ze = setTimeout(() => Ue(rt), ve);
5787
5791
  })
5788
5792
  ]).finally(() => clearTimeout(ze));
5789
5793
  S++, J.status === "unresolved" && !(b != null && b.aborted) && i.add(J.hash);
5790
- const nt = N.executionChanged || J.executionChanged, re = J.status === "unresolved" ? "submitted" : J.status === "confirmed" ? nt ? "cancelled" : "success" : J.status;
5794
+ const ot = N.executionChanged || J.executionChanged, re = J.status === "unresolved" ? "submitted" : J.status === "confirmed" ? ot ? "cancelled" : "success" : J.status;
5791
5795
  J.status === "unresolved" && J.hash === N.hash && !J.executionChanged || (p({
5792
5796
  ...N,
5793
5797
  hash: J.hash,
5794
5798
  status: re,
5795
5799
  ...J.hash !== N.hash ? { recoveryAcknowledgedAt: void 0 } : {},
5796
- ...nt ? { executionChanged: !0 } : {},
5800
+ ...ot ? { executionChanged: !0 } : {},
5797
5801
  ...J.hash !== N.hash ? { replacedHashes: [...N.replacedHashes ?? [], N.hash] } : {},
5798
5802
  ...re === "submitted" ? {} : { title: re === "success" ? "Transaction confirmed" : re === "reverted" ? "Transaction reverted" : "Transaction cancelled" }
5799
5803
  }), J.status !== "unresolved" && A++);
@@ -5815,7 +5819,7 @@ export {
5815
5819
  Hl as C,
5816
5820
  Qr as D,
5817
5821
  ee as E,
5818
- Je as F,
5822
+ Ge as F,
5819
5823
  ql as G,
5820
5824
  jt as H,
5821
5825
  yl as I,
@@ -5876,12 +5880,12 @@ export {
5876
5880
  At as am,
5877
5881
  ll as an,
5878
5882
  fl as ao,
5879
- lt as ap,
5883
+ Be as ap,
5880
5884
  hu as aq,
5881
5885
  uu as ar,
5882
5886
  lu as as,
5883
5887
  pu as at,
5884
- ut as au,
5888
+ Me as au,
5885
5889
  fu as av,
5886
5890
  Lr as aw,
5887
5891
  ku as ax,
@@ -5908,7 +5912,7 @@ export {
5908
5912
  Tl as t,
5909
5913
  Rl as u,
5910
5914
  Zl as v,
5911
- et as w,
5915
+ nt as w,
5912
5916
  Ol as x,
5913
5917
  Pl as y,
5914
5918
  Ml as z