@ikonai/sdk-ui 0.0.29 → 0.0.31

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,16 +1,16 @@
1
- import { createLogger as Yt, readOpcode as Kt, readProtocolMessageHeaders as st } from "@ikonai/sdk";
1
+ import { createLogger as $t, readOpcode as jt, readProtocolMessageHeaders as it } from "@ikonai/sdk";
2
2
  const O = 27;
3
- function $t(e) {
4
- const t = M(e), r = new DataView(t.buffer, t.byteOffset, t.byteLength);
3
+ function Xt(e) {
4
+ const t = B(e), r = new DataView(t.buffer, t.byteOffset, t.byteLength);
5
5
  if (t.length < O)
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), c = r.getUint8(26);
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
8
  if (O + l * 4 > t.length)
9
9
  throw new Error("Protocol header exceeds payload length");
10
10
  const E = [];
11
- let T = O;
11
+ let d = O;
12
12
  for (let _ = 0; _ < l; _++)
13
- E.push(r.getUint32(T, !0)), T += 4;
13
+ E.push(r.getUint32(d, !0)), d += 4;
14
14
  return {
15
15
  length: s,
16
16
  opcode: i,
@@ -20,11 +20,11 @@ function $t(e) {
20
20
  targetIds: E,
21
21
  payloadVersion: u,
22
22
  payloadType: I,
23
- flags: c
23
+ flags: h
24
24
  };
25
25
  }
26
- function H(e, t, r) {
27
- const s = M(e), i = $t(s);
26
+ function K(e, t, r) {
27
+ const s = B(e), i = Xt(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)
@@ -34,21 +34,21 @@ function H(e, t, r) {
34
34
  const n = O + i.targetIds.length * 4;
35
35
  return s.subarray(n, i.length);
36
36
  }
37
- function jt(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, 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 T = O;
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;
41
41
  for (let _ = 0; _ < l.length; _++)
42
- E.setUint32(T, l[_] >>> 0, !0), T += 4;
43
- return h.set(t, I), h;
42
+ E.setUint32(d, l[_] >>> 0, !0), d += 4;
43
+ return c.set(t, I), c;
44
44
  }
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 ot = 161, at = 162, G = new TextEncoder(), Xt = new TextDecoder("utf-8", { fatal: !0 });
47
- class B {
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 {
48
48
  constructor(t = 1) {
49
- this.version = t, this.buffer.writeByte(ot), this.buffer.writeVarUInt(t >>> 0);
49
+ this.version = t, this.buffer.writeByte(at), this.buffer.writeVarUInt(t >>> 0);
50
50
  }
51
- buffer = new V();
51
+ buffer = new k();
52
52
  closed = !1;
53
53
  cached;
54
54
  writeInt32Field(t, r) {
@@ -79,14 +79,14 @@ class B {
79
79
  this.writeFixedField(t, 14, () => this.buffer.writeBytes(s));
80
80
  }
81
81
  writeStringField(t, r) {
82
- const s = G.encode(r ?? "");
82
+ const s = x.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 B(r);
89
+ const i = new V(r);
90
90
  s(i);
91
91
  const n = i.finish();
92
92
  this.writeVariableField(t, 11, n);
@@ -98,13 +98,13 @@ class B {
98
98
  this.writeVariableField(t, 9, n);
99
99
  }
100
100
  writeDictionaryField(t, r, s, i) {
101
- const n = new X(r, s);
101
+ const n = new z(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(at), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
107
+ return this.closed || (this.buffer.writeByte(lt), 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 B {
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(x(r)), Zt(r) && this.buffer.writeVarUInt(s >>> 0);
116
+ this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(H(r)), ee(r) && this.buffer.writeVarUInt(s >>> 0);
117
117
  }
118
118
  }
119
119
  class W {
120
120
  constructor(t) {
121
121
  this.elementType = t;
122
122
  }
123
- payload = new V();
123
+ payload = new k();
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 = G.encode(t ?? "");
182
+ const r = x.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 B(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);
@@ -213,42 +213,42 @@ class W {
213
213
  10
214
214
  /* Dict */
215
215
  ), this.count++;
216
- const i = new X(t, r);
216
+ const i = new z(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 V();
223
- return t.writeByte(x(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
222
+ const t = new k();
223
+ return t.writeByte(H(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 ${S[this.elementType]}, expected ${S[t]}`);
227
+ throw new Error(`Array element type is ${w[this.elementType]}, expected ${w[t]}`);
228
228
  }
229
229
  }
230
- class X {
230
+ class z {
231
231
  constructor(t, r) {
232
- this.keyType = t, this.valueType = r, q(t);
232
+ this.keyType = t, this.valueType = r, Q(t);
233
233
  }
234
- payload = new V();
234
+ payload = new k();
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 zt(this.keyType, this.valueType, this.payload, () => {
240
+ return this.count++, this.entryOpen = !0, new qt(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 V();
248
- return t.writeByte(x(this.keyType)), t.writeByte(x(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
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();
249
249
  }
250
250
  }
251
- class zt {
251
+ class qt {
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 zt {
312
312
  12
313
313
  /* String */
314
314
  );
315
- const r = G.encode(t ?? "");
315
+ const r = x.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 zt {
390
390
  12
391
391
  /* String */
392
392
  );
393
- const r = G.encode(t ?? "");
393
+ const r = x.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 zt {
398
398
  11
399
399
  /* Object */
400
400
  );
401
- const s = new B(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;
@@ -418,7 +418,7 @@ class zt {
418
418
  10
419
419
  /* Dict */
420
420
  );
421
- const i = new X(t, r);
421
+ const i = new z(t, r);
422
422
  s(i);
423
423
  const n = i.finish();
424
424
  this.payload.writeBytes(n), this.valueWritten = !0;
@@ -432,11 +432,11 @@ class zt {
432
432
  }
433
433
  ensureKeyType(t) {
434
434
  if (this.keyType !== t)
435
- throw new Error(`Dictionary key type is ${S[this.keyType]}, expected ${S[t]}`);
435
+ throw new Error(`Dictionary key type is ${w[this.keyType]}, expected ${w[t]}`);
436
436
  }
437
437
  ensureValueType(t) {
438
438
  if (this.valueType !== t)
439
- throw new Error(`Dictionary value type is ${S[this.valueType]}, expected ${S[t]}`);
439
+ throw new Error(`Dictionary value type is ${w[this.valueType]}, expected ${w[t]}`);
440
440
  }
441
441
  }
442
442
  class m {
@@ -446,10 +446,10 @@ class m {
446
446
  offset;
447
447
  end;
448
448
  static create(t) {
449
- const r = M(t);
449
+ const r = B(t);
450
450
  if (r.length < 2)
451
451
  throw new Error("Teleport payload too short");
452
- if (r[0] !== ot || r[r.length - 1] !== at)
452
+ if (r[0] !== at || r[r.length - 1] !== lt)
453
453
  throw new Error("Teleport object missing markers");
454
454
  const s = { offset: 1 }, i = A(r, s, "InvalidLength");
455
455
  return new m(r, i, s.offset);
@@ -459,7 +459,7 @@ class m {
459
459
  return null;
460
460
  if (this.offset + 5 > this.buffer.length)
461
461
  throw new Error("Teleport object truncated");
462
- const t = te(this.buffer, this.offset);
462
+ const t = re(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)
@@ -472,7 +472,7 @@ class m {
472
472
  const o = { offset: this.offset }, a = A(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 Jt(t, s, n);
475
+ return new Qt(t, s, n);
476
476
  }
477
477
  }
478
478
  class R {
@@ -537,7 +537,7 @@ class R {
537
537
  return this.ensureType(
538
538
  12
539
539
  /* String */
540
- ), Xt.decode(this.payload);
540
+ ), Jt.decode(this.payload);
541
541
  }
542
542
  asGuid() {
543
543
  return this.ensureType(
@@ -555,20 +555,20 @@ class R {
555
555
  return this.ensureType(
556
556
  9
557
557
  /* Array */
558
- ), z.create(this.payload);
558
+ ), J.create(this.payload);
559
559
  }
560
560
  asDictionary() {
561
561
  return this.ensureType(
562
562
  10
563
563
  /* Dict */
564
- ), J.create(this.payload);
564
+ ), q.create(this.payload);
565
565
  }
566
566
  ensureType(t) {
567
567
  if (this.type !== t)
568
- throw new Error(`Teleport value has type ${S[this.type]}, expected ${S[t]}`);
568
+ throw new Error(`Teleport value has type ${w[this.type]}, expected ${w[t]}`);
569
569
  }
570
570
  }
571
- class Jt extends R {
571
+ class Qt extends R {
572
572
  constructor(t, r, s) {
573
573
  super(r, s), this.fieldId = t;
574
574
  }
@@ -576,7 +576,7 @@ class Jt extends R {
576
576
  return this.type === 1;
577
577
  }
578
578
  }
579
- class z {
579
+ class J {
580
580
  payload;
581
581
  elementType;
582
582
  count;
@@ -592,7 +592,7 @@ class z {
592
592
  this.count = A(t, s, "ArrayMalformed"), this.offset = s.offset;
593
593
  }
594
594
  static create(t) {
595
- return new z(M(t));
595
+ return new J(B(t));
596
596
  }
597
597
  next() {
598
598
  if (this.index >= this.count) {
@@ -616,40 +616,40 @@ class z {
616
616
  const t = g(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 F(this.elementType, r);
619
+ return this.offset += t, new P(this.elementType, r);
620
620
  }
621
621
  case 12:
622
622
  case 13: {
623
623
  const t = { offset: this.offset }, r = A(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 F(this.elementType, s);
626
+ return this.offset = t.offset + r, new P(this.elementType, s);
627
627
  }
628
628
  case 11: {
629
629
  const t = { offset: this.offset }, r = A(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 F(11, s);
632
+ return this.offset = t.offset + r, new P(11, s);
633
633
  }
634
634
  case 9: {
635
- const t = Q(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
636
- return this.offset += t, new F(9, r);
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);
637
637
  }
638
638
  case 10: {
639
- const t = Z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
640
- return this.offset += t, new F(10, r);
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);
641
641
  }
642
642
  default:
643
- throw new Error(`Unsupported array element type ${S[this.elementType]}`);
643
+ throw new Error(`Unsupported array element type ${w[this.elementType]}`);
644
644
  }
645
645
  }
646
646
  }
647
- class F extends R {
647
+ class P extends R {
648
648
  constructor(t, r) {
649
649
  super(t, r);
650
650
  }
651
651
  }
652
- class J {
652
+ class q {
653
653
  payload;
654
654
  keyType;
655
655
  valueType;
@@ -661,12 +661,12 @@ class J {
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
+ Q(this.keyType);
665
665
  const r = { offset: 2 };
666
666
  this.count = A(t, r, "DictMalformed"), this.offset = r.offset;
667
667
  }
668
668
  static create(t) {
669
- return new J(M(t));
669
+ return new q(B(t));
670
670
  }
671
671
  next() {
672
672
  if (this.index >= this.count) {
@@ -675,7 +675,7 @@ class J {
675
675
  return null;
676
676
  }
677
677
  const t = this.readKey(), r = this.readValue();
678
- return this.index++, new qt(t, r);
678
+ return this.index++, new Zt(t, r);
679
679
  }
680
680
  readKey() {
681
681
  const t = g(this.keyType);
@@ -708,11 +708,11 @@ class J {
708
708
  return this.offset = t.offset + r, new R(11, s);
709
709
  }
710
710
  case 9: {
711
- const t = Q(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
711
+ const t = Z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
712
712
  return this.offset += t, new R(9, r);
713
713
  }
714
714
  case 10: {
715
- const t = Z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
715
+ const t = tt(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + t);
716
716
  return this.offset += t, new R(10, r);
717
717
  }
718
718
  case 3:
@@ -730,11 +730,11 @@ class J {
730
730
  return this.offset += t, new R(this.valueType, r);
731
731
  }
732
732
  default:
733
- throw new Error(`Unsupported dictionary value type ${S[this.valueType]}`);
733
+ throw new Error(`Unsupported dictionary value type ${w[this.valueType]}`);
734
734
  }
735
735
  }
736
736
  }
737
- class qt {
737
+ class Zt {
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
- it(t.subarray(8, 10)),
782
- it(t.subarray(10, 16))
781
+ nt(t.subarray(8, 10)),
782
+ nt(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 V {
812
+ class k {
813
813
  bytes = [];
814
814
  writeByte(t) {
815
815
  this.bytes.push(t & 255);
@@ -857,7 +857,7 @@ function A(e, t, r) {
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 !== Qt(s))
860
+ if (n !== te(s))
861
861
  throw new Error("Teleport VarUInt is not canonical");
862
862
  return s >>> 0;
863
863
  }
@@ -866,15 +866,15 @@ function A(e, t, r) {
866
866
  }
867
867
  throw new Error(r);
868
868
  }
869
- function Qt(e) {
869
+ function te(e) {
870
870
  return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
871
871
  }
872
- function x(e, t = 0) {
872
+ function H(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 Zt(e) {
877
+ function ee(e) {
878
878
  return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
879
879
  }
880
880
  function g(e) {
@@ -897,7 +897,7 @@ function g(e) {
897
897
  return -1;
898
898
  }
899
899
  }
900
- function q(e) {
900
+ function Q(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,10 +905,10 @@ 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 te(e, t) {
908
+ function re(e, t) {
909
909
  return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
910
910
  }
911
- function Q(e, t) {
911
+ function Z(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;
@@ -924,13 +924,13 @@ function Q(e, t) {
924
924
  a = Y(s, e, a, "ArrayMalformed");
925
925
  return a - t;
926
926
  }
927
- function Z(e, t) {
927
+ function tt(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);
933
+ Q(r);
934
934
  const i = { offset: t + 2 }, n = A(e, i, "DictMalformed");
935
935
  let o = i.offset;
936
936
  for (let a = 0; a < n; a++)
@@ -952,202 +952,202 @@ function Y(e, t, r, s) {
952
952
  return y(t, n.offset, o), n.offset + o;
953
953
  }
954
954
  case 9:
955
- return r + Q(t, r);
956
- case 10:
957
955
  return r + Z(t, r);
956
+ case 10:
957
+ return r + tt(t, r);
958
958
  default:
959
- throw new Error(`Unsupported Teleport type ${S[e]}`);
959
+ throw new Error(`Unsupported Teleport type ${w[e]}`);
960
960
  }
961
961
  }
962
- function it(e) {
962
+ function nt(e) {
963
963
  return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
964
964
  }
965
- function M(e) {
965
+ function B(e) {
966
966
  return e instanceof Uint8Array ? e : new Uint8Array(e);
967
967
  }
968
- var lt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(lt || {}), It = /* @__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))(It || {}), 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 || {}), ht = /* @__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))(ht || {}), ut = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(ut || {}), Et = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(Et || {}), _t = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Hevc = 2] = "Hevc", e[e.Vp8 = 3] = "Vp8", e))(_t || {}), ft = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(ft || {}), 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 ee = 1368629611, re = 2431514951, se = 2914494629, ie = 3284746250, ne = 4101844078;
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
970
  function Tt(e) {
971
971
  const t = {};
972
- return dt(t), t;
972
+ return yt(t), t;
973
973
  }
974
- function dt(e) {
975
- return e.Description = "", e.Codec = lt.Unknown, e.SampleRate = 0, e.Channels = 0, e.BitDepth = 0, e;
974
+ function yt(e) {
975
+ return e.Description = "", e.Codec = It.Unknown, e.SampleRate = 0, e.Channels = 0, e.BitDepth = 0, e;
976
976
  }
977
- function oe(e, t) {
977
+ function le(e, t) {
978
978
  const r = t ?? Tt();
979
- return dt(r), ae(e, r), r;
979
+ return yt(r), Ie(e, r), r;
980
980
  }
981
- function ae(e, t) {
981
+ function Ie(e, t) {
982
982
  let r;
983
983
  for (; (r = e.next()) !== null; )
984
984
  switch (r.fieldId) {
985
- case ee: {
985
+ case se: {
986
986
  if (r.isNull) throw new Error();
987
987
  t.Description = r.asString();
988
988
  break;
989
989
  }
990
- case re: {
990
+ case ie: {
991
991
  if (r.isNull) throw new Error();
992
992
  t.Channels = r.asInt32();
993
993
  break;
994
994
  }
995
- case se: {
995
+ case ne: {
996
996
  if (r.isNull) throw new Error();
997
997
  t.BitDepth = r.asInt32();
998
998
  break;
999
999
  }
1000
- case ie: {
1000
+ case oe: {
1001
1001
  if (r.isNull) throw new Error();
1002
1002
  t.Codec = r.asInt32();
1003
1003
  break;
1004
1004
  }
1005
- case ne: {
1005
+ case ae: {
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 le = 76337612, Ie = 185396121, ce = 388632637, he = 417197284, ue = 469070965, Ee = 470595159, _e = 781727218, fe = 834078886, Te = 1043273762, de = 1236999138, ye = 1368629611, Ne = 1715899485, Ae = 1942830531, Se = 1999510636, we = 2079864626, Ue = 2142346422, Ce = 2598291686, De = 2719718823, Re = 2810953526, me = 2840065720, Le = 2885165957, pe = 3586157513, Oe = 3717933110, ge = 4062655306;
1013
- function be(e) {
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) {
1014
1014
  const t = {};
1015
- return yt(t), t;
1015
+ return Nt(t), t;
1016
1016
  }
1017
- function yt(e) {
1018
- return e.ContextType = ct.Unknown, e.UserType = Et.Unknown, e.PayloadType = ht.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 = It.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = ft.Unknown, e;
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;
1019
1019
  }
1020
- function Fe(e, t) {
1021
- const r = t ?? be();
1022
- return yt(r), Pe(e, r), r;
1020
+ function ke(e, t) {
1021
+ const r = t ?? Fe();
1022
+ return Nt(r), Ve(e, r), r;
1023
1023
  }
1024
- function Pe(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 le: {
1028
+ case he: {
1029
1029
  if (r.isNull) throw new Error();
1030
1030
  t.DeviceId = r.asString();
1031
1031
  break;
1032
1032
  }
1033
- case Ie: {
1033
+ case ce: {
1034
1034
  if (r.isNull) throw new Error();
1035
1035
  t.InstallId = r.asString();
1036
1036
  break;
1037
1037
  }
1038
- case ce: {
1038
+ case ue: {
1039
1039
  if (r.isNull) throw new Error();
1040
1040
  t.UserAgent = r.asString();
1041
1041
  break;
1042
1042
  }
1043
- case he: {
1043
+ case Ee: {
1044
1044
  if (r.isNull) throw new Error();
1045
1045
  t.ContextType = r.asInt32();
1046
1046
  break;
1047
1047
  }
1048
- case ue: {
1048
+ case _e: {
1049
1049
  if (r.isNull) throw new Error();
1050
1050
  t.HasInput = r.asBool();
1051
1051
  break;
1052
1052
  }
1053
- case Ee: {
1053
+ case fe: {
1054
1054
  if (r.isNull) throw new Error();
1055
1055
  t.UserType = r.asInt32();
1056
1056
  break;
1057
1057
  }
1058
- case _e: {
1058
+ case de: {
1059
1059
  if (r.isNull) throw new Error();
1060
1060
  t.UserId = r.asString();
1061
1061
  break;
1062
1062
  }
1063
- case fe: {
1063
+ case Te: {
1064
1064
  if (r.isNull) throw new Error();
1065
1065
  t.ProductId = r.asString();
1066
1066
  break;
1067
1067
  }
1068
- case Te: {
1068
+ case ye: {
1069
1069
  if (r.isNull) throw new Error();
1070
1070
  t.AuthSessionId = r.asString();
1071
1071
  break;
1072
1072
  }
1073
- case de: {
1073
+ case Ne: {
1074
1074
  if (r.isNull) throw new Error();
1075
1075
  t.ReceiveAllMessages = r.asBool();
1076
1076
  break;
1077
1077
  }
1078
- case ye: {
1078
+ case Ae: {
1079
1079
  if (r.isNull) throw new Error();
1080
1080
  t.Description = r.asString();
1081
1081
  break;
1082
1082
  }
1083
- case Ne: {
1083
+ case we: {
1084
1084
  if (r.isNull) throw new Error();
1085
1085
  t.Locale = r.asString();
1086
1086
  break;
1087
1087
  }
1088
- case Ae: {
1088
+ case Se: {
1089
1089
  if (r.isNull) throw new Error();
1090
1090
  t.SdkType = r.asInt32();
1091
1091
  break;
1092
1092
  }
1093
- case Se: {
1093
+ case Ue: {
1094
1094
  if (r.isNull) throw new Error();
1095
1095
  t.SessionId = r.asInt32();
1096
1096
  break;
1097
1097
  }
1098
- case we: {
1098
+ case Ce: {
1099
1099
  if (r.isNull) throw new Error();
1100
1100
  t.PreciseJoinedAt = r.asUInt64();
1101
1101
  break;
1102
1102
  }
1103
- case Ue: {
1103
+ case De: {
1104
1104
  if (r.isNull) throw new Error();
1105
1105
  t.PayloadType = r.asInt32();
1106
1106
  break;
1107
1107
  }
1108
- case Ce: {
1108
+ case Re: {
1109
1109
  if (r.isNull) throw new Error();
1110
1110
  t.VersionId = r.asString();
1111
1111
  break;
1112
1112
  }
1113
- case De: {
1113
+ case me: {
1114
1114
  if (r.isNull) throw new Error();
1115
1115
  t.UniqueSessionId = r.asString();
1116
1116
  break;
1117
1117
  }
1118
- case Re: {
1118
+ case Le: {
1119
1119
  if (r.isNull) throw new Error();
1120
1120
  t.ClientType = r.asInt32();
1121
1121
  break;
1122
1122
  }
1123
- case me: {
1123
+ case pe: {
1124
1124
  if (r.isNull) throw new Error();
1125
1125
  t.IsReady = r.asBool();
1126
1126
  break;
1127
1127
  }
1128
- case Le: {
1128
+ case Oe: {
1129
1129
  if (r.isNull) throw new Error();
1130
- t.Parameters = ke(r.asDictionary());
1130
+ t.Parameters = Be(r.asDictionary());
1131
1131
  break;
1132
1132
  }
1133
- case pe: {
1133
+ case ge: {
1134
1134
  if (r.isNull) throw new Error();
1135
1135
  t.IsInternal = r.asBool();
1136
1136
  break;
1137
1137
  }
1138
- case Oe: {
1138
+ case be: {
1139
1139
  if (r.isNull) throw new Error();
1140
1140
  t.ChannelLocale = r.asString();
1141
1141
  break;
1142
1142
  }
1143
- case ge: {
1143
+ case Pe: {
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 ke(e) {
1150
+ function Be(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 ke(e) {
1156
1156
  }
1157
1157
  return t;
1158
1158
  }
1159
- const Ve = 703025676, Be = 814454131, Me = 972460562, ve = 976255570, Ge = 1368629611, xe = 1479280922, He = 1533537016, We = 2274386296, Ye = 2603556958, Ke = 2885165957, $e = 3568439632;
1160
- function je(e) {
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) {
1161
1161
  const t = {};
1162
- return Nt(t), t;
1162
+ return At(t), t;
1163
1163
  }
1164
- function Nt(e) {
1164
+ function At(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 Xe(e, t) {
1168
- const r = t ?? je();
1169
- return Nt(r), ze(e, r), r;
1167
+ function Je(e, t) {
1168
+ const r = t ?? ze();
1169
+ return At(r), qe(e, r), r;
1170
1170
  }
1171
- function ze(e, t) {
1171
+ function qe(e, t) {
1172
1172
  let r;
1173
1173
  for (; (r = e.next()) !== null; )
1174
1174
  switch (r.fieldId) {
1175
- case Ve: {
1175
+ case Me: {
1176
1176
  if (r.isNull) throw new Error();
1177
1177
  t.ResultTypeName = r.asString();
1178
1178
  break;
1179
1179
  }
1180
- case Be: {
1180
+ case ve: {
1181
1181
  if (r.isNull) throw new Error();
1182
1182
  t.FunctionName = r.asString();
1183
1183
  break;
1184
1184
  }
1185
- case Me: {
1185
+ case Ge: {
1186
1186
  if (r.isNull) throw new Error();
1187
1187
  t.EnumerableItemTypeName = r.asString();
1188
1188
  break;
1189
1189
  }
1190
- case ve: {
1190
+ case xe: {
1191
1191
  if (r.isNull) throw new Error();
1192
1192
  t.FunctionId = r.asGuid();
1193
1193
  break;
1194
1194
  }
1195
- case Ge: {
1195
+ case He: {
1196
1196
  if (r.isNull) throw new Error();
1197
1197
  t.Description = r.asString();
1198
1198
  break;
1199
1199
  }
1200
- case xe: {
1200
+ case Ke: {
1201
1201
  if (r.isNull) throw new Error();
1202
1202
  t.IsCancellable = r.asBool();
1203
1203
  break;
1204
1204
  }
1205
- case He: {
1205
+ case We: {
1206
1206
  if (r.isNull) throw new Error();
1207
1207
  t.RequiresInstance = r.asBool();
1208
1208
  break;
1209
1209
  }
1210
- case We: {
1210
+ case Ye: {
1211
1211
  if (r.isNull) throw new Error();
1212
1212
  t.LlmInlineResult = r.asBool();
1213
1213
  break;
1214
1214
  }
1215
- case Ye: {
1215
+ case $e: {
1216
1216
  if (r.isNull) throw new Error();
1217
1217
  t.IsEnumerable = r.asBool();
1218
1218
  break;
1219
1219
  }
1220
- case Ke: {
1220
+ case je: {
1221
1221
  if (r.isNull) throw new Error();
1222
- t.Parameters = Je(r.asArray());
1222
+ t.Parameters = Qe(r.asArray());
1223
1223
  break;
1224
1224
  }
1225
- case $e: {
1225
+ case Xe: {
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 Je(e) {
1232
+ function Qe(e) {
1233
1233
  const t = [];
1234
1234
  let r;
1235
1235
  for (; (r = e.next()) !== null; )
1236
- t.push(ar(r.asObject()));
1236
+ t.push(Ir(r.asObject()));
1237
1237
  return t;
1238
1238
  }
1239
- const qe = 607861992, Qe = 894485888, Ze = 972460562, tr = 1368629611, er = 1883521406, rr = 2603556958, sr = 3609695522, ir = 4075263697, nr = 4257460908;
1240
- function or(e) {
1239
+ const Ze = 607861992, tr = 894485888, er = 972460562, rr = 1368629611, sr = 1883521406, ir = 2603556958, nr = 3609695522, or = 4075263697, ar = 4257460908;
1240
+ function lr(e) {
1241
1241
  const t = {};
1242
- return At(t), t;
1242
+ return wt(t), t;
1243
1243
  }
1244
- function At(e) {
1244
+ function wt(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 ar(e, t) {
1248
- const r = t ?? or();
1249
- return At(r), lr(e, r), r;
1247
+ function Ir(e, t) {
1248
+ const r = t ?? lr();
1249
+ return wt(r), hr(e, r), r;
1250
1250
  }
1251
- function lr(e, t) {
1251
+ function hr(e, t) {
1252
1252
  let r;
1253
1253
  for (; (r = e.next()) !== null; )
1254
1254
  switch (r.fieldId) {
1255
- case qe: {
1255
+ case Ze: {
1256
1256
  if (r.isNull) throw new Error();
1257
1257
  t.HasDefaultValue = r.asBool();
1258
1258
  break;
1259
1259
  }
1260
- case Qe: {
1260
+ case tr: {
1261
1261
  if (r.isNull) throw new Error();
1262
1262
  t.DefaultValueJson = r.asString();
1263
1263
  break;
1264
1264
  }
1265
- case Ze: {
1265
+ case er: {
1266
1266
  if (r.isNull) throw new Error();
1267
1267
  t.EnumerableItemTypeName = r.asString();
1268
1268
  break;
1269
1269
  }
1270
- case tr: {
1270
+ case rr: {
1271
1271
  if (r.isNull) throw new Error();
1272
1272
  t.Description = r.asString();
1273
1273
  break;
1274
1274
  }
1275
- case er: {
1275
+ case sr: {
1276
1276
  if (r.isNull) throw new Error();
1277
1277
  t.DefaultValueData = r.asBinary();
1278
1278
  break;
1279
1279
  }
1280
- case rr: {
1280
+ case ir: {
1281
1281
  if (r.isNull) throw new Error();
1282
1282
  t.IsEnumerable = r.asBool();
1283
1283
  break;
1284
1284
  }
1285
- case sr: {
1285
+ case nr: {
1286
1286
  if (r.isNull) throw new Error();
1287
1287
  t.TypeName = r.asString();
1288
1288
  break;
1289
1289
  }
1290
- case ir: {
1290
+ case or: {
1291
1291
  if (r.isNull) throw new Error();
1292
1292
  t.ParameterName = r.asString();
1293
1293
  break;
1294
1294
  }
1295
- case nr: {
1295
+ case ar: {
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 Ir = 3167053791, cr = 3342364356, hr = 3612929027;
1302
+ const cr = 3167053791, ur = 3342364356, Er = 3612929027;
1303
1303
  function St(e) {
1304
1304
  const t = {};
1305
- return wt(t), t;
1305
+ return Ut(t), t;
1306
1306
  }
1307
- function wt(e) {
1308
- return e.Category = "", e.Type = ut.Face, e.FaceBlendshapes = [], e;
1307
+ function Ut(e) {
1308
+ return e.Category = "", e.Type = Et.Face, e.FaceBlendshapes = [], e;
1309
1309
  }
1310
- function ur(e, t) {
1310
+ function _r(e, t) {
1311
1311
  const r = t ?? St();
1312
- return wt(r), Er(e, r), r;
1312
+ return Ut(r), fr(e, r), r;
1313
1313
  }
1314
- function Er(e, t) {
1314
+ function fr(e, t) {
1315
1315
  let r;
1316
1316
  for (; (r = e.next()) !== null; )
1317
1317
  switch (r.fieldId) {
1318
- case Ir: {
1318
+ case cr: {
1319
1319
  if (r.isNull) throw new Error();
1320
1320
  t.Type = r.asInt32();
1321
1321
  break;
1322
1322
  }
1323
- case cr: {
1323
+ case ur: {
1324
1324
  if (r.isNull) throw new Error();
1325
- t.FaceBlendshapes = _r(r.asArray());
1325
+ t.FaceBlendshapes = dr(r.asArray());
1326
1326
  break;
1327
1327
  }
1328
- case hr: {
1328
+ case Er: {
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 _r(e) {
1335
+ function dr(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 fr = 3612929027;
1343
- function Ut(e) {
1342
+ const Tr = 3612929027;
1343
+ function Ct(e) {
1344
1344
  const t = {};
1345
- return Ct(t), t;
1345
+ return Dt(t), t;
1346
1346
  }
1347
- function Ct(e) {
1347
+ function Dt(e) {
1348
1348
  return e.Category = "", e;
1349
1349
  }
1350
- function Tr(e, t) {
1351
- const r = t ?? Ut();
1352
- return Ct(r), dr(e, r), r;
1350
+ function yr(e, t) {
1351
+ const r = t ?? Ct();
1352
+ return Dt(r), Nr(e, r), r;
1353
1353
  }
1354
- function dr(e, t) {
1354
+ function Nr(e, t) {
1355
1355
  let r;
1356
1356
  for (; (r = e.next()) !== null; )
1357
1357
  switch (r.fieldId) {
1358
- case fr: {
1358
+ case Tr: {
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 yr = 1368629611, Nr = 2950031986, Ar = 3284746250, Sr = 4065070594;
1366
- function Dt(e) {
1365
+ const Ar = 1368629611, wr = 2950031986, Sr = 3284746250, Ur = 4065070594;
1366
+ function Rt(e) {
1367
1367
  const t = {};
1368
- return Rt(t), t;
1368
+ return mt(t), t;
1369
1369
  }
1370
- function Rt(e) {
1371
- return e.Description = "", e.Codec = _t.H264, e.Width = 0, e.Height = 0, e;
1370
+ function mt(e) {
1371
+ return e.Description = "", e.Codec = ft.H264, e.Width = 0, e.Height = 0, e;
1372
1372
  }
1373
- function wr(e, t) {
1374
- const r = t ?? Dt();
1375
- return Rt(r), Ur(e, r), r;
1373
+ function Cr(e, t) {
1374
+ const r = t ?? Rt();
1375
+ return mt(r), Dr(e, r), r;
1376
1376
  }
1377
- function Ur(e, t) {
1377
+ function Dr(e, t) {
1378
1378
  let r;
1379
1379
  for (; (r = e.next()) !== null; )
1380
1380
  switch (r.fieldId) {
1381
- case yr: {
1381
+ case Ar: {
1382
1382
  if (r.isNull) throw new Error();
1383
1383
  t.Description = r.asString();
1384
1384
  break;
1385
1385
  }
1386
- case Nr: {
1386
+ case wr: {
1387
1387
  if (r.isNull) throw new Error();
1388
1388
  t.Height = r.asInt32();
1389
1389
  break;
1390
1390
  }
1391
- case Ar: {
1391
+ case Sr: {
1392
1392
  if (r.isNull) throw new Error();
1393
1393
  t.Codec = r.asInt32();
1394
1394
  break;
1395
1395
  }
1396
- case Sr: {
1396
+ case Ur: {
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 Cr = 3, Dr = 65539, Rr = 693643444, mr = 1144553441, Lr = 1497620243, pr = 1559330978, Or = 1999510636, gr = 2277643855, br = 2469008121, Fr = 3219210453, Pr = 3678477544, kr = 3696445035, Vr = 3707543140, Br = 3712281496, Mr = 3823842552, vr = 3895362455, Gr = 3897397815, xr = 4225107827;
1404
- function Hr(e) {
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) {
1405
1405
  const t = {};
1406
- return mt(t), t;
1406
+ return Lt(t), t;
1407
1407
  }
1408
- function mt(e) {
1408
+ function Lt(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 Wr(e, t) {
1411
+ function Yr(e, t) {
1412
1412
  const r = m.create(e);
1413
- return Yr(r, t);
1413
+ return $r(r, t);
1414
1414
  }
1415
- function Yr(e, t) {
1416
- const r = t ?? Hr();
1417
- return mt(r), Kr(e, r), r;
1415
+ function $r(e, t) {
1416
+ const r = t ?? Wr();
1417
+ return Lt(r), jr(e, r), r;
1418
1418
  }
1419
- function Kr(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 Rr: {
1423
+ case Lr: {
1424
1424
  if (r.isNull) throw new Error();
1425
1425
  t.FirstUserId = r.asString();
1426
1426
  break;
1427
1427
  }
1428
- case mr: {
1428
+ case pr: {
1429
1429
  if (r.isNull) throw new Error();
1430
- t.Clients = jr(r.asDictionary());
1430
+ t.Clients = zr(r.asDictionary());
1431
1431
  break;
1432
1432
  }
1433
- case Lr: {
1433
+ case Or: {
1434
1434
  if (r.isNull) throw new Error();
1435
- t.TrackingStreams = Xr(r.asDictionary());
1435
+ t.TrackingStreams = Jr(r.asDictionary());
1436
1436
  break;
1437
1437
  }
1438
- case pr: {
1438
+ case gr: {
1439
1439
  if (r.isNull) throw new Error();
1440
1440
  t.ChannelId = r.asString();
1441
1441
  break;
1442
1442
  }
1443
- case Or: {
1443
+ case br: {
1444
1444
  if (r.isNull) throw new Error();
1445
1445
  t.SessionId = r.asString();
1446
1446
  break;
1447
1447
  }
1448
- case gr: {
1448
+ case Pr: {
1449
1449
  if (r.isNull) throw new Error();
1450
1450
  t.ChannelUrl = r.asString();
1451
1451
  break;
1452
1452
  }
1453
- case br: {
1453
+ case Fr: {
1454
1454
  if (r.isNull) throw new Error();
1455
1455
  t.ChannelName = r.asString();
1456
1456
  break;
1457
1457
  }
1458
- case Fr: {
1458
+ case kr: {
1459
1459
  if (r.isNull) throw new Error();
1460
1460
  t.OrganisationName = r.asString();
1461
1461
  break;
1462
1462
  }
1463
- case Pr: {
1463
+ case Vr: {
1464
1464
  if (r.isNull) throw new Error();
1465
- t.Functions = zr(r.asDictionary());
1465
+ t.Functions = qr(r.asDictionary());
1466
1466
  break;
1467
1467
  }
1468
- case kr: {
1468
+ case Br: {
1469
1469
  if (r.isNull) throw new Error();
1470
- t.UIStreams = Jr(r.asDictionary());
1470
+ t.UIStreams = Qr(r.asDictionary());
1471
1471
  break;
1472
1472
  }
1473
- case Vr: {
1473
+ case Mr: {
1474
1474
  if (r.isNull) throw new Error();
1475
1475
  t.SpaceId = r.asString();
1476
1476
  break;
1477
1477
  }
1478
- case Br: {
1478
+ case vr: {
1479
1479
  if (r.isNull) throw new Error();
1480
1480
  t.PrimaryUserId = r.asString();
1481
1481
  break;
1482
1482
  }
1483
- case Mr: {
1483
+ case Gr: {
1484
1484
  if (r.isNull) throw new Error();
1485
1485
  t.ChannelInstanceId = r.asString();
1486
1486
  break;
1487
1487
  }
1488
- case vr: {
1488
+ case xr: {
1489
1489
  if (r.isNull) throw new Error();
1490
- t.AudioStreams = qr(r.asDictionary());
1490
+ t.AudioStreams = Zr(r.asDictionary());
1491
1491
  break;
1492
1492
  }
1493
- case Gr: {
1493
+ case Hr: {
1494
1494
  if (r.isNull) throw new Error();
1495
- t.VideoStreams = Qr(r.asDictionary());
1495
+ t.VideoStreams = ts(r.asDictionary());
1496
1496
  break;
1497
1497
  }
1498
- case xr: {
1498
+ case Kr: {
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 $r(e, t) {
1506
- const r = H(e, Dr, Cr);
1507
- return Wr(r, t);
1505
+ function Xr(e, t) {
1506
+ const r = K(e, mr, Rr);
1507
+ return Yr(r, t);
1508
1508
  }
1509
- function jr(e) {
1509
+ function zr(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] = Fe(r.value.asObject());
1514
+ t[s] = ke(r.value.asObject());
1515
1515
  }
1516
1516
  return t;
1517
1517
  }
1518
- function Xr(e) {
1518
+ function Jr(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] = Rs(r.value.asObject());
1523
+ t[s] = Ls(r.value.asObject());
1524
1524
  }
1525
1525
  return t;
1526
1526
  }
1527
- function zr(e) {
1527
+ function qr(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] = Zr(r.value.asArray());
1532
+ t[s] = es(r.value.asArray());
1533
1533
  }
1534
1534
  return t;
1535
1535
  }
1536
- function Jr(e) {
1536
+ function Qr(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] = ns(r.value.asObject());
1541
+ t[s] = as(r.value.asObject());
1542
1542
  }
1543
1543
  return t;
1544
1544
  }
1545
- function qr(e) {
1545
+ function Zr(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] = us(r.value.asObject());
1550
+ t[s] = _s(r.value.asObject());
1551
1551
  }
1552
1552
  return t;
1553
1553
  }
1554
- function Qr(e) {
1554
+ function ts(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] = Ns(r.value.asObject());
1559
+ t[s] = ws(r.value.asObject());
1560
1560
  }
1561
1561
  return t;
1562
1562
  }
1563
- function Zr(e) {
1563
+ function es(e) {
1564
1564
  const t = [];
1565
1565
  let r;
1566
1566
  for (; (r = e.next()) !== null; )
1567
- t.push(Xe(r.asObject()));
1567
+ t.push(Je(r.asObject()));
1568
1568
  return t;
1569
1569
  }
1570
- const ts = 161083277, es = 325678206, rs = 3469892363, ss = 3645544153;
1571
- function is(e) {
1570
+ const rs = 161083277, ss = 325678206, is = 3469892363, ns = 3645544153;
1571
+ function os(e) {
1572
1572
  const t = {};
1573
- return Lt(t), t;
1573
+ return pt(t), t;
1574
1574
  }
1575
- function Lt(e) {
1576
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ut(), e;
1575
+ function pt(e) {
1576
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ct(), e;
1577
1577
  }
1578
- function ns(e, t) {
1579
- const r = t ?? is();
1580
- return Lt(r), os(e, r), r;
1578
+ function as(e, t) {
1579
+ const r = t ?? os();
1580
+ return pt(r), ls(e, r), r;
1581
1581
  }
1582
- function os(e, t) {
1582
+ function ls(e, t) {
1583
1583
  let r;
1584
1584
  for (; (r = e.next()) !== null; )
1585
1585
  switch (r.fieldId) {
1586
- case ts: {
1586
+ case rs: {
1587
1587
  if (r.isNull) throw new Error();
1588
1588
  t.StreamId = r.asString();
1589
1589
  break;
1590
1590
  }
1591
- case es: {
1591
+ case ss: {
1592
1592
  if (r.isNull) throw new Error();
1593
1593
  t.ClientSessionId = r.asInt32();
1594
1594
  break;
1595
1595
  }
1596
- case rs: {
1596
+ case is: {
1597
1597
  if (r.isNull) throw new Error();
1598
1598
  t.TrackId = r.asInt32();
1599
1599
  break;
1600
1600
  }
1601
- case ss: {
1601
+ case ns: {
1602
1602
  if (r.isNull) throw new Error();
1603
- t.Info = Tr(r.asObject());
1603
+ t.Info = yr(r.asObject());
1604
1604
  break;
1605
1605
  }
1606
1606
  }
1607
1607
  }
1608
- const as = 161083277, ls = 325678206, Is = 3469892363, cs = 3645544153;
1609
- function hs(e) {
1608
+ const Is = 161083277, hs = 325678206, cs = 3469892363, us = 3645544153;
1609
+ function Es(e) {
1610
1610
  const t = {};
1611
- return pt(t), t;
1611
+ return Ot(t), t;
1612
1612
  }
1613
- function pt(e) {
1613
+ function Ot(e) {
1614
1614
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Tt(), e;
1615
1615
  }
1616
- function us(e, t) {
1617
- const r = t ?? hs();
1618
- return pt(r), Es(e, r), r;
1616
+ function _s(e, t) {
1617
+ const r = t ?? Es();
1618
+ return Ot(r), fs(e, r), r;
1619
1619
  }
1620
- function Es(e, t) {
1620
+ function fs(e, t) {
1621
1621
  let r;
1622
1622
  for (; (r = e.next()) !== null; )
1623
1623
  switch (r.fieldId) {
1624
- case as: {
1624
+ case Is: {
1625
1625
  if (r.isNull) throw new Error();
1626
1626
  t.StreamId = r.asString();
1627
1627
  break;
1628
1628
  }
1629
- case ls: {
1629
+ case hs: {
1630
1630
  if (r.isNull) throw new Error();
1631
1631
  t.ClientSessionId = r.asInt32();
1632
1632
  break;
1633
1633
  }
1634
- case Is: {
1634
+ case cs: {
1635
1635
  if (r.isNull) throw new Error();
1636
1636
  t.TrackId = r.asInt32();
1637
1637
  break;
1638
1638
  }
1639
- case cs: {
1639
+ case us: {
1640
1640
  if (r.isNull) throw new Error();
1641
- t.Info = oe(r.asObject());
1641
+ t.Info = le(r.asObject());
1642
1642
  break;
1643
1643
  }
1644
1644
  }
1645
1645
  }
1646
- const _s = 161083277, fs = 325678206, Ts = 3469892363, ds = 3645544153;
1647
- function ys(e) {
1646
+ const ds = 161083277, Ts = 325678206, ys = 3469892363, Ns = 3645544153;
1647
+ function As(e) {
1648
1648
  const t = {};
1649
- return Ot(t), t;
1649
+ return gt(t), t;
1650
1650
  }
1651
- function Ot(e) {
1652
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Dt(), e;
1651
+ function gt(e) {
1652
+ return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Rt(), e;
1653
1653
  }
1654
- function Ns(e, t) {
1655
- const r = t ?? ys();
1656
- return Ot(r), As(e, r), r;
1654
+ function ws(e, t) {
1655
+ const r = t ?? As();
1656
+ return gt(r), Ss(e, r), r;
1657
1657
  }
1658
- function As(e, t) {
1658
+ function Ss(e, t) {
1659
1659
  let r;
1660
1660
  for (; (r = e.next()) !== null; )
1661
1661
  switch (r.fieldId) {
1662
- case _s: {
1662
+ case ds: {
1663
1663
  if (r.isNull) throw new Error();
1664
1664
  t.StreamId = r.asString();
1665
1665
  break;
1666
1666
  }
1667
- case fs: {
1667
+ case Ts: {
1668
1668
  if (r.isNull) throw new Error();
1669
1669
  t.ClientSessionId = r.asInt32();
1670
1670
  break;
1671
1671
  }
1672
- case Ts: {
1672
+ case ys: {
1673
1673
  if (r.isNull) throw new Error();
1674
1674
  t.TrackId = r.asInt32();
1675
1675
  break;
1676
1676
  }
1677
- case ds: {
1677
+ case Ns: {
1678
1678
  if (r.isNull) throw new Error();
1679
- t.Info = wr(r.asObject());
1679
+ t.Info = Cr(r.asObject());
1680
1680
  break;
1681
1681
  }
1682
1682
  }
1683
1683
  }
1684
- const Ss = 161083277, ws = 325678206, Us = 3469892363, Cs = 3645544153;
1685
- function Ds(e) {
1684
+ const Us = 161083277, Cs = 325678206, Ds = 3469892363, Rs = 3645544153;
1685
+ function ms(e) {
1686
1686
  const t = {};
1687
- return gt(t), t;
1687
+ return bt(t), t;
1688
1688
  }
1689
- function gt(e) {
1689
+ function bt(e) {
1690
1690
  return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = St(), e;
1691
1691
  }
1692
- function Rs(e, t) {
1693
- const r = t ?? Ds();
1694
- return gt(r), ms(e, r), r;
1692
+ function Ls(e, t) {
1693
+ const r = t ?? ms();
1694
+ return bt(r), ps(e, r), r;
1695
1695
  }
1696
- function ms(e, t) {
1696
+ function ps(e, t) {
1697
1697
  let r;
1698
1698
  for (; (r = e.next()) !== null; )
1699
1699
  switch (r.fieldId) {
1700
- case Ss: {
1700
+ case Us: {
1701
1701
  if (r.isNull) throw new Error();
1702
1702
  t.StreamId = r.asString();
1703
1703
  break;
1704
1704
  }
1705
- case ws: {
1705
+ case Cs: {
1706
1706
  if (r.isNull) throw new Error();
1707
1707
  t.ClientSessionId = r.asInt32();
1708
1708
  break;
1709
1709
  }
1710
- case Us: {
1710
+ case Ds: {
1711
1711
  if (r.isNull) throw new Error();
1712
1712
  t.TrackId = r.asInt32();
1713
1713
  break;
1714
1714
  }
1715
- case Cs: {
1715
+ case Rs: {
1716
1716
  if (r.isNull) throw new Error();
1717
- t.Info = ur(r.asObject());
1717
+ t.Info = _r(r.asObject());
1718
1718
  break;
1719
1719
  }
1720
1720
  }
1721
1721
  }
1722
- const Ls = 1405462580, ps = 2968276160;
1723
- function Os(e) {
1722
+ const Os = 1405462580, gs = 2968276160;
1723
+ function bs(e) {
1724
1724
  const t = {};
1725
- return bt(t), t;
1725
+ return Pt(t), t;
1726
1726
  }
1727
- function bt(e) {
1727
+ function Pt(e) {
1728
1728
  return e.MimeType = "", e.Value = new Uint8Array(0), e;
1729
1729
  }
1730
- function gs(e, t) {
1731
- const r = t ?? Os();
1732
- return bt(r), bs(e, r), r;
1730
+ function Ps(e, t) {
1731
+ const r = t ?? bs();
1732
+ return Pt(r), Fs(e, r), r;
1733
1733
  }
1734
- function bs(e, t) {
1734
+ function Fs(e, t) {
1735
1735
  let r;
1736
1736
  for (; (r = e.next()) !== null; )
1737
1737
  switch (r.fieldId) {
1738
- case Ls: {
1738
+ case Os: {
1739
1739
  if (r.isNull) throw new Error();
1740
1740
  t.Value = r.asBinary();
1741
1741
  break;
1742
1742
  }
1743
- case ps: {
1743
+ case gs: {
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 Fs = 1, Ps = 2097188, ks = 979822885, Vs = 2374537704;
1751
- function Bs(e) {
1750
+ const ks = 1, Vs = 2097188, Bs = 979822885, Ms = 2374537704;
1751
+ function vs(e) {
1752
1752
  const t = {};
1753
1753
  return Ft(t), t;
1754
1754
  }
1755
1755
  function Ft(e) {
1756
1756
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1757
1757
  }
1758
- function Ms(e, t) {
1758
+ function Gs(e, t) {
1759
1759
  const r = m.create(e);
1760
- return vs(r, t);
1760
+ return xs(r, t);
1761
1761
  }
1762
- function vs(e, t) {
1763
- const r = t ?? Bs();
1764
- return Ft(r), Gs(e, r), r;
1762
+ function xs(e, t) {
1763
+ const r = t ?? vs();
1764
+ return Ft(r), Hs(e, r), r;
1765
1765
  }
1766
- function Gs(e, t) {
1766
+ function Hs(e, t) {
1767
1767
  let r;
1768
1768
  for (; (r = e.next()) !== null; )
1769
1769
  switch (r.fieldId) {
1770
- case ks: {
1770
+ case Bs: {
1771
1771
  if (r.isNull) throw new Error();
1772
1772
  t.StyleId = r.asString();
1773
1773
  break;
1774
1774
  }
1775
- case Vs: {
1775
+ case Ms: {
1776
1776
  if (r.isNull) throw new Error();
1777
- t.Style = Hs(r.asDictionary());
1777
+ t.Style = Ws(r.asDictionary());
1778
1778
  break;
1779
1779
  }
1780
1780
  }
1781
1781
  }
1782
- function xs(e, t) {
1783
- const r = H(e, Ps, Fs);
1784
- return Ms(r, t);
1782
+ function Ks(e, t) {
1783
+ const r = K(e, Vs, ks);
1784
+ return Gs(r, t);
1785
1785
  }
1786
- function Hs(e) {
1786
+ function Ws(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 Hs(e) {
1792
1792
  }
1793
1793
  return t;
1794
1794
  }
1795
- const Ws = 1, Ys = 2097192, Ks = 2136687806;
1796
- function $s(e) {
1795
+ const Ys = 1, $s = 2097192, js = 2136687806;
1796
+ function Xs(e) {
1797
1797
  const t = {};
1798
- return Pt(t), t;
1798
+ return kt(t), t;
1799
1799
  }
1800
- function Pt(e) {
1800
+ function kt(e) {
1801
1801
  return e.Styles = [], e;
1802
1802
  }
1803
- function js(e, t) {
1803
+ function zs(e, t) {
1804
1804
  const r = m.create(e);
1805
- return Xs(r, t);
1805
+ return Js(r, t);
1806
1806
  }
1807
- function Xs(e, t) {
1808
- const r = t ?? $s();
1809
- return Pt(r), zs(e, r), r;
1807
+ function Js(e, t) {
1808
+ const r = t ?? Xs();
1809
+ return kt(r), qs(e, r), r;
1810
1810
  }
1811
- function zs(e, t) {
1811
+ function qs(e, t) {
1812
1812
  let r;
1813
1813
  for (; (r = e.next()) !== null; )
1814
1814
  switch (r.fieldId) {
1815
- case Ks: {
1815
+ case js: {
1816
1816
  if (r.isNull) throw new Error();
1817
- t.Styles = qs(r.asArray());
1817
+ t.Styles = Zs(r.asArray());
1818
1818
  break;
1819
1819
  }
1820
1820
  }
1821
1821
  }
1822
- function Js(e, t) {
1823
- const r = H(e, Ys, Ws);
1824
- return js(r, t);
1822
+ function Qs(e, t) {
1823
+ const r = K(e, $s, Ys);
1824
+ return zs(r, t);
1825
1825
  }
1826
- function qs(e) {
1826
+ function Zs(e) {
1827
1827
  const t = [];
1828
1828
  let r;
1829
1829
  for (; (r = e.next()) !== null; )
1830
- t.push(ei(r.asObject()));
1830
+ t.push(si(r.asObject()));
1831
1831
  return t;
1832
1832
  }
1833
- const Qs = 979822885, Zs = 2374537704;
1834
- function ti(e) {
1833
+ const ti = 979822885, ei = 2374537704;
1834
+ function ri(e) {
1835
1835
  const t = {};
1836
- return kt(t), t;
1836
+ return Vt(t), t;
1837
1837
  }
1838
- function kt(e) {
1838
+ function Vt(e) {
1839
1839
  return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1840
1840
  }
1841
- function ei(e, t) {
1842
- const r = t ?? ti();
1843
- return kt(r), ri(e, r), r;
1841
+ function si(e, t) {
1842
+ const r = t ?? ri();
1843
+ return Vt(r), ii(e, r), r;
1844
1844
  }
1845
- function ri(e, t) {
1845
+ function ii(e, t) {
1846
1846
  let r;
1847
1847
  for (; (r = e.next()) !== null; )
1848
1848
  switch (r.fieldId) {
1849
- case Qs: {
1849
+ case ti: {
1850
1850
  if (r.isNull) throw new Error();
1851
1851
  t.StyleId = r.asString();
1852
1852
  break;
1853
1853
  }
1854
- case Zs: {
1854
+ case ei: {
1855
1855
  if (r.isNull) throw new Error();
1856
- t.Style = si(r.asDictionary());
1856
+ t.Style = ni(r.asDictionary());
1857
1857
  break;
1858
1858
  }
1859
1859
  }
1860
1860
  }
1861
- function si(e) {
1861
+ function ni(e) {
1862
1862
  const t = /* @__PURE__ */ Object.create(null);
1863
1863
  let r;
1864
1864
  for (; (r = e.next()) !== null; ) {
@@ -1867,73 +1867,73 @@ function si(e) {
1867
1867
  }
1868
1868
  return t;
1869
1869
  }
1870
- const ii = 1, ni = 2097190, oi = 425183262, ai = 653781469;
1871
- function li(e) {
1870
+ const oi = 1, ai = 2097190, li = 425183262, Ii = 653781469;
1871
+ function hi(e) {
1872
1872
  const t = {};
1873
- return Vt(t), t;
1873
+ return Bt(t), t;
1874
1874
  }
1875
- function Vt(e) {
1875
+ function Bt(e) {
1876
1876
  return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
1877
1877
  }
1878
- function Ii(e, t) {
1878
+ function ci(e, t) {
1879
1879
  const r = m.create(e);
1880
- return ci(r, t);
1880
+ return ui(r, t);
1881
1881
  }
1882
- function ci(e, t) {
1883
- const r = t ?? li();
1884
- return Vt(r), hi(e, r), r;
1882
+ function ui(e, t) {
1883
+ const r = t ?? hi();
1884
+ return Bt(r), Ei(e, r), r;
1885
1885
  }
1886
- function hi(e, t) {
1886
+ function Ei(e, t) {
1887
1887
  let r;
1888
1888
  for (; (r = e.next()) !== null; )
1889
1889
  switch (r.fieldId) {
1890
- case oi: {
1890
+ case li: {
1891
1891
  if (r.isNull) throw new Error();
1892
1892
  t.Json = r.asString();
1893
1893
  break;
1894
1894
  }
1895
- case ai: {
1895
+ case Ii: {
1896
1896
  if (r.isNull) throw new Error();
1897
- t.Payloads = Ei(r.asDictionary());
1897
+ t.Payloads = fi(r.asDictionary());
1898
1898
  break;
1899
1899
  }
1900
1900
  }
1901
1901
  }
1902
- function ui(e, t) {
1903
- const r = H(e, ni, ii);
1904
- return Ii(r, t);
1902
+ function _i(e, t) {
1903
+ const r = K(e, ai, oi);
1904
+ return ci(r, t);
1905
1905
  }
1906
- function Ei(e) {
1906
+ function fi(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] = gs(r.value.asObject());
1911
+ t[s] = Ps(r.value.asObject());
1912
1912
  }
1913
1913
  return t;
1914
1914
  }
1915
- const Bt = 1, _i = 1048636, fi = 2610786289;
1916
- function Ti(e) {
1917
- const t = new B(Bt);
1918
- return di(e, t), t.finish();
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();
1919
1919
  }
1920
- function di(e, t) {
1921
- t.writeUInt32Field(fi, e.Version >>> 0);
1920
+ function Ni(e, t) {
1921
+ t.writeUInt32Field(Ti, e.Version >>> 0);
1922
1922
  }
1923
- function yi(e, t, r) {
1924
- const s = Ti(e);
1925
- return jt(_i, s, Bt, t, r);
1923
+ function Ai(e, t, r) {
1924
+ const s = yi(e);
1925
+ return zt(di, s, Mt, t, r);
1926
1926
  }
1927
- function w(e) {
1927
+ function S(e) {
1928
1928
  return typeof e == "object" && e !== null && !Array.isArray(e);
1929
1929
  }
1930
- function Mt(e) {
1930
+ function vt(e) {
1931
1931
  const t = {};
1932
1932
  for (const [r, s] of Object.entries(e))
1933
1933
  t[r] = s;
1934
1934
  return t;
1935
1935
  }
1936
- function vt(e, t, r, s) {
1936
+ function Gt(e, t, r, s) {
1937
1937
  if (!(e === void 0 && s)) {
1938
1938
  if (Array.isArray(e)) {
1939
1939
  const i = [];
@@ -1951,7 +1951,7 @@ function vt(e, t, r, s) {
1951
1951
  return [];
1952
1952
  }
1953
1953
  }
1954
- function tt(e, t) {
1954
+ function et(e, t) {
1955
1955
  if (!e || typeof e != "object")
1956
1956
  throw new Error(`Invalid UI node at ${t}`);
1957
1957
  const r = e.Id, s = e.Type, i = e.Props, n = e.Children, o = e.StyleIds;
@@ -1961,15 +1961,15 @@ function tt(e, t) {
1961
1961
  throw new Error(`Invalid or missing node type for ${r}`);
1962
1962
  let a = {};
1963
1963
  if (i != null) {
1964
- if (!w(i))
1964
+ if (!S(i))
1965
1965
  throw new Error(`Invalid props for node ${r}`);
1966
- a = Mt(i);
1966
+ a = vt(i);
1967
1967
  }
1968
1968
  let l = [];
1969
1969
  Array.isArray(n) && (l = n.map(
1970
- (I, c) => tt(I ?? {}, `${t}.children[${c}]`)
1970
+ (I, h) => et(I ?? {}, `${t}.children[${h}]`)
1971
1971
  ));
1972
- const u = vt(o, t, r, !1);
1972
+ const u = Gt(o, t, r, !1);
1973
1973
  return {
1974
1974
  id: r,
1975
1975
  type: s,
@@ -1978,8 +1978,8 @@ function tt(e, t) {
1978
1978
  styleIds: u ?? []
1979
1979
  };
1980
1980
  }
1981
- function Ni(e, t) {
1982
- if (!w(e))
1981
+ function wi(e, t) {
1982
+ if (!S(e))
1983
1983
  throw new Error(`Invalid text delta at ${t}`);
1984
1984
  const r = e.NodeId, s = e.PropertyName, i = e.Start, n = e.End, o = e.InsertedText;
1985
1985
  if (typeof r != "string" || r.length === 0)
@@ -2005,8 +2005,8 @@ function Ni(e, t) {
2005
2005
  insertedText: o
2006
2006
  };
2007
2007
  }
2008
- function Gt(e, t) {
2009
- if (!w(e))
2008
+ function xt(e, t) {
2009
+ if (!S(e))
2010
2010
  throw new Error(`Invalid UI diff node at ${t}`);
2011
2011
  const r = e.Id, s = e.Type, i = e.StyleIds;
2012
2012
  if (typeof r != "string" || r.length === 0)
@@ -2014,32 +2014,32 @@ function Gt(e, t) {
2014
2014
  if (typeof s != "string" || s.length === 0)
2015
2015
  throw new Error(`Invalid diff type for ${r}`);
2016
2016
  const n = Array.isArray(e.Added) ? e.Added.map(
2017
- (c, h) => tt(c ?? {}, `${t}.added[${h}]`)
2017
+ (h, c) => et(h ?? {}, `${t}.added[${c}]`)
2018
2018
  ) : [], o = [];
2019
- Array.isArray(e.Removed) && e.Removed.forEach((c, h) => {
2020
- if (typeof c == "string") {
2021
- o.push(c);
2019
+ Array.isArray(e.Removed) && e.Removed.forEach((h, c) => {
2020
+ if (typeof h == "string") {
2021
+ o.push(h);
2022
2022
  return;
2023
2023
  }
2024
- if (w(c) && typeof c.Id == "string") {
2025
- o.push(c.Id);
2024
+ if (S(h) && typeof h.Id == "string") {
2025
+ o.push(h.Id);
2026
2026
  return;
2027
2027
  }
2028
- throw new Error(`Invalid removed node at ${t}.removed[${h}]`);
2028
+ throw new Error(`Invalid removed node at ${t}.removed[${c}]`);
2029
2029
  });
2030
2030
  const a = Array.isArray(e.Updated) ? e.Updated.map(
2031
- (c, h) => Gt(c ?? {}, `${t}.updated[${h}]`)
2031
+ (h, c) => xt(h ?? {}, `${t}.updated[${c}]`)
2032
2032
  ) : [], l = /* @__PURE__ */ new Map();
2033
- if (w(e.ChangedProps))
2034
- for (const [c, h] of Object.entries(e.ChangedProps)) {
2035
- if (!w(h))
2033
+ if (S(e.ChangedProps))
2034
+ for (const [h, c] of Object.entries(e.ChangedProps)) {
2035
+ if (!S(c))
2036
2036
  continue;
2037
- const E = h.New;
2038
- E === void 0 ? l.set(c, void 0) : w(E) ? l.set(c, Mt(E)) : l.set(c, E);
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
2039
  }
2040
2040
  const u = Array.isArray(e.TextUpdates) ? e.TextUpdates.map(
2041
- (c, h) => Ni(c ?? {}, `${t}.textUpdates[${h}]`)
2042
- ) : [], I = vt(i, t, r, !0);
2041
+ (h, c) => wi(h ?? {}, `${t}.textUpdates[${c}]`)
2042
+ ) : [], I = Gt(i, t, r, !0);
2043
2043
  return {
2044
2044
  id: r,
2045
2045
  type: s,
@@ -2051,19 +2051,19 @@ function Gt(e, t) {
2051
2051
  ...I !== void 0 ? { styleIds: I } : {}
2052
2052
  };
2053
2053
  }
2054
- function Ai(e) {
2054
+ function Si(e) {
2055
2055
  const t = /* @__PURE__ */ new Map();
2056
2056
  for (const [r, s] of Object.entries(e))
2057
2057
  t.set(r, s);
2058
2058
  return t;
2059
2059
  }
2060
- function Si(e, t, r) {
2060
+ function Ui(e, t, r) {
2061
2061
  if (!e || typeof e != "object")
2062
2062
  throw new U("UI update graph is missing");
2063
- const s = tt(e, "graph");
2063
+ const s = et(e, "graph");
2064
2064
  if (s.type !== "root")
2065
2065
  throw new U('UI update root element must have type "root"');
2066
- const i = Ui(s.props, t);
2066
+ const i = Di(s.props, t);
2067
2067
  return {
2068
2068
  type: "full",
2069
2069
  version: r,
@@ -2071,15 +2071,15 @@ function Si(e, t, r) {
2071
2071
  metadata: i
2072
2072
  };
2073
2073
  }
2074
- function wi(e, t, r) {
2074
+ function Ci(e, t, r) {
2075
2075
  if (!e || typeof e != "object")
2076
2076
  throw new U("UI diff payload is missing");
2077
- if (!w(t))
2077
+ if (!S(t))
2078
2078
  throw new U("UI diff metadata must be an object");
2079
2079
  const s = t.viewId;
2080
2080
  if (typeof s != "string" || s.length === 0)
2081
2081
  throw new U("UI diff metadata is missing viewId");
2082
- const i = Gt(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 = K(t.optimisticPatch), u = $(t.optimisticReconcile), I = {
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
2083
  viewId: s,
2084
2084
  ...n !== void 0 ? { optimisticActionId: n } : {},
2085
2085
  ...o !== void 0 ? { isOptimistic: o } : {},
@@ -2094,12 +2094,12 @@ function wi(e, t, r) {
2094
2094
  metadata: I
2095
2095
  };
2096
2096
  }
2097
- function Ui(e, t) {
2097
+ function Di(e, t) {
2098
2098
  const r = e.viewId;
2099
2099
  if (typeof r != "string" || r.length === 0)
2100
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 = K(e.optimisticPatch), l = $(e.optimisticReconcile);
2102
- return w(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 = K(t.optimisticPatch)), t.optimisticReconcile !== void 0 && (l = $(t.optimisticReconcile))), {
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))), {
2103
2103
  viewId: s,
2104
2104
  ...i !== void 0 ? { optimisticActionId: i } : {},
2105
2105
  ...n !== void 0 ? { isOptimistic: n } : {},
@@ -2108,8 +2108,8 @@ function Ui(e, t) {
2108
2108
  ...l ? { optimisticReconcile: l } : {}
2109
2109
  };
2110
2110
  }
2111
- function K(e) {
2112
- if (!w(e))
2111
+ function $(e) {
2112
+ if (!S(e))
2113
2113
  return;
2114
2114
  const t = e, r = t.id, s = t.actionId, i = t.ordinal, n = t.baseVersion, o = t.supersedes;
2115
2115
  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 +2129,8 @@ function K(e) {
2129
2129
  ...a && a.length > 0 ? { supersedes: a } : {}
2130
2130
  };
2131
2131
  }
2132
- function $(e) {
2133
- if (!w(e))
2132
+ function j(e) {
2133
+ if (!S(e))
2134
2134
  return;
2135
2135
  const t = e, r = t.baseVersion, s = t.drop;
2136
2136
  if (typeof r != "number" || !Number.isFinite(r))
@@ -2152,7 +2152,7 @@ class U extends Error {
2152
2152
  super(t), this.causeError = r, this.name = "UiUpdateParseError", r instanceof Error && (this.stack = r.stack);
2153
2153
  }
2154
2154
  }
2155
- function Ci(e) {
2155
+ function Ri(e) {
2156
2156
  let t;
2157
2157
  try {
2158
2158
  t = JSON.parse(e.Json);
@@ -2166,13 +2166,13 @@ function Ci(e) {
2166
2166
  throw new U(`Unknown UI update type: ${String(r)}`);
2167
2167
  if (typeof s != "number")
2168
2168
  throw new U("UI update version must be a number");
2169
- const i = r === "full" ? Si(t.graph, t.metadata, s) : wi(t.diff, t.metadata, s), n = e.Payloads ? Ai(e.Payloads) : /* @__PURE__ */ new Map();
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
2170
  return {
2171
2171
  snapshot: i,
2172
2172
  payloads: n
2173
2173
  };
2174
2174
  }
2175
- class Di {
2175
+ class mi {
2176
2176
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2177
2177
  cache = /* @__PURE__ */ new Map();
2178
2178
  /**
@@ -2253,7 +2253,7 @@ class Di {
2253
2253
  return this.cache.size;
2254
2254
  }
2255
2255
  }
2256
- class Ri {
2256
+ class Li {
2257
2257
  views = /* @__PURE__ */ new Map();
2258
2258
  listeners = /* @__PURE__ */ new Set();
2259
2259
  payloads = /* @__PURE__ */ new Map();
@@ -2270,13 +2270,34 @@ class Ri {
2270
2270
  changedNodeIds = /* @__PURE__ */ new Set();
2271
2271
  nodeVersions = /* @__PURE__ */ new Map();
2272
2272
  structureChanged = !1;
2273
+ // Dirty flags for lazy snapshot rebuilding - start true to ensure first snapshot builds correctly
2274
+ viewsDirty = !0;
2275
+ patchesDirty = !0;
2276
+ payloadsDirty = !0;
2273
2277
  // Handler cache for stable event handlers
2274
- handlerCache = new Di();
2278
+ handlerCache = new mi();
2279
+ getSortedPatches(t) {
2280
+ const r = this.buildPatchCacheKey(t.patches);
2281
+ if (t.sortedPatchesCacheKey === r && t.sortedPatchesCache)
2282
+ return t.sortedPatchesCache;
2283
+ const s = [...t.patches.values()].sort((i, n) => i.ordinal - n.ordinal);
2284
+ return t.sortedPatchesCache = s, t.sortedPatchesCacheKey = r, s;
2285
+ }
2286
+ buildPatchCacheKey(t) {
2287
+ if (t.size === 0) return "";
2288
+ let r = "";
2289
+ for (const [s, i] of t)
2290
+ r += r ? `,${s}:${i.ordinal}` : `${s}:${i.ordinal}`;
2291
+ return r;
2292
+ }
2293
+ invalidatePatchCache(t) {
2294
+ t.sortedPatchesCache = void 0, t.sortedPatchesCacheKey = void 0;
2295
+ }
2275
2296
  apply(t) {
2276
2297
  if (this.snapshotMode) {
2277
2298
  if (t.snapshot.type !== "full")
2278
2299
  return !1;
2279
- this.snapshotMode = !1, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.snapshot = {
2300
+ this.snapshotMode = !1, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.patchesDirty = !0, this.payloadsDirty = !0, this.snapshot = {
2280
2301
  views: /* @__PURE__ */ new Map(),
2281
2302
  payloads: /* @__PURE__ */ new Map(),
2282
2303
  optimisticPatches: /* @__PURE__ */ new Map(),
@@ -2296,42 +2317,42 @@ class Ri {
2296
2317
  let l = !1;
2297
2318
  if (this.rootViewId || (this.rootViewId = n, l = !0, this.structureChanged = !0), i.optimisticReconcile?.drop)
2298
2319
  for (const I of i.optimisticReconcile.drop)
2299
- o.patches.delete(I) && (l = !0);
2320
+ o.patches.delete(I) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2300
2321
  if (i.optimisticPatch?.supersedes)
2301
2322
  for (const I of i.optimisticPatch.supersedes)
2302
- o.patches.delete(I) && (l = !0);
2323
+ o.patches.delete(I) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2303
2324
  const u = o.composite ?? o.baseline;
2304
2325
  if (r.type === "full")
2305
- o.baseline = r.root, o.composite = r.root, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version, o.patches.clear(), o.version = r.version, l = !0, this.structureChanged = !0, r.root && p(r.root, this.changedNodeIds);
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);
2306
2327
  else if (i.optimisticPatch) {
2307
2328
  if (!u)
2308
2329
  return !1;
2309
- const I = v(u, r.diff);
2310
- I !== u && (o.composite = I, l = !0, P(u, I, this.changedNodeIds));
2311
- const c = i.optimisticPatch, h = {
2312
- id: c.id,
2313
- actionId: c.actionId,
2314
- ordinal: c.ordinal,
2315
- baseVersion: c.baseVersion,
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,
2316
2337
  diff: r.diff
2317
2338
  };
2318
- o.patches.set(h.id, h), l = !0, o.version = r.version;
2339
+ o.patches.set(c.id, c), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = r.version;
2319
2340
  } else {
2320
2341
  const I = o.baseline ?? u;
2321
2342
  if (!I)
2322
2343
  return !1;
2323
- const c = v(I, r.diff);
2324
- c !== I ? (o.baseline = c, l = !0) : o.baseline = c, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? r.version;
2325
- let h = o.baseline ?? c;
2326
- const E = [...o.patches.values()].sort((T, _) => T.ordinal - _.ordinal);
2327
- for (const T of E) {
2328
- const _ = v(h, T.diff);
2329
- _ !== h && (l = !0), h = _, T.baseVersion = o.baselineVersion;
2330
- }
2331
- o.composite !== h && (o.composite = h, l = !0), u && h ? P(u, h, this.changedNodeIds) : h && p(h, this.changedNodeIds), o.version = r.version;
2332
- }
2333
- for (const [I, c] of s)
2334
- this.payloads.get(I) !== c && (this.payloads.set(I, c), l = !0);
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;
2347
+ const E = this.getSortedPatches(o);
2348
+ for (const d of E) {
2349
+ const _ = G(c, d.diff);
2350
+ _ !== c && (l = !0, this.viewsDirty = !0), c = _, d.baseVersion = o.baselineVersion;
2351
+ }
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;
2353
+ }
2354
+ for (const [I, h] of s)
2355
+ this.payloads.get(I) !== h && (this.payloads.set(I, h), l = !0, this.payloadsDirty = !0);
2335
2356
  return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = r.version, !1);
2336
2357
  }
2337
2358
  replaceFromWire(t) {
@@ -2352,42 +2373,42 @@ class Ri {
2352
2373
  let s = !1, i = null, n = null, o = null;
2353
2374
  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);
2354
2375
  if (t.deleteViews && t.deleteViews.length > 0)
2355
- for (const h of t.deleteViews)
2356
- a().delete(h) && (s = !0, this.structureChanged = !0);
2376
+ for (const c of t.deleteViews)
2377
+ a().delete(c) && (s = !0, this.structureChanged = !0);
2357
2378
  if (t.upsertViews && t.upsertViews.length > 0)
2358
- for (const [h, E] of t.upsertViews) {
2359
- const T = a(), _ = T.get(h);
2360
- _ !== E && (T.set(h, E), s = !0, _ ? P(_, E, this.changedNodeIds) : (p(E, this.changedNodeIds), this.structureChanged = !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));
2361
2382
  }
2362
2383
  if (t.deletePayloads && t.deletePayloads.length > 0)
2363
- for (const h of t.deletePayloads)
2364
- l().delete(h) && (s = !0);
2384
+ for (const c of t.deletePayloads)
2385
+ l().delete(c) && (s = !0);
2365
2386
  if (t.upsertPayloads && t.upsertPayloads.length > 0)
2366
- for (const [h, E] of t.upsertPayloads) {
2367
- const T = l();
2368
- T.get(h) !== E && (T.set(h, E), s = !0);
2387
+ for (const [c, E] of t.upsertPayloads) {
2388
+ const d = l();
2389
+ d.get(c) !== E && (d.set(c, E), s = !0);
2369
2390
  }
2370
2391
  if (t.deleteOptimisticPatchesForViews && t.deleteOptimisticPatchesForViews.length > 0)
2371
- for (const h of t.deleteOptimisticPatchesForViews)
2372
- u().delete(h) && (s = !0);
2392
+ for (const c of t.deleteOptimisticPatchesForViews)
2393
+ u().delete(c) && (s = !0);
2373
2394
  if (t.upsertOptimisticPatches && t.upsertOptimisticPatches.length > 0)
2374
- for (const [h, E] of t.upsertOptimisticPatches) {
2375
- const T = u(), _ = T.get(h);
2376
- pi(_, E) || (T.set(h, E), s = !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);
2377
2398
  }
2378
2399
  const I = t.rootViewId ?? this.snapshot.rootViewId;
2379
2400
  I !== this.snapshot.rootViewId && (s = !0, this.structureChanged = !0);
2380
- const c = t.nextVersion;
2381
- if (c !== this.snapshot.version && (s = !0), !s)
2382
- return this.snapshot = { ...this.snapshot, version: c }, !1;
2383
- for (const h of this.changedNodeIds)
2384
- this.nodeVersions.set(h, (this.nodeVersions.get(h) ?? 0) + 1);
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);
2385
2406
  return this.snapshot = {
2386
2407
  rootViewId: I,
2387
2408
  views: i ?? new Map(this.snapshot.views),
2388
2409
  payloads: n ?? new Map(this.snapshot.payloads),
2389
2410
  optimisticPatches: o ?? new Map(this.snapshot.optimisticPatches),
2390
- version: c
2411
+ version: h
2391
2412
  }, this.notify(), !0;
2392
2413
  }
2393
2414
  replaceSnapshot(t) {
@@ -2396,14 +2417,14 @@ class Ri {
2396
2417
  (r.rootViewId !== t.rootViewId || r.views.size !== t.views.size) && (this.structureChanged = !0);
2397
2418
  for (const [i, n] of t.views) {
2398
2419
  const o = r.views.get(i);
2399
- o ? P(o, n, this.changedNodeIds) : (p(n, this.changedNodeIds), this.structureChanged = !0);
2420
+ o ? v(o, n, this.changedNodeIds) : (p(n, this.changedNodeIds), this.structureChanged = !0);
2400
2421
  }
2401
2422
  for (const i of this.changedNodeIds)
2402
2423
  this.nodeVersions.set(i, (this.nodeVersions.get(i) ?? 0) + 1);
2403
2424
  return this.snapshot = t, s && this.notify(), s;
2404
2425
  }
2405
2426
  clear() {
2406
- (this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 && this.snapshot.optimisticPatches.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.snapshot = {
2427
+ (this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 && this.snapshot.optimisticPatches.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.patchesDirty = !0, this.payloadsDirty = !0, this.snapshot = {
2407
2428
  views: /* @__PURE__ */ new Map(),
2408
2429
  payloads: /* @__PURE__ */ new Map(),
2409
2430
  optimisticPatches: /* @__PURE__ */ new Map(),
@@ -2421,7 +2442,7 @@ class Ri {
2421
2442
  subscribeNode(t, r) {
2422
2443
  let s = this.nodeListeners.get(t);
2423
2444
  return s || (s = /* @__PURE__ */ new Set(), this.nodeListeners.set(t, s)), s.add(r), () => {
2424
- s.delete(r), s.size === 0 && this.nodeListeners.delete(t);
2445
+ s && (s.delete(r), s.size === 0 && this.nodeListeners.delete(t));
2425
2446
  };
2426
2447
  }
2427
2448
  getNode(t) {
@@ -2429,7 +2450,7 @@ class Ri {
2429
2450
  if (r)
2430
2451
  return r;
2431
2452
  for (const s of this.snapshot.views.values()) {
2432
- const i = xt(s, t);
2453
+ const i = Kt(s, t);
2433
2454
  if (i)
2434
2455
  return i;
2435
2456
  }
@@ -2451,33 +2472,46 @@ class Ri {
2451
2472
  this.changedNodeIds.clear();
2452
2473
  }
2453
2474
  commitSnapshot() {
2454
- const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
2455
- for (const [i, n] of this.views)
2456
- if (n.composite ? t.set(i, n.composite) : n.baseline && t.set(i, n.baseline), n.patches.size > 0) {
2457
- const o = [...n.patches.values()].sort((a, l) => a.ordinal - l.ordinal);
2458
- r.set(
2459
- i,
2460
- o.map((a) => ({
2461
- id: a.id,
2462
- actionId: a.actionId,
2463
- ordinal: a.ordinal,
2464
- baseVersion: a.baseVersion
2465
- }))
2466
- );
2467
- }
2468
- let s = this.rootViewId && this.views.has(this.rootViewId) ? this.views.get(this.rootViewId)?.version : void 0;
2469
- if (s === void 0)
2470
- for (const i of this.views.values())
2471
- s = s === void 0 ? i.version : Math.max(s, i.version);
2475
+ let t, r, s;
2476
+ if (this.viewsDirty) {
2477
+ const n = /* @__PURE__ */ new Map();
2478
+ for (const [o, a] of this.views)
2479
+ a.composite ? n.set(o, a.composite) : a.baseline && n.set(o, a.baseline);
2480
+ t = n, this.viewsDirty = !1;
2481
+ } else
2482
+ t = this.snapshot.views;
2483
+ if (this.patchesDirty) {
2484
+ const n = /* @__PURE__ */ new Map();
2485
+ for (const [o, a] of this.views)
2486
+ if (a.patches.size > 0) {
2487
+ const l = this.getSortedPatches(a);
2488
+ n.set(
2489
+ o,
2490
+ l.map((u) => ({
2491
+ id: u.id,
2492
+ actionId: u.actionId,
2493
+ ordinal: u.ordinal,
2494
+ baseVersion: u.baseVersion
2495
+ }))
2496
+ );
2497
+ }
2498
+ r = n, this.patchesDirty = !1;
2499
+ } else
2500
+ r = this.snapshot.optimisticPatches;
2501
+ this.payloadsDirty ? (s = new Map(this.payloads), this.payloadsDirty = !1) : s = this.snapshot.payloads;
2502
+ let i = this.rootViewId && this.views.has(this.rootViewId) ? this.views.get(this.rootViewId)?.version : void 0;
2503
+ if (i === void 0)
2504
+ for (const n of this.views.values())
2505
+ i = i === void 0 ? n.version : Math.max(i, n.version);
2472
2506
  this.snapshot = {
2473
2507
  rootViewId: this.rootViewId,
2474
2508
  views: t,
2475
- payloads: new Map(this.payloads),
2509
+ payloads: s,
2476
2510
  optimisticPatches: r,
2477
- version: s
2511
+ version: i
2478
2512
  };
2479
- for (const i of this.changedNodeIds)
2480
- this.nodeVersions.set(i, (this.nodeVersions.get(i) ?? 0) + 1);
2513
+ for (const n of this.changedNodeIds)
2514
+ this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
2481
2515
  }
2482
2516
  notify() {
2483
2517
  if (this.notifyNodes(), this.structureChanged) {
@@ -2487,7 +2521,7 @@ class Ri {
2487
2521
  }
2488
2522
  }
2489
2523
  }
2490
- class mi {
2524
+ class pi {
2491
2525
  streams = /* @__PURE__ */ new Map();
2492
2526
  listeners = /* @__PURE__ */ new Set();
2493
2527
  apply(t, r) {
@@ -2551,60 +2585,60 @@ class mi {
2551
2585
  }
2552
2586
  getOrCreateStreamEntry(t) {
2553
2587
  let r = this.streams.get(t);
2554
- return r || (r = { store: new Ri() }, this.streams.set(t, r)), r;
2588
+ return r || (r = { store: new Li() }, this.streams.set(t, r)), r;
2555
2589
  }
2556
2590
  notify(t) {
2557
2591
  for (const r of this.listeners)
2558
2592
  r(t);
2559
2593
  }
2560
2594
  }
2561
- function v(e, t, r) {
2595
+ function G(e, t, r) {
2562
2596
  if (e.id !== t.id)
2563
2597
  return e;
2564
2598
  let s = e, i = !1;
2565
2599
  if (t.textUpdates.length > 0) {
2566
- const _ = gi(e, t.textUpdates);
2600
+ const _ = Fi(e, t.textUpdates);
2567
2601
  s = _.node, i = _.changed;
2568
2602
  }
2569
2603
  let n = !1, o = s.props;
2570
2604
  if (t.changedProps.size > 0)
2571
- for (const [_, d] of t.changedProps.entries()) {
2605
+ for (const [_, T] of t.changedProps.entries()) {
2572
2606
  const N = o[_];
2573
- if (d === void 0)
2574
- (N !== void 0 || _ in o) && (n || (o = k(o), n = !0), delete o[_]);
2575
- else if (j(d)) {
2576
- const L = k(d);
2577
- b(L, N) || (n || (o = k(o), n = !0), o[_] = L);
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);
2578
2612
  } else
2579
- b(d, N) || (n || (o = k(o), n = !0), o[_] = d);
2613
+ b(T, N) || (n || (o = F(o), n = !0), o[_] = T);
2580
2614
  }
2581
2615
  let a = !1, l = s.styleIds;
2582
- t.styleIds !== void 0 && (Ht(s.styleIds, t.styleIds) || (l = t.styleIds, a = !0));
2616
+ t.styleIds !== void 0 && (Wt(s.styleIds, t.styleIds) || (l = t.styleIds, a = !0));
2583
2617
  const u = s.children ?? [];
2584
- let I = u, c = !1;
2618
+ let I = u, h = !1;
2585
2619
  if (t.removed.length > 0) {
2586
- const _ = new Set(t.removed), d = I.filter((N) => !_.has(N.id));
2587
- d.length !== I.length && (I = d, c = !0);
2620
+ const _ = new Set(t.removed), T = I.filter((N) => !_.has(N.id));
2621
+ T.length !== I.length && (I = T, h = !0);
2588
2622
  }
2589
2623
  if (t.updated.length > 0) {
2590
2624
  const _ = new Map(t.updated.map((N) => [N.id, N]));
2591
- let d;
2625
+ let T;
2592
2626
  for (let N = 0; N < I.length; N++) {
2593
- const L = I[N], et = _.get(L.id);
2594
- if (!et)
2627
+ const L = I[N], rt = _.get(L.id);
2628
+ if (!rt)
2595
2629
  continue;
2596
- const rt = v(L, et);
2597
- rt !== L && (d || (d = [...I]), d[N] = rt);
2630
+ const st = G(L, rt);
2631
+ st !== L && (T || (T = [...I]), T[N] = st);
2598
2632
  }
2599
- d && (I = d, c = !0);
2633
+ T && (I = T, h = !0);
2600
2634
  }
2601
- t.added.length > 0 && (I = [...I, ...t.added], c = !0);
2602
- const h = s.type !== t.type;
2603
- return i || n || h || a || c ? !n && !c && !h && !a ? s : {
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 : {
2604
2638
  id: t.id,
2605
2639
  type: t.type,
2606
2640
  props: n ? o : s.props,
2607
- children: c ? I : u,
2641
+ children: h ? I : u,
2608
2642
  styleIds: a ? l : s.styleIds
2609
2643
  } : e;
2610
2644
  }
@@ -2613,39 +2647,48 @@ function p(e, t) {
2613
2647
  for (const r of e.children)
2614
2648
  p(r, t);
2615
2649
  }
2616
- function P(e, t, r) {
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];
2655
+ }
2656
+ function v(e, t, r) {
2657
+ Ht(e, t, r, 0);
2658
+ }
2659
+ function Ht(e, t, r, s) {
2617
2660
  if (e === t)
2618
2661
  return;
2619
- (e.type !== t.type || !Li(e.props, t.props) || !Ht(e.styleIds, t.styleIds)) && r.add(t.id);
2620
- const i = e.children ?? [], n = t.children ?? [];
2621
- if (i !== n) {
2622
- const o = /* @__PURE__ */ new Map();
2623
- for (const a of i)
2624
- o.set(a.id, a);
2625
- for (const a of n) {
2626
- const l = o.get(a.id);
2627
- l ? P(l, a, r) : p(a, r);
2662
+ (e.type !== t.type || !gi(e.props, t.props) || !Wt(e.styleIds, t.styleIds)) && r.add(t.id);
2663
+ const n = e.children ?? [], o = t.children ?? [];
2664
+ if (n !== o) {
2665
+ const a = Oi(s);
2666
+ for (const l of n)
2667
+ a.set(l.id, l);
2668
+ for (const l of o) {
2669
+ const u = a.get(l.id);
2670
+ u ? Ht(u, l, r, s + 1) : p(l, r);
2628
2671
  }
2629
- i.length !== n.length && r.add(t.id);
2672
+ n.length !== o.length && r.add(t.id);
2630
2673
  }
2631
2674
  }
2632
- function Li(e, t) {
2675
+ function gi(e, t) {
2633
2676
  return b(e, t);
2634
2677
  }
2635
- function xt(e, t) {
2678
+ function Kt(e, t) {
2636
2679
  if (e.id === t)
2637
2680
  return e;
2638
2681
  if (e.children)
2639
2682
  for (const r of e.children) {
2640
- const s = xt(r, t);
2683
+ const s = Kt(r, t);
2641
2684
  if (s)
2642
2685
  return s;
2643
2686
  }
2644
2687
  }
2645
- function Ht(e, t) {
2688
+ function Wt(e, t) {
2646
2689
  return b(e, t);
2647
2690
  }
2648
- function pi(e, t) {
2691
+ function bi(e, t) {
2649
2692
  if (e === t) return !0;
2650
2693
  if (!e || !t || e.length !== t.length) return !1;
2651
2694
  for (let r = 0; r < e.length; r++) {
@@ -2655,24 +2698,24 @@ function pi(e, t) {
2655
2698
  }
2656
2699
  return !0;
2657
2700
  }
2658
- function Oi(e, t) {
2701
+ function Pi(e, t) {
2659
2702
  if (t.length === 0)
2660
2703
  return e;
2661
2704
  const r = [...t].sort((n, o) => n.start - o.start);
2662
2705
  let s = e, i = 0;
2663
2706
  for (const n of r) {
2664
- const o = nt(n.start + i, 0, s.length);
2707
+ const o = ot(n.start + i, 0, s.length);
2665
2708
  if (n.end == null) {
2666
- const I = s.slice(o), c = bi(I, n.insertedText);
2667
- s = s.slice(0, o) + n.insertedText + I.slice(c), i += n.insertedText.length - c;
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;
2668
2711
  continue;
2669
2712
  }
2670
- const a = n.end + i, l = nt(a, o, s.length), u = l - o;
2713
+ const a = n.end + i, l = ot(a, o, s.length), u = l - o;
2671
2714
  s = s.slice(0, o) + n.insertedText + s.slice(l), i += n.insertedText.length - u;
2672
2715
  }
2673
2716
  return s;
2674
2717
  }
2675
- function gi(e, t, r) {
2718
+ function Fi(e, t, r) {
2676
2719
  if (t.length === 0)
2677
2720
  return { node: e, changed: !1 };
2678
2721
  const s = /* @__PURE__ */ new Map();
@@ -2680,20 +2723,20 @@ function gi(e, t, r) {
2680
2723
  const n = s.get(i.nodeId);
2681
2724
  n ? n.push(i) : s.set(i.nodeId, [i]);
2682
2725
  }
2683
- return Wt(e, s);
2726
+ return Yt(e, s);
2684
2727
  }
2685
- function Wt(e, t, r) {
2728
+ function Yt(e, t, r) {
2686
2729
  const s = t.get(e.id) ?? [];
2687
2730
  let i = !1, n = e.props;
2688
2731
  if (s.length > 0) {
2689
2732
  const u = /* @__PURE__ */ new Map();
2690
2733
  for (const I of s) {
2691
- const c = u.get(I.propertyName);
2692
- c ? c.push(I) : u.set(I.propertyName, [I]);
2734
+ const h = u.get(I.propertyName);
2735
+ h ? h.push(I) : u.set(I.propertyName, [I]);
2693
2736
  }
2694
- for (const [I, c] of u.entries()) {
2695
- const h = n[I], T = Oi(typeof h == "string" ? h : "", c);
2696
- i || (n = k(n), i = !0), n[I] = T;
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;
2697
2740
  }
2698
2741
  }
2699
2742
  let o = !1;
@@ -2702,8 +2745,8 @@ function Wt(e, t, r) {
2702
2745
  if (a.length > 0) {
2703
2746
  let u;
2704
2747
  for (let I = 0; I < a.length; I++) {
2705
- const c = a[I], h = Wt(c, t);
2706
- h.changed && (u || (u = [...a]), u[I] = h.node);
2748
+ const h = a[I], c = Yt(h, t);
2749
+ c.changed && (u || (u = [...a]), u[I] = c.node);
2707
2750
  }
2708
2751
  u && (l = u, o = !0);
2709
2752
  }
@@ -2718,23 +2761,23 @@ function Wt(e, t, r) {
2718
2761
  changed: !0
2719
2762
  };
2720
2763
  }
2721
- function nt(e, t, r) {
2764
+ function ot(e, t, r) {
2722
2765
  return Math.max(t, Math.min(r, e));
2723
2766
  }
2724
- function bi(e, t) {
2767
+ function ki(e, t) {
2725
2768
  const r = Math.min(e.length, t.length);
2726
2769
  let s = 0;
2727
2770
  for (; s < r && e.charCodeAt(s) === t.charCodeAt(s); )
2728
2771
  s++;
2729
2772
  return s;
2730
2773
  }
2731
- function k(e) {
2774
+ function F(e) {
2732
2775
  const t = {};
2733
2776
  for (const [r, s] of Object.entries(e))
2734
2777
  t[r] = s;
2735
2778
  return t;
2736
2779
  }
2737
- function j(e) {
2780
+ function X(e) {
2738
2781
  return typeof e == "object" && e !== null && !Array.isArray(e);
2739
2782
  }
2740
2783
  function b(e, t) {
@@ -2748,7 +2791,7 @@ function b(e, t) {
2748
2791
  return !1;
2749
2792
  return !0;
2750
2793
  }
2751
- if (j(e) && j(t)) {
2794
+ if (X(e) && X(t)) {
2752
2795
  const r = Object.keys(e), s = Object.keys(t);
2753
2796
  if (r.length !== s.length)
2754
2797
  return !1;
@@ -2759,20 +2802,20 @@ function b(e, t) {
2759
2802
  }
2760
2803
  return !1;
2761
2804
  }
2762
- function Fi(e) {
2805
+ function Vi(e) {
2763
2806
  return new Worker(
2764
- "" + new URL("assets/ui-worker-CYp5-hXb.js", import.meta.url).href,
2807
+ "" + new URL("assets/ui-worker-DDoIUH1E.js", import.meta.url).href,
2765
2808
  {
2766
2809
  type: "module",
2767
2810
  name: e?.name
2768
2811
  }
2769
2812
  );
2770
2813
  }
2771
- const C = Yt("IkonUICore");
2772
- class ki {
2814
+ const C = $t("IkonUICore");
2815
+ class Mi {
2773
2816
  unsubscribeProtocolMessages;
2774
2817
  client = null;
2775
- uiStore = new mi();
2818
+ uiStore = new pi();
2776
2819
  uiWorker = null;
2777
2820
  uiStyles = /* @__PURE__ */ new Map();
2778
2821
  uiUpdateListeners = /* @__PURE__ */ new Set();
@@ -2819,7 +2862,7 @@ class ki {
2819
2862
  }
2820
2863
  startUiWorker(t) {
2821
2864
  try {
2822
- this.uiWorker = new Fi();
2865
+ this.uiWorker = new Vi();
2823
2866
  } catch (i) {
2824
2867
  C.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
2825
2868
  return;
@@ -2911,7 +2954,7 @@ class ki {
2911
2954
  }
2912
2955
  }
2913
2956
  handleProtocolMessage(t) {
2914
- switch (Kt(t)) {
2957
+ switch (jt(t)) {
2915
2958
  case D.CORE_GLOBAL_STATE:
2916
2959
  this.handleGlobalState(t);
2917
2960
  return;
@@ -2933,7 +2976,7 @@ class ki {
2933
2976
  }
2934
2977
  handleGlobalState(t) {
2935
2978
  try {
2936
- const r = $r(t), s = /* @__PURE__ */ new Set();
2979
+ const r = Xr(t), s = /* @__PURE__ */ new Set();
2937
2980
  for (const i of Object.values(r.UIStreams ?? {}))
2938
2981
  s.add(i.StreamId), this.uiStore.setCategory(i.StreamId, i.Info?.Category);
2939
2982
  for (const i of this.uiStore.getSnapshots())
@@ -2943,9 +2986,9 @@ class ki {
2943
2986
  }
2944
2987
  }
2945
2988
  handleUiUpdate(t) {
2946
- const r = st(t), s = `${r.senderId}_${r.trackId}`;
2989
+ const r = it(t), s = `${r.senderId}_${r.trackId}`;
2947
2990
  try {
2948
- const i = ui(t), n = Ci(i);
2991
+ const i = _i(t), n = Ri(i);
2949
2992
  this.notifyUiUpdate(s, n), this.uiStore.apply(s, n), this.sendUiUpdateAck(r.trackId, n.snapshot.version);
2950
2993
  } catch (i) {
2951
2994
  i instanceof U ? C.warn("Failed to parse UI update", i.causeError ?? i) : C.error("Failed to apply UI update", i);
@@ -2953,7 +2996,7 @@ class ki {
2953
2996
  }
2954
2997
  handleUiStyles(t) {
2955
2998
  try {
2956
- const r = xs(t);
2999
+ const r = Ks(t);
2957
3000
  if (!r.StyleId) return;
2958
3001
  const s = {
2959
3002
  styleId: r.StyleId,
@@ -2967,7 +3010,7 @@ class ki {
2967
3010
  }
2968
3011
  handleUiStylesBatch(t) {
2969
3012
  try {
2970
- const r = Js(t);
3013
+ const r = Qs(t);
2971
3014
  if (!r.Styles) return;
2972
3015
  for (const s of r.Styles) {
2973
3016
  if (!s.StyleId) continue;
@@ -2983,7 +3026,7 @@ class ki {
2983
3026
  }
2984
3027
  }
2985
3028
  handleClearStream(t) {
2986
- const r = st(t), s = `${r.senderId}_${r.trackId}`;
3029
+ const r = it(t), s = `${r.senderId}_${r.trackId}`;
2987
3030
  this.uiStore.clear(s), this.notifyUiStreamCleared(s);
2988
3031
  }
2989
3032
  notifyUiUpdate(t, r) {
@@ -3001,7 +3044,7 @@ class ki {
3001
3044
  sendUiUpdateAck(t, r) {
3002
3045
  if (this.client && !(!Number.isFinite(r) || r < 0))
3003
3046
  try {
3004
- const s = yi({ Version: r }, this.client.sessionId ?? 0, { trackId: t });
3047
+ const s = Ai({ Version: r }, this.client.sessionId ?? 0, { trackId: t });
3005
3048
  this.client.sendProtocolMessage(s);
3006
3049
  } catch (s) {
3007
3050
  C.warn("Failed to send UI update ack", s);
@@ -3009,10 +3052,10 @@ class ki {
3009
3052
  }
3010
3053
  }
3011
3054
  export {
3012
- Di as HandlerCache,
3013
- ki as IkonUICore,
3014
- mi as UiStore,
3015
- Ri as UiStreamStore,
3055
+ mi as HandlerCache,
3056
+ Mi as IkonUICore,
3057
+ pi as UiStore,
3058
+ Li as UiStreamStore,
3016
3059
  U as UiUpdateParseError,
3017
- Ci as parseUiUpdate
3060
+ Ri as parseUiUpdate
3018
3061
  };