@synnaxlabs/pluto 0.31.0 → 0.32.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.
Files changed (71) hide show
  1. package/dist/{Animated-Bo0VMLXe.cjs → Animated-C_WGrQwR.cjs} +1 -1
  2. package/dist/{Animated-CqxAz8yC.js → Animated-NyYe8Svx.js} +1 -1
  3. package/dist/{Item-Cr7Cee2t.js → Item-CcXMlZIY.js} +3 -3
  4. package/dist/{Item-s_R6czdE.cjs → Item-DGKnKb6c.cjs} +1 -1
  5. package/dist/{Keyboard-D-9KUUCq.cjs → Keyboard-87LPq07J.cjs} +1 -1
  6. package/dist/{Keyboard-CIJ6C-6F.js → Keyboard-i5fqTDMP.js} +1 -1
  7. package/dist/{LinePlot-k6OxHynn.cjs → LinePlot-BcVyfdeK.cjs} +8 -8
  8. package/dist/{LinePlot-CVOH06qp.js → LinePlot-CCzgiKg5.js} +1 -1
  9. package/dist/{Link-z1QKdW8G.cjs → Link-B83uKMKM.cjs} +1 -1
  10. package/dist/{Link-B1bLviPV.js → Link-DlC5z0Wm.js} +1 -1
  11. package/dist/{List-DVMb5TAO.cjs → List-B3WCj8GQ.cjs} +1 -1
  12. package/dist/{List-L9yD_LRe.js → List-BjRQA8wb.js} +2 -2
  13. package/dist/{Text-D9wOBnT3.js → Text-MNWCdS6X.js} +3 -3
  14. package/dist/{Text-Vzb9NS0-.cjs → Text-XcCNQVZj.cjs} +1 -1
  15. package/dist/{Toggle-BrC3s3ox.js → Toggle-C1k6Tnpo.js} +1 -1
  16. package/dist/{Toggle-DdnBJm8D.cjs → Toggle-CIXrEiVA.cjs} +4 -4
  17. package/dist/{aggregator-BNkkZ-Bc.js → aggregator-f5OfPmNc.js} +603 -580
  18. package/dist/{aggregator-LvZi4Kvh.cjs → aggregator-q0CY7-QS.cjs} +24 -24
  19. package/dist/button.cjs +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/color.cjs +1 -1
  22. package/dist/color.js +1 -1
  23. package/dist/dropdown.cjs +1 -1
  24. package/dist/dropdown.js +1 -1
  25. package/dist/ether.cjs +1 -1
  26. package/dist/ether.js +4 -4
  27. package/dist/{external-DAswAy_H.js → external-BI9DOL9G.js} +3 -3
  28. package/dist/{external-D7bzFwDm.cjs → external-BUjAebk2.cjs} +1 -1
  29. package/dist/{external-EHAadzLe.js → external-BryXmBqR.js} +2 -2
  30. package/dist/{external-BpWJNQQi.cjs → external-C2Ri5xWS.cjs} +1 -1
  31. package/dist/{external-BGcGef1R.cjs → external-CDChKvhl.cjs} +1 -1
  32. package/dist/{external-BaV5u1sJ.js → external-CDGv7k3p.js} +2 -2
  33. package/dist/{external-oW8IRqfk.js → external-CIvyZ-Hc.js} +2 -2
  34. package/dist/{external-CGdoEsew.cjs → external-CN-OhewX.cjs} +1 -1
  35. package/dist/{external-qbHFNsHS.js → external-CNrnZ1L5.js} +5 -5
  36. package/dist/{external-ArTLjo1-.cjs → external-CSyZPKK4.cjs} +1 -1
  37. package/dist/{external-B1KQRpm7.js → external-CbjdO9a0.js} +5 -5
  38. package/dist/{external-Cta1T9rO.js → external-CmbBTupJ.js} +2 -2
  39. package/dist/{external-CzVXDUkp.cjs → external-DAQPXD3z.cjs} +1 -1
  40. package/dist/{external-DmH8EJ0I.cjs → external-DE4i3A2z.cjs} +1 -1
  41. package/dist/{external-BxX4TXgQ.cjs → external-DLa89w3J.cjs} +1 -1
  42. package/dist/{external-BwdvFk2R.js → external-DfIxCAg2.js} +2 -2
  43. package/dist/{external-ZS0XGHuP.cjs → external-DjE3je-g.cjs} +1 -1
  44. package/dist/{external-vf43rlmJ.js → external-DmJZ_zIB.js} +2 -2
  45. package/dist/{external-DzY80h7T.js → external-FeE2ijEU.js} +3 -3
  46. package/dist/{external-CJt9nz9P.cjs → external-cIvhYaqB.cjs} +1 -1
  47. package/dist/{external-MSpJvixc.cjs → external-i13duWIn.cjs} +1 -1
  48. package/dist/{external-ByGOTAK0.js → external-kSaQF2Vi.js} +3 -3
  49. package/dist/header.cjs +1 -1
  50. package/dist/header.js +1 -1
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.js +28 -28
  53. package/dist/input.cjs +1 -1
  54. package/dist/input.js +1 -1
  55. package/dist/list.cjs +1 -1
  56. package/dist/list.js +1 -1
  57. package/dist/menu.cjs +1 -1
  58. package/dist/menu.js +1 -1
  59. package/dist/src/select/Direction.d.ts.map +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/tabs.cjs +1 -1
  62. package/dist/tabs.js +1 -1
  63. package/dist/text.cjs +1 -1
  64. package/dist/text.js +2 -2
  65. package/dist/theming.cjs +1 -1
  66. package/dist/theming.js +2 -2
  67. package/dist/tree.cjs +1 -1
  68. package/dist/tree.js +1 -1
  69. package/dist/triggers.cjs +1 -1
  70. package/dist/triggers.js +1 -1
  71. package/package.json +7 -7
