@ikonai/sdk-ui 0.0.42 → 0.0.43

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.
@@ -7,26 +7,26 @@ function et(t) {
7
7
  const e = K(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
8
8
  if (e.length < 27)
9
9
  throw new Error("Protocol payload too short");
10
- const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), l = s.getUint32(20, !0), I = s.getUint8(24), c = s.getUint8(25), E = s.getUint8(26);
11
- if (27 + l * 4 > e.length)
10
+ const r = s.getUint32(0, !0), n = s.getUint32(4, !0), i = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), I = s.getUint32(20, !0), l = s.getUint8(24), c = s.getUint8(25), E = s.getUint8(26);
11
+ if (27 + I * 4 > e.length)
12
12
  throw new Error("Protocol header exceeds payload length");
13
- const h = [];
14
- let N = 27;
15
- for (let f = 0; f < l; f++)
16
- h.push(s.getUint32(N, !0)), N += 4;
13
+ const N = [];
14
+ let h = 27;
15
+ for (let w = 0; w < I; w++)
16
+ N.push(s.getUint32(h, !0)), h += 4;
17
17
  return {
18
18
  length: r,
19
19
  opcode: n,
20
20
  senderId: i,
21
21
  trackId: o,
22
22
  sequenceId: a,
23
- targetIds: h,
24
- payloadVersion: I,
23
+ targetIds: N,
24
+ payloadVersion: l,
25
25
  payloadType: c,
26
26
  flags: E
27
27
  };
28
28
  }
