@ikonai/sdk-ui 0.0.32 → 0.0.33

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,14 +1,14 @@
1
- import { createLogger as $t, readOpcode as jt, readProtocolMessageHeaders as it } from "@ikonai/sdk";
2
- const O = 27;
3
- function Xt(e) {
4
- const t = B(e), r = new DataView(t.buffer, t.byteOffset, t.byteLength);
5
- if (t.length < O)
1
+ import { createLogger as zt, readOpcode as Jt, readProtocolMessageHeaders as at } from "@ikonai/sdk";
2
+ const P = 27;
3
+ function qt(e) {
4
+ const t = G(e), r = new DataView(t.buffer, t.byteOffset, t.byteLength);
5
+ if (t.length < P)
6
6
  throw new Error("Protocol payload too short");
7
- const s = r.getUint32(0, !0), i = r.getUint32(4, !0), n = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), l = r.getUint32(20, !0), u = r.getUint8(24), I = r.getUint8(25), h = r.getUint8(26);
8
- if (O + l * 4 > t.length)
7
+ const s = r.getUint32(0, !0), i = r.getUint32(4, !0), n = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), l = r.getUint32(20, !0), u = r.getUint8(24), I = r.getUint8(25), c = r.getUint8(26);
8
+ if (P + l * 4 > t.length)
9
9
  throw new Error("Protocol header exceeds payload length");
10
10
  const E = [];
11
- let d = O;
11
+ let d = P;
12
12
  for (let _ = 0; _ < l; _++)
13
13
  E.push(r.getUint32(d, !0)), d += 4;
14
14
  return {
@@ -20,35 +20,35 @@ function Xt(e) {
20
20
  targetIds: E,
21
21
  payloadVersion: u,
22
22
  payloadType: I,
23
- flags: h
23
+ flags: c
24
24
  };
25
25
  }
26
- function K(e, t, r) {
27
- const s = B(e), i = Xt(s);
26
+ function $(e, t, r) {
27
+ const s = G(e), i = qt(s);
28
28
  if (t !== void 0 && i.opcode !== t)
29
29
  throw new Error(`Unexpected opcode ${i.opcode}`);
30
30
  if (r !== void 0 && i.payloadVersion !== r)
31
31
  throw new Error(`Unexpected payload version ${i.payloadVersion}`);
32
32
  if (i.payloadType !== 8)
33
33
  throw new Error(`Unexpected payload type ${i.payloadType}`);
34
- const n = O + i.targetIds.length * 4;
34
+ const n = P + i.targetIds.length * 4;
35
35
  return s.subarray(n, i.length);
36
36
  }
37
- function zt(e, t, r, s, i) {
38
- const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], u = i?.payloadType ?? 8, I = O + l.length * 4, h = I + t.length, c = new Uint8Array(h), E = new DataView(c.buffer);
39
- E.setUint32(0, h, !0), E.setUint32(4, e >>> 0, !0), E.setUint32(8, s >>> 0, !0), E.setUint32(12, n >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, l.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, u & 255), E.setUint8(26, a & 255);
40
- let d = O;
37
+ function Qt(e, t, r, s, i) {
38
+ const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], u = i?.payloadType ?? 8, I = P + l.length * 4, c = I + t.length, h = new Uint8Array(c), E = new DataView(h.buffer);
39
+ E.setUint32(0, c, !0), E.setUint32(4, e >>> 0, !0), E.setUint32(8, s >>> 0, !0), E.setUint32(12, n >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, l.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, u & 255), E.setUint8(26, a & 255);
40
+ let d = P;
41
41
  for (let _ = 0; _ < l.length; _++)
42
42
  E.setUint32(d, l[_] >>> 0, !0), d += 4;
43
- return c.set(t, I), c;
43
+ return h.set(t, I), h;
44
44
  }
45
- var w = /* @__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))(w || {});
46
- const at = 161, lt = 162, x = new TextEncoder(), Jt = new TextDecoder("utf-8", { fatal: !0 });
47
- class V {
45
+ var S = /* @__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))(S || {});
46
+ const ct = 161, ht = 162, W = new TextEncoder(), Zt = new TextDecoder("utf-8", { fatal: !0 });
47
+ class v {
48
48
  constructor(t = 1) {
49
- this.version = t, this.buffer.writeByte(at), this.buffer.writeVarUInt(t >>> 0);
49
+ this.version = t, this.buffer.writeByte(ct), this.buffer.writeVarUInt(t >>> 0);
50
50
  }
51
- buffer = new k();
51
+ buffer = new M();
52
52
  closed = !1;
53
53
  cached;
54
54
  writeInt32Field(t, r) {
@@ -79,32 +79,32 @@ class V {
79
79
  this.writeFixedField(t, 14, () => this.buffer.writeBytes(s));
80
80
  }
81
81
  writeStringField(t, r) {
82
- const s = x.encode(r ?? "");
82
+ const s = W.encode(r ?? "");
83
83
  this.writeVariableField(t, 12, s);
84
84
  }
85
85
  writeBinaryField(t, r) {
86
86
  this.writeVariableField(t, 13, r);
87
87
  }
88
88
  writeObjectField(t, r, s) {
89
- const i = new V(r);
89
+ const i = new v(r);
90
90
  s(i);
91
91
  const n = i.finish();
92
92
  this.writeVariableField(t, 11, n);
93
93
  }
94
94
  writeArrayField(t, r, s) {
95
- const i = new W(r);
95
+ const i = new j(r);
96
96
  s(i);
97
97
  const n = i.finish();
98
98
  this.writeVariableField(t, 9, n);
99
99
  }
100
100
  writeDictionaryField(t, r, s, i) {
101
- const n = new z(r, s);
101
+ const n = new Q(r, s);
102
102
  i(n);
103
103
  const o = n.finish();
104
104
  this.writeVariableField(t, 10, o);
105
105
  }
106
106
  finish() {
107
- return this.closed || (this.buffer.writeByte(lt), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
107
+ return this.closed || (this.buffer.writeByte(ht), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
108
108
  }
109
109
  writeFixedField(t, r, s) {
110
110
  this.writeFieldHeader(t, r, 0), s();
@@ -113,14 +113,14 @@ class V {
113
113
  this.writeFieldHeader(t, r, s.length), this.buffer.writeBytes(s);
114
114
  }
115
115
  writeFieldHeader(t, r, s) {
116
- this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(H(r)), ee(r) && this.buffer.writeVarUInt(s >>> 0);
116
+ this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(Y(r)), ie(r) && this.buffer.writeVarUInt(s >>> 0);
117
117
  }
118
118
  }
119
- class W {
119
+ class j {
120
120
  constructor(t) {
121
121
  this.elementType = t;
122
122
  }
123
- payload = new k();
123
+ payload = new M();
124
124
  count = 0;
125
125
  writeInt32(t) {
126
126
  this.ensureElementType(
@@ -179,7 +179,7 @@ class W {
179
179
  12
180
180
  /* String */
181
181
  ), this.count++;
182
- const r = x.encode(t ?? "");
182
+ const r = W.encode(t ?? "");
183
183
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r);
184
184
  }
185
185
  writeBinary(t) {
@@ -193,7 +193,7 @@ class W {
193
193
  11
194
194
  /* Object */
195
195
  ), this.count++;
196
- const s = new V(t);
196
+ const s = new v(t);
197
197
  r(s);
198
198
  const i = s.finish();
199
199
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i);
@@ -203,7 +203,7 @@ class W {
203
203
  9
204
204
  /* Array */
205
205
  ), this.count++;
206
- const s = new W(t);
206
+ const s = new j(t);
207
207
  r(s);
208
208
  const i = s.finish();
209
209
  this.payload.writeBytes(i);
@@ -213,42 +213,42 @@ class W {
213
213
  10
214
214
  /* Dict */
215
215
  ), this.count++;
216
- const i = new z(t, r);
216
+ const i = new Q(t, r);
217
217
  s(i);
218
218
  const n = i.finish();
219
219
  this.payload.writeBytes(n);
220
220
  }