@@ -2,7 +2,7 @@ var Oc = Object.defineProperty;
2
2
  var Tc = (t, e, r) => e in t ? Oc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var U = (t, e, r) => Tc(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { z as s } from "zod";
5
- import { e as Qi, v as Sc, o as Ws, a as B, f as ye, Z as Nc } from "./css-B8RwzK24.js";
5
+ import { e as Qi, v as Sc, o as Vs, a as B, f as ye, Z as Nc } from "./css-B8RwzK24.js";
6
6
  import { useState as ys } from "react";
7
7
  var Yw = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8
8
  function qw(t) {
@@ -73,16 +73,16 @@ let kc = class {
73
73
  }
74
74
  decodeString(e, r) {
75
75
  const [n, ...i] = e.trim().split(`
76
- `).map((u) => u.trim());
76
+ `).map((l) => l.trim());
77
77
  if (n.length === 0)
78
78
  return r != null ? r.parse({}) : {};
79
- const a = n.split(",").map((u) => u.trim()), o = {};
80
- return a.forEach((u) => {
81
- o[u] = [];
82
- }), i.forEach((u) => {
83
- const c = u.split(",").map((d) => d.trim());
79
+ const a = n.split(",").map((l) => l.trim()), o = {};
80
+ return a.forEach((l) => {
81
+ o[l] = [];
82
+ }), i.forEach((l) => {
83
+ const u = l.split(",").map((d) => d.trim());
84
84
  a.forEach((d, f) => {
85
- const h = this.parseValue(c[f]);
85
+ const h = this.parseValue(u[f]);
86
86
  h != null && o[d].push(h);
87
87
  });
88
88
  }), r != null ? r.parse(o) : o;
@@ -109,7 +109,7 @@ let kc = class {
109
109
  const dr = new kc();
110
110
  new Ac();
111
111
  new xc();
112
- const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object" && "toString" in t, Gw = (t) => {
112
+ const Ws = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object" && "toString" in t, Gw = (t) => {
113
113
  if (ea(t)) return (t == null ? void 0 : t.toString().length) === 0;
114
114
  switch (typeof t) {
115
115
  case "string":
@@ -160,19 +160,19 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
160
160
  const r = Xr(t[0]), n = [...t].sort(r), i = [...e].sort(r);
161
161
  return n.every((a, o) => a === i[o]) ? 0 : -1;
162
162
  }, Rc = (t, e) => {
163
- const r = Vs(t), n = Vs(e);
163
+ const r = Ws(t), n = Ws(e);
164
164
  return ta(r, n);
165
165
  }, jc = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, ra = (t) => (e, r) => t(r, e), at = 0, fr = -1, yr = 1, na = (t) => t < at, sa = (t) => t > at, Mc = (t) => t >= at, ia = (t) => t === at, Dc = (t, e) => {
166
166
  const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), i = e.replace(/[\s_.-]+/g, "").match(r);
167
167
  if (!n || !i) return 0;
168
168
  for (let a = 0; a < Math.min(n.length, i.length); a++) {
169
- const o = n[a], u = i[a];
170
- if (isNaN(Number(o)) && isNaN(Number(u))) {
171
- const c = o.localeCompare(u);
172
- if (c !== 0) return c;
173
- } else if (!isNaN(Number(o)) && !isNaN(Number(u))) {
174
- const c = Number(o) - Number(u);
175
- if (c !== 0) return c;
169
+ const o = n[a], l = i[a];
170
+ if (isNaN(Number(o)) && isNaN(Number(l))) {
171
+ const u = o.localeCompare(l);
172
+ if (u !== 0) return u;
173
+ } else if (!isNaN(Number(o)) && !isNaN(Number(l))) {
174
+ const u = Number(o) - Number(l);
175
+ if (u !== 0) return u;
176
176
  } else
177
177
  return isNaN(Number(o)) ? -1 : 1;
178
178
  }
@@ -214,16 +214,16 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
214
214
  }).filter((i) => i != null).join(r);
215
215
  }, gs = (t, e, r = { optional: !1, separator: "." }) => {
216
216
  r.separator ?? (r.separator = ".");
217
- const { optional: n, getter: i = (u, c) => u[c] } = r, a = e.split(r.separator);
217
+ const { optional: n, getter: i = (l, u) => l[u] } = r, a = e.split(r.separator);
218
218
  if (a.length === 1 && a[0] === "") return t;
219
219
  let o = t;
220
- for (const u of a) {
221
- const c = i(o, u);
222
- if (c == null) {
220
+ for (const l of a) {
221
+ const u = i(o, l);
222
+ if (u == null) {
223
223
  if (n) return null;
224
- throw new Error(`Path ${e} does not exist. ${u} is null`);
224
+ throw new Error(`Path ${e} does not exist. ${l} is null`);
225
225
  }
226
- o = c;
226
+ o = u;
227
227
  }
228
228
  return o;
229
229
  }, Pc = (t, e, r) => {
@@ -275,34 +275,34 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
275
275
  o === i.length - 1 ? delete n[a] : a in n && (n = n[a]);
276
276
  });
277
277
  }), t), zc = (t, e, r = "") => {
278
- const n = {}, i = (a, o, u) => {
278
+ const n = {}, i = (a, o, l) => {
279
279
  if (typeof a != typeof o || a === null || o === null) {
280
- n[u] = [a, o];
280
+ n[l] = [a, o];
281
281
  return;
282
282
  }
283
283
  if (typeof a == "object" && typeof o == "object")
284
284
  if (Array.isArray(a) && Array.isArray(o)) {
285
285
  if (a.length !== o.length) {
286
- n[u] = [a, o];
286
+ n[l] = [a, o];
287
287
  return;
288
288
  }
289
- for (let c = 0; c < a.length; c++)
290
- i(a[c], o[c], `${u}[${c}]`);
289
+ for (let u = 0; u < a.length; u++)
290
+ i(a[u], o[u], `${l}[${u}]`);
291
291
  } else
292
- (/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(o)])).forEach((c) => {
293
- i(a[c], o[c], u !== "" ? `${u}.${c}` : c);
292
+ (/* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(o)])).forEach((u) => {
293
+ i(a[u], o[u], l !== "" ? `${l}.${u}` : u);
294
294
  });
295
295
  else
296
- a !== o && (n[u] = [a, o]);
296
+ a !== o && (n[l] = [a, o]);
297
297
  };
298
298
  return i(t, e, r), n;
299
299
  }, zn = (t, e) => {
300
300
  const r = Array.isArray(t), n = Array.isArray(e);
301
301
  if (r !== n) return !1;
302
302
  if (r && n) {
303
- const o = t, u = e;
304
- if (o.length !== u.length) return !1;
305
- for (let c = 0; c < o.length; c++) if (!zn(o[c], u[c])) return !1;
303
+ const o = t, l = e;
304
+ if (o.length !== l.length) return !1;
305
+ for (let u = 0; u < o.length; u++) if (!zn(o[u], l[u])) return !1;
306
306
  return !0;
307
307
  }
308
308
  if (t == null || e == null || typeof t != "object" || typeof e != "object")
@@ -311,10 +311,10 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
311
311
  const i = Object.keys(t), a = Object.keys(e);
312
312
  if (i.length !== a.length) return !1;
313
313
  for (const o of i) {
314
- const u = t[o], c = e[o];
315
- if (typeof u == "object" && typeof c == "object") {
316
- if (!zn(u, c)) return !1;
317
- } else if (u !== c) return !1;
314
+ const l = t[o], u = e[o];
315
+ if (typeof l == "object" && typeof u == "object") {
316
+ if (!zn(l, u)) return !1;
317
+ } else if (l !== u) return !1;
318
318
  }
319
319
  return !0;
320
320
  }, oa = (t, e) => {
@@ -341,17 +341,17 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
341
341
  return Fn(t, ...e);
342
342
  }, Fc = (t, e, r) => {
343
343
  const n = (i, a, o) => {
344
- for (const u in a) {
345
- const c = a[u];
346
- if (o != null && o.shape[u]) {
347
- const d = o.shape[u].safeParse(c);
348
- d.success && (i[u] = d.data);
349
- } else typeof c == "object" && !Array.isArray(c) && c !== null && o && o.shape && o.shape[u] && (i[u] || (i[u] = {}), n(i[u], c, o.shape[u]));
344
+ for (const l in a) {
345
+ const u = a[l];
346
+ if (o != null && o.shape[l]) {
347
+ const d = o.shape[l].safeParse(u);
348
+ d.success && (i[l] = d.data);
349
+ } else typeof u == "object" && !Array.isArray(u) && u !== null && o && o.shape && o.shape[l] && (i[l] || (i[l] = {}), n(i[l], u, o.shape[l]));
350
350
  }
351
351
  return i;
352
352
  };
353
353
  return n({ ...t }, e, r);
354
- }, Wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
354
+ }, Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
355
355
  __proto__: null,
356
356
  copy: Yc,
357
357
  deleteD: qc,
@@ -374,7 +374,7 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
374
374
  if (t == null) return null;
375
375
  const r = t[e];
376
376
  return r == null && typeof t == "object" && "sourceType" in t ? t.sourceType()[e] : r;
377
- }, Vc = (t, e, r) => gs(
377
+ }, Wc = (t, e, r) => gs(
378
378
  Gs(t, "shape"),
379
379
  ca(e),
380
380
  { ...r, getter: Gs }
@@ -384,7 +384,7 @@ const Vs = (t) => [...new Set(t)], ea = (t) => t != null && typeof t == "object"
384
384
  }, la = s.bigint().or(s.string().transform(BigInt)), Hw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
385
385
  __proto__: null,
386
386
  bigInt: la,
387
- getFieldSchema: Vc,
387
+ getFieldSchema: Wc,
388
388
  getFieldSchemaPath: ca,
389
389
  transformer: Gc
390
390
  }, Symbol.toStringTag, { value: "Module" }));
@@ -399,7 +399,7 @@ const Hc = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ua
399
399
  __proto__: null,
400
400
  id: ua
401
401
  }, Symbol.toStringTag, { value: "Module" })), Qc = s.enum(["static", "dynamic"]), ha = (t, e) => {
402
- const r = new V(e);
402
+ const r = new W(e);
403
403
  if (![
404
404
  H.DAY,
405
405
  H.HOUR,
@@ -413,7 +413,7 @@ const Hc = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ua
413
413
  "Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
414
414
  );
415
415
  const n = t.valueOf() % r.valueOf();
416
- return t instanceof V ? new V(n) : new H(n);
416
+ return t instanceof W ? new W(n) : new H(n);
417
417
  }, L = class T {
418
418
  constructor(e, r = "UTC") {
419
419
  if (m(this, "value"), m(this, "encodeValue", !0), e == null) this.value = T.now().valueOf();
@@ -439,10 +439,10 @@ const Hc = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", ua
439
439
  }
440
440
  static parseTimeString(e, r = "UTC") {
441
441
  const [n, i, a] = e.split(":");
442
- let o = "00", u = "00";
443
- a != null && ([o, u] = a.split("."));
444
- let c = T.hours(parseInt(n ?? "00", 10)).add(T.minutes(parseInt(i ?? "00", 10))).add(T.seconds(parseInt(o ?? "00", 10))).add(T.milliseconds(parseInt(u ?? "00", 10)));
445
- return r === "local" && (c = c.add(T.utcOffset)), c.valueOf();
442
+ let o = "00", l = "00";
443
+ a != null && ([o, l] = a.split("."));
444
+ let u = T.hours(parseInt(n ?? "00", 10)).add(T.minutes(parseInt(i ?? "00", 10))).add(T.seconds(parseInt(o ?? "00", 10))).add(T.milliseconds(parseInt(l ?? "00", 10)));
445
+ return r === "local" && (u = u.add(T.utcOffset)), u.valueOf();
446
446
  }
447
447
  static parseDateTimeString(e, r = "UTC") {
448
448
  if (!e.includes("/") && !e.includes("-"))
@@ -709,7 +709,7 @@ m(L, "z", s.union([
709
709
  s.number().transform((t) => new L(t)),
710
710
  s.instanceof(L)
711
711
  ]));
712
- let V = L;
712
+ let W = L;
713
713
  const _ = class x {
714
714
  constructor(e) {
715
715
  m(this, "value"), m(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
@@ -741,9 +741,9 @@ const _ = class x {
741
741
  );
742
742
  }
743
743
  toString() {
744
- const e = this.truncate(x.DAY), r = this.truncate(x.HOUR), n = this.truncate(x.MINUTE), i = this.truncate(x.SECOND), a = this.truncate(x.MILLISECOND), o = this.truncate(x.MICROSECOND), u = this.truncate(x.NANOSECOND), c = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = u.sub(o);
744
+ const e = this.truncate(x.DAY), r = this.truncate(x.HOUR), n = this.truncate(x.MINUTE), i = this.truncate(x.SECOND), a = this.truncate(x.MILLISECOND), o = this.truncate(x.MICROSECOND), l = this.truncate(x.NANOSECOND), u = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = l.sub(o);
745
745
  let j = "";
746
- return c.isZero || (j += `${c.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
746
+ return u.isZero || (j += `${u.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
747
747
  }
748
748
  /** @returns the decimal number of days in the timespan */
749
749
  get days() {
@@ -1006,7 +1006,7 @@ const Te = class pr {
1006
1006
  * @param end - A TimeStamp representing the end of the range.
1007
1007
  */
1008
1008
  constructor(e, r) {
1009
- m(this, "start"), m(this, "end"), typeof e == "object" && "start" in e ? (this.start = new V(e.start), this.end = new V(e.end)) : (this.start = new V(e), this.end = new V(r));
1009
+ m(this, "start"), m(this, "end"), typeof e == "object" && "start" in e ? (this.start = new W(e.start), this.end = new W(e.end)) : (this.start = new W(e), this.end = new W(r));
1010
1010
  }
1011
1011
  /** @returns The TimeSpan occupied by the TimeRange. */
1012
1012
  get span() {
@@ -1078,7 +1078,7 @@ const Te = class pr {
1078
1078
  const n = this.makeValid();
1079
1079
  if (this.equals(e)) return !0;
1080
1080
  if (e.end.equals(n.start) || n.end.equals(e.start)) return !1;
1081
- const i = V.max(n.start, e.start), a = V.min(n.end, e.end);
1081
+ const i = W.max(n.start, e.start), a = W.min(n.end, e.end);
1082
1082
  return a.before(i) ? !1 : new H(a.sub(i)).greaterThanOrEqual(r);
1083
1083
  }
1084
1084
  roughlyEquals(e, r) {
@@ -1093,11 +1093,11 @@ const Te = class pr {
1093
1093
  return e.start.after(this.start) && (r.start = e.start), e.start.after(this.end) && (r.end = e.start), e.end.before(this.end) && (r.end = e.end), e.end.before(this.start) && (r.start = e.end), r;
1094
1094
  }
1095
1095
  };
1096
- m(Te, "MAX", new Te(V.MIN, V.MAX)), /** The minimum possible time range. */
1097
- m(Te, "MIN", new Te(V.MAX, V.MIN)), /** A zero time range. */
1098
- m(Te, "ZERO", new Te(V.ZERO, V.ZERO)), /** A zod schema for validating and transforming time ranges */
1096
+ m(Te, "MAX", new Te(W.MIN, W.MAX)), /** The minimum possible time range. */
1097
+ m(Te, "MIN", new Te(W.MAX, W.MIN)), /** A zero time range. */
1098
+ m(Te, "ZERO", new Te(W.ZERO, W.ZERO)), /** A zod schema for validating and transforming time ranges */
1099
1099
  m(Te, "z", s.union([
1100
- s.object({ start: V.z, end: V.z }).transform((t) => new Te(t.start, t.end)),
1100
+ s.object({ start: W.z, end: W.z }).transform((t) => new Te(t.start, t.end)),
1101
1101
  s.instanceof(Te)
1102
1102
  ]));
1103
1103
  let zt = Te;
@@ -1299,9 +1299,9 @@ const ie = class Z extends Number {
1299
1299
  return this.valueOf() / Z.TERABYTE.valueOf();
1300
1300
  }
1301
1301
  toString() {
1302
- const e = this.truncate(Z.TERABYTE), r = this.truncate(Z.GIGABYTE), n = this.truncate(Z.MEGABYTE), i = this.truncate(Z.KILOBYTE), a = this.truncate(Z.BYTE), o = e, u = r.sub(e), c = n.sub(r), d = i.sub(n), f = a.sub(i);
1302
+ const e = this.truncate(Z.TERABYTE), r = this.truncate(Z.GIGABYTE), n = this.truncate(Z.MEGABYTE), i = this.truncate(Z.KILOBYTE), a = this.truncate(Z.BYTE), o = e, l = r.sub(e), u = n.sub(r), d = i.sub(n), f = a.sub(i);
1303
1303
  let h = "";
1304
- return o.isZero || (h += `${o.terabytes}TB `), u.isZero || (h += `${u.gigabytes}GB `), c.isZero || (h += `${c.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
1304
+ return o.isZero || (h += `${o.terabytes}TB `), l.isZero || (h += `${l.gigabytes}GB `), u.isZero || (h += `${u.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
1305
1305
  }
1306
1306
  /**
1307
1307
  * Creates a Size from the given number of bytes.
@@ -1376,7 +1376,7 @@ const eb = s.union([
1376
1376
  s.instanceof(BigInt64Array)
1377
1377
  ]), da = (t) => {
1378
1378
  const e = typeof t;
1379
- return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof V || t instanceof H || t instanceof Date;
1379
+ return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof W || t instanceof H || t instanceof Date;
1380
1380
  }, el = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : wt(r, -n), tl = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof sl ? !0 : da(t), qe = -1, rl = s.string().transform(
1381
1381
  (t) => new Uint8Array(
1382
1382
  atob(t).split("").map((e) => e.charCodeAt(0))
@@ -1390,47 +1390,47 @@ const eb = s.union([
1390
1390
  sampleOffset: i = 0,
1391
1391
  glBufferUsage: a = "static",
1392
1392
  alignment: o = 0n,
1393
- key: u = ua()
1394
- } = e, c = e.data ?? [];
1395
- if (c instanceof Ce || typeof c == "object" && "isSynnaxSeries" in c && c.isSynnaxSeries === !0) {
1396
- const h = c;
1393
+ key: l = ua()
1394
+ } = e, u = e.data ?? [];
1395
+ if (u instanceof Ce || typeof u == "object" && "isSynnaxSeries" in u && u.isSynnaxSeries === !0) {
1396
+ const h = u;
1397
1397
  this.key = h.key, this.dataType = h.dataType, this.sampleOffset = h.sampleOffset, this.gl = h.gl, this._data = h._data, this._timeRange = h._timeRange, this.alignment = h.alignment, this._cachedMin = h._cachedMin, this._cachedMax = h._cachedMax, this.writePos = h.writePos, this._refCount = h._refCount, this._cachedLength = h._cachedLength;
1398
1398
  return;
1399
1399
  }
1400
- const d = da(c), f = Array.isArray(c);
1400
+ const d = da(u), f = Array.isArray(u);
1401
1401
  if (r != null) this.dataType = new M(r);
1402
1402
  else {
1403
- if (c instanceof ArrayBuffer)
1403
+ if (u instanceof ArrayBuffer)
1404
1404
  throw new Error(
1405
1405
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
1406
1406
  );
1407
1407
  if (f || d) {
1408
- let h = c;
1408
+ let h = u;
1409
1409
  if (!d) {
1410
- if (c.length === 0)
1410
+ if (u.length === 0)
1411
1411
  throw new Error(
1412
1412
  "cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
1413
1413
  );
1414
- h = c[0];
1414
+ h = u[0];
1415
1415
  }
1416
1416
  if (typeof h == "string") this.dataType = M.STRING;
1417
1417
  else if (typeof h == "number") this.dataType = M.FLOAT64;
1418
1418
  else if (typeof h == "bigint") this.dataType = M.INT64;
1419
1419
  else if (typeof h == "boolean") this.dataType = M.BOOLEAN;
1420
- else if (h instanceof V || h instanceof Date || h instanceof V)
1420
+ else if (h instanceof W || h instanceof Date || h instanceof W)
1421
1421
  this.dataType = M.TIMESTAMP;
1422
1422
  else if (typeof h == "object") this.dataType = M.JSON;
1423
1423
  else
1424
1424
  throw new Error(
1425
1425
  `cannot infer data type of ${typeof h} when constructing a Series from a JS array`
1426
1426
  );
1427
- } else this.dataType = new M(c);
1427
+ } else this.dataType = new M(u);
1428
1428
  }
1429
- if (!f && !d) this._data = c;
1429
+ if (!f && !d) this._data = u;
1430
1430
  else {
1431
- let h = d ? [c] : c;
1431
+ let h = d ? [u] : u;
1432
1432
  const E = h[0];
1433
- (E instanceof V || E instanceof Date || E instanceof H) && (h = h.map((P) => new V(P).valueOf())), this.dataType.equals(M.STRING) ? (this._cachedLength = h.length, this._data = new TextEncoder().encode(h.join(`
1433
+ (E instanceof W || E instanceof Date || E instanceof H) && (h = h.map((P) => new W(P).valueOf())), this.dataType.equals(M.STRING) ? (this._cachedLength = h.length, this._data = new TextEncoder().encode(h.join(`
1434
1434
  `) + `
1435
1435
  `)) : this.dataType.equals(M.JSON) ? (this._cachedLength = h.length, this._data = new TextEncoder().encode(
1436
1436
  h.map((P) => dr.encodeString(P)).join(`
@@ -1438,7 +1438,7 @@ const eb = s.union([
1438
1438
  `
1439
1439
  )) : this._data = new this.dataType.Array(h).buffer;
1440
1440
  }
1441
- this.key = u, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
1441
+ this.key = l, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
1442
1442
  control: null,
1443
1443
  buffer: null,
1444
1444
  prevBuffer: 0,
@@ -1630,7 +1630,7 @@ const eb = s.union([
1630
1630
  }
1631
1631
  /** @returns the bounds of this array. */
1632
1632
  get bounds() {
1633
- return Ws(Number(this.min), Number(this.max));
1633
+ return Vs(Number(this.min), Number(this.max));
1634
1634
  }
1635
1635
  maybeRecomputeMinMax(e) {
1636
1636
  if (this._cachedMin != null) {
@@ -1754,7 +1754,7 @@ const eb = s.union([
1754
1754
  };
1755
1755
  }
1756
1756
  get alignmentBounds() {
1757
- return Ws(this.alignment, this.alignment + BigInt(this.length));
1757
+ return Vs(this.alignment, this.alignment + BigInt(this.length));
1758
1758
  }
1759
1759
  maybeGarbageCollectGLBuffer(e) {
1760
1760
  this.gl.buffer != null && (e.deleteBuffer(this.gl.buffer), this.gl.buffer = null, this.gl.prevBuffer = 0, this.gl.control = null);
@@ -1949,7 +1949,7 @@ const hl = () => {
1949
1949
  osZ: ul
1950
1950
  }, Symbol.toStringTag, { value: "Module" })), ab = (t) => Array.isArray(t) ? t : [t], ob = (t) => Array.isArray(t) ? t : t === null ? [] : [t];
1951
1951
  var yl = Object.defineProperty, gl = (t, e, r) => e in t ? yl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, bt = (t, e, r) => gl(t, typeof e != "symbol" ? e + "" : e, r);
1952
- const pl = (...t) => t.map(ga).join(""), ga = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), ml = (t) => t.endsWith("/") ? t.slice(0, -1) : t, ei = class Wn {
1952
+ const pl = (...t) => t.map(ga).join(""), ga = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), ml = (t) => t.endsWith("/") ? t.slice(0, -1) : t, ei = class Vn {
1953
1953
  /**
1954
1954
  * @param host - The hostname or IP address of the server.
1955
1955
  * @param port - The port number of the server.
@@ -1965,7 +1965,7 @@ const pl = (...t) => t.map(ga).join(""), ga = (t) => (t.endsWith("/") || (t += "
1965
1965
  * @returns a new URL.
1966
1966
  */
1967
1967
  replace(e) {
1968
- return new Wn({
1968
+ return new Vn({
1969
1969
  host: e.host ?? this.host,
1970
1970
  port: e.port ?? this.port,
1971
1971
  protocol: e.protocol ?? this.protocol,
@@ -1978,7 +1978,7 @@ const pl = (...t) => t.map(ga).join(""), ga = (t) => (t.endsWith("/") || (t += "
1978
1978
  * @returns a new URL.
1979
1979
  */
1980
1980
  child(e) {
1981
- return new Wn({
1981
+ return new Vn({
1982
1982
  ...this,
1983
1983
  pathPrefix: pl(this.path, e)
1984
1984
  });
@@ -2019,14 +2019,14 @@ let Ol = class {
2019
2019
  }
2020
2020
  };
2021
2021
  var Tl = Object.defineProperty, Sl = (t, e, r) => e in t ? Tl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, mr = (t, e, r) => Sl(t, typeof e != "symbol" ? e + "" : e, r);
2022
- const Ve = class extends Number {
2022
+ const We = class extends Number {
2023
2023
  };
2024
- mr(Ve, "Absolute", 255), mr(Ve, "Default", 1), mr(Ve, "z", s.union([
2025
- s.instanceof(Ve),
2026
- s.number().int().min(0).max(255).transform((t) => new Ve(t)),
2027
- s.instanceof(Number).transform((t) => new Ve(t))
2024
+ mr(We, "Absolute", 255), mr(We, "Default", 1), mr(We, "z", s.union([
2025
+ s.instanceof(We),
2026
+ s.number().int().min(0).max(255).transform((t) => new We(t)),
2027
+ s.instanceof(Number).transform((t) => new We(t))
2028
2028
  ]));
2029
- let pa = Ve;
2029
+ let pa = We;
2030
2030
  const ma = s.object({
2031
2031
  name: s.string(),
2032
2032
  key: s.string()
@@ -2055,20 +2055,20 @@ const ma = s.object({
2055
2055
  mr(wa, "MESSAGE", "canceled");
2056
2056
  let Il = wa;
2057
2057
  new Il();
2058
- const fb = (t) => t ? -1 : 1, Vn = s.string().regex(/^\d+\.\d+\.\d+$/), Jt = (t, e, r = {}) => {
2058
+ const fb = (t) => t ? -1 : 1, Wn = s.string().regex(/^\d+\.\d+\.\d+$/), Jt = (t, e, r = {}) => {
2059
2059
  r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
2060
- const n = Vn.parse(t), i = Vn.parse(e), [a, o, u] = n.split(".").map(Number), [c, d, f] = i.split(".").map(Number);
2060
+ const n = Wn.parse(t), i = Wn.parse(e), [a, o, l] = n.split(".").map(Number), [u, d, f] = i.split(".").map(Number);
2061
2061
  if (r.checkMajor) {
2062
- if (a < c) return fr;
2063
- if (a > c) return yr;
2062
+ if (a < u) return fr;
2063
+ if (a > u) return yr;
2064
2064
  }
2065
2065
  if (r.checkMinor) {
2066
2066
  if (o < d) return fr;
2067
2067
  if (o > d) return yr;
2068
2068
  }
2069
2069
  if (r.checkPatch) {
2070
- if (u < f) return fr;
2071
- if (u > f) return yr;
2070
+ if (l < f) return fr;
2071
+ if (l > f) return yr;
2072
2072
  }
2073
2073
  return at;
2074
2074
  }, kl = (t, e, r = {}) => ia(Jt(t, e, r)), ba = (t, e, r = {}) => sa(Jt(t, e, r)), Al = (t, e, r = {}) => na(Jt(t, e, r)), xl = ({
@@ -2085,42 +2085,52 @@ const fb = (t) => t ? -1 : 1, Vn = s.string().regex(/^\d+\.\d+\.\d+$/), Jt = (t,
2085
2085
  name: t,
2086
2086
  migrations: e,
2087
2087
  targetSchema: r,
2088
- def: n
2088
+ defaultVersion: n,
2089
+ def: i
2089
2090
  }) => {
2090
- const i = Object.keys(e).sort(Jt).pop();
2091
- if (i == null)
2092
- return (c) => {
2093
- if (c.version !== n.version)
2091
+ const a = Object.keys(e).sort(Jt).pop();
2092
+ if (a == null)
2093
+ return (d) => {
2094
+ if (d.version == null && (d.version = n), d.version !== i.version)
2094
2095
  return console.log(
2095
- `${t} version ${c.version} is newer than latest version of ${n.version}.
2096
+ `${t} version ${d.version} is newer than latest version of ${i.version}.
2096
2097
  Returning default instead.
2097
2098
  `
2098
- ), n;
2099
+ ), i;
2099
2100
  try {
2100
- return r != null ? r.parse(c) : c;
2101
- } catch (d) {
2102
- return console.log(`${t} failed to parse default. Exiting with default`), console.error(d), n;
2101
+ return r != null ? r.parse(d) : d;
2102
+ } catch (f) {
2103
+ return console.log(`${t} failed to parse default. Exiting with default`), console.error(f), i;
2103
2104
  }
2104
2105
  };
2105
- const a = Object.keys(e).length;
2106
- let o = !1;
2107
- const u = (c) => {
2106
+ const o = Object.keys(e).length;
2107
+ let l = !1;
2108
+ const u = (d) => {
2108
2109
  try {
2109
- if (a === 0 || ba(c.version, i))
2110
- return console.log(o ? `${t} ${c.version} now up to date` : `${t} version ${c.version} is up to date with target version ${n.version}`), c;
2111
- const d = c.version, f = e[d], h = f(c);
2112
- return o = !0, u(h);
2113
- } catch (d) {
2110
+ if (o === 0 || ba(d.version, a))
2111
+ return console.log(l ? `${t} ${d.version} now up to date` : `${t} version ${d.version} is up to date with target version ${i.version}`), d;
2112
+ const f = d.version, h = e[f], E = h(d);
2113
+ return l = !0, u(E);
2114
+ } catch (f) {
2114
2115
  return console.log(
2115
- `${t} failed to migrate from ${c.version} to ${i}`
2116
- ), console.error(d), n;
2116
+ `${t} failed to migrate from ${d.version} to ${a}`
2117
+ ), console.error(f), i;
2117
2118
  }
2118
2119
  };
2119
- return (c) => {
2120
+ return (d) => {
2120
2121
  try {
2121
- return u(c);
2122
- } catch (d) {
2123
- return console.log(`${t} failed to parse final result. Exiting with default`), console.error(d), n;
2122
+ if (d.version == null)
2123
+ if (n != null)
2124
+ console.log(
2125
+ `${t} version is null. Setting version to default of ${n}`
2126
+ ), d.version = n;
2127
+ else
2128
+ return console.log(
2129
+ `${t} version is null and no default version set. Exiting with default`
2130
+ ), i;
2131
+ return u(d);
2132
+ } catch (f) {
2133
+ return console.log(`${t} failed to parse final result. Exiting with default`), console.error(f), i;
2124
2134
  }
2125
2135
  };
2126
2136
  }, yb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -2130,7 +2140,7 @@ const fb = (t) => t ? -1 : 1, Vn = s.string().regex(/^\d+\.\d+\.\d+$/), Jt = (t,
2130
2140
  migrator: Cl,
2131
2141
  semVerNewer: ba,
2132
2142
  semVerOlder: Al,
2133
- semVerZ: Vn,
2143
+ semVerZ: Wn,
2134
2144
  versionsEqual: kl
2135
2145
  }, Symbol.toStringTag, { value: "Module" })), gb = (t) => {
2136
2146
  if (t === void 0 || typeof t == "string" || typeof t == "number")
@@ -2421,7 +2431,7 @@ const Pl = () => (vn == null && (vn = document.createElement("canvas")), vn), vb
2421
2431
  "#FDFDFD"
2422
2432
  ], ft = Object.fromEntries(
2423
2433
  Fl.map((t, e) => [`l${e}`, t])
2424
- ), Wl = Object.freeze({
2434
+ ), Vl = Object.freeze({
2425
2435
  ...Gn,
2426
2436
  key: "synnaxDark",
2427
2437
  name: "Synnax Dark",
@@ -2434,14 +2444,14 @@ const Pl = () => (vn == null && (vn = document.createElement("canvas")), vn), vb
2434
2444
  textInverted: ft.l0,
2435
2445
  textOnPrimary: ft.l10
2436
2446
  }
2437
- }), Ob = { synnaxDark: Wl, synnaxLight: zl }, Vl = ["small", "medium", "large", "huge"], Gl = s.enum(Vl), Zl = (t) => Gl.safeParse(t).success, Tb = (t, e, r) => {
2447
+ }), Ob = { synnaxDark: Vl, synnaxLight: zl }, Wl = ["small", "medium", "large", "huge"], Gl = s.enum(Wl), Zl = (t) => Gl.safeParse(t).success, Tb = (t, e, r) => {
2438
2448
  const {
2439
2449
  typography: n,
2440
2450
  sizes: { base: i }
2441
- } = t, a = n[Zl(e) ? Dl[e] : e].size, o = i * a, [u, c] = n.family.split(", ");
2442
- return r != null ? ` ${r} ${o}px ${u}, ${c}` : ` ${o}px ${n.family}`;
2451
+ } = t, a = n[Zl(e) ? Dl[e] : e].size, o = i * a, [l, u] = n.family.split(", ");
2452
+ return r != null ? ` ${r} ${o}px ${l}, ${u}` : ` ${o}px ${n.family}`;
2443
2453
  };
2444
- var Kl = Object.defineProperty, Jl = (t, e, r) => e in t ? Kl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, l = (t, e, r) => Jl(t, typeof e != "symbol" ? e + "" : e, r);
2454
+ var Kl = Object.defineProperty, Jl = (t, e, r) => e in t ? Kl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, c = (t, e, r) => Jl(t, typeof e != "symbol" ? e + "" : e, r);
2445
2455
  const O = (t) => Array.isArray(t) ? t : [t];
2446
2456
  var Hl = Object.defineProperty, Xl = (t, e, r) => e in t ? Hl(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, D = (t, e, r) => Xl(t, typeof e != "symbol" ? e + "" : e, r);
2447
2457
  const Ql = (t) => {
@@ -2455,12 +2465,12 @@ const Ql = (t) => {
2455
2465
  n = ru(n);
2456
2466
  const i = {}, a = r;
2457
2467
  return Object.keys(a).forEach((o) => {
2458
- let u = a[o];
2459
- const c = t(o);
2460
- n.recursive && (On(u) ? ri(u, n.keepTypesOnRecursion) || (u = e(u, n)) : n.recursiveInArray && ti(u) && (u = [...u].map((d) => {
2468
+ let l = a[o];
2469
+ const u = t(o);
2470
+ n.recursive && (On(l) ? ri(l, n.keepTypesOnRecursion) || (l = e(l, n)) : n.recursiveInArray && ti(l) && (l = [...l].map((d) => {
2461
2471
  let f = d;
2462
2472
  return On(d) ? ri(f, n.keepTypesOnRecursion) || (f = e(d, n)) : ti(d) && (f = e({ key: d }, n).key), f;
2463
- }))), i[c] = u;
2473
+ }))), i[u] = l;
2464
2474
  }), i;
2465
2475
  };
2466
2476
  return e;
@@ -2521,10 +2531,10 @@ let iu = class {
2521
2531
  return i.forEach((o) => {
2522
2532
  a[o] = [];
2523
2533
  }), n.forEach((o) => {
2524
- const u = o.split(",").map((c) => c.trim());
2525
- i.forEach((c, d) => {
2526
- const f = this.parseValue(u[d]);
2527
- f != null && a[c].push(f);
2534
+ const l = o.split(",").map((u) => u.trim());
2535
+ i.forEach((u, d) => {
2536
+ const f = this.parseValue(l[d]);
2537
+ f != null && a[u].push(f);
2528
2538
  });
2529
2539
  }), e != null ? e.parse(a) : a;
2530
2540
  }
@@ -2559,7 +2569,7 @@ const Ia = s.object({ width: s.number(), height: s.number() }), cu = s.object({
2559
2569
  s.enum(lu);
2560
2570
  const uu = ["start", "center", "end"], hu = ["signedWidth", "signedHeight"];
2561
2571
  s.enum(hu);
2562
- const Wr = s.object({ x: s.number(), y: s.number() }), du = s.object({ clientX: s.number(), clientY: s.number() }), fu = ["x", "y"], ka = s.enum(fu), Aa = ["top", "right", "bottom", "left"];
2572
+ const Vr = s.object({ x: s.number(), y: s.number() }), du = s.object({ clientX: s.number(), clientY: s.number() }), fu = ["x", "y"], ka = s.enum(fu), Aa = ["top", "right", "bottom", "left"];
2563
2573
  s.enum(Aa);
2564
2574
  const yu = ["left", "right"], xa = s.enum(yu), gu = ["top", "bottom"], Ca = s.enum(gu), $a = ["center"], ni = s.enum($a), pu = [...Aa, ...$a], Ra = s.enum(pu);
2565
2575
  s.enum(uu);
@@ -2586,7 +2596,7 @@ s.object({
2586
2596
  });
2587
2597
  const vu = s.object({ x: xa, y: Ca }), Ou = Object.freeze({ x: "left", y: "top" }), Tu = (t, e) => t.x === e.x && t.y === e.y, ii = s.union([
2588
2598
  s.number(),
2589
- Wr,
2599
+ Vr,
2590
2600
  en,
2591
2601
  Ia,
2592
2602
  cu,
@@ -2611,8 +2621,8 @@ s.object({
2611
2621
  bottom: s.number()
2612
2622
  });
2613
2623
  s.object({
2614
- one: Wr,
2615
- two: Wr,
2624
+ one: Vr,
2625
+ two: Vr,
2616
2626
  root: vu
2617
2627
  });
2618
2628
  const ms = (t, e, r = 0, n = 0, i) => {
@@ -2651,9 +2661,9 @@ const Au = (t) => (e, r, n, i) => r === "dimension" ? [e, n] : [
2651
2661
  i ? n / t : n * t
2652
2662
  ], Cu = (t) => (e, r, n) => {
2653
2663
  if (e === null) return [t, n];
2654
- const { lower: i, upper: a } = e, { lower: o, upper: u } = t, c = a - i, d = u - o;
2655
- if (r === "dimension") return [t, n * (d / c)];
2656
- const f = (n - i) * (d / c) + o;
2664
+ const { lower: i, upper: a } = e, { lower: o, upper: l } = t, u = a - i, d = l - o;
2665
+ if (r === "dimension") return [t, n * (d / u)];
2666
+ const f = (n - i) * (d / u) + o;
2657
2667
  return [t, f];
2658
2668
  }, $u = (t) => (e, r, n) => [t, n], Ru = () => (t, e, r) => {
2659
2669
  if (t === null) throw new Error("cannot invert without bounds");
@@ -2723,9 +2733,9 @@ const Au = (t) => (e, r, n, i) => r === "dimension" ? [e, n] : [
2723
2733
  e.ops.reverse();
2724
2734
  const r = [];
2725
2735
  return e.ops.forEach((n, i) => {
2726
- if (n.type === "scale" || r.some(([o, u]) => i >= o && i <= u))
2736
+ if (n.type === "scale" || r.some(([o, l]) => i >= o && i <= l))
2727
2737
  return;
2728
- const a = e.ops.findIndex((o, u) => o.type === "scale" && u > i);
2738
+ const a = e.ops.findIndex((o, l) => o.type === "scale" && l > i);
2729
2739
  a !== -1 && r.push([i, a]);
2730
2740
  }), r.forEach(([n, i]) => {
2731
2741
  const a = e.ops.slice(n, i);
@@ -2841,7 +2851,7 @@ const Mu = (t) => t != null && typeof t == "object" && "toString" in t, Du = (t,
2841
2851
  }
2842
2852
  return e ? Pu(n) : n;
2843
2853
  }, Pu = (t) => (e, r) => t(r, e), Bu = s.object({ signedWidth: s.number(), signedHeight: s.number() });
2844
- s.union([Ia, Bu, Wr, en]);
2854
+ s.union([Ia, Bu, Vr, en]);
2845
2855
  const Uu = s.bigint().or(s.string().transform(BigInt));
2846
2856
  var Lu = Object.defineProperty, _u = (t, e, r) => e in t ? Lu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e, r) => _u(t, typeof e != "symbol" ? e + "" : e, r);
2847
2857
  let Yu = (t, e = 21) => (r = e) => {
@@ -2891,10 +2901,10 @@ const qu = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", zu
2891
2901
  }
2892
2902
  static parseTimeString(e, r = "UTC") {
2893
2903
  const [n, i, a] = e.split(":");
2894
- let o = "00", u = "00";
2895
- a != null && ([o, u] = a.split("."));
2896
- let c = S.hours(parseInt(n ?? "00", 10)).add(S.minutes(parseInt(i ?? "00", 10))).add(S.seconds(parseInt(o ?? "00", 10))).add(S.milliseconds(parseInt(u ?? "00", 10)));
2897
- return r === "local" && (c = c.add(S.utcOffset)), c.valueOf();
2904
+ let o = "00", l = "00";
2905
+ a != null && ([o, l] = a.split("."));
2906
+ let u = S.hours(parseInt(n ?? "00", 10)).add(S.minutes(parseInt(i ?? "00", 10))).add(S.seconds(parseInt(o ?? "00", 10))).add(S.milliseconds(parseInt(l ?? "00", 10)));
2907
+ return r === "local" && (u = u.add(S.utcOffset)), u.valueOf();
2898
2908
  }
2899
2909
  static parseDateTimeString(e, r = "UTC") {
2900
2910
  if (!e.includes("/") && !e.includes("-"))
@@ -3193,9 +3203,9 @@ const q = class C {
3193
3203
  );
3194
3204
  }
3195
3205
  toString() {
3196
- const e = this.truncate(C.DAY), r = this.truncate(C.HOUR), n = this.truncate(C.MINUTE), i = this.truncate(C.SECOND), a = this.truncate(C.MILLISECOND), o = this.truncate(C.MICROSECOND), u = this.truncate(C.NANOSECOND), c = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = u.sub(o);
3206
+ const e = this.truncate(C.DAY), r = this.truncate(C.HOUR), n = this.truncate(C.MINUTE), i = this.truncate(C.SECOND), a = this.truncate(C.MILLISECOND), o = this.truncate(C.MICROSECOND), l = this.truncate(C.NANOSECOND), u = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = l.sub(o);
3197
3207
  let j = "";
3198
- return c.isZero || (j += `${c.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
3208
+ return u.isZero || (j += `${u.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
3199
3209
  }
3200
3210
  /** @returns the decimal number of days in the timespan */
3201
3211
  get days() {
@@ -3750,9 +3760,9 @@ const ae = class K extends Number {
3750
3760
  return this.valueOf() / K.TERABYTE.valueOf();
3751
3761
  }
3752
3762
  toString() {
3753
- const e = this.truncate(K.TERABYTE), r = this.truncate(K.GIGABYTE), n = this.truncate(K.MEGABYTE), i = this.truncate(K.KILOBYTE), a = this.truncate(K.BYTE), o = e, u = r.sub(e), c = n.sub(r), d = i.sub(n), f = a.sub(i);
3763
+ const e = this.truncate(K.TERABYTE), r = this.truncate(K.GIGABYTE), n = this.truncate(K.MEGABYTE), i = this.truncate(K.KILOBYTE), a = this.truncate(K.BYTE), o = e, l = r.sub(e), u = n.sub(r), d = i.sub(n), f = a.sub(i);
3754
3764
  let h = "";
3755
- return o.isZero || (h += `${o.terabytes}TB `), u.isZero || (h += `${u.gigabytes}GB `), c.isZero || (h += `${c.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
3765
+ return o.isZero || (h += `${o.terabytes}TB `), l.isZero || (h += `${l.gigabytes}GB `), u.isZero || (h += `${u.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
3756
3766
  }
3757
3767
  /**
3758
3768
  * Creates a Size from the given number of bytes.
@@ -3829,41 +3839,41 @@ s.union([
3829
3839
  const Da = (t) => {
3830
3840
  const e = typeof t;
3831
3841
  return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof G || t instanceof X || t instanceof Date;
3832
- }, Wu = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : St(r, -n), Vu = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Ku ? !0 : Da(t), Fe = -1, Gu = s.string().transform(
3842
+ }, Vu = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : St(r, -n), Wu = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Ku ? !0 : Da(t), Fe = -1, Gu = s.string().transform(
3833
3843
  (t) => new Uint8Array(
3834
3844
  atob(t).split("").map((e) => e.charCodeAt(0))
3835
3845
  ).buffer
3836
3846
  ), Zu = s.union([s.null(), s.undefined()]).transform(() => new Uint8Array().buffer), Tt = class Re {
3837
3847
  constructor(e) {
3838
- b(this, "key", ""), b(this, "isSynnaxSeries", !0), b(this, "dataType"), b(this, "sampleOffset"), b(this, "gl"), b(this, "_data"), b(this, "_timeRange"), b(this, "alignment", 0n), b(this, "_cachedMin"), b(this, "_cachedMax"), b(this, "writePos", Fe), b(this, "_refCount", 0), b(this, "_cachedLength"), Vu(e) && (e = { data: e });
3848
+ b(this, "key", ""), b(this, "isSynnaxSeries", !0), b(this, "dataType"), b(this, "sampleOffset"), b(this, "gl"), b(this, "_data"), b(this, "_timeRange"), b(this, "alignment", 0n), b(this, "_cachedMin"), b(this, "_cachedMax"), b(this, "writePos", Fe), b(this, "_refCount", 0), b(this, "_cachedLength"), Wu(e) && (e = { data: e });
3839
3849
  const {
3840
3850
  dataType: r,
3841
3851
  timeRange: n,
3842
3852
  sampleOffset: i = 0,
3843
3853
  glBufferUsage: a = "static",
3844
3854
  alignment: o = 0n,
3845
- key: u = zu()
3846
- } = e, c = e.data ?? [];
3847
- if (c instanceof Re || typeof c == "object" && "isSynnaxSeries" in c && c.isSynnaxSeries === !0) {
3848
- const h = c;
3855
+ key: l = zu()
3856
+ } = e, u = e.data ?? [];
3857
+ if (u instanceof Re || typeof u == "object" && "isSynnaxSeries" in u && u.isSynnaxSeries === !0) {
3858
+ const h = u;
3849
3859
  this.key = h.key, this.dataType = h.dataType, this.sampleOffset = h.sampleOffset, this.gl = h.gl, this._data = h._data, this._timeRange = h._timeRange, this.alignment = h.alignment, this._cachedMin = h._cachedMin, this._cachedMax = h._cachedMax, this.writePos = h.writePos, this._refCount = h._refCount, this._cachedLength = h._cachedLength;
3850
3860
  return;
3851
3861
  }
3852
- const d = Da(c), f = Array.isArray(c);
3862
+ const d = Da(u), f = Array.isArray(u);
3853
3863
  if (r != null) this.dataType = new z(r);
3854
3864
  else {
3855
- if (c instanceof ArrayBuffer)
3865
+ if (u instanceof ArrayBuffer)
3856
3866
  throw new Error(
3857
3867
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
3858
3868
  );
3859
3869
  if (f || d) {
3860
- let h = c;
3870
+ let h = u;
3861
3871
  if (!d) {
3862
- if (c.length === 0)
3872
+ if (u.length === 0)
3863
3873
  throw new Error(
3864
3874
  "cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
3865
3875
  );
3866
- h = c[0];
3876
+ h = u[0];
3867
3877
  }
3868
3878
  if (typeof h == "string") this.dataType = z.STRING;
3869
3879
  else if (typeof h == "number") this.dataType = z.FLOAT64;
@@ -3876,11 +3886,11 @@ const Da = (t) => {
3876
3886
  throw new Error(
3877
3887
  `cannot infer data type of ${typeof h} when constructing a Series from a JS array`
3878
3888
  );
3879
- } else this.dataType = new z(c);
3889
+ } else this.dataType = new z(u);
3880
3890
  }
3881
- if (!f && !d) this._data = c;
3891
+ if (!f && !d) this._data = u;
3882
3892
  else {
3883
- let h = d ? [c] : c;
3893
+ let h = d ? [u] : u;
3884
3894
  const E = h[0];
3885
3895
  (E instanceof G || E instanceof Date || E instanceof X) && (h = h.map((P) => new G(P).valueOf())), this.dataType.equals(z.STRING) ? (this._cachedLength = h.length, this._data = new TextEncoder().encode(h.join(`
3886
3896
  `) + `
@@ -3890,7 +3900,7 @@ const Da = (t) => {
3890
3900
  `
3891
3901
  )) : this._data = new this.dataType.Array(h).buffer;
3892
3902
  }
3893
- this.key = u, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
3903
+ this.key = l, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
3894
3904
  control: null,
3895
3905
  buffer: null,
3896
3906
  prevBuffer: 0,
@@ -4032,7 +4042,7 @@ const Da = (t) => {
4032
4042
  if (this.dataType.equals(e)) return this;
4033
4043
  const n = new e.Array(this.length);
4034
4044
  for (let i = 0; i < this.length; i++)
4035
- n[i] = Wu(this.dataType, e, this.data[i], r);
4045
+ n[i] = Vu(this.dataType, e, this.data[i], r);
4036
4046
  return new Re({
4037
4047
  data: n.buffer,
4038
4048
  dataType: e,
@@ -4464,10 +4474,10 @@ const Sr = class Fa extends Oe {
4464
4474
  };
4465
4475
  D(Sr, "TYPE", tn + "stream_closed"), D(Sr, "matches", de(Sr.TYPE));
4466
4476
  let rt = Sr;
4467
- const Nr = class Wa extends Oe {
4477
+ const Nr = class Va extends Oe {
4468
4478
  constructor(e = {}) {
4469
4479
  const { message: r = "Unreachable", url: n = ch.UNKNOWN } = e;
4470
- super(r), D(this, "type", Wa.TYPE), D(this, "url"), this.url = n;
4480
+ super(r), D(this, "type", Va.TYPE), D(this, "url"), this.url = n;
4471
4481
  }
4472
4482
  };
4473
4483
  D(Nr, "TYPE", tn + "unreachable"), D(Nr, "matches", de(Nr.TYPE));
@@ -4497,7 +4507,7 @@ qa({
4497
4507
  encode: gh,
4498
4508
  decode: ph
4499
4509
  });
4500
- let Va = class {
4510
+ let Wa = class {
4501
4511
  constructor() {
4502
4512
  D(this, "middleware", []);
4503
4513
  }
@@ -4531,7 +4541,7 @@ const Ga = "Content-Type", pi = (t) => {
4531
4541
  const r = require("https"), n = new r.Agent({ rejectUnauthorized: !1 });
4532
4542
  return async (i, a) => await e(i, { ...a, agent: n });
4533
4543
  };
4534
- class mh extends Va {
4544
+ class mh extends Wa {
4535
4545
  constructor(e, r, n = !1) {
4536
4546
  return super(), D(this, "endpoint"), D(this, "encoder"), D(this, "fetch"), this.endpoint = e.replace({ protocol: n ? "https" : "http" }), this.encoder = r, this.fetch = pi(this.endpoint.protocol), new Proxy(this, {
4537
4547
  get: (i, a, o) => a === "endpoint" ? this.endpoint : Reflect.get(i, a, o)
@@ -4545,9 +4555,9 @@ class mh extends Va {
4545
4555
  async send(e, r, n, i) {
4546
4556
  r = n == null ? void 0 : n.parse(r);
4547
4557
  let a = null;
4548
- const o = this.endpoint.child(e), u = {};
4549
- u.method = "POST", u.body = this.encoder.encode(r ?? {});
4550
- const [, c] = await this.executeMiddleware(
4558
+ const o = this.endpoint.child(e), l = {};
4559
+ l.method = "POST", l.body = this.encoder.encode(r ?? {});
4560
+ const [, u] = await this.executeMiddleware(
4551
4561
  {
4552
4562
  target: o.toString(),
4553
4563
  protocol: this.endpoint.protocol,
@@ -4556,13 +4566,13 @@ class mh extends Va {
4556
4566
  },
4557
4567
  async (d) => {
4558
4568
  const f = { ...d, params: {} };
4559
- u.headers = {
4569
+ l.headers = {
4560
4570
  ...this.headers,
4561
4571
  ...d.params
4562
4572
  };
4563
4573
  let h;
4564
4574
  try {
4565
- h = await pi(d.protocol)(d.target, u);
4575
+ h = await pi(d.protocol)(d.target, l);
4566
4576
  } catch (P) {
4567
4577
  let se = P;
4568
4578
  return se.message === "Load failed" && (se = new Je({ url: o })), [f, se];
@@ -4584,7 +4594,7 @@ class mh extends Va {
4584
4594
  }
4585
4595
  }
4586
4596
  );
4587
- return [a, c];
4597
+ return [a, u];
4588
4598
  }
4589
4599
  }
4590
4600
  const v = async (t, e, r, n, i) => {
@@ -4646,7 +4656,7 @@ class vh {
4646
4656
  });
4647
4657
  }
4648
4658
  }
4649
- const Oh = "freighterctx", Th = 1e3, Sh = 1001, Nh = [Th, Sh], Eh = (t) => Nh.includes(t.code), Za = class Ka extends Va {
4659
+ const Oh = "freighterctx", Th = 1e3, Sh = 1001, Nh = [Th, Sh], Eh = (t) => Nh.includes(t.code), Za = class Ka extends Wa {
4650
4660
  /**
4651
4661
  * @param encoder - The encoder to use for encoding messages and decoding
4652
4662
  * responses.
@@ -4661,10 +4671,10 @@ const Oh = "freighterctx", Th = 1e3, Sh = 1001, Nh = [Th, Sh], Eh = (t) => Nh.in
4661
4671
  let a;
4662
4672
  const [, o] = await this.executeMiddleware(
4663
4673
  { target: e, protocol: "websocket", params: {}, role: "client" },
4664
- async (u) => {
4665
- const c = i(this.buildURL(e, u)), d = { ...u, params: {} };
4666
- c.binaryType = Ka.MESSAGE_TYPE;
4667
- const f = await this.wrapSocket(c, r, n);
4674
+ async (l) => {
4675
+ const u = i(this.buildURL(e, l)), d = { ...l, params: {} };
4676
+ u.binaryType = Ka.MESSAGE_TYPE;
4677
+ const f = await this.wrapSocket(u, r, n);
4668
4678
  return f instanceof Error ? [d, f] : (a = f, [d, null]);
4669
4679
  }
4670
4680
  );
@@ -4711,12 +4721,12 @@ const Xn = s.union([
4711
4721
  n = Ch(n);
4712
4722
  const i = {}, a = r;
4713
4723
  return Object.keys(a).forEach((o) => {
4714
- let u = a[o];
4715
- const c = t(o);
4716
- n.recursive && (En(u) ? wi(u, n.keepTypesOnRecursion) || (u = e(u, n)) : n.recursiveInArray && mi(u) && (u = [...u].map((d) => {
4724
+ let l = a[o];
4725
+ const u = t(o);
4726
+ n.recursive && (En(l) ? wi(l, n.keepTypesOnRecursion) || (l = e(l, n)) : n.recursiveInArray && mi(l) && (l = [...l].map((d) => {
4717
4727
  let f = d;
4718
4728
  return En(d) ? wi(f, n.keepTypesOnRecursion) || (f = e(d, n)) : mi(d) && (f = e({ key: d }, n).key), f;
4719
- }))), i[c] = u;
4729
+ }))), i[u] = l;
4720
4730
  }), i;
4721
4731
  };
4722
4732
  return e;
@@ -4777,10 +4787,10 @@ let Xa = class {
4777
4787
  return i.forEach((o) => {
4778
4788
  a[o] = [];
4779
4789
  }), n.forEach((o) => {
4780
- const u = o.split(",").map((c) => c.trim());
4781
- i.forEach((c, d) => {
4782
- const f = this.parseValue(u[d]);
4783
- f != null && a[c].push(f);
4790
+ const l = o.split(",").map((u) => u.trim());
4791
+ i.forEach((u, d) => {
4792
+ const f = this.parseValue(l[d]);
4793
+ f != null && a[u].push(f);
4784
4794
  });
4785
4795
  }), e != null ? e.parse(a) : a;
4786
4796
  }
@@ -4821,14 +4831,14 @@ const to = s.object({ width: s.number(), height: s.number() }), Ph = s.object({
4821
4831
  s.enum(Bh);
4822
4832
  const Uh = ["start", "center", "end"], Lh = ["signedWidth", "signedHeight"];
4823
4833
  s.enum(Lh);
4824
- const Vr = s.object({ x: s.number(), y: s.number() }), _h = s.object({ clientX: s.number(), clientY: s.number() }), Yh = ["x", "y"], ro = s.enum(Yh), no = ["top", "right", "bottom", "left"];
4834
+ const Wr = s.object({ x: s.number(), y: s.number() }), _h = s.object({ clientX: s.number(), clientY: s.number() }), Yh = ["x", "y"], ro = s.enum(Yh), no = ["top", "right", "bottom", "left"];
4825
4835
  s.enum(no);
4826
4836
  const qh = ["left", "right"], so = s.enum(qh), zh = ["top", "bottom"], io = s.enum(zh), ao = ["center"], bi = s.enum(ao), Fh = [...no, ...ao], oo = s.enum(Fh);
4827
4837
  s.enum(Uh);
4828
- const Wh = ["first", "last"];
4829
- s.enum(Wh);
4830
- const Vh = s.object({ lower: s.number(), upper: s.number() }), Gh = s.object({ lower: s.bigint(), upper: s.bigint() });
4831
- s.union([Vh, rn]);
4838
+ const Vh = ["first", "last"];
4839
+ s.enum(Vh);
4840
+ const Wh = s.object({ lower: s.number(), upper: s.number() }), Gh = s.object({ lower: s.bigint(), upper: s.bigint() });
4841
+ s.union([Wh, rn]);
4832
4842
  s.union([Gh, rn]);
4833
4843
  s.union([ro, oo]);
4834
4844
  s.union([ro, oo, s.instanceof(String)]);
@@ -4848,7 +4858,7 @@ s.object({
4848
4858
  });
4849
4859
  const Zh = s.object({ x: so, y: io }), Kh = Object.freeze({ x: "left", y: "top" }), Jh = (t, e) => t.x === e.x && t.y === e.y, Oi = s.union([
4850
4860
  s.number(),
4851
- Vr,
4861
+ Wr,
4852
4862
  rn,
4853
4863
  to,
4854
4864
  Ph,
@@ -4873,8 +4883,8 @@ s.object({
4873
4883
  bottom: s.number()
4874
4884
  });
4875
4885
  s.object({
4876
- one: Vr,
4877
- two: Vr,
4886
+ one: Wr,
4887
+ two: Wr,
4878
4888
  root: Zh
4879
4889
  });
4880
4890
  const Os = (t, e, r = 0, n = 0, i) => {
@@ -4913,9 +4923,9 @@ const rd = (t) => (e, r, n, i) => r === "dimension" ? [e, n] : [
4913
4923
  i ? n / t : n * t
4914
4924
  ], sd = (t) => (e, r, n) => {
4915
4925
  if (e === null) return [t, n];
4916
- const { lower: i, upper: a } = e, { lower: o, upper: u } = t, c = a - i, d = u - o;
4917
- if (r === "dimension") return [t, n * (d / c)];
4918
- const f = (n - i) * (d / c) + o;
4926
+ const { lower: i, upper: a } = e, { lower: o, upper: l } = t, u = a - i, d = l - o;
4927
+ if (r === "dimension") return [t, n * (d / u)];
4928
+ const f = (n - i) * (d / u) + o;
4919
4929
  return [t, f];
4920
4930
  }, id = (t) => (e, r, n) => [t, n], ad = () => (t, e, r) => {
4921
4931
  if (t === null) throw new Error("cannot invert without bounds");
@@ -4985,9 +4995,9 @@ const rd = (t) => (e, r, n, i) => r === "dimension" ? [e, n] : [
4985
4995
  e.ops.reverse();
4986
4996
  const r = [];
4987
4997
  return e.ops.forEach((n, i) => {
4988
- if (n.type === "scale" || r.some(([o, u]) => i >= o && i <= u))
4998
+ if (n.type === "scale" || r.some(([o, l]) => i >= o && i <= l))
4989
4999
  return;
4990
- const a = e.ops.findIndex((o, u) => o.type === "scale" && u > i);
5000
+ const a = e.ops.findIndex((o, l) => o.type === "scale" && l > i);
4991
5001
  a !== -1 && r.push([i, a]);
4992
5002
  }), r.forEach(([n, i]) => {
4993
5003
  const a = e.ops.slice(n, i);
@@ -5108,7 +5118,7 @@ const Ei = (t) => [...new Set(t)], cd = (t) => t != null && typeof t == "object"
5108
5118
  r !== null && (clearTimeout(r), r = null), r = setTimeout(() => t(...n), e);
5109
5119
  };
5110
5120
  }, gd = s.object({ signedWidth: s.number(), signedHeight: s.number() });
5111
- s.union([to, gd, Vr, rn]);
5121
+ s.union([to, gd, Wr, rn]);
5112
5122
  const pd = s.bigint().or(s.string().transform(BigInt));
5113
5123
  var md = Object.defineProperty, wd = (t, e, r) => e in t ? md(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, w = (t, e, r) => wd(t, typeof e != "symbol" ? e + "" : e, r);
5114
5124
  let bd = (t, e = 21) => (r = e) => {
@@ -5161,10 +5171,10 @@ const vd = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", co
5161
5171
  }
5162
5172
  static parseTimeString(e, r = "UTC") {
5163
5173
  const [n, i, a] = e.split(":");
5164
- let o = "00", u = "00";
5165
- a != null && ([o, u] = a.split("."));
5166
- let c = N.hours(parseInt(n ?? "00", 10)).add(N.minutes(parseInt(i ?? "00", 10))).add(N.seconds(parseInt(o ?? "00", 10))).add(N.milliseconds(parseInt(u ?? "00", 10)));
5167
- return r === "local" && (c = c.add(N.utcOffset)), c.valueOf();
5174
+ let o = "00", l = "00";
5175
+ a != null && ([o, l] = a.split("."));
5176
+ let u = N.hours(parseInt(n ?? "00", 10)).add(N.minutes(parseInt(i ?? "00", 10))).add(N.seconds(parseInt(o ?? "00", 10))).add(N.milliseconds(parseInt(l ?? "00", 10)));
5177
+ return r === "local" && (u = u.add(N.utcOffset)), u.valueOf();
5168
5178
  }
5169
5179
  static parseDateTimeString(e, r = "UTC") {
5170
5180
  if (!e.includes("/") && !e.includes("-"))
@@ -5432,7 +5442,7 @@ w(F, "z", s.union([
5432
5442
  s.instanceof(F)
5433
5443
  ]));
5434
5444
  let R = F;
5435
- const W = class $ {
5445
+ const V = class $ {
5436
5446
  constructor(e) {
5437
5447
  w(this, "value"), w(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
5438
5448
  }
@@ -5463,9 +5473,9 @@ const W = class $ {
5463
5473
  );
5464
5474
  }
5465
5475
  toString() {
5466
- const e = this.truncate($.DAY), r = this.truncate($.HOUR), n = this.truncate($.MINUTE), i = this.truncate($.SECOND), a = this.truncate($.MILLISECOND), o = this.truncate($.MICROSECOND), u = this.truncate($.NANOSECOND), c = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = u.sub(o);
5476
+ const e = this.truncate($.DAY), r = this.truncate($.HOUR), n = this.truncate($.MINUTE), i = this.truncate($.SECOND), a = this.truncate($.MILLISECOND), o = this.truncate($.MICROSECOND), l = this.truncate($.NANOSECOND), u = e, d = r.sub(e), f = n.sub(r), h = i.sub(n), E = a.sub(i), P = o.sub(a), se = l.sub(o);
5467
5477
  let j = "";
5468
- return c.isZero || (j += `${c.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
5478
+ return u.isZero || (j += `${u.days}d `), d.isZero || (j += `${d.hours}h `), f.isZero || (j += `${f.minutes}m `), h.isZero || (j += `${h.seconds}s `), E.isZero || (j += `${E.milliseconds}ms `), P.isZero || (j += `${P.microseconds}µs `), se.isZero || (j += `${se.nanoseconds}ns`), j.trim();
5469
5479
  }
5470
5480
  /** @returns the decimal number of days in the timespan */
5471
5481
  get days() {
@@ -5589,24 +5599,24 @@ const W = class $ {
5589
5599
  return $.hours(e * 24);
5590
5600
  }
5591
5601
  };
5592
- w(W, "NANOSECOND", W.nanoseconds(1)), /** A microsecond. */
5593
- w(W, "MICROSECOND", W.microseconds(1)), /** A millisecond. */
5594
- w(W, "MILLISECOND", W.milliseconds(1)), /** A second. */
5595
- w(W, "SECOND", W.seconds(1)), /** A minute. */
5596
- w(W, "MINUTE", W.minutes(1)), /** Represents an hour. */
5597
- w(W, "HOUR", W.hours(1)), /** Represents a day. */
5598
- w(W, "DAY", W.days(1)), /** The maximum possible value for a TimeSpan. */
5599
- w(W, "MAX", new W((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
5600
- w(W, "MIN", new W(0)), /** The zero value for a TimeSpan. */
5601
- w(W, "ZERO", new W(0)), /** A zod schema for validating and transforming timespans */
5602
- w(W, "z", s.union([
5603
- s.object({ value: s.bigint() }).transform((t) => new W(t.value)),
5604
- s.string().transform((t) => new W(BigInt(t))),
5605
- s.instanceof(Number).transform((t) => new W(t)),
5606
- s.number().transform((t) => new W(t)),
5607
- s.instanceof(W)
5602
+ w(V, "NANOSECOND", V.nanoseconds(1)), /** A microsecond. */
5603
+ w(V, "MICROSECOND", V.microseconds(1)), /** A millisecond. */
5604
+ w(V, "MILLISECOND", V.milliseconds(1)), /** A second. */
5605
+ w(V, "SECOND", V.seconds(1)), /** A minute. */
5606
+ w(V, "MINUTE", V.minutes(1)), /** Represents an hour. */
5607
+ w(V, "HOUR", V.hours(1)), /** Represents a day. */
5608
+ w(V, "DAY", V.days(1)), /** The maximum possible value for a TimeSpan. */
5609
+ w(V, "MAX", new V((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
5610
+ w(V, "MIN", new V(0)), /** The zero value for a TimeSpan. */
5611
+ w(V, "ZERO", new V(0)), /** A zod schema for validating and transforming timespans */
5612
+ w(V, "z", s.union([
5613
+ s.object({ value: s.bigint() }).transform((t) => new V(t.value)),
5614
+ s.string().transform((t) => new V(BigInt(t))),
5615
+ s.instanceof(Number).transform((t) => new V(t)),
5616
+ s.number().transform((t) => new V(t)),
5617
+ s.instanceof(V)
5608
5618
  ]));
5609
- let A = W;
5619
+ let A = V;
5610
5620
  const kt = class Er extends Number {
5611
5621
  constructor(e) {
5612
5622
  e instanceof Number ? super(e.valueOf()) : super(e);
@@ -6021,9 +6031,9 @@ const oe = class J extends Number {
6021
6031
  return this.valueOf() / J.TERABYTE.valueOf();
6022
6032
  }
6023
6033
  toString() {
6024
- const e = this.truncate(J.TERABYTE), r = this.truncate(J.GIGABYTE), n = this.truncate(J.MEGABYTE), i = this.truncate(J.KILOBYTE), a = this.truncate(J.BYTE), o = e, u = r.sub(e), c = n.sub(r), d = i.sub(n), f = a.sub(i);
6034
+ const e = this.truncate(J.TERABYTE), r = this.truncate(J.GIGABYTE), n = this.truncate(J.MEGABYTE), i = this.truncate(J.KILOBYTE), a = this.truncate(J.BYTE), o = e, l = r.sub(e), u = n.sub(r), d = i.sub(n), f = a.sub(i);
6025
6035
  let h = "";
6026
- return o.isZero || (h += `${o.terabytes}TB `), u.isZero || (h += `${u.gigabytes}GB `), c.isZero || (h += `${c.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
6036
+ return o.isZero || (h += `${o.terabytes}TB `), l.isZero || (h += `${l.gigabytes}GB `), u.isZero || (h += `${u.megabytes}MB `), d.isZero || (h += `${d.kilobytes}KB `), (!f.isZero || h === "") && (h += `${f.valueOf()}B`), h.trim();
6027
6037
  }
6028
6038
  /**
6029
6039
  * Creates a Size from the given number of bytes.
@@ -6100,41 +6110,41 @@ s.union([
6100
6110
  const uo = (t) => {
6101
6111
  const e = typeof t;
6102
6112
  return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof R || t instanceof A || t instanceof Date;
6103
- }, Sd = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : xt(r, -n), Nd = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Ze ? !0 : uo(t), We = -1, Ed = s.string().transform(
6113
+ }, Sd = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : xt(r, -n), Nd = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Ze ? !0 : uo(t), Ve = -1, Ed = s.string().transform(
6104
6114
  (t) => new Uint8Array(
6105
6115
  atob(t).split("").map((e) => e.charCodeAt(0))
6106
6116
  ).buffer
6107
6117
  ), Id = s.union([s.null(), s.undefined()]).transform(() => new Uint8Array().buffer), At = class Me {
6108
6118
  constructor(e) {
6109
- w(this, "key", ""), w(this, "isSynnaxSeries", !0), w(this, "dataType"), w(this, "sampleOffset"), w(this, "gl"), w(this, "_data"), w(this, "_timeRange"), w(this, "alignment", 0n), w(this, "_cachedMin"), w(this, "_cachedMax"), w(this, "writePos", We), w(this, "_refCount", 0), w(this, "_cachedLength"), Nd(e) && (e = { data: e });
6119
+ w(this, "key", ""), w(this, "isSynnaxSeries", !0), w(this, "dataType"), w(this, "sampleOffset"), w(this, "gl"), w(this, "_data"), w(this, "_timeRange"), w(this, "alignment", 0n), w(this, "_cachedMin"), w(this, "_cachedMax"), w(this, "writePos", Ve), w(this, "_refCount", 0), w(this, "_cachedLength"), Nd(e) && (e = { data: e });
6110
6120
  const {
6111
6121
  dataType: r,
6112
6122
  timeRange: n,
6113
6123
  sampleOffset: i = 0,
6114
6124
  glBufferUsage: a = "static",
6115
6125
  alignment: o = 0n,
6116
- key: u = co()
6117
- } = e, c = e.data ?? [];
6118
- if (c instanceof Me || typeof c == "object" && "isSynnaxSeries" in c && c.isSynnaxSeries === !0) {
6119
- const h = c;
6126
+ key: l = co()
6127
+ } = e, u = e.data ?? [];
6128
+ if (u instanceof Me || typeof u == "object" && "isSynnaxSeries" in u && u.isSynnaxSeries === !0) {
6129
+ const h = u;
6120
6130
  this.key = h.key, this.dataType = h.dataType, this.sampleOffset = h.sampleOffset, this.gl = h.gl, this._data = h._data, this._timeRange = h._timeRange, this.alignment = h.alignment, this._cachedMin = h._cachedMin, this._cachedMax = h._cachedMax, this.writePos = h.writePos, this._refCount = h._refCount, this._cachedLength = h._cachedLength;
6121
6131
  return;
6122
6132
  }
6123
- const d = uo(c), f = Array.isArray(c);
6133
+ const d = uo(u), f = Array.isArray(u);
6124
6134
  if (r != null) this.dataType = new I(r);
6125
6135
  else {
6126
- if (c instanceof ArrayBuffer)
6136
+ if (u instanceof ArrayBuffer)
6127
6137
  throw new Error(
6128
6138
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
6129
6139
  );
6130
6140
  if (f || d) {
6131
- let h = c;
6141
+ let h = u;
6132
6142
  if (!d) {
6133
- if (c.length === 0)
6143
+ if (u.length === 0)
6134
6144
  throw new Error(
6135
6145
  "cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
6136
6146
  );
6137
- h = c[0];
6147
+ h = u[0];
6138
6148
  }
6139
6149
  if (typeof h == "string") this.dataType = I.STRING;
6140
6150
  else if (typeof h == "number") this.dataType = I.FLOAT64;
@@ -6147,11 +6157,11 @@ const uo = (t) => {
6147
6157
  throw new Error(
6148
6158
  `cannot infer data type of ${typeof h} when constructing a Series from a JS array`
6149
6159
  );
6150
- } else this.dataType = new I(c);
6160
+ } else this.dataType = new I(u);
6151
6161
  }
6152
- if (!f && !d) this._data = c;
6162
+ if (!f && !d) this._data = u;
6153
6163
  else {
6154
- let h = d ? [c] : c;
6164
+ let h = d ? [u] : u;
6155
6165
  const E = h[0];
6156
6166
  (E instanceof R || E instanceof Date || E instanceof A) && (h = h.map((P) => new R(P).valueOf())), this.dataType.equals(I.STRING) ? (this._cachedLength = h.length, this._data = new TextEncoder().encode(h.join(`
6157
6167
  `) + `
@@ -6161,7 +6171,7 @@ const uo = (t) => {
6161
6171
  `
6162
6172
  )) : this._data = new this.dataType.Array(h).buffer;
6163
6173
  }
6164
- this.key = u, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
6174
+ this.key = l, this.alignment = o, this.sampleOffset = i ?? 0, this._timeRange = n, this.gl = {
6165
6175
  control: null,
6166
6176
  buffer: null,
6167
6177
  prevBuffer: 0,
@@ -6221,7 +6231,7 @@ const uo = (t) => {
6221
6231
  write(e) {
6222
6232
  if (!e.dataType.equals(this.dataType))
6223
6233
  throw new Error("buffer must be of the same type as this array");
6224
- if (this.writePos === We) return 0;
6234
+ if (this.writePos === Ve) return 0;
6225
6235
  const r = this.capacity - this.writePos, n = r < e.length ? e.slice(0, r) : e;
6226
6236
  return this.underlyingData.set(
6227
6237
  n.data,
@@ -6237,7 +6247,7 @@ const uo = (t) => {
6237
6247
  }
6238
6248
  /** @returns a native typed array with the proper data type. */
6239
6249
  get data() {
6240
- return this.writePos === We ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
6250
+ return this.writePos === Ve ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
6241
6251
  }
6242
6252
  toStrings() {
6243
6253
  if (!this.dataType.matches(I.STRING, I.UUID))
@@ -6276,11 +6286,11 @@ const uo = (t) => {
6276
6286
  }
6277
6287
  /** @returns the length of the series in bytes. */
6278
6288
  get byteLength() {
6279
- return this.writePos === We ? this.byteCapacity : this.dataType.density.size(this.writePos);
6289
+ return this.writePos === Ve ? this.byteCapacity : this.dataType.density.size(this.writePos);
6280
6290
  }
6281
6291
  /** @returns the number of samples in this array. */
6282
6292
  get length() {
6283
- return this._cachedLength != null ? this._cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === We ? this.data.length : this.writePos;
6293
+ return this._cachedLength != null ? this._cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === Ve ? this.data.length : this.writePos;
6284
6294
  }
6285
6295
  calculateCachedLength() {
6286
6296
  if (!this.dataType.isVariable)
@@ -6421,7 +6431,7 @@ const uo = (t) => {
6421
6431
  throw new Error("Only FLOAT32 arrays can be used in WebGL");
6422
6432
  const { buffer: r, bufferUsage: n, prevBuffer: i } = this.gl;
6423
6433
  if (r == null && (this.gl.buffer = e.createBuffer()), this.writePos !== i)
6424
- if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !== We) {
6434
+ if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !== Ve) {
6425
6435
  i === 0 && e.bufferData(e.ARRAY_BUFFER, this.byteCapacity.valueOf(), e.STATIC_DRAW);
6426
6436
  const a = this.dataType.density.size(i).valueOf(), o = this.underlyingData.slice(this.gl.prevBuffer, this.writePos);
6427
6437
  e.bufferSubData(e.ARRAY_BUFFER, a, o.buffer), this.gl.prevBuffer = this.writePos;
@@ -6430,7 +6440,7 @@ const uo = (t) => {
6430
6440
  e.ARRAY_BUFFER,
6431
6441
  this.buffer,
6432
6442
  n === "static" ? e.STATIC_DRAW : e.DYNAMIC_DRAW
6433
- ), this.gl.prevBuffer = We;
6443
+ ), this.gl.prevBuffer = Ve;
6434
6444
  }
6435
6445
  as(e) {
6436
6446
  if (e === "string") {
@@ -6753,18 +6763,18 @@ let fo = Ge;
6753
6763
  const yo = s.object({
6754
6764
  name: s.string(),
6755
6765
  key: s.string()
6756
- }), Wd = (t) => s.object({
6766
+ }), Vd = (t) => s.object({
6757
6767
  subject: yo,
6758
6768
  resource: t,
6759
6769
  authority: fo.z
6760
- }), Vd = (...t) => (e) => e.filter((r) => {
6770
+ }), Wd = (...t) => (e) => e.filter((r) => {
6761
6771
  let n = !1;
6762
6772
  return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
6763
6773
  }), nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6764
6774
  __proto__: null,
6765
6775
  Authority: fo,
6766
- filterTransfersByChannelKey: Vd,
6767
- stateZ: Wd,
6776
+ filterTransfersByChannelKey: Wd,
6777
+ stateZ: Vd,
6768
6778
  subjectZ: yo
6769
6779
  }, Symbol.toStringTag, { value: "Module" })), go = class $t extends Error {
6770
6780
  constructor() {
@@ -6780,18 +6790,18 @@ let Gd = go;
6780
6790
  new Gd();
6781
6791
  const ns = s.string().regex(/^\d+\.\d+\.\d+$/), Xt = (t, e, r = {}) => {
6782
6792
  r.checkMajor ?? (r.checkMajor = !0), r.checkMinor ?? (r.checkMinor = !0), r.checkPatch ?? (r.checkPatch = !0);
6783
- const n = ns.parse(t), i = ns.parse(e), [a, o, u] = n.split(".").map(Number), [c, d, f] = i.split(".").map(Number);
6793
+ const n = ns.parse(t), i = ns.parse(e), [a, o, l] = n.split(".").map(Number), [u, d, f] = i.split(".").map(Number);
6784
6794
  if (r.checkMajor) {
6785
- if (a < c) return An;
6786
- if (a > c) return xn;
6795
+ if (a < u) return An;
6796
+ if (a > u) return xn;
6787
6797
  }
6788
6798
  if (r.checkMinor) {
6789
6799
  if (o < d) return An;
6790
6800
  if (o > d) return xn;
6791
6801
  }
6792
6802
  if (r.checkPatch) {
6793
- if (u < f) return An;
6794
- if (u > f) return xn;
6803
+ if (l < f) return An;
6804
+ if (l > f) return xn;
6795
6805
  }
6796
6806
  return nn;
6797
6807
  }, Zd = (t, e, r = {}) => fd(Xt(t, e, r)), po = (t, e, r = {}) => dd(Xt(t, e, r)), Kd = (t, e, r = {}) => hd(Xt(t, e, r)), Jd = ({
@@ -6808,42 +6818,52 @@ const ns = s.string().regex(/^\d+\.\d+\.\d+$/), Xt = (t, e, r = {}) => {
6808
6818
  name: t,
6809
6819
  migrations: e,
6810
6820
  targetSchema: r,
6811
- def: n
6821
+ defaultVersion: n,
6822
+ def: i
6812
6823
  }) => {
6813
- const i = Object.keys(e).sort(Xt).pop();
6814
- if (i == null)
6815
- return (c) => {
6816
- if (c.version !== n.version)
6824
+ const a = Object.keys(e).sort(Xt).pop();
6825
+ if (a == null)
6826
+ return (d) => {
6827
+ if (d.version == null && (d.version = n), d.version !== i.version)
6817
6828
  return console.log(
6818
- `${t} version ${c.version} is newer than latest version of ${n.version}.
6829
+ `${t} version ${d.version} is newer than latest version of ${i.version}.
6819
6830
  Returning default instead.
6820
6831
  `
6821
- ), n;
6832
+ ), i;
6822
6833
  try {
6823
- return r != null ? r.parse(c) : c;
6824
- } catch (d) {
6825
- return console.log(`${t} failed to parse default. Exiting with default`), console.error(d), n;
6834
+ return r != null ? r.parse(d) : d;
6835
+ } catch (f) {
6836
+ return console.log(`${t} failed to parse default. Exiting with default`), console.error(f), i;
6826
6837
  }
6827
6838
  };
6828
- const a = Object.keys(e).length;
6829
- let o = !1;
6830
- const u = (c) => {
6839
+ const o = Object.keys(e).length;
6840
+ let l = !1;
6841
+ const u = (d) => {
6831
6842
  try {
6832
- if (a === 0 || po(c.version, i))
6833
- return console.log(o ? `${t} ${c.version} now up to date` : `${t} version ${c.version} is up to date with target version ${n.version}`), c;
6834
- const d = c.version, f = e[d], h = f(c);
6835
- return o = !0, u(h);
6836
- } catch (d) {
6843
+ if (o === 0 || po(d.version, a))
6844
+ return console.log(l ? `${t} ${d.version} now up to date` : `${t} version ${d.version} is up to date with target version ${i.version}`), d;
6845
+ const f = d.version, h = e[f], E = h(d);
6846
+ return l = !0, u(E);
6847
+ } catch (f) {
6837
6848
  return console.log(
6838
- `${t} failed to migrate from ${c.version} to ${i}`
6839
- ), console.error(d), n;
6849
+ `${t} failed to migrate from ${d.version} to ${a}`
6850
+ ), console.error(f), i;
6840
6851
  }
6841
6852
  };
6842
- return (c) => {
6853
+ return (d) => {
6843
6854
  try {
6844
- return u(c);
6845
- } catch (d) {
6846
- return console.log(`${t} failed to parse final result. Exiting with default`), console.error(d), n;
6855
+ if (d.version == null)
6856
+ if (n != null)
6857
+ console.log(
6858
+ `${t} version is null. Setting version to default of ${n}`
6859
+ ), d.version = n;
6860
+ else
6861
+ return console.log(
6862
+ `${t} version is null and no default version set. Exiting with default`
6863
+ ), i;
6864
+ return u(d);
6865
+ } catch (f) {
6866
+ return console.log(`${t} failed to parse final result. Exiting with default`), console.error(f), i;
6847
6867
  }
6848
6868
  };
6849
6869
  }, Ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -6857,31 +6877,31 @@ const ns = s.string().regex(/^\d+\.\d+\.\d+$/), Xt = (t, e, r = {}) => {
6857
6877
  versionsEqual: Zd
6858
6878
  }, Symbol.toStringTag, { value: "Module" })), _e = "sy.", xr = class mo extends Oe {
6859
6879
  constructor() {
6860
- super(...arguments), l(this, "type", mo.TYPE);
6880
+ super(...arguments), c(this, "type", mo.TYPE);
6861
6881
  }
6862
6882
  };
6863
- l(xr, "TYPE", _e + "validation"), l(xr, "matches", de(xr.TYPE));
6883
+ c(xr, "TYPE", _e + "validation"), c(xr, "matches", de(xr.TYPE));
6864
6884
  let Q = xr;
6865
6885
  const Cr = class wo extends Q {
6866
6886
  constructor(e, r) {
6867
- super(e + ": " + r), l(this, "type", wo.TYPE), l(this, "field"), l(this, "message"), this.field = e, this.message = r;
6887
+ super(e + ": " + r), c(this, "type", wo.TYPE), c(this, "field"), c(this, "message"), this.field = e, this.message = r;
6868
6888
  }
6869
6889
  };
6870
- l(Cr, "TYPE", Q.TYPE + ".field"), l(Cr, "matches", de(Cr.TYPE));
6890
+ c(Cr, "TYPE", Q.TYPE + ".field"), c(Cr, "matches", de(Cr.TYPE));
6871
6891
  let ji = Cr;
6872
6892
  const $r = class bo extends Oe {
6873
6893
  constructor() {
6874
- super(...arguments), l(this, "type", bo.TYPE);
6894
+ super(...arguments), c(this, "type", bo.TYPE);
6875
6895
  }
6876
6896
  };
6877
- l($r, "TYPE", _e + "auth"), l($r, "matches", de($r.TYPE));
6897
+ c($r, "TYPE", _e + "auth"), c($r, "matches", de($r.TYPE));
6878
6898
  let Gr = $r;
6879
6899
  const Rr = class vo extends Gr {
6880
6900
  constructor() {
6881
- super(...arguments), l(this, "type", vo.TYPE);
6901
+ super(...arguments), c(this, "type", vo.TYPE);
6882
6902
  }
6883
6903
  };
6884
- l(Rr, "TYPE", Gr.TYPE + ".invalid-token"), l(Rr, "matches", de(Rr.TYPE));
6904
+ c(Rr, "TYPE", Gr.TYPE + ".invalid-token"), c(Rr, "matches", de(Rr.TYPE));
6885
6905
  let ss = Rr;
6886
6906
  const jr = class Oo extends Oe {
6887
6907
  constructor(e) {
@@ -6891,59 +6911,59 @@ const jr = class Oo extends Oe {
6891
6911
  ${e}
6892
6912
 
6893
6913
  Please report this to the Synnax team.
6894
- `), l(this, "type", Oo.TYPE);
6914
+ `), c(this, "type", Oo.TYPE);
6895
6915
  }
6896
6916
  };
6897
- l(jr, "TYPE", _e + "unexpected"), l(jr, "matches", de(jr.TYPE));
6917
+ c(jr, "TYPE", _e + "unexpected"), c(jr, "matches", de(jr.TYPE));
6898
6918
  let ve = jr;
6899
6919
  const Mr = class To extends Oe {
6900
6920
  constructor() {
6901
- super(...arguments), l(this, "type", To.TYPE);
6921
+ super(...arguments), c(this, "type", To.TYPE);
6902
6922
  }
6903
6923
  };
6904
- l(Mr, "TYPE", _e + "query"), l(Mr, "matches", de(Mr.TYPE));
6924
+ c(Mr, "TYPE", _e + "query"), c(Mr, "matches", de(Mr.TYPE));
6905
6925
  let xe = Mr;
6906
6926
  const Dr = class So extends xe {
6907
6927
  constructor() {
6908
- super(...arguments), l(this, "type", So.TYPE);
6928
+ super(...arguments), c(this, "type", So.TYPE);
6909
6929
  }
6910
6930
  };
6911
- l(Dr, "TYPE", xe.TYPE + ".not_found"), l(Dr, "matches", de(Dr.TYPE));
6931
+ c(Dr, "TYPE", xe.TYPE + ".not_found"), c(Dr, "matches", de(Dr.TYPE));
6912
6932
  let st = Dr;
6913
6933
  const Pr = class No extends xe {
6914
6934
  constructor() {
6915
- super(...arguments), l(this, "type", No.TYPE);
6935
+ super(...arguments), c(this, "type", No.TYPE);
6916
6936
  }
6917
6937
  };
6918
- l(Pr, "TYPE", xe.TYPE + ".multiple_results"), l(Pr, "matches", de(Pr.TYPE));
6938
+ c(Pr, "TYPE", xe.TYPE + ".multiple_results"), c(Pr, "matches", de(Pr.TYPE));
6919
6939
  let it = Pr;
6920
6940
  const Br = class Eo extends Oe {
6921
6941
  constructor(e, r) {
6922
- super(e), l(this, "type", Eo.TYPE), l(this, "path"), this.path = r;
6942
+ super(e), c(this, "type", Eo.TYPE), c(this, "path"), this.path = r;
6923
6943
  }
6924
6944
  };
6925
- l(Br, "TYPE", _e + "route"), l(Br, "matches", de(Br.TYPE));
6945
+ c(Br, "TYPE", _e + "route"), c(Br, "matches", de(Br.TYPE));
6926
6946
  let Mi = Br;
6927
6947
  const Ur = class Io extends Oe {
6928
6948
  constructor() {
6929
- super(...arguments), l(this, "type", Io.TYPE);
6949
+ super(...arguments), c(this, "type", Io.TYPE);
6930
6950
  }
6931
6951
  };
6932
- l(Ur, "TYPE", _e + "control"), l(Ur, "matches", de(Ur.TYPE));
6952
+ c(Ur, "TYPE", _e + "control"), c(Ur, "matches", de(Ur.TYPE));
6933
6953
  let Zr = Ur;
6934
6954
  const Lr = class ko extends Zr {
6935
6955
  constructor() {
6936
- super(...arguments), l(this, "type", ko.TYPE);
6956
+ super(...arguments), c(this, "type", ko.TYPE);
6937
6957
  }
6938
6958
  };
6939
- l(Lr, "TYPE", Zr.TYPE + ".unauthorized"), l(Lr, "matches", de(Lr.TYPE));
6959
+ c(Lr, "TYPE", Zr.TYPE + ".unauthorized"), c(Lr, "matches", de(Lr.TYPE));
6940
6960
  let Di = Lr;
6941
6961
  const Cn = class Ao extends Oe {
6942
6962
  constructor() {
6943
- super(...arguments), l(this, "type", Ao.TYPE);
6963
+ super(...arguments), c(this, "type", Ao.TYPE);
6944
6964
  }
6945
6965
  };
6946
- l(Cn, "TYPE", _e + "contiguity"), l(Cn, "matches", de(Cn.TYPE));
6966
+ c(Cn, "TYPE", _e + "contiguity"), c(Cn, "matches", de(Cn.TYPE));
6947
6967
  const Xd = (t) => {
6948
6968
  if (!t.type.startsWith(_e)) return null;
6949
6969
  if (t.type.startsWith(Q.TYPE)) {
@@ -6970,7 +6990,7 @@ const ef = async (t, e) => {
6970
6990
  };
6971
6991
  class xo {
6972
6992
  constructor(e, r) {
6973
- l(this, "key"), l(this, "name"), this.key = r, this.name = e;
6993
+ c(this, "key"), c(this, "name"), this.key = r, this.name = e;
6974
6994
  }
6975
6995
  get ontologyID() {
6976
6996
  return new k({
@@ -7006,7 +7026,7 @@ const tf = s.string().uuid(), Co = s.object({
7006
7026
  return { type: sn.parse(e), key: r ?? "" };
7007
7027
  }), Rt = s.union([rf, ge]), _r = class $o {
7008
7028
  constructor(e) {
7009
- if (l(this, "type"), l(this, "key"), e instanceof $o) {
7029
+ if (c(this, "type"), c(this, "key"), e instanceof $o) {
7010
7030
  this.type = e.type, this.key = e.key;
7011
7031
  return;
7012
7032
  }
@@ -7030,7 +7050,7 @@ const tf = s.string().uuid(), Co = s.object({
7030
7050
  return { type: this.type, key: this.key };
7031
7051
  }
7032
7052
  };
7033
- l(_r, "z", s.union([s.instanceof(_r), Rt.transform((t) => new _r(t))]));
7053
+ c(_r, "z", s.union([s.instanceof(_r), Rt.transform((t) => new _r(t))]));
7034
7054
  let k = _r;
7035
7055
  new k({ type: "builtin", key: "root" });
7036
7056
  const nf = s.object({ type: s.number() }), sf = s.object({
@@ -7061,7 +7081,7 @@ const Pi = (t) => {
7061
7081
  var Ue;
7062
7082
  let hf = (Ue = class {
7063
7083
  constructor(t) {
7064
- l(this, "client"), this.client = t;
7084
+ c(this, "client"), this.client = t;
7065
7085
  }
7066
7086
  async create(t, e, r) {
7067
7087
  return (await v(
@@ -7090,9 +7110,9 @@ let hf = (Ue = class {
7090
7110
  s.object({})
7091
7111
  );
7092
7112
  }
7093
- }, l(Ue, "ENDPOINT", "/ontology/create-group"), l(Ue, "ENDPOINT_RENAME", "/ontology/rename-group"), l(Ue, "ENDPOINT_DELETE", "/ontology/delete-group"), Ue), df = class {
7113
+ }, c(Ue, "ENDPOINT", "/ontology/create-group"), c(Ue, "ENDPOINT_RENAME", "/ontology/rename-group"), c(Ue, "ENDPOINT_DELETE", "/ontology/delete-group"), Ue), df = class {
7094
7114
  constructor(t) {
7095
- l(this, "creator"), this.creator = new hf(t);
7115
+ c(this, "creator"), this.creator = new hf(t);
7096
7116
  }
7097
7117
  async create(t, e, r) {
7098
7118
  return this.sugar(await this.creator.create(t, e, r));
@@ -7121,7 +7141,7 @@ const $n = {
7121
7141
  });
7122
7142
  let yf = class {
7123
7143
  constructor(t) {
7124
- l(this, "client"), this.client = t;
7144
+ c(this, "client"), this.client = t;
7125
7145
  }
7126
7146
  async addChildren(t, ...e) {
7127
7147
  await v(
@@ -7171,7 +7191,7 @@ const gf = "/ontology/retrieve", pf = s.object({
7171
7191
  }), Rn = (t) => O(t).map((e) => new k(e).payload);
7172
7192
  let wf = class {
7173
7193
  constructor(t, e) {
7174
- l(this, "type", "ontology"), l(this, "groups"), l(this, "client"), l(this, "writer"), l(this, "framer"), this.client = t, this.writer = new yf(t), this.groups = new df(t), this.framer = e;
7194
+ c(this, "type", "ontology"), c(this, "groups"), c(this, "client"), c(this, "writer"), c(this, "framer"), this.client = t, this.writer = new yf(t), this.groups = new df(t), this.framer = e;
7175
7195
  }
7176
7196
  /**
7177
7197
  * Executes a fuzzy search on the ontology for resources with names/fields similar to the
@@ -7293,7 +7313,7 @@ let wf = class {
7293
7313
  const Ui = "sy_ontology_resource_set", Li = "sy_ontology_resource_delete", _i = "sy_ontology_relationship_set", Yi = "sy_ontology_relationship_delete";
7294
7314
  class an {
7295
7315
  constructor(e, r) {
7296
- l(this, "relationships"), l(this, "resources"), l(this, "resourceObs"), l(this, "relationshipObs"), l(this, "streamer"), l(this, "client"), l(this, "closePromise"), this.relationshipObs = new He.Observer(), this.relationships = this.relationshipObs, this.resourceObs = new He.Observer(), this.resources = this.resourceObs, this.client = r, this.streamer = e, this.closePromise = this.start();
7316
+ c(this, "relationships"), c(this, "resources"), c(this, "resourceObs"), c(this, "relationshipObs"), c(this, "streamer"), c(this, "client"), c(this, "closePromise"), this.relationshipObs = new He.Observer(), this.relationships = this.relationshipObs, this.resourceObs = new He.Observer(), this.resources = this.resourceObs, this.client = r, this.streamer = e, this.closePromise = this.start();
7297
7317
  }
7298
7318
  async close() {
7299
7319
  this.streamer.close(), await this.closePromise;
@@ -7363,14 +7383,14 @@ class Ns extends He.Observer {
7363
7383
  relationshipType: n = "parent",
7364
7384
  relationshipDirection: i = "from",
7365
7385
  resourceType: a
7366
- }, o, u) {
7367
- super(), l(this, "internal"), l(this, "target"), l(this, "relDir"), l(this, "resourceType"), l(this, "dependents"), l(this, "client"), l(this, "relType"), l(this, "handleResourceChange", (c) => {
7386
+ }, o, l) {
7387
+ super(), c(this, "internal"), c(this, "target"), c(this, "relDir"), c(this, "resourceType"), c(this, "dependents"), c(this, "client"), c(this, "relType"), c(this, "handleResourceChange", (u) => {
7368
7388
  this.dependents = this.dependents.map((d) => {
7369
- const f = c.find((h) => h.key.toString() == d.id.toString());
7389
+ const f = u.find((h) => h.key.toString() == d.id.toString());
7370
7390
  return f == null || f.variant === "delete" ? d : f.value;
7371
7391
  }), this.notify(this.dependents);
7372
- }), l(this, "handleRelationshipChange", (c) => {
7373
- const d = c.filter(
7392
+ }), c(this, "handleRelationshipChange", (u) => {
7393
+ const d = u.filter(
7374
7394
  (h) => h.variant === "delete" && h.key[this.relDir].toString() === this.target.toString() && (this.resourceType == null || h.key[qi(this.relDir)].type === this.resourceType)
7375
7395
  );
7376
7396
  this.dependents = this.dependents.filter(
@@ -7378,14 +7398,14 @@ class Ns extends He.Observer {
7378
7398
  (E) => E.key.to.toString() === h.id.toString() && E.key.type === this.relType
7379
7399
  )
7380
7400
  );
7381
- const f = c.filter(
7401
+ const f = u.filter(
7382
7402
  (h) => h.variant === "set" && h.key.type === this.relType && h.key[this.relDir].toString() === this.target.toString() && (this.resourceType == null || h.key[qi(this.relDir)].type === this.resourceType)
7383
7403
  );
7384
7404
  if (f.length === 0) return this.notify(this.dependents);
7385
7405
  this.client.retrieve(f.map((h) => h.key.to)).then((h) => {
7386
7406
  this.dependents = this.dependents.concat(h), this.notify(this.dependents);
7387
7407
  });
7388
- }), this.resourceType = a, this.internal = o, this.target = e, this.dependents = r, this.resourceType != null && (this.dependents = this.dependents.filter((c) => c.id.type === this.resourceType)), this.client = u, this.relType = n, this.relDir = i, this.internal.resources.onChange(this.handleResourceChange), this.internal.relationships.onChange(this.handleRelationshipChange);
7408
+ }), this.resourceType = a, this.internal = o, this.target = e, this.dependents = r, this.resourceType != null && (this.dependents = this.dependents.filter((u) => u.id.type === this.resourceType)), this.client = l, this.relType = n, this.relDir = i, this.internal.resources.onChange(this.handleResourceChange), this.internal.relationships.onChange(this.handleRelationshipChange);
7389
7409
  }
7390
7410
  static async open(e, r, n) {
7391
7411
  const i = await an.open(r, n);
@@ -7416,7 +7436,7 @@ const Of = s.object({
7416
7436
  }), Tf = s.object({ policies: me(Es) }), Sf = "/access/policy/retrieve";
7417
7437
  let Nf = class {
7418
7438
  constructor(t) {
7419
- l(this, "client"), this.client = t;
7439
+ c(this, "client"), this.client = t;
7420
7440
  }
7421
7441
  async retrieve(t) {
7422
7442
  return (await v(
@@ -7431,7 +7451,7 @@ let Nf = class {
7431
7451
  const Ef = s.object({ policies: Es.partial({ key: !0 }).array() }), If = s.object({ policies: Es.array() }), kf = s.object({ keys: on.array() }), Af = s.object({}), xf = "/access/policy/create", Cf = "/access/policy/delete";
7432
7452
  let $f = class {
7433
7453
  constructor(t) {
7434
- l(this, "client"), this.client = t;
7454
+ c(this, "client"), this.client = t;
7435
7455
  }
7436
7456
  async create(t) {
7437
7457
  const e = bf.array().parse(O(t)).map((r) => ({
@@ -7458,7 +7478,7 @@ let $f = class {
7458
7478
  }
7459
7479
  }, Rf = class {
7460
7480
  constructor(t) {
7461
- l(this, "retriever"), l(this, "writer"), this.retriever = new Nf(t), this.writer = new $f(t);
7481
+ c(this, "retriever"), c(this, "writer"), this.retriever = new Nf(t), this.writer = new $f(t);
7462
7482
  }
7463
7483
  async create(t) {
7464
7484
  const e = Array.isArray(t), r = await this.writer.create(t);
@@ -7477,7 +7497,7 @@ let $f = class {
7477
7497
  }
7478
7498
  }, jf = class {
7479
7499
  constructor(t) {
7480
- l(this, "policy"), this.policy = new Rf(t);
7500
+ c(this, "policy"), this.policy = new Rf(t);
7481
7501
  }
7482
7502
  };
7483
7503
  const Ye = s.number(), Qt = s.object({
@@ -7507,14 +7527,14 @@ var Pf = function(t, e, r, n) {
7507
7527
  });
7508
7528
  }
7509
7529
  return new (r || (r = Promise))(function(a, o) {
7510
- function u(f) {
7530
+ function l(f) {
7511
7531
  try {
7512
7532
  d(n.next(f));
7513
7533
  } catch (h) {
7514
7534
  o(h);
7515
7535
  }
7516
7536
  }
7517
- function c(f) {
7537
+ function u(f) {
7518
7538
  try {
7519
7539
  d(n.throw(f));
7520
7540
  } catch (h) {
@@ -7522,7 +7542,7 @@ var Pf = function(t, e, r, n) {
7522
7542
  }
7523
7543
  }
7524
7544
  function d(f) {
7525
- f.done ? a(f.value) : i(f.value).then(u, c);
7545
+ f.done ? a(f.value) : i(f.value).then(l, u);
7526
7546
  }
7527
7547
  d((n = n.apply(t, e || [])).next());
7528
7548
  });
@@ -7535,7 +7555,7 @@ class Bf {
7535
7555
  if (e <= 0)
7536
7556
  throw new Error(`invalid weight ${e}: must be positive`);
7537
7557
  return new Promise((n, i) => {
7538
- const a = { resolve: n, reject: i, weight: e, priority: r }, o = Mo(this._queue, (u) => r <= u.priority);
7558
+ const a = { resolve: n, reject: i, weight: e, priority: r }, o = Mo(this._queue, (l) => r <= l.priority);
7539
7559
  o === -1 && e <= this._value ? this._dispatchItem(a) : this._queue.splice(o + 1, 0, a);
7540
7560
  });
7541
7561
  }
@@ -7625,14 +7645,14 @@ var Lf = function(t, e, r, n) {
7625
7645
  });
7626
7646
  }
7627
7647
  return new (r || (r = Promise))(function(a, o) {
7628
- function u(f) {
7648
+ function l(f) {
7629
7649
  try {
7630
7650
  d(n.next(f));
7631
7651
  } catch (h) {
7632
7652
  o(h);
7633
7653
  }
7634
7654
  }
7635
- function c(f) {
7655
+ function u(f) {
7636
7656
  try {
7637
7657
  d(n.throw(f));
7638
7658
  } catch (h) {
@@ -7640,7 +7660,7 @@ var Lf = function(t, e, r, n) {
7640
7660
  }
7641
7661
  }
7642
7662
  function d(f) {
7643
- f.done ? a(f.value) : i(f.value).then(u, c);
7663
+ f.done ? a(f.value) : i(f.value).then(l, u);
7644
7664
  }
7645
7665
  d((n = n.apply(t, e || [])).next());
7646
7666
  });
@@ -7675,10 +7695,10 @@ const cn = (t, e, { convertNumericStrings: r = !0 } = {}) => {
7675
7695
  const n = !Array.isArray(t);
7676
7696
  let i = O(t);
7677
7697
  const a = i[0], o = typeof a;
7678
- let u;
7679
- return o === "string" && r && !isNaN(parseInt(a)) && "number" in e ? (u = e.number, i = i.map((c) => parseInt(c))) : u = e[o], {
7698
+ let l;
7699
+ return o === "string" && r && !isNaN(parseInt(a)) && "number" in e ? (l = e.number, i = i.map((u) => parseInt(u))) : l = e[o], {
7680
7700
  single: n,
7681
- variant: u,
7701
+ variant: l,
7682
7702
  normalized: i,
7683
7703
  actual: t
7684
7704
  };
@@ -7711,7 +7731,7 @@ const cn = (t, e, { convertNumericStrings: r = !0 } = {}) => {
7711
7731
  string: "names"
7712
7732
  }), Do = class Po {
7713
7733
  constructor(e) {
7714
- l(this, "client"), this.client = e;
7734
+ c(this, "client"), this.client = e;
7715
7735
  }
7716
7736
  async search(e, r) {
7717
7737
  return await this.execute({ search: e, ...r });
@@ -7735,11 +7755,11 @@ const cn = (t, e, { convertNumericStrings: r = !0 } = {}) => {
7735
7755
  return r.channels;
7736
7756
  }
7737
7757
  };
7738
- l(Do, "ENDPOINT", "/channel/retrieve");
7758
+ c(Do, "ENDPOINT", "/channel/retrieve");
7739
7759
  let Is = Do;
7740
7760
  class ks {
7741
7761
  constructor(e) {
7742
- l(this, "cache"), l(this, "namesToKeys"), l(this, "wrapped"), this.cache = /* @__PURE__ */ new Map(), this.namesToKeys = /* @__PURE__ */ new Map(), this.wrapped = e;
7762
+ c(this, "cache"), c(this, "namesToKeys"), c(this, "wrapped"), this.cache = /* @__PURE__ */ new Map(), this.namesToKeys = /* @__PURE__ */ new Map(), this.wrapped = e;
7743
7763
  }
7744
7764
  async search(e, r) {
7745
7765
  return await this.wrapped.search(e, r);
@@ -7752,9 +7772,9 @@ class ks {
7752
7772
  string: "names",
7753
7773
  number: "keys"
7754
7774
  }), i = [], a = [];
7755
- if (n.forEach((u) => {
7756
- const c = this.get(u);
7757
- c != null ? i.push(...c) : a.push(u);
7775
+ if (n.forEach((l) => {
7776
+ const u = this.get(l);
7777
+ u != null ? i.push(...u) : a.push(l);
7758
7778
  }), a.length === 0) return i;
7759
7779
  const o = await this.wrapped.retrieve(a, r);
7760
7780
  return this.set(o), i.concat(o);
@@ -7774,10 +7794,10 @@ class ks {
7774
7794
  const a = r[i], o = this.cache.get(n);
7775
7795
  if (o == null) return;
7776
7796
  this.cache.delete(n);
7777
- const u = this.namesToKeys.get(o.name);
7778
- u != null && (u.delete(n), u.size === 0 && this.namesToKeys.delete(o.name)), o.name = a, this.cache.set(n, o);
7779
- const c = this.namesToKeys.get(a);
7780
- c == null ? this.namesToKeys.set(a, /* @__PURE__ */ new Set([n])) : c.add(n);
7797
+ const l = this.namesToKeys.get(o.name);
7798
+ l != null && (l.delete(n), l.size === 0 && this.namesToKeys.delete(o.name)), o.name = a, this.cache.set(n, o);
7799
+ const u = this.namesToKeys.get(a);
7800
+ u == null ? this.namesToKeys.set(a, /* @__PURE__ */ new Set([n])) : u.add(n);
7781
7801
  });
7782
7802
  }
7783
7803
  set(e) {
@@ -7804,7 +7824,7 @@ class ks {
7804
7824
  }
7805
7825
  class Bo {
7806
7826
  constructor(e, r) {
7807
- l(this, "mu", new _f()), l(this, "requests", /* @__PURE__ */ new Map()), l(this, "wrapped"), l(this, "debouncedRun"), this.wrapped = e, this.debouncedRun = yd(() => {
7827
+ c(this, "mu", new _f()), c(this, "requests", /* @__PURE__ */ new Map()), c(this, "wrapped"), c(this, "debouncedRun"), this.wrapped = e, this.debouncedRun = yd(() => {
7808
7828
  this.run();
7809
7829
  }, r);
7810
7830
  }
@@ -7855,13 +7875,13 @@ class Lo {
7855
7875
  leaseholder: i = 0,
7856
7876
  key: a = 0,
7857
7877
  isIndex: o = !1,
7858
- index: u = 0,
7859
- internal: c = !1,
7878
+ index: l = 0,
7879
+ internal: u = !1,
7860
7880
  virtual: d = !1,
7861
7881
  frameClient: f,
7862
7882
  alias: h
7863
7883
  }) {
7864
- l(this, "_frameClient"), l(this, "key"), l(this, "name"), l(this, "rate"), l(this, "dataType"), l(this, "leaseholder"), l(this, "index"), l(this, "isIndex"), l(this, "internal"), l(this, "alias"), l(this, "virtual"), this.key = a, this.name = n, this.rate = new Ts(r ?? 0), this.dataType = new I(e), this.leaseholder = i, this.index = u, this.isIndex = o, this.internal = c, this.alias = h, this.virtual = d, this._frameClient = f ?? null;
7884
+ c(this, "_frameClient"), c(this, "key"), c(this, "name"), c(this, "rate"), c(this, "dataType"), c(this, "leaseholder"), c(this, "index"), c(this, "isIndex"), c(this, "internal"), c(this, "alias"), c(this, "virtual"), this.key = a, this.name = n, this.rate = new Ts(r ?? 0), this.dataType = new I(e), this.leaseholder = i, this.index = l, this.isIndex = o, this.internal = u, this.alias = h, this.virtual = d, this._frameClient = f ?? null;
7865
7885
  }
7866
7886
  get framer() {
7867
7887
  if (this._frameClient == null)
@@ -7911,19 +7931,19 @@ class Lo {
7911
7931
  return await this.framer.write(e, this.key, r);
7912
7932
  }
7913
7933
  }
7914
- const zf = "/channel/retrieve-group", Ff = s.object({}), Wf = s.object({
7934
+ const zf = "/channel/retrieve-group", Ff = s.object({}), Vf = s.object({
7915
7935
  group: Co
7916
7936
  });
7917
7937
  let _o = class {
7918
7938
  constructor(t, e, r, n) {
7919
- l(this, "type", "channel"), l(this, "frameClient"), l(this, "client"), l(this, "retriever"), l(this, "writer"), this.frameClient = t, this.retriever = e, this.client = r, this.writer = n;
7939
+ c(this, "type", "channel"), c(this, "frameClient"), c(this, "client"), c(this, "retriever"), c(this, "writer"), this.frameClient = t, this.retriever = e, this.client = r, this.writer = n;
7920
7940
  }
7921
7941
  async create(t, e = {}) {
7922
7942
  const { retrieveIfNameExists: r = !1 } = e, n = !Array.isArray(t);
7923
7943
  let i = O(t), a = [];
7924
7944
  if (r) {
7925
- const o = await this.retriever.retrieve(i.map((c) => c.name)), u = new Set(o.map((c) => c.name));
7926
- i = i.filter((c) => !u.has(c.name)), a = this.sugar(o);
7945
+ const o = await this.retriever.retrieve(i.map((u) => u.name)), l = new Set(o.map((u) => u.name));
7946
+ i = i.filter((u) => !l.has(u.name)), a = this.sugar(o);
7927
7947
  }
7928
7948
  return a = a.concat(this.sugar(await this.writer.create(i))), n ? a[0] : a;
7929
7949
  }
@@ -7978,12 +7998,12 @@ let _o = class {
7978
7998
  zf,
7979
7999
  {},
7980
8000
  Ff,
7981
- Wf
8001
+ Vf
7982
8002
  );
7983
8003
  return new xo(t.group.name, t.group.key);
7984
8004
  }
7985
8005
  };
7986
- const Vf = s.object({ channels: Ro.array() }), Gf = s.object({ channels: Qt.array() }), Zf = s.object({
8006
+ const Wf = s.object({ channels: Ro.array() }), Gf = s.object({ channels: Qt.array() }), Zf = s.object({
7987
8007
  keys: Ye.array().optional(),
7988
8008
  names: s.string().array().optional()
7989
8009
  }), Kf = s.object({}), Jf = s.object({
@@ -7992,10 +8012,10 @@ const Vf = s.object({ channels: Ro.array() }), Gf = s.object({ channels: Qt.arra
7992
8012
  }), Hf = s.object({}), Xf = "/channel/create", Qf = "/channel/delete", ey = "/channel/rename";
7993
8013
  let Yo = class {
7994
8014
  constructor(t, e) {
7995
- l(this, "client"), l(this, "cache"), this.client = t, this.cache = e;
8015
+ c(this, "client"), c(this, "cache"), this.client = t, this.cache = e;
7996
8016
  }
7997
8017
  async create(t) {
7998
- const { channels: e } = await v(this.client, Xf, { channels: t }, Vf, Gf);
8018
+ const { channels: e } = await v(this.client, Xf, { channels: t }, Wf, Gf);
7999
8019
  return this.cache.set(e), e;
8000
8020
  }
8001
8021
  async delete(t) {
@@ -8035,16 +8055,19 @@ const Ib = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8035
8055
  }, Symbol.toStringTag, { value: "Module" })), er = s.string().uuid(), un = s.object({
8036
8056
  key: er,
8037
8057
  username: s.string().min(1),
8038
- firstName: s.string(),
8039
- lastName: s.string(),
8040
- rootUser: s.boolean()
8058
+ // defaults for firstName, lastName, and rootUser are done to give compatibility with
8059
+ // servers running v0.30.x and earlier. These defaults should be removed in a future
8060
+ // release.
8061
+ firstName: s.string().default(""),
8062
+ lastName: s.string().default(""),
8063
+ rootUser: s.boolean().default(!0)
8041
8064
  }), ty = un.partial({ key: !0, firstName: !0, lastName: !0 }).omit({ rootUser: !0 }).extend({ password: s.string().min(1) }), ry = s.object({
8042
8065
  keys: er.array().optional(),
8043
8066
  usernames: s.string().array().optional()
8044
8067
  }), ny = s.object({ users: me(un) }), sy = "/user/retrieve";
8045
8068
  let iy = class {
8046
8069
  constructor(t) {
8047
- l(this, "client"), this.client = t;
8070
+ c(this, "client"), this.client = t;
8048
8071
  }
8049
8072
  async retrieve(t) {
8050
8073
  return (await v(
@@ -8063,7 +8086,7 @@ const ay = s.object({ users: ty.array() }), oy = s.object({ users: un.array() })
8063
8086
  }), hy = s.object({}), dy = s.object({ keys: er.array() }), fy = s.object({}), yy = "/user/create", gy = "/user/change-username", py = "/user/rename", my = "/user/delete";
8064
8087
  let wy = class {
8065
8088
  constructor(t) {
8066
- l(this, "client"), this.client = t;
8089
+ c(this, "client"), this.client = t;
8067
8090
  }
8068
8091
  async create(t) {
8069
8092
  return (await v(
@@ -8103,7 +8126,7 @@ let wy = class {
8103
8126
  }
8104
8127
  }, by = class {
8105
8128
  constructor(t) {
8106
- l(this, "reader"), l(this, "writer"), this.writer = new wy(t), this.reader = new iy(t);
8129
+ c(this, "reader"), c(this, "writer"), this.writer = new wy(t), this.reader = new iy(t);
8107
8130
  }
8108
8131
  async create(t) {
8109
8132
  const e = Array.isArray(t), r = await this.writer.create(t);
@@ -8149,7 +8172,7 @@ const vy = s.object({
8149
8172
  }), Ey = s.object({});
8150
8173
  let Iy = class {
8151
8174
  constructor(t, e) {
8152
- l(this, "token"), l(this, "client"), l(this, "credentials"), l(this, "authenticating"), l(this, "authenticated"), l(this, "user"), l(this, "retryCount"), this.client = t, this.authenticated = !1, this.credentials = e, this.retryCount = 0;
8175
+ c(this, "token"), c(this, "client"), c(this, "credentials"), c(this, "authenticating"), c(this, "authenticated"), c(this, "user"), c(this, "retryCount"), this.client = t, this.authenticated = !1, this.credentials = e, this.retryCount = 0;
8153
8176
  }
8154
8177
  async changePassword(t) {
8155
8178
  if (!this.authenticated) throw new Error("Not authenticated");
@@ -8168,16 +8191,16 @@ let Iy = class {
8168
8191
  middleware() {
8169
8192
  const t = async (e, r) => {
8170
8193
  if (!this.authenticated && !e.target.endsWith(zi)) {
8171
- this.authenticating == null && (this.authenticating = new Promise((o, u) => {
8194
+ this.authenticating == null && (this.authenticating = new Promise((o, l) => {
8172
8195
  this.client.send(
8173
8196
  zi,
8174
8197
  this.credentials,
8175
8198
  vy,
8176
8199
  Oy
8177
- ).then(([c, d]) => {
8200
+ ).then(([u, d]) => {
8178
8201
  if (d != null) return o(d);
8179
- this.token = c == null ? void 0 : c.token, this.user = c == null ? void 0 : c.user, this.authenticated = !0, o(null);
8180
- }).catch(u);
8202
+ this.token = u == null ? void 0 : u.token, this.user = u == null ? void 0 : u.user, this.authenticated = !0, o(null);
8203
+ }).catch(l);
8181
8204
  }));
8182
8205
  const a = await this.authenticating;
8183
8206
  if (a != null) return [e, a];
@@ -8206,7 +8229,7 @@ const ky = ["disconnected", "connecting", "connected", "failed"], Ay = s.enum(ky
8206
8229
  error: void 0,
8207
8230
  message: "Disconnected",
8208
8231
  clientServerCompatible: !1,
8209
- clientVersion: "0.31.0"
8232
+ clientVersion: "0.32.0"
8210
8233
  }, Fi = (t, e, r) => {
8211
8234
  const n = r ? "cluster" : "client";
8212
8235
  return `Synnax cluster node version ${t != null ? t + " " : ""}is too ${r ? "old" : "new"} for client version ${e}.
@@ -8219,7 +8242,7 @@ const ky = ["disconnected", "connecting", "connected", "failed"], Ay = s.enum(ky
8219
8242
  * connectivity information.
8220
8243
  */
8221
8244
  constructor(e, r = A.seconds(30), n, i) {
8222
- l(this, "_state"), l(this, "pollFrequency", A.seconds(30)), l(this, "client"), l(this, "name"), l(this, "interval"), l(this, "clientVersion"), l(this, "onChangeHandlers", []), l(this, "versionWarned", !1), this._state = { ...qo }, this.client = e, this.pollFrequency = r, this.clientVersion = n, this.name = i, this.check(), this.startChecking();
8245
+ c(this, "_state"), c(this, "pollFrequency", A.seconds(30)), c(this, "client"), c(this, "name"), c(this, "interval"), c(this, "clientVersion"), c(this, "onChangeHandlers", []), c(this, "versionWarned", !1), this._state = { ...qo }, this.client = e, this.pollFrequency = r, this.clientVersion = n, this.name = i, this.check(), this.startChecking();
8223
8246
  }
8224
8247
  /** Stops the connectivity client from polling the cluster for connectivity */
8225
8248
  stopChecking() {
@@ -8240,12 +8263,12 @@ const ky = ["disconnected", "connecting", "connected", "failed"], Ay = s.enum(ky
8240
8263
  Cy
8241
8264
  );
8242
8265
  if (i != null) throw i;
8243
- const a = n.nodeVersion, o = this.clientVersion, u = this.versionWarned;
8244
- a == null ? (this._state.clientServerCompatible = !1, u || (console.warn(Fi(null, o, !0)), this.versionWarned = !0)) : Ri.versionsEqual(o, a, {
8266
+ const a = n.nodeVersion, o = this.clientVersion, l = this.versionWarned;
8267
+ a == null ? (this._state.clientServerCompatible = !1, l || (console.warn(Fi(null, o, !0)), this.versionWarned = !0)) : Ri.versionsEqual(o, a, {
8245
8268
  checkMajor: !0,
8246
8269
  checkMinor: !0,
8247
8270
  checkPatch: !1
8248
- }) ? this._state.clientServerCompatible = !0 : (this._state.clientServerCompatible = !1, u || (console.warn(
8271
+ }) ? this._state.clientServerCompatible = !0 : (this._state.clientServerCompatible = !1, l || (console.warn(
8249
8272
  Fi(
8250
8273
  a,
8251
8274
  o,
@@ -8271,7 +8294,7 @@ const ky = ["disconnected", "connecting", "connected", "failed"], Ay = s.enum(ky
8271
8294
  }, this.pollFrequency.milliseconds);
8272
8295
  }
8273
8296
  };
8274
- l(Yr, "ENDPOINT", "/connectivity/check"), l(Yr, "DEFAULT", qo), l(Yr, "connectionStateZ", xy);
8297
+ c(Yr, "ENDPOINT", "/connectivity/check"), c(Yr, "DEFAULT", qo), c(Yr, "connectionStateZ", xy);
8275
8298
  let Fo = Yr;
8276
8299
  const $y = s.object({
8277
8300
  keys: Ye.array().optional(),
@@ -8280,7 +8303,7 @@ const $y = s.object({
8280
8303
  }), Ry = s.object({}), jy = "/frame/delete";
8281
8304
  class My {
8282
8305
  constructor(e) {
8283
- l(this, "client"), this.client = e;
8306
+ c(this, "client"), this.client = e;
8284
8307
  }
8285
8308
  async delete(e) {
8286
8309
  await v(
@@ -8292,14 +8315,14 @@ class My {
8292
8315
  );
8293
8316
  }
8294
8317
  }
8295
- const Wi = (t) => {
8318
+ const Vi = (t) => {
8296
8319
  const e = O(t);
8297
8320
  return e.length === 0 ? null : typeof e[0] == "number" || !isNaN(parseInt(e[0])) ? "key" : "name";
8298
- }, Vi = (t, e) => {
8321
+ }, Wi = (t, e) => {
8299
8322
  const r = O(t);
8300
8323
  if (r.length === e.length) return;
8301
- const n = Wi(t);
8302
- throw Wi === null ? new Q(
8324
+ const n = Vi(t);
8325
+ throw Vi === null ? new Q(
8303
8326
  "[Frame] - channel keys or names must be provided when constructing a frame."
8304
8327
  ) : new Q(
8305
8328
  `[Frame] - ${n}s and series must be the same length.
@@ -8308,7 +8331,7 @@ const Wi = (t) => {
8308
8331
  };
8309
8332
  let be = class et {
8310
8333
  constructor(e = [], r = []) {
8311
- if (l(this, "columns", []), l(this, "series", []), e instanceof et) {
8334
+ if (c(this, "columns", []), c(this, "series", []), e instanceof et) {
8312
8335
  this.columns = e.columns, this.series = e.series;
8313
8336
  return;
8314
8337
  }
@@ -8321,7 +8344,7 @@ let be = class et {
8321
8344
  const n = e;
8322
8345
  n.series ?? (n.series = []), n.keys ?? (n.keys = []);
8323
8346
  const i = n.series.map((a) => Dy(a));
8324
- Vi(n.keys, i), n.keys.forEach((a, o) => this.push(a, i[o]));
8347
+ Wi(n.keys, i), n.keys.forEach((a, o) => this.push(a, i[o]));
8325
8348
  } else
8326
8349
  Object.entries(e).forEach(([n, i]) => {
8327
8350
  const a = parseInt(n);
@@ -8332,7 +8355,7 @@ let be = class et {
8332
8355
  }
8333
8356
  if (Array.isArray(e) || ["string", "number"].includes(typeof e)) {
8334
8357
  const n = O(r), i = O(e);
8335
- Vi(i, n), n.forEach((a, o) => this.push(i[o], a));
8358
+ Wi(i, n), n.forEach((a, o) => this.push(i[o], a));
8336
8359
  return;
8337
8360
  }
8338
8361
  throw new Q(
@@ -8542,7 +8565,7 @@ const As = s.object({
8542
8565
  });
8543
8566
  class hn {
8544
8567
  constructor(e) {
8545
- l(this, "adapter"), l(this, "retriever"), l(this, "keys"), this.retriever = e, this.adapter = null, this.keys = [];
8568
+ c(this, "adapter"), c(this, "retriever"), c(this, "keys"), this.retriever = e, this.adapter = null, this.keys = [];
8546
8569
  }
8547
8570
  static async open(e, r) {
8548
8571
  const n = new hn(e);
@@ -8556,9 +8579,9 @@ class hn {
8556
8579
  }
8557
8580
  const i = await this.retriever.retrieve(n), a = /* @__PURE__ */ new Map();
8558
8581
  this.adapter = a, n.forEach((o) => {
8559
- const u = i.find((c) => c.name === o);
8560
- if (u == null) throw new Error(`Channel ${o} not found`);
8561
- a.set(u.key, u.name);
8582
+ const l = i.find((u) => u.name === o);
8583
+ if (l == null) throw new Error(`Channel ${o} not found`);
8584
+ a.set(l.key, l.name);
8562
8585
  }), this.keys = Array.from(this.adapter.keys());
8563
8586
  }
8564
8587
  adapt(e) {
@@ -8576,7 +8599,7 @@ class hn {
8576
8599
  }
8577
8600
  class xs {
8578
8601
  constructor(e) {
8579
- l(this, "adapter"), l(this, "retriever"), l(this, "keys"), this.retriever = e, this.adapter = null, this.keys = [];
8602
+ c(this, "adapter"), c(this, "retriever"), c(this, "keys"), this.retriever = e, this.adapter = null, this.keys = [];
8580
8603
  }
8581
8604
  static async open(e, r) {
8582
8605
  const n = new xs(e);
@@ -8606,14 +8629,14 @@ class xs {
8606
8629
  Received a single channel name or key but no series.
8607
8630
  `);
8608
8631
  if (Array.isArray(r)) {
8609
- if (r.some((c) => c instanceof Ze || Array.isArray(c)))
8632
+ if (r.some((u) => u instanceof Ze || Array.isArray(u)))
8610
8633
  throw new Q(`
8611
8634
  Received a single channel name or key but multiple series.
8612
8635
  `);
8613
8636
  r = r;
8614
8637
  }
8615
- const o = await this.fetchChannel(e), u = new Ze({ data: r, dataType: o.dataType });
8616
- return new be(o.key, u);
8638
+ const o = await this.fetchChannel(e), l = new Ze({ data: r, dataType: o.dataType });
8639
+ return new be(o.key, l);
8617
8640
  }
8618
8641
  if (Array.isArray(e)) {
8619
8642
  if (r == null)
@@ -8624,38 +8647,38 @@ class xs {
8624
8647
  throw new Q(`
8625
8648
  Received an array of channel names or keys but no array of series.
8626
8649
  `);
8627
- const o = [], u = [];
8628
- for (let c = 0; c < e.length; c++) {
8629
- const d = await this.fetchChannel(e[c]);
8630
- if (c >= r.length)
8650
+ const o = [], l = [];
8651
+ for (let u = 0; u < e.length; u++) {
8652
+ const d = await this.fetchChannel(e[u]);
8653
+ if (u >= r.length)
8631
8654
  throw new Q(`
8632
8655
  Received an array of channel names or keys but not enough series.
8633
8656
  `);
8634
8657
  const f = new Ze({
8635
- data: r[c],
8658
+ data: r[u],
8636
8659
  dataType: d.dataType
8637
8660
  });
8638
- o.push(d.key), u.push(f);
8661
+ o.push(d.key), l.push(f);
8639
8662
  }
8640
- return new be(o, u);
8663
+ return new be(o, l);
8641
8664
  }
8642
8665
  if (e instanceof be || e instanceof Map) {
8643
8666
  const o = new be(e);
8644
8667
  if (this.adapter == null) return o;
8645
- let u = [];
8646
- return u = o.columns.map((c) => {
8668
+ let l = [];
8669
+ return l = o.columns.map((u) => {
8647
8670
  var d;
8648
- const f = typeof c == "string" ? (d = this.adapter) == null ? void 0 : d.get(c) : c;
8671
+ const f = typeof u == "string" ? (d = this.adapter) == null ? void 0 : d.get(u) : u;
8649
8672
  if (f == null)
8650
8673
  throw new Q(`
8651
- Channel ${c} was not provided in the list of channels when opening the writer
8674
+ Channel ${u} was not provided in the list of channels when opening the writer
8652
8675
  `);
8653
8676
  return f;
8654
- }), new be(u, o.series);
8677
+ }), new be(l, o.series);
8655
8678
  }
8656
8679
  const n = [], i = [], a = Object.entries(e);
8657
8680
  for (let o = 0; o < a.length; o++) {
8658
- const [u, c] = a[o], d = await this.fetchChannel(u), f = new Ze({ data: c, dataType: d.dataType });
8681
+ const [l, u] = a[o], d = await this.fetchChannel(l), f = new Ze({ data: u, dataType: d.dataType });
8659
8682
  n.push(d.key), i.push(f);
8660
8683
  }
8661
8684
  return new be(n, i);
@@ -8663,7 +8686,7 @@ class xs {
8663
8686
  }
8664
8687
  class Cs {
8665
8688
  constructor(e, r) {
8666
- l(this, "name"), l(this, "stream"), this.stream = r, this.name = e;
8689
+ c(this, "name"), c(this, "stream"), this.stream = r, this.name = e;
8667
8690
  }
8668
8691
  async receive() {
8669
8692
  const [e, r] = await this.stream.receive();
@@ -8694,7 +8717,7 @@ class Cs {
8694
8717
  }
8695
8718
  }
8696
8719
  const Gi = new A(-1);
8697
- var $s = /* @__PURE__ */ ((t) => (t[t.Open = 0] = "Open", t[t.Next = 1] = "Next", t[t.Prev = 2] = "Prev", t[t.SeekFirst = 3] = "SeekFirst", t[t.SeekLast = 4] = "SeekLast", t[t.SeekLE = 5] = "SeekLE", t[t.SeekGE = 6] = "SeekGE", t[t.Valid = 7] = "Valid", t[t.Error = 8] = "Error", t))($s || {}), Wo = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Ack = 1] = "Ack", t[t.Data = 2] = "Data", t))(Wo || {});
8720
+ var $s = /* @__PURE__ */ ((t) => (t[t.Open = 0] = "Open", t[t.Next = 1] = "Next", t[t.Prev = 2] = "Prev", t[t.SeekFirst = 3] = "SeekFirst", t[t.SeekLast = 4] = "SeekLast", t[t.SeekLE = 5] = "SeekLE", t[t.SeekGE = 6] = "SeekGE", t[t.Valid = 7] = "Valid", t[t.Error = 8] = "Error", t))($s || {}), Vo = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Ack = 1] = "Ack", t[t.Data = 2] = "Data", t))(Vo || {});
8698
8721
  const By = s.object({
8699
8722
  command: s.nativeEnum($s),
8700
8723
  span: A.z.optional(),
@@ -8703,14 +8726,14 @@ const By = s.object({
8703
8726
  keys: s.number().array().optional(),
8704
8727
  chunkSize: s.number().optional()
8705
8728
  }), Uy = s.object({
8706
- variant: s.nativeEnum(Wo),
8729
+ variant: s.nativeEnum(Vo),
8707
8730
  ack: s.boolean(),
8708
8731
  command: s.nativeEnum($s),
8709
8732
  error: Ht.optional().nullable(),
8710
8733
  frame: As.optional()
8711
- }), Vo = class is {
8734
+ }), Wo = class is {
8712
8735
  constructor(e, r) {
8713
- l(this, "stream"), l(this, "adapter"), l(this, "value"), this.stream = new Cs("Iterator", e), this.value = new be(), this.adapter = r;
8736
+ c(this, "stream"), c(this, "adapter"), c(this, "value"), this.stream = new Cs("Iterator", e), this.value = new be(), this.adapter = r;
8714
8737
  }
8715
8738
  /**
8716
8739
  * Opens the iterator, configuring it to iterate over the telemetry in the
@@ -8724,13 +8747,13 @@ const By = s.object({
8724
8747
  * @param opts - See {@link IteratorConfig}.
8725
8748
  */
8726
8749
  static async _open(e, r, n, i, a = {}) {
8727
- const o = await hn.open(n, r), u = await i.stream(is.ENDPOINT, By, Uy), c = new is(u, o);
8728
- return await c.execute({
8750
+ const o = await hn.open(n, r), l = await i.stream(is.ENDPOINT, By, Uy), u = new is(l, o);
8751
+ return await u.execute({
8729
8752
  command: 0,
8730
8753
  keys: o.keys,
8731
8754
  bounds: new ce(e),
8732
8755
  chunkSize: a.chunkSize ?? 1e5
8733
- }), c;
8756
+ }), u;
8734
8757
  }
8735
8758
  /**
8736
8759
  * Reads the next time span of telemetry for each channel in the iterator.
@@ -8839,11 +8862,11 @@ const By = s.object({
8839
8862
  }
8840
8863
  }
8841
8864
  };
8842
- l(Vo, "ENDPOINT", "/frame/iterate");
8843
- let Ly = Vo;
8865
+ c(Wo, "ENDPOINT", "/frame/iterate");
8866
+ let Ly = Wo;
8844
8867
  class _y {
8845
8868
  constructor(e) {
8846
- l(this, "iter"), l(this, "open", !1), this.iter = e;
8869
+ c(this, "iter"), c(this, "open", !1), this.iter = e;
8847
8870
  }
8848
8871
  async next() {
8849
8872
  try {
@@ -8860,17 +8883,17 @@ const Yy = s.object({ keys: s.number().array(), downsampleFactor: s.number() }),
8860
8883
  }), zy = "/frame/stream";
8861
8884
  class Rs {
8862
8885
  constructor(e, r) {
8863
- l(this, "stream"), l(this, "adapter"), l(this, "downsampleFactor"), this.stream = new Cs("Streamer", e), this.adapter = r, this.downsampleFactor = 1;
8886
+ c(this, "stream"), c(this, "adapter"), c(this, "downsampleFactor"), this.stream = new Cs("Streamer", e), this.adapter = r, this.downsampleFactor = 1;
8864
8887
  }
8865
8888
  get keys() {
8866
8889
  return this.adapter.keys;
8867
8890
  }
8868
8891
  static async _open(e, r, { channels: n, downsampleFactor: i }) {
8869
- const a = await hn.open(e, n), o = await r.stream(zy, Yy, qy), u = new Rs(o, a);
8892
+ const a = await hn.open(e, n), o = await r.stream(zy, Yy, qy), l = new Rs(o, a);
8870
8893
  o.send({ keys: a.keys, downsampleFactor: i ?? 1 });
8871
- const [, c] = await o.receive();
8872
- if (c != null) throw c;
8873
- return u;
8894
+ const [, u] = await o.receive();
8895
+ if (u != null) throw u;
8896
+ return l;
8874
8897
  }
8875
8898
  async next() {
8876
8899
  try {
@@ -8895,7 +8918,7 @@ class Rs {
8895
8918
  }
8896
8919
  class dn extends He.Observer {
8897
8920
  constructor(e, r) {
8898
- super(r), l(this, "streamer"), l(this, "closePromise"), this.streamer = e, this.closePromise = this.stream();
8921
+ super(r), c(this, "streamer"), c(this, "closePromise"), this.streamer = e, this.closePromise = this.stream();
8899
8922
  }
8900
8923
  async close() {
8901
8924
  this.streamer.close(), await this.closePromise;
@@ -8904,7 +8927,7 @@ class dn extends He.Observer {
8904
8927
  for await (const e of this.streamer) this.notify(e);
8905
8928
  }
8906
8929
  }
8907
- var js = /* @__PURE__ */ ((t) => (t[t.Open = 0] = "Open", t[t.Write = 1] = "Write", t[t.Commit = 2] = "Commit", t[t.Error = 3] = "Error", t[t.SetAuthority = 4] = "SetAuthority", t))(js || {}), Wt = /* @__PURE__ */ ((t) => (t[t.PersistStream = 1] = "PersistStream", t[t.Persist = 2] = "Persist", t[t.Stream = 3] = "Stream", t))(Wt || {});
8930
+ var js = /* @__PURE__ */ ((t) => (t[t.Open = 0] = "Open", t[t.Write = 1] = "Write", t[t.Commit = 2] = "Commit", t[t.Error = 3] = "Error", t[t.SetAuthority = 4] = "SetAuthority", t))(js || {}), Vt = /* @__PURE__ */ ((t) => (t[t.PersistStream = 1] = "PersistStream", t[t.Persist = 2] = "Persist", t[t.Stream = 3] = "Stream", t))(Vt || {});
8908
8931
  const Fy = (t) => {
8909
8932
  switch (t) {
8910
8933
  case "persist":
@@ -8914,23 +8937,23 @@ const Fy = (t) => {
8914
8937
  case "persistStream":
8915
8938
  return 1;
8916
8939
  default:
8917
- if (typeof t == "number" && t in Wt) return t;
8940
+ if (typeof t == "number" && t in Vt) return t;
8918
8941
  throw new Error(`invalid writer mode: ${t}`);
8919
8942
  }
8920
8943
  };
8921
8944
  new A(-1);
8922
- const Wy = s.object({
8945
+ const Vy = s.object({
8923
8946
  start: R.z.optional(),
8924
8947
  controlSubject: nt.subjectZ.optional(),
8925
8948
  keys: s.number().array().optional(),
8926
8949
  authorities: nt.Authority.z.array().optional(),
8927
- mode: s.nativeEnum(Wt).optional(),
8950
+ mode: s.nativeEnum(Vt).optional(),
8928
8951
  errOnUnauthorized: s.boolean().optional(),
8929
8952
  enableAutoCommit: s.boolean().optional(),
8930
8953
  autoIndexPersistInterval: A.z.optional()
8931
- }), Vy = s.object({
8954
+ }), Wy = s.object({
8932
8955
  command: s.nativeEnum(js),
8933
- config: Wy.optional(),
8956
+ config: Vy.optional(),
8934
8957
  frame: As.optional()
8935
8958
  }), Gy = s.object({
8936
8959
  ack: s.boolean(),
@@ -8940,7 +8963,7 @@ const Wy = s.object({
8940
8963
  var yt;
8941
8964
  let Zy = (yt = class {
8942
8965
  constructor(t, e) {
8943
- l(this, "stream"), l(this, "adapter"), this.stream = new Cs("Writer", t), this.adapter = e;
8966
+ c(this, "stream"), c(this, "adapter"), this.stream = new Cs("Writer", t), this.adapter = e;
8944
8967
  }
8945
8968
  static async _open(t, e, {
8946
8969
  channels: r,
@@ -8948,11 +8971,11 @@ let Zy = (yt = class {
8948
8971
  authorities: i = nt.Authority.Absolute,
8949
8972
  controlSubject: a,
8950
8973
  mode: o = 1,
8951
- errOnUnauthorized: u = !1,
8952
- enableAutoCommit: c = !1,
8974
+ errOnUnauthorized: l = !1,
8975
+ enableAutoCommit: u = !1,
8953
8976
  autoIndexPersistInterval: d = A.SECOND
8954
8977
  }) {
8955
- const f = await xs.open(t, r), h = await e.stream(yt.ENDPOINT, Vy, Gy), E = new yt(h, f);
8978
+ const f = await xs.open(t, r), h = await e.stream(yt.ENDPOINT, Wy, Gy), E = new yt(h, f);
8956
8979
  return await E.execute({
8957
8980
  command: 0,
8958
8981
  config: {
@@ -8961,8 +8984,8 @@ let Zy = (yt = class {
8961
8984
  controlSubject: a,
8962
8985
  authorities: O(i),
8963
8986
  mode: Fy(o),
8964
- errOnUnauthorized: u,
8965
- enableAutoCommit: c,
8987
+ errOnUnauthorized: l,
8988
+ enableAutoCommit: u,
8966
8989
  autoIndexPersistInterval: d
8967
8990
  }
8968
8991
  }), E;
@@ -9045,9 +9068,9 @@ let Zy = (yt = class {
9045
9068
  get errorAccumulated() {
9046
9069
  return this.stream.received();
9047
9070
  }
9048
- }, l(yt, "ENDPOINT", "/frame/write"), yt), Ky = class {
9071
+ }, c(yt, "ENDPOINT", "/frame/write"), yt), Ky = class {
9049
9072
  constructor(t, e, r) {
9050
- l(this, "streamClient"), l(this, "retriever"), l(this, "deleter"), this.streamClient = t, this.retriever = r, this.deleter = new My(e);
9073
+ c(this, "streamClient"), c(this, "retriever"), c(this, "deleter"), this.streamClient = t, this.retriever = r, this.deleter = new My(e);
9051
9074
  }
9052
9075
  /**
9053
9076
  * Opens a new iterator over the given channels within the provided time range.
@@ -9087,7 +9110,7 @@ let Zy = (yt = class {
9087
9110
  const i = e, a = await this.openWriter({
9088
9111
  start: t,
9089
9112
  channels: Object.keys(i),
9090
- mode: Wt.Persist
9113
+ mode: Vt.Persist
9091
9114
  });
9092
9115
  try {
9093
9116
  await a.write(i), await a.commit();
@@ -9099,7 +9122,7 @@ let Zy = (yt = class {
9099
9122
  const n = await this.openWriter({
9100
9123
  start: t,
9101
9124
  channels: e,
9102
- mode: Wt.Persist,
9125
+ mode: Vt.Persist,
9103
9126
  errOnUnauthorized: !0,
9104
9127
  enableAutoCommit: !0,
9105
9128
  autoIndexPersistInterval: A.MAX
@@ -9143,7 +9166,7 @@ class Go extends dn {
9143
9166
  super(e, (r) => {
9144
9167
  const n = this.codec.decode(r.series[0].buffer);
9145
9168
  return this.merge(n), [n.transfers, !0];
9146
- }), l(this, "states"), l(this, "codec"), this.states = /* @__PURE__ */ new Map(), this.codec = new ot.JSONCodec();
9169
+ }), c(this, "states"), c(this, "codec"), this.states = /* @__PURE__ */ new Map(), this.codec = new ot.JSONCodec();
9147
9170
  }
9148
9171
  subjects() {
9149
9172
  const e = /* @__PURE__ */ new Map();
@@ -9158,7 +9181,7 @@ class Go extends dn {
9158
9181
  const Qy = "sy_node_1_control";
9159
9182
  let Zo = class {
9160
9183
  constructor(t) {
9161
- l(this, "framer"), this.framer = t;
9184
+ c(this, "framer"), this.framer = t;
9162
9185
  }
9163
9186
  async openStateTracker() {
9164
9187
  const t = await this.framer.openStreamer(Qy);
@@ -9175,7 +9198,7 @@ const kb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9175
9198
  }, Symbol.toStringTag, { value: "Module" }));
9176
9199
  let eg = class {
9177
9200
  constructor(t, e, r) {
9178
- l(this, "tasks"), l(this, "racks"), l(this, "devices"), this.tasks = t, this.racks = e, this.devices = r;
9201
+ c(this, "tasks"), c(this, "racks"), c(this, "devices"), this.tasks = t, this.racks = e, this.devices = r;
9179
9202
  }
9180
9203
  };
9181
9204
  const tr = s.number(), Ms = s.object({
@@ -9196,10 +9219,10 @@ const tr = s.number(), Ms = s.object({
9196
9219
  properties: s.unknown().transform((t) => ot.JSON_CODEC.encodeString(t))
9197
9220
  }), ct = async (t, e, r, n) => {
9198
9221
  const i = await t.openStreamer([e, r]), a = (o) => {
9199
- const u = [];
9200
- return r != null && u.push(
9201
- ...o.get(r).series.flatMap((c) => n("delete", c))
9202
- ), e != null && u.push(...o.get(e).series.flatMap((c) => n("set", c))), [u, u.length > 0];
9222
+ const l = [];
9223
+ return r != null && l.push(
9224
+ ...o.get(r).series.flatMap((u) => n("delete", u))
9225
+ ), e != null && l.push(...o.get(e).series.flatMap((u) => n("set", u))), [l, l.length > 0];
9203
9226
  };
9204
9227
  return new dn(i, a);
9205
9228
  }, ng = "sy_device_set", sg = "sy_device_delete", jn = "/hardware/device/retrieve", ig = "/hardware/device/create", ag = "/hardware/device/delete", og = s.object({ devices: rg.array() }), cg = s.object({ devices: fn.array() }), lg = s.object({ keys: Ds.array() }), ug = s.object({}), Mn = s.object({
@@ -9212,7 +9235,7 @@ const tr = s.number(), Ms = s.object({
9212
9235
  }), Dn = s.object({ devices: me(fn) });
9213
9236
  let hg = class {
9214
9237
  constructor(t, e) {
9215
- l(this, "type", "device"), l(this, "client"), l(this, "frameClient"), this.client = t, this.frameClient = e;
9238
+ c(this, "type", "device"), c(this, "client"), c(this, "frameClient"), this.client = t, this.frameClient = e;
9216
9239
  }
9217
9240
  async retrieve(t, e) {
9218
9241
  const r = !Array.isArray(t), n = await v(
@@ -9295,7 +9318,7 @@ const dg = (t, e) => t === "delete" ? e.toStrings().map((r) => ({ variant: t, ke
9295
9318
  }), wg = s.object({});
9296
9319
  let bg = class {
9297
9320
  constructor(t, e, r) {
9298
- l(this, "type", "rack"), l(this, "client"), l(this, "frameClient"), l(this, "tasks"), this.client = t, this.frameClient = e, this.tasks = r;
9321
+ c(this, "type", "rack"), c(this, "client"), c(this, "frameClient"), c(this, "tasks"), this.client = t, this.frameClient = e, this.tasks = r;
9299
9322
  }
9300
9323
  async delete(t) {
9301
9324
  await v(
@@ -9355,7 +9378,7 @@ let bg = class {
9355
9378
  };
9356
9379
  class vg {
9357
9380
  constructor(e, r, n) {
9358
- l(this, "key"), l(this, "name"), l(this, "tasks"), this.key = e, this.name = r, this.tasks = n;
9381
+ c(this, "key"), c(this, "name"), c(this, "tasks"), this.key = e, this.name = r, this.tasks = n;
9359
9382
  }
9360
9383
  async listTasks() {
9361
9384
  return await this.tasks.retrieve(this.key);
@@ -9405,8 +9428,8 @@ s.object({
9405
9428
  });
9406
9429
  const Yt = "sy_task_state", Zi = "sy_task_cmd", cr = new Error("Task not created");
9407
9430
  class Tg {
9408
- constructor(e, r, n, i, a = !1, o = !1, u, c = null, d = null, f = null) {
9409
- l(this, "key"), l(this, "name"), l(this, "internal"), l(this, "type"), l(this, "config"), l(this, "snapshot"), l(this, "state"), l(this, "frameClient"), l(this, "ontologyClient"), l(this, "rangeClient"), this.key = e, this.name = r, this.type = n, this.config = i, this.internal = a, this.snapshot = o, u !== null && (this.state = u), this.frameClient = c, this.ontologyClient = d, this.rangeClient = f;
9431
+ constructor(e, r, n, i, a = !1, o = !1, l, u = null, d = null, f = null) {
9432
+ c(this, "key"), c(this, "name"), c(this, "internal"), c(this, "type"), c(this, "config"), c(this, "snapshot"), c(this, "state"), c(this, "frameClient"), c(this, "ontologyClient"), c(this, "rangeClient"), this.key = e, this.name = r, this.type = n, this.config = i, this.internal = a, this.snapshot = o, l !== null && (this.state = l), this.frameClient = u, this.ontologyClient = d, this.rangeClient = f;
9410
9433
  }
9411
9434
  get payload() {
9412
9435
  return {
@@ -9430,13 +9453,13 @@ class Tg {
9430
9453
  if (this.frameClient == null) throw cr;
9431
9454
  const i = await this.frameClient.openStreamer(Yt), a = await this.executeCommand(e, r);
9432
9455
  let o;
9433
- const u = new Promise(
9434
- (c) => setTimeout(() => c(!1), new A(n).milliseconds)
9456
+ const l = new Promise(
9457
+ (u) => setTimeout(() => u(!1), new A(n).milliseconds)
9435
9458
  );
9436
9459
  for (; ; ) {
9437
- const c = await Promise.any([i.read(), u]);
9438
- if (c === !1) throw new Error("Command timed out");
9439
- const d = Kr.safeParse(c.at(-1).sy_task_state);
9460
+ const u = await Promise.any([i.read(), l]);
9461
+ if (u === !1) throw new Error("Command timed out");
9462
+ const d = Kr.safeParse(u.at(-1).sy_task_state);
9440
9463
  if (d.success) {
9441
9464
  if (o = d.data, o.key === a) break;
9442
9465
  } else
@@ -9481,7 +9504,7 @@ const Sg = s.object({
9481
9504
  }), Mg = s.object({ task: yn });
9482
9505
  let Dg = class {
9483
9506
  constructor(t, e, r, n) {
9484
- l(this, "type", "task"), l(this, "client"), l(this, "frameClient"), l(this, "ontologyClient"), l(this, "rangeClient"), this.client = t, this.frameClient = e, this.ontologyClient = r, this.rangeClient = n;
9507
+ c(this, "type", "task"), c(this, "client"), c(this, "frameClient"), c(this, "ontologyClient"), c(this, "rangeClient"), this.client = t, this.frameClient = e, this.ontologyClient = r, this.rangeClient = n;
9485
9508
  }
9486
9509
  async create(t) {
9487
9510
  const e = !Array.isArray(t), r = await v(
@@ -9518,8 +9541,8 @@ let Dg = class {
9518
9541
  { convertNumericStrings: !1 }
9519
9542
  ), a = { ...e };
9520
9543
  i === "rack" ? a.rack = t : a.keys = n;
9521
- const o = await this.execRetrieve(a), u = this.sugar(o);
9522
- return r && i !== "rack" ? u[0] : u;
9544
+ const o = await this.execRetrieve(a), l = this.sugar(o);
9545
+ return r && i !== "rack" ? l[0] : l;
9523
9546
  }
9524
9547
  async copy(t, e, r) {
9525
9548
  const n = await v(
@@ -9546,13 +9569,13 @@ let Dg = class {
9546
9569
  }
9547
9570
  sugar(t) {
9548
9571
  return t.map(
9549
- ({ key: e, name: r, type: n, config: i, state: a, internal: o, snapshot: u }) => new Tg(
9572
+ ({ key: e, name: r, type: n, config: i, state: a, internal: o, snapshot: l }) => new Tg(
9550
9573
  e,
9551
9574
  r,
9552
9575
  n,
9553
9576
  i,
9554
9577
  o,
9555
- u,
9578
+ l,
9556
9579
  a,
9557
9580
  this.frameClient,
9558
9581
  this.ontologyClient,
@@ -9600,7 +9623,7 @@ const rr = s.string().uuid(), gn = s.object({
9600
9623
  var lr;
9601
9624
  let Ug = (lr = class {
9602
9625
  constructor(t) {
9603
- l(this, "client"), this.client = t;
9626
+ c(this, "client"), this.client = t;
9604
9627
  }
9605
9628
  async retrieve(t) {
9606
9629
  const e = O(t);
@@ -9625,7 +9648,7 @@ let Ug = (lr = class {
9625
9648
  if (r != null) throw r;
9626
9649
  return e.labels;
9627
9650
  }
9628
- }, l(lr, "ENDPOINT", "/label/retrieve"), lr);
9651
+ }, c(lr, "ENDPOINT", "/label/retrieve"), lr);
9629
9652
  const Lg = gn.extend({ key: rr.optional() }), _g = s.object({
9630
9653
  labels: Lg.array()
9631
9654
  }), Yg = s.object({
@@ -9636,10 +9659,10 @@ const Lg = gn.extend({ key: rr.optional() }), _g = s.object({
9636
9659
  id: ge,
9637
9660
  labels: rr.array(),
9638
9661
  replace: s.boolean().optional()
9639
- }), zg = Ko.omit({ replace: !0 }), Ln = s.object({}), Fg = "/label/create", Wg = "/label/delete", Vg = "/label/set", Gg = "/label/remove";
9662
+ }), zg = Ko.omit({ replace: !0 }), Ln = s.object({}), Fg = "/label/create", Vg = "/label/delete", Wg = "/label/set", Gg = "/label/remove";
9640
9663
  let Zg = class {
9641
9664
  constructor(t) {
9642
- l(this, "client"), this.client = t;
9665
+ c(this, "client"), this.client = t;
9643
9666
  }
9644
9667
  async create(t) {
9645
9668
  return (await v(
@@ -9653,7 +9676,7 @@ let Zg = class {
9653
9676
  async delete(t) {
9654
9677
  await v(
9655
9678
  this.client,
9656
- Wg,
9679
+ Vg,
9657
9680
  { keys: O(t) },
9658
9681
  qg,
9659
9682
  Ln
@@ -9662,7 +9685,7 @@ let Zg = class {
9662
9685
  async set(t, e, { replace: r } = {}) {
9663
9686
  await v(
9664
9687
  this.client,
9665
- Vg,
9688
+ Wg,
9666
9689
  { id: t, labels: e, replace: r },
9667
9690
  Ko,
9668
9691
  Ln
@@ -9681,7 +9704,7 @@ let Zg = class {
9681
9704
  const Kg = "sy_label_set", Jg = "sy_label_delete";
9682
9705
  let Hg = class {
9683
9706
  constructor(t, e, r) {
9684
- l(this, "type", "label"), l(this, "retriever"), l(this, "writer"), l(this, "frameClient"), l(this, "ontology"), this.writer = new Zg(t), this.retriever = new Ug(t), this.frameClient = e, this.ontology = r;
9707
+ c(this, "type", "label"), c(this, "retriever"), c(this, "writer"), c(this, "frameClient"), c(this, "ontology"), this.writer = new Zg(t), this.retriever = new Ug(t), this.frameClient = e, this.ontology = r;
9685
9708
  }
9686
9709
  async search(t) {
9687
9710
  return await this.retriever.search(t);
@@ -9774,7 +9797,7 @@ const Xg = (t, e) => t === "delete" ? e.toUUIDs().map((r) => ({ variant: t, key:
9774
9797
  aliases: s.record(s.string(), s.string())
9775
9798
  }), jt = class Mt {
9776
9799
  constructor(e, r, n) {
9777
- l(this, "frameClient"), l(this, "cache", /* @__PURE__ */ new Map()), l(this, "client"), l(this, "rangeKey"), this.rangeKey = e, this.cache = /* @__PURE__ */ new Map(), this.client = n, this.frameClient = r;
9800
+ c(this, "frameClient"), c(this, "cache", /* @__PURE__ */ new Map()), c(this, "client"), c(this, "rangeKey"), this.rangeKey = e, this.cache = /* @__PURE__ */ new Map(), this.client = n, this.frameClient = r;
9778
9801
  }
9779
9802
  async resolve(e) {
9780
9803
  const r = [], n = typeof e == "string", i = {};
@@ -9784,8 +9807,8 @@ const Xg = (t, e) => t === "delete" ? e.toUUIDs().map((r) => ({ variant: t, key:
9784
9807
  r.push(e);
9785
9808
  } else
9786
9809
  e.forEach((o) => {
9787
- const u = this.cache.get(o);
9788
- u != null ? i[o] = u : r.push(o);
9810
+ const l = this.cache.get(o);
9811
+ l != null ? i[o] = l : r.push(o);
9789
9812
  });
9790
9813
  if (r.length === 0) return i;
9791
9814
  const a = await v(
@@ -9795,7 +9818,7 @@ const Xg = (t, e) => t === "delete" ? e.toUUIDs().map((r) => ({ variant: t, key:
9795
9818
  np,
9796
9819
  sp
9797
9820
  );
9798
- return Object.entries(a.aliases).forEach(([o, u]) => this.cache.set(o, u)), n ? a.aliases[r[0]] : { ...i, ...a.aliases };
9821
+ return Object.entries(a.aliases).forEach(([o, l]) => this.cache.set(o, l)), n ? a.aliases[r[0]] : { ...i, ...a.aliases };
9799
9822
  }
9800
9823
  async set(e) {
9801
9824
  await v(
@@ -9833,7 +9856,7 @@ const Xg = (t, e) => t === "delete" ? e.toUUIDs().map((r) => ({ variant: t, key:
9833
9856
  );
9834
9857
  }
9835
9858
  };
9836
- l(jt, "SET_ENDPOINT", "/range/alias/set"), l(jt, "RESOLVE_ENDPOINT", "/range/alias/resolve"), l(jt, "LIST_ENDPOINT", "/range/alias/list"), l(jt, "DELETE_ENDPOINT", "/range/alias/delete");
9859
+ c(jt, "SET_ENDPOINT", "/range/alias/set"), c(jt, "RESOLVE_ENDPOINT", "/range/alias/resolve"), c(jt, "LIST_ENDPOINT", "/range/alias/list"), c(jt, "DELETE_ENDPOINT", "/range/alias/delete");
9837
9860
  let hp = jt;
9838
9861
  const dp = s.object({
9839
9862
  range: fe,
@@ -9864,7 +9887,7 @@ const dp = s.object({
9864
9887
  keys: s.string().array()
9865
9888
  }), qr = class zr {
9866
9889
  constructor(e, r, n) {
9867
- l(this, "rangeKey"), l(this, "client"), l(this, "frameClient"), this.rangeKey = e, this.client = r, this.frameClient = n;
9890
+ c(this, "rangeKey"), c(this, "client"), c(this, "frameClient"), this.rangeKey = e, this.client = r, this.frameClient = n;
9868
9891
  }
9869
9892
  async get(e) {
9870
9893
  const r = await v(
@@ -9918,12 +9941,12 @@ const dp = s.object({
9918
9941
  );
9919
9942
  }
9920
9943
  };
9921
- l(qr, "GET_ENDPOINT", "/range/kv/get"), l(qr, "SET_ENDPOINT", "/range/kv/set"), l(qr, "DELETE_ENDPOINT", "/range/kv/delete");
9944
+ c(qr, "GET_ENDPOINT", "/range/kv/get"), c(qr, "SET_ENDPOINT", "/range/kv/set"), c(qr, "DELETE_ENDPOINT", "/range/kv/delete");
9922
9945
  let as = qr;
9923
9946
  const _n = (t) => new k({ type: "range", key: t });
9924
9947
  class ec {
9925
- constructor(e, r = ce.ZERO, n, i, a, o, u, c, d, f, h) {
9926
- l(this, "key"), l(this, "name"), l(this, "kv"), l(this, "timeRange"), l(this, "color"), l(this, "channels"), l(this, "aliaser"), l(this, "frameClient"), l(this, "labelClient"), l(this, "ontologyClient"), l(this, "rangeClient"), this.key = n, this.name = e, this.timeRange = r, this.frameClient = a, this.color = i, this.kv = o, this.aliaser = u, this.channels = c, this.labelClient = d, this.ontologyClient = f, this.rangeClient = h;
9948
+ constructor(e, r = ce.ZERO, n, i, a, o, l, u, d, f, h) {
9949
+ c(this, "key"), c(this, "name"), c(this, "kv"), c(this, "timeRange"), c(this, "color"), c(this, "channels"), c(this, "aliaser"), c(this, "frameClient"), c(this, "labelClient"), c(this, "ontologyClient"), c(this, "rangeClient"), this.key = n, this.name = e, this.timeRange = r, this.frameClient = a, this.color = i, this.kv = o, this.aliaser = l, this.channels = u, this.labelClient = d, this.ontologyClient = f, this.rangeClient = h;
9927
9950
  }
9928
9951
  get ontologyID() {
9929
9952
  return new k({ key: this.key, type: "range" });
@@ -9998,10 +10021,10 @@ class ec {
9998
10021
  relationshipDirection: "to"
9999
10022
  });
10000
10023
  return a.onChange((o) => {
10001
- const u = this.rangeClient.resourcesToRanges(o);
10002
- if (u.length === 0) return;
10003
- const c = u[0];
10004
- e.notify(c);
10024
+ const l = this.rangeClient.resourcesToRanges(o);
10025
+ if (l.length === 0) return;
10026
+ const u = l[0];
10027
+ e.notify(u);
10005
10028
  }), e.setCloser(async () => await a.close()), e;
10006
10029
  }
10007
10030
  }
@@ -10017,7 +10040,7 @@ const bp = s.object({
10017
10040
  });
10018
10041
  let tc = class {
10019
10042
  constructor(t, e, r, n, i, a) {
10020
- l(this, "type", "range"), l(this, "frameClient"), l(this, "writer"), l(this, "unaryClient"), l(this, "channels"), l(this, "labelClient"), l(this, "ontologyClient"), this.frameClient = t, this.writer = e, this.unaryClient = r, this.channels = n, this.labelClient = i, this.ontologyClient = a;
10043
+ c(this, "type", "range"), c(this, "frameClient"), c(this, "writer"), c(this, "unaryClient"), c(this, "channels"), c(this, "labelClient"), c(this, "ontologyClient"), this.frameClient = t, this.writer = e, this.unaryClient = r, this.channels = n, this.labelClient = i, this.ontologyClient = a;
10021
10044
  }
10022
10045
  async create(t, e) {
10023
10046
  const r = !Array.isArray(t), n = this.sugarMany(await this.writer.create(O(t), e));
@@ -10122,7 +10145,7 @@ const Tp = s.object({
10122
10145
  }), kp = s.object({}), Ap = "/range/create", xp = "/range/delete", Cp = "/range/rename";
10123
10146
  let rc = class {
10124
10147
  constructor(t) {
10125
- l(this, "client"), this.client = t;
10148
+ c(this, "client"), this.client = t;
10126
10149
  }
10127
10150
  async rename(t, e) {
10128
10151
  await v(
@@ -10169,7 +10192,7 @@ const Ab = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10169
10192
  }, Symbol.toStringTag, { value: "Module" })), $p = "/api/v1/";
10170
10193
  class Rp {
10171
10194
  constructor(e, r = !1) {
10172
- l(this, "url"), l(this, "unary"), l(this, "stream"), l(this, "secure"), this.secure = r, this.url = e.child($p);
10195
+ c(this, "url"), c(this, "unary"), c(this, "stream"), c(this, "secure"), this.secure = r, this.url = e.child($p);
10173
10196
  const n = new ot.JSONCodec();
10174
10197
  this.unary = new mh(this.url, n, this.secure), this.stream = new Ih(this.url, n, this.secure);
10175
10198
  }
@@ -10184,7 +10207,7 @@ const Bs = s.string().uuid(), Us = s.object({
10184
10207
  }), jp = s.object({ keys: s.string().array() }), Mp = s.object({ linePlots: Us.array() });
10185
10208
  let Dp = class {
10186
10209
  constructor(t) {
10187
- l(this, "ENDPOINT", "/workspace/lineplot/retrieve"), l(this, "client"), this.client = t;
10210
+ c(this, "ENDPOINT", "/workspace/lineplot/retrieve"), c(this, "client"), this.client = t;
10188
10211
  }
10189
10212
  async retrieve(t) {
10190
10213
  const e = O(t);
@@ -10213,16 +10236,16 @@ const Xe = s.string().uuid(), nc = (t) => JSON.parse(t), sc = s.object({
10213
10236
  }), qp = s.object({}), zp = s.object({
10214
10237
  key: Bs,
10215
10238
  data: s.string()
10216
- }), Fp = s.object({}), Wp = "/workspace/lineplot/create", Vp = "/workspace/lineplot/delete", Gp = "/workspace/lineplot/rename", Zp = "/workspace/lineplot/set-data";
10239
+ }), Fp = s.object({}), Vp = "/workspace/lineplot/create", Wp = "/workspace/lineplot/delete", Gp = "/workspace/lineplot/rename", Zp = "/workspace/lineplot/set-data";
10217
10240
  let Kp = class {
10218
10241
  constructor(t) {
10219
- l(this, "client"), this.client = t;
10242
+ c(this, "client"), this.client = t;
10220
10243
  }
10221
10244
  async create(t, e) {
10222
10245
  const r = { ...e, data: JSON.stringify(e.data) };
10223
10246
  return (await v(
10224
10247
  this.client,
10225
- Wp,
10248
+ Vp,
10226
10249
  { workspace: t, linePlots: [r] },
10227
10250
  Bp,
10228
10251
  Up
@@ -10232,7 +10255,7 @@ let Kp = class {
10232
10255
  const e = O(t);
10233
10256
  await v(
10234
10257
  this.client,
10235
- Vp,
10258
+ Wp,
10236
10259
  { keys: e },
10237
10260
  Lp,
10238
10261
  _p
@@ -10258,7 +10281,7 @@ let Kp = class {
10258
10281
  }
10259
10282
  }, Jp = class {
10260
10283
  constructor(t) {
10261
- l(this, "writer"), l(this, "retriever"), this.writer = new Kp(t), this.retriever = new Dp(t);
10284
+ c(this, "writer"), c(this, "retriever"), this.writer = new Kp(t), this.retriever = new Dp(t);
10262
10285
  }
10263
10286
  async create(t, e) {
10264
10287
  return await this.writer.create(t, e);
@@ -10287,7 +10310,7 @@ const Hp = s.object({
10287
10310
  var ur;
10288
10311
  let Qp = (ur = class {
10289
10312
  constructor(t) {
10290
- l(this, "client"), this.client = t;
10313
+ c(this, "client"), this.client = t;
10291
10314
  }
10292
10315
  async retrieve(t) {
10293
10316
  const e = O(t);
@@ -10311,7 +10334,7 @@ let Qp = (ur = class {
10311
10334
  Xp
10312
10335
  )).workspaces;
10313
10336
  }
10314
- }, l(ur, "ENDPOINT", "/workspace/retrieve"), ur);
10337
+ }, c(ur, "ENDPOINT", "/workspace/retrieve"), ur);
10315
10338
  const pn = s.string().uuid(), em = s.object({
10316
10339
  key: s.string(),
10317
10340
  name: s.string(),
@@ -10325,7 +10348,7 @@ const pn = s.string().uuid(), em = s.object({
10325
10348
  }), tm = s.object({ keys: s.string().array() }), rm = s.object({ schematics: Ls.array() });
10326
10349
  class nm {
10327
10350
  constructor(e) {
10328
- l(this, "ENDPOINT", "/workspace/schematic/retrieve"), l(this, "client"), this.client = e;
10351
+ c(this, "ENDPOINT", "/workspace/schematic/retrieve"), c(this, "client"), this.client = e;
10329
10352
  }
10330
10353
  async retrieve(e) {
10331
10354
  return (await v(
@@ -10364,7 +10387,7 @@ const hm = s.object({
10364
10387
  }), fm = "/workspace/schematic/create", ym = "/workspace/schematic/delete", gm = "/workspace/schematic/rename", pm = "/workspace/schematic/set-data", mm = "/workspace/schematic/copy";
10365
10388
  let wm = class {
10366
10389
  constructor(t) {
10367
- l(this, "client"), this.client = t;
10390
+ c(this, "client"), this.client = t;
10368
10391
  }
10369
10392
  async create(t, e) {
10370
10393
  const r = { ...e, data: JSON.stringify(e.data) };
@@ -10415,7 +10438,7 @@ let wm = class {
10415
10438
  }
10416
10439
  }, bm = class {
10417
10440
  constructor(t) {
10418
- l(this, "writer"), l(this, "retriever"), this.writer = new wm(t), this.retriever = new nm(t);
10441
+ c(this, "writer"), c(this, "retriever"), this.writer = new wm(t), this.retriever = new nm(t);
10419
10442
  }
10420
10443
  async create(t, e) {
10421
10444
  return await this.writer.create(t, e);
@@ -10455,7 +10478,7 @@ const vm = sc.partial({ key: !0 }).transform((t) => ({
10455
10478
  }), Am = s.object({}), xm = "/workspace/create", Cm = "/workspace/delete", $m = "/workspace/rename", Rm = "/workspace/set-layout";
10456
10479
  class jm {
10457
10480
  constructor(e) {
10458
- l(this, "client"), this.client = e;
10481
+ c(this, "client"), this.client = e;
10459
10482
  }
10460
10483
  async create(e) {
10461
10484
  return (await v(
@@ -10496,7 +10519,7 @@ class jm {
10496
10519
  }
10497
10520
  class Mm {
10498
10521
  constructor(e) {
10499
- l(this, "type", "workspace"), l(this, "schematic"), l(this, "linePlot"), l(this, "retriever"), l(this, "writer"), this.schematic = new bm(e), this.linePlot = new Jp(e), this.retriever = new Qp(e), this.writer = new jm(e);
10522
+ c(this, "type", "workspace"), c(this, "schematic"), c(this, "linePlot"), c(this, "retriever"), c(this, "writer"), this.schematic = new bm(e), this.linePlot = new Jp(e), this.retriever = new Qp(e), this.writer = new jm(e);
10500
10523
  }
10501
10524
  async search(e) {
10502
10525
  return await this.retriever.search(e);
@@ -10559,16 +10582,16 @@ class Pm extends Ky {
10559
10582
  * the client from polling the cluster for connectivity information.
10560
10583
  */
10561
10584
  constructor(e) {
10562
- const r = Dm.parse(e), { host: n, port: i, username: a, password: o, connectivityPollFrequency: u, secure: c } = r, d = new Rp(new qd({ host: n, port: Number(i) }), c);
10585
+ const r = Dm.parse(e), { host: n, port: i, username: a, password: o, connectivityPollFrequency: l, secure: u } = r, d = new Rp(new qd({ host: n, port: Number(i) }), u);
10563
10586
  d.use(ef);
10564
10587
  let f;
10565
10588
  a != null && o != null && (f = new Iy(d.unary, { username: a, password: o }), d.use(f.middleware()));
10566
10589
  const h = new ks(
10567
10590
  new Is(d.unary)
10568
10591
  ), E = new Yo(d.unary, h);
10569
- super(d.stream, d.unary, h), l(this, "createdAt"), l(this, "props"), l(this, "ranges"), l(this, "channels"), l(this, "auth"), l(this, "user"), l(this, "access"), l(this, "connectivity"), l(this, "ontology"), l(this, "workspaces"), l(this, "labels"), l(this, "hardware"), l(this, "control"), l(this, "transport"), l(this, "clientVersion", "0.31.0"), this.createdAt = R.now(), this.props = r, this.auth = f, this.transport = d, this.channels = new _o(this, h, d.unary, E), this.connectivity = new Fo(
10592
+ super(d.stream, d.unary, h), c(this, "createdAt"), c(this, "props"), c(this, "ranges"), c(this, "channels"), c(this, "auth"), c(this, "user"), c(this, "access"), c(this, "connectivity"), c(this, "ontology"), c(this, "workspaces"), c(this, "labels"), c(this, "hardware"), c(this, "control"), c(this, "transport"), c(this, "clientVersion", "0.32.0"), this.createdAt = R.now(), this.props = r, this.auth = f, this.transport = d, this.channels = new _o(this, h, d.unary, E), this.connectivity = new Fo(
10570
10593
  d.unary,
10571
- u,
10594
+ l,
10572
10595
  this.clientVersion,
10573
10596
  r.name
10574
10597
  ), this.control = new Zo(this), this.ontology = new wf(d.unary, this);
@@ -10596,7 +10619,7 @@ class Pm extends Ky {
10596
10619
  this.connectivity.stopChecking();
10597
10620
  }
10598
10621
  }
10599
- l(Pm, "connectivity", Fo);
10622
+ c(Pm, "connectivity", Fo);
10600
10623
  const xb = nt.Authority, Ji = (t, e, r = "") => {
10601
10624
  try {
10602
10625
  return t.parse(e);
@@ -10681,37 +10704,37 @@ function qm(t) {
10681
10704
  prerelease: n[4]
10682
10705
  };
10683
10706
  if (i.prerelease != null)
10684
- return function(u) {
10685
- return u === t;
10707
+ return function(l) {
10708
+ return l === t;
10686
10709
  };
10687
- function a(u) {
10688
- return r.add(u), !1;
10710
+ function a(l) {
10711
+ return r.add(l), !1;
10689
10712
  }
10690
- function o(u) {
10691
- return e.add(u), !0;
10713
+ function o(l) {
10714
+ return e.add(l), !0;
10692
10715
  }
10693
- return function(u) {
10694
- if (e.has(u))
10716
+ return function(l) {
10717
+ if (e.has(l))
10695
10718
  return !0;
10696
- if (r.has(u))
10719
+ if (r.has(l))
10697
10720
  return !1;
10698
- var c = u.match(Hi);
10699
- if (!c)
10700
- return a(u);
10721
+ var u = l.match(Hi);
10722
+ if (!u)
10723
+ return a(l);
10701
10724
  var d = {
10702
- major: +c[1],
10703
- minor: +c[2],
10704
- patch: +c[3],
10705
- prerelease: c[4]
10725
+ major: +u[1],
10726
+ minor: +u[2],
10727
+ patch: +u[3],
10728
+ prerelease: u[4]
10706
10729
  };
10707
- return d.prerelease != null || i.major !== d.major ? a(u) : i.major === 0 ? i.minor === d.minor && i.patch <= d.patch ? o(u) : a(u) : i.minor <= d.minor ? o(u) : a(u);
10730
+ return d.prerelease != null || i.major !== d.major ? a(l) : i.major === 0 ? i.minor === d.minor && i.patch <= d.patch ? o(l) : a(l) : i.minor <= d.minor ? o(l) : a(l);
10708
10731
  };
10709
10732
  }
10710
- var zm = qm(Ke), Fm = Ke.split(".")[0], Vt = Symbol.for("opentelemetry.js.api." + Fm), Gt = Ym;
10733
+ var zm = qm(Ke), Fm = Ke.split(".")[0], Wt = Symbol.for("opentelemetry.js.api." + Fm), Gt = Ym;
10711
10734
  function Ys(t, e, r, n) {
10712
10735
  var i;
10713
10736
  n === void 0 && (n = !1);
10714
- var a = Gt[Vt] = (i = Gt[Vt]) !== null && i !== void 0 ? i : {
10737
+ var a = Gt[Wt] = (i = Gt[Wt]) !== null && i !== void 0 ? i : {
10715
10738
  version: Ke
10716
10739
  };
10717
10740
  if (!n && a[t]) {
@@ -10725,23 +10748,23 @@ function Ys(t, e, r, n) {
10725
10748
  return a[t] = e, r.debug("@opentelemetry/api: Registered a global for " + t + " v" + Ke + "."), !0;
10726
10749
  }
10727
10750
  function Zt(t) {
10728
- var e, r, n = (e = Gt[Vt]) === null || e === void 0 ? void 0 : e.version;
10751
+ var e, r, n = (e = Gt[Wt]) === null || e === void 0 ? void 0 : e.version;
10729
10752
  if (!(!n || !zm(n)))
10730
- return (r = Gt[Vt]) === null || r === void 0 ? void 0 : r[t];
10753
+ return (r = Gt[Wt]) === null || r === void 0 ? void 0 : r[t];
10731
10754
  }
10732
10755
  function qs(t, e) {
10733
10756
  e.debug("@opentelemetry/api: Unregistering a global for " + t + " v" + Ke + ".");
10734
- var r = Gt[Vt];
10757
+ var r = Gt[Wt];
10735
10758
  r && delete r[t];
10736
10759
  }
10737
- var Wm = function(t, e) {
10760
+ var Vm = function(t, e) {
10738
10761
  var r = typeof Symbol == "function" && t[Symbol.iterator];
10739
10762
  if (!r) return t;
10740
10763
  var n = r.call(t), i, a = [], o;
10741
10764
  try {
10742
10765
  for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
10743
- } catch (u) {
10744
- o = { error: u };
10766
+ } catch (l) {
10767
+ o = { error: l };
10745
10768
  } finally {
10746
10769
  try {
10747
10770
  i && !i.done && (r = n.return) && r.call(n);
@@ -10750,7 +10773,7 @@ var Wm = function(t, e) {
10750
10773
  }
10751
10774
  }
10752
10775
  return a;
10753
- }, Vm = function(t, e, r) {
10776
+ }, Wm = function(t, e, r) {
10754
10777
  if (arguments.length === 2) for (var n = 0, i = e.length, a; n < i; n++)
10755
10778
  (a || !(n in e)) && (a || (a = Array.prototype.slice.call(e, 0, n)), a[n] = e[n]);
10756
10779
  return t.concat(a || Array.prototype.slice.call(e));
@@ -10786,7 +10809,7 @@ var Wm = function(t, e) {
10786
10809
  function gt(t, e, r) {
10787
10810
  var n = Zt("diag");
10788
10811
  if (n)
10789
- return r.unshift(e), n[t].apply(n, Vm([], Wm(r), !1));
10812
+ return r.unshift(e), n[t].apply(n, Wm([], Vm(r), !1));
10790
10813
  }
10791
10814
  var pe;
10792
10815
  (function(t) {
@@ -10813,8 +10836,8 @@ var Km = function(t, e) {
10813
10836
  var n = r.call(t), i, a = [], o;
10814
10837
  try {
10815
10838
  for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
10816
- } catch (u) {
10817
- o = { error: u };
10839
+ } catch (l) {
10840
+ o = { error: l };
10818
10841
  } finally {
10819
10842
  try {
10820
10843
  i && !i.done && (r = n.return) && r.call(n);
@@ -10835,13 +10858,13 @@ var Km = function(t, e) {
10835
10858
  return function() {
10836
10859
  for (var a = [], o = 0; o < arguments.length; o++)
10837
10860
  a[o] = arguments[o];
10838
- var u = Zt("diag");
10839
- if (u)
10840
- return u[i].apply(u, Jm([], Km(a), !1));
10861
+ var l = Zt("diag");
10862
+ if (l)
10863
+ return l[i].apply(l, Jm([], Km(a), !1));
10841
10864
  };
10842
10865
  }
10843
10866
  var r = this, n = function(i, a) {
10844
- var o, u, c;
10867
+ var o, l, u;
10845
10868
  if (a === void 0 && (a = { logLevel: pe.INFO }), i === r) {
10846
10869
  var d = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
10847
10870
  return r.error((o = d.stack) !== null && o !== void 0 ? o : d.message), !1;
@@ -10849,9 +10872,9 @@ var Km = function(t, e) {
10849
10872
  typeof a == "number" && (a = {
10850
10873
  logLevel: a
10851
10874
  });
10852
- var f = Zt("diag"), h = Zm((u = a.logLevel) !== null && u !== void 0 ? u : pe.INFO, i);
10875
+ var f = Zt("diag"), h = Zm((l = a.logLevel) !== null && l !== void 0 ? l : pe.INFO, i);
10853
10876
  if (f && !a.suppressOverrideMessage) {
10854
- var E = (c = new Error().stack) !== null && c !== void 0 ? c : "<failed to generate stacktrace>";
10877
+ var E = (u = new Error().stack) !== null && u !== void 0 ? u : "<failed to generate stacktrace>";
10855
10878
  f.warn("Current logger will be overwritten from " + E), h.warn("Current logger will overwrite one already registered from " + E);
10856
10879
  }
10857
10880
  return Ys("diag", h, r, !0);
@@ -10872,8 +10895,8 @@ var Km = function(t, e) {
10872
10895
  var n = r.call(t), i, a = [], o;
10873
10896
  try {
10874
10897
  for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
10875
- } catch (u) {
10876
- o = { error: u };
10898
+ } catch (l) {
10899
+ o = { error: l };
10877
10900
  } finally {
10878
10901
  try {
10879
10902
  i && !i.done && (r = n.return) && r.call(n);
@@ -10917,15 +10940,15 @@ var Km = function(t, e) {
10917
10940
  n[i] = arguments[i];
10918
10941
  var a = new t(this._entries);
10919
10942
  try {
10920
- for (var o = Qm(n), u = o.next(); !u.done; u = o.next()) {
10921
- var c = u.value;
10922
- a._entries.delete(c);
10943
+ for (var o = Qm(n), l = o.next(); !l.done; l = o.next()) {
10944
+ var u = l.value;
10945
+ a._entries.delete(u);
10923
10946
  }
10924
10947
  } catch (d) {
10925
10948
  e = { error: d };
10926
10949
  } finally {
10927
10950
  try {
10928
- u && !u.done && (r = o.return) && r.call(o);
10951
+ l && !l.done && (r = o.return) && r.call(o);
10929
10952
  } finally {
10930
10953
  if (e) throw e.error;
10931
10954
  }
@@ -10978,8 +11001,8 @@ var nw = (
10978
11001
  var n = r.call(t), i, a = [], o;
10979
11002
  try {
10980
11003
  for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
10981
- } catch (u) {
10982
- o = { error: u };
11004
+ } catch (l) {
11005
+ o = { error: l };
10983
11006
  } finally {
10984
11007
  try {
10985
11008
  i && !i.done && (r = n.return) && r.call(n);
@@ -11017,8 +11040,8 @@ var nw = (
11017
11040
  var n = r.call(t), i, a = [], o;
11018
11041
  try {
11019
11042
  for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; ) a.push(i.value);
11020
- } catch (u) {
11021
- o = { error: u };
11043
+ } catch (l) {
11044
+ o = { error: l };
11022
11045
  } finally {
11023
11046
  try {
11024
11047
  i && !i.done && (r = n.return) && r.call(n);
@@ -11242,14 +11265,14 @@ var Ew = function(t, e, r, n) {
11242
11265
  });
11243
11266
  }
11244
11267
  return new (r || (r = Promise))(function(a, o) {
11245
- function u(f) {
11268
+ function l(f) {
11246
11269
  try {
11247
11270
  d(n.next(f));
11248
11271
  } catch (h) {
11249
11272
  o(h);
11250
11273
  }
11251
11274
  }
11252
- function c(f) {
11275
+ function u(f) {
11253
11276
  try {
11254
11277
  d(n.throw(f));
11255
11278
  } catch (h) {
@@ -11257,7 +11280,7 @@ var Ew = function(t, e, r, n) {
11257
11280
  }
11258
11281
  }
11259
11282
  function d(f) {
11260
- f.done ? a(f.value) : i(f.value).then(u, c);
11283
+ f.done ? a(f.value) : i(f.value).then(l, u);
11261
11284
  }
11262
11285
  d((n = n.apply(t, e || [])).next());
11263
11286
  });
@@ -11270,7 +11293,7 @@ class Iw {
11270
11293
  if (e <= 0)
11271
11294
  throw new Error(`invalid weight ${e}: must be positive`);
11272
11295
  return new Promise((n, i) => {
11273
- const a = { resolve: n, reject: i, weight: e, priority: r }, o = mc(this._queue, (u) => r <= u.priority);
11296
+ const a = { resolve: n, reject: i, weight: e, priority: r }, o = mc(this._queue, (l) => r <= l.priority);
11274
11297
  o === -1 && e <= this._value ? this._dispatchItem(a) : this._queue.splice(o + 1, 0, a);
11275
11298
  });
11276
11299
  }
@@ -11360,14 +11383,14 @@ var Aw = function(t, e, r, n) {
11360
11383
  });
11361
11384
  }
11362
11385
  return new (r || (r = Promise))(function(a, o) {
11363
- function u(f) {
11386
+ function l(f) {
11364
11387
  try {
11365
11388
  d(n.next(f));
11366
11389
  } catch (h) {
11367
11390
  o(h);
11368
11391
  }
11369
11392
  }
11370
- function c(f) {
11393
+ function u(f) {
11371
11394
  try {
11372
11395
  d(n.throw(f));
11373
11396
  } catch (h) {
@@ -11375,7 +11398,7 @@ var Aw = function(t, e, r, n) {
11375
11398
  }
11376
11399
  }
11377
11400
  function d(f) {
11378
- f.done ? a(f.value) : i(f.value).then(u, c);
11401
+ f.done ? a(f.value) : i(f.value).then(l, u);
11379
11402
  }
11380
11403
  d((n = n.apply(t, e || [])).next());
11381
11404
  });
@@ -11562,7 +11585,7 @@ class wc {
11562
11585
  this.validatePath(r);
11563
11586
  const a = Ji(this._schema, i, `${this.type}:${this.key}`);
11564
11587
  this._state != null ? this.instrumentation.L.debug("updating state", () => ({
11565
- diff: Wc.difference(this.state, a)
11588
+ diff: Vc.difference(this.state, a)
11566
11589
  })) : this.instrumentation.L.debug("setting initial state", { state: i }), this._prevState = this._state ?? a, this._state = a;
11567
11590
  } else
11568
11591
  this.instrumentation.L.debug("updating context");
@@ -11630,8 +11653,8 @@ class wn extends wc {
11630
11653
  const { variant: n, path: i } = r;
11631
11654
  if (n === "context")
11632
11655
  return this._ctx = r.ctx.copyAndMerge(this._ctx), await this.updateContext({ ...r, ctx: this.ctx });
11633
- const [a, o] = this.getRequiredKey(i), u = { ...r, ctx: this.ctx };
11634
- return o.length === 0 ? await this.updateThis(a, u) : await this.updateChild(o, u);
11656
+ const [a, o] = this.getRequiredKey(i), l = { ...r, ctx: this.ctx };
11657
+ return o.length === 0 ? await this.updateThis(a, l) : await this.updateChild(o, l);
11635
11658
  }
11636
11659
  async updateContext(r) {
11637
11660
  await super.internalUpdate(r);
@@ -11670,7 +11693,7 @@ class wn extends wc {
11670
11693
  );
11671
11694
  const o = this.children;
11672
11695
  this._children = /* @__PURE__ */ new Map();
11673
- for (const u of o) await u.internalDelete([u.key]);
11696
+ for (const l of o) await l.internalDelete([l.key]);
11674
11697
  await super.internalDelete([this.key]);
11675
11698
  }
11676
11699
  const a = this.getChild(i[0]);
@@ -11720,8 +11743,8 @@ const Cw = s.object({}), Ae = class Ae extends wn {
11720
11743
  U(this, "wrap");
11721
11744
  U(this, "schema", Ae.schema);
11722
11745
  U(this, "mu", new xw());
11723
- this.mu.runExclusive(async () => await this.internalUpdate(o)), this.wrap = r, this.wrap.handle((u) => {
11724
- this.mu.runExclusive(async () => await this.handle(u));
11746
+ this.mu.runExclusive(async () => await this.internalUpdate(o)), this.wrap = r, this.wrap.handle((l) => {
11747
+ this.mu.runExclusive(async () => await this.handle(l));
11725
11748
  });
11726
11749
  }
11727
11750
  async handle(r) {
@@ -11780,7 +11803,7 @@ const $b = (t) => t.get(bc), Rb = {
11780
11803
  variant: Mw,
11781
11804
  message: s.string(),
11782
11805
  description: s.string().optional(),
11783
- time: V.z,
11806
+ time: W.z,
11784
11807
  data: s.record(s.unknown()).optional()
11785
11808
  }), Pw = s.object({
11786
11809
  statuses: Dw.array()
@@ -11796,7 +11819,7 @@ class fs extends wn {
11796
11819
  add(r) {
11797
11820
  this.setState((n) => ({
11798
11821
  ...n,
11799
- statuses: [...n.statuses, { time: V.now(), key: Xc.id(), ...r }]
11822
+ statuses: [...n.statuses, { time: W.now(), key: Xc.id(), ...r }]
11800
11823
  }));
11801
11824
  }
11802
11825
  }
@@ -11814,32 +11837,32 @@ const jb = (t) => {
11814
11837
  export {
11815
11838
  Sw as $,
11816
11839
  ab as A,
11817
- gb as B,
11840
+ Oa as B,
11818
11841
  Dl as C,
11819
- Oa as D,
11820
- pc as E,
11842
+ pc as D,
11843
+ kb as E,
11821
11844
  Zw as F,
11822
- kb as G,
11823
- pb as H,
11824
- ve as I,
11825
- mb as J,
11826
- le as K,
11845
+ ve as G,
11846
+ yb as H,
11847
+ mb as I,
11848
+ le as J,
11849
+ sb as K,
11827
11850
  Ml as L,
11828
- sb as M,
11851
+ Xw as M,
11829
11852
  Hw as N,
11830
- Xw as O,
11853
+ sl as O,
11831
11854
  Hr as P,
11832
- sl as Q,
11855
+ gb as Q,
11833
11856
  Rb as R,
11834
- Wl as S,
11857
+ Vl as S,
11835
11858
  zt as T,
11836
- Dm as U,
11859
+ pb as U,
11837
11860
  jw as V,
11838
- yb as W,
11861
+ Dm as W,
11839
11862
  wn as X,
11840
11863
  Q as Y,
11841
11864
  eb as Z,
11842
- Wc as _,
11865
+ Vc as _,
11843
11866
  zl as a,
11844
11867
  ps as a0,
11845
11868
  ce as a1,
@@ -11876,8 +11899,8 @@ export {
11876
11899
  Rl as j,
11877
11900
  Dw as k,
11878
11901
  cb as l,
11879
- V as m,
11880
- Vs as n,
11902
+ W as m,
11903
+ Ws as n,
11881
11904
  Pm as o,
11882
11905
  A as p,
11883
11906
  M as q,