@synnaxlabs/client 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -101,7 +101,7 @@ var nn = {}, Ze = {};
101
101
  });
102
102
  };
103
103
  })(Ze);
104
- var Di = ee && ee.__spreadArrays || function() {
104
+ var Pi = ee && ee.__spreadArrays || function() {
105
105
  for (var r = 0, e = 0, t = arguments.length; e < t; e++)
106
106
  r += arguments[e].length;
107
107
  for (var n = Array(r), a = 0, e = 0; e < t; e++)
@@ -118,7 +118,7 @@ function Tt(r, e) {
118
118
  var t = {};
119
119
  return Object.keys(r).forEach(function(n) {
120
120
  var a = r[n], i = n.toLowerCase();
121
- e.recursive && (ue.isValidObject(a) ? ue.belongToTypes(a, e.keepTypesOnRecursion) || (a = Tt(a, e)) : e.recursiveInArray && ue.isArrayObject(a) && (a = Di(a).map(function(o) {
121
+ e.recursive && (ue.isValidObject(a) ? ue.belongToTypes(a, e.keepTypesOnRecursion) || (a = Tt(a, e)) : e.recursiveInArray && ue.isArrayObject(a) && (a = Pi(a).map(function(o) {
122
122
  var l = o;
123
123
  if (ue.isValidObject(o))
124
124
  ue.belongToTypes(l, e.keepTypesOnRecursion) || (l = Tt(o, e));
@@ -131,7 +131,7 @@ function Tt(r, e) {
131
131
  }), t;
132
132
  }
133
133
  nn.default = Tt;
134
- var sn = {}, Pi = ee && ee.__spreadArrays || function() {
134
+ var sn = {}, Di = ee && ee.__spreadArrays || function() {
135
135
  for (var r = 0, e = 0, t = arguments.length; e < t; e++)
136
136
  r += arguments[e].length;
137
137
  for (var n = Array(r), a = 0, e = 0; e < t; e++)
@@ -148,7 +148,7 @@ function Et(r, e) {
148
148
  var t = {};
149
149
  return Object.keys(r).forEach(function(n) {
150
150
  var a = r[n], i = n.toUpperCase();
151
- e.recursive && (he.isValidObject(a) ? he.belongToTypes(a, e.keepTypesOnRecursion) || (a = Et(a, e)) : e.recursiveInArray && he.isArrayObject(a) && (a = Pi(a).map(function(o) {
151
+ e.recursive && (he.isValidObject(a) ? he.belongToTypes(a, e.keepTypesOnRecursion) || (a = Et(a, e)) : e.recursiveInArray && he.isArrayObject(a) && (a = Di(a).map(function(o) {
152
152
  var l = o;
153
153
  if (he.isValidObject(o))
154
154
  he.belongToTypes(l, e.keepTypesOnRecursion) || (l = Et(o, e));
@@ -380,15 +380,15 @@ const Hi = ["start", "center", "end"], Xi = ["signedWidth", "signedHeight"];
380
380
  s.enum(Xi);
381
381
  const Ut = s.object({ x: s.number(), y: s.number() }), Qi = s.object({ clientX: s.number(), clientY: s.number() }), eo = ["x", "y"], Cs = s.enum(eo), Rs = ["top", "right", "bottom", "left"];
382
382
  s.enum(Rs);
383
- const to = ["left", "right"], js = s.enum(to), ro = ["top", "bottom"], xs = s.enum(ro), Ds = ["center"], Mn = s.enum(Ds), no = [...Rs, ...Ds], Ps = s.enum(no);
383
+ const to = ["left", "right"], js = s.enum(to), ro = ["top", "bottom"], xs = s.enum(ro), Ps = ["center"], Mn = s.enum(Ps), no = [...Rs, ...Ps], Ds = s.enum(no);
384
384
  s.enum(Hi);
385
385
  const so = ["first", "last"];
386
386
  s.enum(so);
387
387
  const ao = s.object({ lower: s.number(), upper: s.number() }), io = s.object({ lower: s.bigint(), upper: s.bigint() });
388
388
  s.union([ao, Jt]);
389
389
  s.union([io, Jt]);
390
- s.union([Cs, Ps]);
391
- s.union([Cs, Ps, s.instanceof(String)]);
390
+ s.union([Cs, Ds]);
391
+ s.union([Cs, Ds, s.instanceof(String)]);
392
392
  const st = (r, e) => {
393
393
  const t = {};
394
394
  if (typeof r == "number" || typeof r == "bigint")
@@ -987,9 +987,9 @@ const C = class I {
987
987
  );
988
988
  }
989
989
  toString() {
990
- const e = this.truncate(I.DAY), t = this.truncate(I.HOUR), n = this.truncate(I.MINUTE), a = this.truncate(I.SECOND), i = this.truncate(I.MILLISECOND), o = this.truncate(I.MICROSECOND), l = this.truncate(I.NANOSECOND), u = e, p = t.sub(e), g = n.sub(t), y = a.sub(n), U = i.sub(a), D = o.sub(i), Q = l.sub(o);
991
- let P = "";
992
- return u.isZero || (P += `${u.days}d `), p.isZero || (P += `${p.hours}h `), g.isZero || (P += `${g.minutes}m `), y.isZero || (P += `${y.seconds}s `), U.isZero || (P += `${U.milliseconds}ms `), D.isZero || (P += `${D.microseconds}µs `), Q.isZero || (P += `${Q.nanoseconds}ns`), P.trim();
990
+ const e = this.truncate(I.DAY), t = this.truncate(I.HOUR), n = this.truncate(I.MINUTE), a = this.truncate(I.SECOND), i = this.truncate(I.MILLISECOND), o = this.truncate(I.MICROSECOND), l = this.truncate(I.NANOSECOND), u = e, p = t.sub(e), g = n.sub(t), y = a.sub(n), U = i.sub(a), P = o.sub(i), Q = l.sub(o);
991
+ let D = "";
992
+ return u.isZero || (D += `${u.days}d `), p.isZero || (D += `${p.hours}h `), g.isZero || (D += `${g.minutes}m `), y.isZero || (D += `${y.seconds}s `), U.isZero || (D += `${U.milliseconds}ms `), P.isZero || (D += `${P.microseconds}µs `), Q.isZero || (D += `${Q.nanoseconds}ns`), D.trim();
993
993
  }
994
994
  /** @returns the decimal number of days in the timespan */
995
995
  get days() {
@@ -1670,10 +1670,10 @@ class G {
1670
1670
  else {
1671
1671
  let y = p ? [u] : u;
1672
1672
  const U = y[0];
1673
- (U instanceof S || U instanceof Date || U instanceof A) && (y = y.map((D) => new S(D).valueOf())), this.dataType.equals(N.STRING) ? (this._cachedLength = y.length, this._data = new TextEncoder().encode(y.join(`
1673
+ (U instanceof S || U instanceof Date || U instanceof A) && (y = y.map((P) => new S(P).valueOf())), this.dataType.equals(N.STRING) ? (this._cachedLength = y.length, this._data = new TextEncoder().encode(y.join(`
1674
1674
  `) + `
1675
1675
  `)) : this.dataType.equals(N.JSON) ? (this._cachedLength = y.length, this._data = new TextEncoder().encode(
1676
- y.map((D) => JSON.stringify(D)).join(`
1676
+ y.map((P) => JSON.stringify(P)).join(`
1677
1677
  `) + `
1678
1678
  `
1679
1679
  )) : this._data = new this.dataType.Array(y).buffer;
@@ -2186,12 +2186,12 @@ const E = (r) => Array.isArray(r) ? r : [r], Ce = s.number(), yt = s.object({
2186
2186
  isIndex: s.boolean().optional(),
2187
2187
  internal: s.boolean().optional().default(!1),
2188
2188
  virtual: s.boolean().optional().default(!1)
2189
- }), Do = (r, e) => {
2189
+ }), Po = (r, e) => {
2190
2190
  let t = null;
2191
2191
  return e === 0 ? r : (...n) => {
2192
2192
  t !== null && (clearTimeout(t), t = null), t = setTimeout(() => r(...n), e);
2193
2193
  };
2194
- }, Po = new Error("request for lock canceled");
2194
+ }, Do = new Error("request for lock canceled");
2195
2195
  var Zo = function(r, e, t, n) {
2196
2196
  function a(i) {
2197
2197
  return i instanceof t ? i : new t(function(o) {
@@ -2220,7 +2220,7 @@ var Zo = function(r, e, t, n) {
2220
2220
  });
2221
2221
  };
2222
2222
  class Mo {
2223
- constructor(e, t = Po) {
2223
+ constructor(e, t = Do) {
2224
2224
  this._value = e, this._cancelError = t, this._queue = [], this._weightedWaiters = [];
2225
2225
  }
2226
2226
  acquire(e = 1, t = 0) {
@@ -2592,26 +2592,26 @@ var On = {}, sc = te && te.__spreadArrays || function() {
2592
2592
  };
2593
2593
  Object.defineProperty(On, "__esModule", { value: !0 });
2594
2594
  var be = Me, ac = Xt;
2595
- function Dt(r, e) {
2595
+ function Pt(r, e) {
2596
2596
  if (e === void 0 && (e = be.DefaultOption), !be.isValidObject(r))
2597
2597
  return null;
2598
2598
  e = be.validateOptions(e);
2599
2599
  var t = {};
2600
2600
  return Object.keys(r).forEach(function(n) {
2601
2601
  var a = r[n], i = ac.default(n);
2602
- e.recursive && (be.isValidObject(a) ? be.belongToTypes(a, e.keepTypesOnRecursion) || (a = Dt(a, e)) : e.recursiveInArray && be.isArrayObject(a) && (a = sc(a).map(function(o) {
2602
+ e.recursive && (be.isValidObject(a) ? be.belongToTypes(a, e.keepTypesOnRecursion) || (a = Pt(a, e)) : e.recursiveInArray && be.isArrayObject(a) && (a = sc(a).map(function(o) {
2603
2603
  var l = o;
2604
2604
  if (be.isValidObject(o))
2605
- be.belongToTypes(l, e.keepTypesOnRecursion) || (l = Dt(o, e));
2605
+ be.belongToTypes(l, e.keepTypesOnRecursion) || (l = Pt(o, e));
2606
2606
  else if (be.isArrayObject(o)) {
2607
- var u = Dt({ key: o }, e);
2607
+ var u = Pt({ key: o }, e);
2608
2608
  l = u.key;
2609
2609
  }
2610
2610
  return l;
2611
2611
  }))), t[i] = a;
2612
2612
  }), t;
2613
2613
  }
2614
- On.default = Dt;
2614
+ On.default = Pt;
2615
2615
  var Tn = {}, ic = te && te.__spreadArrays || function() {
2616
2616
  for (var r = 0, e = 0, t = arguments.length; e < t; e++)
2617
2617
  r += arguments[e].length;
@@ -2622,26 +2622,26 @@ var Tn = {}, ic = te && te.__spreadArrays || function() {
2622
2622
  };
2623
2623
  Object.defineProperty(Tn, "__esModule", { value: !0 });
2624
2624
  var Oe = Me, oc = Qt;
2625
- function Pt(r, e) {
2625
+ function Dt(r, e) {
2626
2626
  if (e === void 0 && (e = Oe.DefaultOption), !Oe.isValidObject(r))
2627
2627
  return null;
2628
2628
  e = Oe.validateOptions(e);
2629
2629
  var t = {};
2630
2630
  return Object.keys(r).forEach(function(n) {
2631
2631
  var a = r[n], i = oc.default(n);
2632
- e.recursive && (Oe.isValidObject(a) ? Oe.belongToTypes(a, e.keepTypesOnRecursion) || (a = Pt(a, e)) : e.recursiveInArray && Oe.isArrayObject(a) && (a = ic(a).map(function(o) {
2632
+ e.recursive && (Oe.isValidObject(a) ? Oe.belongToTypes(a, e.keepTypesOnRecursion) || (a = Dt(a, e)) : e.recursiveInArray && Oe.isArrayObject(a) && (a = ic(a).map(function(o) {
2633
2633
  var l = o;
2634
2634
  if (Oe.isValidObject(o))
2635
- Oe.belongToTypes(l, e.keepTypesOnRecursion) || (l = Pt(o, e));
2635
+ Oe.belongToTypes(l, e.keepTypesOnRecursion) || (l = Dt(o, e));
2636
2636
  else if (Oe.isArrayObject(o)) {
2637
- var u = Pt({ key: o }, e);
2637
+ var u = Dt({ key: o }, e);
2638
2638
  l = u.key;
2639
2639
  }
2640
2640
  return l;
2641
2641
  }))), t[i] = a;
2642
2642
  }), t;
2643
2643
  }
2644
- Tn.default = Pt;
2644
+ Tn.default = Dt;
2645
2645
  Object.defineProperty(T, "__esModule", { value: !0 });
2646
2646
  T.kebabKeys = T.pascalKeys = T.snakeKeys = T.camelKeys = T.upperKeys = T.lowerKeys = T.toLowerCase = T.toUpperCase = T.toKebabCase = T.toHeaderCase = T.toSentenceCase = T.toTextCase = T.toPathCase = T.toDotCase = T.toPascalCase = T.toSnakeCase = T.toCamelCase = void 0;
2647
2647
  var qs = Gt;
@@ -2824,9 +2824,9 @@ const En = (r, e, t = 0, n = 0, a) => {
2824
2824
  return { lower: e.one.y, upper: e.two.y };
2825
2825
  }, Rc = (r) => typeof r != "object" || r == null ? !1 : "one" in r && "two" in r && "root" in r;
2826
2826
  var jc = Object.defineProperty, xc = (r, e, t) => e in r ? jc(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ne = (r, e, t) => (xc(r, typeof e != "symbol" ? e + "" : e, t), t);
2827
- const Dc = (r, e, t) => (e != null && (r = Math.max(r, e)), t != null && (r = Math.min(r, t)), r);
2827
+ const Pc = (r, e, t) => (e != null && (r = Math.max(r, e)), t != null && (r = Math.min(r, t)), r);
2828
2828
  s.object({ offset: Wn, scale: Wn });
2829
- const Pc = (r) => (e, t, n, a) => t === "dimension" ? [e, n] : [e, a ? n - r : n + r], Zc = (r) => (e, t, n, a) => [e, a ? n / r : n * r], Mc = (r) => (e, t, n) => {
2829
+ const Dc = (r) => (e, t, n, a) => t === "dimension" ? [e, n] : [e, a ? n - r : n + r], Zc = (r) => (e, t, n, a) => [e, a ? n / r : n * r], Mc = (r) => (e, t, n) => {
2830
2830
  if (e === null)
2831
2831
  return [r, n];
2832
2832
  const { lower: a, upper: i } = e, { lower: o, upper: l } = r, u = i - a, p = l - o;
@@ -2843,7 +2843,7 @@ const Pc = (r) => (e, t, n, a) => t === "dimension" ? [e, n] : [e, a ? n - r : n
2843
2843
  return [r, a - (t - n)];
2844
2844
  }, Lc = (r) => (e, t, n) => {
2845
2845
  const { lower: a, upper: i } = r;
2846
- return n = Dc(n, a, i), [e, n];
2846
+ return n = Pc(n, a, i), [e, n];
2847
2847
  }, Mr = class tt {
2848
2848
  constructor() {
2849
2849
  Ne(this, "ops", []), Ne(this, "currBounds", null), Ne(this, "currType", null), Ne(this, "reversed", !1), this.ops = [];
@@ -2858,7 +2858,7 @@ const Pc = (r) => (e, t, n, a) => t === "dimension" ? [e, n] : [e, a ? n - r : n
2858
2858
  return new tt().scale(e, t);
2859
2859
  }
2860
2860
  translate(e) {
2861
- const t = this.new(), n = Pc(e);
2861
+ const t = this.new(), n = Dc(e);
2862
2862
  return n.type = "translate", t.ops.push(n), t;
2863
2863
  }
2864
2864
  magnify(e) {
@@ -3369,9 +3369,9 @@ const j = class k {
3369
3369
  );
3370
3370
  }
3371
3371
  toString() {
3372
- const e = this.truncate(k.DAY), t = this.truncate(k.HOUR), n = this.truncate(k.MINUTE), a = this.truncate(k.SECOND), i = this.truncate(k.MILLISECOND), o = this.truncate(k.MICROSECOND), l = this.truncate(k.NANOSECOND), u = e, p = t.sub(e), g = n.sub(t), y = a.sub(n), U = i.sub(a), D = o.sub(i), Q = l.sub(o);
3373
- let P = "";
3374
- return u.isZero || (P += `${u.days}d `), p.isZero || (P += `${p.hours}h `), g.isZero || (P += `${g.minutes}m `), y.isZero || (P += `${y.seconds}s `), U.isZero || (P += `${U.milliseconds}ms `), D.isZero || (P += `${D.microseconds}µs `), Q.isZero || (P += `${Q.nanoseconds}ns`), P.trim();
3372
+ const e = this.truncate(k.DAY), t = this.truncate(k.HOUR), n = this.truncate(k.MINUTE), a = this.truncate(k.SECOND), i = this.truncate(k.MILLISECOND), o = this.truncate(k.MICROSECOND), l = this.truncate(k.NANOSECOND), u = e, p = t.sub(e), g = n.sub(t), y = a.sub(n), U = i.sub(a), P = o.sub(i), Q = l.sub(o);
3373
+ let D = "";
3374
+ return u.isZero || (D += `${u.days}d `), p.isZero || (D += `${p.hours}h `), g.isZero || (D += `${g.minutes}m `), y.isZero || (D += `${y.seconds}s `), U.isZero || (D += `${U.milliseconds}ms `), P.isZero || (D += `${P.microseconds}µs `), Q.isZero || (D += `${Q.nanoseconds}ns`), D.trim();
3375
3375
  }
3376
3376
  /** @returns the decimal number of days in the timespan */
3377
3377
  get days() {
@@ -4113,12 +4113,12 @@ class Ae extends tr {
4113
4113
  }
4114
4114
  }
4115
4115
  x(Ae, "TYPE", nr + "eof");
4116
- class Pe extends tr {
4116
+ class De extends tr {
4117
4117
  constructor() {
4118
4118
  super("StreamClosed", rr);
4119
4119
  }
4120
4120
  }
4121
- x(Pe, "TYPE", nr + "stream_closed");
4121
+ x(De, "TYPE", nr + "stream_closed");
4122
4122
  class ke extends tr {
4123
4123
  constructor(e = {}) {
4124
4124
  const { message: t = "Unreachable", url: n = tl.UNKNOWN } = e;
@@ -4131,8 +4131,8 @@ const ol = (r) => {
4131
4131
  return null;
4132
4132
  if (r instanceof Ae)
4133
4133
  return { type: Ae.TYPE, data: "EOF" };
4134
- if (r instanceof Pe)
4135
- return { type: Pe.TYPE, data: "StreamClosed" };
4134
+ if (r instanceof De)
4135
+ return { type: De.TYPE, data: "StreamClosed" };
4136
4136
  if (r instanceof ke)
4137
4137
  return { type: ke.TYPE, data: "Unreachable" };
4138
4138
  throw new Error(`Unknown error type: ${r.type}: ${r.message}`);
@@ -4142,8 +4142,8 @@ const ol = (r) => {
4142
4142
  switch (r.type) {
4143
4143
  case Ae.TYPE:
4144
4144
  return new Ae();
4145
- case Pe.TYPE:
4146
- return new Pe();
4145
+ case De.TYPE:
4146
+ return new De();
4147
4147
  case ke.TYPE:
4148
4148
  return new ke();
4149
4149
  default:
@@ -4223,8 +4223,8 @@ class ll extends Ta {
4223
4223
  let y;
4224
4224
  try {
4225
4225
  y = await Hn(p.protocol)(p.target, l);
4226
- } catch (D) {
4227
- let Q = D;
4226
+ } catch (P) {
4227
+ let Q = P;
4228
4228
  return Q.message === "Load failed" && (Q = new ke({ url: o })), [g, Q];
4229
4229
  }
4230
4230
  const U = await y.arrayBuffer();
@@ -4233,13 +4233,13 @@ class ll extends Ta {
4233
4233
  try {
4234
4234
  if (y.status !== 400)
4235
4235
  return [g, new Error(y.statusText)];
4236
- const D = this.encoder.decode(U, pt), Q = Sn(D);
4236
+ const P = this.encoder.decode(U, pt), Q = Sn(P);
4237
4237
  return [g, Q];
4238
- } catch (D) {
4238
+ } catch (P) {
4239
4239
  return [
4240
4240
  g,
4241
4241
  new Error(
4242
- `[freighter] - failed to decode error: ${y.statusText}: ${D.message}`
4242
+ `[freighter] - failed to decode error: ${y.statusText}: ${P.message}`
4243
4243
  )
4244
4244
  ];
4245
4245
  }
@@ -4267,7 +4267,7 @@ class fl {
4267
4267
  if (this.serverClosed != null)
4268
4268
  return new Ae();
4269
4269
  if (this.sendClosed)
4270
- throw new Pe();
4270
+ throw new De();
4271
4271
  return this.ws.send(this.encoder.encode({ type: "data", payload: e })), null;
4272
4272
  }
4273
4273
  /** Implements the Stream protocol */
@@ -4309,7 +4309,7 @@ class fl {
4309
4309
  listenForMessages() {
4310
4310
  this.ws.onmessage = (e) => this.addMessage(this.encoder.decode(e.data, hl)), this.ws.onclose = (e) => this.addMessage({
4311
4311
  type: "close",
4312
- error: { type: ml(e) ? Ae.TYPE : Pe.TYPE, data: "" }
4312
+ error: { type: ml(e) ? Ae.TYPE : De.TYPE, data: "" }
4313
4313
  });
4314
4314
  }
4315
4315
  }
@@ -4416,7 +4416,7 @@ c(ut, "TYPE", _e + "control");
4416
4416
  class qr extends ut {
4417
4417
  }
4418
4418
  c(qr, "TYPE", ut.TYPE + ".unauthorized");
4419
- class Td extends Error {
4419
+ class Ed extends Error {
4420
4420
  }
4421
4421
  const vl = (r) => {
4422
4422
  if (!r.type.startsWith(_e))
@@ -4513,7 +4513,7 @@ const Cl = ["MacOS", "Windows", "Linux", "Docker"];
4513
4513
  s.enum(Cl);
4514
4514
  const Xn = (r) => [...new Set(r)];
4515
4515
  var Rl = Object.defineProperty, jl = (r, e, t) => e in r ? Rl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, nt = (r, e, t) => (jl(r, typeof e != "symbol" ? e + "" : e, t), t);
4516
- const xl = (...r) => r.map($a).join(""), $a = (r) => (r.endsWith("/") || (r += "/"), r.startsWith("/") && (r = r.slice(1)), r), Dl = (r) => r.endsWith("/") ? r.slice(0, -1) : r, Kr = class Vr {
4516
+ const xl = (...r) => r.map($a).join(""), $a = (r) => (r.endsWith("/") || (r += "/"), r.startsWith("/") && (r = r.slice(1)), r), Pl = (r) => r.endsWith("/") ? r.slice(0, -1) : r, Kr = class Vr {
4517
4517
  /**
4518
4518
  * @param host - The hostname or IP address of the server.
4519
4519
  * @param port - The port number of the server.
@@ -4549,13 +4549,13 @@ const xl = (...r) => r.map($a).join(""), $a = (r) => (r.endsWith("/") || (r += "
4549
4549
  }
4550
4550
  /** @returns a string representation of the url */
4551
4551
  toString() {
4552
- return Dl(
4552
+ return Pl(
4553
4553
  `${this.protocol}://${this.host}:${this.port}/${this.path}`
4554
4554
  );
4555
4555
  }
4556
4556
  };
4557
4557
  nt(Kr, "UNKNOWN", new Kr({ host: "unknown", port: 0 }));
4558
- let Pl = Kr;
4558
+ let Dl = Kr;
4559
4559
  var Zl = Object.defineProperty, Ml = (r, e, t) => e in r ? Zl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Sr = (r, e, t) => (Ml(r, typeof e != "symbol" ? e + "" : e, t), t);
4560
4560
  const xe = class extends Number {
4561
4561
  };
@@ -4696,7 +4696,7 @@ class ja {
4696
4696
  c(this, "requests", /* @__PURE__ */ new Map());
4697
4697
  c(this, "wrapped");
4698
4698
  c(this, "debouncedRun");
4699
- this.wrapped = e, this.debouncedRun = Do(() => {
4699
+ this.wrapped = e, this.debouncedRun = Po(() => {
4700
4700
  this.run();
4701
4701
  }, t);
4702
4702
  }
@@ -4739,7 +4739,7 @@ const xa = async (r, e) => {
4739
4739
  throw new re(`Could not find channels: ${JSON.stringify(a)}`);
4740
4740
  return n;
4741
4741
  };
4742
- class Da {
4742
+ class Pa {
4743
4743
  constructor({
4744
4744
  dataType: e,
4745
4745
  rate: t,
@@ -4840,7 +4840,7 @@ class Da {
4840
4840
  return await this.framer.write(e, this.key, t);
4841
4841
  }
4842
4842
  }
4843
- let Pa = class {
4843
+ let Da = class {
4844
4844
  constructor(e, t, n, a) {
4845
4845
  c(this, "type", "channel");
4846
4846
  c(this, "frameClient");
@@ -4901,7 +4901,7 @@ let Pa = class {
4901
4901
  }
4902
4902
  sugar(e) {
4903
4903
  const { frameClient: t } = this;
4904
- return e.map((n) => new Da({ ...n, frameClient: t }));
4904
+ return e.map((n) => new Pa({ ...n, frameClient: t }));
4905
4905
  }
4906
4906
  };
4907
4907
  const ql = s.object({ channels: Bs.array() }), Yl = s.object({ channels: yt.array() }), Wl = s.object({
@@ -4944,11 +4944,11 @@ let Za = class {
4944
4944
  );
4945
4945
  }
4946
4946
  };
4947
- const kd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4947
+ const $d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4948
4948
  __proto__: null,
4949
4949
  CacheRetriever: An,
4950
- Channel: Da,
4951
- Client: Pa,
4950
+ Channel: Pa,
4951
+ Client: Da,
4952
4952
  ClusterRetriever: ht,
4953
4953
  DebouncedBatchRetriever: ja,
4954
4954
  Writer: Za,
@@ -5068,7 +5068,7 @@ const nu = ["disconnected", "connecting", "connected", "failed"], Ma = s.enum(nu
5068
5068
  };
5069
5069
  c(Le, "ENDPOINT", "/connectivity/check"), c(Le, "DEFAULT", es), c(Le, "connectionStateZ", _a);
5070
5070
  let ft = Le;
5071
- const Cd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5071
+ const Rd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5072
5072
  __proto__: null,
5073
5073
  Checker: ft,
5074
5074
  state: _a,
@@ -5735,8 +5735,8 @@ const hu = new A(-1), fu = s.object({
5735
5735
  command: s.nativeEnum(Cn),
5736
5736
  error: pt.optional().nullable()
5737
5737
  });
5738
- var De;
5739
- let qa = (De = class {
5738
+ var Pe;
5739
+ let qa = (Pe = class {
5740
5740
  constructor(e, t) {
5741
5741
  c(this, "stream");
5742
5742
  c(this, "adapter");
@@ -5752,8 +5752,8 @@ let qa = (De = class {
5752
5752
  enableAutoCommit: p = !1,
5753
5753
  autoIndexPersistInterval: g = A.SECOND
5754
5754
  }) {
5755
- const y = await In.open(e, n), U = await t.stream(De.ENDPOINT, du, yu), D = new De(U, y);
5756
- return await D.execute({
5755
+ const y = await In.open(e, n), U = await t.stream(Pe.ENDPOINT, du, yu), P = new Pe(U, y);
5756
+ return await P.execute({
5757
5757
  command: 0,
5758
5758
  config: {
5759
5759
  start: new S(a),
@@ -5765,7 +5765,7 @@ let qa = (De = class {
5765
5765
  enableAutoCommit: p,
5766
5766
  autoIndexPersistInterval: g
5767
5767
  }
5768
- }), D;
5768
+ }), P;
5769
5769
  }
5770
5770
  /**
5771
5771
  * Writes the given frame to the database.
@@ -5842,7 +5842,7 @@ let qa = (De = class {
5842
5842
  get errorAccumulated() {
5843
5843
  return this.stream.received();
5844
5844
  }
5845
- }, c(De, "ENDPOINT", "/frame/write"), De);
5845
+ }, c(Pe, "ENDPOINT", "/frame/write"), Pe);
5846
5846
  const pu = s.object({
5847
5847
  keys: Ce.array().optional(),
5848
5848
  names: s.string().array().optional(),
@@ -5953,7 +5953,7 @@ let Ya = class {
5953
5953
  return a === "keys" ? await this.deleter.delete({ keys: n, bounds: t }) : await this.deleter.delete({ names: n, bounds: t });
5954
5954
  }
5955
5955
  };
5956
- const jd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5956
+ const xd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5957
5957
  __proto__: null,
5958
5958
  ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT: hu,
5959
5959
  AUTO_SPAN: Fr,
@@ -6019,7 +6019,7 @@ let Va = class {
6019
6019
  this.tasks = e, this.racks = t, this.devices = n;
6020
6020
  }
6021
6021
  };
6022
- const Zd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6022
+ const Md = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6023
6023
  __proto__: null,
6024
6024
  Client: Va
6025
6025
  }, Symbol.toStringTag, { value: "Module" })), Fe = s.number(), ur = s.object({
@@ -6130,7 +6130,7 @@ const gt = async (r, e, t, n) => {
6130
6130
  return t != null && l.push(...o.get(t).series.flatMap((u) => n("delete", u))), e != null && l.push(...o.get(e).series.flatMap((u) => n("set", u))), [l, l.length > 0];
6131
6131
  };
6132
6132
  return new lr(a, i);
6133
- }, _d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6133
+ }, Ud = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6134
6134
  __proto__: null,
6135
6135
  openObservable: gt
6136
6136
  }, Symbol.toStringTag, { value: "Module" })), $u = "sy_device_set", Cu = "sy_device_delete", kr = "/hardware/device/retrieve", Ru = "/hardware/device/create", ju = "/hardware/device/delete", hr = s.string(), mt = s.object({
@@ -6146,7 +6146,7 @@ const gt = async (r, e, t, n) => {
6146
6146
  )
6147
6147
  }), Ha = mt.extend({
6148
6148
  properties: s.unknown().transform((r) => Ke.JSON_ECD.encodeString(r))
6149
- }), xu = s.object({ devices: Ha.array() }), Du = s.object({ devices: mt.array() }), Pu = s.object({ keys: hr.array() }), Zu = s.object({}), $r = s.object({
6149
+ }), xu = s.object({ devices: Ha.array() }), Pu = s.object({ devices: mt.array() }), Du = s.object({ keys: hr.array() }), Zu = s.object({}), $r = s.object({
6150
6150
  search: s.string().optional(),
6151
6151
  limit: s.number().optional(),
6152
6152
  offset: s.number().optional(),
@@ -6195,7 +6195,7 @@ let Xa = class {
6195
6195
  Ru,
6196
6196
  { devices: E(e) },
6197
6197
  xu,
6198
- Du
6198
+ Pu
6199
6199
  );
6200
6200
  return t ? n.devices[0] : n.devices;
6201
6201
  }
@@ -6204,7 +6204,7 @@ let Xa = class {
6204
6204
  this.client,
6205
6205
  ju,
6206
6206
  { keys: E(e) },
6207
- Pu,
6207
+ Du,
6208
6208
  Zu
6209
6209
  );
6210
6210
  }
@@ -6225,13 +6225,13 @@ let Xa = class {
6225
6225
  };
6226
6226
  }
6227
6227
  };
6228
- const Mu = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(mt).map((t) => ({ variant: r, key: t.key, value: t })), Ld = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6228
+ const Mu = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(mt).map((t) => ({ variant: r, key: t.key, value: t })), Bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6229
6229
  __proto__: null,
6230
6230
  Client: Xa,
6231
6231
  deviceKeyZ: hr,
6232
6232
  deviceZ: mt,
6233
6233
  newDeviceZ: Ha
6234
- }, Symbol.toStringTag, { value: "Module" })), Bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6234
+ }, Symbol.toStringTag, { value: "Module" })), zd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6235
6235
  __proto__: null,
6236
6236
  Client: Ja,
6237
6237
  Rack: Ga,
@@ -6239,26 +6239,10 @@ const Mu = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, ke
6239
6239
  rackKeyZ: Fe,
6240
6240
  rackZ: ur
6241
6241
  }, Symbol.toStringTag, { value: "Module" }));
6242
- if (process.env.NODE_ENV !== "production") {
6243
- if (typeof navigator < "u" && navigator.product === "ReactNative" && !self.crypto)
6244
- throw new Error(
6245
- "React Native does not have a built-in secure random generator. If you don’t need unpredictable IDs, you can use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID."
6246
- );
6247
- if (typeof self < "u" && self.msCrypto && !self.crypto)
6248
- throw new Error(
6249
- "Add self.crypto = self.msCrypto before Nano ID to fix IE 11 support"
6250
- );
6251
- if (typeof self > "u" || !self.crypto)
6252
- throw new Error(
6253
- "Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure."
6254
- );
6255
- }
6256
- let _u = (r = 21) => {
6257
- let e = "", t = crypto.getRandomValues(new Uint8Array(r));
6258
- for (; r--; ) {
6259
- let n = t[r] & 63;
6260
- n < 36 ? e += n.toString(36) : n < 62 ? e += (n - 26).toString(36).toUpperCase() : n < 63 ? e += "_" : e += "-";
6261
- }
6242
+ let _u = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", Uu = (r = 21) => {
6243
+ let e = "", t = r;
6244
+ for (; t--; )
6245
+ e += _u[Math.random() * 64 | 0];
6262
6246
  return e;
6263
6247
  };
6264
6248
  const Rr = "sy_task_state", ns = "sy_task_cmd", Je = s.union([
@@ -6283,7 +6267,7 @@ const Rr = "sy_task_state", ns = "sy_task_cmd", Je = s.union([
6283
6267
  }), Qa = fr.omit({ key: !0 }).extend({
6284
6268
  key: Je.transform((r) => r.toString()).optional(),
6285
6269
  config: s.unknown().transform((r) => Ke.JSON_ECD.encodeString(r))
6286
- }), Uu = s.object({
6270
+ }), Lu = s.object({
6287
6271
  task: Je,
6288
6272
  type: s.string(),
6289
6273
  key: s.string(),
@@ -6311,7 +6295,7 @@ class ei {
6311
6295
  };
6312
6296
  }
6313
6297
  async executeCommand(e, t) {
6314
- const n = await this.frameClient.openWriter(ns), a = _u();
6298
+ const n = await this.frameClient.openWriter(ns), a = Uu();
6315
6299
  return await n.write(ns, [{ task: this.key, type: e, key: a, args: t }]), await n.close(), a;
6316
6300
  }
6317
6301
  async executeCommandSync(e, t, n) {
@@ -6349,16 +6333,16 @@ class ei {
6349
6333
  );
6350
6334
  }
6351
6335
  }
6352
- const Lu = s.object({
6336
+ const Bu = s.object({
6353
6337
  rack: Fe.optional(),
6354
6338
  keys: s.string().array().optional(),
6355
6339
  names: s.string().array().optional(),
6356
6340
  offset: s.number().optional(),
6357
6341
  limit: s.number().optional(),
6358
6342
  includeState: s.boolean().optional()
6359
- }), Bu = s.object({
6343
+ }), zu = s.object({
6360
6344
  tasks: Ve(fr)
6361
- }), zu = "/hardware/task/retrieve", qu = "/hardware/task/create", Yu = "/hardware/task/delete", Wu = s.object({ tasks: Qa.array() }), Ku = s.object({ tasks: fr.array() }), Vu = s.object({ keys: Je.array() }), Fu = s.object({});
6345
+ }), qu = "/hardware/task/retrieve", Yu = "/hardware/task/create", Wu = "/hardware/task/delete", Ku = s.object({ tasks: Qa.array() }), Vu = s.object({ tasks: fr.array() }), Fu = s.object({ keys: Je.array() }), Ju = s.object({});
6362
6346
  let ti = class {
6363
6347
  constructor(e, t) {
6364
6348
  c(this, "type", "task");
@@ -6369,20 +6353,20 @@ let ti = class {
6369
6353
  async create(e) {
6370
6354
  const t = !Array.isArray(e), n = await w(
6371
6355
  this.client,
6372
- qu,
6356
+ Yu,
6373
6357
  { tasks: E(e) },
6374
- Wu,
6375
- Ku
6358
+ Ku,
6359
+ Vu
6376
6360
  ), a = this.sugar(n.tasks);
6377
6361
  return t ? a[0] : a;
6378
6362
  }
6379
6363
  async delete(e) {
6380
6364
  await w(
6381
6365
  this.client,
6382
- Yu,
6366
+ Wu,
6383
6367
  { keys: E(e) },
6384
- Vu,
6385
- Fu
6368
+ Fu,
6369
+ Ju
6386
6370
  );
6387
6371
  }
6388
6372
  async search(e) {
@@ -6408,10 +6392,10 @@ let ti = class {
6408
6392
  async execRetrieve(e) {
6409
6393
  return (await w(
6410
6394
  this.client,
6411
- zu,
6395
+ qu,
6412
6396
  e,
6413
- Lu,
6414
- Bu
6397
+ Bu,
6398
+ zu
6415
6399
  )).tasks;
6416
6400
  }
6417
6401
  sugar(e) {
@@ -6420,17 +6404,17 @@ let ti = class {
6420
6404
  );
6421
6405
  }
6422
6406
  };
6423
- const qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6407
+ const Yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6424
6408
  __proto__: null,
6425
6409
  Client: ti,
6426
6410
  Task: ei,
6427
- commandZ: Uu,
6411
+ commandZ: Lu,
6428
6412
  newTaskZ: Qa,
6429
6413
  stateZ: qt,
6430
6414
  taskKeyZ: Je,
6431
6415
  taskZ: fr
6432
6416
  }, Symbol.toStringTag, { value: "Module" }));
6433
- class Ju {
6417
+ class Gu {
6434
6418
  constructor(e, t) {
6435
6419
  c(this, "key");
6436
6420
  c(this, "name");
@@ -6443,8 +6427,8 @@ class Ju {
6443
6427
  });
6444
6428
  }
6445
6429
  }
6446
- const Gu = s.string().uuid(), Hu = s.object({
6447
- key: Gu,
6430
+ const Hu = s.string().uuid(), Xu = s.object({
6431
+ key: Hu,
6448
6432
  name: s.string()
6449
6433
  }), ri = s.union([
6450
6434
  s.literal("label"),
@@ -6489,7 +6473,7 @@ const Gu = s.string().uuid(), Hu = s.object({
6489
6473
  };
6490
6474
  c(Be, "z", s.union([si, s.instanceof(Be)]).transform((e) => new Be(e)));
6491
6475
  let X = Be;
6492
- const Xu = new X({ type: "builtin", key: "root" }), ai = s.object({
6476
+ const Qu = new X({ type: "builtin", key: "root" }), ai = s.object({
6493
6477
  type: s.number()
6494
6478
  }), ii = s.object({
6495
6479
  type: ri,
@@ -6502,27 +6486,27 @@ const Xu = new X({ type: "builtin", key: "root" }), ai = s.object({
6502
6486
  }).transform((r) => ({
6503
6487
  key: r.id.toString(),
6504
6488
  ...r
6505
- })), Qu = s.object({
6489
+ })), eh = s.object({
6506
6490
  from: X.z,
6507
6491
  type: s.string(),
6508
6492
  to: X.z
6509
6493
  }), Jr = (r) => {
6510
6494
  const [e, t, n] = r.split("->");
6511
6495
  return { from: new X(e), type: t, to: new X(n) };
6512
- }, eh = s.object({
6513
- group: Hu
6514
- }), th = s.object({
6496
+ }, th = s.object({
6497
+ group: Xu
6498
+ }), rh = s.object({
6515
6499
  parent: ne,
6516
6500
  key: s.string().uuid().optional(),
6517
6501
  name: s.string()
6518
- }), rh = s.object({
6502
+ }), nh = s.object({
6519
6503
  key: s.string(),
6520
6504
  name: s.string()
6521
- }), nh = s.object({
6505
+ }), sh = s.object({
6522
6506
  keys: s.array(s.string())
6523
6507
  });
6524
6508
  var le;
6525
- let sh = (le = class {
6509
+ let ah = (le = class {
6526
6510
  constructor(e) {
6527
6511
  c(this, "client");
6528
6512
  this.client = e;
@@ -6531,8 +6515,8 @@ let sh = (le = class {
6531
6515
  const [a, i] = await this.client.send(
6532
6516
  le.ENDPOINT,
6533
6517
  { parent: e, name: t, key: n },
6534
- th,
6535
- eh
6518
+ rh,
6519
+ th
6536
6520
  );
6537
6521
  if (i != null)
6538
6522
  throw i;
@@ -6542,7 +6526,7 @@ let sh = (le = class {
6542
6526
  const n = { key: e, name: t }, [, a] = await this.client.send(
6543
6527
  le.ENDPOINT_RENAME,
6544
6528
  n,
6545
- rh,
6529
+ nh,
6546
6530
  s.object({})
6547
6531
  );
6548
6532
  if (a != null)
@@ -6552,16 +6536,16 @@ let sh = (le = class {
6552
6536
  const t = { keys: e }, [, n] = await this.client.send(
6553
6537
  le.ENDPOINT_DELETE,
6554
6538
  t,
6555
- nh,
6539
+ sh,
6556
6540
  s.object({})
6557
6541
  );
6558
6542
  if (n != null)
6559
6543
  throw n;
6560
6544
  }
6561
- }, c(le, "ENDPOINT", "/ontology/create-group"), c(le, "ENDPOINT_RENAME", "/ontology/rename-group"), c(le, "ENDPOINT_DELETE", "/ontology/delete-group"), le), ah = class {
6545
+ }, c(le, "ENDPOINT", "/ontology/create-group"), c(le, "ENDPOINT_RENAME", "/ontology/rename-group"), c(le, "ENDPOINT_DELETE", "/ontology/delete-group"), le), ih = class {
6562
6546
  constructor(e) {
6563
6547
  c(this, "creator");
6564
- this.creator = new sh(e);
6548
+ this.creator = new ah(e);
6565
6549
  }
6566
6550
  async create(e, t, n) {
6567
6551
  return this.sugar(await this.creator.create(e, t, n));
@@ -6573,7 +6557,7 @@ let sh = (le = class {
6573
6557
  return await this.creator.delete(e);
6574
6558
  }
6575
6559
  sugar(e) {
6576
- return new Ju(e.name, e.key);
6560
+ return new Gu(e.name, e.key);
6577
6561
  }
6578
6562
  };
6579
6563
  const jr = {
@@ -6583,12 +6567,12 @@ const jr = {
6583
6567
  }, ss = s.object({
6584
6568
  id: ne,
6585
6569
  children: ne.array()
6586
- }), ih = s.object({
6570
+ }), oh = s.object({
6587
6571
  from: ne,
6588
6572
  to: ne,
6589
6573
  children: ne.array()
6590
6574
  });
6591
- let oh = class {
6575
+ let ch = class {
6592
6576
  constructor(e) {
6593
6577
  c(this, "client");
6594
6578
  this.client = e;
@@ -6613,10 +6597,10 @@ let oh = class {
6613
6597
  }
6614
6598
  async moveChildren(e, t, ...n) {
6615
6599
  const a = { from: e, to: t, children: n };
6616
- await w(this.client, jr.MOVE_CHILDREN, a, ih, s.object({}));
6600
+ await w(this.client, jr.MOVE_CHILDREN, a, oh, s.object({}));
6617
6601
  }
6618
6602
  };
6619
- const ch = "/ontology/retrieve", lh = s.object({
6603
+ const lh = "/ontology/retrieve", uh = s.object({
6620
6604
  ids: ne.array().optional(),
6621
6605
  children: s.boolean().optional(),
6622
6606
  parents: s.boolean().optional(),
@@ -6625,7 +6609,7 @@ const ch = "/ontology/retrieve", lh = s.object({
6625
6609
  term: s.string().optional(),
6626
6610
  limit: s.number().optional(),
6627
6611
  offset: s.number().optional()
6628
- }), uh = s.object({
6612
+ }), hh = s.object({
6629
6613
  resources: oi.array()
6630
6614
  }), xr = (r) => E(r).map((e) => new X(e).payload);
6631
6615
  let ci = class {
@@ -6635,7 +6619,7 @@ let ci = class {
6635
6619
  c(this, "client");
6636
6620
  c(this, "writer");
6637
6621
  c(this, "framer");
6638
- this.client = e, this.writer = new oh(e), this.groups = new ah(e), this.framer = t;
6622
+ this.client = e, this.writer = new ch(e), this.groups = new ih(e), this.framer = t;
6639
6623
  }
6640
6624
  async search(e, t) {
6641
6625
  return await this.execRetrieve({ term: e, ...t });
@@ -6680,10 +6664,10 @@ let ci = class {
6680
6664
  async execRetrieve(e) {
6681
6665
  const { resources: t } = await w(
6682
6666
  this.client,
6683
- ch,
6684
- e,
6685
6667
  lh,
6686
- uh
6668
+ e,
6669
+ uh,
6670
+ hh
6687
6671
  );
6688
6672
  return t;
6689
6673
  }
@@ -6762,16 +6746,16 @@ class dr {
6762
6746
  return new dr(n, t);
6763
6747
  }
6764
6748
  }
6765
- const Vd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6749
+ const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6766
6750
  __proto__: null,
6767
6751
  ChangeTracker: dr,
6768
6752
  Client: ci,
6769
6753
  ID: X,
6770
- Root: Xu,
6754
+ Root: Qu,
6771
6755
  crudeIDZ: si,
6772
6756
  idZ: ne,
6773
6757
  parseRelationship: Jr,
6774
- relationshipSchemaZ: Qu,
6758
+ relationshipSchemaZ: eh,
6775
6759
  resourceSchemaZ: oi,
6776
6760
  schemaFieldZ: ai,
6777
6761
  schemaZ: ii,
@@ -6780,13 +6764,13 @@ const Vd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6780
6764
  key: Ge,
6781
6765
  name: s.string().min(1),
6782
6766
  color: s.string()
6783
- }), hh = (r) => new X({ type: "label", key: r }), fh = s.object({
6767
+ }), fh = (r) => new X({ type: "label", key: r }), dh = s.object({
6784
6768
  keys: Ge.array().optional(),
6785
6769
  for: ne.optional(),
6786
6770
  search: s.string().optional(),
6787
6771
  offset: s.number().optional(),
6788
6772
  limit: s.number().optional()
6789
- }), dh = s.object({
6773
+ }), yh = s.object({
6790
6774
  labels: wt.array().optional().default([])
6791
6775
  });
6792
6776
  var qe;
@@ -6812,24 +6796,24 @@ let li = (qe = class {
6812
6796
  const [t, n] = await this.client.send(
6813
6797
  qe.ENDPOINT,
6814
6798
  e,
6815
- fh,
6816
- dh
6799
+ dh,
6800
+ yh
6817
6801
  );
6818
6802
  if (n != null)
6819
6803
  throw n;
6820
6804
  return t.labels;
6821
6805
  }
6822
6806
  }, c(qe, "ENDPOINT", "/label/retrieve"), qe);
6823
- const ui = wt.extend({ key: Ge.optional() }), yh = s.object({
6807
+ const ui = wt.extend({ key: Ge.optional() }), ph = s.object({
6824
6808
  labels: ui.array()
6825
- }), ph = s.object({
6826
- labels: wt.array()
6827
6809
  }), gh = s.object({
6810
+ labels: wt.array()
6811
+ }), mh = s.object({
6828
6812
  keys: Ge.array()
6829
6813
  }), hi = s.object({
6830
6814
  id: ne,
6831
6815
  labels: Ge.array()
6832
- }), mh = hi, Dr = s.object({}), wh = "/label/create", vh = "/label/delete", bh = "/label/set", Oh = "/label/remove";
6816
+ }), wh = hi, Pr = s.object({}), vh = "/label/create", bh = "/label/delete", Oh = "/label/set", Th = "/label/remove";
6833
6817
  let fi = class {
6834
6818
  constructor(e) {
6835
6819
  c(this, "client");
@@ -6838,41 +6822,41 @@ let fi = class {
6838
6822
  async create(e) {
6839
6823
  return (await w(
6840
6824
  this.client,
6841
- wh,
6825
+ vh,
6842
6826
  { labels: E(e) },
6843
- yh,
6844
- ph
6827
+ ph,
6828
+ gh
6845
6829
  )).labels;
6846
6830
  }
6847
6831
  async delete(e) {
6848
6832
  await w(
6849
6833
  this.client,
6850
- vh,
6834
+ bh,
6851
6835
  { keys: E(e) },
6852
- gh,
6853
- Dr
6836
+ mh,
6837
+ Pr
6854
6838
  );
6855
6839
  }
6856
6840
  async set(e, t) {
6857
6841
  await w(
6858
6842
  this.client,
6859
- bh,
6843
+ Oh,
6860
6844
  { id: e, labels: t },
6861
6845
  hi,
6862
- Dr
6846
+ Pr
6863
6847
  );
6864
6848
  }
6865
6849
  async remove(e, t) {
6866
6850
  await w(
6867
6851
  this.client,
6868
- Oh,
6852
+ Th,
6869
6853
  { id: e, labels: t },
6870
- mh,
6871
- Dr
6854
+ wh,
6855
+ Pr
6872
6856
  );
6873
6857
  }
6874
6858
  };
6875
- const Th = "sy_label_set", Eh = "sy_label_delete";
6859
+ const Eh = "sy_label_set", Sh = "sy_label_delete";
6876
6860
  let di = class {
6877
6861
  constructor(e, t) {
6878
6862
  c(this, "type", "label");
@@ -6910,20 +6894,20 @@ let di = class {
6910
6894
  async openChangeTracker() {
6911
6895
  return await gt(
6912
6896
  this.frameClient,
6913
- Th,
6914
6897
  Eh,
6915
- Sh
6898
+ Sh,
6899
+ Nh
6916
6900
  );
6917
6901
  }
6918
6902
  };
6919
- const Sh = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6903
+ const Nh = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6920
6904
  variant: r,
6921
6905
  key: t
6922
6906
  })) : e.parseJSON(wt).map((t) => ({
6923
6907
  variant: r,
6924
6908
  key: t.key,
6925
6909
  value: t
6926
- })), Gd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6910
+ })), Hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6927
6911
  __proto__: null,
6928
6912
  Client: di,
6929
6913
  Retriever: li,
@@ -6931,7 +6915,7 @@ const Sh = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6931
6915
  keyZ: Ge,
6932
6916
  labelZ: wt,
6933
6917
  newLabelPayloadZ: ui,
6934
- ontologyID: hh
6918
+ ontologyID: fh
6935
6919
  }, Symbol.toStringTag, { value: "Module" })), V = s.string().uuid(), He = s.object({
6936
6920
  key: V,
6937
6921
  name: s.string().min(1),
@@ -6950,14 +6934,14 @@ const Sh = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6950
6934
  normalized: e,
6951
6935
  actual: r
6952
6936
  };
6953
- }, Nh = s.object({}), Ah = s.object({
6937
+ }, Ah = s.object({}), Ih = s.object({
6954
6938
  range: He
6955
- }), Ih = s.object({
6956
- range: V
6957
6939
  }), kh = s.object({
6958
6940
  range: V
6959
- }), $h = s.object({}), Ch = "/range/set-active", Rh = "/range/retrieve-active", jh = "/range/clear-active";
6960
- class xh {
6941
+ }), $h = s.object({
6942
+ range: V
6943
+ }), Ch = s.object({}), Rh = "/range/set-active", jh = "/range/retrieve-active", xh = "/range/clear-active";
6944
+ class Ph {
6961
6945
  constructor(e) {
6962
6946
  c(this, "client");
6963
6947
  this.client = e;
@@ -6965,18 +6949,18 @@ class xh {
6965
6949
  async setActive(e) {
6966
6950
  await w(
6967
6951
  this.client,
6968
- Ch,
6952
+ Rh,
6969
6953
  { range: e },
6970
- Ih,
6971
- Nh
6954
+ kh,
6955
+ Ah
6972
6956
  );
6973
6957
  }
6974
6958
  async retrieveActive() {
6975
6959
  const [e, t] = await this.client.send(
6976
- Rh,
6960
+ jh,
6977
6961
  {},
6978
6962
  s.object({}),
6979
- Ah
6963
+ Ih
6980
6964
  );
6981
6965
  if (t instanceof re)
6982
6966
  return null;
@@ -6987,27 +6971,27 @@ class xh {
6987
6971
  async clearActive(e) {
6988
6972
  await w(
6989
6973
  this.client,
6990
- jh,
6974
+ xh,
6991
6975
  { range: e },
6992
- kh,
6993
- $h
6976
+ $h,
6977
+ Ch
6994
6978
  );
6995
6979
  }
6996
6980
  }
6997
- const Dh = "sy_range_alias_set", Ph = "sy_range_alias_delete", Zh = s.object({
6981
+ const Dh = "sy_range_alias_set", Zh = "sy_range_alias_delete", Mh = s.object({
6998
6982
  range: V,
6999
6983
  aliases: s.string().array()
7000
- }), Mh = s.object({
7001
- aliases: s.record(s.string(), Ce)
7002
6984
  }), _h = s.object({
6985
+ aliases: s.record(s.string(), Ce)
6986
+ }), Uh = s.object({
7003
6987
  range: V,
7004
6988
  aliases: s.record(Ce.or(s.string()), s.string())
7005
- }), Uh = s.unknown(), Lh = s.object({
6989
+ }), Lh = s.unknown(), Bh = s.object({
7006
6990
  range: V,
7007
6991
  channels: Ce.array()
7008
- }), Bh = s.unknown(), zh = s.object({
6992
+ }), zh = s.unknown(), qh = s.object({
7009
6993
  range: V
7010
- }), qh = s.object({
6994
+ }), Yh = s.object({
7011
6995
  aliases: s.record(s.string(), s.string())
7012
6996
  }), ce = class ce {
7013
6997
  constructor(e, t, n) {
@@ -7035,8 +7019,8 @@ const Dh = "sy_range_alias_set", Ph = "sy_range_alias_delete", Zh = s.object({
7035
7019
  this.client,
7036
7020
  ce.RESOLVE_ENDPOINT,
7037
7021
  { range: this.rangeKey, aliases: t },
7038
- Zh,
7039
- Mh
7022
+ Mh,
7023
+ _h
7040
7024
  );
7041
7025
  return Object.entries(i.aliases).forEach(([o, l]) => this.cache.set(o, l)), n ? i.aliases[t[0]] : { ...a, ...i.aliases };
7042
7026
  }
@@ -7045,8 +7029,8 @@ const Dh = "sy_range_alias_set", Ph = "sy_range_alias_delete", Zh = s.object({
7045
7029
  this.client,
7046
7030
  ce.SET_ENDPOINT,
7047
7031
  { range: this.rangeKey, aliases: e },
7048
- _h,
7049
- Uh
7032
+ Uh,
7033
+ Lh
7050
7034
  );
7051
7035
  }
7052
7036
  async list() {
@@ -7054,8 +7038,8 @@ const Dh = "sy_range_alias_set", Ph = "sy_range_alias_delete", Zh = s.object({
7054
7038
  this.client,
7055
7039
  ce.LIST_ENDPOINT,
7056
7040
  { range: this.rangeKey },
7057
- zh,
7058
- qh
7041
+ qh,
7042
+ Yh
7059
7043
  )).aliases;
7060
7044
  }
7061
7045
  async delete(e) {
@@ -7063,42 +7047,42 @@ const Dh = "sy_range_alias_set", Ph = "sy_range_alias_delete", Zh = s.object({
7063
7047
  this.client,
7064
7048
  ce.DELETE_ENDPOINT,
7065
7049
  { range: this.rangeKey, channels: e },
7066
- Lh,
7067
- Bh
7050
+ Bh,
7051
+ zh
7068
7052
  );
7069
7053
  }
7070
7054
  async openChangeTracker() {
7071
7055
  return await gt(
7072
7056
  this.frameClient,
7073
7057
  Dh,
7074
- Ph,
7075
- Kh(this.rangeKey)
7058
+ Zh,
7059
+ Vh(this.rangeKey)
7076
7060
  );
7077
7061
  }
7078
7062
  };
7079
7063
  c(ce, "SET_ENDPOINT", "/range/alias/set"), c(ce, "RESOLVE_ENDPOINT", "/range/alias/resolve"), c(ce, "LIST_ENDPOINT", "/range/alias/list"), c(ce, "DELETE_ENDPOINT", "/range/alias/delete");
7080
7064
  let Gr = ce;
7081
- const Yh = s.object({
7065
+ const Wh = s.object({
7082
7066
  range: V,
7083
7067
  channel: Ce,
7084
7068
  alias: s.string()
7085
- }), Wh = "---", Kh = (r) => (e, t) => e === "delete" ? t.toStrings().filter((n) => n.split(Wh)[0] === r).map((n) => ({
7069
+ }), Kh = "---", Vh = (r) => (e, t) => e === "delete" ? t.toStrings().filter((n) => n.split(Kh)[0] === r).map((n) => ({
7086
7070
  variant: e,
7087
7071
  key: n,
7088
7072
  value: void 0
7089
- })) : t.parseJSON(Yh).map((n) => ({
7073
+ })) : t.parseJSON(Wh).map((n) => ({
7090
7074
  variant: e,
7091
7075
  key: n.alias,
7092
7076
  value: n
7093
- })), Vh = s.object({
7077
+ })), Fh = s.object({
7094
7078
  range: V,
7095
7079
  keys: s.string().array()
7096
- }), Fh = s.object({
7097
- pairs: s.record(s.string(), s.string())
7098
7080
  }), Jh = s.object({
7099
- range: V,
7100
7081
  pairs: s.record(s.string(), s.string())
7101
7082
  }), Gh = s.object({
7083
+ range: V,
7084
+ pairs: s.record(s.string(), s.string())
7085
+ }), Hh = s.object({
7102
7086
  range: V,
7103
7087
  keys: s.string().array()
7104
7088
  }), Ie = class Ie {
@@ -7111,8 +7095,8 @@ const Yh = s.object({
7111
7095
  const [t, n] = await this.client.send(
7112
7096
  Ie.GET_ENDPOINT,
7113
7097
  { range: this.rangeKey, keys: E(e) },
7114
- Vh,
7115
- Fh
7098
+ Fh,
7099
+ Jh
7116
7100
  );
7117
7101
  if (n != null)
7118
7102
  throw n;
@@ -7129,7 +7113,7 @@ const Yh = s.object({
7129
7113
  range: this.rangeKey,
7130
7114
  pairs: Aa(e) ? e : { [e]: t }
7131
7115
  },
7132
- Jh,
7116
+ Gh,
7133
7117
  s.unknown()
7134
7118
  );
7135
7119
  }
@@ -7138,14 +7122,14 @@ const Yh = s.object({
7138
7122
  this.client,
7139
7123
  Ie.DELETE_ENDPOINT,
7140
7124
  { range: this.rangeKey, keys: E(e) },
7141
- Gh,
7125
+ Hh,
7142
7126
  s.unknown()
7143
7127
  );
7144
7128
  }
7145
7129
  };
7146
7130
  c(Ie, "GET_ENDPOINT", "/range/kv/get"), c(Ie, "SET_ENDPOINT", "/range/kv/set"), c(Ie, "DELETE_ENDPOINT", "/range/kv/delete");
7147
7131
  let Hr = Ie;
7148
- const Pr = (r) => new X({ type: "range", key: r });
7132
+ const Dr = (r) => new X({ type: "range", key: r });
7149
7133
  class gi {
7150
7134
  constructor(e, t = H.ZERO, n, a, i, o, l, u, p) {
7151
7135
  c(this, "key");
@@ -7178,21 +7162,21 @@ class gi {
7178
7162
  return await this.frameClient.read(this.timeRange, e);
7179
7163
  }
7180
7164
  async labels() {
7181
- return await this.labelClient.retrieveFor(Pr(this.key));
7165
+ return await this.labelClient.retrieveFor(Dr(this.key));
7182
7166
  }
7183
7167
  async addLabel(...e) {
7184
- await this.labelClient.label(Pr(this.key), e);
7168
+ await this.labelClient.label(Dr(this.key), e);
7185
7169
  }
7186
7170
  async removeLabel(...e) {
7187
- await this.labelClient.removeLabels(Pr(this.key), e);
7171
+ await this.labelClient.removeLabels(Dr(this.key), e);
7188
7172
  }
7189
7173
  }
7190
- const Hh = s.object({
7174
+ const Xh = s.object({
7191
7175
  keys: V.array().optional(),
7192
7176
  names: s.array(s.string()).optional(),
7193
7177
  term: s.string().optional(),
7194
7178
  overlapsWith: H.z.optional()
7195
- }), Xh = "/range/retrieve", Qh = s.object({
7179
+ }), Qh = "/range/retrieve", ef = s.object({
7196
7180
  ranges: Ve(He)
7197
7181
  });
7198
7182
  let mi = class {
@@ -7204,7 +7188,7 @@ let mi = class {
7204
7188
  c(this, "channels");
7205
7189
  c(this, "active");
7206
7190
  c(this, "labelClient");
7207
- this.frameClient = e, this.writer = t, this.unaryClient = n, this.channels = a, this.active = new xh(n), this.labelClient = i;
7191
+ this.frameClient = e, this.writer = t, this.unaryClient = n, this.channels = a, this.active = new Ph(n), this.labelClient = i;
7208
7192
  }
7209
7193
  async create(e) {
7210
7194
  const t = !Array.isArray(e), n = this.sugar(await this.writer.create(E(e)));
@@ -7237,10 +7221,10 @@ let mi = class {
7237
7221
  async execRetrieve(e) {
7238
7222
  const { ranges: t } = await w(
7239
7223
  this.unaryClient,
7240
- Xh,
7224
+ Qh,
7241
7225
  e,
7242
- Hh,
7243
- Qh
7226
+ Xh,
7227
+ ef
7244
7228
  );
7245
7229
  return this.sugar(t);
7246
7230
  }
@@ -7276,16 +7260,16 @@ let mi = class {
7276
7260
  );
7277
7261
  }
7278
7262
  };
7279
- const ef = s.object({
7263
+ const tf = s.object({
7280
7264
  ranges: He.array()
7281
- }), tf = s.object({
7282
- ranges: yi.array()
7283
7265
  }), rf = s.object({
7266
+ ranges: yi.array()
7267
+ }), nf = s.object({
7284
7268
  keys: V.array()
7285
- }), nf = s.object({}), sf = s.object({
7269
+ }), sf = s.object({}), af = s.object({
7286
7270
  key: V,
7287
7271
  name: s.string()
7288
- }), af = s.object({}), of = "/range/create", cf = "/range/delete", lf = "/range/rename";
7272
+ }), of = s.object({}), cf = "/range/create", lf = "/range/delete", uf = "/range/rename";
7289
7273
  let wi = class {
7290
7274
  constructor(e) {
7291
7275
  c(this, "client");
@@ -7294,32 +7278,32 @@ let wi = class {
7294
7278
  async rename(e, t) {
7295
7279
  await w(
7296
7280
  this.client,
7297
- lf,
7281
+ uf,
7298
7282
  { key: e, name: t },
7299
- sf,
7300
- af
7283
+ af,
7284
+ of
7301
7285
  );
7302
7286
  }
7303
7287
  async create(e) {
7304
7288
  return (await w(
7305
7289
  this.client,
7306
- of,
7290
+ cf,
7307
7291
  { ranges: e },
7308
- tf,
7309
- ef
7292
+ rf,
7293
+ tf
7310
7294
  )).ranges;
7311
7295
  }
7312
7296
  async delete(e) {
7313
7297
  await w(
7314
7298
  this.client,
7315
- cf,
7299
+ lf,
7316
7300
  { keys: e },
7317
- rf,
7318
- nf
7301
+ nf,
7302
+ sf
7319
7303
  );
7320
7304
  }
7321
7305
  };
7322
- const Qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7306
+ const ey = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7323
7307
  __proto__: null,
7324
7308
  Client: mi,
7325
7309
  Range: gi,
@@ -7328,14 +7312,14 @@ const Qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7328
7312
  keyZ: V,
7329
7313
  newPayloadZ: yi,
7330
7314
  payloadZ: He
7331
- }, Symbol.toStringTag, { value: "Module" })), uf = "/api/v1/";
7332
- class hf {
7315
+ }, Symbol.toStringTag, { value: "Module" })), hf = "/api/v1/";
7316
+ class ff {
7333
7317
  constructor(e, t = !1) {
7334
7318
  c(this, "url");
7335
7319
  c(this, "unary");
7336
7320
  c(this, "stream");
7337
7321
  c(this, "secure");
7338
- this.secure = t, this.url = e.child(uf);
7322
+ this.secure = t, this.url = e.child(hf);
7339
7323
  const n = new Ke.JSONEncoderDecoder();
7340
7324
  this.unary = new ll(this.url, n, this.secure), this.stream = new wl(this.url, n, this.secure);
7341
7325
  }
@@ -7347,8 +7331,8 @@ const Rn = s.string().uuid(), jn = s.object({
7347
7331
  key: s.string(),
7348
7332
  name: s.string(),
7349
7333
  data: Nn.or(s.string().transform((r) => JSON.parse(r)))
7350
- }), ff = s.object({ keys: s.string().array() }), df = s.object({ linePlots: jn.array() });
7351
- let yf = class {
7334
+ }), df = s.object({ keys: s.string().array() }), yf = s.object({ linePlots: jn.array() });
7335
+ let pf = class {
7352
7336
  constructor(e) {
7353
7337
  c(this, "ENDPOINT", "/workspace/lineplot/retrieve");
7354
7338
  c(this, "client");
@@ -7356,33 +7340,33 @@ let yf = class {
7356
7340
  }
7357
7341
  async retrieve(e) {
7358
7342
  const t = E(e);
7359
- return (await w(this.client, this.ENDPOINT, { keys: t }, ff, df)).linePlots;
7343
+ return (await w(this.client, this.ENDPOINT, { keys: t }, df, yf)).linePlots;
7360
7344
  }
7361
7345
  };
7362
7346
  const Re = s.string().uuid(), vi = (r) => JSON.parse(r), xn = s.object({
7363
7347
  name: s.string(),
7364
7348
  key: Re,
7365
7349
  layout: Nn.or(s.string().transform((r) => vi(r)))
7366
- }), Dn = xn.omit({ layout: !0 }).extend({
7350
+ }), Pn = xn.omit({ layout: !0 }).extend({
7367
7351
  layout: s.string().transform((r) => vi(r))
7368
- }), pf = jn.partial({ key: !0 }).transform((r) => ({
7352
+ }), gf = jn.partial({ key: !0 }).transform((r) => ({
7369
7353
  ...r,
7370
7354
  data: JSON.stringify(r.data)
7371
- })), gf = s.object({
7355
+ })), mf = s.object({
7372
7356
  workspace: Re,
7373
- linePlots: pf.array()
7374
- }), mf = s.object({
7375
- linePlots: jn.array()
7357
+ linePlots: gf.array()
7376
7358
  }), wf = s.object({
7359
+ linePlots: jn.array()
7360
+ }), vf = s.object({
7377
7361
  keys: Rn.array()
7378
- }), vf = s.object({}), bf = s.object({
7362
+ }), bf = s.object({}), Of = s.object({
7379
7363
  key: Rn,
7380
7364
  name: s.string()
7381
- }), Of = s.object({}), Tf = s.object({
7365
+ }), Tf = s.object({}), Ef = s.object({
7382
7366
  key: Rn,
7383
7367
  data: s.string()
7384
- }), Ef = s.object({}), Sf = "/workspace/lineplot/create", Nf = "/workspace/lineplot/delete", Af = "/workspace/lineplot/rename", If = "/workspace/lineplot/set-data";
7385
- let kf = class {
7368
+ }), Sf = s.object({}), Nf = "/workspace/lineplot/create", Af = "/workspace/lineplot/delete", If = "/workspace/lineplot/rename", kf = "/workspace/lineplot/set-data";
7369
+ let $f = class {
7386
7370
  constructor(e) {
7387
7371
  c(this, "client");
7388
7372
  this.client = e;
@@ -7391,45 +7375,45 @@ let kf = class {
7391
7375
  const n = { ...t, data: JSON.stringify(t.data) };
7392
7376
  return (await w(
7393
7377
  this.client,
7394
- Sf,
7378
+ Nf,
7395
7379
  { workspace: e, linePlots: [n] },
7396
- gf,
7397
- mf
7380
+ mf,
7381
+ wf
7398
7382
  )).linePlots[0];
7399
7383
  }
7400
7384
  async delete(e) {
7401
7385
  const t = E(e);
7402
7386
  await w(
7403
7387
  this.client,
7404
- Nf,
7388
+ Af,
7405
7389
  { keys: t },
7406
- wf,
7407
- vf
7390
+ vf,
7391
+ bf
7408
7392
  );
7409
7393
  }
7410
7394
  async rename(e, t) {
7411
7395
  await w(
7412
7396
  this.client,
7413
- Af,
7397
+ If,
7414
7398
  { key: e, name: t },
7415
- bf,
7416
- Of
7399
+ Of,
7400
+ Tf
7417
7401
  );
7418
7402
  }
7419
7403
  async setData(e, t) {
7420
7404
  await w(
7421
7405
  this.client,
7422
- If,
7406
+ kf,
7423
7407
  { key: e, data: JSON.stringify(t) },
7424
- Tf,
7425
- Ef
7408
+ Ef,
7409
+ Sf
7426
7410
  );
7427
7411
  }
7428
- }, $f = class {
7412
+ }, Cf = class {
7429
7413
  constructor(e) {
7430
7414
  c(this, "writer");
7431
7415
  c(this, "retriever");
7432
- this.writer = new kf(e), this.retriever = new yf(e);
7416
+ this.writer = new $f(e), this.retriever = new pf(e);
7433
7417
  }
7434
7418
  async create(e, t) {
7435
7419
  return await this.writer.create(e, t);
@@ -7448,15 +7432,15 @@ let kf = class {
7448
7432
  await this.writer.delete(e);
7449
7433
  }
7450
7434
  };
7451
- const Cf = s.object({
7435
+ const Rf = s.object({
7452
7436
  keys: Re.array().optional(),
7453
7437
  search: s.string().optional(),
7454
7438
  author: s.string().uuid().optional(),
7455
7439
  offset: s.number().optional(),
7456
7440
  limit: s.number().optional()
7457
- }), Rf = s.object({ workspaces: Ve(Dn) });
7441
+ }), jf = s.object({ workspaces: Ve(Pn) });
7458
7442
  var Ye;
7459
- let jf = (Ye = class {
7443
+ let xf = (Ye = class {
7460
7444
  constructor(e) {
7461
7445
  c(this, "client");
7462
7446
  this.client = e;
@@ -7479,23 +7463,23 @@ let jf = (Ye = class {
7479
7463
  this.client,
7480
7464
  Ye.ENDPOINT,
7481
7465
  e,
7482
- Cf,
7483
- Rf
7466
+ Rf,
7467
+ jf
7484
7468
  )).workspaces;
7485
7469
  }
7486
7470
  }, c(Ye, "ENDPOINT", "/workspace/retrieve"), Ye);
7487
- const yr = s.string().uuid(), xf = s.object({
7471
+ const yr = s.string().uuid(), Pf = s.object({
7488
7472
  key: s.string(),
7489
7473
  name: s.string(),
7490
7474
  data: Nn.or(s.string().transform((r) => JSON.parse(r))),
7491
7475
  snapshot: s.boolean()
7492
- }), Pn = s.object({
7476
+ }), Dn = s.object({
7493
7477
  key: s.string(),
7494
7478
  name: s.string(),
7495
7479
  snapshot: s.boolean(),
7496
7480
  data: s.string().transform((r) => JSON.parse(r))
7497
- }), Df = s.object({ keys: s.string().array() }), Pf = s.object({ schematics: Pn.array() });
7498
- class Zf {
7481
+ }), Df = s.object({ keys: s.string().array() }), Zf = s.object({ schematics: Dn.array() });
7482
+ class Mf {
7499
7483
  constructor(e) {
7500
7484
  c(this, "ENDPOINT", "/workspace/schematic/retrieve");
7501
7485
  c(this, "client");
@@ -7507,36 +7491,36 @@ class Zf {
7507
7491
  this.ENDPOINT,
7508
7492
  { keys: E(e) },
7509
7493
  Df,
7510
- Pf
7494
+ Zf
7511
7495
  )).schematics;
7512
7496
  }
7513
7497
  }
7514
- const Mf = xf.partial({ key: !0, snapshot: !0 }).transform((r) => ({
7498
+ const _f = Pf.partial({ key: !0, snapshot: !0 }).transform((r) => ({
7515
7499
  ...r,
7516
7500
  data: JSON.stringify(r.data)
7517
- })), _f = s.object({
7501
+ })), Uf = s.object({
7518
7502
  workspace: Re,
7519
- schematics: Mf.array()
7520
- }), Uf = s.object({
7521
- schematics: Pn.array()
7503
+ schematics: _f.array()
7522
7504
  }), Lf = s.object({
7505
+ schematics: Dn.array()
7506
+ }), Bf = s.object({
7523
7507
  keys: yr.array()
7524
- }), Bf = s.object({}), zf = s.object({
7508
+ }), zf = s.object({}), qf = s.object({
7525
7509
  key: yr,
7526
7510
  name: s.string()
7527
- }), ls = s.object({}), qf = s.object({
7511
+ }), ls = s.object({}), Yf = s.object({
7528
7512
  key: yr,
7529
7513
  data: s.string()
7530
7514
  });
7531
7515
  s.object({});
7532
- const Yf = s.object({
7516
+ const Wf = s.object({
7533
7517
  key: yr,
7534
7518
  name: s.string(),
7535
7519
  snapshot: s.boolean()
7536
- }), Wf = s.object({
7537
- schematic: Pn
7538
- }), Kf = "/workspace/schematic/create", Vf = "/workspace/schematic/delete", Ff = "/workspace/schematic/rename", Jf = "/workspace/schematic/set-data", Gf = "/workspace/schematic/copy";
7539
- let Hf = class {
7520
+ }), Kf = s.object({
7521
+ schematic: Dn
7522
+ }), Vf = "/workspace/schematic/create", Ff = "/workspace/schematic/delete", Jf = "/workspace/schematic/rename", Gf = "/workspace/schematic/set-data", Hf = "/workspace/schematic/copy";
7523
+ let Xf = class {
7540
7524
  constructor(e) {
7541
7525
  c(this, "client");
7542
7526
  this.client = e;
@@ -7545,54 +7529,54 @@ let Hf = class {
7545
7529
  const n = { ...t, data: JSON.stringify(t.data) };
7546
7530
  return (await w(
7547
7531
  this.client,
7548
- Kf,
7532
+ Vf,
7549
7533
  { workspace: e, schematics: [n] },
7550
- _f,
7551
- Uf
7534
+ Uf,
7535
+ Lf
7552
7536
  )).schematics[0];
7553
7537
  }
7554
7538
  async copy(e, t, n) {
7555
7539
  return (await w(
7556
7540
  this.client,
7557
- Gf,
7541
+ Hf,
7558
7542
  { key: e, name: t, snapshot: n },
7559
- Yf,
7560
- Wf
7543
+ Wf,
7544
+ Kf
7561
7545
  )).schematic;
7562
7546
  }
7563
7547
  async delete(e) {
7564
7548
  const t = E(e);
7565
7549
  await w(
7566
7550
  this.client,
7567
- Vf,
7551
+ Ff,
7568
7552
  { keys: t },
7569
- Lf,
7570
- Bf
7553
+ Bf,
7554
+ zf
7571
7555
  );
7572
7556
  }
7573
7557
  async rename(e, t) {
7574
7558
  await w(
7575
7559
  this.client,
7576
- Ff,
7560
+ Jf,
7577
7561
  { key: e, name: t },
7578
- zf,
7562
+ qf,
7579
7563
  ls
7580
7564
  );
7581
7565
  }
7582
7566
  async setData(e, t) {
7583
7567
  await w(
7584
7568
  this.client,
7585
- Jf,
7569
+ Gf,
7586
7570
  { key: e, data: JSON.stringify(t) },
7587
- qf,
7571
+ Yf,
7588
7572
  ls
7589
7573
  );
7590
7574
  }
7591
- }, Xf = class {
7575
+ }, Qf = class {
7592
7576
  constructor(e) {
7593
7577
  c(this, "writer");
7594
7578
  c(this, "retriever");
7595
- this.writer = new Hf(e), this.retriever = new Zf(e);
7579
+ this.writer = new Xf(e), this.retriever = new Mf(e);
7596
7580
  }
7597
7581
  async create(e, t) {
7598
7582
  return await this.writer.create(e, t);
@@ -7614,23 +7598,23 @@ let Hf = class {
7614
7598
  return await this.writer.copy(e, t, n);
7615
7599
  }
7616
7600
  };
7617
- const Qf = xn.partial({ key: !0 }).transform((r) => ({
7601
+ const ed = xn.partial({ key: !0 }).transform((r) => ({
7618
7602
  ...r,
7619
7603
  layout: JSON.stringify(r.layout)
7620
- })), ed = s.object({
7621
- workspaces: Qf.array()
7622
- }), td = s.object({
7623
- workspaces: Dn.array()
7604
+ })), td = s.object({
7605
+ workspaces: ed.array()
7624
7606
  }), rd = s.object({
7607
+ workspaces: Pn.array()
7608
+ }), nd = s.object({
7625
7609
  keys: Re.array()
7626
- }), nd = s.object({}), sd = s.object({
7610
+ }), sd = s.object({}), ad = s.object({
7627
7611
  key: Re,
7628
7612
  name: s.string()
7629
- }), ad = s.object({}), id = s.object({
7613
+ }), id = s.object({}), od = s.object({
7630
7614
  key: Re,
7631
7615
  layout: s.string()
7632
- }), od = s.object({}), cd = "/workspace/create", ld = "/workspace/delete", ud = "/workspace/rename", hd = "/workspace/set-layout";
7633
- class fd {
7616
+ }), cd = s.object({}), ld = "/workspace/create", ud = "/workspace/delete", hd = "/workspace/rename", fd = "/workspace/set-layout";
7617
+ class dd {
7634
7618
  constructor(e) {
7635
7619
  c(this, "client");
7636
7620
  this.client = e;
@@ -7638,37 +7622,37 @@ class fd {
7638
7622
  async create(e) {
7639
7623
  return (await w(
7640
7624
  this.client,
7641
- cd,
7625
+ ld,
7642
7626
  { workspaces: E(e) },
7643
- ed,
7644
- td
7627
+ td,
7628
+ rd
7645
7629
  )).workspaces;
7646
7630
  }
7647
7631
  async delete(e) {
7648
7632
  await w(
7649
7633
  this.client,
7650
- ld,
7634
+ ud,
7651
7635
  { keys: E(e) },
7652
- rd,
7653
- nd
7636
+ nd,
7637
+ sd
7654
7638
  );
7655
7639
  }
7656
7640
  async rename(e, t) {
7657
7641
  await w(
7658
7642
  this.client,
7659
- ud,
7643
+ hd,
7660
7644
  { key: e, name: t },
7661
- sd,
7662
- ad
7645
+ ad,
7646
+ id
7663
7647
  );
7664
7648
  }
7665
7649
  async setLayout(e, t) {
7666
7650
  await w(
7667
7651
  this.client,
7668
- hd,
7652
+ fd,
7669
7653
  { key: e, layout: JSON.stringify(t) },
7670
- id,
7671
- od
7654
+ od,
7655
+ cd
7672
7656
  );
7673
7657
  }
7674
7658
  }
@@ -7679,7 +7663,7 @@ class bi {
7679
7663
  c(this, "linePlot");
7680
7664
  c(this, "retriever");
7681
7665
  c(this, "writer");
7682
- this.schematic = new Xf(e), this.linePlot = new $f(e), this.retriever = new jf(e), this.writer = new fd(e);
7666
+ this.schematic = new Qf(e), this.linePlot = new Cf(e), this.retriever = new xf(e), this.writer = new dd(e);
7683
7667
  }
7684
7668
  async search(e) {
7685
7669
  return await this.retriever.search(e);
@@ -7708,13 +7692,13 @@ class bi {
7708
7692
  await this.writer.delete(e);
7709
7693
  }
7710
7694
  }
7711
- const ay = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7695
+ const iy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7712
7696
  __proto__: null,
7713
7697
  Client: bi,
7714
7698
  keyZ: Re,
7715
- workspaceRemoteZ: Dn,
7699
+ workspaceRemoteZ: Pn,
7716
7700
  workspaceZ: xn
7717
- }, Symbol.toStringTag, { value: "Module" })), dd = s.object({
7701
+ }, Symbol.toStringTag, { value: "Module" })), yd = s.object({
7718
7702
  host: s.string({
7719
7703
  required_error: "Host is required"
7720
7704
  }).min(1, "Host is required"),
@@ -7731,7 +7715,7 @@ const ay = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7731
7715
  secure: s.boolean().optional().default(!1),
7732
7716
  name: s.string().optional()
7733
7717
  });
7734
- class yd extends Ya {
7718
+ class pd extends Ya {
7735
7719
  /**
7736
7720
  * @param props.host - Hostname of a node in the cluster.
7737
7721
  * @param props.port - Port of the node in the cluster.
@@ -7748,7 +7732,7 @@ class yd extends Ya {
7748
7732
  * the client from polling the cluster for connectivity information.
7749
7733
  */
7750
7734
  constructor(t) {
7751
- const n = dd.parse(t), { host: a, port: i, username: o, password: l, connectivityPollFrequency: u, secure: p } = n, g = new hf(new Pl({ host: a, port: Number(i) }), p);
7735
+ const n = yd.parse(t), { host: a, port: i, username: o, password: l, connectivityPollFrequency: u, secure: p } = n, g = new ff(new Dl({ host: a, port: Number(i) }), p);
7752
7736
  g.use(Ol);
7753
7737
  let y;
7754
7738
  if (o != null && l != null) {
@@ -7760,7 +7744,7 @@ class yd extends Ya {
7760
7744
  }
7761
7745
  const U = new An(
7762
7746
  new ht(g.unary)
7763
- ), D = new Za(g.unary);
7747
+ ), P = new Za(g.unary);
7764
7748
  super(g.stream, g.unary, U);
7765
7749
  c(this, "createdAt");
7766
7750
  c(this, "props");
@@ -7774,7 +7758,7 @@ class yd extends Ya {
7774
7758
  c(this, "hardware");
7775
7759
  c(this, "control");
7776
7760
  c(this, "transport");
7777
- this.createdAt = S.now(), this.props = n, this.auth = y, this.transport = g, this.channels = new Pa(this, U, g.unary, D), this.connectivity = new ft(
7761
+ this.createdAt = S.now(), this.props = n, this.auth = y, this.transport = g, this.channels = new Da(this, U, g.unary, P), this.connectivity = new ft(
7778
7762
  g.unary,
7779
7763
  u,
7780
7764
  n.name
@@ -7787,8 +7771,8 @@ class yd extends Ya {
7787
7771
  U,
7788
7772
  this.labels
7789
7773
  ), this.workspaces = new bi(this.transport.unary);
7790
- const P = new Xa(this.transport.unary, this), Zn = new ti(this.transport.unary, this), Oi = new Ja(this.transport.unary, this, Zn);
7791
- this.hardware = new Va(Zn, Oi, P);
7774
+ const D = new Xa(this.transport.unary, this), Zn = new ti(this.transport.unary, this), Oi = new Ja(this.transport.unary, this, Zn);
7775
+ this.hardware = new Va(Zn, Oi, D);
7792
7776
  }
7793
7777
  get key() {
7794
7778
  return this.createdAt.valueOf().toString();
@@ -7797,13 +7781,13 @@ class yd extends Ya {
7797
7781
  this.connectivity.stopChecking();
7798
7782
  }
7799
7783
  }
7800
- c(yd, "connectivity", ft);
7801
- const iy = We.Authority;
7784
+ c(pd, "connectivity", ft);
7785
+ const oy = We.Authority;
7802
7786
  export {
7803
7787
  ot as AuthError,
7804
- iy as Authority,
7805
- Da as Channel,
7806
- Td as ContiguityError,
7788
+ oy as Authority,
7789
+ Pa as Channel,
7790
+ Ed as ContiguityError,
7807
7791
  N as DataType,
7808
7792
  F as Density,
7809
7793
  L as Frame,
@@ -7812,24 +7796,24 @@ export {
7812
7796
  hn as Rate,
7813
7797
  zr as RouteError,
7814
7798
  G as Series,
7815
- yd as Synnax,
7799
+ pd as Synnax,
7816
7800
  H as TimeRange,
7817
7801
  A as TimeSpan,
7818
7802
  S as TimeStamp,
7819
7803
  ze as UnexpectedError,
7820
7804
  _ as ValidationError,
7821
- kd as channel,
7822
- Cd as connection,
7805
+ $d as channel,
7806
+ Rd as connection,
7823
7807
  Dd as control,
7824
- Ld as device,
7825
- jd as framer,
7826
- Zd as hardware,
7827
- Gd as label,
7828
- Vd as ontology,
7829
- Bd as rack,
7830
- Qd as ranger,
7831
- _d as signals,
7832
- dd as synnaxPropsZ,
7833
- qd as task,
7834
- ay as workspace
7808
+ Bd as device,
7809
+ xd as framer,
7810
+ Md as hardware,
7811
+ Hd as label,
7812
+ Fd as ontology,
7813
+ zd as rack,
7814
+ ey as ranger,
7815
+ Ud as signals,
7816
+ yd as synnaxPropsZ,
7817
+ Yd as task,
7818
+ iy as workspace
7835
7819
  };