221
221
  finish() {
222
- const t = new k();
223
- return t.writeByte(H(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
222
+ const t = new M();
223
+ return t.writeByte(Y(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
224
224
  }
225
225
  ensureElementType(t) {
226
226
  if (this.elementType !== t)
227
- throw new Error(`Array element type is ${w[this.elementType]}, expected ${w[t]}`);
227
+ throw new Error(`Array element type is ${S[this.elementType]}, expected ${S[t]}`);
228
228
  }
229
229
  }
230
- class z {
230
+ class Q {
231
231
  constructor(t, r) {
232
- this.keyType = t, this.valueType = r, Q(t);
232
+ this.keyType = t, this.valueType = r, et(t);
233
233
  }
234
- payload = new k();
234
+ payload = new M();
235
235
  count = 0;
236
236
  entryOpen = !1;
237
237
  beginEntry() {
238
238
  if (this.entryOpen)
239
239
  throw new Error("Previous dictionary entry not completed");
240
- return this.count++, this.entryOpen = !0, new qt(this.keyType, this.valueType, this.payload, () => {
240
+ return this.count++, this.entryOpen = !0, new te(this.keyType, this.valueType, this.payload, () => {
241
241
  this.entryOpen = !1;
242
242
  });
243
243
  }
244
244
  finish() {
245
245
  if (this.entryOpen)
246
246
  throw new Error("Dictionary entry not completed");
247
- const t = new k();
248
- return t.writeByte(H(this.keyType)), t.writeByte(H(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
247
+ const t = new M();
248
+ return t.writeByte(Y(this.keyType)), t.writeByte(Y(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
249
249
  }
250
250
  }
251
- class qt {
251
+ class te {
252
252
  constructor(t, r, s, i) {
253
253
  this.keyType = t, this.valueType = r, this.payload = s, this.onComplete = i;
254
254
  }
@@ -312,7 +312,7 @@ class qt {
312
312
  12
313
313
  /* String */
314
314
  );
315
- const r = x.encode(t ?? "");
315
+ const r = W.encode(t ?? "");
316
316
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.keyWritten = !0;
317
317
  }
318
318
  writeKeyBinary(t) {
@@ -390,7 +390,7 @@ class qt {
390
390
  12
391
391
  /* String */
392
392
  );
393
- const r = x.encode(t ?? "");
393
+ const r = W.encode(t ?? "");
394
394
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.valueWritten = !0;
395
395
  }
396
396
  writeValueObject(t, r) {
@@ -398,7 +398,7 @@ class qt {
398
398
  11
399
399
  /* Object */
400
400
  );
401
- const s = new V(t);
401
+ const s = new v(t);
402
402
  r(s);
403
403
  const i = s.finish();
404
404
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i), this.valueWritten = !0;
@@ -408,7 +408,7 @@ class qt {
408
408
  9
409
409
  /* Array */
410
410
  );
411
- const s = new W(t);
411
+ const s = new j(t);
412
412
  r(s);
413
413
  const i = s.finish();
414
414
  this.payload.writeBytes(i), this.valueWritten = !0;
@@ -418,7 +418,7 @@ class qt {
418
418
  10
419
419
  /* Dict */
420
420
  );
421
- const i = new z(t, r);
421
+ const i = new Q(t, r);
422
422
  s(i);
423
423
  const n = i.finish();
424
424
  this.payload.writeBytes(n), this.valueWritten = !0;
@@ -432,50 +432,50 @@ class qt {
432
432
  }
433
433
  ensureKeyType(t) {
434
434
  if (this.keyType !== t)
435
- throw new Error(`Dictionary key type is ${w[this.keyType]}, expected ${w[t]}`);
435
+ throw new Error(`Dictionary key type is ${S[this.keyType]}, expected ${S[t]}`);
436
436
  }
437
437
  ensureValueType(t) {
438
438
  if (this.valueType !== t)
439
- throw new Error(`Dictionary value type is ${w[this.valueType]}, expected ${w[t]}`);
439
+ throw new Error(`Dictionary value type is ${S[this.valueType]}, expected ${S[t]}`);
440
440
  }
441
441
  }
442
- class m {
442
+ class g {
443
443
  constructor(t, r, s) {
444
444
  this.buffer = t, this.version = r, this.offset = s, this.end = t.length - 1;
445
445
  }
446
446
  offset;
447
447
  end;
448
448
  static create(t) {
449
- const r = B(t);
449
+ const r = G(t);
450
450
  if (r.length < 2)
451
451
  throw new Error("Teleport payload too short");
452
- if (r[0] !== at || r[r.length - 1] !== lt)
452
+ if (r[0] !== ct || r[r.length - 1] !== ht)
453
453
  throw new Error("Teleport object missing markers");
454
- const s = { offset: 1 }, i = A(r, s, "InvalidLength");
455
- return new m(r, i, s.offset);
454
+ const s = { offset: 1 }, i = N(r, s, "InvalidLength");
455
+ return new g(r, i, s.offset);
456
456
  }
457
457
  next() {
458
458
  if (this.offset >= this.end)
459
459
  return null;
460
460
  if (this.offset + 5 > this.buffer.length)
461
461
  throw new Error("Teleport object truncated");
462
- const t = re(this.buffer, this.offset);
462
+ const t = ne(this.buffer, this.offset);
463
463
  this.offset += 4;
464
464
  const r = this.buffer[this.offset++], s = r >> 4 & 15;
465
465
  if ((r & 15) !== 0)
466
466
  throw new Error("Teleport field flags must be zero");
467
- const i = g(s);
467
+ const i = F(s);
468
468
  let n;
469
469
  if (i >= 0)
470
470
  y(this.buffer, this.offset, i), n = this.buffer.subarray(this.offset, this.offset + i), this.offset += i;
471
471
  else {
472
- const o = { offset: this.offset }, a = A(this.buffer, o, "InvalidLength");
472
+ const o = { offset: this.offset }, a = N(this.buffer, o, "InvalidLength");
473
473
  y(this.buffer, o.offset, a), n = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
474
474
  }
475
- return new Qt(t, s, n);
475
+ return new ee(t, s, n);
476
476
  }
477
477
  }
478
- class R {
478
+ class m {
479
479
  constructor(t, r) {
480
480
  this.type = t, this.payload = r;
481
481
  }
@@ -537,7 +537,7 @@ class R {
537
537
  return this.ensureType(
538
538
  12
539
539
  /* String */
540
- ), Jt.decode(this.payload);
540
+ ), Zt.decode(this.payload);
541
541
  }
542
542
  asGuid() {
543
543
  return this.ensureType(
@@ -549,26 +549,26 @@ class R {
549
549
  return this.ensureType(
550
550
  11
551
551
  /* Object */
552
- ), m.create(this.payload);
552
+ ), g.create(this.payload);
553
553
  }
554
554
  asArray() {
555
555
  return this.ensureType(
556
556
  9
557
557
  /* Array */
558
- ), J.create(this.payload);
558
+ ), Z.create(this.payload);
559
559
  }
560
560
  asDictionary() {
561
561
  return this.ensureType(
562
562
  10
563
563
  /* Dict */
564
- ), q.create(this.payload);
564
+ ), tt.create(this.payload);
565
565
  }
566
566
  ensureType(t) {
567
567
  if (this.type !== t)
568
- throw new Error(`Teleport value has type ${w[this.type]}, expected ${w[t]}`);
568
+ throw new Error(`Teleport value has type ${S[this.type]}, expected ${S[t]}`);
569
569
  }
570
570
  }
571
- class Qt extends R {
571
+ class ee extends m {
572
572
  constructor(t, r, s) {
573
573
  super(r, s), this.fieldId = t;
574
574
  }
@@ -576,7 +576,7 @@ class Qt extends R {
576
576
  return this.type === 1;
577
577
  }
578
578
  }
579
- class J {
579
+ class Z {
580
580
  payload;
581
581
  elementType;
582
582
  count;
@@ -589,10 +589,10 @@ class J {
589
589
  if (this.elementType = r >> 4 & 15, (r & 15) !== 0)
590
590
  throw new Error("Array flags must be zero");
591
591
  const s = { offset: 1 };
592
- this.count = A(t, s, "ArrayMalformed"), this.offset = s.offset;
592
+ this.count = N(t, s, "ArrayMalformed"), this.offset = s.offset;
593
593
  }
594
594
  static create(t) {
595
- return new J(B(t));
595
+ return new Z(G(t));
596
596
  }
597
597
  next() {
598
598
  if (this.index >= this.count) {
@@ -613,43 +613,43 @@ class J {
613
613
  case 4:
614
614
  case 6:
615
615
  case 14: {
616
- const t = g(this.elementType);
616
+ const t = F(this.elementType);
617
617
  y(this.payload, this.offset, t);
618
618
  const r = this.payload.subarray(this.offset, this.offset + t);
619
- return this.offset += t, new P(this.elementType, r);
619
+ return this.offset += t, new V(this.elementType, r);
620
620
  }
621
621
  case 12:
622
622
  case 13: {
623
- const t = { offset: this.offset }, r = A(this.payload, t, "ArrayMalformed");
623
+ const t = { offset: this.offset }, r = N(this.payload, t, "ArrayMalformed");
624
624
  y(this.payload, t.offset, r);
625
625
  const s = this.payload.subarray(t.offset, t.offset + r);
626
- return this.offset = t.offset + r, new P(this.elementType, s);
626
+ return this.offset = t.offset + r, new V(this.elementType, s);
627
627
  }
628
628
  case 11: {
629
- const t = { offset: this.offset }, r = A(this.payload, t, "ArrayMalformed");
629
+ const t = { offset: this.offset }, r = N(this.payload, t, "ArrayMalformed");
630
630
  y(this.payload, t.offset, r);
631
631
  const s = this.payload.subarray(t.offset, t.offset + r);
632
- return this.offset = t.offset + r, new P(11, s);
632
+ return this.offset = t.offset + r, new V(11, s);
633
633
  }
634
634
  case 9: {
635
- const t = Z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
636
- return this.offset += t, new P(9, r);
635
+ const t = rt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
636
+ return this.offset += t, new V(9, r);
637
637
  }
638
638
  case 10: {
639
- const t = tt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
640
- return this.offset += t, new P(10, r);
639
+ const t = st(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
640
+ return this.offset += t, new V(10, r);
641
641
  }
642
642
  default:
643
- throw new Error(`Unsupported array element type ${w[this.elementType]}`);
643
+ throw new Error(`Unsupported array element type ${S[this.elementType]}`);
644
644
  }
645
645
  }
646
646
  }
647
- class P extends R {
647
+ class V extends m {
648
648
  constructor(t, r) {
649
649
  super(t, r);
650
650
  }
651
651
  }
652
- class q {
652
+ class tt {
653
653
  payload;
654
654
  keyType;
655
655
  valueType;
@@ -661,12 +661,12 @@ class q {
661
661
  throw new Error("Dictionary payload too short");
662
662
  if (this.keyType = t[0] >> 4 & 15, this.valueType = t[1] >> 4 & 15, (t[0] & 15) !== 0 || (t[1] & 15) !== 0)
663
663
  throw new Error("Dictionary key/value flags must be zero");
664
- Q(this.keyType);
664
+ et(this.keyType);
665
665
  const r = { offset: 2 };
666
- this.count = A(t, r, "DictMalformed"), this.offset = r.offset;
666
+ this.count = N(t, r, "DictMalformed"), this.offset = r.offset;
667
667
  }
668
668
  static create(t) {
669
- return new q(B(t));
669
+ return new tt(G(t));
670
670
  }
671
671
  next() {
672
672
  if (this.index >= this.count) {
@@ -675,20 +675,20 @@ class q {
675
675
  return null;
676
676
  }
677
677
  const t = this.readKey(), r = this.readValue();
678
- return this.index++, new Zt(t, r);
678
+ return this.index++, new re(t, r);
679
679
  }
680
680
  readKey() {
681
- const t = g(this.keyType);
681
+ const t = F(this.keyType);
682
682
  if (t >= 0) {
683
683
  y(this.payload, this.offset, t);
684
684
  const r = this.payload.subarray(this.offset, this.offset + t);
685
- return this.offset += t, new R(this.keyType, r);
685
+ return this.offset += t, new m(this.keyType, r);
686
686
  }
687
687
  if (this.keyType === 12 || this.keyType === 13) {
688
- const r = { offset: this.offset }, s = A(this.payload, r, "DictMalformed");
688
+ const r = { offset: this.offset }, s = N(this.payload, r, "DictMalformed");
689
689
  y(this.payload, r.offset, s);
690
690
  const i = this.payload.subarray(r.offset, r.offset + s);
691
- return this.offset = r.offset + s, new R(this.keyType, i);
691
+ return this.offset = r.offset + s, new m(this.keyType, i);
692
692
  }
693
693
  throw new Error("Unsupported dictionary key type");
694
694
  }
@@ -696,24 +696,24 @@ class q {
696
696
  switch (this.valueType) {
697
697
  case 12:
698
698
  case 13: {
699
- const t = { offset: this.offset }, r = A(this.payload, t, "DictMalformed");
699
+ const t = { offset: this.offset }, r = N(this.payload, t, "DictMalformed");
700
700
  y(this.payload, t.offset, r);
701
701
  const s = this.payload.subarray(t.offset, t.offset + r);
702
- return this.offset = t.offset + r, new R(this.valueType, s);
702
+ return this.offset = t.offset + r, new m(this.valueType, s);
703
703
  }
704
704
  case 11: {
705
- const t = { offset: this.offset }, r = A(this.payload, t, "DictMalformed");
705
+ const t = { offset: this.offset }, r = N(this.payload, t, "DictMalformed");
706
706
  y(this.payload, t.offset, r);
707
707
  const s = this.payload.subarray(t.offset, t.offset + r);
708
- return this.offset = t.offset + r, new R(11, s);
708
+ return this.offset = t.offset + r, new m(11, s);
709
709
  }
710
710
  case 9: {
711
- const t = Z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
712
- return this.offset += t, new R(9, r);
711
+ const t = rt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
712
+ return this.offset += t, new m(9, r);
713
713
  }
714
714
  case 10: {
715
- const t = tt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
716
- return this.offset += t, new R(10, r);
715
+ const t = st(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
716
+ return this.offset += t, new m(10, r);
717
717
  }
718
718
  case 3:
719
719
  case 5:
@@ -724,17 +724,17 @@ class q {
724
724
  case 6:
725
725
  case 14:
726
726
  case 1: {
727
- const t = g(this.valueType);
727
+ const t = F(this.valueType);
728
728
  y(this.payload, this.offset, t);
729
729
  const r = this.payload.subarray(this.offset, this.offset + t);
730
- return this.offset += t, new R(this.valueType, r);
730
+ return this.offset += t, new m(this.valueType, r);
731
731
  }
732
732
  default:
733
- throw new Error(`Unsupported dictionary value type ${w[this.valueType]}`);
733
+ throw new Error(`Unsupported dictionary value type ${S[this.valueType]}`);
734
734
  }
735
735
  }
736
736
  }
737
- class Zt {
737
+ class re {
738
738
  constructor(t, r) {
739
739
  this.key = t, this.value = r;
740
740
  }
@@ -778,8 +778,8 @@ class f {
778
778
  f.toHex(f.readUInt32LE(t, 0), 8),
779
779
  f.toHex(f.readUInt16LE(t, 4), 4),
780
780
  f.toHex(f.readUInt16LE(t, 6), 4),
781
- nt(t.subarray(8, 10)),
782
- nt(t.subarray(10, 16))
781
+ lt(t.subarray(8, 10)),
782
+ lt(t.subarray(10, 16))
783
783
  ].join("-");
784
784
  }
785
785
  asBytes() {
@@ -809,7 +809,7 @@ class f {
809
809
  return (t >>> 0).toString(16).padStart(r, "0");
810
810
  }
811
811
  }
812
- class k {
812
+ class M {
813
813
  bytes = [];
814
814
  writeByte(t) {
815
815
  this.bytes.push(t & 255);
@@ -850,14 +850,14 @@ class k {
850
850
  return Uint8Array.from(this.bytes);
851
851
  }
852
852
  }
853
- function A(e, t, r) {
853
+ function N(e, t, r) {
854
854
  if (t.offset >= e.length)
855
855
  throw new Error(r);
856
856
  let s = 0, i = 0, n = 0;
857
857
  for (; t.offset < e.length; ) {
858
858
  const o = e[t.offset++];
859
859
  if (n++, s |= (o & 127) << i, (o & 128) === 0) {
860
- if (n !== te(s))
860
+ if (n !== se(s))
861
861
  throw new Error("Teleport VarUInt is not canonical");
862
862
  return s >>> 0;
863
863
  }
@@ -866,18 +866,18 @@ function A(e, t, r) {
866
866
  }
867
867
  throw new Error(r);
868
868
  }
869
- function te(e) {
869
+ function se(e) {
870
870
  return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
871
871
  }
872
- function H(e, t = 0) {
872
+ function Y(e, t = 0) {
873
873
  if ((t & 240) !== 0)
874
874
  throw new Error("Teleport flags must fit into 4 bits");
875
875
  return (e & 15) << 4 | t & 15;
876
876
  }
877
- function ee(e) {
877
+ function ie(e) {
878
878
  return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
879
879
  }
880
- function g(e) {
880
+ function F(e) {
881
881
  switch (e) {
882
882
  case 3:
883
883
  case 5:
@@ -897,7 +897,7 @@ function g(e) {
897
897
  return -1;
898
898
  }
899
899
  }
900
- function Q(e) {
900
+ function et(e) {
901
901
  if (e === 9 || e === 11 || e === 10 || e === 1)
902
902
  throw new Error("Dictionary keys must be primitive Teleport types");
903
903
  }
@@ -905,249 +905,249 @@ function y(e, t, r) {
905
905
  if (t < 0 || r < 0 || t + r > e.length)
906
906
  throw new Error("Teleport payload exceeds bounds");
907
907
  }
908
- function re(e, t) {
908
+ function ne(e, t) {
909
909
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
910
910
  }
911
- function Z(e, t) {
911
+ function rt(e, t) {
912
912
  if (t >= e.length)
913
913
  throw new Error("Array payload exceeds bounds");
914
914
  const r = e[t], s = r >> 4 & 15;
915
915
  if ((r & 15) !== 0)
916
916
  throw new Error("Array flags must be zero");
917
- const i = { offset: t + 1 }, n = A(e, i, "ArrayMalformed"), o = g(s);
917
+ const i = { offset: t + 1 }, n = N(e, i, "ArrayMalformed"), o = F(s);
918
918
  if (o >= 0) {
919
919
  const l = o * n;
920
920
  return y(e, i.offset, l), i.offset + l - t;
921
921
  }
922
922
  let a = i.offset;
923
923
  for (let l = 0; l < n; l++)
924
- a = Y(s, e, a, "ArrayMalformed");
924
+ a = X(s, e, a, "ArrayMalformed");
925
925
  return a - t;
926
926
  }
927
- function tt(e, t) {
927
+ function st(e, t) {
928
928
  if (t + 2 > e.length)
929
929
  throw new Error("Dictionary payload too short");
930
930
  const r = e[t] >> 4 & 15, s = e[t + 1] >> 4 & 15;
931
931
  if ((e[t] & 15) !== 0 || (e[t + 1] & 15) !== 0)
932
932
  throw new Error("Dictionary key/value flags must be zero");
933
- Q(r);
934
- const i = { offset: t + 2 }, n = A(e, i, "DictMalformed");
933
+ et(r);
934
+ const i = { offset: t + 2 }, n = N(e, i, "DictMalformed");
935
935
  let o = i.offset;
936
936
  for (let a = 0; a < n; a++)
937
- o = Y(r, e, o, "DictMalformed"), o = Y(s, e, o, "DictMalformed");
937
+ o = X(r, e, o, "DictMalformed"), o = X(s, e, o, "DictMalformed");
938
938
  return o - t;
939
939
  }
940
- function Y(e, t, r, s) {
941
- const i = g(e);
940
+ function X(e, t, r, s) {
941
+ const i = F(e);
942
942
  if (i >= 0)
943
943
  return y(t, r, i), r + i;
944
944
  switch (e) {
945
945
  case 12:
946
946
  case 13: {
947
- const n = { offset: r }, o = A(t, n, s);
947
+ const n = { offset: r }, o = N(t, n, s);
948
948
  return y(t, n.offset, o), n.offset + o;
949
949
  }
950
950
  case 11: {
951
- const n = { offset: r }, o = A(t, n, s);
951
+ const n = { offset: r }, o = N(t, n, s);
952
952
  return y(t, n.offset, o), n.offset + o;
953
953
  }
954
954
  case 9:
955
- return r + Z(t, r);
955
+ return r + rt(t, r);
956
956
  case 10:
957
- return r + tt(t, r);
957
+ return r + st(t, r);
958
958
  default:
959
- throw new Error(`Unsupported Teleport type ${w[e]}`);
959
+ throw new Error(`Unsupported Teleport type ${S[e]}`);
960
960
  }
961
961
  }
962
- function nt(e) {
962
+ function lt(e) {
963
963
  return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
964
964
  }
965
- function B(e) {
965
+ function G(e) {
966
966
  return e instanceof Uint8Array ? e : new Uint8Array(e);
967
967
  }
968
- var It = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(It || {}), ht = /* @__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))(ht || {}), ct = /* @__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))(ct || {}), ut = /* @__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))(ut || {}), Et = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(Et || {}), _t = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(_t || {}), ft = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Hevc = 2] = "Hevc", e[e.Vp8 = 3] = "Vp8", e))(ft || {}), dt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(dt || {}), D = /* @__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.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.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_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", 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.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.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.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.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(D || {});
969
- const se = 1368629611, ie = 2431514951, ne = 2914494629, oe = 3284746250, ae = 4101844078;
970
- function Tt(e) {
968
+ var ut = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(ut || {}), Et = /* @__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))(Et || {}), _t = /* @__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))(_t || {}), ft = /* @__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))(ft || {}), dt = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(dt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(Tt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Hevc = 2] = "Hevc", e[e.Vp8 = 3] = "Vp8", e))(yt || {}), Nt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(Nt || {}), R = /* @__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.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.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_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", 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.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.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.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.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(R || {});
969
+ const oe = 1368629611, ae = 2431514951, le = 2914494629, Ie = 3284746250, ce = 4101844078;
970
+ function At(e) {
971
971
  const t = {};
972
- return yt(t), t;
972
+ return St(t), t;
973
973
  }
974
- function yt(e) {
975
- return e.Description = "", e.Codec = It.Unknown, e.SampleRate = 0, e.Channels = 0, e.BitDepth = 0, e;
974
+ function St(e) {
975
+ return e.Description = "", e.Codec = ut.Unknown, e.SampleRate = 0, e.Channels = 0, e.BitDepth = 0, e;
976
976
  }
977
- function le(e, t) {
978
- const r = t ?? Tt();
979
- return yt(r), Ie(e, r), r;
977
+ function he(e, t) {
978
+ const r = t ?? At();
979
+ return St(r), ue(e, r), r;
980
980
  }
981
- function Ie(e, t) {
981
+ function ue(e, t) {
982
982
  let r;
983
983
  for (; (r = e.next()) !== null; )
984
984
  switch (r.fieldId) {
985
- case se: {
985
+ case oe: {
986
986
  if (r.isNull) throw new Error();
987
987
  t.Description = r.asString();
988
988
  break;
989
989
  }
990
- case ie: {
990
+ case ae: {
991
991
  if (r.isNull) throw new Error();
992
992
  t.Channels = r.asInt32();
993
993
  break;
994
994
  }
995
- case ne: {
995
+ case le: {
996
996
  if (r.isNull) throw new Error();
997
997
  t.BitDepth = r.asInt32();
998
998
  break;
999
999
  }
1000
- case oe: {
1000
+ case Ie: {
1001
1001
  if (r.isNull) throw new Error();
1002
1002
  t.Codec = r.asInt32();
1003
1003
  break;
1004
1004
  }
1005
- case ae: {
1005
+ case ce: {
1006
1006
  if (r.isNull) throw new Error();
1007
1007
  t.SampleRate = r.asInt32();
1008
1008
  break;
1009
1009
  }
1010
1010
  }
1011
1011
  }
1012
- const he = 76337612, ce = 185396121, ue = 388632637, Ee = 417197284, _e = 469070965, fe = 470595159, de = 781727218, Te = 834078886, ye = 1043273762, Ne = 1236999138, Ae = 1368629611, we = 1715899485, Se = 1942830531, Ue = 1999510636, Ce = 2079864626, De = 2142346422, Re = 2598291686, me = 2719718823, Le = 2810953526, pe = 2840065720, Oe = 2885165957, ge = 3586157513, be = 3717933110, Pe = 4062655306;
1013
- function Fe(e) {
1012
+ const Ee = 76337612, _e = 185396121, fe = 388632637, de = 417197284, Te = 469070965, ye = 470595159, Ne = 781727218, Ae = 834078886, Se = 1043273762, we = 1236999138, Ue = 1368629611, Ce = 1715899485, De = 1942830531, Re = 1999510636, me = 2079864626, Le = 2142346422, pe = 2598291686, ge = 2719718823, Oe = 2810953526, be = 2840065720, Pe = 2885165957, Fe = 3586157513, ke = 3717933110, Ve = 4062655306;
1013
+ function Be(e) {
1014
1014
  const t = {};
1015
- return Nt(t), t;
1015
+ return wt(t), t;
1016
1016
  }
1017
- function Nt(e) {
1018
- return e.ContextType = ct.Unknown, e.UserType = _t.Unknown, e.PayloadType = ut.Unknown, e.Description = "", e.UserId = "", e.DeviceId = "", e.ProductId = "", e.VersionId = "", e.InstallId = "", e.Locale = "", e.SessionId = -1, e.IsInternal = !1, e.IsReady = !1, e.HasInput = !1, e.ChannelLocale = "", e.EmbeddedSpaceId = "", e.AuthSessionId = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = 0n, e.UserAgent = "", e.ClientType = ht.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = dt.Unknown, e;
1017
+ function wt(e) {
1018
+ return e.ContextType = _t.Unknown, e.UserType = Tt.Unknown, e.PayloadType = ft.Unknown, e.Description = "", e.UserId = "", e.DeviceId = "", e.ProductId = "", e.VersionId = "", e.InstallId = "", e.Locale = "", e.SessionId = -1, e.IsInternal = !1, e.IsReady = !1, e.HasInput = !1, e.ChannelLocale = "", e.EmbeddedSpaceId = "", e.AuthSessionId = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = 0n, e.UserAgent = "", e.ClientType = Et.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = Nt.Unknown, e;
1019
1019
  }
1020
- function ke(e, t) {
1021
- const r = t ?? Fe();
1022
- return Nt(r), Ve(e, r), r;
1020
+ function Me(e, t) {
1021
+ const r = t ?? Be();
1022
+ return wt(r), ve(e, r), r;
1023
1023
  }
1024
- function Ve(e, t) {
1024
+ function ve(e, t) {
1025
1025
  let r;
1026
1026
  for (; (r = e.next()) !== null; )
1027
1027
  switch (r.fieldId) {
1028
- case he: {
1028
+ case Ee: {
1029
1029
  if (r.isNull) throw new Error();
1030
1030
  t.DeviceId = r.asString();
1031
1031
  break;
1032
1032
  }
1033
- case ce: {
1033
+ case _e: {
1034
1034
  if (r.isNull) throw new Error();
1035
1035
  t.InstallId = r.asString();
1036
1036
  break;
1037
1037
  }
1038
- case ue: {
1038
+ case fe: {
1039
1039
  if (r.isNull) throw new Error();
1040
1040
  t.UserAgent = r.asString();
1041
1041
  break;
1042
1042
  }
1043
- case Ee: {
1043
+ case de: {
1044
1044
  if (r.isNull) throw new Error();
1045
1045
  t.ContextType = r.asInt32();
1046
1046
  break;
1047
1047
  }
1048
- case _e: {
1048
+ case Te: {
1049
1049
  if (r.isNull) throw new Error();
1050
1050
  t.HasInput = r.asBool();
1051
1051
  break;
1052
1052
  }
1053
- case fe: {
1053
+ case ye: {
1054
1054
  if (r.isNull) throw new Error();
1055
1055
  t.UserType = r.asInt32();
1056
1056
  break;
1057
1057
  }
1058
- case de: {
1058
+ case Ne: {
1059
1059
  if (r.isNull) throw new Error();
1060
1060
  t.UserId = r.asString();
1061
1061
  break;
1062
1062
  }
1063
- case Te: {
1063
+ case Ae: {
1064
1064
  if (r.isNull) throw new Error();
1065
1065
  t.ProductId = r.asString();
1066
1066
  break;
1067
1067
  }
1068
- case ye: {
1068
+ case Se: {
1069
1069
  if (r.isNull) throw new Error();
1070
1070
  t.AuthSessionId = r.asString();
1071
1071
  break;
1072
1072
  }
1073
- case Ne: {
1073
+ case we: {
1074
1074
  if (r.isNull) throw new Error();
1075
1075
  t.ReceiveAllMessages = r.asBool();
1076
1076
  break;
1077
1077
  }
1078
- case Ae: {
1078
+ case Ue: {
1079
1079
  if (r.isNull) throw new Error();
1080
1080
  t.Description = r.asString();
1081
1081
  break;
1082
1082
  }
1083
- case we: {
1083
+ case Ce: {
1084
1084
  if (r.isNull) throw new Error();
1085
1085
  t.Locale = r.asString();
1086
1086
  break;
1087
1087
  }
1088
- case Se: {
1088
+ case De: {
1089
1089
  if (r.isNull) throw new Error();
1090
1090
  t.SdkType = r.asInt32();
1091
1091
  break;
1092
1092
  }
1093
- case Ue: {
1093
+ case Re: {
1094
1094
  if (r.isNull) throw new Error();
1095
1095
  t.SessionId = r.asInt32();
1096
1096
  break;
1097
1097
  }
1098
- case Ce: {
1098
+ case me: {
1099
1099
  if (r.isNull) throw new Error();
1100
1100
  t.PreciseJoinedAt = r.asUInt64();
1101
1101
  break;
1102
1102
  }
1103
- case De: {
1103
+ case Le: {
1104
1104
  if (r.isNull) throw new Error();
1105
1105
  t.PayloadType = r.asInt32();
1106
1106
  break;
1107
1107
  }
1108
- case Re: {
1108
+ case pe: {
1109
1109
  if (r.isNull) throw new Error();
1110
1110
  t.VersionId = r.asString();
1111
1111
  break;
1112
1112
  }
1113
- case me: {
1113
+ case ge: {
1114
1114
  if (r.isNull) throw new Error();
1115
1115
  t.UniqueSessionId = r.asString();
1116
1116
  break;
1117
1117
  }
1118
- case Le: {
1118
+ case Oe: {
1119
1119
  if (r.isNull) throw new Error();
1120
1120
  t.ClientType = r.asInt32();
1121
1121
  break;
1122
1122
  }
1123
- case pe: {
1123
+ case be: {
1124
1124
  if (r.isNull) throw new Error();
1125
1125
  t.IsReady = r.asBool();
1126
1126
  break;
1127
1127
  }
1128
- case Oe: {
1128
+ case Pe: {
1129
1129
  if (r.isNull) throw new Error();
1130
- t.Parameters = Be(r.asDictionary());
1130
+ t.Parameters = Ge(r.asDictionary());
1131
1131
  break;
1132
1132
  }
1133
- case ge: {
1133
+ case Fe: {
1134
1134
  if (r.isNull) throw new Error();
1135
1135
  t.IsInternal = r.asBool();
1136
1136
  break;
1137
1137
  }
1138
- case be: {
1138
+ case ke: {
1139
1139
  if (r.isNull) throw new Error();
1140
1140
  t.ChannelLocale = r.asString();
1141
1141
  break;
1142
1142
  }
1143
- case Pe: {
1143
+ case Ve: {
1144
1144
  if (r.isNull) throw new Error();
1145
1145
  t.EmbeddedSpaceId = r.asString();
1146
1146
  break;
1147
1147
  }
1148
1148
  }
1149
1149
  }
1150
- function Be(e) {
1150
+ function Ge(e) {
1151
1151
  const t = /* @__PURE__ */ Object.create(null);
1152
1152
  let r;
1153
1153
  for (; (r = e.next()) !== null; ) {
@@ -1156,634 +1156,634 @@ function Be(e) {
1156
1156
  }
1157
1157
  return t;
1158
1158
  }
1159
- const Me = 703025676, ve = 814454131, Ge = 972460562, xe = 976255570, He = 1368629611, Ke = 1479280922, We = 1533537016, Ye = 2274386296, $e = 2603556958, je = 2885165957, Xe = 3568439632;
1160
- function ze(e) {
1159
+ const xe = 703025676, He = 814454131, Ke = 972460562, We = 976255570, Ye = 1368629611, $e = 1479280922, je = 1533537016, Xe = 2274386296, ze = 2603556958, Je = 2885165957, qe = 3568439632;
1160
+ function Qe(e) {
1161
1161
  const t = {};
1162
- return At(t), t;
1162
+ return Ut(t), t;
1163
1163
  }
1164
- function At(e) {
1164
+ function Ut(e) {
1165
1165
  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;
1166
1166
  }
1167
- function Je(e, t) {
1168
- const r = t ?? ze();
1169
- return At(r), qe(e, r), r;
1167
+ function Ze(e, t) {
1168
+ const r = t ?? Qe();
1169
+ return Ut(r), tr(e, r), r;
1170
1170
  }
1171
- function qe(e, t) {
1171
+ function tr(e, t) {
1172
1172
  let r;
1173
1173
  for (; (r = e.next()) !== null; )
1174
1174
  switch (r.fieldId) {
1175
- case Me: {
1175
+ case xe: {
1176
1176
  if (r.isNull) throw new Error();
1177
1177
  t.ResultTypeName = r.asString();
1178
1178
  break;
1179
1179
  }
1180
- case ve: {
1180
+ case He: {
1181
1181
  if (r.isNull) throw new Error();
1182
1182
  t.FunctionName = r.asString();
1183
1183
  break;
1184
1184
  }
1185
- case Ge: {
1185
+ case Ke: {
1186
1186
  if (r.isNull) throw new Error();
1187
1187
  t.EnumerableItemTypeName = r.asString();
1188
1188
  break;
1189
1189
  }
1190
- case xe: {
1190
+ case We: {
1191
1191
  if (r.isNull) throw new Error();
1192
1192
  t.FunctionId = r.asGuid();
1193
1193
  break;
1194
1194
  }
1195
- case He: {
1195
+ case Ye: {
1196
1196
  if (r.isNull) throw new Error();
1197
1197
  t.Description = r.asString();
1198
1198
  break;
1199
1199
  }
1200
- case Ke: {
1200
+ case $e: {
1201
1201
  if (r.isNull) throw new Error();
1202
1202
  t.IsCancellable = r.asBool();
1203
1203
  break;
1204
1204
  }
1205
- case We: {
1205
+ case je: {
1206
1206
  if (r.isNull) throw new Error();
1207
1207
  t.RequiresInstance = r.asBool();
1208
1208
  break;
1209
1209
  }
1210
- case Ye: {
1210
+ case Xe: {
1211
1211
  if (r.isNull) throw new Error();
1212
1212
  t.LlmInlineResult = r.asBool();
1213
1213
  break;
1214
1214
  }
1215
- case $e: {
1215
+ case ze: {
1216
1216
  if (r.isNull) throw new Error();
1217
1217
  t.IsEnumerable = r.asBool();
1218
1218
  break;
1219
1219
  }
1220
- case je: {
1220
+ case Je: {
1221
1221
  if (r.isNull) throw new Error();
1222
- t.Parameters = Qe(r.asArray());
1222
+ t.Parameters = er(r.asArray());
1223
1223
  break;
1224
1224
  }
1225
- case Xe: {
1225
+ case qe: {
1226
1226
  if (r.isNull) throw new Error();
1227
1227
  t.LlmCallOnlyOnce = r.asBool();
1228
1228
  break;
1229
1229
  }
1230
1230
  }
1231
1231
  }
1232
- function Qe(e) {
1232
+ function er(e) {
1233
1233
  const t = [];
1234
1234
  let r;
1235
1235
  for (; (r = e.next()) !== null; )
1236
- t.push(Ir(r.asObject()));
1236
+ t.push(ur(r.asObject()));
1237
1237
  return t;
1238
1238
  }
1239
- const Ze = 607861992, tr = 894485888, er = 972460562, rr = 1368629611, sr = 1883521406, ir = 2603556958, nr = 3609695522, or = 4075263697, ar = 4257460908;
1240
- function lr(e) {
1239
+ const rr = 607861992, sr = 894485888, ir = 972460562, nr = 1368629611, or = 1883521406, ar = 2603556958, lr = 3609695522, Ir = 4075263697, cr = 4257460908;
1240
+ function hr(e) {
1241
1241
  const t = {};
1242
- return wt(t), t;
1242
+ return Ct(t), t;
1243
1243
  }
1244
- function wt(e) {
1244
+ function Ct(e) {
1245
1245
  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;
1246
1246
  }
1247
- function Ir(e, t) {
1248
- const r = t ?? lr();
1249
- return wt(r), hr(e, r), r;
1247
+ function ur(e, t) {
1248
+ const r = t ?? hr();
1249
+ return Ct(r), Er(e, r), r;
1250
1250
  }
1251
- function hr(e, t) {
1251
+ function Er(e, t) {
1252
1252
  let r;
1253
1253
  for (; (r = e.next()) !== null; )
1254
1254
  switch (r.fieldId) {
1255
- case Ze: {
1255
+ case rr: {
1256
1256
  if (r.isNull) throw new Error();
1257
1257
  t.HasDefaultValue = r.asBool();
1258
1258
  break;
1259
1259
  }
1260
- case tr: {
1260
+ case sr: {
1261
1261
  if (r.isNull) throw new Error();
1262
1262
  t.DefaultValueJson = r.asString();
1263
1263
  break;
1264
1264
  }
1265
- case er: {
1265
+ case ir: {
1266
1266
  if (r.isNull) throw new Error();
1267
1267
  t.EnumerableItemTypeName = r.asString();
1268
1268
  break;
1269
1269
  }
1270
- case rr: {
1270
+ case nr: {
1271
1271
  if (r.isNull) throw new Error();
1272
1272
  t.Description = r.asString();
1273
1273
  break;
1274
1274
  }
1275
- case sr: {
1275
+ case or: {
1276
1276
  if (r.isNull) throw new Error();
1277
1277
  t.DefaultValueData = r.asBinary();
1278
1278
  break;
1279
1279
  }
1280
- case ir: {
1280
+ case ar: {
1281
1281
  if (r.isNull) throw new Error();
1282
1282
  t.IsEnumerable = r.asBool();
1283
1283
  break;
1284
1284
  }
1285
- case nr: {
1285
+ case lr: {
1286
1286
  if (r.isNull) throw new Error();
1287
1287
  t.TypeName = r.asString();
1288
1288
  break;
1289
1289
  }
1290
- case or: {
1290
+ case Ir: {
1291
1291
  if (r.isNull) throw new Error();
1292
1292
  t.ParameterName = r.asString();
1293
1293
  break;
1294
1294
  }
1295
- case ar: {
1295
+ case cr: {
1296
1296
  if (r.isNull) throw new Error();
1297
1297
  t.ParameterIndex = r.asInt32();
1298
1298
  break;
1299
1299
  }
1300
1300
  }
1301
1301
  }
1302
- const cr = 3167053791, ur = 3342364356, Er = 3612929027;
1303
- function St(e) {
1302
+ const _r = 3167053791, fr = 3342364356, dr = 3612929027;
1303
+ function Dt(e) {
1304
1304
  const t = {};
1305
- return Ut(t), t;
1305
+ return Rt(t), t;
1306
1306
  }
1307
- function Ut(e) {
1308
- return e.Category = "", e.Type = Et.Face, e.FaceBlendshapes = [], e;
1307
+ function Rt(e) {
1308
+ return e.Category = "", e.Type = dt.Face, e.FaceBlendshapes = [], e;
1309
1309
  }
1310
- function _r(e, t) {
1311
- const r = t ?? St();
1312
- return Ut(r), fr(e, r), r;
1310
+ function Tr(e, t) {
1311
+ const r = t ?? Dt();
1312
+ return Rt(r), yr(e, r), r;
1313
1313
  }
1314
- function fr(e, t) {
1314
+ function yr(e, t) {
1315
1315
  let r;
1316
1316
  for (; (r = e.next()) !== null; )
1317
1317
  switch (r.fieldId) {
1318
- case cr: {
1318
+ case _r: {
1319
1319
  if (r.isNull) throw new Error();
1320
1320
  t.Type = r.asInt32();
1321
1321
  break;
1322
1322
  }
1323
- case ur: {
1323
+ case fr: {
1324
1324
  if (r.isNull) throw new Error();
1325
- t.FaceBlendshapes = dr(r.asArray());
1325
+ t.FaceBlendshapes = Nr(r.asArray());
1326
1326
  break;
1327
1327
  }
1328
- case Er: {
1328
+ case dr: {
1329
1329
  if (r.isNull) throw new Error();
1330
1330
  t.Category = r.asString();
1331
1331
  break;
1332
1332
  }
1333
1333
  }
1334
1334
  }
1335
- function dr(e) {
1335
+ function Nr(e) {
1336
1336
  const t = [];
1337
1337
  let r;
1338
1338
  for (; (r = e.next()) !== null; )
1339
1339
  t.push(r.asString());
1340
1340
  return t;
1341
1341
  }
1342
- const Tr = 3612929027;
1343
- function Ct(e) {
1342
+ const Ar = 3612929027;
1343
+ function mt(e) {
1344
1344
  const t = {};
1345
- return Dt(t), t;
1345
+ return Lt(t), t;
1346
1346
  }
1347
- function Dt(e) {
1347
+ function Lt(e) {
1348
1348
  return e.Category = "", e;
1349
1349
  }
1350
- function yr(e, t) {
1351
- const r = t ?? Ct();
1352
- return Dt(r), Nr(e, r), r;
1350
+ function Sr(e, t) {
1351
+ const r = t ?? mt();
1352
+ return Lt(r), wr(e, r), r;
1353
1353
  }
1354
- function Nr(e, t) {
1354
+ function wr(e, t) {
1355
1355
  let r;
1356
1356
  for (; (r = e.next()) !== null; )
1357
1357
  switch (r.fieldId) {
1358
- case Tr: {
1358
+ case Ar: {
1359
1359
  if (r.isNull) throw new Error();
1360
1360
  t.Category = r.asString();
1361
1361
  break;
1362
1362
  }
1363
1363
  }
1364
1364
  }
1365
- const Ar = 1368629611, wr = 2950031986, Sr = 3284746250, Ur = 4065070594;
1366
- function Rt(e) {
1365
+ const Ur = 1368629611, Cr = 2950031986, Dr = 3284746250, Rr = 4065070594;
1366
+ function pt(e) {
1367
1367
  const t = {};
1368
- return mt(t), t;
1368
+ return gt(t), t;
1369
1369
  }
1370
- function mt(e) {
1371
- return e.Description = "", e.Codec = ft.H264, e.Width = 0, e.Height = 0, e;
1370
+ function gt(e) {
1371
+ return e.Description = "", e.Codec = yt.H264, e.Width = 0, e.Height = 0, e;
1372
1372
  }
1373
- function Cr(e, t) {
1374
- const r = t ?? Rt();
1375
- return mt(r), Dr(e, r), r;
1373
+ function mr(e, t) {
1374
+ const r = t ?? pt();
1375
+ return gt(r), Lr(e, r), r;
1376
1376
  }
1377
- function Dr(e, t) {
1377
+ function Lr(e, t) {
1378
1378
  let r;
1379
1379
  for (; (r = e.next()) !== null; )
1380
1380
  switch (r.fieldId) {
1381
- case Ar: {
1381
+ case Ur: {
1382
1382
  if (r.isNull) throw new Error();
1383
1383
  t.Description = r.asString();
1384
1384
  break;
1385
1385
  }
1386
- case wr: {
1386
+ case Cr: {
1387
1387
  if (r.isNull) throw new Error();
1388
1388
  t.Height = r.asInt32();
1389
1389
  break;
1390
1390
  }
1391
- case Sr: {
1391
+ case Dr: {
1392
1392
  if (r.isNull) throw new Error();
1393
1393
  t.Codec = r.asInt32();
1394
1394
  break;
1395
1395
  }
1396
- case Ur: {
1396
+ case Rr: {
1397
1397
  if (r.isNull) throw new Error();
1398
1398
  t.Width = r.asInt32();
1399
1399
  break;
1400
1400
  }
1401
1401
  }
1402
1402
  }
1403
- const Rr = 3, mr = 65539, Lr = 693643444, pr = 1144553441, Or = 1497620243, gr = 1559330978, br = 1999510636, Pr = 2277643855, Fr = 2469008121, kr = 3219210453, Vr = 3678477544, Br = 3696445035, Mr = 3707543140, vr = 3712281496, Gr = 3823842552, xr = 3895362455, Hr = 3897397815, Kr = 4225107827;
1404
- function Wr(e) {
1403
+ const pr = 3, gr = 65539, Or = 693643444, br = 1144553441, Pr = 1497620243, Fr = 1559330978, kr = 1999510636, Vr = 2277643855, Br = 2469008121, Mr = 3219210453, vr = 3678477544, Gr = 3696445035, xr = 3707543140, Hr = 3712281496, Kr = 3823842552, Wr = 3895362455, Yr = 3897397815, $r = 4225107827;
1404
+ function jr(e) {
1405
1405
  const t = {};
1406
- return Lt(t), t;
1406
+ return Ot(t), t;
1407
1407
  }
1408
- function Lt(e) {
1408
+ function Ot(e) {
1409
1409
  return e.Clients = /* @__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.ChannelInstanceId = "", e.FirstUserId = "", e.ChannelUrl = "", e.ChannelId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.SessionId = "", e.Functions = /* @__PURE__ */ Object.create(null), e;
1410
1410
  }
1411
- function Yr(e, t) {
1412
- const r = m.create(e);
1413
- return $r(r, t);
1411
+ function Xr(e, t) {
1412
+ const r = g.create(e);
1413
+ return zr(r, t);
1414
1414
  }
1415
- function $r(e, t) {
1416
- const r = t ?? Wr();
1417
- return Lt(r), jr(e, r), r;
1415
+ function zr(e, t) {
1416
+ const r = t ?? jr();
1417
+ return Ot(r), Jr(e, r), r;
1418
1418
  }
1419
- function jr(e, t) {
1419
+ function Jr(e, t) {
1420
1420
  let r;
1421
1421
  for (; (r = e.next()) !== null; )
1422
1422
  switch (r.fieldId) {
1423
- case Lr: {
1423
+ case Or: {
1424
1424
  if (r.isNull) throw new Error();
1425
1425
  t.FirstUserId = r.asString();
1426
1426
  break;
1427
1427
  }
1428
- case pr: {
1428
+ case br: {
1429
1429
  if (r.isNull) throw new Error();
1430
- t.Clients = zr(r.asDictionary());
1430
+ t.Clients = Qr(r.asDictionary());
1431
1431
  break;
1432
1432
  }
1433
- case Or: {
1433
+ case Pr: {
1434
1434
  if (r.isNull) throw new Error();
1435
- t.TrackingStreams = Jr(r.asDictionary());
1435
+ t.TrackingStreams = Zr(r.asDictionary());
1436
1436
  break;
1437
1437
  }
1438
- case gr: {
1438
+ case Fr: {
1439
1439
  if (r.isNull) throw new Error();
1440
1440
  t.ChannelId = r.asString();
1441
1441
  break;
1442
1442
  }
1443
- case br: {
1443
+ case kr: {
1444
1444
  if (r.isNull) throw new Error();
1445
1445
  t.SessionId = r.asString();
1446
1446
  break;
1447
1447
  }
1448
- case Pr: {
1448
+ case Vr: {
1449
1449
  if (r.isNull) throw new Error();
1450
1450
  t.ChannelUrl = r.asString();
1451
1451
  break;
1452
1452
  }
1453
- case Fr: {
1453
+ case Br: {
1454
1454
  if (r.isNull) throw new Error();
1455
1455
  t.ChannelName = r.asString();
1456
1456
  break;
1457
1457
  }
1458
- case kr: {
1458
+ case Mr: {
1459
1459
  if (r.isNull) throw new Error();
1460
1460
  t.OrganisationName = r.asString();
1461
1461
  break;
1462
1462
  }
1463
- case Vr: {
1463
+ case vr: {
1464
1464
  if (r.isNull) throw new Error();
1465
- t.Functions = qr(r.asDictionary());
1465
+ t.Functions = ts(r.asDictionary());
1466
1466
  break;
1467
1467
  }
1468
- case Br: {
1468
+ case Gr: {
1469
1469
  if (r.isNull) throw new Error();
1470
- t.UIStreams = Qr(r.asDictionary());
1470
+ t.UIStreams = es(r.asDictionary());
1471
1471
  break;
1472
1472
  }
1473
- case Mr: {
1473
+ case xr: {
1474
1474
  if (r.isNull) throw new Error();
1475
1475
  t.SpaceId = r.asString();
1476
1476
  break;
1477
1477
  }
1478
- case vr: {
1478
+ case Hr: {
1479
1479
  if (r.isNull) throw new Error();
1480
1480
  t.PrimaryUserId = r.asString();
1481
1481
  break;
1482
1482
  }
1483
- case Gr: {
1483
+ case Kr: {
1484
1484
  if (r.isNull) throw new Error();
1485
1485
  t.ChannelInstanceId = r.asString();
1486
1486
  break;
1487
1487
  }
1488
- case xr: {
1488
+ case Wr: {
1489
1489
  if (r.isNull) throw new Error();
1490
- t.AudioStreams = Zr(r.asDictionary());
1490
+ t.AudioStreams = rs(r.asDictionary());
1491
1491
  break;
1492
1492
  }
1493
- case Hr: {
1493
+ case Yr: {
1494
1494
  if (r.isNull) throw new Error();
1495
- t.VideoStreams = ts(r.asDictionary());
1495
+ t.VideoStreams = ss(r.asDictionary());
1496
1496
  break;
1497
1497
  }
1498
- case Kr: {
1498
+ case $r: {
1499
1499
  if (r.isNull) throw new Error();
1500
1500
  t.SpaceName = r.asString();
1501
1501
  break;
1502
1502
  }
1503
1503
  }
1504
1504
  }
1505
- function Xr(e, t) {
1506
- const r = K(e, mr, Rr);
1507
- return Yr(r, t);
1505
+ function qr(e, t) {
1506
+ const r = $(e, gr, pr);
1507
+ return Xr(r, t);
1508
1508
  }
1509
- function zr(e) {
1509
+ function Qr(e) {
1510
1510
  const t = /* @__PURE__ */ Object.create(null);
1511
1511
  let r;
1512
1512
  for (; (r = e.next()) !== null; ) {
1513
1513
  const s = r.key.asInt32();
1514
- t[s] = ke(r.value.asObject());
1514
+ t[s] = Me(r.value.asObject());
1515
1515
  }
1516
1516
  return t;
1517
1517
  }
1518
- function Jr(e) {
1518
+ function Zr(e) {
1519
1519
  const t = /* @__PURE__ */ Object.create(null);
1520
1520
  let r;
1521
1521
  for (; (r = e.next()) !== null; ) {
1522
1522
  const s = r.key.asString();
1523
- t[s] = Ls(r.value.asObject());
1523
+ t[s] = Os(r.value.asObject());
1524
1524
  }
1525
1525
  return t;
1526
1526
  }
1527
- function qr(e) {
1527
+ function ts(e) {
1528
1528
  const t = /* @__PURE__ */ Object.create(null);
1529
1529
  let r;
1530
1530
  for (; (r = e.next()) !== null; ) {
1531
1531
  const s = r.key.asInt32();
1532
- t[s] = es(r.value.asArray());
1532
+ t[s] = is(r.value.asArray());
1533
1533
  }
1534
1534
  return t;
1535
1535
  }
1536
- function Qr(e) {
1536
+ function es(e) {
1537
1537
  const t = /* @__PURE__ */ Object.create(null);
1538
1538
  let r;
1539
1539
  for (; (r = e.next()) !== null; ) {
1540
1540
  const s = r.key.asString();
1541
- t[s] = as(r.value.asObject());
1541
+ t[s] = cs(r.value.asObject());
1542
1542
  }
1543
1543
  return t;
1544
1544
  }
1545
- function Zr(e) {
1545
+ function rs(e) {
1546
1546
  const t = /* @__PURE__ */ Object.create(null);
1547
1547
  let r;
1548
1548
  for (; (r = e.next()) !== null; ) {
1549
1549
  const s = r.key.asString();
1550
- t[s] = _s(r.value.asObject());
1550
+ t[s] = Ts(r.value.asObject());
1551
1551
  }
1552
1552
  return t;
1553
1553
  }
1554
- function ts(e) {
1554
+ function ss(e) {
1555
1555
  const t = /* @__PURE__ */ Object.create(null);
1556
1556
  let r;
1557
1557
  for (; (r = e.next()) !== null; ) {
1558
1558
  const s = r.key.asString();
1559
- t[s] = ws(r.value.asObject());
1559
+ t[s] = Cs(r.value.asObject());
1560
1560
  }
1561
1561
  return t;
1562
1562
  }
1563
- function es(e) {
1563
+ function is(e) {
1564
1564
  const t = [];
1565
1565
  let r;
1566
1566
  for (; (r = e.next()) !== null; )
1567
- t.push(Je(r.asObject()));
1567
+ t.push(Ze(r.asObject()));
1568
1568
  return t;
1569
1569
  }
1570
- const rs = 161083277, ss = 325678206, is = 3469892363, ns = 3645544153;
1571
- function os(e) {
1570
+ const ns = 161083277, os = 325678206, as = 3469892363, ls = 3645544153;
1571
+ function Is(e) {
1572
1572
  const t = {};
1573
- return pt(t), t;
1573
+ return bt(t), t;
1574
1574
  }
1575
- function pt(e) {
1576
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ct(), e;
1575
+ function bt(e) {
1576
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = mt(), e;
1577
1577
  }
1578
- function as(e, t) {
1579
- const r = t ?? os();
1580
- return pt(r), ls(e, r), r;
1578
+ function cs(e, t) {
1579
+ const r = t ?? Is();
1580
+ return bt(r), hs(e, r), r;
1581
1581
  }
1582
- function ls(e, t) {
1582
+ function hs(e, t) {
1583
1583
  let r;
1584
1584
  for (; (r = e.next()) !== null; )
1585
1585
  switch (r.fieldId) {
1586
- case rs: {
1586
+ case ns: {
1587
1587
  if (r.isNull) throw new Error();
1588
1588
  t.StreamId = r.asString();
1589
1589
  break;
1590
1590
  }
1591
- case ss: {
1591
+ case os: {
1592
1592
  if (r.isNull) throw new Error();
1593
1593
  t.ClientSessionId = r.asInt32();
1594
1594
  break;
1595
1595
  }
1596
- case is: {
1596
+ case as: {
1597
1597
  if (r.isNull) throw new Error();
1598
1598
  t.TrackId = r.asInt32();
1599
1599
  break;
1600
1600
  }
1601
- case ns: {
1601
+ case ls: {
1602
1602
  if (r.isNull) throw new Error();
1603
- t.Info = yr(r.asObject());
1603
+ t.Info = Sr(r.asObject());
1604
1604
  break;
1605
1605
  }
1606
1606
  }
1607
1607
  }
1608
- const Is = 161083277, hs = 325678206, cs = 3469892363, us = 3645544153;
1609
- function Es(e) {
1608
+ const us = 161083277, Es = 325678206, _s = 3469892363, fs = 3645544153;
1609
+ function ds(e) {
1610
1610
  const t = {};
1611
- return Ot(t), t;
1611
+ return Pt(t), t;
1612
1612
  }
1613
- function Ot(e) {
1614
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Tt(), e;
1613
+ function Pt(e) {
1614
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = At(), e;
1615
1615
  }
1616
- function _s(e, t) {
1617
- const r = t ?? Es();
1618
- return Ot(r), fs(e, r), r;
1616
+ function Ts(e, t) {
1617
+ const r = t ?? ds();
1618
+ return Pt(r), ys(e, r), r;
1619
1619
  }
1620
- function fs(e, t) {
1620
+ function ys(e, t) {
1621
1621
  let r;
1622
1622
  for (; (r = e.next()) !== null; )
1623
1623
  switch (r.fieldId) {
1624
- case Is: {
1624
+ case us: {
1625
1625
  if (r.isNull) throw new Error();
1626
1626
  t.StreamId = r.asString();
1627
1627
  break;
1628
1628
  }
1629
- case hs: {
1629
+ case Es: {
1630
1630
  if (r.isNull) throw new Error();
1631
1631
  t.ClientSessionId = r.asInt32();
1632
1632
  break;
1633
1633
  }
1634
- case cs: {
1634
+ case _s: {
1635
1635
  if (r.isNull) throw new Error();
1636
1636
  t.TrackId = r.asInt32();
1637
1637
  break;
1638
1638
  }
1639
- case us: {
1639
+ case fs: {
1640
1640
  if (r.isNull) throw new Error();
1641
- t.Info = le(r.asObject());
1641
+ t.Info = he(r.asObject());
1642
1642
  break;
1643
1643
  }
1644
1644
  }
1645
1645
  }
1646
- const ds = 161083277, Ts = 325678206, ys = 3469892363, Ns = 3645544153;
1647
- function As(e) {
1646
+ const Ns = 161083277, As = 325678206, Ss = 3469892363, ws = 3645544153;
1647
+ function Us(e) {
1648
1648
  const t = {};
1649
- return gt(t), t;
1649
+ return Ft(t), t;
1650
1650
  }
1651
- function gt(e) {
1652
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Rt(), e;
1651
+ function Ft(e) {
1652
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = pt(), e;
1653
1653
  }
1654
- function ws(e, t) {
1655
- const r = t ?? As();
1656
- return gt(r), Ss(e, r), r;
1654
+ function Cs(e, t) {
1655
+ const r = t ?? Us();
1656
+ return Ft(r), Ds(e, r), r;
1657
1657
  }
1658
- function Ss(e, t) {
1658
+ function Ds(e, t) {
1659
1659
  let r;
1660
1660
  for (; (r = e.next()) !== null; )
1661
1661
  switch (r.fieldId) {
1662
- case ds: {
1662
+ case Ns: {
1663
1663
  if (r.isNull) throw new Error();
1664
1664
  t.StreamId = r.asString();
1665
1665
  break;
1666
1666
  }
1667
- case Ts: {
1667
+ case As: {
1668
1668
  if (r.isNull) throw new Error();
1669
1669
  t.ClientSessionId = r.asInt32();
1670
1670
  break;
1671
1671
  }
1672
- case ys: {
1672
+ case Ss: {
1673
1673
  if (r.isNull) throw new Error();
1674
1674
  t.TrackId = r.asInt32();
1675
1675
  break;
1676
1676
  }
1677
- case Ns: {
1677
+ case ws: {
1678
1678
  if (r.isNull) throw new Error();
1679
- t.Info = Cr(r.asObject());
1679
+ t.Info = mr(r.asObject());
1680
1680
  break;
1681
1681
  }
1682
1682
  }
1683
1683
  }
1684
- const Us = 161083277, Cs = 325678206, Ds = 3469892363, Rs = 3645544153;
1685
- function ms(e) {
1684
+ const Rs = 161083277, ms = 325678206, Ls = 3469892363, ps = 3645544153;
1685
+ function gs(e) {
1686
1686
  const t = {};
1687
- return bt(t), t;
1687
+ return kt(t), t;
1688
1688
  }
1689
- function bt(e) {
1690
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = St(), e;
1689
+ function kt(e) {
1690
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Dt(), e;
1691
1691
  }
1692
- function Ls(e, t) {
1693
- const r = t ?? ms();
1694
- return bt(r), ps(e, r), r;
1692
+ function Os(e, t) {
1693
+ const r = t ?? gs();
1694
+ return kt(r), bs(e, r), r;
1695
1695
  }
1696
- function ps(e, t) {
1696
+ function bs(e, t) {
1697
1697
  let r;
1698
1698
  for (; (r = e.next()) !== null; )
1699
1699
  switch (r.fieldId) {
1700
- case Us: {
1700
+ case Rs: {
1701
1701
  if (r.isNull) throw new Error();
1702
1702
  t.StreamId = r.asString();
1703
1703
  break;
1704
1704
  }
1705
- case Cs: {
1705
+ case ms: {
1706
1706
  if (r.isNull) throw new Error();
1707
1707
  t.ClientSessionId = r.asInt32();
1708
1708
  break;
1709
1709
  }
1710
- case Ds: {
1710
+ case Ls: {
1711
1711
  if (r.isNull) throw new Error();
1712
1712
  t.TrackId = r.asInt32();
1713
1713
  break;
1714
1714
  }
1715
- case Rs: {
1715
+ case ps: {
1716
1716
  if (r.isNull) throw new Error();
1717
- t.Info = _r(r.asObject());
1717
+ t.Info = Tr(r.asObject());
1718
1718
  break;
1719
1719
  }
1720
1720
  }
1721
1721
  }
1722
- const Os = 1405462580, gs = 2968276160;
1723
- function bs(e) {
1722
+ const Ps = 1405462580, Fs = 2968276160;
1723
+ function ks(e) {
1724
1724
  const t = {};
1725
- return Pt(t), t;
1725
+ return Vt(t), t;
1726
1726
  }
1727
- function Pt(e) {
1727
+ function Vt(e) {
1728
1728
  return e.MimeType = "", e.Value = new Uint8Array(0), e;
1729
1729
  }
1730
- function Ps(e, t) {
1731
- const r = t ?? bs();
1732
- return Pt(r), Fs(e, r), r;
1730
+ function Vs(e, t) {
1731
+ const r = t ?? ks();
1732
+ return Vt(r), Bs(e, r), r;
1733
1733
  }
1734
- function Fs(e, t) {
1734
+ function Bs(e, t) {
1735
1735
  let r;
1736
1736
  for (; (r = e.next()) !== null; )
1737
1737
  switch (r.fieldId) {
1738
- case Os: {
1738
+ case Ps: {
1739
1739
  if (r.isNull) throw new Error();
1740
1740
  t.Value = r.asBinary();
1741
1741
  break;
1742
1742
  }
1743
- case gs: {
1743
+ case Fs: {
1744
1744
  if (r.isNull) throw new Error();
1745
1745
  t.MimeType = r.asString();
1746
1746
  break;
1747
1747
  }
1748
1748
  }
1749
1749
  }
1750
- const ks = 1, Vs = 2097188, Bs = 979822885, Ms = 2374537704;
1751
- function vs(e) {
1750
+ const Ms = 1, vs = 2097188, Gs = 979822885, xs = 2374537704;
1751
+ function Hs(e) {
1752
1752
  const t = {};
1753
- return Ft(t), t;
1753
+ return Bt(t), t;
1754
1754
  }
1755
- function Ft(e) {
1755
+ function Bt(e) {
1756
1756
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1757
1757
  }
1758
- function Gs(e, t) {
1759
- const r = m.create(e);
1760
- return xs(r, t);
1758
+ function Ks(e, t) {
1759
+ const r = g.create(e);
1760
+ return Ws(r, t);
1761
1761
  }
1762
- function xs(e, t) {
1763
- const r = t ?? vs();
1764
- return Ft(r), Hs(e, r), r;
1762
+ function Ws(e, t) {
1763
+ const r = t ?? Hs();
1764
+ return Bt(r), Ys(e, r), r;
1765
1765
  }
1766
- function Hs(e, t) {
1766
+ function Ys(e, t) {
1767
1767
  let r;
1768
1768
  for (; (r = e.next()) !== null; )
1769
1769
  switch (r.fieldId) {
1770
- case Bs: {
1770
+ case Gs: {
1771
1771
  if (r.isNull) throw new Error();
1772
1772
  t.StyleId = r.asString();
1773
1773
  break;
1774
1774
  }
1775
- case Ms: {
1775
+ case xs: {
1776
1776
  if (r.isNull) throw new Error();
1777
- t.Style = Ws(r.asDictionary());
1777
+ t.Style = js(r.asDictionary());
1778
1778
  break;
1779
1779
  }
1780
1780
  }
1781
1781
  }
1782
- function Ks(e, t) {
1783
- const r = K(e, Vs, ks);
1784
- return Gs(r, t);
1782
+ function $s(e, t) {
1783
+ const r = $(e, vs, Ms);
1784
+ return Ks(r, t);
1785
1785
  }
1786
- function Ws(e) {
1786
+ function js(e) {
1787
1787
  const t = /* @__PURE__ */ Object.create(null);
1788
1788
  let r;
1789
1789
  for (; (r = e.next()) !== null; ) {
@@ -1792,73 +1792,73 @@ function Ws(e) {
1792
1792
  }
1793
1793
  return t;
1794
1794
  }
1795
- const Ys = 1, $s = 2097192, js = 2136687806;
1796
- function Xs(e) {
1795
+ const Xs = 1, zs = 2097192, Js = 2136687806;
1796
+ function qs(e) {
1797
1797
  const t = {};
1798
- return kt(t), t;
1798
+ return Mt(t), t;
1799
1799
  }
1800
- function kt(e) {
1800
+ function Mt(e) {
1801
1801
  return e.Styles = [], e;
1802
1802
  }
1803
- function zs(e, t) {
1804
- const r = m.create(e);
1805
- return Js(r, t);
1803
+ function Qs(e, t) {
1804
+ const r = g.create(e);
1805
+ return Zs(r, t);
1806
1806
  }
1807
- function Js(e, t) {
1808
- const r = t ?? Xs();
1809
- return kt(r), qs(e, r), r;
1807
+ function Zs(e, t) {
1808
+ const r = t ?? qs();
1809
+ return Mt(r), ti(e, r), r;
1810
1810
  }
1811
- function qs(e, t) {
1811
+ function ti(e, t) {
1812
1812
  let r;
1813
1813
  for (; (r = e.next()) !== null; )
1814
1814
  switch (r.fieldId) {
1815
- case js: {
1815
+ case Js: {
1816
1816
  if (r.isNull) throw new Error();
1817
- t.Styles = Zs(r.asArray());
1817
+ t.Styles = ri(r.asArray());
1818
1818
  break;
1819
1819
  }
1820
1820
  }
1821
1821
  }
1822
- function Qs(e, t) {
1823
- const r = K(e, $s, Ys);
1824
- return zs(r, t);
1822
+ function ei(e, t) {
1823
+ const r = $(e, zs, Xs);
1824
+ return Qs(r, t);
1825
1825
  }
1826
- function Zs(e) {
1826
+ function ri(e) {
1827
1827
  const t = [];
1828
1828
  let r;
1829
1829
  for (; (r = e.next()) !== null; )
1830
- t.push(si(r.asObject()));
1830
+ t.push(oi(r.asObject()));
1831
1831
  return t;
1832
1832
  }
1833
- const ti = 979822885, ei = 2374537704;
1834
- function ri(e) {
1833
+ const si = 979822885, ii = 2374537704;
1834
+ function ni(e) {
1835
1835
  const t = {};
1836
- return Vt(t), t;
1836
+ return vt(t), t;
1837
1837
  }
1838
- function Vt(e) {
1838
+ function vt(e) {
1839
1839
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1840
1840
  }
1841
- function si(e, t) {
1842
- const r = t ?? ri();
1843
- return Vt(r), ii(e, r), r;
1841
+ function oi(e, t) {
1842
+ const r = t ?? ni();
1843
+ return vt(r), ai(e, r), r;
1844
1844
  }
1845
- function ii(e, t) {
1845
+ function ai(e, t) {
1846
1846
  let r;
1847
1847
  for (; (r = e.next()) !== null; )
1848
1848
  switch (r.fieldId) {
1849
- case ti: {
1849
+ case si: {
1850
1850
  if (r.isNull) throw new Error();
1851
1851
  t.StyleId = r.asString();
1852
1852
  break;
1853
1853
  }
1854
- case ei: {
1854
+ case ii: {
1855
1855
  if (r.isNull) throw new Error();
1856
- t.Style = ni(r.asDictionary());
1856
+ t.Style = li(r.asDictionary());
1857
1857
  break;
1858
1858
  }
1859
1859
  }
1860
1860
  }
1861
- function ni(e) {
1861
+ function li(e) {
1862
1862
  const t = /* @__PURE__ */ Object.create(null);
1863
1863
  let r;
1864
1864
  for (; (r = e.next()) !== null; ) {
@@ -1867,73 +1867,75 @@ function ni(e) {
1867
1867
  }
1868
1868
  return t;
1869
1869
  }
1870
- const oi = 1, ai = 2097190, li = 425183262, Ii = 653781469;
1871
- function hi(e) {
1870
+ const Ii = 1, ci = 2097190, hi = 425183262, ui = 653781469;
1871
+ function Ei(e) {
1872
1872
  const t = {};
1873
- return Bt(t), t;
1873
+ return Gt(t), t;
1874
1874
  }
1875
- function Bt(e) {
1875
+ function Gt(e) {
1876
1876
  return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
1877
1877
  }
1878
- function ci(e, t) {
1879
- const r = m.create(e);
1880
- return ui(r, t);
1878
+ function _i(e, t) {
1879
+ const r = g.create(e);
1880
+ return fi(r, t);
1881
1881
  }
1882
- function ui(e, t) {
1883
- const r = t ?? hi();
1884
- return Bt(r), Ei(e, r), r;
1882
+ function fi(e, t) {
1883
+ const r = t ?? Ei();
1884
+ return Gt(r), di(e, r), r;
1885
1885
  }
1886
- function Ei(e, t) {
1886
+ function di(e, t) {
1887
1887
  let r;
1888
1888
  for (; (r = e.next()) !== null; )
1889
1889
  switch (r.fieldId) {
1890
- case li: {
1890
+ case hi: {
1891
1891
  if (r.isNull) throw new Error();
1892
1892
  t.Json = r.asString();
1893
1893
  break;
1894
1894
  }
1895
- case Ii: {
1895
+ case ui: {
1896
1896
  if (r.isNull) throw new Error();
1897
- t.Payloads = fi(r.asDictionary());
1897
+ t.Payloads = yi(r.asDictionary());
1898
1898
  break;
1899
1899
  }
1900
1900
  }
1901
1901
  }
1902
- function _i(e, t) {
1903
- const r = K(e, ai, oi);
1904
- return ci(r, t);
1902
+ function Ti(e, t) {
1903
+ const r = $(e, ci, Ii);
1904
+ return _i(r, t);
1905
1905
  }
1906
- function fi(e) {
1906
+ function yi(e) {
1907
1907
  const t = /* @__PURE__ */ Object.create(null);
1908
1908
  let r;
1909
1909
  for (; (r = e.next()) !== null; ) {
1910
1910
  const s = r.key.asString();
1911
- t[s] = Ps(r.value.asObject());
1911
+ t[s] = Vs(r.value.asObject());
1912
1912
  }
1913
1913
  return t;
1914
1914
  }
1915
- const Mt = 1, di = 1048636, Ti = 2610786289;
1916
- function yi(e) {
1917
- const t = new V(Mt);
1918
- return Ni(e, t), t.finish();
1915
+ const xt = 1, Ni = 1048636, Ai = 2610786289;
1916
+ function Si(e) {
1917
+ const t = new v(xt);
1918
+ return wi(e, t), t.finish();
1919
1919
  }
1920
- function Ni(e, t) {
1921
- t.writeUInt32Field(Ti, e.Version >>> 0);
1920
+ function wi(e, t) {
1921
+ t.writeUInt32Field(Ai, e.Version >>> 0);
1922
1922
  }
1923
- function Ai(e, t, r) {
1924
- const s = yi(e);
1925
- return zt(di, s, Mt, t, r);
1923
+ function Ui(e, t, r) {
1924
+ const s = Si(e);
1925
+ return Qt(Ni, s, xt, t, r);
1926
1926
  }
1927
- function S(e) {
1927
+ function U(e) {
1928
1928
  return typeof e == "object" && e !== null && !Array.isArray(e);
1929
1929
  }
1930
- function vt(e) {
1931
- const t = {};
1932
- for (const [r, s] of Object.entries(e))
1933
- t[r] = s;
1930
+ function Ht(e) {
1931
+ const t = {}, r = Object.keys(e);
1932
+ for (let s = 0; s < r.length; s++) {
1933
+ const i = r[s];
1934
+ t[i] = e[i];
1935
+ }
1934
1936
  return t;
1935
1937
  }
1936
- function Gt(e, t, r, s) {
1938
+ function Kt(e, t, r, s) {
1937
1939
  if (!(e === void 0 && s)) {
1938
1940
  if (Array.isArray(e)) {
1939
1941
  const i = [];
@@ -1951,7 +1953,7 @@ function Gt(e, t, r, s) {
1951
1953
  return [];
1952
1954
  }
1953
1955
  }
1954
- function et(e, t) {
1956
+ function it(e, t) {
1955
1957
  if (!e || typeof e != "object")
1956
1958
  throw new Error(`Invalid UI node at ${t}`);
1957
1959
  const r = e.Id, s = e.Type, i = e.Props, n = e.Children, o = e.StyleIds;
@@ -1961,15 +1963,15 @@ function et(e, t) {
1961
1963
  throw new Error(`Invalid or missing node type for ${r}`);
1962
1964
  let a = {};
1963
1965
  if (i != null) {
1964
- if (!S(i))
1966
+ if (!U(i))
1965
1967
  throw new Error(`Invalid props for node ${r}`);
1966
- a = vt(i);
1968
+ a = Ht(i);
1967
1969
  }
1968
1970
  let l = [];
1969
1971
  Array.isArray(n) && (l = n.map(
1970
- (I, h) => et(I ?? {}, `${t}.children[${h}]`)
1972
+ (I, c) => it(I ?? {}, `${t}.children[${c}]`)
1971
1973
  ));
1972
- const u = Gt(o, t, r, !1);
1974
+ const u = Kt(o, t, r, !1);
1973
1975
  return {
1974
1976
  id: r,
1975
1977
  type: s,
@@ -1978,8 +1980,8 @@ function et(e, t) {
1978
1980
  styleIds: u ?? []
1979
1981
  };
1980
1982
  }
1981
- function wi(e, t) {
1982
- if (!S(e))
1983
+ function Ci(e, t) {
1984
+ if (!U(e))
1983
1985
  throw new Error(`Invalid text delta at ${t}`);
1984
1986
  const r = e.NodeId, s = e.PropertyName, i = e.Start, n = e.End, o = e.InsertedText;
1985
1987
  if (typeof r != "string" || r.length === 0)
@@ -2005,8 +2007,8 @@ function wi(e, t) {
2005
2007
  insertedText: o
2006
2008
  };
2007
2009
  }
2008
- function xt(e, t) {
2009
- if (!S(e))
2010
+ function Wt(e, t) {
2011
+ if (!U(e))
2010
2012
  throw new Error(`Invalid UI diff node at ${t}`);
2011
2013
  const r = e.Id, s = e.Type, i = e.StyleIds;
2012
2014
  if (typeof r != "string" || r.length === 0)
@@ -2014,32 +2016,32 @@ function xt(e, t) {
2014
2016
  if (typeof s != "string" || s.length === 0)
2015
2017
  throw new Error(`Invalid diff type for ${r}`);
2016
2018
  const n = Array.isArray(e.Added) ? e.Added.map(
2017
- (h, c) => et(h ?? {}, `${t}.added[${c}]`)
2019
+ (c, h) => it(c ?? {}, `${t}.added[${h}]`)
2018
2020
  ) : [], o = [];
2019
- Array.isArray(e.Removed) && e.Removed.forEach((h, c) => {
2020
- if (typeof h == "string") {
2021
- o.push(h);
2021
+ Array.isArray(e.Removed) && e.Removed.forEach((c, h) => {
2022
+ if (typeof c == "string") {
2023
+ o.push(c);
2022
2024
  return;
2023
2025
  }
2024
- if (S(h) && typeof h.Id == "string") {
2025
- o.push(h.Id);
2026
+ if (U(c) && typeof c.Id == "string") {
2027
+ o.push(c.Id);
2026
2028
  return;
2027
2029
  }
2028
- throw new Error(`Invalid removed node at ${t}.removed[${c}]`);
2030
+ throw new Error(`Invalid removed node at ${t}.removed[${h}]`);
2029
2031
  });
2030
2032
  const a = Array.isArray(e.Updated) ? e.Updated.map(
2031
- (h, c) => xt(h ?? {}, `${t}.updated[${c}]`)
2033
+ (c, h) => Wt(c ?? {}, `${t}.updated[${h}]`)
2032
2034
  ) : [], l = /* @__PURE__ */ new Map();
2033
- if (S(e.ChangedProps))
2034
- for (const [h, c] of Object.entries(e.ChangedProps)) {
2035
- if (!S(c))
2035
+ if (U(e.ChangedProps))
2036
+ for (const [c, h] of Object.entries(e.ChangedProps)) {
2037
+ if (!U(h))
2036
2038
  continue;
2037
- const E = c.New;
2038
- E === void 0 ? l.set(h, void 0) : S(E) ? l.set(h, vt(E)) : l.set(h, E);
2039
+ const E = h.New;
2040
+ E === void 0 ? l.set(c, void 0) : U(E) ? l.set(c, Ht(E)) : l.set(c, E);
2039
2041
  }
2040
2042
  const u = Array.isArray(e.TextUpdates) ? e.TextUpdates.map(
2041
- (h, c) => wi(h ?? {}, `${t}.textUpdates[${c}]`)
2042
- ) : [], I = Gt(i, t, r, !0);
2043
+ (c, h) => Ci(c ?? {}, `${t}.textUpdates[${h}]`)
2044
+ ) : [], I = Kt(i, t, r, !0);
2043
2045
  return {
2044
2046
  id: r,
2045
2047
  type: s,
@@ -2051,19 +2053,19 @@ function xt(e, t) {
2051
2053
  ...I !== void 0 ? { styleIds: I } : {}
2052
2054
  };
2053
2055
  }
2054
- function Si(e) {
2056
+ function Di(e) {
2055
2057
  const t = /* @__PURE__ */ new Map();
2056
2058
  for (const [r, s] of Object.entries(e))
2057
2059
  t.set(r, s);
2058
2060
  return t;
2059
2061
  }
2060
- function Ui(e, t, r) {
2062
+ function Ri(e, t, r) {
2061
2063
  if (!e || typeof e != "object")
2062
- throw new U("UI update graph is missing");
2063
- const s = et(e, "graph");
2064
+ throw new C("UI update graph is missing");
2065
+ const s = it(e, "graph");
2064
2066
  if (s.type !== "root")
2065
- throw new U('UI update root element must have type "root"');
2066
- const i = Di(s.props, t);
2067
+ throw new C('UI update root element must have type "root"');
2068
+ const i = Li(s.props, t);
2067
2069
  return {
2068
2070
  type: "full",
2069
2071
  version: r,
@@ -2071,15 +2073,15 @@ function Ui(e, t, r) {
2071
2073
  metadata: i
2072
2074
  };
2073
2075
  }
2074
- function Ci(e, t, r) {
2076
+ function mi(e, t, r) {
2075
2077
  if (!e || typeof e != "object")
2076
- throw new U("UI diff payload is missing");
2077
- if (!S(t))
2078
- throw new U("UI diff metadata must be an object");
2078
+ throw new C("UI diff payload is missing");
2079
+ if (!U(t))
2080
+ throw new C("UI diff metadata must be an object");
2079
2081
  const s = t.viewId;
2080
2082
  if (typeof s != "string" || s.length === 0)
2081
- throw new U("UI diff metadata is missing viewId");
2082
- const i = xt(e, "diff"), n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, o = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, l = $(t.optimisticPatch), u = j(t.optimisticReconcile), I = {
2083
+ throw new C("UI diff metadata is missing viewId");
2084
+ const i = Wt(e, "diff"), n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, o = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, l = z(t.optimisticPatch), u = J(t.optimisticReconcile), I = {
2083
2085
  viewId: s,
2084
2086
  ...n !== void 0 ? { optimisticActionId: n } : {},
2085
2087
  ...o !== void 0 ? { isOptimistic: o } : {},
@@ -2094,12 +2096,12 @@ function Ci(e, t, r) {
2094
2096
  metadata: I
2095
2097
  };
2096
2098
  }
2097
- function Di(e, t) {
2099
+ function Li(e, t) {
2098
2100
  const r = e.viewId;
2099
2101
  if (typeof r != "string" || r.length === 0)
2100
- throw new U("UI update root is missing viewId");
2101
- let s = r, i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, n = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, o = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, a = $(e.optimisticPatch), l = j(e.optimisticReconcile);
2102
- return S(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (s = t.viewId), (t.optimisticActionId === null || typeof t.optimisticActionId == "string") && (i = t.optimisticActionId), typeof t.isOptimistic == "boolean" && (n = t.isOptimistic), typeof t.isUpdate == "boolean" && (o = t.isUpdate), t.optimisticPatch !== void 0 && (a = $(t.optimisticPatch)), t.optimisticReconcile !== void 0 && (l = j(t.optimisticReconcile))), {
2102
+ throw new C("UI update root is missing viewId");
2103
+ let s = r, i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, n = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, o = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, a = z(e.optimisticPatch), l = J(e.optimisticReconcile);
2104
+ return U(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (s = t.viewId), (t.optimisticActionId === null || typeof t.optimisticActionId == "string") && (i = t.optimisticActionId), typeof t.isOptimistic == "boolean" && (n = t.isOptimistic), typeof t.isUpdate == "boolean" && (o = t.isUpdate), t.optimisticPatch !== void 0 && (a = z(t.optimisticPatch)), t.optimisticReconcile !== void 0 && (l = J(t.optimisticReconcile))), {
2103
2105
  viewId: s,
2104
2106
  ...i !== void 0 ? { optimisticActionId: i } : {},
2105
2107
  ...n !== void 0 ? { isOptimistic: n } : {},
@@ -2108,8 +2110,8 @@ function Di(e, t) {
2108
2110
  ...l ? { optimisticReconcile: l } : {}
2109
2111
  };
2110
2112
  }
2111
- function $(e) {
2112
- if (!S(e))
2113
+ function z(e) {
2114
+ if (!U(e))
2113
2115
  return;
2114
2116
  const t = e, r = t.id, s = t.actionId, i = t.ordinal, n = t.baseVersion, o = t.supersedes;
2115
2117
  if (typeof r != "string" || r.length === 0 || typeof s != "string" || s.length === 0 || typeof i != "number" || !Number.isFinite(i) || typeof n != "number" || !Number.isFinite(n))
@@ -2129,8 +2131,8 @@ function $(e) {
2129
2131
  ...a && a.length > 0 ? { supersedes: a } : {}
2130
2132
  };
2131
2133
  }
2132
- function j(e) {
2133
- if (!S(e))
2134
+ function J(e) {
2135
+ if (!U(e))
2134
2136
  return;
2135
2137
  const t = e, r = t.baseVersion, s = t.drop;
2136
2138
  if (typeof r != "number" || !Number.isFinite(r))
@@ -2147,32 +2149,32 @@ function j(e) {
2147
2149
  ...i && i.length > 0 ? { drop: i } : {}
2148
2150
  };
2149
2151
  }
2150
- class U extends Error {
2152
+ class C extends Error {
2151
2153
  constructor(t, r) {
2152
2154
  super(t), this.causeError = r, this.name = "UiUpdateParseError", r instanceof Error && (this.stack = r.stack);
2153
2155
  }
2154
2156
  }
2155
- function Ri(e) {
2157
+ function pi(e) {
2156
2158
  let t;
2157
2159
  try {
2158
2160
  t = JSON.parse(e.Json);
2159
2161
  } catch (o) {
2160
- throw new U("Failed to parse UIUpdate.Json payload", o);
2162
+ throw new C("Failed to parse UIUpdate.Json payload", o);
2161
2163
  }
2162
2164
  if (!t || typeof t != "object")
2163
- throw new U("UI update snapshot must be an object");
2165
+ throw new C("UI update snapshot must be an object");
2164
2166
  const { type: r, version: s } = t;
2165
2167
  if (r !== "full" && r !== "diff")
2166
- throw new U(`Unknown UI update type: ${String(r)}`);
2168
+ throw new C(`Unknown UI update type: ${String(r)}`);
2167
2169
  if (typeof s != "number")
2168
- throw new U("UI update version must be a number");
2169
- const i = r === "full" ? Ui(t.graph, t.metadata, s) : Ci(t.diff, t.metadata, s), n = e.Payloads ? Si(e.Payloads) : /* @__PURE__ */ new Map();
2170
+ throw new C("UI update version must be a number");
2171
+ const i = r === "full" ? Ri(t.graph, t.metadata, s) : mi(t.diff, t.metadata, s), n = e.Payloads ? Di(e.Payloads) : /* @__PURE__ */ new Map();
2170
2172
  return {
2171
2173
  snapshot: i,
2172
2174
  payloads: n
2173
2175
  };
2174
2176
  }
2175
- class mi {
2177
+ class gi {
2176
2178
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2177
2179
  cache = /* @__PURE__ */ new Map();
2178
2180
  /**
@@ -2253,7 +2255,7 @@ class mi {
2253
2255
  return this.cache.size;
2254
2256
  }
2255
2257
  }
2256
- class Li {
2258
+ class Oi {
2257
2259
  views = /* @__PURE__ */ new Map();
2258
2260
  listeners = /* @__PURE__ */ new Set();
2259
2261
  payloads = /* @__PURE__ */ new Map();
@@ -2275,7 +2277,7 @@ class Li {
2275
2277
  patchesDirty = !0;
2276
2278
  payloadsDirty = !0;
2277
2279
  // Handler cache for stable event handlers
2278
- handlerCache = new mi();
2280
+ handlerCache = new gi();
2279
2281
  getSortedPatches(t) {
2280
2282
  const r = this.buildPatchCacheKey(t.patches);
2281
2283
  if (t.sortedPatchesCacheKey === r && t.sortedPatchesCache)
@@ -2323,36 +2325,36 @@ class Li {
2323
2325
  o.patches.delete(I) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2324
2326
  const u = o.composite ?? o.baseline;
2325
2327
  if (r.type === "full")
2326
- o.baseline = r.root, o.composite = r.root, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = r.version, l = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, r.root && p(r.root, this.changedNodeIds);
2328
+ o.baseline = r.root, o.composite = r.root, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = r.version, l = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, r.root && b(r.root, this.changedNodeIds);
2327
2329
  else if (i.optimisticPatch) {
2328
2330
  if (!u)
2329
2331
  return !1;
2330
- const I = G(u, r.diff);
2331
- I !== u && (o.composite = I, l = !0, this.viewsDirty = !0, v(u, I, this.changedNodeIds));
2332
- const h = i.optimisticPatch, c = {
2333
- id: h.id,
2334
- actionId: h.actionId,
2335
- ordinal: h.ordinal,
2336
- baseVersion: h.baseVersion,
2332
+ const I = K(u, r.diff);
2333
+ I !== u && (o.composite = I, l = !0, this.viewsDirty = !0, H(u, I, this.changedNodeIds));
2334
+ const c = i.optimisticPatch, h = {
2335
+ id: c.id,
2336
+ actionId: c.actionId,
2337
+ ordinal: c.ordinal,
2338
+ baseVersion: c.baseVersion,
2337
2339
  diff: r.diff
2338
2340
  };
2339
- o.patches.set(c.id, c), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = r.version;
2341
+ o.patches.set(h.id, h), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = r.version;
2340
2342
  } else {
2341
2343
  const I = o.baseline ?? u;
2342
2344
  if (!I)
2343
2345
  return !1;
2344
- const h = G(I, r.diff);
2345
- h !== I ? (o.baseline = h, l = !0, this.viewsDirty = !0) : o.baseline = h, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version;
2346
- let c = o.baseline ?? h;
2346
+ const c = K(I, r.diff);
2347
+ c !== I ? (o.baseline = c, l = !0, this.viewsDirty = !0) : o.baseline = c, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version;
2348
+ let h = o.baseline ?? c;
2347
2349
  const E = this.getSortedPatches(o);
2348
2350
  for (const d of E) {
2349
- const _ = G(c, d.diff);
2350
- _ !== c && (l = !0, this.viewsDirty = !0), c = _, d.baseVersion = o.baselineVersion;
2351
+ const _ = K(h, d.diff);
2352
+ _ !== h && (l = !0, this.viewsDirty = !0), h = _, d.baseVersion = o.baselineVersion;
2351
2353
  }
2352
- o.composite !== c && (o.composite = c, l = !0, this.viewsDirty = !0), u && c ? v(u, c, this.changedNodeIds) : c && p(c, this.changedNodeIds), o.version = r.version;
2354
+ o.composite !== h && (o.composite = h, l = !0, this.viewsDirty = !0), u && h ? H(u, h, this.changedNodeIds) : h && b(h, this.changedNodeIds), o.version = r.version;
2353
2355
  }
2354
- for (const [I, h] of s)
2355
- this.payloads.get(I) !== h && (this.payloads.set(I, h), l = !0, this.payloadsDirty = !0);
2356
+ for (const [I, c] of s)
2357
+ this.payloads.get(I) !== c && (this.payloads.set(I, c), l = !0, this.payloadsDirty = !0);
2356
2358
  return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = r.version, !1);
2357
2359
  }
2358
2360
  replaceFromWire(t) {
@@ -2373,42 +2375,42 @@ class Li {
2373
2375
  let s = !1, i = null, n = null, o = null;
2374
2376
  const a = () => (i || (i = new Map(this.snapshot.views)), i), l = () => (n || (n = new Map(this.snapshot.payloads)), n), u = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2375
2377
  if (t.deleteViews && t.deleteViews.length > 0)
2376
- for (const c of t.deleteViews)
2377
- a().delete(c) && (s = !0, this.structureChanged = !0);
2378
+ for (const h of t.deleteViews)
2379
+ a().delete(h) && (s = !0, this.structureChanged = !0);
2378
2380
  if (t.upsertViews && t.upsertViews.length > 0)
2379
- for (const [c, E] of t.upsertViews) {
2380
- const d = a(), _ = d.get(c);
2381
- _ !== E && (d.set(c, E), s = !0, _ ? v(_, E, this.changedNodeIds) : (p(E, this.changedNodeIds), this.structureChanged = !0));
2381
+ for (const [h, E] of t.upsertViews) {
2382
+ const d = a(), _ = d.get(h);
2383
+ _ !== E && (d.set(h, E), s = !0, _ ? H(_, E, this.changedNodeIds) : (b(E, this.changedNodeIds), this.structureChanged = !0));
2382
2384
  }
2383
2385
  if (t.deletePayloads && t.deletePayloads.length > 0)
2384
- for (const c of t.deletePayloads)
2385
- l().delete(c) && (s = !0);
2386
+ for (const h of t.deletePayloads)
2387
+ l().delete(h) && (s = !0);
2386
2388
  if (t.upsertPayloads && t.upsertPayloads.length > 0)
2387
- for (const [c, E] of t.upsertPayloads) {
2389
+ for (const [h, E] of t.upsertPayloads) {
2388
2390
  const d = l();
2389
- d.get(c) !== E && (d.set(c, E), s = !0);
2391
+ d.get(h) !== E && (d.set(h, E), s = !0);
2390
2392
  }
2391
2393
  if (t.deleteOptimisticPatchesForViews && t.deleteOptimisticPatchesForViews.length > 0)
2392
- for (const c of t.deleteOptimisticPatchesForViews)
2393
- u().delete(c) && (s = !0);
2394
+ for (const h of t.deleteOptimisticPatchesForViews)
2395
+ u().delete(h) && (s = !0);
2394
2396
  if (t.upsertOptimisticPatches && t.upsertOptimisticPatches.length > 0)
2395
- for (const [c, E] of t.upsertOptimisticPatches) {
2396
- const d = u(), _ = d.get(c);
2397
- bi(_, E) || (d.set(c, E), s = !0);
2397
+ for (const [h, E] of t.upsertOptimisticPatches) {
2398
+ const d = u(), _ = d.get(h);
2399
+ ki(_, E) || (d.set(h, E), s = !0);
2398
2400
  }
2399
2401
  const I = t.rootViewId ?? this.snapshot.rootViewId;
2400
2402
  I !== this.snapshot.rootViewId && (s = !0, this.structureChanged = !0);
2401
- const h = t.nextVersion;
2402
- if (h !== this.snapshot.version && (s = !0), !s)
2403
- return this.snapshot = { ...this.snapshot, version: h }, !1;
2404
- for (const c of this.changedNodeIds)
2405
- this.nodeVersions.set(c, (this.nodeVersions.get(c) ?? 0) + 1);
2403
+ const c = t.nextVersion;
2404
+ if (c !== this.snapshot.version && (s = !0), !s)
2405
+ return this.snapshot = { ...this.snapshot, version: c }, !1;
2406
+ for (const h of this.changedNodeIds)
2407
+ this.nodeVersions.set(h, (this.nodeVersions.get(h) ?? 0) + 1);
2406
2408
  return this.snapshot = {
2407
2409
  rootViewId: I,
2408
2410
  views: i ?? new Map(this.snapshot.views),
2409
2411
  payloads: n ?? new Map(this.snapshot.payloads),
2410
2412
  optimisticPatches: o ?? new Map(this.snapshot.optimisticPatches),
2411
- version: h
2413
+ version: c
2412
2414
  }, this.notify(), !0;
2413
2415
  }
2414
2416
  replaceSnapshot(t) {
@@ -2417,7 +2419,7 @@ class Li {
2417
2419
  (r.rootViewId !== t.rootViewId || r.views.size !== t.views.size) && (this.structureChanged = !0);
2418
2420
  for (const [i, n] of t.views) {
2419
2421
  const o = r.views.get(i);
2420
- o ? v(o, n, this.changedNodeIds) : (p(n, this.changedNodeIds), this.structureChanged = !0);
2422
+ o ? H(o, n, this.changedNodeIds) : (b(n, this.changedNodeIds), this.structureChanged = !0);
2421
2423
  }
2422
2424
  for (const i of this.changedNodeIds)
2423
2425
  this.nodeVersions.set(i, (this.nodeVersions.get(i) ?? 0) + 1);
@@ -2450,7 +2452,7 @@ class Li {
2450
2452
  if (r)
2451
2453
  return r;
2452
2454
  for (const s of this.snapshot.views.values()) {
2453
- const i = Kt(s, t);
2455
+ const i = $t(s, t);
2454
2456
  if (i)
2455
2457
  return i;
2456
2458
  }
@@ -2521,7 +2523,7 @@ class Li {
2521
2523
  }
2522
2524
  }
2523
2525
  }
2524
- class pi {
2526
+ class bi {
2525
2527
  streams = /* @__PURE__ */ new Map();
2526
2528
  listeners = /* @__PURE__ */ new Set();
2527
2529
  apply(t, r) {
@@ -2585,110 +2587,115 @@ class pi {
2585
2587
  }
2586
2588
  getOrCreateStreamEntry(t) {
2587
2589
  let r = this.streams.get(t);
2588
- return r || (r = { store: new Li() }, this.streams.set(t, r)), r;
2590
+ return r || (r = { store: new Oi() }, this.streams.set(t, r)), r;
2589
2591
  }
2590
2592
  notify(t) {
2591
2593
  for (const r of this.listeners)
2592
2594
  r(t);
2593
2595
  }
2594
2596
  }
2595
- function G(e, t, r) {
2597
+ function K(e, t, r) {
2596
2598
  if (e.id !== t.id)
2597
2599
  return e;
2598
2600
  let s = e, i = !1;
2599
2601
  if (t.textUpdates.length > 0) {
2600
- const _ = Fi(e, t.textUpdates);
2602
+ const _ = Bi(e, t.textUpdates);
2601
2603
  s = _.node, i = _.changed;
2602
2604
  }
2603
2605
  let n = !1, o = s.props;
2604
2606
  if (t.changedProps.size > 0)
2605
- for (const [_, T] of t.changedProps.entries()) {
2606
- const N = o[_];
2607
- if (T === void 0)
2608
- (N !== void 0 || _ in o) && (n || (o = F(o), n = !0), delete o[_]);
2609
- else if (X(T)) {
2610
- const L = F(T);
2611
- b(L, N) || (n || (o = F(o), n = !0), o[_] = L);
2607
+ for (const [_, w] of t.changedProps.entries()) {
2608
+ const p = o[_];
2609
+ if (w === void 0)
2610
+ (p !== void 0 || _ in o) && (n || (o = B(o), n = !0), delete o[_]);
2611
+ else if (q(w)) {
2612
+ const O = B(w);
2613
+ k(O, p) || (n || (o = B(o), n = !0), o[_] = O);
2612
2614
  } else
2613
- b(T, N) || (n || (o = F(o), n = !0), o[_] = T);
2615
+ k(w, p) || (n || (o = B(o), n = !0), o[_] = w);
2614
2616
  }
2615
2617
  let a = !1, l = s.styleIds;
2616
- t.styleIds !== void 0 && (Wt(s.styleIds, t.styleIds) || (l = t.styleIds, a = !0));
2618
+ t.styleIds !== void 0 && (jt(s.styleIds, t.styleIds) || (l = t.styleIds, a = !0));
2617
2619
  const u = s.children ?? [];
2618
- let I = u, h = !1;
2620
+ let I = u, c = !1;
2619
2621
  if (t.removed.length > 0) {
2620
- const _ = new Set(t.removed), T = I.filter((N) => !_.has(N.id));
2621
- T.length !== I.length && (I = T, h = !0);
2622
+ const _ = t.removed, w = _.length > 8, p = w ? new Set(_) : void 0, O = w ? (T) => p.has(T) : (T) => _.includes(T);
2623
+ let A;
2624
+ for (let T = 0; T < I.length; T++) {
2625
+ const L = I[T];
2626
+ O(L.id) ? A || (A = I.slice(0, T)) : A && A.push(L);
2627
+ }
2628
+ A && (I = A, c = !0);
2622
2629
  }
2623
2630
  if (t.updated.length > 0) {
2624
- const _ = new Map(t.updated.map((N) => [N.id, N]));
2625
- let T;
2626
- for (let N = 0; N < I.length; N++) {
2627
- const L = I[N], rt = _.get(L.id);
2628
- if (!rt)
2631
+ const _ = t.updated, w = _.length > 8, p = w ? new Map(_.map((T) => [T.id, T])) : void 0, O = w ? (T) => p.get(T) : (T) => _.find((L) => L.id === T);
2632
+ let A;
2633
+ for (let T = 0; T < I.length; T++) {
2634
+ const L = I[T], nt = O(L.id);
2635
+ if (!nt)
2629
2636
  continue;
2630
- const st = G(L, rt);
2631
- st !== L && (T || (T = [...I]), T[N] = st);
2637
+ const ot = K(L, nt);
2638
+ ot !== L && (A || (A = I.slice()), A[T] = ot);
2632
2639
  }
2633
- T && (I = T, h = !0);
2640
+ A && (I = A, c = !0);
2634
2641
  }
2635
- t.added.length > 0 && (I = [...I, ...t.added], h = !0);
2636
- const c = s.type !== t.type;
2637
- return i || n || c || a || h ? !n && !h && !c && !a ? s : {
2642
+ t.added.length > 0 && (I = I.concat(t.added), c = !0);
2643
+ const h = s.type !== t.type;
2644
+ return i || n || h || a || c ? !n && !c && !h && !a ? s : {
2638
2645
  id: t.id,
2639
2646
  type: t.type,
2640
2647
  props: n ? o : s.props,
2641
- children: h ? I : u,
2648
+ children: c ? I : u,
2642
2649
  styleIds: a ? l : s.styleIds
2643
2650
  } : e;
2644
2651
  }
2645
- function p(e, t) {
2652
+ function b(e, t) {
2646
2653
  if (t.add(e.id), e.children)
2647
2654
  for (const r of e.children)
2648
- p(r, t);
2655
+ b(r, t);
2649
2656
  }
2650
- const M = [];
2651
- function Oi(e) {
2652
- for (; M.length <= e; )
2653
- M.push(/* @__PURE__ */ new Map());
2654
- return M[e].clear(), M[e];
2657
+ const x = [];
2658
+ function Pi(e) {
2659
+ for (; x.length <= e; )
2660
+ x.push(/* @__PURE__ */ new Map());
2661
+ return x[e].clear(), x[e];
2655
2662
  }
2656
- function v(e, t, r) {
2657
- Ht(e, t, r, 0);
2663
+ function H(e, t, r) {
2664
+ Yt(e, t, r, 0);
2658
2665
  }
2659
- function Ht(e, t, r, s) {
2666
+ function Yt(e, t, r, s) {
2660
2667
  if (e === t)
2661
2668
  return;
2662
- (e.type !== t.type || !gi(e.props, t.props) || !Wt(e.styleIds, t.styleIds)) && r.add(t.id);
2669
+ (e.type !== t.type || !Fi(e.props, t.props) || !jt(e.styleIds, t.styleIds)) && r.add(t.id);
2663
2670
  const n = e.children ?? [], o = t.children ?? [];
2664
2671
  if (n !== o) {
2665
- const a = Oi(s);
2672
+ const a = Pi(s);
2666
2673
  for (const l of n)
2667
2674
  a.set(l.id, l);
2668
2675
  for (const l of o) {
2669
2676
  const u = a.get(l.id);
2670
- u ? Ht(u, l, r, s + 1) : p(l, r);
2677
+ u ? Yt(u, l, r, s + 1) : b(l, r);
2671
2678
  }
2672
2679
  n.length !== o.length && r.add(t.id);
2673
2680
  }
2674
2681
  }
2675
- function gi(e, t) {
2676
- return b(e, t);
2682
+ function Fi(e, t) {
2683
+ return k(e, t);
2677
2684
  }
2678
- function Kt(e, t) {
2685
+ function $t(e, t) {
2679
2686
  if (e.id === t)
2680
2687
  return e;
2681
2688
  if (e.children)
2682
2689
  for (const r of e.children) {
2683
- const s = Kt(r, t);
2690
+ const s = $t(r, t);
2684
2691
  if (s)
2685
2692
  return s;
2686
2693
  }
2687
2694
  }
2688
- function Wt(e, t) {
2689
- return b(e, t);
2695
+ function jt(e, t) {
2696
+ return k(e, t);
2690
2697
  }
2691
- function bi(e, t) {
2698
+ function ki(e, t) {
2692
2699
  if (e === t) return !0;
2693
2700
  if (!e || !t || e.length !== t.length) return !1;
2694
2701
  for (let r = 0; r < e.length; r++) {
@@ -2698,24 +2705,24 @@ function bi(e, t) {
2698
2705
  }
2699
2706
  return !0;
2700
2707
  }
2701
- function Pi(e, t) {
2708
+ function Vi(e, t) {
2702
2709
  if (t.length === 0)
2703
2710
  return e;
2704
2711
  const r = [...t].sort((n, o) => n.start - o.start);
2705
2712
  let s = e, i = 0;
2706
2713
  for (const n of r) {
2707
- const o = ot(n.start + i, 0, s.length);
2714
+ const o = It(n.start + i, 0, s.length);
2708
2715
  if (n.end == null) {
2709
- const I = s.slice(o), h = ki(I, n.insertedText);
2710
- s = s.slice(0, o) + n.insertedText + I.slice(h), i += n.insertedText.length - h;
2716
+ const I = s.slice(o), c = Mi(I, n.insertedText);
2717
+ s = s.slice(0, o) + n.insertedText + I.slice(c), i += n.insertedText.length - c;
2711
2718
  continue;
2712
2719
  }
2713
- const a = n.end + i, l = ot(a, o, s.length), u = l - o;
2720
+ const a = n.end + i, l = It(a, o, s.length), u = l - o;
2714
2721
  s = s.slice(0, o) + n.insertedText + s.slice(l), i += n.insertedText.length - u;
2715
2722
  }
2716
2723
  return s;
2717
2724
  }
2718
- function Fi(e, t, r) {
2725
+ function Bi(e, t, r) {
2719
2726
  if (t.length === 0)
2720
2727
  return { node: e, changed: !1 };
2721
2728
  const s = /* @__PURE__ */ new Map();
@@ -2723,20 +2730,20 @@ function Fi(e, t, r) {
2723
2730
  const n = s.get(i.nodeId);
2724
2731
  n ? n.push(i) : s.set(i.nodeId, [i]);
2725
2732
  }
2726
- return Yt(e, s);
2733
+ return Xt(e, s);
2727
2734
  }
2728
- function Yt(e, t, r) {
2735
+ function Xt(e, t, r) {
2729
2736
  const s = t.get(e.id) ?? [];
2730
2737
  let i = !1, n = e.props;
2731
2738
  if (s.length > 0) {
2732
2739
  const u = /* @__PURE__ */ new Map();
2733
2740
  for (const I of s) {
2734
- const h = u.get(I.propertyName);
2735
- h ? h.push(I) : u.set(I.propertyName, [I]);
2741
+ const c = u.get(I.propertyName);
2742
+ c ? c.push(I) : u.set(I.propertyName, [I]);
2736
2743
  }
2737
- for (const [I, h] of u.entries()) {
2738
- const c = n[I], d = Pi(typeof c == "string" ? c : "", h);
2739
- i || (n = F(n), i = !0), n[I] = d;
2744
+ for (const [I, c] of u.entries()) {
2745
+ const h = n[I], d = Vi(typeof h == "string" ? h : "", c);
2746
+ i || (n = B(n), i = !0), n[I] = d;
2740
2747
  }
2741
2748
  }
2742
2749
  let o = !1;
@@ -2745,8 +2752,8 @@ function Yt(e, t, r) {
2745
2752
  if (a.length > 0) {
2746
2753
  let u;
2747
2754
  for (let I = 0; I < a.length; I++) {
2748
- const h = a[I], c = Yt(h, t);
2749
- c.changed && (u || (u = [...a]), u[I] = c.node);
2755
+ const c = a[I], h = Xt(c, t);
2756
+ h.changed && (u || (u = [...a]), u[I] = h.node);
2750
2757
  }
2751
2758
  u && (l = u, o = !0);
2752
2759
  }
@@ -2761,61 +2768,63 @@ function Yt(e, t, r) {
2761
2768
  changed: !0
2762
2769
  };
2763
2770
  }
2764
- function ot(e, t, r) {
2771
+ function It(e, t, r) {
2765
2772
  return Math.max(t, Math.min(r, e));
2766
2773
  }
2767
- function ki(e, t) {
2774
+ function Mi(e, t) {
2768
2775
  const r = Math.min(e.length, t.length);
2769
2776
  let s = 0;
2770
2777
  for (; s < r && e.charCodeAt(s) === t.charCodeAt(s); )
2771
2778
  s++;
2772
2779
  return s;
2773
2780
  }
2774
- function F(e) {
2775
- const t = {};
2776
- for (const [r, s] of Object.entries(e))
2777
- t[r] = s;
2781
+ function B(e) {
2782
+ const t = {}, r = Object.keys(e);
2783
+ for (let s = 0; s < r.length; s++) {
2784
+ const i = r[s];
2785
+ t[i] = e[i];
2786
+ }
2778
2787
  return t;
2779
2788
  }
2780
- function X(e) {
2789
+ function q(e) {
2781
2790
  return typeof e == "object" && e !== null && !Array.isArray(e);
2782
2791
  }
2783
- function b(e, t) {
2792
+ function k(e, t) {
2784
2793
  if (Object.is(e, t))
2785
2794
  return !0;
2786
2795
  if (Array.isArray(e) && Array.isArray(t)) {
2787
2796
  if (e.length !== t.length)
2788
2797
  return !1;
2789
2798
  for (let r = 0; r < e.length; r++)
2790
- if (!b(e[r], t[r]))
2799
+ if (!k(e[r], t[r]))
2791
2800
  return !1;
2792
2801
  return !0;
2793
2802
  }
2794
- if (X(e) && X(t)) {
2803
+ if (q(e) && q(t)) {
2795
2804
  const r = Object.keys(e), s = Object.keys(t);
2796
2805
  if (r.length !== s.length)
2797
2806
  return !1;
2798
2807
  for (const i of r)
2799
- if (!b(e[i], t[i]))
2808
+ if (!k(e[i], t[i]))
2800
2809
  return !1;
2801
2810
  return !0;
2802
2811
  }
2803
2812
  return !1;
2804
2813
  }
2805
- function Vi(e) {
2814
+ function vi(e) {
2806
2815
  return new Worker(
2807
- "" + new URL("assets/ui-worker-DDoIUH1E.js", import.meta.url).href,
2816
+ "" + new URL("assets/ui-worker-CBwhM0DU.js", import.meta.url).href,
2808
2817
  {
2809
2818
  type: "module",
2810
2819
  name: e?.name
2811
2820
  }
2812
2821
  );
2813
2822
  }
2814
- const C = $t("IkonUICore");
2815
- class Mi {
2823
+ const D = zt("IkonUICore");
2824
+ class xi {
2816
2825
  unsubscribeProtocolMessages;
2817
2826
  client = null;
2818
- uiStore = new pi();
2827
+ uiStore = new bi();
2819
2828
  uiWorker = null;
2820
2829
  uiStyles = /* @__PURE__ */ new Map();
2821
2830
  uiUpdateListeners = /* @__PURE__ */ new Set();
@@ -2850,7 +2859,7 @@ class Mi {
2850
2859
  initialize(t, r) {
2851
2860
  this.client = t, this.useUiWorker && this.startUiWorker(r);
2852
2861
  const s = {
2853
- opcodeGroupsMask: D.GROUP_CORE | D.GROUP_UI | D.GROUP_ACTIONS
2862
+ opcodeGroupsMask: R.GROUP_CORE | R.GROUP_UI | R.GROUP_ACTIONS
2854
2863
  };
2855
2864
  this.unsubscribeProtocolMessages = t.subscribeToProtocolMessages((i) => {
2856
2865
  if (this.uiWorker) {
@@ -2862,9 +2871,9 @@ class Mi {
2862
2871
  }
2863
2872
  startUiWorker(t) {
2864
2873
  try {
2865
- this.uiWorker = new Vi();
2874
+ this.uiWorker = new vi();
2866
2875
  } catch (i) {
2867
- C.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
2876
+ D.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
2868
2877
  return;
2869
2878
  }
2870
2879
  const r = t?.threading?.flushIntervalMs, s = t?.threading?.maxLatencyMs;
@@ -2872,7 +2881,7 @@ class Mi {
2872
2881
  this.handleUiStoreOpBatch(i.data);
2873
2882
  }), this.uiWorker.addEventListener("error", (i) => {
2874
2883
  const n = [i.message, i.filename, i.lineno, i.colno].filter((o) => o != null && String(o).length > 0);
2875
- C.warn(`UI worker failed, falling back to main thread: ${n.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
2884
+ D.warn(`UI worker failed, falling back to main thread: ${n.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
2876
2885
  });
2877
2886
  }
2878
2887
  rehydrateStoresForMainThread() {
@@ -2900,7 +2909,7 @@ class Mi {
2900
2909
  const r = t.slice().buffer;
2901
2910
  this.uiWorker.postMessage({ type: "protocol", message: r }, [r]);
2902
2911
  } catch (r) {
2903
- C.warn("Failed to forward message to UI worker", r);
2912
+ D.warn("Failed to forward message to UI worker", r);
2904
2913
  }
2905
2914
  }
2906
2915
  handleUiStoreOpBatch(t) {
@@ -2954,20 +2963,20 @@ class Mi {
2954
2963
  }
2955
2964
  }
2956
2965
  handleProtocolMessage(t) {
2957
- switch (jt(t)) {
2958
- case D.CORE_GLOBAL_STATE:
2966
+ switch (Jt(t)) {
2967
+ case R.CORE_GLOBAL_STATE:
2959
2968
  this.handleGlobalState(t);
2960
2969
  return;
2961
- case D.UI_UPDATE:
2970
+ case R.UI_UPDATE:
2962
2971
  this.handleUiUpdate(t);
2963
2972
  return;
2964
- case D.UI_STYLES:
2973
+ case R.UI_STYLES:
2965
2974
  this.handleUiStyles(t);
2966
2975
  return;
2967
- case D.UI_STYLES_BATCH:
2976
+ case R.UI_STYLES_BATCH:
2968
2977
  this.handleUiStylesBatch(t);
2969
2978
  return;
2970
- case D.ACTION_UI_CLEAR_STREAM:
2979
+ case R.ACTION_UI_CLEAR_STREAM:
2971
2980
  this.handleClearStream(t);
2972
2981
  return;
2973
2982
  default:
@@ -2976,27 +2985,27 @@ class Mi {
2976
2985
  }
2977
2986
  handleGlobalState(t) {
2978
2987
  try {
2979
- const r = Xr(t), s = /* @__PURE__ */ new Set();
2988
+ const r = qr(t), s = /* @__PURE__ */ new Set();
2980
2989
  for (const i of Object.values(r.UIStreams ?? {}))
2981
2990
  s.add(i.StreamId), this.uiStore.setCategory(i.StreamId, i.Info?.Category);
2982
2991
  for (const i of this.uiStore.getSnapshots())
2983
2992
  s.has(i.streamId) || (this.uiStore.remove(i.streamId), this.notifyUiStreamCleared(i.streamId));
2984
2993
  } catch (r) {
2985
- C.error("Failed to handle global state", r);
2994
+ D.error("Failed to handle global state", r);
2986
2995
  }
2987
2996
  }
2988
2997
  handleUiUpdate(t) {
2989
- const r = it(t), s = `${r.senderId}_${r.trackId}`;
2998
+ const r = at(t), s = `${r.senderId}_${r.trackId}`;
2990
2999
  try {
2991
- const i = _i(t), n = Ri(i);
3000
+ const i = Ti(t), n = pi(i);
2992
3001
  this.notifyUiUpdate(s, n), this.uiStore.apply(s, n), this.sendUiUpdateAck(r.trackId, n.snapshot.version);
2993
3002
  } catch (i) {
2994
- i instanceof U ? C.warn("Failed to parse UI update", i.causeError ?? i) : C.error("Failed to apply UI update", i);
3003
+ i instanceof C ? D.warn("Failed to parse UI update", i.causeError ?? i) : D.error("Failed to apply UI update", i);
2995
3004
  }
2996
3005
  }
2997
3006
  handleUiStyles(t) {
2998
3007
  try {
2999
- const r = Ks(t);
3008
+ const r = $s(t);
3000
3009
  if (!r.StyleId) return;
3001
3010
  const s = {
3002
3011
  styleId: r.StyleId,
@@ -3005,12 +3014,12 @@ class Mi {
3005
3014
  };
3006
3015
  this.uiStyles.set(s.styleId, s), this.notifyUiStyle(s);
3007
3016
  } catch (r) {
3008
- C.error("Failed to handle UI styles", r);
3017
+ D.error("Failed to handle UI styles", r);
3009
3018
  }
3010
3019
  }
3011
3020
  handleUiStylesBatch(t) {
3012
3021
  try {
3013
- const r = Qs(t);
3022
+ const r = ei(t);
3014
3023
  if (!r.Styles) return;
3015
3024
  for (const s of r.Styles) {
3016
3025
  if (!s.StyleId) continue;
@@ -3022,11 +3031,11 @@ class Mi {
3022
3031
  this.uiStyles.set(i.styleId, i), this.notifyUiStyle(i);
3023
3032
  }
3024
3033
  } catch (r) {
3025
- C.error("Failed to handle UI styles batch", r);
3034
+ D.error("Failed to handle UI styles batch", r);
3026
3035
  }
3027
3036
  }
3028
3037
  handleClearStream(t) {
3029
- const r = it(t), s = `${r.senderId}_${r.trackId}`;
3038
+ const r = at(t), s = `${r.senderId}_${r.trackId}`;
3030
3039
  this.uiStore.clear(s), this.notifyUiStreamCleared(s);
3031
3040
  }
3032
3041
  notifyUiUpdate(t, r) {
@@ -3044,18 +3053,18 @@ class Mi {
3044
3053
  sendUiUpdateAck(t, r) {
3045
3054
  if (this.client && !(!Number.isFinite(r) || r < 0))
3046
3055
  try {
3047
- const s = Ai({ Version: r }, this.client.sessionId ?? 0, { trackId: t });
3056
+ const s = Ui({ Version: r }, this.client.sessionId ?? 0, { trackId: t });
3048
3057
  this.client.sendProtocolMessage(s);
3049
3058
  } catch (s) {
3050
- C.warn("Failed to send UI update ack", s);
3059
+ D.warn("Failed to send UI update ack", s);
3051
3060
  }
3052
3061
  }
3053
3062
  }
3054
3063
  export {
3055
- mi as HandlerCache,
3056
- Mi as IkonUICore,
3057
- pi as UiStore,
3058
- Li as UiStreamStore,
3059
- U as UiUpdateParseError,
3060
- Ri as parseUiUpdate
3064
+ gi as HandlerCache,
3065
+ xi as IkonUICore,
3066
+ bi as UiStore,
3067
+ Oi as UiStreamStore,
3068
+ C as UiUpdateParseError,
3069
+ pi as parseUiUpdate
3061
3070
  };