29
- function J(t, e, s) {
29
+ function $(t, e, s) {
30
30
  const r = K(t), n = et(r);
31
31
  if (e !== void 0 && n.opcode !== e)
32
32
  throw new Error(`Unexpected opcode ${n.opcode}`);
@@ -37,11 +37,11 @@ function J(t, e, s) {
37
37
  const i = 27 + n.targetIds.length * 4;
38
38
  return r.subarray(i, n.length);
39
39
  }
40
- var p = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(p || {});
40
+ var F = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(F || {});
41
41
  const te = 161, ee = 162;
42
42
  new TextEncoder();
43
43
  const se = new TextDecoder("utf-8", { fatal: !0 });
44
- class O {
44
+ class L {
45
45
  constructor(e, s, r) {
46
46
  this.buffer = e, this.version = s, this.offset = r, this.end = e.length - 1;
47
47
  }
@@ -53,8 +53,8 @@ class O {
53
53
  throw new Error("Teleport payload too short");
54
54
  if (s[0] !== te || s[s.length - 1] !== ee)
55
55
  throw new Error("Teleport object missing markers");
56
- const r = { offset: 1 }, n = S(s, r, "InvalidLength");
57
- return new O(s, n, r.offset);
56
+ const r = { offset: 1 }, n = C(s, r, "InvalidLength");
57
+ return new L(s, n, r.offset);
58
58
  }
59
59
  next() {
60
60
  if (this.offset >= this.end)
@@ -66,13 +66,13 @@ class O {
66
66
  const s = this.buffer[this.offset++], r = s >> 4 & 15;
67
67
  if ((s & 15) !== 0)
68
68
  throw new Error("Teleport field flags must be zero");
69
- const n = F(r);
69
+ const n = p(r);
70
70
  let i;
71
71
  if (n >= 0)
72
- A(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
72
+ S(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
73
73
  else {
74
- const o = { offset: this.offset }, a = S(this.buffer, o, "InvalidLength");
75
- A(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
74
+ const o = { offset: this.offset }, a = C(this.buffer, o, "InvalidLength");
75
+ S(this.buffer, o.offset, a), i = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
76
76
  }
77
77
  return new re(e, r, i);
78
78
  }
@@ -151,7 +151,7 @@ class U {
151
151
  return this.ensureType(
152
152
  11
153
153
  /* Object */
154
- ), O.create(this.payload);
154
+ ), L.create(this.payload);
155
155
  }
156
156
  asArray() {
157
157
  return this.ensureType(
@@ -167,7 +167,7 @@ class U {
167
167
  }
168
168
  ensureType(e) {
169
169
  if (this.type !== e)
170
- throw new Error(`Teleport value has type ${p[this.type]}, expected ${p[e]}`);
170
+ throw new Error(`Teleport value has type ${F[this.type]}, expected ${F[e]}`);
171
171
  }
172
172
  }
173
173
  class re extends U {
@@ -191,7 +191,7 @@ class st {
191
191
  if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
192
192
  throw new Error("Array flags must be zero");
193
193
  const r = { offset: 1 };
194
- this.count = S(e, r, "ArrayMalformed"), this.offset = r.offset;
194
+ this.count = C(e, r, "ArrayMalformed"), this.offset = r.offset;
195
195
  }
196
196
  static create(e) {
197
197
  return new st(K(e));
@@ -215,38 +215,38 @@ class st {
215
215
  case 4:
216
216
  case 6:
217
217
  case 14: {
218
- const e = F(this.elementType);
219
- A(this.payload, this.offset, e);
218
+ const e = p(this.elementType);
219
+ S(this.payload, this.offset, e);
220
220
  const s = this.payload.subarray(this.offset, this.offset + e);
221
- return this.offset += e, new V(this.elementType, s);
221
+ return this.offset += e, new M(this.elementType, s);
222
222
  }
223
223
  case 12:
224
224
  case 13: {
225
- const e = { offset: this.offset }, s = S(this.payload, e, "ArrayMalformed");
226
- A(this.payload, e.offset, s);
225
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
226
+ S(this.payload, e.offset, s);
227
227
  const r = this.payload.subarray(e.offset, e.offset + s);
228
- return this.offset = e.offset + s, new V(this.elementType, r);
228
+ return this.offset = e.offset + s, new M(this.elementType, r);
229
229
  }
230
230
  case 11: {
231
- const e = { offset: this.offset }, s = S(this.payload, e, "ArrayMalformed");
232
- A(this.payload, e.offset, s);
231
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
232
+ S(this.payload, e.offset, s);
233
233
  const r = this.payload.subarray(e.offset, e.offset + s);
234
- return this.offset = e.offset + s, new V(11, r);
234
+ return this.offset = e.offset + s, new M(11, r);
235
235
  }
236
236
  case 9: {
237
237
  const e = nt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
238
- return this.offset += e, new V(9, s);
238
+ return this.offset += e, new M(9, s);
239
239
  }
240
240
  case 10: {
241
241
  const e = it(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
242
- return this.offset += e, new V(10, s);
242
+ return this.offset += e, new M(10, s);
243
243
  }
244
244
  default:
245
- throw new Error(`Unsupported array element type ${p[this.elementType]}`);
245
+ throw new Error(`Unsupported array element type ${F[this.elementType]}`);
246
246
  }
247
247
  }
248
248
  }
249
- class V extends U {
249
+ class M extends U {
250
250
  constructor(e, s) {
251
251
  super(e, s);
252
252
  }
@@ -263,9 +263,9 @@ class rt {
263
263
  throw new Error("Dictionary payload too short");
264
264
  if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
265
265
  throw new Error("Dictionary key/value flags must be zero");
266
- _t(this.keyType);
266
+ ct(this.keyType);
267
267
  const s = { offset: 2 };
268
- this.count = S(e, s, "DictMalformed"), this.offset = s.offset;
268
+ this.count = C(e, s, "DictMalformed"), this.offset = s.offset;
269
269
  }
270
270
  static create(e) {
271
271
  return new rt(K(e));
@@ -280,15 +280,15 @@ class rt {
280
280
  return this.index++, new ne(e, s);
281
281
  }
282
282
  readKey() {
283
- const e = F(this.keyType);
283
+ const e = p(this.keyType);
284
284
  if (e >= 0) {
285
- A(this.payload, this.offset, e);
285
+ S(this.payload, this.offset, e);
286
286
  const s = this.payload.subarray(this.offset, this.offset + e);
287
287
  return this.offset += e, new U(this.keyType, s);
288
288
  }
289
289
  if (this.keyType === 12 || this.keyType === 13) {
290
- const s = { offset: this.offset }, r = S(this.payload, s, "DictMalformed");
291
- A(this.payload, s.offset, r);
290
+ const s = { offset: this.offset }, r = C(this.payload, s, "DictMalformed");
291
+ S(this.payload, s.offset, r);
292
292
  const n = this.payload.subarray(s.offset, s.offset + r);
293
293
  return this.offset = s.offset + r, new U(this.keyType, n);
294
294
  }
@@ -298,14 +298,14 @@ class rt {
298
298
  switch (this.valueType) {
299
299
  case 12:
300
300
  case 13: {
301
- const e = { offset: this.offset }, s = S(this.payload, e, "DictMalformed");
302
- A(this.payload, e.offset, s);
301
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
302
+ S(this.payload, e.offset, s);
303
303
  const r = this.payload.subarray(e.offset, e.offset + s);
304
304
  return this.offset = e.offset + s, new U(this.valueType, r);
305
305
  }
306
306
  case 11: {
307
- const e = { offset: this.offset }, s = S(this.payload, e, "DictMalformed");
308
- A(this.payload, e.offset, s);
307
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
308
+ S(this.payload, e.offset, s);
309
309
  const r = this.payload.subarray(e.offset, e.offset + s);
310
310
  return this.offset = e.offset + s, new U(11, r);
311
311
  }
@@ -326,13 +326,13 @@ class rt {
326
326
  case 6:
327
327
  case 14:
328
328
  case 1: {
329
- const e = F(this.valueType);
330
- A(this.payload, this.offset, e);
329
+ const e = p(this.valueType);
330
+ S(this.payload, this.offset, e);
331
331
  const s = this.payload.subarray(this.offset, this.offset + e);
332
332
  return this.offset += e, new U(this.valueType, s);
333
333
  }
334
334
  default:
335
- throw new Error(`Unsupported dictionary value type ${p[this.valueType]}`);
335
+ throw new Error(`Unsupported dictionary value type ${F[this.valueType]}`);
336
336
  }
337
337
  }
338
338
  }
@@ -380,8 +380,8 @@ class T {
380
380
  T.toHex(T.readUInt32LE(e, 0), 8),
381
381
  T.toHex(T.readUInt16LE(e, 4), 4),
382
382
  T.toHex(T.readUInt16LE(e, 6), 4),
383
- It(e.subarray(8, 10)),
384
- It(e.subarray(10, 16))
383
+ at(e.subarray(8, 10)),
384
+ at(e.subarray(10, 16))
385
385
  ].join("-");
386
386
  }
387
387
  asBytes() {
@@ -411,7 +411,7 @@ class T {
411
411
  return (e >>> 0).toString(16).padStart(s, "0");
412
412
  }
413
413
  }
414
- function S(t, e, s) {
414
+ function C(t, e, s) {
415
415
  if (e.offset >= t.length)
416
416
  throw new Error(s);
417
417
  let r = 0, n = 0, i = 0;
@@ -430,7 +430,7 @@ function S(t, e, s) {
430
430
  function ie(t) {
431
431
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
432
432
  }
433
- function F(t) {
433
+ function p(t) {
434
434
  switch (t) {
435
435
  case 3:
436
436
  case 5:
@@ -450,11 +450,11 @@ function F(t) {
450
450
  return -1;
451
451
  }
452
452
  }
453
- function _t(t) {
453
+ function ct(t) {
454
454
  if (t === 9 || t === 11 || t === 10 || t === 1)
455
455
  throw new Error("Dictionary keys must be primitive Teleport types");
456
456
  }
457
- function A(t, e, s) {
457
+ function S(t, e, s) {
458
458
  if (e < 0 || s < 0 || e + s > t.length)
459
459
  throw new Error("Teleport payload exceeds bounds");
460
460
  }
@@ -467,13 +467,13 @@ function nt(t, e) {
467
467
  const s = t[e], r = s >> 4 & 15;
468
468
  if ((s & 15) !== 0)
469
469
  throw new Error("Array flags must be zero");
470
- const n = { offset: e + 1 }, i = S(t, n, "ArrayMalformed"), o = F(r);
470
+ const n = { offset: e + 1 }, i = C(t, n, "ArrayMalformed"), o = p(r);
471
471
  if (o >= 0) {
472
- const l = o * i;
473
- return A(t, n.offset, l), n.offset + l - e;
472
+ const I = o * i;
473
+ return S(t, n.offset, I), n.offset + I - e;
474
474
  }
475
475
  let a = n.offset;
476
- for (let l = 0; l < i; l++)
476
+ for (let I = 0; I < i; I++)
477
477
  a = q(r, t, a, "ArrayMalformed");
478
478
  return a - e;
479
479
  }
@@ -483,224 +483,279 @@ function it(t, e) {
483
483
  const s = t[e] >> 4 & 15, r = t[e + 1] >> 4 & 15;
484
484
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
485
485
  throw new Error("Dictionary key/value flags must be zero");
486
- _t(s);
487
- const n = { offset: e + 2 }, i = S(t, n, "DictMalformed");
486
+ ct(s);
487
+ const n = { offset: e + 2 }, i = C(t, n, "DictMalformed");
488
488
  let o = n.offset;
489
489
  for (let a = 0; a < i; a++)
490
490
  o = q(s, t, o, "DictMalformed"), o = q(r, t, o, "DictMalformed");
491
491
  return o - e;
492
492
  }
493
493
  function q(t, e, s, r) {
494
- const n = F(t);
494
+ const n = p(t);
495
495
  if (n >= 0)
496
- return A(e, s, n), s + n;
496
+ return S(e, s, n), s + n;
497
497
  switch (t) {
498
498
  case 12:
499
499
  case 13: {
500
- const i = { offset: s }, o = S(e, i, r);
501
- return A(e, i.offset, o), i.offset + o;
500
+ const i = { offset: s }, o = C(e, i, r);
501
+ return S(e, i.offset, o), i.offset + o;
502
502
  }
503
503
  case 11: {
504
- const i = { offset: s }, o = S(e, i, r);
505
- return A(e, i.offset, o), i.offset + o;
504
+ const i = { offset: s }, o = C(e, i, r);
505
+ return S(e, i.offset, o), i.offset + o;
506
506
  }
507
507
  case 9:
508
508
  return s + nt(e, s);
509
509
  case 10:
510
510
  return s + it(e, s);
511
511
  default:
512
- throw new Error(`Unsupported Teleport type ${p[t]}`);
512
+ throw new Error(`Unsupported Teleport type ${F[t]}`);
513
513
  }
514
514
  }
515
- function It(t) {
515
+ function at(t) {
516
516
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
517
517
  }
518
518
  function K(t) {
519
519
  return t instanceof Uint8Array ? t : new Uint8Array(t);
520
520
  }
521
- var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(ht || {}), ut = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(ut || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Tt || {}), Nt = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Nt || {}), At = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(At || {}), St = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Hevc = 2] = "Hevc", t[t.Vp8 = 3] = "Vp8", t))(St || {}), dt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(dt || {}), P = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(P || {});
522
- const ae = 1368629611, le = 2431514951, Ie = 2914494629, ce = 3284746250, Ee = 4101844078;
523
- function yt(t) {
521
+ var Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(Et || {}), _t = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(_t || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(ft || {}), ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(ht || {}), ut = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(ut || {}), Tt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Tt || {}), Nt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(Nt || {}), At = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(At || {}), g = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(g || {});
522
+ const ae = 265814330, le = 1368629611, Ie = 2431514951, ce = 2914494629, Ee = 3284746250, _e = 4101844078;
523
+ function dt(t) {
524
524
  const e = {};
525
- return Ct(e), e;
525
+ return St(e), e;
526
526
  }
527
- function Ct(t) {
528
- return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t;
529
- }
530
- function _e(t, e) {
531
- const s = e ?? yt();
532
- return Ct(s), fe(t, s), s;
527
+ function St(t) {
528
+ return t.Description = "", t.Codec = Et.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
533
529
  }
534
530
  function fe(t, e) {
531
+ const s = e ?? dt();
532
+ return St(s), he(t, s), s;
533
+ }
534
+ function he(t, e) {
535
535
  let s;
536
536
  for (; (s = t.next()) !== null; )
537
537
  switch (s.fieldId) {
538
538
  case ae: {
539
+ if (s.isNull) {
540
+ e.ShapeSets = void 0;
541
+ break;
542
+ }
543
+ e.ShapeSets = ue(s.asArray());
544
+ break;
545
+ }
546
+ case le: {
539
547
  if (s.isNull) throw new Error();
540
548
  e.Description = s.asString();
541
549
  break;
542
550
  }
543
- case le: {
551
+ case Ie: {
544
552
  if (s.isNull) throw new Error();
545
553
  e.Channels = s.asInt32();
546
554
  break;
547
555
  }
548
- case Ie: {
556
+ case ce: {
549
557
  if (s.isNull) throw new Error();
550
558
  e.BitDepth = s.asInt32();
551
559
  break;
552
560
  }
553
- case ce: {
561
+ case Ee: {
554
562
  if (s.isNull) throw new Error();
555
563
  e.Codec = s.asInt32();
556
564
  break;
557
565
  }
558
- case Ee: {
566
+ case _e: {
559
567
  if (s.isNull) throw new Error();
560
568
  e.SampleRate = s.asInt32();
561
569
  break;
562
570
  }
563
571
  }
564
572
  }
565
- const he = 76337612, ue = 185396121, Te = 388632637, Ne = 417197284, Ae = 469070965, Se = 470595159, de = 781727218, ye = 834078886, Ce = 1043273762, we = 1236999138, Ue = 1368629611, De = 1715899485, Re = 1942830531, Le = 1999510636, me = 2079864626, Oe = 2142346422, ge = 2598291686, Pe = 2719718823, be = 2810953526, pe = 2840065720, Fe = 2885165957, ve = 3586157513, Me = 3717933110, Ve = 4062655306;
566
- function ke(t) {
573
+ function ue(t) {
574
+ const e = [];
575
+ let s;
576
+ for (; (s = t.next()) !== null; )
577
+ e.push(Se(s.asObject()));
578
+ return e;
579
+ }
580
+ const Te = 1107713536, Ne = 1154362099, Ae = 1185721362;
581
+ function de(t) {
582
+ const e = {};
583
+ return yt(e), e;
584
+ }
585
+ function yt(t) {
586
+ return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
587
+ }
588
+ function Se(t, e) {
589
+ const s = e ?? de();
590
+ return yt(s), ye(t, s), s;
591
+ }
592
+ function ye(t, e) {
593
+ let s;
594
+ for (; (s = t.next()) !== null; )
595
+ switch (s.fieldId) {
596
+ case Te: {
597
+ if (s.isNull) throw new Error();
598
+ e.Name = s.asString();
599
+ break;
600
+ }
601
+ case Ne: {
602
+ if (s.isNull) throw new Error();
603
+ e.SetId = s.asUInt32();
604
+ break;
605
+ }
606
+ case Ae: {
607
+ if (s.isNull) throw new Error();
608
+ e.ShapeNames = we(s.asArray());
609
+ break;
610
+ }
611
+ }
612
+ }
613
+ function we(t) {
614
+ const e = [];
615
+ let s;
616
+ for (; (s = t.next()) !== null; )
617
+ e.push(s.asString());
618
+ return e;
619
+ }
620
+ const Ce = 76337612, De = 185396121, Ue = 388632637, Re = 417197284, me = 469070965, Le = 470595159, ge = 781727218, Oe = 834078886, Pe = 1043273762, be = 1236999138, Fe = 1368629611, pe = 1715899485, ve = 1942830531, Me = 1999510636, ke = 2079864626, Ve = 2142346422, Ge = 2598291686, Be = 2719718823, xe = 2810953526, He = 2840065720, Ye = 2885165957, $e = 3586157513, Ke = 3717933110, je = 4062655306;
621
+ function Xe(t) {
567
622
  const e = {};
568
623
  return wt(e), e;
569
624
  }
570
625
  function wt(t) {
571
- return t.ContextType = ut.Unknown, t.UserType = At.Unknown, t.PayloadType = Tt.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = ht.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = dt.Unknown, t;
626
+ return t.ContextType = ft.Unknown, t.UserType = Tt.Unknown, t.PayloadType = ht.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = _t.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = At.Unknown, t;
572
627
  }
573
- function Ge(t, e) {
574
- const s = e ?? ke();
575
- return wt(s), Be(t, s), s;
628
+ function ze(t, e) {
629
+ const s = e ?? Xe();
630
+ return wt(s), We(t, s), s;
576
631
  }
577
- function Be(t, e) {
632
+ function We(t, e) {
578
633
  let s;
579
634
  for (; (s = t.next()) !== null; )
580
635
  switch (s.fieldId) {
581
- case he: {
636
+ case Ce: {
582
637
  if (s.isNull) throw new Error();
583
638
  e.DeviceId = s.asString();
584
639
  break;
585
640
  }
586
- case ue: {
641
+ case De: {
587
642
  if (s.isNull) throw new Error();
588
643
  e.InstallId = s.asString();
589
644
  break;
590
645
  }
591
- case Te: {
646
+ case Ue: {
592
647
  if (s.isNull) throw new Error();
593
648
  e.UserAgent = s.asString();
594
649
  break;
595
650
  }
596
- case Ne: {
651
+ case Re: {
597
652
  if (s.isNull) throw new Error();
598
653
  e.ContextType = s.asInt32();
599
654
  break;
600
655
  }
601
- case Ae: {
656
+ case me: {
602
657
  if (s.isNull) throw new Error();
603
658
  e.HasInput = s.asBool();
604
659
  break;
605
660
  }
606
- case Se: {
661
+ case Le: {
607
662
  if (s.isNull) throw new Error();
608
663
  e.UserType = s.asInt32();
609
664
  break;
610
665
  }
611
- case de: {
666
+ case ge: {
612
667
  if (s.isNull) throw new Error();
613
668
  e.UserId = s.asString();
614
669
  break;
615
670
  }
616
- case ye: {
671
+ case Oe: {
617
672
  if (s.isNull) throw new Error();
618
673
  e.ProductId = s.asString();
619
674
  break;
620
675
  }
621
- case Ce: {
676
+ case Pe: {
622
677
  if (s.isNull) throw new Error();
623
678
  e.AuthSessionId = s.asString();
624
679
  break;
625
680
  }
626
- case we: {
681
+ case be: {
627
682
  if (s.isNull) throw new Error();
628
683
  e.ReceiveAllMessages = s.asBool();
629
684
  break;
630
685
  }
631
- case Ue: {
686
+ case Fe: {
632
687
  if (s.isNull) throw new Error();
633
688
  e.Description = s.asString();
634
689
  break;
635
690
  }
636
- case De: {
691
+ case pe: {
637
692
  if (s.isNull) throw new Error();
638
693
  e.Locale = s.asString();
639
694
  break;
640
695
  }
641
- case Re: {
696
+ case ve: {
642
697
  if (s.isNull) throw new Error();
643
698
  e.SdkType = s.asInt32();
644
699
  break;
645
700
  }
646
- case Le: {
701
+ case Me: {
647
702
  if (s.isNull) throw new Error();
648
703
  e.SessionId = s.asInt32();
649
704
  break;
650
705
  }
651
- case me: {
706
+ case ke: {
652
707
  if (s.isNull) throw new Error();
653
708
  e.PreciseJoinedAt = s.asUInt64();
654
709
  break;
655
710
  }
656
- case Oe: {
711
+ case Ve: {
657
712
  if (s.isNull) throw new Error();
658
713
  e.PayloadType = s.asInt32();
659
714
  break;
660
715
  }
661
- case ge: {
716
+ case Ge: {
662
717
  if (s.isNull) throw new Error();
663
718
  e.VersionId = s.asString();
664
719
  break;
665
720
  }
666
- case Pe: {
721
+ case Be: {
667
722
  if (s.isNull) throw new Error();
668
723
  e.UniqueSessionId = s.asString();
669
724
  break;
670
725
  }
671
- case be: {
726
+ case xe: {
672
727
  if (s.isNull) throw new Error();
673
728
  e.ClientType = s.asInt32();
674
729
  break;
675
730
  }
676
- case pe: {
731
+ case He: {
677
732
  if (s.isNull) throw new Error();
678
733
  e.IsReady = s.asBool();
679
734
  break;
680
735
  }
681
- case Fe: {
736
+ case Ye: {
682
737
  if (s.isNull) throw new Error();
683
- e.Parameters = xe(s.asDictionary());
738
+ e.Parameters = Je(s.asDictionary());
684
739
  break;
685
740
  }
686
- case ve: {
741
+ case $e: {
687
742
  if (s.isNull) throw new Error();
688
743
  e.IsInternal = s.asBool();
689
744
  break;
690
745
  }
691
- case Me: {
746
+ case Ke: {
692
747
  if (s.isNull) throw new Error();
693
748
  e.ChannelLocale = s.asString();
694
749
  break;
695
750
  }
696
- case Ve: {
751
+ case je: {
697
752
  if (s.isNull) throw new Error();
698
753
  e.EmbeddedSpaceId = s.asString();
699
754
  break;
700
755
  }
701
756
  }
702
757
  }
703
- function xe(t) {
758
+ function Je(t) {
704
759
  const e = /* @__PURE__ */ Object.create(null);
705
760
  let s;
706
761
  for (; (s = t.next()) !== null; ) {
@@ -709,634 +764,649 @@ function xe(t) {
709
764
  }
710
765
  return e;
711
766
  }
712
- const He = 703025676, Ye = 814454131, Ke = 972460562, $e = 976255570, je = 1368629611, Xe = 1479280922, ze = 1533537016, We = 2274386296, Je = 2603556958, qe = 2885165957, Qe = 3568439632;
713
- function Ze(t) {
767
+ const qe = 703025676, Qe = 814454131, Ze = 972460562, ts = 976255570, es = 1368629611, ss = 1479280922, rs = 1533537016, ns = 2274386296, is = 2603556958, os = 2885165957, as = 3568439632;
768
+ function ls(t) {
714
769
  const e = {};
715
- return Ut(e), e;
770
+ return Ct(e), e;
716
771
  }
717
- function Ut(t) {
772
+ function Ct(t) {
718
773
  return t.FunctionId = T.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
719
774
  }
720
- function ts(t, e) {
721
- const s = e ?? Ze();
722
- return Ut(s), es(t, s), s;
775
+ function Is(t, e) {
776
+ const s = e ?? ls();
777
+ return Ct(s), cs(t, s), s;
723
778
  }
724
- function es(t, e) {
779
+ function cs(t, e) {
725
780
  let s;
726
781
  for (; (s = t.next()) !== null; )
727
782
  switch (s.fieldId) {
728
- case He: {
783
+ case qe: {
729
784
  if (s.isNull) throw new Error();
730
785
  e.ResultTypeName = s.asString();
731
786
  break;
732
787
  }
733
- case Ye: {
788
+ case Qe: {
734
789
  if (s.isNull) throw new Error();
735
790
  e.FunctionName = s.asString();
736
791
  break;
737
792
  }
738
- case Ke: {
793
+ case Ze: {
739
794
  if (s.isNull) throw new Error();
740
795
  e.EnumerableItemTypeName = s.asString();
741
796
  break;
742
797
  }
743
- case $e: {
798
+ case ts: {
744
799
  if (s.isNull) throw new Error();
745
800
  e.FunctionId = s.asGuid();
746
801
  break;
747
802
  }
748
- case je: {
803
+ case es: {
749
804
  if (s.isNull) throw new Error();
750
805
  e.Description = s.asString();
751
806
  break;
752
807
  }
753
- case Xe: {
808
+ case ss: {
754
809
  if (s.isNull) throw new Error();
755
810
  e.IsCancellable = s.asBool();
756
811
  break;
757
812
  }
758
- case ze: {
813
+ case rs: {
759
814
  if (s.isNull) throw new Error();
760
815
  e.RequiresInstance = s.asBool();
761
816
  break;
762
817
  }
763
- case We: {
818
+ case ns: {
764
819
  if (s.isNull) throw new Error();
765
820
  e.LlmInlineResult = s.asBool();
766
821
  break;
767
822
  }
768
- case Je: {
823
+ case is: {
769
824
  if (s.isNull) throw new Error();
770
825
  e.IsEnumerable = s.asBool();
771
826
  break;
772
827
  }
773
- case qe: {
828
+ case os: {
774
829
  if (s.isNull) throw new Error();
775
- e.Parameters = ss(s.asArray());
830
+ e.Parameters = Es(s.asArray());
776
831
  break;
777
832
  }
778
- case Qe: {
833
+ case as: {
779
834
  if (s.isNull) throw new Error();
780
835
  e.LlmCallOnlyOnce = s.asBool();
781
836
  break;
782
837
  }
783
838
  }
784
839
  }
785
- function ss(t) {
840
+ function Es(t) {
786
841
  const e = [];
787
842
  let s;
788
843
  for (; (s = t.next()) !== null; )
789
- e.push(fs(s.asObject()));
844
+ e.push(ws(s.asObject()));
790
845
  return e;
791
846
  }
792
- const rs = 607861992, ns = 894485888, is = 972460562, os = 1368629611, as = 1883521406, ls = 2603556958, Is = 3609695522, cs = 4075263697, Es = 4257460908;
793
- function _s(t) {
847
+ const _s = 607861992, fs = 894485888, hs = 972460562, us = 1368629611, Ts = 1883521406, Ns = 2603556958, As = 3609695522, ds = 4075263697, Ss = 4257460908;
848
+ function ys(t) {
794
849
  const e = {};
795
850
  return Dt(e), e;
796
851
  }
797
852
  function Dt(t) {
798
853
  return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
799
854
  }
800
- function fs(t, e) {
801
- const s = e ?? _s();
802
- return Dt(s), hs(t, s), s;
855
+ function ws(t, e) {
856
+ const s = e ?? ys();
857
+ return Dt(s), Cs(t, s), s;
803
858
  }
804
- function hs(t, e) {
859
+ function Cs(t, e) {
805
860
  let s;
806
861
  for (; (s = t.next()) !== null; )
807
862
  switch (s.fieldId) {
808
- case rs: {
863
+ case _s: {
809
864
  if (s.isNull) throw new Error();
810
865
  e.HasDefaultValue = s.asBool();
811
866
  break;
812
867
  }
813
- case ns: {
868
+ case fs: {
814
869
  if (s.isNull) throw new Error();
815
870
  e.DefaultValueJson = s.asString();
816
871
  break;
817
872
  }
818
- case is: {
873
+ case hs: {
819
874
  if (s.isNull) throw new Error();
820
875
  e.EnumerableItemTypeName = s.asString();
821
876
  break;
822
877
  }
823
- case os: {
878
+ case us: {
824
879
  if (s.isNull) throw new Error();
825
880
  e.Description = s.asString();
826
881
  break;
827
882
  }
828
- case as: {
883
+ case Ts: {
829
884
  if (s.isNull) throw new Error();
830
885
  e.DefaultValueData = s.asBinary();
831
886
  break;
832
887
  }
833
- case ls: {
888
+ case Ns: {
834
889
  if (s.isNull) throw new Error();
835
890
  e.IsEnumerable = s.asBool();
836
891
  break;
837
892
  }
838
- case Is: {
893
+ case As: {
839
894
  if (s.isNull) throw new Error();
840
895
  e.TypeName = s.asString();
841
896
  break;
842
897
  }
843
- case cs: {
898
+ case ds: {
844
899
  if (s.isNull) throw new Error();
845
900
  e.ParameterName = s.asString();
846
901
  break;
847
902
  }
848
- case Es: {
903
+ case Ss: {
849
904
  if (s.isNull) throw new Error();
850
905
  e.ParameterIndex = s.asInt32();
851
906
  break;
852
907
  }
853
908
  }
854
909
  }
855
- const us = 3167053791, Ts = 3342364356, Ns = 3612929027;
856
- function Rt(t) {
910
+ const Ds = 3167053791, Us = 3342364356, Rs = 3612929027;
911
+ function Ut(t) {
857
912
  const e = {};
858
- return Lt(e), e;
913
+ return Rt(e), e;
859
914
  }
860
- function Lt(t) {
861
- return t.Category = "", t.Type = Nt.Face, t.FaceBlendshapes = [], t;
915
+ function Rt(t) {
916
+ return t.Category = "", t.Type = ut.Face, t.FaceBlendshapes = [], t;
862
917
  }
863
- function As(t, e) {
864
- const s = e ?? Rt();
865
- return Lt(s), Ss(t, s), s;
918
+ function ms(t, e) {
919
+ const s = e ?? Ut();
920
+ return Rt(s), Ls(t, s), s;
866
921
  }
867
- function Ss(t, e) {
922
+ function Ls(t, e) {
868
923
  let s;
869
924
  for (; (s = t.next()) !== null; )
870
925
  switch (s.fieldId) {
871
- case us: {
926
+ case Ds: {
872
927
  if (s.isNull) throw new Error();
873
928
  e.Type = s.asInt32();
874
929
  break;
875
930
  }
876
- case Ts: {
931
+ case Us: {
877
932
  if (s.isNull) throw new Error();
878
- e.FaceBlendshapes = ds(s.asArray());
933
+ e.FaceBlendshapes = gs(s.asArray());
879
934
  break;
880
935
  }
881
- case Ns: {
936
+ case Rs: {
882
937
  if (s.isNull) throw new Error();
883
938
  e.Category = s.asString();
884
939
  break;
885
940
  }
886
941
  }
887
942
  }
888
- function ds(t) {
943
+ function gs(t) {
889
944
  const e = [];
890
945
  let s;
891
946
  for (; (s = t.next()) !== null; )
892
947
  e.push(s.asString());
893
948
  return e;
894
949
  }
895
- const ys = 3612929027;
950
+ const Os = 3612929027;
896
951
  function mt(t) {
897
952
  const e = {};
898
- return Ot(e), e;
953
+ return Lt(e), e;
899
954
  }
900
- function Ot(t) {
955
+ function Lt(t) {
901
956
  return t.Category = "", t;
902
957
  }
903
- function Cs(t, e) {
958
+ function Ps(t, e) {
904
959
  const s = e ?? mt();
905
- return Ot(s), ws(t, s), s;
960
+ return Lt(s), bs(t, s), s;
906
961
  }
907
- function ws(t, e) {
962
+ function bs(t, e) {
908
963
  let s;
909
964
  for (; (s = t.next()) !== null; )
910
965
  switch (s.fieldId) {
911
- case ys: {
966
+ case Os: {
912
967
  if (s.isNull) throw new Error();
913
968
  e.Category = s.asString();
914
969
  break;
915
970
  }
916
971
  }
917
972
  }
918
- const Us = 1368629611, Ds = 2950031986, Rs = 3284746250, Ls = 4065070594;
973
+ const Fs = 164808083, ps = 1368629611, vs = 2739413426, Ms = 2768375929, ks = 2950031986, Vs = 3284746250, Gs = 4065070594;
919
974
  function gt(t) {
920
975
  const e = {};
921
- return Pt(e), e;
976
+ return Ot(e), e;
922
977
  }
923
- function Pt(t) {
924
- return t.Description = "", t.Codec = St.H264, t.Width = 0, t.Height = 0, t;
978
+ function Ot(t) {
979
+ return t.Description = "", t.Codec = Nt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
925
980
  }
926
- function ms(t, e) {
981
+ function Bs(t, e) {
927
982
  const s = e ?? gt();
928
- return Pt(s), Os(t, s), s;
983
+ return Ot(s), xs(t, s), s;
929
984
  }
930
- function Os(t, e) {
985
+ function xs(t, e) {
931
986
  let s;
932
987
  for (; (s = t.next()) !== null; )
933
988
  switch (s.fieldId) {
934
- case Us: {
989
+ case Fs: {
990
+ if (s.isNull) throw new Error();
991
+ e.Framerate = s.asInt32();
992
+ break;
993
+ }
994
+ case ps: {
935
995
  if (s.isNull) throw new Error();
936
996
  e.Description = s.asString();
937
997
  break;
938
998
  }
939
- case Ds: {
999
+ case vs: {
1000
+ if (s.isNull) throw new Error();
1001
+ e.IsHardwareAccelerated = s.asBool();
1002
+ break;
1003
+ }
1004
+ case Ms: {
1005
+ if (s.isNull) throw new Error();
1006
+ e.Bitrate = s.asInt32();
1007
+ break;
1008
+ }
1009
+ case ks: {
940
1010
  if (s.isNull) throw new Error();
941
1011
  e.Height = s.asInt32();
942
1012
  break;
943
1013
  }
944
- case Rs: {
1014
+ case Vs: {
945
1015
  if (s.isNull) throw new Error();
946
1016
  e.Codec = s.asInt32();
947
1017
  break;
948
1018
  }
949
- case Ls: {
1019
+ case Gs: {
950
1020
  if (s.isNull) throw new Error();
951
1021
  e.Width = s.asInt32();
952
1022
  break;
953
1023
  }
954
1024
  }
955
1025
  }
956
- const gs = 3, Ps = 65539, bs = 693643444, ps = 1144553441, Fs = 1497620243, vs = 1559330978, Ms = 1999510636, Vs = 2277643855, ks = 2469008121, Gs = 3219210453, Bs = 3678477544, xs = 3696445035, Hs = 3707543140, Ys = 3712281496, Ks = 3823842552, $s = 3895362455, js = 3897397815, Xs = 4225107827;
957
- function zs(t) {
1026
+ const Hs = 3, Ys = 65539, $s = 693643444, Ks = 1144553441, js = 1497620243, Xs = 1559330978, zs = 1999510636, Ws = 2277643855, Js = 2469008121, qs = 3219210453, Qs = 3678477544, Zs = 3696445035, tr = 3707543140, er = 3712281496, sr = 3823842552, rr = 3895362455, nr = 3897397815, ir = 4225107827;
1027
+ function or(t) {
958
1028
  const e = {};
959
- return bt(e), e;
1029
+ return Pt(e), e;
960
1030
  }
961
- function bt(t) {
1031
+ function Pt(t) {
962
1032
  return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.Functions = /* @__PURE__ */ Object.create(null), t;
963
1033
  }
964
- function Ws(t, e) {
965
- const s = O.create(t);
966
- return Js(s, e);
1034
+ function ar(t, e) {
1035
+ const s = L.create(t);
1036
+ return lr(s, e);
967
1037
  }
968
- function Js(t, e) {
969
- const s = e ?? zs();
970
- return bt(s), qs(t, s), s;
1038
+ function lr(t, e) {
1039
+ const s = e ?? or();
1040
+ return Pt(s), Ir(t, s), s;
971
1041
  }
972
- function qs(t, e) {
1042
+ function Ir(t, e) {
973
1043
  let s;
974
1044
  for (; (s = t.next()) !== null; )
975
1045
  switch (s.fieldId) {
976
- case bs: {
1046
+ case $s: {
977
1047
  if (s.isNull) throw new Error();
978
1048
  e.FirstUserId = s.asString();
979
1049
  break;
980
1050
  }
981
- case ps: {
1051
+ case Ks: {
982
1052
  if (s.isNull) throw new Error();
983
- e.Clients = Zs(s.asDictionary());
1053
+ e.Clients = Er(s.asDictionary());
984
1054
  break;
985
1055
  }
986
- case Fs: {
1056
+ case js: {
987
1057
  if (s.isNull) throw new Error();
988
- e.TrackingStreams = tr(s.asDictionary());
1058
+ e.TrackingStreams = _r(s.asDictionary());
989
1059
  break;
990
1060
  }
991
- case vs: {
1061
+ case Xs: {
992
1062
  if (s.isNull) throw new Error();
993
1063
  e.ChannelId = s.asString();
994
1064
  break;
995
1065
  }
996
- case Ms: {
1066
+ case zs: {
997
1067
  if (s.isNull) throw new Error();
998
1068
  e.SessionId = s.asString();
999
1069
  break;
1000
1070
  }
1001
- case Vs: {
1071
+ case Ws: {
1002
1072
  if (s.isNull) throw new Error();
1003
1073
  e.ChannelUrl = s.asString();
1004
1074
  break;
1005
1075
  }
1006
- case ks: {
1076
+ case Js: {
1007
1077
  if (s.isNull) throw new Error();
1008
1078
  e.ChannelName = s.asString();
1009
1079
  break;
1010
1080
  }
1011
- case Gs: {
1081
+ case qs: {
1012
1082
  if (s.isNull) throw new Error();
1013
1083
  e.OrganisationName = s.asString();
1014
1084
  break;
1015
1085
  }
1016
- case Bs: {
1086
+ case Qs: {
1017
1087
  if (s.isNull) throw new Error();
1018
- e.Functions = er(s.asDictionary());
1088
+ e.Functions = fr(s.asDictionary());
1019
1089
  break;
1020
1090
  }
1021
- case xs: {
1091
+ case Zs: {
1022
1092
  if (s.isNull) throw new Error();
1023
- e.UIStreams = sr(s.asDictionary());
1093
+ e.UIStreams = hr(s.asDictionary());
1024
1094
  break;
1025
1095
  }
1026
- case Hs: {
1096
+ case tr: {
1027
1097
  if (s.isNull) throw new Error();
1028
1098
  e.SpaceId = s.asString();
1029
1099
  break;
1030
1100
  }
1031
- case Ys: {
1101
+ case er: {
1032
1102
  if (s.isNull) throw new Error();
1033
1103
  e.PrimaryUserId = s.asString();
1034
1104
  break;
1035
1105
  }
1036
- case Ks: {
1106
+ case sr: {
1037
1107
  if (s.isNull) throw new Error();
1038
1108
  e.ChannelInstanceId = s.asString();
1039
1109
  break;
1040
1110
  }
1041
- case $s: {
1111
+ case rr: {
1042
1112
  if (s.isNull) throw new Error();
1043
- e.AudioStreams = rr(s.asDictionary());
1113
+ e.AudioStreams = ur(s.asDictionary());
1044
1114
  break;
1045
1115
  }
1046
- case js: {
1116
+ case nr: {
1047
1117
  if (s.isNull) throw new Error();
1048
- e.VideoStreams = nr(s.asDictionary());
1118
+ e.VideoStreams = Tr(s.asDictionary());
1049
1119
  break;
1050
1120
  }
1051
- case Xs: {
1121
+ case ir: {
1052
1122
  if (s.isNull) throw new Error();
1053
1123
  e.SpaceName = s.asString();
1054
1124
  break;
1055
1125
  }
1056
1126
  }
1057
1127
  }
1058
- function Qs(t, e) {
1059
- const s = J(t, Ps, gs);
1060
- return Ws(s, e);
1128
+ function cr(t, e) {
1129
+ const s = $(t, Ys, Hs);
1130
+ return ar(s, e);
1061
1131
  }
1062
- function Zs(t) {
1132
+ function Er(t) {
1063
1133
  const e = /* @__PURE__ */ Object.create(null);
1064
1134
  let s;
1065
1135
  for (; (s = t.next()) !== null; ) {
1066
1136
  const r = s.key.asInt32();
1067
- e[r] = Ge(s.value.asObject());
1137
+ e[r] = ze(s.value.asObject());
1068
1138
  }
1069
1139
  return e;
1070
1140
  }
1071
- function tr(t) {
1141
+ function _r(t) {
1072
1142
  const e = /* @__PURE__ */ Object.create(null);
1073
1143
  let s;
1074
1144
  for (; (s = t.next()) !== null; ) {
1075
1145
  const r = s.key.asString();
1076
- e[r] = br(s.value.asObject());
1146
+ e[r] = $r(s.value.asObject());
1077
1147
  }
1078
1148
  return e;
1079
1149
  }
1080
- function er(t) {
1150
+ function fr(t) {
1081
1151
  const e = /* @__PURE__ */ Object.create(null);
1082
1152
  let s;
1083
1153
  for (; (s = t.next()) !== null; ) {
1084
1154
  const r = s.key.asInt32();
1085
- e[r] = ir(s.value.asArray());
1155
+ e[r] = Nr(s.value.asArray());
1086
1156
  }
1087
1157
  return e;
1088
1158
  }
1089
- function sr(t) {
1159
+ function hr(t) {
1090
1160
  const e = /* @__PURE__ */ Object.create(null);
1091
1161
  let s;
1092
1162
  for (; (s = t.next()) !== null; ) {
1093
1163
  const r = s.key.asString();
1094
- e[r] = Er(s.value.asObject());
1164
+ e[r] = Cr(s.value.asObject());
1095
1165
  }
1096
1166
  return e;
1097
1167
  }
1098
- function rr(t) {
1168
+ function ur(t) {
1099
1169
  const e = /* @__PURE__ */ Object.create(null);
1100
1170
  let s;
1101
1171
  for (; (s = t.next()) !== null; ) {
1102
1172
  const r = s.key.asString();
1103
- e[r] = Ar(s.value.asObject());
1173
+ e[r] = Or(s.value.asObject());
1104
1174
  }
1105
1175
  return e;
1106
1176
  }
1107
- function nr(t) {
1177
+ function Tr(t) {
1108
1178
  const e = /* @__PURE__ */ Object.create(null);
1109
1179
  let s;
1110
1180
  for (; (s = t.next()) !== null; ) {
1111
1181
  const r = s.key.asString();
1112
- e[r] = Dr(s.value.asObject());
1182
+ e[r] = kr(s.value.asObject());
1113
1183
  }
1114
1184
  return e;
1115
1185
  }
1116
- function ir(t) {
1186
+ function Nr(t) {
1117
1187
  const e = [];
1118
1188
  let s;
1119
1189
  for (; (s = t.next()) !== null; )
1120
- e.push(ts(s.asObject()));
1190
+ e.push(Is(s.asObject()));
1121
1191
  return e;
1122
1192
  }
1123
- const or = 161083277, ar = 325678206, lr = 3469892363, Ir = 3645544153;
1124
- function cr(t) {
1193
+ const Ar = 161083277, dr = 325678206, Sr = 3469892363, yr = 3645544153;
1194
+ function wr(t) {
1125
1195
  const e = {};
1126
- return pt(e), e;
1196
+ return bt(e), e;
1127
1197
  }
1128
- function pt(t) {
1198
+ function bt(t) {
1129
1199
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
1130
1200
  }
1131
- function Er(t, e) {
1132
- const s = e ?? cr();
1133
- return pt(s), _r(t, s), s;
1201
+ function Cr(t, e) {
1202
+ const s = e ?? wr();
1203
+ return bt(s), Dr(t, s), s;
1134
1204
  }
1135
- function _r(t, e) {
1205
+ function Dr(t, e) {
1136
1206
  let s;
1137
1207
  for (; (s = t.next()) !== null; )
1138
1208
  switch (s.fieldId) {
1139
- case or: {
1209
+ case Ar: {
1140
1210
  if (s.isNull) throw new Error();
1141
1211
  e.StreamId = s.asString();
1142
1212
  break;
1143
1213
  }
1144
- case ar: {
1214
+ case dr: {
1145
1215
  if (s.isNull) throw new Error();
1146
1216
  e.ClientSessionId = s.asInt32();
1147
1217
  break;
1148
1218
  }
1149
- case lr: {
1219
+ case Sr: {
1150
1220
  if (s.isNull) throw new Error();
1151
1221
  e.TrackId = s.asInt32();
1152
1222
  break;
1153
1223
  }
1154
- case Ir: {
1224
+ case yr: {
1155
1225
  if (s.isNull) throw new Error();
1156
- e.Info = Cs(s.asObject());
1226
+ e.Info = Ps(s.asObject());
1157
1227
  break;
1158
1228
  }
1159
1229
  }
1160
1230
  }
1161
- const fr = 161083277, hr = 325678206, ur = 3469892363, Tr = 3645544153;
1162
- function Nr(t) {
1231
+ const Ur = 161083277, Rr = 325678206, mr = 3469892363, Lr = 3645544153;
1232
+ function gr(t) {
1163
1233
  const e = {};
1164
1234
  return Ft(e), e;
1165
1235
  }
1166
1236
  function Ft(t) {
1167
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = yt(), t;
1237
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = dt(), t;
1168
1238
  }
1169
- function Ar(t, e) {
1170
- const s = e ?? Nr();
1171
- return Ft(s), Sr(t, s), s;
1239
+ function Or(t, e) {
1240
+ const s = e ?? gr();
1241
+ return Ft(s), Pr(t, s), s;
1172
1242
  }
1173
- function Sr(t, e) {
1243
+ function Pr(t, e) {
1174
1244
  let s;
1175
1245
  for (; (s = t.next()) !== null; )
1176
1246
  switch (s.fieldId) {
1177
- case fr: {
1247
+ case Ur: {
1178
1248
  if (s.isNull) throw new Error();
1179
1249
  e.StreamId = s.asString();
1180
1250
  break;
1181
1251
  }
1182
- case hr: {
1252
+ case Rr: {
1183
1253
  if (s.isNull) throw new Error();
1184
1254
  e.ClientSessionId = s.asInt32();
1185
1255
  break;
1186
1256
  }
1187
- case ur: {
1257
+ case mr: {
1188
1258
  if (s.isNull) throw new Error();
1189
1259
  e.TrackId = s.asInt32();
1190
1260
  break;
1191
1261
  }
1192
- case Tr: {
1262
+ case Lr: {
1193
1263
  if (s.isNull) throw new Error();
1194
- e.Info = _e(s.asObject());
1264
+ e.Info = fe(s.asObject());
1195
1265
  break;
1196
1266
  }
1197
1267
  }
1198
1268
  }
1199
- const dr = 161083277, yr = 325678206, Cr = 3469892363, wr = 3645544153;
1200
- function Ur(t) {
1269
+ const br = 161083277, Fr = 325678206, pr = 3469892363, vr = 3645544153;
1270
+ function Mr(t) {
1201
1271
  const e = {};
1202
- return vt(e), e;
1272
+ return pt(e), e;
1203
1273
  }
1204
- function vt(t) {
1274
+ function pt(t) {
1205
1275
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gt(), t;
1206
1276
  }
1207
- function Dr(t, e) {
1208
- const s = e ?? Ur();
1209
- return vt(s), Rr(t, s), s;
1277
+ function kr(t, e) {
1278
+ const s = e ?? Mr();
1279
+ return pt(s), Vr(t, s), s;
1210
1280
  }
1211
- function Rr(t, e) {
1281
+ function Vr(t, e) {
1212
1282
  let s;
1213
1283
  for (; (s = t.next()) !== null; )
1214
1284
  switch (s.fieldId) {
1215
- case dr: {
1285
+ case br: {
1216
1286
  if (s.isNull) throw new Error();
1217
1287
  e.StreamId = s.asString();
1218
1288
  break;
1219
1289
  }
1220
- case yr: {
1290
+ case Fr: {
1221
1291
  if (s.isNull) throw new Error();
1222
1292
  e.ClientSessionId = s.asInt32();
1223
1293
  break;
1224
1294
  }
1225
- case Cr: {
1295
+ case pr: {
1226
1296
  if (s.isNull) throw new Error();
1227
1297
  e.TrackId = s.asInt32();
1228
1298
  break;
1229
1299
  }
1230
- case wr: {
1300
+ case vr: {
1231
1301
  if (s.isNull) throw new Error();
1232
- e.Info = ms(s.asObject());
1302
+ e.Info = Bs(s.asObject());
1233
1303
  break;
1234
1304
  }
1235
1305
  }
1236
1306
  }
1237
- const Lr = 161083277, mr = 325678206, Or = 3469892363, gr = 3645544153;
1238
- function Pr(t) {
1307
+ const Gr = 161083277, Br = 325678206, xr = 3469892363, Hr = 3645544153;
1308
+ function Yr(t) {
1239
1309
  const e = {};
1240
- return Mt(e), e;
1310
+ return vt(e), e;
1241
1311
  }
1242
- function Mt(t) {
1243
- return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Rt(), t;
1312
+ function vt(t) {
1313
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Ut(), t;
1244
1314
  }
1245
- function br(t, e) {
1246
- const s = e ?? Pr();
1247
- return Mt(s), pr(t, s), s;
1315
+ function $r(t, e) {
1316
+ const s = e ?? Yr();
1317
+ return vt(s), Kr(t, s), s;
1248
1318
  }
1249
- function pr(t, e) {
1319
+ function Kr(t, e) {
1250
1320
  let s;
1251
1321
  for (; (s = t.next()) !== null; )
1252
1322
  switch (s.fieldId) {
1253
- case Lr: {
1323
+ case Gr: {
1254
1324
  if (s.isNull) throw new Error();
1255
1325
  e.StreamId = s.asString();
1256
1326
  break;
1257
1327
  }
1258
- case mr: {
1328
+ case Br: {
1259
1329
  if (s.isNull) throw new Error();
1260
1330
  e.ClientSessionId = s.asInt32();
1261
1331
  break;
1262
1332
  }
1263
- case Or: {
1333
+ case xr: {
1264
1334
  if (s.isNull) throw new Error();
1265
1335
  e.TrackId = s.asInt32();
1266
1336
  break;
1267
1337
  }
1268
- case gr: {
1338
+ case Hr: {
1269
1339
  if (s.isNull) throw new Error();
1270
- e.Info = As(s.asObject());
1340
+ e.Info = ms(s.asObject());
1271
1341
  break;
1272
1342
  }
1273
1343
  }
1274
1344
  }
1275
- const Fr = 1405462580, vr = 2968276160;
1276
- function Mr(t) {
1345
+ const jr = 1405462580, Xr = 2968276160;
1346
+ function zr(t) {
1277
1347
  const e = {};
1278
- return Vt(e), e;
1348
+ return Mt(e), e;
1279
1349
  }
1280
- function Vt(t) {
1350
+ function Mt(t) {
1281
1351
  return t.MimeType = "", t.Value = new Uint8Array(0), t;
1282
1352
  }
1283
- function Vr(t, e) {
1284
- const s = e ?? Mr();
1285
- return Vt(s), kr(t, s), s;
1353
+ function Wr(t, e) {
1354
+ const s = e ?? zr();
1355
+ return Mt(s), Jr(t, s), s;
1286
1356
  }
1287
- function kr(t, e) {
1357
+ function Jr(t, e) {
1288
1358
  let s;
1289
1359
  for (; (s = t.next()) !== null; )
1290
1360
  switch (s.fieldId) {
1291
- case Fr: {
1361
+ case jr: {
1292
1362
  if (s.isNull) throw new Error();
1293
1363
  e.Value = s.asBinary();
1294
1364
  break;
1295
1365
  }
1296
- case vr: {
1366
+ case Xr: {
1297
1367
  if (s.isNull) throw new Error();
1298
1368
  e.MimeType = s.asString();
1299
1369
  break;
1300
1370
  }
1301
1371
  }
1302
1372
  }
1303
- const Gr = 1, Br = 2097188, xr = 979822885, Hr = 2374537704;
1304
- function Yr(t) {
1373
+ const qr = 1, Qr = 2097188, Zr = 979822885, tn = 2374537704;
1374
+ function en(t) {
1305
1375
  const e = {};
1306
1376
  return kt(e), e;
1307
1377
  }
1308
1378
  function kt(t) {
1309
1379
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1310
1380
  }
1311
- function Kr(t, e) {
1312
- const s = O.create(t);
1313
- return $r(s, e);
1381
+ function sn(t, e) {
1382
+ const s = L.create(t);
1383
+ return rn(s, e);
1314
1384
  }
1315
- function $r(t, e) {
1316
- const s = e ?? Yr();
1317
- return kt(s), jr(t, s), s;
1385
+ function rn(t, e) {
1386
+ const s = e ?? en();
1387
+ return kt(s), nn(t, s), s;
1318
1388
  }
1319
- function jr(t, e) {
1389
+ function nn(t, e) {
1320
1390
  let s;
1321
1391
  for (; (s = t.next()) !== null; )
1322
1392
  switch (s.fieldId) {
1323
- case xr: {
1393
+ case Zr: {
1324
1394
  if (s.isNull) throw new Error();
1325
1395
  e.StyleId = s.asString();
1326
1396
  break;
1327
1397
  }
1328
- case Hr: {
1398
+ case tn: {
1329
1399
  if (s.isNull) throw new Error();
1330
- e.Style = zr(s.asDictionary());
1400
+ e.Style = an(s.asDictionary());
1331
1401
  break;
1332
1402
  }
1333
1403
  }
1334
1404
  }
1335
- function Xr(t, e) {
1336
- const s = J(t, Br, Gr);
1337
- return Kr(s, e);
1405
+ function on(t, e) {
1406
+ const s = $(t, Qr, qr);
1407
+ return sn(s, e);
1338
1408
  }
1339
- function zr(t) {
1409
+ function an(t) {
1340
1410
  const e = /* @__PURE__ */ Object.create(null);
1341
1411
  let s;
1342
1412
  for (; (s = t.next()) !== null; ) {
@@ -1345,73 +1415,73 @@ function zr(t) {
1345
1415
  }
1346
1416
  return e;
1347
1417
  }
1348
- const Wr = 1, Jr = 2097192, qr = 2136687806;
1349
- function Qr(t) {
1418
+ const ln = 1, In = 2097192, cn = 2136687806;
1419
+ function En(t) {
1350
1420
  const e = {};
1351
- return Gt(e), e;
1421
+ return Vt(e), e;
1352
1422
  }
1353
- function Gt(t) {
1423
+ function Vt(t) {
1354
1424
  return t.Styles = [], t;
1355
1425
  }
1356
- function Zr(t, e) {
1357
- const s = O.create(t);
1358
- return tn(s, e);
1426
+ function _n(t, e) {
1427
+ const s = L.create(t);
1428
+ return fn(s, e);
1359
1429
  }
1360
- function tn(t, e) {
1361
- const s = e ?? Qr();
1362
- return Gt(s), en(t, s), s;
1430
+ function fn(t, e) {
1431
+ const s = e ?? En();
1432
+ return Vt(s), hn(t, s), s;
1363
1433
  }
1364
- function en(t, e) {
1434
+ function hn(t, e) {
1365
1435
  let s;
1366
1436
  for (; (s = t.next()) !== null; )
1367
1437
  switch (s.fieldId) {
1368
- case qr: {
1438
+ case cn: {
1369
1439
  if (s.isNull) throw new Error();
1370
- e.Styles = rn(s.asArray());
1440
+ e.Styles = Tn(s.asArray());
1371
1441
  break;
1372
1442
  }
1373
1443
  }
1374
1444
  }
1375
- function sn(t, e) {
1376
- const s = J(t, Jr, Wr);
1377
- return Zr(s, e);
1445
+ function un(t, e) {
1446
+ const s = $(t, In, ln);
1447
+ return _n(s, e);
1378
1448
  }
1379
- function rn(t) {
1449
+ function Tn(t) {
1380
1450
  const e = [];
1381
1451
  let s;
1382
1452
  for (; (s = t.next()) !== null; )
1383
- e.push(ln(s.asObject()));
1453
+ e.push(Sn(s.asObject()));
1384
1454
  return e;
1385
1455
  }
1386
- const nn = 979822885, on = 2374537704;
1387
- function an(t) {
1456
+ const Nn = 979822885, An = 2374537704;
1457
+ function dn(t) {
1388
1458
  const e = {};
1389
- return Bt(e), e;
1459
+ return Gt(e), e;
1390
1460
  }
1391
- function Bt(t) {
1461
+ function Gt(t) {
1392
1462
  return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1393
1463
  }
1394
- function ln(t, e) {
1395
- const s = e ?? an();
1396
- return Bt(s), In(t, s), s;
1464
+ function Sn(t, e) {
1465
+ const s = e ?? dn();
1466
+ return Gt(s), yn(t, s), s;
1397
1467
  }
1398
- function In(t, e) {
1468
+ function yn(t, e) {
1399
1469
  let s;
1400
1470
  for (; (s = t.next()) !== null; )
1401
1471
  switch (s.fieldId) {
1402
- case nn: {
1472
+ case Nn: {
1403
1473
  if (s.isNull) throw new Error();
1404
1474
  e.StyleId = s.asString();
1405
1475
  break;
1406
1476
  }
1407
- case on: {
1477
+ case An: {
1408
1478
  if (s.isNull) throw new Error();
1409
- e.Style = cn(s.asDictionary());
1479
+ e.Style = wn(s.asDictionary());
1410
1480
  break;
1411
1481
  }
1412
1482
  }
1413
1483
  }
1414
- function cn(t) {
1484
+ function wn(t) {
1415
1485
  const e = /* @__PURE__ */ Object.create(null);
1416
1486
  let s;
1417
1487
  for (; (s = t.next()) !== null; ) {
@@ -1420,52 +1490,90 @@ function cn(t) {
1420
1490
  }
1421
1491
  return e;
1422
1492
  }
1423
- const En = 1, _n = 2097190, fn = 425183262, hn = 653781469;
1424
- function un(t) {
1493
+ const Cn = 1, Dn = 2097193, Un = 1415642792;
1494
+ function Rn(t) {
1495
+ const e = {};
1496
+ return Bt(e), e;
1497
+ }
1498
+ function Bt(t) {
1499
+ return t.StyleIds = [], t;
1500
+ }
1501
+ function mn(t, e) {
1502
+ const s = L.create(t);
1503
+ return Ln(s, e);
1504
+ }
1505
+ function Ln(t, e) {
1506
+ const s = e ?? Rn();
1507
+ return Bt(s), gn(t, s), s;
1508
+ }
1509
+ function gn(t, e) {
1510
+ let s;
1511
+ for (; (s = t.next()) !== null; )
1512
+ switch (s.fieldId) {
1513
+ case Un: {
1514
+ if (s.isNull) throw new Error();
1515
+ e.StyleIds = Pn(s.asArray());
1516
+ break;
1517
+ }
1518
+ }
1519
+ }
1520
+ function On(t, e) {
1521
+ const s = $(t, Dn, Cn);
1522
+ return mn(s, e);
1523
+ }
1524
+ function Pn(t) {
1525
+ const e = [];
1526
+ let s;
1527
+ for (; (s = t.next()) !== null; )
1528
+ e.push(s.asString());
1529
+ return e;
1530
+ }
1531
+ const bn = 1, Fn = 2097190, pn = 425183262, vn = 653781469;
1532
+ function Mn(t) {
1425
1533
  const e = {};
1426
1534
  return xt(e), e;
1427
1535
  }
1428
1536
  function xt(t) {
1429
1537
  return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
1430
1538
  }
1431
- function Tn(t, e) {
1432
- const s = O.create(t);
1433
- return Nn(s, e);
1539
+ function kn(t, e) {
1540
+ const s = L.create(t);
1541
+ return Vn(s, e);
1434
1542
  }
1435
- function Nn(t, e) {
1436
- const s = e ?? un();
1437
- return xt(s), An(t, s), s;
1543
+ function Vn(t, e) {
1544
+ const s = e ?? Mn();
1545
+ return xt(s), Gn(t, s), s;
1438
1546
  }
1439
- function An(t, e) {
1547
+ function Gn(t, e) {
1440
1548
  let s;
1441
1549
  for (; (s = t.next()) !== null; )
1442
1550
  switch (s.fieldId) {
1443
- case fn: {
1551
+ case pn: {
1444
1552
  if (s.isNull) throw new Error();
1445
1553
  e.Json = s.asString();
1446
1554
  break;
1447
1555
  }
1448
- case hn: {
1556
+ case vn: {
1449
1557
  if (s.isNull) throw new Error();
1450
- e.Payloads = dn(s.asDictionary());
1558
+ e.Payloads = xn(s.asDictionary());
1451
1559
  break;
1452
1560
  }
1453
1561
  }
1454
1562
  }
1455
- function Sn(t, e) {
1456
- const s = J(t, _n, En);
1457
- return Tn(s, e);
1563
+ function Bn(t, e) {
1564
+ const s = $(t, Fn, bn);
1565
+ return kn(s, e);
1458
1566
  }
1459
- function dn(t) {
1567
+ function xn(t) {
1460
1568
  const e = /* @__PURE__ */ Object.create(null);
1461
1569
  let s;
1462
1570
  for (; (s = t.next()) !== null; ) {
1463
1571
  const r = s.key.asString();
1464
- e[r] = Vr(s.value.asObject());
1572
+ e[r] = Wr(s.value.asObject());
1465
1573
  }
1466
1574
  return e;
1467
1575
  }
1468
- function C(t) {
1576
+ function y(t) {
1469
1577
  return typeof t == "object" && t !== null && !Array.isArray(t);
1470
1578
  }
1471
1579
  function Ht(t) {
@@ -1504,25 +1612,25 @@ function ot(t, e) {
1504
1612
  throw new Error(`Invalid or missing node type for ${s}`);
1505
1613
  let a = {};
1506
1614
  if (n != null) {
1507
- if (!C(n))
1615
+ if (!y(n))
1508
1616
  throw new Error(`Invalid props for node ${s}`);
1509
1617
  a = Ht(n);
1510
1618
  }
1511
- let l = [];
1512
- Array.isArray(i) && (l = i.map(
1619
+ let I = [];
1620
+ Array.isArray(i) && (I = i.map(
1513
1621
  (c, E) => ot(c ?? {}, `${e}.children[${E}]`)
1514
1622
  ));
1515
- const I = Yt(o, e, s, !1);
1623
+ const l = Yt(o, e, s, !1);
1516
1624
  return {
1517
1625
  id: s,
1518
1626
  type: r,
1519
1627
  props: a,
1520
- children: l,
1521
- styleIds: I ?? []
1628
+ children: I,
1629
+ styleIds: l ?? []
1522
1630
  };
1523
1631
  }
1524
- function yn(t, e) {
1525
- if (!C(t))
1632
+ function Hn(t, e) {
1633
+ if (!y(t))
1526
1634
  throw new Error(`Invalid text delta at ${e}`);
1527
1635
  const s = t.NodeId, r = t.PropertyName, n = t.Start, i = t.End, o = t.InsertedText;
1528
1636
  if (typeof s != "string" || s.length === 0)
@@ -1548,65 +1656,97 @@ function yn(t, e) {
1548
1656
  insertedText: o
1549
1657
  };
1550
1658
  }
1551
- function Kt(t, e) {
1552
- if (!C(t))
1553
- throw new Error(`Invalid UI diff node at ${e}`);
1554
- const s = t.Id, r = t.Type, n = t.StyleIds;
1659
+ function Yn(t, e) {
1660
+ if (!y(t))
1661
+ throw new Error(`Invalid child insert at ${e}`);
1662
+ const s = t.Index, r = t.Node;
1663
+ if (typeof s != "number" || !Number.isFinite(s))
1664
+ throw new Error(`Invalid child insert index at ${e}`);
1665
+ if (!y(r))
1666
+ throw new Error(`Invalid child insert node at ${e}`);
1667
+ return {
1668
+ index: s,
1669
+ node: ot(r, `${e}.node`)
1670
+ };
1671
+ }
1672
+ function $n(t, e) {
1673
+ if (!y(t))
1674
+ throw new Error(`Invalid child move at ${e}`);
1675
+ const s = t.NodeId, r = t.FromIndex, n = t.ToIndex;
1555
1676
  if (typeof s != "string" || s.length === 0)
1556
- throw new Error(`Invalid diff id at ${e}`);
1557
- if (typeof r != "string" || r.length === 0)
1558
- throw new Error(`Invalid diff type for ${s}`);
1559
- const i = Array.isArray(t.Added) ? t.Added.map(
1560
- (E, _) => ot(E ?? {}, `${e}.added[${_}]`)
1561
- ) : [], o = [];
1562
- Array.isArray(t.Removed) && t.Removed.forEach((E, _) => {
1563
- if (typeof E == "string") {
1564
- o.push(E);
1565
- return;
1566
- }
1567
- if (C(E) && typeof E.Id == "string") {
1568
- o.push(E.Id);
1569
- return;
1570
- }
1571
- throw new Error(`Invalid removed node at ${e}.removed[${_}]`);
1572
- });
1573
- const a = Array.isArray(t.Updated) ? t.Updated.map(
1574
- (E, _) => Kt(E ?? {}, `${e}.updated[${_}]`)
1575
- ) : [], l = /* @__PURE__ */ new Map();
1576
- if (C(t.ChangedProps))
1577
- for (const [E, _] of Object.entries(t.ChangedProps)) {
1578
- if (!C(_))
1677
+ throw new Error(`Invalid child move nodeId at ${e}`);
1678
+ if (typeof r != "number" || !Number.isFinite(r))
1679
+ throw new Error(`Invalid child move fromIndex at ${e}`);
1680
+ if (typeof n != "number" || !Number.isFinite(n))
1681
+ throw new Error(`Invalid child move toIndex at ${e}`);
1682
+ return {
1683
+ nodeId: s,
1684
+ fromIndex: r,
1685
+ toIndex: n
1686
+ };
1687
+ }
1688
+ function Kn(t, e) {
1689
+ if (!y(t))
1690
+ throw new Error(`Invalid child remove at ${e}`);
1691
+ const s = t.NodeId, r = t.Index;
1692
+ if (typeof s != "string" || s.length === 0)
1693
+ throw new Error(`Invalid child remove nodeId at ${e}`);
1694
+ if (typeof r != "number" || !Number.isFinite(r))
1695
+ throw new Error(`Invalid child remove index at ${e}`);
1696
+ return {
1697
+ nodeId: s,
1698
+ index: r
1699
+ };
1700
+ }
1701
+ function jn(t, e) {
1702
+ if (!y(t))
1703
+ throw new Error(`Invalid node change at ${e}`);
1704
+ const s = t.nodeId;
1705
+ if (typeof s != "string" || s.length === 0)
1706
+ throw new Error(`Invalid node change nodeId at ${e}`);
1707
+ const r = Array.isArray(t.inserts) ? t.inserts.map(
1708
+ (c, E) => Yn(c ?? {}, `${e}.inserts[${E}]`)
1709
+ ) : void 0, n = Array.isArray(t.moves) ? t.moves.map(
1710
+ (c, E) => $n(c ?? {}, `${e}.moves[${E}]`)
1711
+ ) : void 0, i = Array.isArray(t.removals) ? t.removals.map(
1712
+ (c, E) => Kn(c ?? {}, `${e}.removals[${E}]`)
1713
+ ) : void 0;
1714
+ let o;
1715
+ if (y(t.changedProps)) {
1716
+ o = /* @__PURE__ */ new Map();
1717
+ for (const [c, E] of Object.entries(t.changedProps)) {
1718
+ if (!y(E))
1579
1719
  continue;
1580
- const h = _.New;
1581
- h === void 0 ? l.set(E, void 0) : C(h) ? l.set(E, Ht(h)) : l.set(E, h);
1720
+ const _ = E.New;
1721
+ _ === void 0 ? o.set(c, void 0) : y(_) ? o.set(c, Ht(_)) : o.set(c, _);
1582
1722
  }
1583
- const I = Array.isArray(t.TextUpdates) ? t.TextUpdates.map(
1584
- (E, _) => yn(E ?? {}, `${e}.textUpdates[${_}]`)
1585
- ) : [], c = Yt(n, e, s, !0);
1723
+ }
1724
+ const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
1725
+ (c, E) => Hn(c ?? {}, `${e}.textUpdates[${E}]`)
1726
+ ) : void 0, I = t.styleIds, l = I !== void 0 ? Yt(I, e, s, !0) : void 0;
1586
1727
  return {
1587
- id: s,
1588
- type: r,
1589
- added: i,
1590
- removed: o,
1591
- updated: a,
1592
- changedProps: l,
1593
- textUpdates: I,
1594
- ...c !== void 0 ? { styleIds: c } : {}
1728
+ nodeId: s,
1729
+ ...r && r.length > 0 ? { inserts: r } : {},
1730
+ ...n && n.length > 0 ? { moves: n } : {},
1731
+ ...i && i.length > 0 ? { removals: i } : {},
1732
+ ...o && o.size > 0 ? { changedProps: o } : {},
1733
+ ...a && a.length > 0 ? { textUpdates: a } : {},
1734
+ ...l !== void 0 ? { styleIds: l } : {}
1595
1735
  };
1596
1736
  }
1597
- function Cn(t) {
1737
+ function Xn(t) {
1598
1738
  const e = /* @__PURE__ */ new Map();
1599
1739
  for (const [s, r] of Object.entries(t))
1600
1740
  e.set(s, r);
1601
1741
  return e;
1602
1742
  }
1603
- function wn(t, e, s) {
1743
+ function zn(t, e, s) {
1604
1744
  if (!t || typeof t != "object")
1605
- throw new w("UI update graph is missing");
1745
+ throw new D("UI update graph is missing");
1606
1746
  const r = ot(t, "graph");
1607
1747
  if (r.type !== "root")
1608
- throw new w('UI update root element must have type "root"');
1609
- const n = Dn(r.props, e);
1748
+ throw new D('UI update root element must have type "root"');
1749
+ const n = Jn(r.props, e);
1610
1750
  return {
1611
1751
  type: "full",
1612
1752
  version: s,
@@ -1614,55 +1754,57 @@ function wn(t, e, s) {
1614
1754
  metadata: n
1615
1755
  };
1616
1756
  }
1617
- function Un(t, e, s) {
1618
- if (!t || typeof t != "object")
1619
- throw new w("UI diff payload is missing");
1620
- if (!C(e))
1621
- throw new w("UI diff metadata must be an object");
1757
+ function Wn(t, e, s) {
1758
+ if (!Array.isArray(t))
1759
+ throw new D("UI diff changes must be an array");
1760
+ if (!y(e))
1761
+ throw new D("UI diff metadata must be an object");
1622
1762
  const r = e.viewId;
1623
1763
  if (typeof r != "string" || r.length === 0)
1624
- throw new w("UI diff metadata is missing viewId");
1625
- const n = Kt(t, "diff"), i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, l = Q(e.optimisticPatch), I = Z(e.optimisticReconcile), c = {
1764
+ throw new D("UI diff metadata is missing viewId");
1765
+ const n = t.map(
1766
+ (E, _) => jn(E ?? {}, `changes[${_}]`)
1767
+ ), i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, o = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, a = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, I = Q(e.optimisticPatch), l = Z(e.optimisticReconcile), c = {
1626
1768
  viewId: r,
1627
1769
  ...i !== void 0 ? { optimisticActionId: i } : {},
1628
1770
  ...o !== void 0 ? { isOptimistic: o } : {},
1629
1771
  ...a !== void 0 ? { isUpdate: a } : {},
1630
- ...l ? { optimisticPatch: l } : {},
1631
- ...I ? { optimisticReconcile: I } : {}
1772
+ ...I ? { optimisticPatch: I } : {},
1773
+ ...l ? { optimisticReconcile: l } : {}
1632
1774
  };
1633
1775
  return {
1634
1776
  type: "diff",
1635
1777
  version: s,
1636
- diff: n,
1778
+ changes: n,
1637
1779
  metadata: c
1638
1780
  };
1639
1781
  }
1640
- function Dn(t, e) {
1782
+ function Jn(t, e) {
1641
1783
  const s = t.viewId;
1642
1784
  if (typeof s != "string" || s.length === 0)
1643
- throw new w("UI update root is missing viewId");
1644
- let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), l = Z(t.optimisticReconcile);
1645
- return C(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (l = Z(e.optimisticReconcile))), {
1785
+ throw new D("UI update root is missing viewId");
1786
+ let r = s, n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, i = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = Q(t.optimisticPatch), I = Z(t.optimisticReconcile);
1787
+ return y(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (n = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (i = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = Q(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (I = Z(e.optimisticReconcile))), {
1646
1788
  viewId: r,
1647
1789
  ...n !== void 0 ? { optimisticActionId: n } : {},
1648
1790
  ...i !== void 0 ? { isOptimistic: i } : {},
1649
1791
  ...o !== void 0 ? { isUpdate: o } : {},
1650
1792
  ...a ? { optimisticPatch: a } : {},
1651
- ...l ? { optimisticReconcile: l } : {}
1793
+ ...I ? { optimisticReconcile: I } : {}
1652
1794
  };
1653
1795
  }
1654
1796
  function Q(t) {
1655
- if (!C(t))
1797
+ if (!y(t))
1656
1798
  return;
1657
1799
  const e = t, s = e.id, r = e.actionId, n = e.ordinal, i = e.baseVersion, o = e.supersedes;
1658
1800
  if (typeof s != "string" || s.length === 0 || typeof r != "string" || r.length === 0 || typeof n != "number" || !Number.isFinite(n) || typeof i != "number" || !Number.isFinite(i))
1659
1801
  return;
1660
1802
  let a;
1661
1803
  if (Array.isArray(o)) {
1662
- const l = [];
1663
- for (const I of o)
1664
- typeof I == "string" && I.length > 0 && l.push(I);
1665
- a = l;
1804
+ const I = [];
1805
+ for (const l of o)
1806
+ typeof l == "string" && l.length > 0 && I.push(l);
1807
+ a = I;
1666
1808
  }
1667
1809
  return {
1668
1810
  id: s,
@@ -1673,7 +1815,7 @@ function Q(t) {
1673
1815
  };
1674
1816
  }
1675
1817
  function Z(t) {
1676
- if (!C(t))
1818
+ if (!y(t))
1677
1819
  return;
1678
1820
  const e = t, s = e.baseVersion, r = e.drop;
1679
1821
  if (typeof s != "number" || !Number.isFinite(s))
@@ -1690,32 +1832,32 @@ function Z(t) {
1690
1832
  ...n && n.length > 0 ? { drop: n } : {}
1691
1833
  };
1692
1834
  }
1693
- class w extends Error {
1835
+ class D extends Error {
1694
1836
  constructor(e, s) {
1695
1837
  super(e), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
1696
1838
  }
1697
1839
  }
1698
- function Rn(t) {
1840
+ function qn(t) {
1699
1841
  let e;
1700
1842
  try {
1701
1843
  e = JSON.parse(t.Json);
1702
1844
  } catch (o) {
1703
- throw new w("Failed to parse UIUpdate.Json payload", o);
1845
+ throw new D("Failed to parse UIUpdate.Json payload", o);
1704
1846
  }
1705
1847
  if (!e || typeof e != "object")
1706
- throw new w("UI update snapshot must be an object");
1848
+ throw new D("UI update snapshot must be an object");
1707
1849
  const { type: s, version: r } = e;
1708
1850
  if (s !== "full" && s !== "diff")
1709
- throw new w(`Unknown UI update type: ${String(s)}`);
1851
+ throw new D(`Unknown UI update type: ${String(s)}`);
1710
1852
  if (typeof r != "number")
1711
- throw new w("UI update version must be a number");
1712
- const n = s === "full" ? wn(e.graph, e.metadata, r) : Un(e.diff, e.metadata, r), i = t.Payloads ? Cn(t.Payloads) : /* @__PURE__ */ new Map();
1853
+ throw new D("UI update version must be a number");
1854
+ const n = s === "full" ? zn(e.graph, e.metadata, r) : Wn(e.changes, e.metadata, r), i = t.Payloads ? Xn(t.Payloads) : /* @__PURE__ */ new Map();
1713
1855
  return {
1714
1856
  snapshot: n,
1715
1857
  payloads: i
1716
1858
  };
1717
1859
  }
1718
- class Ln {
1860
+ class Qn {
1719
1861
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1720
1862
  cache = /* @__PURE__ */ new Map();
1721
1863
  /**
@@ -1796,7 +1938,7 @@ class Ln {
1796
1938
  return this.cache.size;
1797
1939
  }
1798
1940
  }
1799
- class mn {
1941
+ class Zn {
1800
1942
  views = /* @__PURE__ */ new Map();
1801
1943
  listeners = /* @__PURE__ */ new Set();
1802
1944
  payloads = /* @__PURE__ */ new Map();
@@ -1818,7 +1960,7 @@ class mn {
1818
1960
  patchesDirty = !0;
1819
1961
  payloadsDirty = !0;
1820
1962
  // Handler cache for stable event handlers
1821
- handlerCache = new Ln();
1963
+ handlerCache = new Qn();
1822
1964
  getSortedPatches(e) {
1823
1965
  const s = this.buildPatchCacheKey(e.patches);
1824
1966
  if (e.sortedPatchesCacheKey === s && e.sortedPatchesCache)
@@ -1857,46 +1999,46 @@ class mn {
1857
1999
  const a = s.type === "diff" && n.isUpdate === !0;
1858
2000
  if (s.version < o.version || s.version === o.version && !a)
1859
2001
  return !1;
1860
- let l = !1;
1861
- if (this.rootViewId || (this.rootViewId = i, l = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
2002
+ let I = !1;
2003
+ if (this.rootViewId || (this.rootViewId = i, I = !0, this.structureChanged = !0), n.optimisticReconcile?.drop)
1862
2004
  for (const c of n.optimisticReconcile.drop)
1863
- o.patches.delete(c) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2005
+ o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
1864
2006
  if (n.optimisticPatch?.supersedes)
1865
2007
  for (const c of n.optimisticPatch.supersedes)
1866
- o.patches.delete(c) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
1867
- const I = o.composite ?? o.baseline;
2008
+ o.patches.delete(c) && (I = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2009
+ const l = o.composite ?? o.baseline;
1868
2010
  if (s.type === "full")
1869
- o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, l = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
2011
+ o.baseline = s.root, o.composite = s.root, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version, o.patches.clear(), this.invalidatePatchCache(o), o.version = s.version, I = !0, this.viewsDirty = !0, this.patchesDirty = !0, this.structureChanged = !0, s.root && b(s.root, this.changedNodeIds);
1870
2012
  else if (n.optimisticPatch) {
1871
- if (!I)
2013
+ if (!l)
1872
2014
  return !1;
1873
- const c = X(I, s.diff);
1874
- c !== I && (o.composite = c, l = !0, this.viewsDirty = !0, j(I, c, this.changedNodeIds));
2015
+ const c = J(l, s.changes);
2016
+ c !== l && (o.composite = c, I = !0, this.viewsDirty = !0, X(l, c, this.changedNodeIds));
1875
2017
  const E = n.optimisticPatch, _ = {
1876
2018
  id: E.id,
1877
2019
  actionId: E.actionId,
1878
2020
  ordinal: E.ordinal,
1879
2021
  baseVersion: E.baseVersion,
1880
- diff: s.diff
2022
+ changes: s.changes
1881
2023
  };
1882
- o.patches.set(_.id, _), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = s.version;
2024
+ o.patches.set(_.id, _), this.invalidatePatchCache(o), I = !0, this.patchesDirty = !0, o.version = s.version;
1883
2025
  } else {
1884
- const c = o.baseline ?? I;
2026
+ const c = o.baseline ?? l;
1885
2027
  if (!c)
1886
2028
  return !1;
1887
- const E = X(c, s.diff);
1888
- E !== c ? (o.baseline = E, l = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
2029
+ const E = J(c, s.changes);
2030
+ E !== c ? (o.baseline = E, I = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? s.version;
1889
2031
  let _ = o.baseline ?? E;
1890
- const h = this.getSortedPatches(o);
1891
- for (const N of h) {
1892
- const f = X(_, N.diff);
1893
- f !== _ && (l = !0, this.viewsDirty = !0), _ = f, N.baseVersion = o.baselineVersion;
2032
+ const N = this.getSortedPatches(o);
2033
+ for (const h of N) {
2034
+ const w = J(_, h.changes);
2035
+ w !== _ && (I = !0, this.viewsDirty = !0), _ = w, h.baseVersion = o.baselineVersion;
1894
2036
  }
1895
- o.composite !== _ && (o.composite = _, l = !0, this.viewsDirty = !0), I && _ ? j(I, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
2037
+ o.composite !== _ && (o.composite = _, I = !0, this.viewsDirty = !0), l && _ ? X(l, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = s.version;
1896
2038
  }
1897
2039
  for (const [c, E] of r)
1898
- this.payloads.get(c) !== E && (this.payloads.set(c, E), l = !0, this.payloadsDirty = !0);
1899
- return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
2040
+ this.payloads.get(c) !== E && (this.payloads.set(c, E), I = !0, this.payloadsDirty = !0);
2041
+ return I ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
1900
2042
  }
1901
2043
  replaceFromWire(e) {
1902
2044
  const s = {
@@ -1914,30 +2056,30 @@ class mn {
1914
2056
  if (s !== void 0 && this.snapshot.version !== s)
1915
2057
  return !1;
1916
2058
  let r = !1, n = null, i = null, o = null;
1917
- const a = () => (n || (n = new Map(this.snapshot.views)), n), l = () => (i || (i = new Map(this.snapshot.payloads)), i), I = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2059
+ const a = () => (n || (n = new Map(this.snapshot.views)), n), I = () => (i || (i = new Map(this.snapshot.payloads)), i), l = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
1918
2060
  if (e.deleteViews && e.deleteViews.length > 0)
1919
2061
  for (const _ of e.deleteViews)
1920
2062
  a().delete(_) && (r = !0, this.structureChanged = !0);
1921
2063
  if (e.upsertViews && e.upsertViews.length > 0)
1922
- for (const [_, h] of e.upsertViews) {
1923
- const N = a(), f = N.get(_);
1924
- f !== h && (N.set(_, h), r = !0, f ? j(f, h, this.changedNodeIds) : (b(h, this.changedNodeIds), this.structureChanged = !0));
2064
+ for (const [_, N] of e.upsertViews) {
2065
+ const h = a(), w = h.get(_);
2066
+ w !== N && (h.set(_, N), r = !0, w ? X(w, N, this.changedNodeIds) : (b(N, this.changedNodeIds), this.structureChanged = !0));
1925
2067
  }
1926
2068
  if (e.deletePayloads && e.deletePayloads.length > 0)
1927
2069
  for (const _ of e.deletePayloads)
1928
- l().delete(_) && (r = !0);
2070
+ I().delete(_) && (r = !0);
1929
2071
  if (e.upsertPayloads && e.upsertPayloads.length > 0)
1930
- for (const [_, h] of e.upsertPayloads) {
1931
- const N = l();
1932
- N.get(_) !== h && (N.set(_, h), r = !0);
2072
+ for (const [_, N] of e.upsertPayloads) {
2073
+ const h = I();
2074
+ h.get(_) !== N && (h.set(_, N), r = !0);
1933
2075
  }
1934
2076
  if (e.deleteOptimisticPatchesForViews && e.deleteOptimisticPatchesForViews.length > 0)
1935
2077
  for (const _ of e.deleteOptimisticPatchesForViews)
1936
- I().delete(_) && (r = !0);
2078
+ l().delete(_) && (r = !0);
1937
2079
  if (e.upsertOptimisticPatches && e.upsertOptimisticPatches.length > 0)
1938
- for (const [_, h] of e.upsertOptimisticPatches) {
1939
- const N = I(), f = N.get(_);
1940
- bn(f, h) || (N.set(_, h), r = !0);
2080
+ for (const [_, N] of e.upsertOptimisticPatches) {
2081
+ const h = l(), w = h.get(_);
2082
+ ri(w, N) || (h.set(_, N), r = !0);
1941
2083
  }
1942
2084
  const c = e.rootViewId ?? this.snapshot.rootViewId;
1943
2085
  c !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
@@ -1960,7 +2102,7 @@ class mn {
1960
2102
  (s.rootViewId !== e.rootViewId || s.views.size !== e.views.size) && (this.structureChanged = !0);
1961
2103
  for (const [n, i] of e.views) {
1962
2104
  const o = s.views.get(n);
1963
- o ? j(o, i, this.changedNodeIds) : (b(i, this.changedNodeIds), this.structureChanged = !0);
2105
+ o ? X(o, i, this.changedNodeIds) : (b(i, this.changedNodeIds), this.structureChanged = !0);
1964
2106
  }
1965
2107
  for (const n of this.changedNodeIds)
1966
2108
  this.nodeVersions.set(n, (this.nodeVersions.get(n) ?? 0) + 1);
@@ -2027,14 +2169,14 @@ class mn {
2027
2169
  const i = /* @__PURE__ */ new Map();
2028
2170
  for (const [o, a] of this.views)
2029
2171
  if (a.patches.size > 0) {
2030
- const l = this.getSortedPatches(a);
2172
+ const I = this.getSortedPatches(a);
2031
2173
  i.set(
2032
2174
  o,
2033
- l.map((I) => ({
2034
- id: I.id,
2035
- actionId: I.actionId,
2036
- ordinal: I.ordinal,
2037
- baseVersion: I.baseVersion
2175
+ I.map((l) => ({
2176
+ id: l.id,
2177
+ actionId: l.actionId,
2178
+ ordinal: l.ordinal,
2179
+ baseVersion: l.baseVersion
2038
2180
  }))
2039
2181
  );
2040
2182
  }
@@ -2064,7 +2206,7 @@ class mn {
2064
2206
  }
2065
2207
  }
2066
2208
  }
2067
- class On {
2209
+ class ti {
2068
2210
  streams = /* @__PURE__ */ new Map();
2069
2211
  listeners = /* @__PURE__ */ new Set();
2070
2212
  apply(e, s) {
@@ -2128,66 +2270,88 @@ class On {
2128
2270
  }
2129
2271
  getOrCreateStreamEntry(e) {
2130
2272
  let s = this.streams.get(e);
2131
- return s || (s = { store: new mn() }, this.streams.set(e, s)), s;
2273
+ return s || (s = { store: new Zn() }, this.streams.set(e, s)), s;
2132
2274
  }
2133
2275
  notify(e) {
2134
2276
  for (const s of this.listeners)
2135
2277
  s(e);
2136
2278
  }
2137
2279
  }
2138
- function X(t, e, s) {
2139
- if (t.id !== e.id)
2280
+ function J(t, e, s) {
2281
+ if (e.length === 0)
2140
2282
  return t;
2141
- let r = t, n = !1;
2142
- if (e.textUpdates.length > 0) {
2143
- const f = Fn(t, e.textUpdates);
2144
- r = f.node, n = f.changed;
2145
- }
2146
- let i = !1, o = r.props;
2147
- if (e.changedProps.size > 0)
2148
- for (const [f, y] of e.changedProps.entries()) {
2149
- const L = o[f];
2150
- if (y === void 0)
2151
- (L !== void 0 || f in o) && (i || (o = k(o), i = !0), delete o[f]);
2152
- else if (tt(y)) {
2153
- const g = k(y);
2154
- v(g, L) || (i || (o = k(o), i = !0), o[f] = g);
2283
+ const r = /* @__PURE__ */ new Map();
2284
+ for (const n of e)
2285
+ r.set(n.nodeId, n);
2286
+ return $t(t, r);
2287
+ }
2288
+ function $t(t, e, s) {
2289
+ const r = e.get(t.id);
2290
+ let n = t, i = !1;
2291
+ if (r?.textUpdates && r.textUpdates.length > 0) {
2292
+ const f = ii(t, r.textUpdates);
2293
+ n = f.node, i = f.changed;
2294
+ }
2295
+ let o = !1, a = n.props;
2296
+ if (r?.changedProps && r.changedProps.size > 0)
2297
+ for (const [f, d] of r.changedProps.entries()) {
2298
+ const u = a[f];
2299
+ if (d === void 0)
2300
+ (u !== void 0 || f in a) && (o || (a = k(a), o = !0), delete a[f]);
2301
+ else if (tt(d)) {
2302
+ const A = k(d);
2303
+ v(A, u) || (o || (a = k(a), o = !0), a[f] = A);
2155
2304
  } else
2156
- v(y, L) || (i || (o = k(o), i = !0), o[f] = y);
2305
+ v(d, u) || (o || (a = k(a), o = !0), a[f] = d);
2157
2306
  }
2158
- let a = !1, l = r.styleIds;
2159
- e.styleIds !== void 0 && (Xt(r.styleIds, e.styleIds) || (l = e.styleIds, a = !0));
2160
- const I = r.children ?? [];
2161
- let c = I, E = !1;
2162
- if (e.removed.length > 0) {
2163
- const f = e.removed, y = f.length > 8, L = y ? new Set(f) : void 0, g = y ? (u) => L.has(u) : (u) => f.includes(u);
2164
- let d;
2165
- for (let u = 0; u < c.length; u++) {
2166
- const D = c[u];
2167
- g(D.id) ? d || (d = c.slice(0, u)) : d && d.push(D);
2307
+ let I = !1, l = n.styleIds;
2308
+ r?.styleIds !== void 0 && (Xt(n.styleIds, r.styleIds) || (l = r.styleIds, I = !0));
2309
+ const c = n.children ?? [];
2310
+ let E = c, _ = !1;
2311
+ if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
2312
+ const f = E.slice();
2313
+ if (r?.removals && r.removals.length > 0) {
2314
+ const d = [...r.removals].sort((u, A) => A.index - u.index);
2315
+ for (const u of d)
2316
+ u.index >= 0 && u.index < f.length && f.splice(u.index, 1);
2317
+ _ = !0;
2168
2318
  }
2169
- d && (c = d, E = !0);
2170
- }
2171
- if (e.updated.length > 0) {
2172
- const f = e.updated, y = f.length > 8, L = y ? new Map(f.map((u) => [u.id, u])) : void 0, g = y ? (u) => L.get(u) : (u) => f.find((D) => D.id === u);
2173
- let d;
2174
- for (let u = 0; u < c.length; u++) {
2175
- const D = c[u], at = g(D.id);
2176
- if (!at)
2177
- continue;
2178
- const lt = X(D, at);
2179
- lt !== D && (d || (d = c.slice()), d[u] = lt);
2319
+ if (r?.moves && r.moves.length > 0) {
2320
+ const d = [...r.moves].sort((A, m) => A.toIndex - m.toIndex), u = /* @__PURE__ */ new Map();
2321
+ for (const A of d) {
2322
+ const m = f.findIndex((W) => W.id === A.nodeId);
2323
+ m >= 0 && (u.set(A.nodeId, f[m]), f.splice(m, 1));
2324
+ }
2325
+ for (const A of d) {
2326
+ const m = u.get(A.nodeId);
2327
+ if (m) {
2328
+ const W = Math.min(A.toIndex, f.length);
2329
+ f.splice(W, 0, m);
2330
+ }
2331
+ }
2332
+ _ = !0;
2333
+ }
2334
+ if (r?.inserts && r.inserts.length > 0) {
2335
+ const d = [...r.inserts].sort((u, A) => u.index - A.index);
2336
+ for (const u of d) {
2337
+ const A = Math.min(u.index, f.length);
2338
+ f.splice(A, 0, u.node);
2339
+ }
2340
+ _ = !0;
2180
2341
  }
2181
- d && (c = d, E = !0);
2182
- }
2183
- e.added.length > 0 && (c = c.concat(e.added), E = !0);
2184
- const _ = r.type !== e.type;
2185
- return n || i || _ || a || E ? !i && !E && !_ && !a ? r : {
2186
- id: e.id,
2187
- type: e.type,
2188
- props: i ? o : r.props,
2189
- children: E ? c : I,
2190
- styleIds: a ? l : r.styleIds
2342
+ E = f;
2343
+ }
2344
+ let h;
2345
+ for (let f = 0; f < E.length; f++) {
2346
+ const d = E[f], u = $t(d, e);
2347
+ u !== d && (h || (h = E.slice()), h[f] = u);
2348
+ }
2349
+ return h && (E = h, _ = !0), i || o || I || _ ? !o && !_ && !I ? n : {
2350
+ id: t.id,
2351
+ type: t.type,
2352
+ props: o ? a : n.props,
2353
+ children: _ ? E : c,
2354
+ styleIds: I ? l : n.styleIds
2191
2355
  } : t;
2192
2356
  }
2193
2357
  function b(t, e) {
@@ -2195,32 +2359,32 @@ function b(t, e) {
2195
2359
  for (const s of t.children)
2196
2360
  b(s, e);
2197
2361
  }
2198
- const $ = [];
2199
- function gn(t) {
2200
- for (; $.length <= t; )
2201
- $.push(/* @__PURE__ */ new Map());
2202
- return $[t].clear(), $[t];
2362
+ const j = [];
2363
+ function ei(t) {
2364
+ for (; j.length <= t; )
2365
+ j.push(/* @__PURE__ */ new Map());
2366
+ return j[t].clear(), j[t];
2203
2367
  }
2204
- function j(t, e, s) {
2205
- $t(t, e, s, 0);
2368
+ function X(t, e, s) {
2369
+ Kt(t, e, s, 0);
2206
2370
  }
2207
- function $t(t, e, s, r) {
2371
+ function Kt(t, e, s, r) {
2208
2372
  if (t === e)
2209
2373
  return;
2210
- (t.type !== e.type || !Pn(t.props, e.props) || !Xt(t.styleIds, e.styleIds)) && s.add(e.id);
2374
+ (t.type !== e.type || !si(t.props, e.props) || !Xt(t.styleIds, e.styleIds)) && s.add(e.id);
2211
2375
  const i = t.children ?? [], o = e.children ?? [];
2212
2376
  if (i !== o) {
2213
- const a = gn(r);
2214
- for (const l of i)
2215
- a.set(l.id, l);
2216
- for (const l of o) {
2217
- const I = a.get(l.id);
2218
- I ? $t(I, l, s, r + 1) : b(l, s);
2377
+ const a = ei(r);
2378
+ for (const I of i)
2379
+ a.set(I.id, I);
2380
+ for (const I of o) {
2381
+ const l = a.get(I.id);
2382
+ l ? Kt(l, I, s, r + 1) : b(I, s);
2219
2383
  }
2220
2384
  i.length !== o.length && s.add(e.id);
2221
2385
  }
2222
2386
  }
2223
- function Pn(t, e) {
2387
+ function si(t, e) {
2224
2388
  return v(t, e);
2225
2389
  }
2226
2390
  function jt(t, e) {
@@ -2236,7 +2400,7 @@ function jt(t, e) {
2236
2400
  function Xt(t, e) {
2237
2401
  return v(t, e);
2238
2402
  }
2239
- function bn(t, e) {
2403
+ function ri(t, e) {
2240
2404
  if (t === e) return !0;
2241
2405
  if (!t || !e || t.length !== e.length) return !1;
2242
2406
  for (let s = 0; s < t.length; s++) {
@@ -2246,24 +2410,24 @@ function bn(t, e) {
2246
2410
  }
2247
2411
  return !0;
2248
2412
  }
2249
- function pn(t, e) {
2413
+ function ni(t, e) {
2250
2414
  if (e.length === 0)
2251
2415
  return t;
2252
2416
  const s = [...e].sort((i, o) => i.start - o.start);
2253
2417
  let r = t, n = 0;
2254
2418
  for (const i of s) {
2255
- const o = ct(i.start + n, 0, r.length);
2419
+ const o = lt(i.start + n, 0, r.length);
2256
2420
  if (i.end == null) {
2257
- const c = r.slice(o), E = vn(c, i.insertedText);
2421
+ const c = r.slice(o), E = oi(c, i.insertedText);
2258
2422
  r = r.slice(0, o) + i.insertedText + c.slice(E), n += i.insertedText.length - E;
2259
2423
  continue;
2260
2424
  }
2261
- const a = i.end + n, l = ct(a, o, r.length), I = l - o;
2262
- r = r.slice(0, o) + i.insertedText + r.slice(l), n += i.insertedText.length - I;
2425
+ const a = i.end + n, I = lt(a, o, r.length), l = I - o;
2426
+ r = r.slice(0, o) + i.insertedText + r.slice(I), n += i.insertedText.length - l;
2263
2427
  }
2264
2428
  return r;
2265
2429
  }
2266
- function Fn(t, e, s) {
2430
+ function ii(t, e, s) {
2267
2431
  if (e.length === 0)
2268
2432
  return { node: t, changed: !1 };
2269
2433
  const r = /* @__PURE__ */ new Map();
@@ -2277,42 +2441,42 @@ function zt(t, e, s) {
2277
2441
  const r = e.get(t.id) ?? [];
2278
2442
  let n = !1, i = t.props;
2279
2443
  if (r.length > 0) {
2280
- const I = /* @__PURE__ */ new Map();
2444
+ const l = /* @__PURE__ */ new Map();
2281
2445
  for (const c of r) {
2282
- const E = I.get(c.propertyName);
2283
- E ? E.push(c) : I.set(c.propertyName, [c]);
2446
+ const E = l.get(c.propertyName);
2447
+ E ? E.push(c) : l.set(c.propertyName, [c]);
2284
2448
  }
2285
- for (const [c, E] of I.entries()) {
2286
- const _ = i[c], N = pn(typeof _ == "string" ? _ : "", E);
2287
- n || (i = k(i), n = !0), i[c] = N;
2449
+ for (const [c, E] of l.entries()) {
2450
+ const _ = i[c], h = ni(typeof _ == "string" ? _ : "", E);
2451
+ n || (i = k(i), n = !0), i[c] = h;
2288
2452
  }
2289
2453
  }
2290
2454
  let o = !1;
2291
2455
  const a = t.children ?? [];
2292
- let l = a;
2456
+ let I = a;
2293
2457
  if (a.length > 0) {
2294
- let I;
2458
+ let l;
2295
2459
  for (let c = 0; c < a.length; c++) {
2296
2460
  const E = a[c], _ = zt(E, e);
2297
- _.changed && (I || (I = [...a]), I[c] = _.node);
2461
+ _.changed && (l || (l = [...a]), l[c] = _.node);
2298
2462
  }
2299
- I && (l = I, o = !0);
2463
+ l && (I = l, o = !0);
2300
2464
  }
2301
2465
  return !n && !o ? { node: t, changed: !1 } : {
2302
2466
  node: {
2303
2467
  id: t.id,
2304
2468
  type: t.type,
2305
2469
  props: n ? i : t.props,
2306
- children: o ? l : a,
2470
+ children: o ? I : a,
2307
2471
  styleIds: t.styleIds
2308
2472
  },
2309
2473
  changed: !0
2310
2474
  };
2311
2475
  }
2312
- function ct(t, e, s) {
2476
+ function lt(t, e, s) {
2313
2477
  return Math.max(e, Math.min(s, t));
2314
2478
  }
2315
- function vn(t, e) {
2479
+ function oi(t, e) {
2316
2480
  const s = Math.min(t.length, e.length);
2317
2481
  let r = 0;
2318
2482
  for (; r < s && t.charCodeAt(r) === e.charCodeAt(r); )
@@ -2352,20 +2516,20 @@ function v(t, e) {
2352
2516
  }
2353
2517
  return !1;
2354
2518
  }
2355
- const Mn = 16, Vn = 50, m = new On(), W = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2356
- let Wt = Mn, Jt = Vn, G = [], B = null, x = null, R = 0, z = 0;
2357
- const H = /* @__PURE__ */ new Map();
2358
- function kn() {
2519
+ const ai = 16, li = 50, O = new ti(), H = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
2520
+ let Wt = ai, Jt = li, V = [], G = null, B = null, R = 0, z = 0;
2521
+ const x = /* @__PURE__ */ new Map();
2522
+ function Ii() {
2359
2523
  return typeof performance < "u" ? performance.now() : Date.now();
2360
2524
  }
2361
- function Gn() {
2525
+ function ci() {
2362
2526
  try {
2363
2527
  return crypto.randomUUID();
2364
2528
  } catch {
2365
2529
  return `${Date.now()}_${Math.random().toString(16).slice(2)}`;
2366
2530
  }
2367
2531
  }
2368
- function Bn(t) {
2532
+ function Ei(t) {
2369
2533
  const e = [];
2370
2534
  for (const n of t.views)
2371
2535
  e.push(n);
@@ -2385,7 +2549,7 @@ function Bn(t) {
2385
2549
  optimisticPatches: r
2386
2550
  };
2387
2551
  }
2388
- function xn(t, e) {
2552
+ function _i(t, e) {
2389
2553
  if (t === e) return !0;
2390
2554
  if (!t || !e || t.length !== e.length) return !1;
2391
2555
  for (let s = 0; s < t.length; s++) {
@@ -2395,26 +2559,26 @@ function xn(t, e) {
2395
2559
  }
2396
2560
  return !0;
2397
2561
  }
2398
- function Hn(t, e, s) {
2562
+ function fi(t, e, s) {
2399
2563
  if (!s || s.version === -1)
2400
- return { type: "ReplaceStreamSnapshot", snapshot: Bn(e) };
2564
+ return { type: "ReplaceStreamSnapshot", snapshot: Ei(e) };
2401
2565
  let r, n;
2402
- for (const [I, c] of e.views)
2403
- s.views.get(I) !== c && (r ??= []).push([I, c]);
2404
- for (const I of s.views.keys())
2405
- e.views.has(I) || (n ??= []).push(I);
2566
+ for (const [l, c] of e.views)
2567
+ s.views.get(l) !== c && (r ??= []).push([l, c]);
2568
+ for (const l of s.views.keys())
2569
+ e.views.has(l) || (n ??= []).push(l);
2406
2570
  let i, o;
2407
- for (const [I, c] of e.payloads)
2408
- s.payloads.get(I) !== c && (i ??= []).push([I, c]);
2409
- for (const I of s.payloads.keys())
2410
- e.payloads.has(I) || (o ??= []).push(I);
2411
- let a, l;
2412
- for (const [I, c] of e.optimisticPatches) {
2413
- const E = s.optimisticPatches.get(I);
2414
- xn(E, c) || (a ??= []).push([I, c.slice()]);
2415
- }
2416
- for (const I of s.optimisticPatches.keys())
2417
- e.optimisticPatches.has(I) || (l ??= []).push(I);
2571
+ for (const [l, c] of e.payloads)
2572
+ s.payloads.get(l) !== c && (i ??= []).push([l, c]);
2573
+ for (const l of s.payloads.keys())
2574
+ e.payloads.has(l) || (o ??= []).push(l);
2575
+ let a, I;
2576
+ for (const [l, c] of e.optimisticPatches) {
2577
+ const E = s.optimisticPatches.get(l);
2578
+ _i(E, c) || (a ??= []).push([l, c.slice()]);
2579
+ }
2580
+ for (const l of s.optimisticPatches.keys())
2581
+ e.optimisticPatches.has(l) || (I ??= []).push(l);
2418
2582
  return {
2419
2583
  type: "PatchStreamSnapshot",
2420
2584
  streamId: t,
@@ -2427,69 +2591,69 @@ function Hn(t, e, s) {
2427
2591
  upsertPayloads: i,
2428
2592
  deletePayloads: o,
2429
2593
  upsertOptimisticPatches: a,
2430
- deleteOptimisticPatchesForViews: l
2594
+ deleteOptimisticPatchesForViews: I
2431
2595
  };
2432
2596
  }
2433
2597
  function qt() {
2434
- B || (B = setTimeout(Et, Wt)), x || (x = setTimeout(Et, Jt));
2598
+ G || (G = setTimeout(It, Wt)), B || (B = setTimeout(It, Jt));
2435
2599
  }
2436
- function M(t) {
2437
- G.push(t), qt();
2600
+ function P(t) {
2601
+ V.push(t), qt();
2438
2602
  }
2439
- function Et() {
2440
- if (B && (clearTimeout(B), B = null), x && (clearTimeout(x), x = null), G.length === 0 && H.size === 0) {
2603
+ function It() {
2604
+ if (G && (clearTimeout(G), G = null), B && (clearTimeout(B), B = null), V.length === 0 && x.size === 0) {
2441
2605
  R = 0, z = 0;
2442
2606
  return;
2443
2607
  }
2444
2608
  const t = [];
2445
- for (const [s, r] of H)
2609
+ for (const [s, r] of x)
2446
2610
  t.push({ trackId: s, version: r });
2447
2611
  const e = {
2448
- batchId: Gn(),
2449
- createdAtMs: kn(),
2450
- ops: G,
2612
+ batchId: ci(),
2613
+ createdAtMs: Ii(),
2614
+ ops: V,
2451
2615
  ...t.length > 0 ? { acks: t } : {},
2452
2616
  stats: { uiMessagesConsumed: R, bytesConsumed: z }
2453
2617
  };
2454
- G = [], R = 0, z = 0, H.clear(), self.postMessage(e);
2618
+ V = [], R = 0, z = 0, x.clear(), self.postMessage(e);
2455
2619
  }
2456
2620
  function Qt(t) {
2457
2621
  return `${t.senderId}_${t.trackId}`;
2458
2622
  }
2459
- function Yn(t) {
2460
- const e = Qs(t), s = /* @__PURE__ */ new Set();
2623
+ function hi(t) {
2624
+ const e = cr(t), s = /* @__PURE__ */ new Set();
2461
2625
  for (const r of Object.values(e.UIStreams ?? {})) {
2462
2626
  const n = r.StreamId;
2463
2627
  s.add(n);
2464
2628
  const i = r.Info?.Category;
2465
- m.getSnapshot(n)?.category !== i && (m.setCategory(n, i), M({ type: "SetStreamCategory", streamId: n, category: i }));
2629
+ O.getSnapshot(n)?.category !== i && (O.setCategory(n, i), P({ type: "SetStreamCategory", streamId: n, category: i }));
2466
2630
  }
2467
- for (const r of m.getSnapshots())
2468
- s.has(r.streamId) || (m.remove(r.streamId), Y.delete(r.streamId), M({ type: "RemoveStream", streamId: r.streamId }));
2631
+ for (const r of O.getSnapshots())
2632
+ s.has(r.streamId) || (O.remove(r.streamId), Y.delete(r.streamId), P({ type: "RemoveStream", streamId: r.streamId }));
2469
2633
  }
2470
- function Kn(t) {
2471
- const e = et(t), s = Qt(e), r = Sn(t), n = Rn(r), i = H.get(e.trackId);
2472
- if ((i === void 0 || n.snapshot.version > i) && (H.set(e.trackId, n.snapshot.version), qt()), !m.apply(s, n))
2634
+ function ui(t) {
2635
+ const e = et(t), s = Qt(e), r = Bn(t), n = qn(r), i = x.get(e.trackId);
2636
+ if ((i === void 0 || n.snapshot.version > i) && (x.set(e.trackId, n.snapshot.version), qt()), !O.apply(s, n))
2473
2637
  return;
2474
- const a = m.getSnapshot(s);
2638
+ const a = O.getSnapshot(s);
2475
2639
  if (!a)
2476
2640
  return;
2477
- const l = Y.get(s);
2478
- Y.set(s, a), M(Hn(s, a, l));
2641
+ const I = Y.get(s);
2642
+ Y.set(s, a), P(fi(s, a, I));
2479
2643
  }
2480
- function $n(t) {
2481
- const e = Xr(t);
2644
+ function Ti(t) {
2645
+ const e = on(t);
2482
2646
  if (!e.StyleId)
2483
2647
  return;
2484
2648
  const s = {
2485
2649
  styleId: e.StyleId,
2486
2650
  css: e.Style?.css,
2487
2651
  common: e.Style?.common
2488
- }, r = W.get(s.styleId);
2489
- r && r.css === s.css && r.common === s.common || (W.set(s.styleId, s), M({ type: "UpsertUiStyle", style: s }));
2652
+ }, r = H.get(s.styleId);
2653
+ r && r.css === s.css && r.common === s.common || (H.set(s.styleId, s), P({ type: "UpsertUiStyle", style: s }));
2490
2654
  }
2491
- function jn(t) {
2492
- const e = sn(t);
2655
+ function Ni(t) {
2656
+ const e = un(t);
2493
2657
  if (e.Styles)
2494
2658
  for (const s of e.Styles) {
2495
2659
  if (!s.StyleId)
@@ -2498,39 +2662,48 @@ function jn(t) {
2498
2662
  styleId: s.StyleId,
2499
2663
  css: s.Style?.css,
2500
2664
  common: s.Style?.common
2501
- }, n = W.get(r.styleId);
2502
- n && n.css === r.css && n.common === r.common || (W.set(r.styleId, r), M({ type: "UpsertUiStyle", style: r }));
2665
+ }, n = H.get(r.styleId);
2666
+ n && n.css === r.css && n.common === r.common || (H.set(r.styleId, r), P({ type: "UpsertUiStyle", style: r }));
2503
2667
  }
2504
2668
  }
2505
- function Xn(t) {
2669
+ function Ai(t) {
2506
2670
  const e = et(t), s = Qt(e);
2507
- m.clear(s), Y.delete(s), M({ type: "ClearStream", streamId: s });
2671
+ O.clear(s), Y.delete(s), P({ type: "ClearStream", streamId: s });
2508
2672
  }
2509
- function zn(t) {
2673
+ function di(t) {
2674
+ const e = On(t);
2675
+ if (!(!e.StyleIds || e.StyleIds.length === 0))
2676
+ for (const s of e.StyleIds)
2677
+ H.delete(s) && P({ type: "RemoveUiStyle", styleId: s });
2678
+ }
2679
+ function Si(t) {
2510
2680
  const e = new Uint8Array(t);
2511
2681
  z += e.byteLength;
2512
2682
  const s = e;
2513
2683
  switch (Zt(s)) {
2514
- case P.CORE_GLOBAL_STATE:
2515
- Yn(s), R++;
2684
+ case g.CORE_GLOBAL_STATE:
2685
+ hi(s), R++;
2516
2686
  return;
2517
- case P.UI_UPDATE:
2687
+ case g.UI_UPDATE:
2518
2688
  try {
2519
- Kn(s);
2689
+ ui(s);
2520
2690
  } catch (n) {
2521
- return n instanceof w, void 0;
2691
+ return n instanceof D, void 0;
2522
2692
  } finally {
2523
2693
  R++;
2524
2694
  }
2525
2695
  return;
2526
- case P.UI_STYLES:
2527
- $n(s), R++;
2696
+ case g.UI_STYLES:
2697
+ Ti(s), R++;
2698
+ return;
2699
+ case g.UI_STYLES_BATCH:
2700
+ Ni(s), R++;
2528
2701
  return;
2529
- case P.UI_STYLES_BATCH:
2530
- jn(s), R++;
2702
+ case g.UI_STYLES_DELETE:
2703
+ di(s), R++;
2531
2704
  return;
2532
- case P.ACTION_UI_CLEAR_STREAM:
2533
- Xn(s), R++;
2705
+ case g.ACTION_UI_CLEAR_STREAM:
2706
+ Ai(s), R++;
2534
2707
  return;
2535
2708
  default:
2536
2709
  return;
@@ -2543,8 +2716,8 @@ self.addEventListener("message", (t) => {
2543
2716
  return;
2544
2717
  }
2545
2718
  if (e.type === "clear") {
2546
- G = [], Y.clear();
2719
+ V = [], Y.clear();
2547
2720
  return;
2548
2721
  }
2549
- e.type === "protocol" && zn(e.message);
2722
+ e.type === "protocol" && Si(e.message);
2550
2723
  });