@ikonai/sdk-ui 1.0.77 → 1.0.78

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/index.js CHANGED
@@ -1,49 +1,49 @@
1
- import { createLogger as Z, readOpcode as it, readProtocolMessageHeaders as ae } from "@ikonai/sdk";
2
- const F = 27, ot = {
1
+ import { createLogger as Z, readOpcode as ot, readProtocolMessageHeaders as ae } from "@ikonai/sdk";
2
+ const P = 27, at = {
3
3
  Compressed: 8
4
4
  };
5
- function at(e) {
6
- const t = x(e), s = new DataView(t.buffer, t.byteOffset, t.byteLength);
7
- if (t.length < F)
5
+ function lt(e) {
6
+ const t = H(e), s = new DataView(t.buffer, t.byteOffset, t.byteLength);
7
+ if (t.length < P)
8
8
  throw new Error("Protocol payload too short");
9
9
  const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), I = s.getUint32(20, !0), _ = s.getUint8(24), l = s.getUint8(25), E = s.getUint8(26);
10
- if (F + I * 4 > t.length)
10
+ if (P + I * 4 > t.length)
11
11
  throw new Error("Protocol header exceeds payload length");
12
- const T = [];
13
- let N = F;
12
+ const S = [];
13
+ let A = P;
14
14
  for (let g = 0; g < I; g++)
15
- T.push(s.getUint32(N, !0)), N += 4;
15
+ S.push(s.getUint32(A, !0)), A += 4;
16
16
  return {
17
17
  length: r,
18
18
  opcode: n,
19
19
  senderId: i,
20
20
  trackId: o,
21
21
  sequenceId: a,
22
- targetIds: T,
22
+ targetIds: S,
23
23
  payloadVersion: _,
24
24
  payloadType: l,
25
25
  flags: E
26
26
  };
27
27
  }
28
- async function G(e, t, s) {
29
- const r = x(e), n = at(r);
28
+ async function x(e, t, s) {
29
+ const r = H(e), n = lt(r);
30
30
  if (t !== void 0 && n.opcode !== t)
31
31
  throw new Error(`Unexpected opcode ${n.opcode}`);
32
32
  if (n.payloadType !== 8)
33
33
  throw new Error(`Unexpected payload type ${n.payloadType}`);
34
- const i = F + n.targetIds.length * 4;
34
+ const i = P + n.targetIds.length * 4;
35
35
  let o = r.subarray(i, n.length);
36
- return (n.flags & ot.Compressed) !== 0 && (o = await lt(o)), o;
36
+ return (n.flags & at.Compressed) !== 0 && (o = await It(o)), o;
37
37
  }
38
38
  function he(e, t, s, r, n) {
39
- const i = n?.trackId ?? 0, o = n?.sequenceId ?? 0, a = n?.flags ?? 0, I = n?.targetIds ?? [], _ = n?.payloadType ?? 8, l = F + I.length * 4, E = l + t.length, h = new Uint8Array(E), T = new DataView(h.buffer);
40
- T.setUint32(0, E, !0), T.setUint32(4, e >>> 0, !0), T.setUint32(8, r >>> 0, !0), T.setUint32(12, i >>> 0, !0), T.setUint32(16, o >>> 0, !0), T.setUint32(20, I.length >>> 0, !0), T.setUint8(24, s & 255), T.setUint8(25, _ & 255), T.setUint8(26, a & 255);
41
- let N = F;
39
+ const i = n?.trackId ?? 0, o = n?.sequenceId ?? 0, a = n?.flags ?? 0, I = n?.targetIds ?? [], _ = n?.payloadType ?? 8, l = P + I.length * 4, E = l + t.length, h = new Uint8Array(E), S = new DataView(h.buffer);
40
+ S.setUint32(0, E, !0), S.setUint32(4, e >>> 0, !0), S.setUint32(8, r >>> 0, !0), S.setUint32(12, i >>> 0, !0), S.setUint32(16, o >>> 0, !0), S.setUint32(20, I.length >>> 0, !0), S.setUint8(24, s & 255), S.setUint8(25, _ & 255), S.setUint8(26, a & 255);
41
+ let A = P;
42
42
  for (let g = 0; g < I.length; g++)
43
- T.setUint32(N, I[g] >>> 0, !0), N += 4;
43
+ S.setUint32(A, I[g] >>> 0, !0), A += 4;
44
44
  return h.set(t, l), h;
45
45
  }
46
- async function lt(e) {
46
+ async function It(e) {
47
47
  if (typeof DecompressionStream > "u")
48
48
  throw new Error("DecompressionStream not supported");
49
49
  const t = new DecompressionStream("gzip"), s = t.writable.getWriter(), r = new Uint8Array(e);
@@ -61,9 +61,9 @@ async function lt(e) {
61
61
  a.set(i[_], I), I += i[_].length;
62
62
  return a;
63
63
  }
64
- var U = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(U || {});
65
- const ue = 161, ce = 162, Y = new TextEncoder(), It = new TextDecoder("utf-8", { fatal: !0 });
66
- class k {
64
+ var C = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(C || {});
65
+ const ue = 161, ce = 162, W = new TextEncoder(), Et = new TextDecoder("utf-8", { fatal: !0 });
66
+ class M {
67
67
  constructor(t = 1) {
68
68
  this.version = t, this.buffer.writeByte(ue), this.buffer.writeVarUInt(t >>> 0);
69
69
  }
@@ -92,26 +92,26 @@ class k {
92
92
  this.writeFixedField(t, 2, () => this.buffer.writeByte(s ? 1 : 0));
93
93
  }
94
94
  writeGuidField(t, s) {
95
- const r = s instanceof f ? s.asBytes() : s;
95
+ const r = s instanceof c ? s.asBytes() : s;
96
96
  if (r.length !== 16)
97
97
  throw new Error("Guid payload must be 16 bytes");
98
98
  this.writeFixedField(t, 14, () => this.buffer.writeBytes(r));
99
99
  }
100
100
  writeStringField(t, s) {
101
- const r = Y.encode(s ?? "");
101
+ const r = W.encode(s ?? "");
102
102
  this.writeVariableField(t, 12, r);
103
103
  }
104
104
  writeBinaryField(t, s) {
105
105
  this.writeVariableField(t, 13, s);
106
106
  }
107
107
  writeObjectField(t, s, r) {
108
- const n = new k(s);
108
+ const n = new M(s);
109
109
  r(n);
110
110
  const i = n.finish();
111
111
  this.writeVariableField(t, 11, i);
112
112
  }
113
113
  writeArrayField(t, s, r) {
114
- const n = new $(s);
114
+ const n = new X(s);
115
115
  r(n);
116
116
  const i = n.finish();
117
117
  this.writeVariableField(t, 9, i);
@@ -132,10 +132,10 @@ class k {
132
132
  this.writeFieldHeader(t, s, r.length), this.buffer.writeBytes(r);
133
133
  }
134
134
  writeFieldHeader(t, s, r) {
135
- this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(W(s)), ct(s) && this.buffer.writeVarUInt(r >>> 0);
135
+ this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(K(s)), ft(s) && this.buffer.writeVarUInt(r >>> 0);
136
136
  }
137
137
  }
138
- class $ {
138
+ class X {
139
139
  constructor(t) {
140
140
  this.elementType = t;
141
141
  }
@@ -188,7 +188,7 @@ class $ {
188
188
  14
189
189
  /* Guid */
190
190
  ), this.count++;
191
- const s = t instanceof f ? t.asBytes() : t;
191
+ const s = t instanceof c ? t.asBytes() : t;
192
192
  if (s.length !== 16)
193
193
  throw new Error("Guid payload must be 16 bytes");
194
194
  this.payload.writeBytes(s);
@@ -198,7 +198,7 @@ class $ {
198
198
  12
199
199
  /* String */
200
200
  ), this.count++;
201
- const s = Y.encode(t ?? "");
201
+ const s = W.encode(t ?? "");
202
202
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
203
203
  }
204
204
  writeBinary(t) {
@@ -212,7 +212,7 @@ class $ {
212
212
  11
213
213
  /* Object */
214
214
  ), this.count++;
215
- const r = new k(t);
215
+ const r = new M(t);
216
216
  s(r);
217
217
  const n = r.finish();
218
218
  this.payload.writeVarUInt(n.length), this.payload.writeBytes(n);
@@ -222,7 +222,7 @@ class $ {
222
222
  9
223
223
  /* Array */
224
224
  ), this.count++;
225
- const r = new $(t);
225
+ const r = new X(t);
226
226
  s(r);
227
227
  const n = r.finish();
228
228
  this.payload.writeBytes(n);
@@ -239,11 +239,11 @@ class $ {
239
239
  }
240
240
  finish() {
241
241
  const t = new b();
242
- return t.writeByte(W(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
242
+ return t.writeByte(K(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
243
243
  }
244
244
  ensureElementType(t) {
245
245
  if (this.elementType !== t)
246
- throw new Error(`Array element type is ${U[this.elementType]}, expected ${U[t]}`);
246
+ throw new Error(`Array element type is ${C[this.elementType]}, expected ${C[t]}`);
247
247
  }
248
248
  }
249
249
  class ee {
@@ -256,7 +256,7 @@ class ee {
256
256
  beginEntry() {
257
257
  if (this.entryOpen)
258
258
  throw new Error("Previous dictionary entry not completed");
259
- return this.count++, this.entryOpen = !0, new Et(this.keyType, this.valueType, this.payload, () => {
259
+ return this.count++, this.entryOpen = !0, new _t(this.keyType, this.valueType, this.payload, () => {
260
260
  this.entryOpen = !1;
261
261
  });
262
262
  }
@@ -264,10 +264,10 @@ class ee {
264
264
  if (this.entryOpen)
265
265
  throw new Error("Dictionary entry not completed");
266
266
  const t = new b();
267
- return t.writeByte(W(this.keyType)), t.writeByte(W(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
267
+ return t.writeByte(K(this.keyType)), t.writeByte(K(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
268
268
  }
269
269
  }
270
- class Et {
270
+ class _t {
271
271
  constructor(t, s, r, n) {
272
272
  this.keyType = t, this.valueType = s, this.payload = r, this.onComplete = n;
273
273
  }
@@ -321,7 +321,7 @@ class Et {
321
321
  14
322
322
  /* Guid */
323
323
  );
324
- const s = t instanceof f ? t.asBytes() : t;
324
+ const s = t instanceof c ? t.asBytes() : t;
325
325
  if (s.length !== 16)
326
326
  throw new Error("Guid payload must be 16 bytes");
327
327
  this.payload.writeBytes(s), this.keyWritten = !0;
@@ -331,7 +331,7 @@ class Et {
331
331
  12
332
332
  /* String */
333
333
  );
334
- const s = Y.encode(t ?? "");
334
+ const s = W.encode(t ?? "");
335
335
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.keyWritten = !0;
336
336
  }
337
337
  writeKeyBinary(t) {
@@ -387,7 +387,7 @@ class Et {
387
387
  14
388
388
  /* Guid */
389
389
  );
390
- const s = t instanceof f ? t.asBytes() : t;
390
+ const s = t instanceof c ? t.asBytes() : t;
391
391
  if (s.length !== 16)
392
392
  throw new Error("Guid payload must be 16 bytes");
393
393
  this.payload.writeBytes(s), this.valueWritten = !0;
@@ -409,7 +409,7 @@ class Et {
409
409
  12
410
410
  /* String */
411
411
  );
412
- const s = Y.encode(t ?? "");
412
+ const s = W.encode(t ?? "");
413
413
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
414
414
  }
415
415
  writeValueObject(t, s) {
@@ -417,7 +417,7 @@ class Et {
417
417
  11
418
418
  /* Object */
419
419
  );
420
- const r = new k(t);
420
+ const r = new M(t);
421
421
  s(r);
422
422
  const n = r.finish();
423
423
  this.payload.writeVarUInt(n.length), this.payload.writeBytes(n), this.valueWritten = !0;
@@ -427,7 +427,7 @@ class Et {
427
427
  9
428
428
  /* Array */
429
429
  );
430
- const r = new $(t);
430
+ const r = new X(t);
431
431
  s(r);
432
432
  const n = r.finish();
433
433
  this.payload.writeBytes(n), this.valueWritten = !0;
@@ -451,11 +451,11 @@ class Et {
451
451
  }
452
452
  ensureKeyType(t) {
453
453
  if (this.keyType !== t)
454
- throw new Error(`Dictionary key type is ${U[this.keyType]}, expected ${U[t]}`);
454
+ throw new Error(`Dictionary key type is ${C[this.keyType]}, expected ${C[t]}`);
455
455
  }
456
456
  ensureValueType(t) {
457
457
  if (this.valueType !== t)
458
- throw new Error(`Dictionary value type is ${U[this.valueType]}, expected ${U[t]}`);
458
+ throw new Error(`Dictionary value type is ${C[this.valueType]}, expected ${C[t]}`);
459
459
  }
460
460
  }
461
461
  class O {
@@ -465,12 +465,12 @@ class O {
465
465
  offset;
466
466
  end;
467
467
  static create(t) {
468
- const s = x(t);
468
+ const s = H(t);
469
469
  if (s.length < 2)
470
470
  throw new Error("Teleport payload too short");
471
471
  if (s[0] !== ue || s[s.length - 1] !== ce)
472
472
  throw new Error("Teleport object missing markers");
473
- const r = { offset: 1 }, n = w(s, r, "InvalidLength");
473
+ const r = { offset: 1 }, n = y(s, r, "InvalidLength");
474
474
  return new O(s, n, r.offset);
475
475
  }
476
476
  next() {
@@ -478,20 +478,20 @@ class O {
478
478
  return null;
479
479
  if (this.offset + 5 > this.buffer.length)
480
480
  throw new Error("Teleport object truncated");
481
- const t = ft(this.buffer, this.offset);
481
+ const t = Tt(this.buffer, this.offset);
482
482
  this.offset += 4;
483
483
  const s = this.buffer[this.offset++], r = s >> 4 & 15;
484
484
  if ((s & 15) !== 0)
485
485
  throw new Error("Teleport field flags must be zero");
486
- const n = P(r);
486
+ const n = p(r);
487
487
  let i;
488
488
  if (n >= 0)
489
- A(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
489
+ d(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
490
490
  else {
491
- const o = { offset: this.offset }, a = w(this.buffer, o, "InvalidLength");
492
- A(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
491
+ const o = { offset: this.offset }, a = y(this.buffer, o, "InvalidLength");
492
+ d(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
493
493
  }
494
- return new _t(t, r, i);
494
+ return new ht(t, r, i);
495
495
  }
496
496
  }
497
497
  class m {
@@ -556,13 +556,13 @@ class m {
556
556
  return this.ensureType(
557
557
  12
558
558
  /* String */
559
- ), It.decode(this.payload);
559
+ ), Et.decode(this.payload);
560
560
  }
561
561
  asGuid() {
562
562
  return this.ensureType(
563
563
  14
564
564
  /* Guid */
565
- ), f.fromBytes(this.payload);
565
+ ), c.fromBytes(this.payload);
566
566
  }
567
567
  asObject() {
568
568
  return this.ensureType(
@@ -584,10 +584,10 @@ class m {
584
584
  }
585
585
  ensureType(t) {
586
586
  if (this.type !== t)
587
- throw new Error(`Teleport value has type ${U[this.type]}, expected ${U[t]}`);
587
+ throw new Error(`Teleport value has type ${C[this.type]}, expected ${C[t]}`);
588
588
  }
589
589
  }
590
- class _t extends m {
590
+ class ht extends m {
591
591
  constructor(t, s, r) {
592
592
  super(s, r), this.fieldId = t;
593
593
  }
@@ -608,10 +608,10 @@ class te {
608
608
  if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
609
609
  throw new Error("Array flags must be zero");
610
610
  const r = { offset: 1 };
611
- this.count = w(t, r, "ArrayMalformed"), this.offset = r.offset;
611
+ this.count = y(t, r, "ArrayMalformed"), this.offset = r.offset;
612
612
  }
613
613
  static create(t) {
614
- return new te(x(t));
614
+ return new te(H(t));
615
615
  }
616
616
  next() {
617
617
  if (this.index >= this.count) {
@@ -632,38 +632,38 @@ class te {
632
632
  case 4:
633
633
  case 6:
634
634
  case 14: {
635
- const t = P(this.elementType);
636
- A(this.payload, this.offset, t);
635
+ const t = p(this.elementType);
636
+ d(this.payload, this.offset, t);
637
637
  const s = this.payload.subarray(this.offset, this.offset + t);
638
- return this.offset += t, new M(this.elementType, s);
638
+ return this.offset += t, new v(this.elementType, s);
639
639
  }
640
640
  case 12:
641
641
  case 13: {
642
- const t = { offset: this.offset }, s = w(this.payload, t, "ArrayMalformed");
643
- A(this.payload, t.offset, s);
642
+ const t = { offset: this.offset }, s = y(this.payload, t, "ArrayMalformed");
643
+ d(this.payload, t.offset, s);
644
644
  const r = this.payload.subarray(t.offset, t.offset + s);
645
- return this.offset = t.offset + s, new M(this.elementType, r);
645
+ return this.offset = t.offset + s, new v(this.elementType, r);
646
646
  }
647
647
  case 11: {
648
- const t = { offset: this.offset }, s = w(this.payload, t, "ArrayMalformed");
649
- A(this.payload, t.offset, s);
648
+ const t = { offset: this.offset }, s = y(this.payload, t, "ArrayMalformed");
649
+ d(this.payload, t.offset, s);
650
650
  const r = this.payload.subarray(t.offset, t.offset + s);
651
- return this.offset = t.offset + s, new M(11, r);
651
+ return this.offset = t.offset + s, new v(11, r);
652
652
  }
653
653
  case 9: {
654
654
  const t = ne(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
655
- return this.offset += t, new M(9, s);
655
+ return this.offset += t, new v(9, s);
656
656
  }
657
657
  case 10: {
658
658
  const t = ie(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
659
- return this.offset += t, new M(10, s);
659
+ return this.offset += t, new v(10, s);
660
660
  }
661
661
  default:
662
- throw new Error(`Unsupported array element type ${U[this.elementType]}`);
662
+ throw new Error(`Unsupported array element type ${C[this.elementType]}`);
663
663
  }
664
664
  }
665
665
  }
666
- class M extends m {
666
+ class v extends m {
667
667
  constructor(t, s) {
668
668
  super(t, s);
669
669
  }
@@ -682,10 +682,10 @@ class se {
682
682
  throw new Error("Dictionary key/value flags must be zero");
683
683
  re(this.keyType);
684
684
  const s = { offset: 2 };
685
- this.count = w(t, s, "DictMalformed"), this.offset = s.offset;
685
+ this.count = y(t, s, "DictMalformed"), this.offset = s.offset;
686
686
  }
687
687
  static create(t) {
688
- return new se(x(t));
688
+ return new se(H(t));
689
689
  }
690
690
  next() {
691
691
  if (this.index >= this.count) {
@@ -694,18 +694,18 @@ class se {
694
694
  return null;
695
695
  }
696
696
  const t = this.readKey(), s = this.readValue();
697
- return this.index++, new ht(t, s);
697
+ return this.index++, new ut(t, s);
698
698
  }
699
699
  readKey() {
700
- const t = P(this.keyType);
700
+ const t = p(this.keyType);
701
701
  if (t >= 0) {
702
- A(this.payload, this.offset, t);
702
+ d(this.payload, this.offset, t);
703
703
  const s = this.payload.subarray(this.offset, this.offset + t);
704
704
  return this.offset += t, new m(this.keyType, s);
705
705
  }
706
706
  if (this.keyType === 12 || this.keyType === 13) {
707
- const s = { offset: this.offset }, r = w(this.payload, s, "DictMalformed");
708
- A(this.payload, s.offset, r);
707
+ const s = { offset: this.offset }, r = y(this.payload, s, "DictMalformed");
708
+ d(this.payload, s.offset, r);
709
709
  const n = this.payload.subarray(s.offset, s.offset + r);
710
710
  return this.offset = s.offset + r, new m(this.keyType, n);
711
711
  }
@@ -715,14 +715,14 @@ class se {
715
715
  switch (this.valueType) {
716
716
  case 12:
717
717
  case 13: {
718
- const t = { offset: this.offset }, s = w(this.payload, t, "DictMalformed");
719
- A(this.payload, t.offset, s);
718
+ const t = { offset: this.offset }, s = y(this.payload, t, "DictMalformed");
719
+ d(this.payload, t.offset, s);
720
720
  const r = this.payload.subarray(t.offset, t.offset + s);
721
721
  return this.offset = t.offset + s, new m(this.valueType, r);
722
722
  }
723
723
  case 11: {
724
- const t = { offset: this.offset }, s = w(this.payload, t, "DictMalformed");
725
- A(this.payload, t.offset, s);
724
+ const t = { offset: this.offset }, s = y(this.payload, t, "DictMalformed");
725
+ d(this.payload, t.offset, s);
726
726
  const r = this.payload.subarray(t.offset, t.offset + s);
727
727
  return this.offset = t.offset + s, new m(11, r);
728
728
  }
@@ -743,22 +743,22 @@ class se {
743
743
  case 6:
744
744
  case 14:
745
745
  case 1: {
746
- const t = P(this.valueType);
747
- A(this.payload, this.offset, t);
746
+ const t = p(this.valueType);
747
+ d(this.payload, this.offset, t);
748
748
  const s = this.payload.subarray(this.offset, this.offset + t);
749
749
  return this.offset += t, new m(this.valueType, s);
750
750
  }
751
751
  default:
752
- throw new Error(`Unsupported dictionary value type ${U[this.valueType]}`);
752
+ throw new Error(`Unsupported dictionary value type ${C[this.valueType]}`);
753
753
  }
754
754
  }
755
755
  }
756
- class ht {
756
+ class ut {
757
757
  constructor(t, s) {
758
758
  this.key = t, this.value = s;
759
759
  }
760
760
  }
761
- class f {
761
+ class c {
762
762
  constructor(t) {
763
763
  this.bytes = t;
764
764
  }
@@ -768,19 +768,19 @@ class f {
768
768
  const s = t.replace(/-/g, "");
769
769
  if (s.length !== 32)
770
770
  throw new Error("Guid string must be 32 hex characters");
771
- const r = new Uint8Array(16), n = f.parseHexSlice(s, 0, 8), i = f.parseHexSlice(s, 8, 4), o = f.parseHexSlice(s, 12, 4);
772
- f.writeUInt32LE(r, 0, n), f.writeUInt16LE(r, 4, i), f.writeUInt16LE(r, 6, o);
771
+ const r = new Uint8Array(16), n = c.parseHexSlice(s, 0, 8), i = c.parseHexSlice(s, 8, 4), o = c.parseHexSlice(s, 12, 4);
772
+ c.writeUInt32LE(r, 0, n), c.writeUInt16LE(r, 4, i), c.writeUInt16LE(r, 6, o);
773
773
  for (let a = 0; a < 8; a++)
774
- r[8 + a] = f.parseHexSlice(s, 16 + a * 2, 2);
775
- return new f(r);
774
+ r[8 + a] = c.parseHexSlice(s, 16 + a * 2, 2);
775
+ return new c(r);
776
776
  }
777
777
  static fromBytes(t) {
778
778
  if (t.length !== 16)
779
779
  throw new Error("Guid byte array must be 16 bytes");
780
- return new f(Uint8Array.from(t));
780
+ return new c(Uint8Array.from(t));
781
781
  }
782
782
  static createZero() {
783
- return new f(new Uint8Array(16));
783
+ return new c(new Uint8Array(16));
784
784
  }
785
785
  static createRandom() {
786
786
  const t = new Uint8Array(16), s = globalThis.crypto;
@@ -789,14 +789,14 @@ class f {
789
789
  else
790
790
  for (let r = 0; r < t.length; r++)
791
791
  t[r] = Math.floor(Math.random() * 256);
792
- return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, new f(t);
792
+ return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, new c(t);
793
793
  }
794
794
  toString() {
795
795
  const t = this.bytes;
796
796
  return [
797
- f.toHex(f.readUInt32LE(t, 0), 8),
798
- f.toHex(f.readUInt16LE(t, 4), 4),
799
- f.toHex(f.readUInt16LE(t, 6), 4),
797
+ c.toHex(c.readUInt32LE(t, 0), 8),
798
+ c.toHex(c.readUInt16LE(t, 4), 4),
799
+ c.toHex(c.readUInt16LE(t, 6), 4),
800
800
  le(t.subarray(8, 10)),
801
801
  le(t.subarray(10, 16))
802
802
  ].join("-");
@@ -880,14 +880,14 @@ class b {
880
880
  return this.buffer.slice(0, this.length);
881
881
  }
882
882
  }
883
- function w(e, t, s) {
883
+ function y(e, t, s) {
884
884
  if (t.offset >= e.length)
885
885
  throw new Error(s);
886
886
  let r = 0, n = 0, i = 0;
887
887
  for (; t.offset < e.length; ) {
888
888
  const o = e[t.offset++];
889
889
  if (i++, r |= (o & 127) << n, (o & 128) === 0) {
890
- if (i !== ut(r))
890
+ if (i !== ct(r))
891
891
  throw new Error("Teleport VarUInt is not canonical");
892
892
  return r >>> 0;
893
893
  }
@@ -896,18 +896,18 @@ function w(e, t, s) {
896
896
  }
897
897
  throw new Error(s);
898
898
  }
899
- function ut(e) {
899
+ function ct(e) {
900
900
  return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
901
901
  }
902
- function W(e, t = 0) {
902
+ function K(e, t = 0) {
903
903
  if ((t & 240) !== 0)
904
904
  throw new Error("Teleport flags must fit into 4 bits");
905
905
  return (e & 15) << 4 | t & 15;
906
906
  }
907
- function ct(e) {
907
+ function ft(e) {
908
908
  return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
909
909
  }
910
- function P(e) {
910
+ function p(e) {
911
911
  switch (e) {
912
912
  case 3:
913
913
  case 5:
@@ -931,11 +931,11 @@ function re(e) {
931
931
  if (e === 9 || e === 11 || e === 10 || e === 1)
932
932
  throw new Error("Dictionary keys must be primitive Teleport types");
933
933
  }
934
- function A(e, t, s) {
934
+ function d(e, t, s) {
935
935
  if (t < 0 || s < 0 || t + s > e.length)
936
936
  throw new Error("Teleport payload exceeds bounds");
937
937
  }
938
- function ft(e, t) {
938
+ function Tt(e, t) {
939
939
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
940
940
  }
941
941
  function ne(e, t) {
@@ -944,10 +944,10 @@ function ne(e, t) {
944
944
  const s = e[t], r = s >> 4 & 15;
945
945
  if ((s & 15) !== 0)
946
946
  throw new Error("Array flags must be zero");
947
- const n = { offset: t + 1 }, i = w(e, n, "ArrayMalformed"), o = P(r);
947
+ const n = { offset: t + 1 }, i = y(e, n, "ArrayMalformed"), o = p(r);
948
948
  if (o >= 0) {
949
949
  const I = o * i;
950
- return A(e, n.offset, I), n.offset + I - t;
950
+ return d(e, n.offset, I), n.offset + I - t;
951
951
  }
952
952
  let a = n.offset;
953
953
  for (let I = 0; I < i; I++)
@@ -961,42 +961,42 @@ function ie(e, t) {
961
961
  if ((e[t] & 15) !== 0 || (e[t + 1] & 15) !== 0)
962
962
  throw new Error("Dictionary key/value flags must be zero");
963
963
  re(s);
964
- const n = { offset: t + 2 }, i = w(e, n, "DictMalformed");
964
+ const n = { offset: t + 2 }, i = y(e, n, "DictMalformed");
965
965
  let o = n.offset;
966
966
  for (let a = 0; a < i; a++)
967
967
  o = q(s, e, o, "DictMalformed"), o = q(r, e, o, "DictMalformed");
968
968
  return o - t;
969
969
  }
970
970
  function q(e, t, s, r) {
971
- const n = P(e);
971
+ const n = p(e);
972
972
  if (n >= 0)
973
- return A(t, s, n), s + n;
973
+ return d(t, s, n), s + n;
974
974
  switch (e) {
975
975
  case 12:
976
976
  case 13: {
977
- const i = { offset: s }, o = w(t, i, r);
978
- return A(t, i.offset, o), i.offset + o;
977
+ const i = { offset: s }, o = y(t, i, r);
978
+ return d(t, i.offset, o), i.offset + o;
979
979
  }
980
980
  case 11: {
981
- const i = { offset: s }, o = w(t, i, r);
982
- return A(t, i.offset, o), i.offset + o;
981
+ const i = { offset: s }, o = y(t, i, r);
982
+ return d(t, i.offset, o), i.offset + o;
983
983
  }
984
984
  case 9:
985
985
  return s + ne(t, s);
986
986
  case 10:
987
987
  return s + ie(t, s);
988
988
  default:
989
- throw new Error(`Unsupported Teleport type ${U[e]}`);
989
+ throw new Error(`Unsupported Teleport type ${C[e]}`);
990
990
  }
991
991
  }
992
992
  function le(e) {
993
993
  return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
994
994
  }
995
- function x(e) {
995
+ function H(e) {
996
996
  return e instanceof Uint8Array ? e : new Uint8Array(e);
997
997
  }
998
998
  var fe = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(fe || {}), Te = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(Te || {}), Se = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e[e.Native = 32] = "Native", e))(Se || {}), de = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(de || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(Ae || {}), Ne = /* @__PURE__ */ ((e) => (e[e.Css = 0] = "Css", e[e.Flutter = 1] = "Flutter", e))(Ne || {}), ye = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ye || {}), we = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(we || {}), Ce = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e[e.Dart = 4] = "Dart", e[e.Rust = 5] = "Rust", e))(Ce || {}), Ue = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(Ue || {}), Re = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(Re || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", e[e.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", e[e.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", e[e.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", e[e.CORE_WEBRTC_ICE_SERVERS_REQUEST = 65573] = "CORE_WEBRTC_ICE_SERVERS_REQUEST", e[e.CORE_WEBRTC_ICE_SERVERS_RESPONSE = 65574] = "CORE_WEBRTC_ICE_SERVERS_RESPONSE", e[e.CORE_WEBRTC_CLOSE = 65575] = "CORE_WEBRTC_CLOSE", e[e.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", e[e.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", e[e.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", e[e.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", e[e.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", e[e.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", e[e.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", e[e.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", e[e.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", e[e.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", e[e.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", e[e.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", e[e.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", e[e.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", e[e.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", e[e.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", e[e.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", e[e.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", e[e.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", e[e.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", e[e.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", e[e.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", e[e.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", e[e.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", e[e.ACTION_RESULT = 1048654] = "ACTION_RESULT", e[e.UI_RESYNC_REQUEST = 1048655] = "UI_RESYNC_REQUEST", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
999
- const Tt = 161083277, St = 265814330, dt = 1368629611, At = 2431514951, Nt = 2514959030, yt = 2745379226, wt = 3282782683, Ct = 3284746250, Ut = 4101844078;
999
+ const St = 161083277, dt = 265814330, At = 1368629611, Nt = 2431514951, yt = 2514959030, wt = 2745379226, Ct = 3282782683, Ut = 3284746250, Rt = 4101844078;
1000
1000
  function De(e) {
1001
1001
  const t = {};
1002
1002
  return Le(t), t;
@@ -1004,38 +1004,38 @@ function De(e) {
1004
1004
  function Le(e) {
1005
1005
  return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = fe.Unknown, e.CodecDetails = "", e.SampleRate = 0, e.Channels = 0, e.ShapeSets = void 0, e.CorrelationId = void 0, e;
1006
1006
  }
1007
- function Rt(e, t) {
1007
+ function Dt(e, t) {
1008
1008
  const s = t ?? De();
1009
- return Le(s), Dt(e, s), s;
1009
+ return Le(s), Lt(e, s), s;
1010
1010
  }
1011
- function Dt(e, t) {
1011
+ function Lt(e, t) {
1012
1012
  let s;
1013
1013
  for (; (s = e.next()) !== null; )
1014
1014
  switch (s.fieldId) {
1015
- case Tt: {
1015
+ case St: {
1016
1016
  if (s.isNull) throw new Error();
1017
1017
  t.StreamId = s.asString();
1018
1018
  break;
1019
1019
  }
1020
- case St: {
1020
+ case dt: {
1021
1021
  if (s.isNull) {
1022
1022
  t.ShapeSets = void 0;
1023
1023
  break;
1024
1024
  }
1025
- t.ShapeSets = Lt(s.asArray());
1025
+ t.ShapeSets = mt(s.asArray());
1026
1026
  break;
1027
1027
  }
1028
- case dt: {
1028
+ case At: {
1029
1029
  if (s.isNull) throw new Error();
1030
1030
  t.Description = s.asString();
1031
1031
  break;
1032
1032
  }
1033
- case At: {
1033
+ case Nt: {
1034
1034
  if (s.isNull) throw new Error();
1035
1035
  t.Channels = s.asInt32();
1036
1036
  break;
1037
1037
  }
1038
- case Nt: {
1038
+ case yt: {
1039
1039
  if (s.isNull) {
1040
1040
  t.CorrelationId = void 0;
1041
1041
  break;
@@ -1043,274 +1043,274 @@ function Dt(e, t) {
1043
1043
  t.CorrelationId = s.asString();
1044
1044
  break;
1045
1045
  }
1046
- case yt: {
1046
+ case wt: {
1047
1047
  if (s.isNull) throw new Error();
1048
1048
  t.CodecDetails = s.asString();
1049
1049
  break;
1050
1050
  }
1051
- case wt: {
1051
+ case Ct: {
1052
1052
  if (s.isNull) throw new Error();
1053
1053
  t.SourceType = s.asString();
1054
1054
  break;
1055
1055
  }
1056
- case Ct: {
1056
+ case Ut: {
1057
1057
  if (s.isNull) throw new Error();
1058
1058
  t.Codec = s.asInt32();
1059
1059
  break;
1060
1060
  }
1061
- case Ut: {
1061
+ case Rt: {
1062
1062
  if (s.isNull) throw new Error();
1063
1063
  t.SampleRate = s.asInt32();
1064
1064
  break;
1065
1065
  }
1066
1066
  }
1067
1067
  }
1068
- function Lt(e) {
1068
+ function mt(e) {
1069
1069
  const t = [];
1070
1070
  let s;
1071
1071
  for (; (s = e.next()) !== null; )
1072
- t.push(Ft(s.asObject()));
1072
+ t.push(Pt(s.asObject()));
1073
1073
  return t;
1074
1074
  }
1075
- const mt = 1107713536, Ot = 1154362099, gt = 1185721362;
1076
- function bt(e) {
1075
+ const Ot = 1107713536, gt = 1154362099, bt = 1185721362;
1076
+ function Ft(e) {
1077
1077
  const t = {};
1078
1078
  return me(t), t;
1079
1079
  }
1080
1080
  function me(e) {
1081
1081
  return e.SetId = 0, e.Name = "", e.ShapeNames = [], e;
1082
1082
  }
1083
- function Ft(e, t) {
1084
- const s = t ?? bt();
1085
- return me(s), Pt(e, s), s;
1086
- }
1087
1083
  function Pt(e, t) {
1084
+ const s = t ?? Ft();
1085
+ return me(s), pt(e, s), s;
1086
+ }
1087
+ function pt(e, t) {
1088
1088
  let s;
1089
1089
  for (; (s = e.next()) !== null; )
1090
1090
  switch (s.fieldId) {
1091
- case mt: {
1091
+ case Ot: {
1092
1092
  if (s.isNull) throw new Error();
1093
1093
  t.Name = s.asString();
1094
1094
  break;
1095
1095
  }
1096
- case Ot: {
1096
+ case gt: {
1097
1097
  if (s.isNull) throw new Error();
1098
1098
  t.SetId = s.asUInt32();
1099
1099
  break;
1100
1100
  }
1101
- case gt: {
1101
+ case bt: {
1102
1102
  if (s.isNull) throw new Error();
1103
- t.ShapeNames = pt(s.asArray());
1103
+ t.ShapeNames = kt(s.asArray());
1104
1104
  break;
1105
1105
  }
1106
1106
  }
1107
1107
  }
1108
- function pt(e) {
1108
+ function kt(e) {
1109
1109
  const t = [];
1110
1110
  let s;
1111
1111
  for (; (s = e.next()) !== null; )
1112
1112
  t.push(s.asString());
1113
1113
  return t;
1114
1114
  }
1115
- const kt = 76337612, Mt = 185396121, vt = 250031587, Bt = 388632637, Vt = 417197284, Gt = 425972532, xt = 469070965, Ht = 470595159, Yt = 594855258, Wt = 617065367, Kt = 661691032, $t = 781727218, Xt = 834078886, jt = 1043273762, zt = 1236999138, Jt = 1286979607, qt = 1368629611, Qt = 1437068682, Zt = 1668375353, es = 1715899485, ts = 1942830531, ss = 1999510636, rs = 2033288346, ns = 2079864626, is = 2142346422, os = 2228539873, as = 2232517119, ls = 2598291686, Is = 2719718823, Es = 2810953526, _s = 2840065720, hs = 2885165957, us = 3542818975, cs = 3586157513, fs = 3717933110, Ts = 4062655306;
1116
- function Ss(e) {
1115
+ const Mt = 76337612, vt = 185396121, Bt = 250031587, Vt = 388632637, Gt = 417197284, xt = 425972532, Ht = 469070965, Yt = 470595159, Wt = 594855258, Kt = 617065367, $t = 661691032, Xt = 781727218, jt = 834078886, zt = 1043273762, Jt = 1236999138, qt = 1286979607, Qt = 1368629611, Zt = 1437068682, es = 1668375353, ts = 1715899485, ss = 1942830531, rs = 1999510636, ns = 2033288346, is = 2079864626, os = 2142346422, as = 2228539873, ls = 2232517119, Is = 2598291686, Es = 2719718823, _s = 2810953526, hs = 2840065720, us = 2885165957, cs = 3542818975, fs = 3586157513, Ts = 3717933110, Ss = 4062655306;
1116
+ function ds(e) {
1117
1117
  const t = {};
1118
1118
  return Oe(t), t;
1119
1119
  }
1120
1120
  function Oe(e) {
1121
1121
  return e.ContextType = Se.Unknown, e.UserType = ye.Unknown, e.PayloadType = de.Unknown, e.Description = "", e.UserId = "", e.DeviceId = "", e.ProductId = "", e.VersionId = "", e.InstallId = "", e.Locale = "", e.SessionId = -1, e.IsInternal = !1, e.IsSnapshot = !1, e.IsReady = !1, e.HasInput = !1, e.ChannelLocale = "", e.EmbeddedSpaceId = "", e.AuthSessionId = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = 0n, e.UserAgent = "", e.ClientType = Te.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = Ce.Unknown, e.SdkCapability = 0, e.ViewportWidth = 0, e.ViewportHeight = 0, e.Theme = "", e.Timezone = "", e.IsTouchDevice = !1, e.InitialPath = "", e.StyleFormat = Ne.Css, e.SupportsCompression = !0, e.IsSoftDisconnected = !1, e.SoftDisconnectAt = 0n, e;
1122
1122
  }
1123
- function ds(e, t) {
1124
- const s = t ?? Ss();
1125
- return Oe(s), As(e, s), s;
1126
- }
1127
1123
  function As(e, t) {
1124
+ const s = t ?? ds();
1125
+ return Oe(s), Ns(e, s), s;
1126
+ }
1127
+ function Ns(e, t) {
1128
1128
  let s;
1129
1129
  for (; (s = e.next()) !== null; )
1130
1130
  switch (s.fieldId) {
1131
- case kt: {
1131
+ case Mt: {
1132
1132
  if (s.isNull) throw new Error();
1133
1133
  t.DeviceId = s.asString();
1134
1134
  break;
1135
1135
  }
1136
- case Mt: {
1136
+ case vt: {
1137
1137
  if (s.isNull) throw new Error();
1138
1138
  t.InstallId = s.asString();
1139
1139
  break;
1140
1140
  }
1141
- case vt: {
1141
+ case Bt: {
1142
1142
  if (s.isNull) throw new Error();
1143
1143
  t.Theme = s.asString();
1144
1144
  break;
1145
1145
  }
1146
- case Bt: {
1146
+ case Vt: {
1147
1147
  if (s.isNull) throw new Error();
1148
1148
  t.UserAgent = s.asString();
1149
1149
  break;
1150
1150
  }
1151
- case Vt: {
1151
+ case Gt: {
1152
1152
  if (s.isNull) throw new Error();
1153
1153
  t.ContextType = s.asInt32();
1154
1154
  break;
1155
1155
  }
1156
- case Gt: {
1156
+ case xt: {
1157
1157
  if (s.isNull) throw new Error();
1158
1158
  t.SoftDisconnectAt = s.asUInt64();
1159
1159
  break;
1160
1160
  }
1161
- case xt: {
1161
+ case Ht: {
1162
1162
  if (s.isNull) throw new Error();
1163
1163
  t.HasInput = s.asBool();
1164
1164
  break;
1165
1165
  }
1166
- case Ht: {
1166
+ case Yt: {
1167
1167
  if (s.isNull) throw new Error();
1168
1168
  t.UserType = s.asInt32();
1169
1169
  break;
1170
1170
  }
1171
- case Yt: {
1171
+ case Wt: {
1172
1172
  if (s.isNull) throw new Error();
1173
1173
  t.InitialPath = s.asString();
1174
1174
  break;
1175
1175
  }
1176
- case Wt: {
1176
+ case Kt: {
1177
1177
  if (s.isNull) throw new Error();
1178
1178
  t.IsSoftDisconnected = s.asBool();
1179
1179
  break;
1180
1180
  }
1181
- case Kt: {
1181
+ case $t: {
1182
1182
  if (s.isNull) throw new Error();
1183
1183
  t.SupportsCompression = s.asBool();
1184
1184
  break;
1185
1185
  }
1186
- case $t: {
1186
+ case Xt: {
1187
1187
  if (s.isNull) throw new Error();
1188
1188
  t.UserId = s.asString();
1189
1189
  break;
1190
1190
  }
1191
- case Xt: {
1191
+ case jt: {
1192
1192
  if (s.isNull) throw new Error();
1193
1193
  t.ProductId = s.asString();
1194
1194
  break;
1195
1195
  }
1196
- case jt: {
1196
+ case zt: {
1197
1197
  if (s.isNull) throw new Error();
1198
1198
  t.AuthSessionId = s.asString();
1199
1199
  break;
1200
1200
  }
1201
- case zt: {
1201
+ case Jt: {
1202
1202
  if (s.isNull) throw new Error();
1203
1203
  t.ReceiveAllMessages = s.asBool();
1204
1204
  break;
1205
1205
  }
1206
- case Jt: {
1206
+ case qt: {
1207
1207
  if (s.isNull) throw new Error();
1208
1208
  t.ViewportHeight = s.asInt32();
1209
1209
  break;
1210
1210
  }
1211
- case qt: {
1211
+ case Qt: {
1212
1212
  if (s.isNull) throw new Error();
1213
1213
  t.Description = s.asString();
1214
1214
  break;
1215
1215
  }
1216
- case Qt: {
1216
+ case Zt: {
1217
1217
  if (s.isNull) throw new Error();
1218
1218
  t.SdkCapability = s.asInt32();
1219
1219
  break;
1220
1220
  }
1221
- case Zt: {
1221
+ case es: {
1222
1222
  if (s.isNull) throw new Error();
1223
1223
  t.IsSnapshot = s.asBool();
1224
1224
  break;
1225
1225
  }
1226
- case es: {
1226
+ case ts: {
1227
1227
  if (s.isNull) throw new Error();
1228
1228
  t.Locale = s.asString();
1229
1229
  break;
1230
1230
  }
1231
- case ts: {
1231
+ case ss: {
1232
1232
  if (s.isNull) throw new Error();
1233
1233
  t.SdkType = s.asInt32();
1234
1234
  break;
1235
1235
  }
1236
- case ss: {
1236
+ case rs: {
1237
1237
  if (s.isNull) throw new Error();
1238
1238
  t.SessionId = s.asInt32();
1239
1239
  break;
1240
1240
  }
1241
- case rs: {
1241
+ case ns: {
1242
1242
  if (s.isNull) throw new Error();
1243
1243
  t.ViewportWidth = s.asInt32();
1244
1244
  break;
1245
1245
  }
1246
- case ns: {
1246
+ case is: {
1247
1247
  if (s.isNull) throw new Error();
1248
1248
  t.PreciseJoinedAt = s.asUInt64();
1249
1249
  break;
1250
1250
  }
1251
- case is: {
1251
+ case os: {
1252
1252
  if (s.isNull) throw new Error();
1253
1253
  t.PayloadType = s.asInt32();
1254
1254
  break;
1255
1255
  }
1256
- case os: {
1256
+ case as: {
1257
1257
  if (s.isNull) throw new Error();
1258
1258
  t.StyleFormat = s.asInt32();
1259
1259
  break;
1260
1260
  }
1261
- case as: {
1261
+ case ls: {
1262
1262
  if (s.isNull) throw new Error();
1263
1263
  t.IsTouchDevice = s.asBool();
1264
1264
  break;
1265
1265
  }
1266
- case ls: {
1266
+ case Is: {
1267
1267
  if (s.isNull) throw new Error();
1268
1268
  t.VersionId = s.asString();
1269
1269
  break;
1270
1270
  }
1271
- case Is: {
1271
+ case Es: {
1272
1272
  if (s.isNull) throw new Error();
1273
1273
  t.UniqueSessionId = s.asString();
1274
1274
  break;
1275
1275
  }
1276
- case Es: {
1276
+ case _s: {
1277
1277
  if (s.isNull) throw new Error();
1278
1278
  t.ClientType = s.asInt32();
1279
1279
  break;
1280
1280
  }
1281
- case _s: {
1281
+ case hs: {
1282
1282
  if (s.isNull) throw new Error();
1283
1283
  t.IsReady = s.asBool();
1284
1284
  break;
1285
1285
  }
1286
- case hs: {
1286
+ case us: {
1287
1287
  if (s.isNull) throw new Error();
1288
- t.Parameters = Ns(s.asDictionary());
1288
+ t.Parameters = ys(s.asDictionary());
1289
1289
  break;
1290
1290
  }
1291
- case us: {
1291
+ case cs: {
1292
1292
  if (s.isNull) throw new Error();
1293
1293
  t.Timezone = s.asString();
1294
1294
  break;
1295
1295
  }
1296
- case cs: {
1296
+ case fs: {
1297
1297
  if (s.isNull) throw new Error();
1298
1298
  t.IsInternal = s.asBool();
1299
1299
  break;
1300
1300
  }
1301
- case fs: {
1301
+ case Ts: {
1302
1302
  if (s.isNull) throw new Error();
1303
1303
  t.ChannelLocale = s.asString();
1304
1304
  break;
1305
1305
  }
1306
- case Ts: {
1306
+ case Ss: {
1307
1307
  if (s.isNull) throw new Error();
1308
1308
  t.EmbeddedSpaceId = s.asString();
1309
1309
  break;
1310
1310
  }
1311
1311
  }
1312
1312
  }
1313
- function Ns(e) {
1313
+ function ys(e) {
1314
1314
  const t = /* @__PURE__ */ Object.create(null);
1315
1315
  let s;
1316
1316
  for (; (s = e.next()) !== null; ) {
@@ -1319,162 +1319,162 @@ function Ns(e) {
1319
1319
  }
1320
1320
  return t;
1321
1321
  }
1322
- const ys = 703025676, ws = 814454131, Cs = 972460562, Us = 976255570, Rs = 1368629611, Ds = 1479280922, Ls = 1533537016, ms = 1909301063, Os = 2274386296, gs = 2603556958, bs = 2885165957, Fs = 3568439632;
1323
- function Ps(e) {
1322
+ const ws = 703025676, Cs = 814454131, Us = 972460562, Rs = 976255570, Ds = 1368629611, Ls = 1479280922, ms = 1533537016, Os = 1909301063, gs = 2274386296, bs = 2603556958, Fs = 2885165957, Ps = 3568439632;
1323
+ function ps(e) {
1324
1324
  const t = {};
1325
1325
  return ge(t), t;
1326
1326
  }
1327
1327
  function ge(e) {
1328
- return e.FunctionId = f.fromBytes(new Uint8Array(16)), e.FunctionName = "", e.Parameters = [], e.ResultTypeName = "", e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.IsCancellable = !1, e.Description = "", e.LlmInlineResult = !1, e.LlmCallOnlyOnce = !1, e.RequiresInstance = !1, e.Versions = [], e;
1329
- }
1330
- function ps(e, t) {
1331
- const s = t ?? Ps();
1332
- return ge(s), ks(e, s), s;
1328
+ return e.FunctionId = c.fromBytes(new Uint8Array(16)), e.FunctionName = "", e.Parameters = [], e.ResultTypeName = "", e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.IsCancellable = !1, e.Description = "", e.LlmInlineResult = !1, e.LlmCallOnlyOnce = !1, e.RequiresInstance = !1, e.Versions = [], e;
1333
1329
  }
1334
1330
  function ks(e, t) {
1331
+ const s = t ?? ps();
1332
+ return ge(s), Ms(e, s), s;
1333
+ }
1334
+ function Ms(e, t) {
1335
1335
  let s;
1336
1336
  for (; (s = e.next()) !== null; )
1337
1337
  switch (s.fieldId) {
1338
- case ys: {
1338
+ case ws: {
1339
1339
  if (s.isNull) throw new Error();
1340
1340
  t.ResultTypeName = s.asString();
1341
1341
  break;
1342
1342
  }
1343
- case ws: {
1343
+ case Cs: {
1344
1344
  if (s.isNull) throw new Error();
1345
1345
  t.FunctionName = s.asString();
1346
1346
  break;
1347
1347
  }
1348
- case Cs: {
1348
+ case Us: {
1349
1349
  if (s.isNull) throw new Error();
1350
1350
  t.EnumerableItemTypeName = s.asString();
1351
1351
  break;
1352
1352
  }
1353
- case Us: {
1353
+ case Rs: {
1354
1354
  if (s.isNull) throw new Error();
1355
1355
  t.FunctionId = s.asGuid();
1356
1356
  break;
1357
1357
  }
1358
- case Rs: {
1358
+ case Ds: {
1359
1359
  if (s.isNull) throw new Error();
1360
1360
  t.Description = s.asString();
1361
1361
  break;
1362
1362
  }
1363
- case Ds: {
1363
+ case Ls: {
1364
1364
  if (s.isNull) throw new Error();
1365
1365
  t.IsCancellable = s.asBool();
1366
1366
  break;
1367
1367
  }
1368
- case Ls: {
1368
+ case ms: {
1369
1369
  if (s.isNull) throw new Error();
1370
1370
  t.RequiresInstance = s.asBool();
1371
1371
  break;
1372
1372
  }
1373
- case ms: {
1373
+ case Os: {
1374
1374
  if (s.isNull) throw new Error();
1375
- t.Versions = Ms(s.asArray());
1375
+ t.Versions = vs(s.asArray());
1376
1376
  break;
1377
1377
  }
1378
- case Os: {
1378
+ case gs: {
1379
1379
  if (s.isNull) throw new Error();
1380
1380
  t.LlmInlineResult = s.asBool();
1381
1381
  break;
1382
1382
  }
1383
- case gs: {
1383
+ case bs: {
1384
1384
  if (s.isNull) throw new Error();
1385
1385
  t.IsEnumerable = s.asBool();
1386
1386
  break;
1387
1387
  }
1388
- case bs: {
1388
+ case Fs: {
1389
1389
  if (s.isNull) throw new Error();
1390
- t.Parameters = vs(s.asArray());
1390
+ t.Parameters = Bs(s.asArray());
1391
1391
  break;
1392
1392
  }
1393
- case Fs: {
1393
+ case Ps: {
1394
1394
  if (s.isNull) throw new Error();
1395
1395
  t.LlmCallOnlyOnce = s.asBool();
1396
1396
  break;
1397
1397
  }
1398
1398
  }
1399
1399
  }
1400
- function Ms(e) {
1400
+ function vs(e) {
1401
1401
  const t = [];
1402
1402
  let s;
1403
1403
  for (; (s = e.next()) !== null; )
1404
1404
  t.push(s.asString());
1405
1405
  return t;
1406
1406
  }
1407
- function vs(e) {
1407
+ function Bs(e) {
1408
1408
  const t = [];
1409
1409
  let s;
1410
1410
  for (; (s = e.next()) !== null; )
1411
- t.push(js(s.asObject()));
1411
+ t.push(zs(s.asObject()));
1412
1412
  return t;
1413
1413
  }
1414
- const Bs = 607861992, Vs = 894485888, Gs = 972460562, xs = 1368629611, Hs = 1883521406, Ys = 2603556958, Ws = 3609695522, Ks = 4075263697, $s = 4257460908;
1415
- function Xs(e) {
1414
+ const Vs = 607861992, Gs = 894485888, xs = 972460562, Hs = 1368629611, Ys = 1883521406, Ws = 2603556958, Ks = 3609695522, $s = 4075263697, Xs = 4257460908;
1415
+ function js(e) {
1416
1416
  const t = {};
1417
1417
  return be(t), t;
1418
1418
  }
1419
1419
  function be(e) {
1420
1420
  return e.ParameterIndex = 0, e.ParameterName = "", e.TypeName = "", e.HasDefaultValue = !1, e.DefaultValueJson = "", e.DefaultValueData = new Uint8Array(0), e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.Description = "", e;
1421
1421
  }
1422
- function js(e, t) {
1423
- const s = t ?? Xs();
1424
- return be(s), zs(e, s), s;
1425
- }
1426
1422
  function zs(e, t) {
1423
+ const s = t ?? js();
1424
+ return be(s), Js(e, s), s;
1425
+ }
1426
+ function Js(e, t) {
1427
1427
  let s;
1428
1428
  for (; (s = e.next()) !== null; )
1429
1429
  switch (s.fieldId) {
1430
- case Bs: {
1430
+ case Vs: {
1431
1431
  if (s.isNull) throw new Error();
1432
1432
  t.HasDefaultValue = s.asBool();
1433
1433
  break;
1434
1434
  }
1435
- case Vs: {
1435
+ case Gs: {
1436
1436
  if (s.isNull) throw new Error();
1437
1437
  t.DefaultValueJson = s.asString();
1438
1438
  break;
1439
1439
  }
1440
- case Gs: {
1440
+ case xs: {
1441
1441
  if (s.isNull) throw new Error();
1442
1442
  t.EnumerableItemTypeName = s.asString();
1443
1443
  break;
1444
1444
  }
1445
- case xs: {
1445
+ case Hs: {
1446
1446
  if (s.isNull) throw new Error();
1447
1447
  t.Description = s.asString();
1448
1448
  break;
1449
1449
  }
1450
- case Hs: {
1450
+ case Ys: {
1451
1451
  if (s.isNull) throw new Error();
1452
1452
  t.DefaultValueData = s.asBinary();
1453
1453
  break;
1454
1454
  }
1455
- case Ys: {
1455
+ case Ws: {
1456
1456
  if (s.isNull) throw new Error();
1457
1457
  t.IsEnumerable = s.asBool();
1458
1458
  break;
1459
1459
  }
1460
- case Ws: {
1460
+ case Ks: {
1461
1461
  if (s.isNull) throw new Error();
1462
1462
  t.TypeName = s.asString();
1463
1463
  break;
1464
1464
  }
1465
- case Ks: {
1465
+ case $s: {
1466
1466
  if (s.isNull) throw new Error();
1467
1467
  t.ParameterName = s.asString();
1468
1468
  break;
1469
1469
  }
1470
- case $s: {
1470
+ case Xs: {
1471
1471
  if (s.isNull) throw new Error();
1472
1472
  t.ParameterIndex = s.asInt32();
1473
1473
  break;
1474
1474
  }
1475
1475
  }
1476
1476
  }
1477
- const Js = 3167053791, qs = 3342364356, Qs = 3612929027;
1477
+ const qs = 3167053791, Qs = 3342364356, Zs = 3612929027;
1478
1478
  function Fe(e) {
1479
1479
  const t = {};
1480
1480
  return Pe(t), t;
@@ -1482,79 +1482,79 @@ function Fe(e) {
1482
1482
  function Pe(e) {
1483
1483
  return e.Category = "", e.Type = Ae.Face, e.FaceBlendshapes = [], e;
1484
1484
  }
1485
- function Zs(e, t) {
1485
+ function er(e, t) {
1486
1486
  const s = t ?? Fe();
1487
- return Pe(s), er(e, s), s;
1487
+ return Pe(s), tr(e, s), s;
1488
1488
  }
1489
- function er(e, t) {
1489
+ function tr(e, t) {
1490
1490
  let s;
1491
1491
  for (; (s = e.next()) !== null; )
1492
1492
  switch (s.fieldId) {
1493
- case Js: {
1493
+ case qs: {
1494
1494
  if (s.isNull) throw new Error();
1495
1495
  t.Type = s.asInt32();
1496
1496
  break;
1497
1497
  }
1498
- case qs: {
1498
+ case Qs: {
1499
1499
  if (s.isNull) throw new Error();
1500
- t.FaceBlendshapes = tr(s.asArray());
1500
+ t.FaceBlendshapes = sr(s.asArray());
1501
1501
  break;
1502
1502
  }
1503
- case Qs: {
1503
+ case Zs: {
1504
1504
  if (s.isNull) throw new Error();
1505
1505
  t.Category = s.asString();
1506
1506
  break;
1507
1507
  }
1508
1508
  }
1509
1509
  }
1510
- function tr(e) {
1510
+ function sr(e) {
1511
1511
  const t = [];
1512
1512
  let s;
1513
1513
  for (; (s = e.next()) !== null; )
1514
1514
  t.push(s.asString());
1515
1515
  return t;
1516
1516
  }
1517
- const sr = 1405462580, rr = 2968276160;
1518
- function nr(e) {
1517
+ const rr = 1405462580, nr = 2968276160;
1518
+ function ir(e) {
1519
1519
  const t = {};
1520
1520
  return pe(t), t;
1521
1521
  }
1522
1522
  function pe(e) {
1523
1523
  return e.MimeType = "", e.Value = new Uint8Array(0), e;
1524
1524
  }
1525
- function ir(e, t) {
1526
- const s = t ?? nr();
1527
- return pe(s), or(e, s), s;
1528
- }
1529
1525
  function or(e, t) {
1526
+ const s = t ?? ir();
1527
+ return pe(s), ar(e, s), s;
1528
+ }
1529
+ function ar(e, t) {
1530
1530
  let s;
1531
1531
  for (; (s = e.next()) !== null; )
1532
1532
  switch (s.fieldId) {
1533
- case sr: {
1533
+ case rr: {
1534
1534
  if (s.isNull) throw new Error();
1535
1535
  t.Value = s.asBinary();
1536
1536
  break;
1537
1537
  }
1538
- case rr: {
1538
+ case nr: {
1539
1539
  if (s.isNull) throw new Error();
1540
1540
  t.MimeType = s.asString();
1541
1541
  break;
1542
1542
  }
1543
1543
  }
1544
1544
  }
1545
- const ke = 1, ar = 1048655, lr = 3469892363;
1546
- function Ir(e) {
1547
- const t = new k(ke);
1548
- return Er(e, t), t.finish();
1545
+ const ke = 1, lr = 1048655, Ir = 3469892363;
1546
+ function Er(e) {
1547
+ const t = new M(ke);
1548
+ return _r(e, t), t.finish();
1549
1549
  }
1550
- function Er(e, t) {
1551
- t.writeInt32Field(lr, e.TrackId | 0);
1550
+ function _r(e, t) {
1551
+ t.writeInt32Field(Ir, e.TrackId | 0);
1552
1552
  }
1553
- function _r(e, t, s) {
1554
- const r = Ir(e);
1555
- return he(ar, r, ke, t, s);
1553
+ function hr(e, t, s) {
1554
+ const r = Er(e);
1555
+ return he(lr, r, ke, t, s);
1556
1556
  }
1557
- const hr = 3612929027;
1557
+ const ur = 3612929027;
1558
1558
  function Me(e) {
1559
1559
  const t = {};
1560
1560
  return ve(t), t;
@@ -1562,58 +1562,58 @@ function Me(e) {
1562
1562
  function ve(e) {
1563
1563
  return e.Category = "", e;
1564
1564
  }
1565
- function ur(e, t) {
1565
+ function cr(e, t) {
1566
1566
  const s = t ?? Me();
1567
- return ve(s), cr(e, s), s;
1567
+ return ve(s), fr(e, s), s;
1568
1568
  }
1569
- function cr(e, t) {
1569
+ function fr(e, t) {
1570
1570
  let s;
1571
1571
  for (; (s = e.next()) !== null; )
1572
1572
  switch (s.fieldId) {
1573
- case hr: {
1573
+ case ur: {
1574
1574
  if (s.isNull) throw new Error();
1575
1575
  t.Category = s.asString();
1576
1576
  break;
1577
1577
  }
1578
1578
  }
1579
1579
  }
1580
- const fr = 2097188, Tr = 979822885, Sr = 2374537704;
1581
- function dr(e) {
1580
+ const Tr = 2097188, Sr = 979822885, dr = 2374537704;
1581
+ function Ar(e) {
1582
1582
  const t = {};
1583
1583
  return Be(t), t;
1584
1584
  }
1585
1585
  function Be(e) {
1586
1586
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1587
1587
  }
1588
- function Ar(e, t) {
1589
- const s = O.create(e);
1590
- return Nr(s, t);
1591
- }
1592
1588
  function Nr(e, t) {
1593
- const s = t ?? dr();
1594
- return Be(s), yr(e, s), s;
1589
+ const s = O.create(e);
1590
+ return yr(s, t);
1595
1591
  }
1596
1592
  function yr(e, t) {
1593
+ const s = t ?? Ar();
1594
+ return Be(s), wr(e, s), s;
1595
+ }
1596
+ function wr(e, t) {
1597
1597
  let s;
1598
1598
  for (; (s = e.next()) !== null; )
1599
1599
  switch (s.fieldId) {
1600
- case Tr: {
1600
+ case Sr: {
1601
1601
  if (s.isNull) throw new Error();
1602
1602
  t.StyleId = s.asString();
1603
1603
  break;
1604
1604
  }
1605
- case Sr: {
1605
+ case dr: {
1606
1606
  if (s.isNull) throw new Error();
1607
- t.Style = Cr(s.asDictionary());
1607
+ t.Style = Ur(s.asDictionary());
1608
1608
  break;
1609
1609
  }
1610
1610
  }
1611
1611
  }
1612
- async function wr(e, t) {
1613
- const s = await G(e, fr);
1614
- return Ar(s, t);
1612
+ async function Cr(e, t) {
1613
+ const s = await x(e, Tr);
1614
+ return Nr(s, t);
1615
1615
  }
1616
- function Cr(e) {
1616
+ function Ur(e) {
1617
1617
  const t = /* @__PURE__ */ Object.create(null);
1618
1618
  let s;
1619
1619
  for (; (s = e.next()) !== null; ) {
@@ -1622,73 +1622,73 @@ function Cr(e) {
1622
1622
  }
1623
1623
  return t;
1624
1624
  }
1625
- const Ur = 2097192, Rr = 2136687806;
1626
- function Dr(e) {
1625
+ const Rr = 2097192, Dr = 2136687806;
1626
+ function Lr(e) {
1627
1627
  const t = {};
1628
1628
  return Ve(t), t;
1629
1629
  }
1630
1630
  function Ve(e) {
1631
1631
  return e.Styles = [], e;
1632
1632
  }
1633
- function Lr(e, t) {
1634
- const s = O.create(e);
1635
- return mr(s, t);
1636
- }
1637
1633
  function mr(e, t) {
1638
- const s = t ?? Dr();
1639
- return Ve(s), Or(e, s), s;
1634
+ const s = O.create(e);
1635
+ return Or(s, t);
1640
1636
  }
1641
1637
  function Or(e, t) {
1638
+ const s = t ?? Lr();
1639
+ return Ve(s), gr(e, s), s;
1640
+ }
1641
+ function gr(e, t) {
1642
1642
  let s;
1643
1643
  for (; (s = e.next()) !== null; )
1644
1644
  switch (s.fieldId) {
1645
- case Rr: {
1645
+ case Dr: {
1646
1646
  if (s.isNull) throw new Error();
1647
- t.Styles = br(s.asArray());
1647
+ t.Styles = Fr(s.asArray());
1648
1648
  break;
1649
1649
  }
1650
1650
  }
1651
1651
  }
1652
- async function gr(e, t) {
1653
- const s = await G(e, Ur);
1654
- return Lr(s, t);
1652
+ async function br(e, t) {
1653
+ const s = await x(e, Rr);
1654
+ return mr(s, t);
1655
1655
  }
1656
- function br(e) {
1656
+ function Fr(e) {
1657
1657
  const t = [];
1658
1658
  let s;
1659
1659
  for (; (s = e.next()) !== null; )
1660
- t.push(kr(s.asObject()));
1660
+ t.push(Mr(s.asObject()));
1661
1661
  return t;
1662
1662
  }
1663
- const Fr = 979822885, Pr = 2374537704;
1664
- function pr(e) {
1663
+ const Pr = 979822885, pr = 2374537704;
1664
+ function kr(e) {
1665
1665
  const t = {};
1666
1666
  return Ge(t), t;
1667
1667
  }
1668
1668
  function Ge(e) {
1669
1669
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1670
1670
  }
1671
- function kr(e, t) {
1672
- const s = t ?? pr();
1673
- return Ge(s), Mr(e, s), s;
1674
- }
1675
1671
  function Mr(e, t) {
1672
+ const s = t ?? kr();
1673
+ return Ge(s), vr(e, s), s;
1674
+ }
1675
+ function vr(e, t) {
1676
1676
  let s;
1677
1677
  for (; (s = e.next()) !== null; )
1678
1678
  switch (s.fieldId) {
1679
- case Fr: {
1679
+ case Pr: {
1680
1680
  if (s.isNull) throw new Error();
1681
1681
  t.StyleId = s.asString();
1682
1682
  break;
1683
1683
  }
1684
- case Pr: {
1684
+ case pr: {
1685
1685
  if (s.isNull) throw new Error();
1686
- t.Style = vr(s.asDictionary());
1686
+ t.Style = Br(s.asDictionary());
1687
1687
  break;
1688
1688
  }
1689
1689
  }
1690
1690
  }
1691
- function vr(e) {
1691
+ function Br(e) {
1692
1692
  const t = /* @__PURE__ */ Object.create(null);
1693
1693
  let s;
1694
1694
  for (; (s = e.next()) !== null; ) {
@@ -1697,102 +1697,102 @@ function vr(e) {
1697
1697
  }
1698
1698
  return t;
1699
1699
  }
1700
- const Br = 2097193, Vr = 1415642792;
1701
- function Gr(e) {
1700
+ const Vr = 2097193, Gr = 1415642792;
1701
+ function xr(e) {
1702
1702
  const t = {};
1703
1703
  return xe(t), t;
1704
1704
  }
1705
1705
  function xe(e) {
1706
1706
  return e.StyleIds = [], e;
1707
1707
  }
1708
- function xr(e, t) {
1709
- const s = O.create(e);
1710
- return Hr(s, t);
1711
- }
1712
1708
  function Hr(e, t) {
1713
- const s = t ?? Gr();
1714
- return xe(s), Yr(e, s), s;
1709
+ const s = O.create(e);
1710
+ return Yr(s, t);
1715
1711
  }
1716
1712
  function Yr(e, t) {
1713
+ const s = t ?? xr();
1714
+ return xe(s), Wr(e, s), s;
1715
+ }
1716
+ function Wr(e, t) {
1717
1717
  let s;
1718
1718
  for (; (s = e.next()) !== null; )
1719
1719
  switch (s.fieldId) {
1720
- case Vr: {
1720
+ case Gr: {
1721
1721
  if (s.isNull) throw new Error();
1722
- t.StyleIds = Kr(s.asArray());
1722
+ t.StyleIds = $r(s.asArray());
1723
1723
  break;
1724
1724
  }
1725
1725
  }
1726
1726
  }
1727
- async function Wr(e, t) {
1728
- const s = await G(e, Br);
1729
- return xr(s, t);
1727
+ async function Kr(e, t) {
1728
+ const s = await x(e, Vr);
1729
+ return Hr(s, t);
1730
1730
  }
1731
- function Kr(e) {
1731
+ function $r(e) {
1732
1732
  const t = [];
1733
1733
  let s;
1734
1734
  for (; (s = e.next()) !== null; )
1735
1735
  t.push(s.asString());
1736
1736
  return t;
1737
1737
  }
1738
- const $r = 2097190, Xr = 425183262, jr = 653781469;
1739
- function zr(e) {
1738
+ const Xr = 2097190, jr = 425183262, zr = 653781469;
1739
+ function Jr(e) {
1740
1740
  const t = {};
1741
1741
  return He(t), t;
1742
1742
  }
1743
1743
  function He(e) {
1744
1744
  return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
1745
1745
  }
1746
- function Jr(e, t) {
1747
- const s = O.create(e);
1748
- return qr(s, t);
1749
- }
1750
1746
  function qr(e, t) {
1751
- const s = t ?? zr();
1752
- return He(s), Qr(e, s), s;
1747
+ const s = O.create(e);
1748
+ return Qr(s, t);
1753
1749
  }
1754
1750
  function Qr(e, t) {
1751
+ const s = t ?? Jr();
1752
+ return He(s), Zr(e, s), s;
1753
+ }
1754
+ function Zr(e, t) {
1755
1755
  let s;
1756
1756
  for (; (s = e.next()) !== null; )
1757
1757
  switch (s.fieldId) {
1758
- case Xr: {
1758
+ case jr: {
1759
1759
  if (s.isNull) throw new Error();
1760
1760
  t.Json = s.asString();
1761
1761
  break;
1762
1762
  }
1763
- case jr: {
1763
+ case zr: {
1764
1764
  if (s.isNull) throw new Error();
1765
- t.Payloads = en(s.asDictionary());
1765
+ t.Payloads = tn(s.asDictionary());
1766
1766
  break;
1767
1767
  }
1768
1768
  }
1769
1769
  }
1770
- async function Zr(e, t) {
1771
- const s = await G(e, $r);
1772
- return Jr(s, t);
1770
+ async function en(e, t) {
1771
+ const s = await x(e, Xr);
1772
+ return qr(s, t);
1773
1773
  }
1774
- function en(e) {
1774
+ function tn(e) {
1775
1775
  const t = /* @__PURE__ */ Object.create(null);
1776
1776
  let s;
1777
1777
  for (; (s = e.next()) !== null; ) {
1778
1778
  const r = s.key.asString();
1779
- t[r] = ir(s.value.asObject());
1779
+ t[r] = or(s.value.asObject());
1780
1780
  }
1781
1781
  return t;
1782
1782
  }
1783
- const Ye = 1, tn = 1048636, sn = 2610786289;
1784
- function rn(e) {
1785
- const t = new k(Ye);
1786
- return nn(e, t), t.finish();
1783
+ const Ye = 1, sn = 1048636, rn = 2610786289;
1784
+ function nn(e) {
1785
+ const t = new M(Ye);
1786
+ return on(e, t), t.finish();
1787
1787
  }
1788
- function nn(e, t) {
1789
- t.writeUInt32Field(sn, e.Version >>> 0);
1788
+ function on(e, t) {
1789
+ t.writeUInt32Field(rn, e.Version >>> 0);
1790
1790
  }
1791
- function on(e, t, s) {
1792
- const r = rn(e);
1793
- return he(tn, r, Ye, t, s);
1791
+ function an(e, t, s) {
1792
+ const r = nn(e);
1793
+ return he(sn, r, Ye, t, s);
1794
1794
  }
1795
- const an = 161083277, ln = 164808083, In = 1368629611, En = 2514959030, _n = 2745379226, hn = 2950031986, un = 3282782683, cn = 3284746250, fn = 4065070594;
1795
+ const ln = 161083277, In = 164808083, En = 1368629611, _n = 2514959030, hn = 2745379226, un = 2950031986, cn = 3282782683, fn = 3284746250, Tn = 4065070594;
1796
1796
  function We(e) {
1797
1797
  const t = {};
1798
1798
  return Ke(t), t;
@@ -1800,30 +1800,30 @@ function We(e) {
1800
1800
  function Ke(e) {
1801
1801
  return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = we.H264, e.CodecDetails = "", e.Width = 0, e.Height = 0, e.Framerate = 30, e.CorrelationId = void 0, e;
1802
1802
  }
1803
- function Tn(e, t) {
1803
+ function Sn(e, t) {
1804
1804
  const s = t ?? We();
1805
- return Ke(s), Sn(e, s), s;
1805
+ return Ke(s), dn(e, s), s;
1806
1806
  }
1807
- function Sn(e, t) {
1807
+ function dn(e, t) {
1808
1808
  let s;
1809
1809
  for (; (s = e.next()) !== null; )
1810
1810
  switch (s.fieldId) {
1811
- case an: {
1811
+ case ln: {
1812
1812
  if (s.isNull) throw new Error();
1813
1813
  t.StreamId = s.asString();
1814
1814
  break;
1815
1815
  }
1816
- case ln: {
1816
+ case In: {
1817
1817
  if (s.isNull) throw new Error();
1818
1818
  t.Framerate = s.asFloat64();
1819
1819
  break;
1820
1820
  }
1821
- case In: {
1821
+ case En: {
1822
1822
  if (s.isNull) throw new Error();
1823
1823
  t.Description = s.asString();
1824
1824
  break;
1825
1825
  }
1826
- case En: {
1826
+ case _n: {
1827
1827
  if (s.isNull) {
1828
1828
  t.CorrelationId = void 0;
1829
1829
  break;
@@ -1831,378 +1831,378 @@ function Sn(e, t) {
1831
1831
  t.CorrelationId = s.asString();
1832
1832
  break;
1833
1833
  }
1834
- case _n: {
1834
+ case hn: {
1835
1835
  if (s.isNull) throw new Error();
1836
1836
  t.CodecDetails = s.asString();
1837
1837
  break;
1838
1838
  }
1839
- case hn: {
1839
+ case un: {
1840
1840
  if (s.isNull) throw new Error();
1841
1841
  t.Height = s.asInt32();
1842
1842
  break;
1843
1843
  }
1844
- case un: {
1844
+ case cn: {
1845
1845
  if (s.isNull) throw new Error();
1846
1846
  t.SourceType = s.asString();
1847
1847
  break;
1848
1848
  }
1849
- case cn: {
1849
+ case fn: {
1850
1850
  if (s.isNull) throw new Error();
1851
1851
  t.Codec = s.asInt32();
1852
1852
  break;
1853
1853
  }
1854
- case fn: {
1854
+ case Tn: {
1855
1855
  if (s.isNull) throw new Error();
1856
1856
  t.Width = s.asInt32();
1857
1857
  break;
1858
1858
  }
1859
1859
  }
1860
1860
  }
1861
- const dn = 65539, An = 693643444, Nn = 976837618, yn = 1144553441, wn = 1497620243, Cn = 1559330978, Un = 1976546434, Rn = 2271236852, Dn = 2277643855, Ln = 2469008121, mn = 3042922213, On = 3064612128, gn = 3219210453, bn = 3504054055, Fn = 3678477544, Pn = 3696445035, pn = 3707543140, kn = 3712281496, Mn = 3895362455, vn = 3897397815, Bn = 3914217035, Vn = 4225107827;
1862
- function Gn(e) {
1861
+ const An = 65539, Nn = 693643444, yn = 976837618, wn = 1144553441, Cn = 1497620243, Un = 1559330978, Rn = 1976546434, Dn = 2271236852, Ln = 2277643855, mn = 2469008121, On = 3042922213, gn = 3064612128, bn = 3219210453, Fn = 3504054055, Pn = 3678477544, pn = 3696445035, kn = 3707543140, Mn = 3712281496, vn = 3895362455, Bn = 3897397815, Vn = 3914217035, Gn = 4225107827;
1862
+ function xn(e) {
1863
1863
  const t = {};
1864
1864
  return $e(t), t;
1865
1865
  }
1866
1866
  function $e(e) {
1867
1867
  return e.Clients = /* @__PURE__ */ Object.create(null), e.Functions = /* @__PURE__ */ Object.create(null), e.UIStreams = /* @__PURE__ */ Object.create(null), e.AudioStreams = /* @__PURE__ */ Object.create(null), e.VideoStreams = /* @__PURE__ */ Object.create(null), e.TrackingStreams = /* @__PURE__ */ Object.create(null), e.SpaceId = "", e.ChannelId = "", e.ServerSessionId = "", e.SessionHash = "", e.ChannelUrl = "", e.SessionChannelUrl = "", e.FirstUserId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.ServerRunType = Ue.Local, e.AppSourceType = Re.Bundle, e.PublicAccess = !1, e.DebugMode = !1, e;
1868
1868
  }
1869
- function xn(e, t) {
1870
- const s = O.create(e);
1871
- return Hn(s, t);
1872
- }
1873
1869
  function Hn(e, t) {
1874
- const s = t ?? Gn();
1875
- return $e(s), Yn(e, s), s;
1870
+ const s = O.create(e);
1871
+ return Yn(s, t);
1876
1872
  }
1877
1873
  function Yn(e, t) {
1874
+ const s = t ?? xn();
1875
+ return $e(s), Wn(e, s), s;
1876
+ }
1877
+ function Wn(e, t) {
1878
1878
  let s;
1879
1879
  for (; (s = e.next()) !== null; )
1880
1880
  switch (s.fieldId) {
1881
- case An: {
1882
- if (s.isNull) throw new Error();
1883
- t.FirstUserId = s.asString();
1884
- break;
1885
- }
1886
1881
  case Nn: {
1887
1882
  if (s.isNull) throw new Error();
1888
- t.SessionHash = s.asString();
1883
+ t.FirstUserId = s.asString();
1889
1884
  break;
1890
1885
  }
1891
1886
  case yn: {
1892
1887
  if (s.isNull) throw new Error();
1893
- t.Clients = Kn(s.asDictionary());
1888
+ t.SessionHash = s.asString();
1894
1889
  break;
1895
1890
  }
1896
1891
  case wn: {
1897
1892
  if (s.isNull) throw new Error();
1898
- t.TrackingStreams = $n(s.asDictionary());
1893
+ t.Clients = $n(s.asDictionary());
1899
1894
  break;
1900
1895
  }
1901
1896
  case Cn: {
1902
1897
  if (s.isNull) throw new Error();
1903
- t.ChannelId = s.asString();
1898
+ t.TrackingStreams = Xn(s.asDictionary());
1904
1899
  break;
1905
1900
  }
1906
1901
  case Un: {
1907
1902
  if (s.isNull) throw new Error();
1908
- t.AppSourceType = s.asInt32();
1903
+ t.ChannelId = s.asString();
1909
1904
  break;
1910
1905
  }
1911
1906
  case Rn: {
1912
1907
  if (s.isNull) throw new Error();
1913
- t.SessionChannelUrl = s.asString();
1908
+ t.AppSourceType = s.asInt32();
1914
1909
  break;
1915
1910
  }
1916
1911
  case Dn: {
1917
1912
  if (s.isNull) throw new Error();
1918
- t.ChannelUrl = s.asString();
1913
+ t.SessionChannelUrl = s.asString();
1919
1914
  break;
1920
1915
  }
1921
1916
  case Ln: {
1922
1917
  if (s.isNull) throw new Error();
1923
- t.ChannelName = s.asString();
1918
+ t.ChannelUrl = s.asString();
1924
1919
  break;
1925
1920
  }
1926
1921
  case mn: {
1927
1922
  if (s.isNull) throw new Error();
1928
- t.PublicAccess = s.asBool();
1923
+ t.ChannelName = s.asString();
1929
1924
  break;
1930
1925
  }
1931
1926
  case On: {
1932
1927
  if (s.isNull) throw new Error();
1933
- t.ServerRunType = s.asInt32();
1928
+ t.PublicAccess = s.asBool();
1934
1929
  break;
1935
1930
  }
1936
1931
  case gn: {
1937
1932
  if (s.isNull) throw new Error();
1938
- t.OrganisationName = s.asString();
1933
+ t.ServerRunType = s.asInt32();
1939
1934
  break;
1940
1935
  }
1941
1936
  case bn: {
1942
1937
  if (s.isNull) throw new Error();
1943
- t.DebugMode = s.asBool();
1938
+ t.OrganisationName = s.asString();
1944
1939
  break;
1945
1940
  }
1946
1941
  case Fn: {
1947
1942
  if (s.isNull) throw new Error();
1948
- t.Functions = Xn(s.asDictionary());
1943
+ t.DebugMode = s.asBool();
1949
1944
  break;
1950
1945
  }
1951
1946
  case Pn: {
1952
1947
  if (s.isNull) throw new Error();
1953
- t.UIStreams = jn(s.asDictionary());
1948
+ t.Functions = jn(s.asDictionary());
1954
1949
  break;
1955
1950
  }
1956
1951
  case pn: {
1957
1952
  if (s.isNull) throw new Error();
1958
- t.SpaceId = s.asString();
1953
+ t.UIStreams = zn(s.asDictionary());
1959
1954
  break;
1960
1955
  }
1961
1956
  case kn: {
1962
1957
  if (s.isNull) throw new Error();
1963
- t.PrimaryUserId = s.asString();
1958
+ t.SpaceId = s.asString();
1964
1959
  break;
1965
1960
  }
1966
1961
  case Mn: {
1967
1962
  if (s.isNull) throw new Error();
1968
- t.AudioStreams = zn(s.asDictionary());
1963
+ t.PrimaryUserId = s.asString();
1969
1964
  break;
1970
1965
  }
1971
1966
  case vn: {
1972
1967
  if (s.isNull) throw new Error();
1973
- t.VideoStreams = Jn(s.asDictionary());
1968
+ t.AudioStreams = Jn(s.asDictionary());
1974
1969
  break;
1975
1970
  }
1976
1971
  case Bn: {
1977
1972
  if (s.isNull) throw new Error();
1978
- t.ServerSessionId = s.asString();
1973
+ t.VideoStreams = qn(s.asDictionary());
1979
1974
  break;
1980
1975
  }
1981
1976
  case Vn: {
1977
+ if (s.isNull) throw new Error();
1978
+ t.ServerSessionId = s.asString();
1979
+ break;
1980
+ }
1981
+ case Gn: {
1982
1982
  if (s.isNull) throw new Error();
1983
1983
  t.SpaceName = s.asString();
1984
1984
  break;
1985
1985
  }
1986
1986
  }
1987
1987
  }
1988
- async function Wn(e, t) {
1989
- const s = await G(e, dn);
1990
- return xn(s, t);
1988
+ async function Kn(e, t) {
1989
+ const s = await x(e, An);
1990
+ return Hn(s, t);
1991
1991
  }
1992
- function Kn(e) {
1992
+ function $n(e) {
1993
1993
  const t = /* @__PURE__ */ Object.create(null);
1994
1994
  let s;
1995
1995
  for (; (s = e.next()) !== null; ) {
1996
1996
  const r = s.key.asInt32();
1997
- t[r] = ds(s.value.asObject());
1997
+ t[r] = As(s.value.asObject());
1998
1998
  }
1999
1999
  return t;
2000
2000
  }
2001
- function $n(e) {
2001
+ function Xn(e) {
2002
2002
  const t = /* @__PURE__ */ Object.create(null);
2003
2003
  let s;
2004
2004
  for (; (s = e.next()) !== null; ) {
2005
2005
  const r = s.key.asString();
2006
- t[r] = Ui(s.value.asObject());
2006
+ t[r] = Ri(s.value.asObject());
2007
2007
  }
2008
2008
  return t;
2009
2009
  }
2010
- function Xn(e) {
2010
+ function jn(e) {
2011
2011
  const t = /* @__PURE__ */ Object.create(null);
2012
2012
  let s;
2013
2013
  for (; (s = e.next()) !== null; ) {
2014
2014
  const r = s.key.asInt32();
2015
- t[r] = qn(s.value.asArray());
2015
+ t[r] = Qn(s.value.asArray());
2016
2016
  }
2017
2017
  return t;
2018
2018
  }
2019
- function jn(e) {
2019
+ function zn(e) {
2020
2020
  const t = /* @__PURE__ */ Object.create(null);
2021
2021
  let s;
2022
2022
  for (; (s = e.next()) !== null; ) {
2023
2023
  const r = s.key.asString();
2024
- t[r] = ri(s.value.asObject());
2024
+ t[r] = ni(s.value.asObject());
2025
2025
  }
2026
2026
  return t;
2027
2027
  }
2028
- function zn(e) {
2028
+ function Jn(e) {
2029
2029
  const t = /* @__PURE__ */ Object.create(null);
2030
2030
  let s;
2031
2031
  for (; (s = e.next()) !== null; ) {
2032
2032
  const r = s.key.asString();
2033
- t[r] = Ei(s.value.asObject());
2033
+ t[r] = _i(s.value.asObject());
2034
2034
  }
2035
2035
  return t;
2036
2036
  }
2037
- function Jn(e) {
2037
+ function qn(e) {
2038
2038
  const t = /* @__PURE__ */ Object.create(null);
2039
2039
  let s;
2040
2040
  for (; (s = e.next()) !== null; ) {
2041
2041
  const r = s.key.asString();
2042
- t[r] = Si(s.value.asObject());
2042
+ t[r] = di(s.value.asObject());
2043
2043
  }
2044
2044
  return t;
2045
2045
  }
2046
- function qn(e) {
2046
+ function Qn(e) {
2047
2047
  const t = [];
2048
2048
  let s;
2049
2049
  for (; (s = e.next()) !== null; )
2050
- t.push(ps(s.asObject()));
2050
+ t.push(ks(s.asObject()));
2051
2051
  return t;
2052
2052
  }
2053
- const Qn = 161083277, Zn = 325678206, ei = 3469892363, ti = 3645544153;
2054
- function si(e) {
2053
+ const Zn = 161083277, ei = 325678206, ti = 3469892363, si = 3645544153;
2054
+ function ri(e) {
2055
2055
  const t = {};
2056
2056
  return Xe(t), t;
2057
2057
  }
2058
2058
  function Xe(e) {
2059
2059
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Me(), e;
2060
2060
  }
2061
- function ri(e, t) {
2062
- const s = t ?? si();
2063
- return Xe(s), ni(e, s), s;
2064
- }
2065
2061
  function ni(e, t) {
2062
+ const s = t ?? ri();
2063
+ return Xe(s), ii(e, s), s;
2064
+ }
2065
+ function ii(e, t) {
2066
2066
  let s;
2067
2067
  for (; (s = e.next()) !== null; )
2068
2068
  switch (s.fieldId) {
2069
- case Qn: {
2069
+ case Zn: {
2070
2070
  if (s.isNull) throw new Error();
2071
2071
  t.StreamId = s.asString();
2072
2072
  break;
2073
2073
  }
2074
- case Zn: {
2074
+ case ei: {
2075
2075
  if (s.isNull) throw new Error();
2076
2076
  t.ClientSessionId = s.asInt32();
2077
2077
  break;
2078
2078
  }
2079
- case ei: {
2079
+ case ti: {
2080
2080
  if (s.isNull) throw new Error();
2081
2081
  t.TrackId = s.asInt32();
2082
2082
  break;
2083
2083
  }
2084
- case ti: {
2084
+ case si: {
2085
2085
  if (s.isNull) throw new Error();
2086
- t.Info = ur(s.asObject());
2086
+ t.Info = cr(s.asObject());
2087
2087
  break;
2088
2088
  }
2089
2089
  }
2090
2090
  }
2091
- const ii = 161083277, oi = 325678206, ai = 3469892363, li = 3645544153;
2092
- function Ii(e) {
2091
+ const oi = 161083277, ai = 325678206, li = 3469892363, Ii = 3645544153;
2092
+ function Ei(e) {
2093
2093
  const t = {};
2094
2094
  return je(t), t;
2095
2095
  }
2096
2096
  function je(e) {
2097
2097
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = De(), e;
2098
2098
  }
2099
- function Ei(e, t) {
2100
- const s = t ?? Ii();
2101
- return je(s), _i(e, s), s;
2102
- }
2103
2099
  function _i(e, t) {
2100
+ const s = t ?? Ei();
2101
+ return je(s), hi(e, s), s;
2102
+ }
2103
+ function hi(e, t) {
2104
2104
  let s;
2105
2105
  for (; (s = e.next()) !== null; )
2106
2106
  switch (s.fieldId) {
2107
- case ii: {
2107
+ case oi: {
2108
2108
  if (s.isNull) throw new Error();
2109
2109
  t.StreamId = s.asString();
2110
2110
  break;
2111
2111
  }
2112
- case oi: {
2112
+ case ai: {
2113
2113
  if (s.isNull) throw new Error();
2114
2114
  t.ClientSessionId = s.asInt32();
2115
2115
  break;
2116
2116
  }
2117
- case ai: {
2117
+ case li: {
2118
2118
  if (s.isNull) throw new Error();
2119
2119
  t.TrackId = s.asInt32();
2120
2120
  break;
2121
2121
  }
2122
- case li: {
2122
+ case Ii: {
2123
2123
  if (s.isNull) throw new Error();
2124
- t.Info = Rt(s.asObject());
2124
+ t.Info = Dt(s.asObject());
2125
2125
  break;
2126
2126
  }
2127
2127
  }
2128
2128
  }
2129
- const hi = 161083277, ui = 325678206, ci = 3469892363, fi = 3645544153;
2130
- function Ti(e) {
2129
+ const ui = 161083277, ci = 325678206, fi = 3469892363, Ti = 3645544153;
2130
+ function Si(e) {
2131
2131
  const t = {};
2132
2132
  return ze(t), t;
2133
2133
  }
2134
2134
  function ze(e) {
2135
2135
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = We(), e;
2136
2136
  }
2137
- function Si(e, t) {
2138
- const s = t ?? Ti();
2139
- return ze(s), di(e, s), s;
2140
- }
2141
2137
  function di(e, t) {
2138
+ const s = t ?? Si();
2139
+ return ze(s), Ai(e, s), s;
2140
+ }
2141
+ function Ai(e, t) {
2142
2142
  let s;
2143
2143
  for (; (s = e.next()) !== null; )
2144
2144
  switch (s.fieldId) {
2145
- case hi: {
2145
+ case ui: {
2146
2146
  if (s.isNull) throw new Error();
2147
2147
  t.StreamId = s.asString();
2148
2148
  break;
2149
2149
  }
2150
- case ui: {
2150
+ case ci: {
2151
2151
  if (s.isNull) throw new Error();
2152
2152
  t.ClientSessionId = s.asInt32();
2153
2153
  break;
2154
2154
  }
2155
- case ci: {
2155
+ case fi: {
2156
2156
  if (s.isNull) throw new Error();
2157
2157
  t.TrackId = s.asInt32();
2158
2158
  break;
2159
2159
  }
2160
- case fi: {
2160
+ case Ti: {
2161
2161
  if (s.isNull) throw new Error();
2162
- t.Info = Tn(s.asObject());
2162
+ t.Info = Sn(s.asObject());
2163
2163
  break;
2164
2164
  }
2165
2165
  }
2166
2166
  }
2167
- const Ai = 161083277, Ni = 325678206, yi = 3469892363, wi = 3645544153;
2168
- function Ci(e) {
2167
+ const Ni = 161083277, yi = 325678206, wi = 3469892363, Ci = 3645544153;
2168
+ function Ui(e) {
2169
2169
  const t = {};
2170
2170
  return Je(t), t;
2171
2171
  }
2172
2172
  function Je(e) {
2173
2173
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Fe(), e;
2174
2174
  }
2175
- function Ui(e, t) {
2176
- const s = t ?? Ci();
2177
- return Je(s), Ri(e, s), s;
2178
- }
2179
2175
  function Ri(e, t) {
2176
+ const s = t ?? Ui();
2177
+ return Je(s), Di(e, s), s;
2178
+ }
2179
+ function Di(e, t) {
2180
2180
  let s;
2181
2181
  for (; (s = e.next()) !== null; )
2182
2182
  switch (s.fieldId) {
2183
- case Ai: {
2183
+ case Ni: {
2184
2184
  if (s.isNull) throw new Error();
2185
2185
  t.StreamId = s.asString();
2186
2186
  break;
2187
2187
  }
2188
- case Ni: {
2188
+ case yi: {
2189
2189
  if (s.isNull) throw new Error();
2190
2190
  t.ClientSessionId = s.asInt32();
2191
2191
  break;
2192
2192
  }
2193
- case yi: {
2193
+ case wi: {
2194
2194
  if (s.isNull) throw new Error();
2195
2195
  t.TrackId = s.asInt32();
2196
2196
  break;
2197
2197
  }
2198
- case wi: {
2198
+ case Ci: {
2199
2199
  if (s.isNull) throw new Error();
2200
- t.Info = Zs(s.asObject());
2200
+ t.Info = er(s.asObject());
2201
2201
  break;
2202
2202
  }
2203
2203
  }
2204
2204
  }
2205
- function R(e) {
2205
+ function U(e) {
2206
2206
  return typeof e == "object" && e !== null && !Array.isArray(e);
2207
2207
  }
2208
2208
  function qe(e) {
@@ -2241,7 +2241,7 @@ function oe(e, t) {
2241
2241
  throw new Error(`Invalid or missing node type for ${s}`);
2242
2242
  let a = {};
2243
2243
  if (n != null) {
2244
- if (!R(n))
2244
+ if (!U(n))
2245
2245
  throw new Error(`Invalid props for node ${s}`);
2246
2246
  a = qe(n);
2247
2247
  }
@@ -2259,8 +2259,8 @@ function oe(e, t) {
2259
2259
  ...l ? { sourceMarker: l } : {}
2260
2260
  };
2261
2261
  }
2262
- function Di(e, t) {
2263
- if (!R(e))
2262
+ function Li(e, t) {
2263
+ if (!U(e))
2264
2264
  throw new Error(`Invalid text delta at ${t}`);
2265
2265
  const s = e.NodeId, r = e.PropertyName, n = e.Start, i = e.End, o = e.InsertedText;
2266
2266
  if (typeof s != "string" || s.length === 0)
@@ -2286,21 +2286,21 @@ function Di(e, t) {
2286
2286
  insertedText: o
2287
2287
  };
2288
2288
  }
2289
- function Li(e, t) {
2290
- if (!R(e))
2289
+ function mi(e, t) {
2290
+ if (!U(e))
2291
2291
  throw new Error(`Invalid child insert at ${t}`);
2292
2292
  const s = e.Index, r = e.Node;
2293
2293
  if (typeof s != "number" || !Number.isFinite(s))
2294
2294
  throw new Error(`Invalid child insert index at ${t}`);
2295
- if (!R(r))
2295
+ if (!U(r))
2296
2296
  throw new Error(`Invalid child insert node at ${t}`);
2297
2297
  return {
2298
2298
  index: s,
2299
2299
  node: oe(r, `${t}.node`)
2300
2300
  };
2301
2301
  }
2302
- function mi(e, t) {
2303
- if (!R(e))
2302
+ function Oi(e, t) {
2303
+ if (!U(e))
2304
2304
  throw new Error(`Invalid child move at ${t}`);
2305
2305
  const s = e.NodeId, r = e.FromIndex, n = e.ToIndex;
2306
2306
  if (typeof s != "string" || s.length === 0)
@@ -2315,8 +2315,8 @@ function mi(e, t) {
2315
2315
  toIndex: n
2316
2316
  };
2317
2317
  }
2318
- function Oi(e, t) {
2319
- if (!R(e))
2318
+ function gi(e, t) {
2319
+ if (!U(e))
2320
2320
  throw new Error(`Invalid child remove at ${t}`);
2321
2321
  const s = e.NodeId, r = e.Index;
2322
2322
  if (typeof s != "string" || s.length === 0)
@@ -2328,31 +2328,31 @@ function Oi(e, t) {
2328
2328
  index: r
2329
2329
  };
2330
2330
  }
2331
- function gi(e, t) {
2332
- if (!R(e))
2331
+ function bi(e, t) {
2332
+ if (!U(e))
2333
2333
  throw new Error(`Invalid node change at ${t}`);
2334
2334
  const s = e.nodeId;
2335
2335
  if (typeof s != "string" || s.length === 0)
2336
2336
  throw new Error(`Invalid node change nodeId at ${t}`);
2337
2337
  const r = Array.isArray(e.inserts) ? e.inserts.map(
2338
- (l, E) => Li(l ?? {}, `${t}.inserts[${E}]`)
2338
+ (l, E) => mi(l ?? {}, `${t}.inserts[${E}]`)
2339
2339
  ) : void 0, n = Array.isArray(e.moves) ? e.moves.map(
2340
- (l, E) => mi(l ?? {}, `${t}.moves[${E}]`)
2340
+ (l, E) => Oi(l ?? {}, `${t}.moves[${E}]`)
2341
2341
  ) : void 0, i = Array.isArray(e.removals) ? e.removals.map(
2342
- (l, E) => Oi(l ?? {}, `${t}.removals[${E}]`)
2342
+ (l, E) => gi(l ?? {}, `${t}.removals[${E}]`)
2343
2343
  ) : void 0;
2344
2344
  let o;
2345
- if (R(e.changedProps)) {
2345
+ if (U(e.changedProps)) {
2346
2346
  o = /* @__PURE__ */ new Map();
2347
2347
  for (const [l, E] of Object.entries(e.changedProps)) {
2348
- if (!R(E))
2348
+ if (!U(E))
2349
2349
  continue;
2350
2350
  const h = E.New;
2351
- h === void 0 ? o.set(l, void 0) : R(h) ? o.set(l, qe(h)) : o.set(l, h);
2351
+ h === void 0 ? o.set(l, void 0) : U(h) ? o.set(l, qe(h)) : o.set(l, h);
2352
2352
  }
2353
2353
  }
2354
2354
  const a = Array.isArray(e.textUpdates) ? e.textUpdates.map(
2355
- (l, E) => Di(l ?? {}, `${t}.textUpdates[${E}]`)
2355
+ (l, E) => Li(l ?? {}, `${t}.textUpdates[${E}]`)
2356
2356
  ) : void 0, I = e.styleIds, _ = I !== void 0 ? Qe(I, t, s, !0) : void 0;
2357
2357
  return {
2358
2358
  nodeId: s,
@@ -2364,19 +2364,19 @@ function gi(e, t) {
2364
2364
  ..._ !== void 0 ? { styleIds: _ } : {}
2365
2365
  };
2366
2366
  }
2367
- function bi(e) {
2367
+ function Fi(e) {
2368
2368
  const t = /* @__PURE__ */ new Map();
2369
2369
  for (const [s, r] of Object.entries(e))
2370
2370
  t.set(s, r);
2371
2371
  return t;
2372
2372
  }
2373
- function Fi(e, t, s) {
2373
+ function Pi(e, t, s) {
2374
2374
  if (!e || typeof e != "object")
2375
2375
  throw new D("UI update graph is missing");
2376
2376
  const r = oe(e, "graph");
2377
2377
  if (r.type !== "root")
2378
2378
  throw new D('UI update root element must have type "root"');
2379
- const n = pi(r.props, t);
2379
+ const n = ki(r.props, t);
2380
2380
  return {
2381
2381
  type: "full",
2382
2382
  version: s,
@@ -2384,16 +2384,16 @@ function Fi(e, t, s) {
2384
2384
  metadata: n
2385
2385
  };
2386
2386
  }
2387
- function Pi(e, t, s) {
2387
+ function pi(e, t, s) {
2388
2388
  if (!Array.isArray(e))
2389
2389
  throw new D("UI diff changes must be an array");
2390
- if (!R(t))
2390
+ if (!U(t))
2391
2391
  throw new D("UI diff metadata must be an object");
2392
2392
  const r = t.viewId;
2393
2393
  if (typeof r != "string" || r.length === 0)
2394
2394
  throw new D("UI diff metadata is missing viewId");
2395
2395
  const n = e.map(
2396
- (a, I) => gi(a ?? {}, `changes[${I}]`)
2396
+ (a, I) => bi(a ?? {}, `changes[${I}]`)
2397
2397
  ), i = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, o = {
2398
2398
  viewId: r,
2399
2399
  ...i !== void 0 ? { isUpdate: i } : {}
@@ -2405,12 +2405,12 @@ function Pi(e, t, s) {
2405
2405
  metadata: o
2406
2406
  };
2407
2407
  }
2408
- function pi(e, t) {
2408
+ function ki(e, t) {
2409
2409
  const s = e.viewId;
2410
2410
  if (typeof s != "string" || s.length === 0)
2411
2411
  throw new D("UI update root is missing viewId");
2412
2412
  let r = s, n = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0;
2413
- return R(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (r = t.viewId), typeof t.isUpdate == "boolean" && (n = t.isUpdate)), {
2413
+ return U(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (r = t.viewId), typeof t.isUpdate == "boolean" && (n = t.isUpdate)), {
2414
2414
  viewId: r,
2415
2415
  ...n !== void 0 ? { isUpdate: n } : {}
2416
2416
  };
@@ -2434,13 +2434,13 @@ function Ie(e) {
2434
2434
  throw new D(`Unknown UI update type: ${String(s)}`);
2435
2435
  if (typeof r != "number")
2436
2436
  throw new D("UI update version must be a number");
2437
- const n = s === "full" ? Fi(t.graph, t.metadata, r) : Pi(t.changes, t.metadata, r), i = e.Payloads ? bi(e.Payloads) : /* @__PURE__ */ new Map();
2437
+ const n = s === "full" ? Pi(t.graph, t.metadata, r) : pi(t.changes, t.metadata, r), i = e.Payloads ? Fi(e.Payloads) : /* @__PURE__ */ new Map();
2438
2438
  return {
2439
2439
  snapshot: n,
2440
2440
  payloads: i
2441
2441
  };
2442
2442
  }
2443
- class ki {
2443
+ class Mi {
2444
2444
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2445
2445
  cache = /* @__PURE__ */ new Map();
2446
2446
  /**
@@ -2521,8 +2521,8 @@ class ki {
2521
2521
  return this.cache.size;
2522
2522
  }
2523
2523
  }
2524
- const Mi = Z("UiStreamStore");
2525
- class vi {
2524
+ const vi = Z("UiStreamStore");
2525
+ class Bi {
2526
2526
  views = /* @__PURE__ */ new Map();
2527
2527
  listeners = /* @__PURE__ */ new Set();
2528
2528
  payloads = /* @__PURE__ */ new Map();
@@ -2547,7 +2547,7 @@ class vi {
2547
2547
  viewsDirty = !0;
2548
2548
  payloadsDirty = !0;
2549
2549
  // Handler cache for stable event handlers
2550
- handlerCache = new ki();
2550
+ handlerCache = new Mi();
2551
2551
  // id -> node lookup index for O(1) getNode. Rebuilt lazily from the committed snapshot's view
2552
2552
  // trees. Node trees are immutable (a change replaces every node on the changed path with a new
2553
2553
  // object and yields a new views Map), so the index is valid exactly while it points at the same
@@ -2581,11 +2581,11 @@ class vi {
2581
2581
  this.rootViewId || (this.rootViewId = i, I = !0, this.structureChanged = !0);
2582
2582
  const _ = o.root;
2583
2583
  if (s.type === "full")
2584
- o.root = s.root, o.version = s.version, I = !0, this.viewsDirty = !0, this.structureChanged = !0, s.root && V(s.root, this.changedNodeIds);
2584
+ o.root = s.root, o.version = s.version, I = !0, this.viewsDirty = !0, this.structureChanged = !0, s.root && G(s.root, this.changedNodeIds);
2585
2585
  else {
2586
2586
  if (!_)
2587
2587
  return this.resyncNeeded = !0, !1;
2588
- const l = Vi(_, s.changes);
2588
+ const l = Gi(_, s.changes);
2589
2589
  l !== _ ? (o.root = l, I = !0, this.viewsDirty = !0, j(_, l, this.changedNodeIds)) : o.root = l, o.version = s.version;
2590
2590
  }
2591
2591
  for (const [l, E] of r)
@@ -2625,8 +2625,8 @@ class vi {
2625
2625
  o().delete(l) && (r = !0, this.structureChanged = !0);
2626
2626
  if (t.upsertViews && t.upsertViews.length > 0)
2627
2627
  for (const [l, E] of t.upsertViews) {
2628
- const h = o(), T = h.get(l);
2629
- T !== E && (h.set(l, E), r = !0, T ? j(T, E, this.changedNodeIds) : (V(E, this.changedNodeIds), this.structureChanged = !0));
2628
+ const h = o(), S = h.get(l);
2629
+ S !== E && (h.set(l, E), r = !0, S ? j(S, E, this.changedNodeIds) : (G(E, this.changedNodeIds), this.structureChanged = !0));
2630
2630
  }
2631
2631
  if (t.deletePayloads && t.deletePayloads.length > 0)
2632
2632
  for (const l of t.deletePayloads)
@@ -2656,7 +2656,7 @@ class vi {
2656
2656
  (s.rootViewId !== t.rootViewId || s.views.size !== t.views.size) && (this.structureChanged = !0);
2657
2657
  for (const [n, i] of t.views) {
2658
2658
  const o = s.views.get(n);
2659
- o ? j(o, i, this.changedNodeIds) : (V(i, this.changedNodeIds), this.structureChanged = !0);
2659
+ o ? j(o, i, this.changedNodeIds) : (G(i, this.changedNodeIds), this.structureChanged = !0);
2660
2660
  }
2661
2661
  for (const n of this.changedNodeIds)
2662
2662
  this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
@@ -2742,7 +2742,7 @@ class vi {
2742
2742
  }
2743
2743
  }
2744
2744
  }
2745
- class Bi {
2745
+ class Vi {
2746
2746
  streams = /* @__PURE__ */ new Map();
2747
2747
  listeners = /* @__PURE__ */ new Set();
2748
2748
  apply(t, s) {
@@ -2817,39 +2817,39 @@ class Bi {
2817
2817
  }
2818
2818
  getOrCreateStreamEntry(t) {
2819
2819
  let s = this.streams.get(t);
2820
- return s || (s = { store: new vi() }, this.streams.set(t, s)), s;
2820
+ return s || (s = { store: new Bi() }, this.streams.set(t, s)), s;
2821
2821
  }
2822
2822
  notify(t) {
2823
2823
  for (const s of this.listeners)
2824
2824
  s(t);
2825
2825
  }
2826
2826
  }
2827
- function Vi(e, t, s) {
2827
+ function Gi(e, t, s) {
2828
2828
  if (t.length === 0)
2829
2829
  return e;
2830
2830
  const r = /* @__PURE__ */ new Map();
2831
2831
  for (const n of t)
2832
2832
  r.set(n.nodeId, n);
2833
- return Ze(e, r);
2833
+ return Ze(e, r, s);
2834
2834
  }
2835
2835
  function Ze(e, t, s) {
2836
2836
  const r = t.get(e.id);
2837
2837
  let n = e, i = !1;
2838
2838
  if (r?.textUpdates && r.textUpdates.length > 0) {
2839
- const u = Yi(e, r.textUpdates);
2839
+ const u = Wi(e, r.textUpdates);
2840
2840
  n = u.node, i = u.changed;
2841
2841
  }
2842
2842
  let o = !1, a = n.props;
2843
2843
  if (r?.changedProps && r.changedProps.size > 0)
2844
- for (const [u, d] of r.changedProps.entries()) {
2845
- const c = a[u];
2846
- if (d === void 0)
2847
- (c !== void 0 || u in a) && (o || (a = B(a), o = !0), delete a[u]);
2848
- else if (Q(d)) {
2849
- const S = B(d);
2850
- p(S, c) || (o || (a = B(a), o = !0), a[u] = S);
2844
+ for (const [u, w] of r.changedProps.entries()) {
2845
+ const R = a[u];
2846
+ if (w === void 0)
2847
+ (R !== void 0 || u in a) && (o || (a = V(a), o = !0), delete a[u]);
2848
+ else if (Q(w)) {
2849
+ const f = V(w);
2850
+ k(f, R) || (o || (a = V(a), o = !0), a[u] = f);
2851
2851
  } else
2852
- p(d, c) || (o || (a = B(a), o = !0), a[u] = d);
2852
+ k(w, R) || (o || (a = V(a), o = !0), a[u] = w);
2853
2853
  }
2854
2854
  let I = !1, _ = n.styleIds;
2855
2855
  r?.styleIds !== void 0 && (st(n.styleIds, r.styleIds) || (_ = r.styleIds, I = !0));
@@ -2858,48 +2858,48 @@ function Ze(e, t, s) {
2858
2858
  if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
2859
2859
  const u = E.slice();
2860
2860
  if (r?.removals && r.removals.length > 0) {
2861
- const d = [...r.removals].sort((c, S) => S.index - c.index);
2862
- for (const c of d)
2863
- if (c.index >= 0 && c.index < u.length && u[c.index].id === c.nodeId)
2864
- u.splice(c.index, 1);
2861
+ const f = [...r.removals].sort((T, F) => F.index - T.index);
2862
+ for (const T of f)
2863
+ if (T.index >= 0 && T.index < u.length && u[T.index].id === T.nodeId)
2864
+ u.splice(T.index, 1);
2865
2865
  else {
2866
- const S = u.findIndex((C) => C.id === c.nodeId);
2867
- S >= 0 && u.splice(S, 1);
2866
+ const F = u.findIndex((it) => it.id === T.nodeId);
2867
+ F >= 0 && u.splice(F, 1);
2868
2868
  }
2869
2869
  h = !0;
2870
2870
  }
2871
+ const w = /* @__PURE__ */ new Map();
2871
2872
  if (r?.moves && r.moves.length > 0) {
2872
- const d = [...r.moves].sort((S, C) => S.toIndex - C.toIndex), c = /* @__PURE__ */ new Map();
2873
- for (const S of d) {
2874
- const C = u.findIndex((X) => X.id === S.nodeId);
2875
- C >= 0 && (c.set(S.nodeId, u[C]), u.splice(C, 1));
2876
- }
2877
- for (const S of d) {
2878
- const C = c.get(S.nodeId);
2879
- if (C) {
2880
- const X = Math.min(S.toIndex, u.length);
2881
- u.splice(X, 0, C);
2882
- }
2873
+ for (const f of r.moves) {
2874
+ const T = u.findIndex((F) => F.id === f.nodeId);
2875
+ T >= 0 && (w.set(f.nodeId, u[T]), u.splice(T, 1));
2883
2876
  }
2884
2877
  h = !0;
2885
2878
  }
2886
- if (r?.inserts && r.inserts.length > 0) {
2887
- const d = [...r.inserts].sort((c, S) => c.index - S.index);
2888
- for (const c of d) {
2889
- u.some((C) => C.id === c.node.id) && Mi.warn(`Duplicate node id '${c.node.id}' (type '${c.node.type}') inserted next to an existing sibling — UI tree diverged from the server`);
2890
- const S = Math.min(c.index, u.length);
2891
- u.splice(S, 0, c.node);
2879
+ const R = [];
2880
+ if (r?.moves)
2881
+ for (const f of r.moves) {
2882
+ const T = w.get(f.nodeId);
2883
+ T && R.push({ index: f.toIndex, node: T, isInsert: !1 });
2892
2884
  }
2885
+ if (r?.inserts) {
2886
+ for (const f of r.inserts)
2887
+ (u.some((T) => T.id === f.node.id) || w.has(f.node.id)) && vi.warn(`Duplicate node id '${f.node.id}' (type '${f.node.type}') inserted next to an existing sibling — UI tree diverged from the server`), R.push({ index: f.index, node: f.node, isInsert: !0 });
2893
2888
  h = !0;
2894
2889
  }
2890
+ R.sort((f, T) => f.index - T.index);
2891
+ for (const f of R) {
2892
+ const T = Math.min(f.index, u.length);
2893
+ u.splice(T, 0, f.node), f.isInsert;
2894
+ }
2895
2895
  E = u;
2896
2896
  }
2897
- let N;
2897
+ let A;
2898
2898
  for (let u = 0; u < E.length; u++) {
2899
- const d = E[u], c = Ze(d, t);
2900
- c !== d && (N || (N = E.slice()), N[u] = c);
2899
+ const w = E[u], R = Ze(w, t, s);
2900
+ R !== w && (A || (A = E.slice()), A[u] = R);
2901
2901
  }
2902
- return N && (E = N, h = !0), i || o || I || h ? !o && !h && !I ? n : {
2902
+ return A && (E = A, h = !0), i || o || I || h ? !o && !h && !I ? n : {
2903
2903
  id: e.id,
2904
2904
  type: e.type,
2905
2905
  props: o ? a : n.props,
@@ -2908,21 +2908,21 @@ function Ze(e, t, s) {
2908
2908
  ...e.sourceMarker ? { sourceMarker: e.sourceMarker } : {}
2909
2909
  } : e;
2910
2910
  }
2911
- function V(e, t) {
2911
+ function G(e, t) {
2912
2912
  if (t.add(e.id), e.children)
2913
2913
  for (const s of e.children)
2914
- V(s, t);
2914
+ G(s, t);
2915
2915
  }
2916
2916
  function et(e, t) {
2917
2917
  if (t.set(e.id, e), e.children)
2918
2918
  for (const s of e.children)
2919
2919
  et(s, t);
2920
2920
  }
2921
- const H = [];
2922
- function Gi(e) {
2923
- for (; H.length <= e; )
2924
- H.push(/* @__PURE__ */ new Map());
2925
- return H[e].clear(), H[e];
2921
+ const Y = [];
2922
+ function xi(e) {
2923
+ for (; Y.length <= e; )
2924
+ Y.push(/* @__PURE__ */ new Map());
2925
+ return Y[e].clear(), Y[e];
2926
2926
  }
2927
2927
  function j(e, t, s) {
2928
2928
  tt(e, t, s, 0);
@@ -2930,27 +2930,27 @@ function j(e, t, s) {
2930
2930
  function tt(e, t, s, r) {
2931
2931
  if (e === t)
2932
2932
  return;
2933
- (e.type !== t.type || !xi(e.props, t.props) || !st(e.styleIds, t.styleIds)) && s.add(t.id);
2933
+ (e.type !== t.type || !Hi(e.props, t.props) || !st(e.styleIds, t.styleIds)) && s.add(t.id);
2934
2934
  const i = e.children ?? [], o = t.children ?? [];
2935
2935
  if (i !== o) {
2936
- const a = Gi(r);
2936
+ const a = xi(r);
2937
2937
  for (const _ of i)
2938
2938
  a.set(_.id, _);
2939
2939
  let I = !1;
2940
2940
  for (let _ = 0; _ < o.length; _++) {
2941
2941
  const l = o[_], E = a.get(l.id);
2942
- E ? (tt(E, l, s, r + 1), !I && _ < i.length && i[_].id !== l.id && (I = !0)) : (V(l, s), I = !0);
2942
+ E ? (tt(E, l, s, r + 1), !I && _ < i.length && i[_].id !== l.id && (I = !0)) : (G(l, s), I = !0);
2943
2943
  }
2944
2944
  (i.length !== o.length || I) && s.add(t.id);
2945
2945
  }
2946
2946
  }
2947
- function xi(e, t) {
2948
- return p(e, t);
2947
+ function Hi(e, t) {
2948
+ return k(e, t);
2949
2949
  }
2950
2950
  function st(e, t) {
2951
- return p(e, t);
2951
+ return k(e, t);
2952
2952
  }
2953
- function Hi(e, t) {
2953
+ function Yi(e, t) {
2954
2954
  if (t.length === 0)
2955
2955
  return e;
2956
2956
  const s = [...t].sort((i, o) => i.start - o.start);
@@ -2958,7 +2958,7 @@ function Hi(e, t) {
2958
2958
  for (const i of s) {
2959
2959
  const o = Ee(i.start + n, 0, r.length);
2960
2960
  if (i.end == null) {
2961
- const l = r.slice(o), E = Wi(l, i.insertedText);
2961
+ const l = r.slice(o), E = Ki(l, i.insertedText);
2962
2962
  r = r.slice(0, o) + i.insertedText + l.slice(E), n += i.insertedText.length - E;
2963
2963
  continue;
2964
2964
  }
@@ -2967,7 +2967,7 @@ function Hi(e, t) {
2967
2967
  }
2968
2968
  return r;
2969
2969
  }
2970
- function Yi(e, t, s) {
2970
+ function Wi(e, t, s) {
2971
2971
  if (t.length === 0)
2972
2972
  return { node: e, changed: !1 };
2973
2973
  const r = /* @__PURE__ */ new Map();
@@ -2987,8 +2987,8 @@ function rt(e, t, s) {
2987
2987
  E ? E.push(l) : _.set(l.propertyName, [l]);
2988
2988
  }
2989
2989
  for (const [l, E] of _.entries()) {
2990
- const h = i[l], N = Hi(typeof h == "string" ? h : "", E);
2991
- n || (i = B(i), n = !0), i[l] = N;
2990
+ const h = i[l], A = Yi(typeof h == "string" ? h : "", E);
2991
+ n || (i = V(i), n = !0), i[l] = A;
2992
2992
  }
2993
2993
  }
2994
2994
  let o = !1;
@@ -3017,14 +3017,14 @@ function rt(e, t, s) {
3017
3017
  function Ee(e, t, s) {
3018
3018
  return Math.max(t, Math.min(s, e));
3019
3019
  }
3020
- function Wi(e, t) {
3020
+ function Ki(e, t) {
3021
3021
  const s = Math.min(e.length, t.length);
3022
3022
  let r = 0;
3023
3023
  for (; r < s && e.charCodeAt(r) === t.charCodeAt(r); )
3024
3024
  r++;
3025
3025
  return r;
3026
3026
  }
3027
- function B(e) {
3027
+ function V(e) {
3028
3028
  const t = {}, s = Object.keys(e);
3029
3029
  for (let r = 0; r < s.length; r++) {
3030
3030
  const n = s[r];
@@ -3035,14 +3035,14 @@ function B(e) {
3035
3035
  function Q(e) {
3036
3036
  return typeof e == "object" && e !== null && !Array.isArray(e);
3037
3037
  }
3038
- function p(e, t) {
3038
+ function k(e, t) {
3039
3039
  if (Object.is(e, t))
3040
3040
  return !0;
3041
3041
  if (Array.isArray(e) && Array.isArray(t)) {
3042
3042
  if (e.length !== t.length)
3043
3043
  return !1;
3044
3044
  for (let s = 0; s < e.length; s++)
3045
- if (!p(e[s], t[s]))
3045
+ if (!k(e[s], t[s]))
3046
3046
  return !1;
3047
3047
  return !0;
3048
3048
  }
@@ -3051,25 +3051,25 @@ function p(e, t) {
3051
3051
  if (s.length !== r.length)
3052
3052
  return !1;
3053
3053
  for (const n of s)
3054
- if (!p(e[n], t[n]))
3054
+ if (!k(e[n], t[n]))
3055
3055
  return !1;
3056
3056
  return !0;
3057
3057
  }
3058
3058
  return !1;
3059
3059
  }
3060
- const z = Z("LiveSnapshot"), _e = 1, J = "ikon-live-snapshot", Ki = 300 * 1e3, $i = 5e6, Xi = 1e3;
3061
- function v() {
3060
+ const z = Z("LiveSnapshot"), _e = 1, J = "ikon-live-snapshot", $i = 300 * 1e3, Xi = 5e6, ji = 1e3;
3061
+ function B() {
3062
3062
  try {
3063
3063
  return typeof localStorage > "u" ? null : localStorage;
3064
3064
  } catch {
3065
3065
  return null;
3066
3066
  }
3067
3067
  }
3068
- function ji(e) {
3068
+ function zi(e) {
3069
3069
  const t = typeof requestIdleCallback < "u" ? requestIdleCallback : null;
3070
3070
  t ? t(() => e(), { timeout: 2e3 }) : setTimeout(e, 0);
3071
3071
  }
3072
- class zi {
3072
+ class Ji {
3073
3073
  key;
3074
3074
  appId;
3075
3075
  userId;
@@ -3081,7 +3081,7 @@ class zi {
3081
3081
  pending = null;
3082
3082
  /** Remove every stored live snapshot (all apps and users) from localStorage. Call on logout. */
3083
3083
  static clearAll() {
3084
- const t = v();
3084
+ const t = B();
3085
3085
  if (!t) return;
3086
3086
  const s = `${J}:`, r = [];
3087
3087
  try {
@@ -3095,11 +3095,11 @@ class zi {
3095
3095
  }
3096
3096
  }
3097
3097
  constructor(t) {
3098
- this.appId = t.appId, this.userId = t.userId, this.disabled = !this.userId, this.maxAgeMs = t.maxAgeMs ?? Ki, this.maxBytes = t.maxBytes ?? $i, this.debounceMs = t.debounceMs ?? Xi, this.key = `${J}:${this.appId}:${this.userId}`, this.disabled || this.pruneOtherUsers();
3098
+ this.appId = t.appId, this.userId = t.userId, this.disabled = !this.userId, this.maxAgeMs = t.maxAgeMs ?? $i, this.maxBytes = t.maxBytes ?? Xi, this.debounceMs = t.debounceMs ?? ji, this.key = `${J}:${this.appId}:${this.userId}`, this.disabled || this.pruneOtherUsers();
3099
3099
  }
3100
3100
  load() {
3101
3101
  if (this.disabled) return null;
3102
- const t = v();
3102
+ const t = B();
3103
3103
  if (!t) return null;
3104
3104
  let s;
3105
3105
  try {
@@ -3119,7 +3119,7 @@ class zi {
3119
3119
  if (!Number.isFinite(r.savedAtMs) || Date.now() - r.savedAtMs > this.maxAgeMs)
3120
3120
  return this.remove(), null;
3121
3121
  try {
3122
- return { streams: r.streams.map(qi), styles: r.styles ?? [] };
3122
+ return { streams: r.streams.map(Qi), styles: r.styles ?? [] };
3123
3123
  } catch (n) {
3124
3124
  return z.warn("Failed to deserialize stored live snapshot, dropping it", n), this.remove(), null;
3125
3125
  }
@@ -3130,7 +3130,7 @@ class zi {
3130
3130
  */
3131
3131
  save(t, s) {
3132
3132
  this.disabled || (this.pending = { streams: t, styles: s }, this.writeTimer === null && (this.writeTimer = setTimeout(() => {
3133
- this.writeTimer = null, ji(() => this.writePending());
3133
+ this.writeTimer = null, zi(() => this.writePending());
3134
3134
  }, this.debounceMs)));
3135
3135
  }
3136
3136
  /** Write any pending state immediately and synchronously (used on dispose / unmount). */
@@ -3145,11 +3145,11 @@ class zi {
3145
3145
  this.pending = null, t && this.writeNow(t.streams, t.styles);
3146
3146
  }
3147
3147
  writeNow(t, s) {
3148
- const r = v();
3148
+ const r = B();
3149
3149
  if (!r) return;
3150
3150
  const n = [];
3151
3151
  for (const a of t)
3152
- !a.rootViewId || !a.views.has(a.rootViewId) || n.push(Ji(a));
3152
+ !a.rootViewId || !a.views.has(a.rootViewId) || n.push(qi(a));
3153
3153
  if (n.length === 0) return;
3154
3154
  const i = {
3155
3155
  schemaVersion: _e,
@@ -3176,7 +3176,7 @@ class zi {
3176
3176
  }
3177
3177
  }
3178
3178
  remove() {
3179
- const t = v();
3179
+ const t = B();
3180
3180
  if (t)
3181
3181
  try {
3182
3182
  t.removeItem(this.key);
@@ -3184,7 +3184,7 @@ class zi {
3184
3184
  }
3185
3185
  }
3186
3186
  pruneOtherUsers() {
3187
- const t = v();
3187
+ const t = B();
3188
3188
  if (!t) return;
3189
3189
  const s = `${J}:${this.appId}:`, r = [];
3190
3190
  try {
@@ -3198,7 +3198,7 @@ class zi {
3198
3198
  }
3199
3199
  }
3200
3200
  }
3201
- function Ji(e) {
3201
+ function qi(e) {
3202
3202
  return {
3203
3203
  streamId: e.streamId,
3204
3204
  category: e.category,
@@ -3207,7 +3207,7 @@ function Ji(e) {
3207
3207
  views: [...e.views.entries()]
3208
3208
  };
3209
3209
  }
3210
- function qi(e) {
3210
+ function Qi(e) {
3211
3211
  return {
3212
3212
  streamId: e.streamId,
3213
3213
  category: e.category,
@@ -3218,32 +3218,32 @@ function qi(e) {
3218
3218
  payloads: []
3219
3219
  };
3220
3220
  }
3221
- function Qi(e) {
3221
+ function Zi(e) {
3222
3222
  return new Worker(
3223
- "" + new URL("assets/ui-worker-Di0peIgz.js", import.meta.url).href,
3223
+ "" + new URL("assets/ui-worker-CioCQufn.js", import.meta.url).href,
3224
3224
  {
3225
3225
  type: "module",
3226
3226
  name: e?.name
3227
3227
  }
3228
3228
  );
3229
3229
  }
3230
- const y = Z("IkonUiCore"), Zi = 250;
3230
+ const N = Z("IkonUiCore"), eo = 250;
3231
3231
  function nt() {
3232
3232
  if (!(typeof window > "u"))
3233
3233
  return window.__IKON_BOOT_SNAPSHOT_FILE__ || void 0;
3234
3234
  }
3235
- let K = null;
3236
- function so() {
3237
- if (K) return;
3235
+ let $ = null;
3236
+ function ro() {
3237
+ if ($) return;
3238
3238
  const e = nt();
3239
- e && (K = fetch(`/${e}`).then((t) => t, () => null));
3239
+ e && ($ = fetch(`/${e}`).then((t) => t, () => null));
3240
3240
  }
3241
- class ro {
3241
+ class no {
3242
3242
  unsubscribeProtocolMessages;
3243
3243
  unsubscribeState;
3244
3244
  client = null;
3245
3245
  lastConnectedSessionId = void 0;
3246
- uiStore = new Bi();
3246
+ uiStore = new Vi();
3247
3247
  uiWorker = null;
3248
3248
  uiStyles = /* @__PURE__ */ new Map();
3249
3249
  uiUpdateListeners = /* @__PURE__ */ new Set();
@@ -3265,7 +3265,7 @@ class ro {
3265
3265
  resyncDebounceTimers = /* @__PURE__ */ new Map();
3266
3266
  constructor(t) {
3267
3267
  const s = t?.threading?.uiWorker ?? "auto";
3268
- this.useUiWorker = s !== "disabled" && typeof Worker < "u", t?.liveSnapshot?.enabled && (this.liveSnapshot = new zi(t.liveSnapshot)), t?.client && this.initialize(t.client, t);
3268
+ this.useUiWorker = s !== "disabled" && typeof Worker < "u", t?.liveSnapshot?.enabled && (this.liveSnapshot = new Ji(t.liveSnapshot)), t?.client && this.initialize(t.client, t);
3269
3269
  }
3270
3270
  dispose() {
3271
3271
  this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.unsubscribeLiveSnapshotCapture?.(), this.liveSnapshot?.dispose(), this.liveSnapshot = null, this.uiWorker?.terminate(), this.uiWorker = null;
@@ -3329,7 +3329,7 @@ class ro {
3329
3329
  }
3330
3330
  if (i === "connected") {
3331
3331
  const o = this.client?.sessionId;
3332
- this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (y.info(`SessionId changed (${this.lastConnectedSessionId} → ${o}), clearing UI cache so the server can resend a fresh snapshot under the new SessionId`), this.clearAllState()) : (y.info("Soft reconnect (same SessionId), gating UI store on the server resync snapshot"), this.enterSnapshotMode())), this.lastConnectedSessionId = o;
3332
+ this.lastConnectedSessionId !== void 0 && (o !== this.lastConnectedSessionId ? (N.info(`SessionId changed (${this.lastConnectedSessionId} → ${o}), clearing UI cache so the server can resend a fresh snapshot under the new SessionId`), this.clearAllState()) : (N.info("Soft reconnect (same SessionId), gating UI store on the server resync snapshot"), this.enterSnapshotMode())), this.lastConnectedSessionId = o;
3333
3333
  }
3334
3334
  });
3335
3335
  }
@@ -3356,7 +3356,7 @@ class ro {
3356
3356
  }
3357
3357
  async loadBootSnapshotAsync(t) {
3358
3358
  try {
3359
- const s = (K ? await K : null) ?? await fetch(`/${t}`);
3359
+ const s = ($ ? await $ : null) ?? await fetch(`/${t}`);
3360
3360
  if (!s.ok) return;
3361
3361
  const r = await s.json();
3362
3362
  if (!r?.json) return;
@@ -3382,9 +3382,9 @@ class ro {
3382
3382
  }
3383
3383
  startUiWorker(t) {
3384
3384
  try {
3385
- this.uiWorker = new Qi();
3385
+ this.uiWorker = new Zi();
3386
3386
  } catch (n) {
3387
- y.warn("Failed to create UI worker, falling back to main thread", n), this.uiWorker = null;
3387
+ N.warn("Failed to create UI worker, falling back to main thread", n), this.uiWorker = null;
3388
3388
  return;
3389
3389
  }
3390
3390
  const s = t?.threading?.flushIntervalMs, r = t?.threading?.maxLatencyMs;
@@ -3392,7 +3392,7 @@ class ro {
3392
3392
  this.handleUiStoreOpBatch(n.data);
3393
3393
  }), this.uiWorker.addEventListener("error", (n) => {
3394
3394
  const i = [n.message, n.filename, n.lineno, n.colno].filter((o) => o != null && String(o).length > 0);
3395
- y.warn(`UI worker failed, falling back to main thread: ${i.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
3395
+ N.warn(`UI worker failed, falling back to main thread: ${i.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
3396
3396
  });
3397
3397
  }
3398
3398
  rehydrateStoresForMainThread() {
@@ -3420,7 +3420,7 @@ class ro {
3420
3420
  const s = t.slice().buffer;
3421
3421
  this.uiWorker.postMessage({ type: "protocol", message: s }, [s]);
3422
3422
  } catch (s) {
3423
- y.warn("Failed to forward message to UI worker", s);
3423
+ N.warn("Failed to forward message to UI worker", s);
3424
3424
  }
3425
3425
  }
3426
3426
  handleUiStoreOpBatch(t) {
@@ -3483,7 +3483,7 @@ class ro {
3483
3483
  }
3484
3484
  }
3485
3485
  handleProtocolMessage(t) {
3486
- switch (it(t)) {
3486
+ switch (ot(t)) {
3487
3487
  case L.CORE_GLOBAL_STATE:
3488
3488
  this.handleGlobalState(t);
3489
3489
  return;
@@ -3507,14 +3507,14 @@ class ro {
3507
3507
  }
3508
3508
  }
3509
3509
  handleGlobalState(t) {
3510
- Wn(t).then((s) => {
3510
+ Kn(t).then((s) => {
3511
3511
  const r = /* @__PURE__ */ new Set();
3512
3512
  for (const n of Object.values(s.UIStreams ?? {}))
3513
3513
  r.add(n.StreamId), this.uiStore.setCategory(n.StreamId, n.Info?.Category);
3514
3514
  for (const n of this.uiStore.getSnapshots())
3515
3515
  this.seedStreamIds.has(n.streamId) || r.has(n.streamId) || (this.uiStore.remove(n.streamId), this.notifyUiStreamCleared(n.streamId));
3516
3516
  }).catch((s) => {
3517
- y.error("Failed to handle global state", s);
3517
+ N.error("Failed to handle global state", s);
3518
3518
  });
3519
3519
  }
3520
3520
  // Retire orphan boot seeds once a live update has rendered (main-thread twin of the worker's
@@ -3528,15 +3528,15 @@ class ro {
3528
3528
  }
3529
3529
  handleUiUpdate(t) {
3530
3530
  const s = ae(t), r = `${s.senderId}_${s.trackId}`;
3531
- Zr(t).then((n) => {
3531
+ en(t).then((n) => {
3532
3532
  const i = Ie(n);
3533
3533
  this.notifyUiUpdate(r, i), this.uiStore.apply(r, i) && this.evictSeedStreams(r), this.uiStore.needsResync(r) && this.requestResync(s.trackId, s.senderId), this.sendUiUpdateAck(s.trackId, i.snapshot.version, s.senderId);
3534
3534
  }).catch((n) => {
3535
- n instanceof D ? y.warn("Failed to parse UI update", n.causeError ?? n) : y.error("Failed to apply UI update", n);
3535
+ n instanceof D ? N.warn("Failed to parse UI update", n.causeError ?? n) : N.error("Failed to apply UI update", n);
3536
3536
  });
3537
3537
  }
3538
3538
  handleUiStyles(t) {
3539
- wr(t).then((s) => {
3539
+ Cr(t).then((s) => {
3540
3540
  if (!s.StyleId) return;
3541
3541
  const r = {
3542
3542
  styleId: s.StyleId,
@@ -3545,11 +3545,11 @@ class ro {
3545
3545
  };
3546
3546
  this.uiStyles.set(r.styleId, r), this.notifyUiStyle(r);
3547
3547
  }).catch((s) => {
3548
- y.error("Failed to handle UI styles", s);
3548
+ N.error("Failed to handle UI styles", s);
3549
3549
  });
3550
3550
  }
3551
3551
  handleUiStylesBatch(t) {
3552
- gr(t).then((s) => {
3552
+ br(t).then((s) => {
3553
3553
  if (s.Styles)
3554
3554
  for (const r of s.Styles) {
3555
3555
  if (!r.StyleId) continue;
@@ -3561,18 +3561,18 @@ class ro {
3561
3561
  this.uiStyles.set(n.styleId, n), this.notifyUiStyle(n);
3562
3562
  }
3563
3563
  }).catch((s) => {
3564
- y.error("Failed to handle UI styles batch", s);
3564
+ N.error("Failed to handle UI styles batch", s);
3565
3565
  });
3566
3566
  }
3567
3567
  handleUiStylesDelete(t) {
3568
- Wr(t).then((s) => {
3568
+ Kr(t).then((s) => {
3569
3569
  if (!(!s.StyleIds || s.StyleIds.length === 0)) {
3570
3570
  for (const r of s.StyleIds)
3571
3571
  this.uiStyles.delete(r);
3572
3572
  this.notifyUiStyleDelete(s.StyleIds);
3573
3573
  }
3574
3574
  }).catch((s) => {
3575
- y.error("Failed to handle UI styles delete", s);
3575
+ N.error("Failed to handle UI styles delete", s);
3576
3576
  });
3577
3577
  }
3578
3578
  handleClearStream(t) {
@@ -3598,10 +3598,10 @@ class ro {
3598
3598
  sendUiUpdateAck(t, s, r) {
3599
3599
  if (this.client && !(!Number.isFinite(s) || s < 0))
3600
3600
  try {
3601
- const n = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, i = on({ Version: s }, this.client.sessionId ?? 0, n);
3601
+ const n = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, i = an({ Version: s }, this.client.sessionId ?? 0, n);
3602
3602
  this.client.sendProtocolMessage(i);
3603
3603
  } catch (n) {
3604
- y.warn("Failed to send UI update ack", n);
3604
+ N.warn("Failed to send UI update ack", n);
3605
3605
  }
3606
3606
  }
3607
3607
  requestResync(t, s) {
@@ -3610,26 +3610,26 @@ class ro {
3610
3610
  return;
3611
3611
  const n = setTimeout(() => {
3612
3612
  this.resyncDebounceTimers.delete(r), this.sendResyncRequest(t, s);
3613
- }, Zi);
3613
+ }, eo);
3614
3614
  this.resyncDebounceTimers.set(r, n);
3615
3615
  }
3616
3616
  sendResyncRequest(t, s) {
3617
3617
  if (this.client)
3618
3618
  try {
3619
- const r = _r({ TrackId: t }, this.client.sessionId ?? 0, { trackId: t, targetIds: [s] });
3619
+ const r = hr({ TrackId: t }, this.client.sessionId ?? 0, { trackId: t, targetIds: [s] });
3620
3620
  this.client.sendProtocolMessage(r);
3621
3621
  } catch (r) {
3622
- y.warn("Failed to send UI resync request", r);
3622
+ N.warn("Failed to send UI resync request", r);
3623
3623
  }
3624
3624
  }
3625
3625
  }
3626
3626
  export {
3627
- ki as HandlerCache,
3628
- ro as IkonUiCore,
3629
- zi as LiveSnapshotCache,
3630
- Bi as UiStore,
3631
- vi as UiStreamStore,
3627
+ Mi as HandlerCache,
3628
+ no as IkonUiCore,
3629
+ Ji as LiveSnapshotCache,
3630
+ Vi as UiStore,
3631
+ Bi as UiStreamStore,
3632
3632
  D as UiUpdateParseError,
3633
3633
  Ie as parseUiUpdate,
3634
- so as prefetchBootSnapshot
3634
+ ro as prefetchBootSnapshot
3635
3635
  };