@ikonai/sdk-ui 1.0.34 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -2,32 +2,32 @@ import { createLogger as qt, readOpcode as Qt, readProtocolMessageHeaders as nt
2
2
  const P = 27, Zt = {
3
3
  Compressed: 8
4
4
  };
5
- function te(e) {
6
- const t = G(e), s = new DataView(t.buffer, t.byteOffset, t.byteLength);
7
- if (t.length < P)
5
+ function te(t) {
6
+ const e = G(t), s = new DataView(e.buffer, e.byteOffset, e.byteLength);
7
+ if (e.length < P)
8
8
  throw new Error("Protocol payload too short");
9
9
  const r = s.getUint32(0, !0), i = s.getUint32(4, !0), n = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), l = s.getUint32(20, !0), h = s.getUint8(24), I = s.getUint8(25), c = s.getUint8(26);
10
- if (P + l * 4 > t.length)
10
+ if (P + l * 4 > e.length)
11
11
  throw new Error("Protocol header exceeds payload length");
12
- const u = [];
12
+ const _ = [];
13
13
  let f = P;
14
14
  for (let S = 0; S < l; S++)
15
- u.push(s.getUint32(f, !0)), f += 4;
15
+ _.push(s.getUint32(f, !0)), f += 4;
16
16
  return {
17
17
  length: r,
18
18
  opcode: i,
19
19
  senderId: n,
20
20
  trackId: o,
21
21
  sequenceId: a,
22
- targetIds: u,
22
+ targetIds: _,
23
23
  payloadVersion: h,
24
24
  payloadType: I,
25
25
  flags: c
26
26
  };
27
27
  }
28
- async function M(e, t, s) {
29
- const r = G(e), i = te(r);
30
- if (t !== void 0 && i.opcode !== t)
28
+ async function M(t, e, s) {
29
+ const r = G(t), i = te(r);
30
+ if (e !== void 0 && i.opcode !== e)
31
31
  throw new Error(`Unexpected opcode ${i.opcode}`);
32
32
  if (i.payloadType !== 8)
33
33
  throw new Error(`Unexpected payload type ${i.payloadType}`);
@@ -35,20 +35,20 @@ async function M(e, t, s) {
35
35
  let o = r.subarray(n, i.length);
36
36
  return (i.flags & Zt.Compressed) !== 0 && (o = await se(o)), o;
37
37
  }
38
- function ee(e, t, s, r, i) {
39
- const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], h = i?.payloadType ?? 8, I = P + l.length * 4, c = I + t.length, E = new Uint8Array(c), u = new DataView(E.buffer);
40
- u.setUint32(0, c, !0), u.setUint32(4, e >>> 0, !0), u.setUint32(8, r >>> 0, !0), u.setUint32(12, n >>> 0, !0), u.setUint32(16, o >>> 0, !0), u.setUint32(20, l.length >>> 0, !0), u.setUint8(24, s & 255), u.setUint8(25, h & 255), u.setUint8(26, a & 255);
38
+ function ee(t, e, s, r, i) {
39
+ const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], h = i?.payloadType ?? 8, I = P + l.length * 4, c = I + e.length, E = new Uint8Array(c), _ = new DataView(E.buffer);
40
+ _.setUint32(0, c, !0), _.setUint32(4, t >>> 0, !0), _.setUint32(8, r >>> 0, !0), _.setUint32(12, n >>> 0, !0), _.setUint32(16, o >>> 0, !0), _.setUint32(20, l.length >>> 0, !0), _.setUint8(24, s & 255), _.setUint8(25, h & 255), _.setUint8(26, a & 255);
41
41
  let f = P;
42
42
  for (let S = 0; S < l.length; S++)
43
- u.setUint32(f, l[S] >>> 0, !0), f += 4;
44
- return E.set(t, I), E;
43
+ _.setUint32(f, l[S] >>> 0, !0), f += 4;
44
+ return E.set(e, I), E;
45
45
  }
46
- async function se(e) {
46
+ async function se(t) {
47
47
  if (typeof DecompressionStream > "u")
48
48
  throw new Error("DecompressionStream not supported");
49
- const t = new DecompressionStream("gzip"), s = t.writable.getWriter(), r = new Uint8Array(e);
49
+ const e = new DecompressionStream("gzip"), s = e.writable.getWriter(), r = new Uint8Array(t);
50
50
  s.write(r), s.close();
51
- const i = t.readable.getReader(), n = [];
51
+ const i = e.readable.getReader(), n = [];
52
52
  let o = 0;
53
53
  for (; ; ) {
54
54
  const { done: h, value: I } = await i.read();
@@ -61,196 +61,196 @@ async function se(e) {
61
61
  a.set(n[h], l), l += n[h].length;
62
62
  return a;
63
63
  }
64
- var U = /* @__PURE__ */ ((e) => (e[e.Null = 1] = "Null", e[e.Bool = 2] = "Bool", e[e.Int32 = 3] = "Int32", e[e.Int64 = 4] = "Int64", e[e.UInt32 = 5] = "UInt32", e[e.UInt64 = 6] = "UInt64", e[e.Float32 = 7] = "Float32", e[e.Float64 = 8] = "Float64", e[e.Array = 9] = "Array", e[e.Dict = 10] = "Dict", e[e.Object = 11] = "Object", e[e.String = 12] = "String", e[e.Binary = 13] = "Binary", e[e.Guid = 14] = "Guid", e))(U || {});
64
+ var U = /* @__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))(U || {});
65
65
  const lt = 161, It = 162, W = new TextEncoder(), re = new TextDecoder("utf-8", { fatal: !0 });
66
66
  class B {
67
- constructor(t = 1) {
68
- this.version = t, this.buffer.writeByte(lt), this.buffer.writeVarUInt(t >>> 0);
67
+ constructor(e = 1) {
68
+ this.version = e, this.buffer.writeByte(lt), this.buffer.writeVarUInt(e >>> 0);
69
69
  }
70
- buffer = new p();
70
+ buffer = new b();
71
71
  closed = !1;
72
72
  cached;
73
- writeInt32Field(t, s) {
74
- this.writeFixedField(t, 3, () => this.buffer.writeInt32(s | 0));
73
+ writeInt32Field(e, s) {
74
+ this.writeFixedField(e, 3, () => this.buffer.writeInt32(s | 0));
75
75
  }
76
- writeUInt32Field(t, s) {
77
- this.writeFixedField(t, 5, () => this.buffer.writeUInt32(s >>> 0));
76
+ writeUInt32Field(e, s) {
77
+ this.writeFixedField(e, 5, () => this.buffer.writeUInt32(s >>> 0));
78
78
  }
79
- writeInt64Field(t, s) {
80
- this.writeFixedField(t, 4, () => this.buffer.writeBigInt64(s));
79
+ writeInt64Field(e, s) {
80
+ this.writeFixedField(e, 4, () => this.buffer.writeBigInt64(s));
81
81
  }
82
- writeUInt64Field(t, s) {
83
- this.writeFixedField(t, 6, () => this.buffer.writeBigUInt64(s));
82
+ writeUInt64Field(e, s) {
83
+ this.writeFixedField(e, 6, () => this.buffer.writeBigUInt64(s));
84
84
  }
85
- writeFloat32Field(t, s) {
86
- this.writeFixedField(t, 7, () => this.buffer.writeFloat32(s));
85
+ writeFloat32Field(e, s) {
86
+ this.writeFixedField(e, 7, () => this.buffer.writeFloat32(s));
87
87
  }
88
- writeFloat64Field(t, s) {
89
- this.writeFixedField(t, 8, () => this.buffer.writeFloat64(s));
88
+ writeFloat64Field(e, s) {
89
+ this.writeFixedField(e, 8, () => this.buffer.writeFloat64(s));
90
90
  }
91
- writeBoolField(t, s) {
92
- this.writeFixedField(t, 2, () => this.buffer.writeByte(s ? 1 : 0));
91
+ writeBoolField(e, s) {
92
+ this.writeFixedField(e, 2, () => this.buffer.writeByte(s ? 1 : 0));
93
93
  }
94
- writeGuidField(t, s) {
95
- const r = s instanceof d ? s.asBytes() : s;
94
+ writeGuidField(e, s) {
95
+ const r = s instanceof T ? s.asBytes() : s;
96
96
  if (r.length !== 16)
97
97
  throw new Error("Guid payload must be 16 bytes");
98
- this.writeFixedField(t, 14, () => this.buffer.writeBytes(r));
98
+ this.writeFixedField(e, 14, () => this.buffer.writeBytes(r));
99
99
  }
100
- writeStringField(t, s) {
100
+ writeStringField(e, s) {
101
101
  const r = W.encode(s ?? "");
102
- this.writeVariableField(t, 12, r);
102
+ this.writeVariableField(e, 12, r);
103
103
  }
104
- writeBinaryField(t, s) {
105
- this.writeVariableField(t, 13, s);
104
+ writeBinaryField(e, s) {
105
+ this.writeVariableField(e, 13, s);
106
106
  }
107
- writeObjectField(t, s, r) {
107
+ writeObjectField(e, s, r) {
108
108
  const i = new B(s);
109
109
  r(i);
110
110
  const n = i.finish();
111
- this.writeVariableField(t, 11, n);
111
+ this.writeVariableField(e, 11, n);
112
112
  }
113
- writeArrayField(t, s, r) {
113
+ writeArrayField(e, s, r) {
114
114
  const i = new Y(s);
115
115
  r(i);
116
116
  const n = i.finish();
117
- this.writeVariableField(t, 9, n);
117
+ this.writeVariableField(e, 9, n);
118
118
  }
119
- writeDictionaryField(t, s, r, i) {
119
+ writeDictionaryField(e, s, r, i) {
120
120
  const n = new Q(s, r);
121
121
  i(n);
122
122
  const o = n.finish();
123
- this.writeVariableField(t, 10, o);
123
+ this.writeVariableField(e, 10, o);
124
124
  }
125
125
  finish() {
126
126
  return this.closed || (this.buffer.writeByte(It), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
127
127
  }
128
- writeFixedField(t, s, r) {
129
- this.writeFieldHeader(t, s, 0), r();
128
+ writeFixedField(e, s, r) {
129
+ this.writeFieldHeader(e, s, 0), r();
130
130
  }
131
- writeVariableField(t, s, r) {
132
- this.writeFieldHeader(t, s, r.length), this.buffer.writeBytes(r);
131
+ writeVariableField(e, s, r) {
132
+ this.writeFieldHeader(e, s, r.length), this.buffer.writeBytes(r);
133
133
  }
134
- writeFieldHeader(t, s, r) {
135
- this.buffer.writeUInt32(t >>> 0), this.buffer.writeByte(K(s)), le(s) && this.buffer.writeVarUInt(r >>> 0);
134
+ writeFieldHeader(e, s, r) {
135
+ this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(K(s)), le(s) && this.buffer.writeVarUInt(r >>> 0);
136
136
  }
137
137
  }
138
138
  class Y {
139
- constructor(t) {
140
- this.elementType = t;
139
+ constructor(e) {
140
+ this.elementType = e;
141
141
  }
142
- payload = new p();
142
+ payload = new b();
143
143
  count = 0;
144
- writeInt32(t) {
144
+ writeInt32(e) {
145
145
  this.ensureElementType(
146
146
  3
147
147
  /* Int32 */
148
- ), this.count++, this.payload.writeInt32(t | 0);
148
+ ), this.count++, this.payload.writeInt32(e | 0);
149
149
  }
150
- writeUInt32(t) {
150
+ writeUInt32(e) {
151
151
  this.ensureElementType(
152
152
  5
153
153
  /* UInt32 */
154
- ), this.count++, this.payload.writeUInt32(t >>> 0);
154
+ ), this.count++, this.payload.writeUInt32(e >>> 0);
155
155
  }
156
- writeInt64(t) {
156
+ writeInt64(e) {
157
157
  this.ensureElementType(
158
158
  4
159
159
  /* Int64 */
160
- ), this.count++, this.payload.writeBigInt64(t);
160
+ ), this.count++, this.payload.writeBigInt64(e);
161
161
  }
162
- writeUInt64(t) {
162
+ writeUInt64(e) {
163
163
  this.ensureElementType(
164
164
  6
165
165
  /* UInt64 */
166
- ), this.count++, this.payload.writeBigUInt64(t);
166
+ ), this.count++, this.payload.writeBigUInt64(e);
167
167
  }
168
- writeFloat32(t) {
168
+ writeFloat32(e) {
169
169
  this.ensureElementType(
170
170
  7
171
171
  /* Float32 */
172
- ), this.count++, this.payload.writeFloat32(t);
172
+ ), this.count++, this.payload.writeFloat32(e);
173
173
  }
174
- writeFloat64(t) {
174
+ writeFloat64(e) {
175
175
  this.ensureElementType(
176
176
  8
177
177
  /* Float64 */
178
- ), this.count++, this.payload.writeFloat64(t);
178
+ ), this.count++, this.payload.writeFloat64(e);
179
179
  }
180
- writeBool(t) {
180
+ writeBool(e) {
181
181
  this.ensureElementType(
182
182
  2
183
183
  /* Bool */
184
- ), this.count++, this.payload.writeByte(t ? 1 : 0);
184
+ ), this.count++, this.payload.writeByte(e ? 1 : 0);
185
185
  }
186
- writeGuid(t) {
186
+ writeGuid(e) {
187
187
  this.ensureElementType(
188
188
  14
189
189
  /* Guid */
190
190
  ), this.count++;
191
- const s = t instanceof d ? t.asBytes() : t;
191
+ const s = e instanceof T ? e.asBytes() : e;
192
192
  if (s.length !== 16)
193
193
  throw new Error("Guid payload must be 16 bytes");
194
194
  this.payload.writeBytes(s);
195
195
  }
196
- writeString(t) {
196
+ writeString(e) {
197
197
  this.ensureElementType(
198
198
  12
199
199
  /* String */
200
200
  ), this.count++;
201
- const s = W.encode(t ?? "");
201
+ const s = W.encode(e ?? "");
202
202
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s);
203
203
  }
204
- writeBinary(t) {
204
+ writeBinary(e) {
205
205
  this.ensureElementType(
206
206
  13
207
207
  /* Binary */
208
- ), this.count++, this.payload.writeVarUInt(t.length), this.payload.writeBytes(t);
208
+ ), this.count++, this.payload.writeVarUInt(e.length), this.payload.writeBytes(e);
209
209
  }
210
- writeObject(t, s) {
210
+ writeObject(e, s) {
211
211
  this.ensureElementType(
212
212
  11
213
213
  /* Object */
214
214
  ), this.count++;
215
- const r = new B(t);
215
+ const r = new B(e);
216
216
  s(r);
217
217
  const i = r.finish();
218
218
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i);
219
219
  }
220
- writeArray(t, s) {
220
+ writeArray(e, s) {
221
221
  this.ensureElementType(
222
222
  9
223
223
  /* Array */
224
224
  ), this.count++;
225
- const r = new Y(t);
225
+ const r = new Y(e);
226
226
  s(r);
227
227
  const i = r.finish();
228
228
  this.payload.writeBytes(i);
229
229
  }
230
- writeDictionary(t, s, r) {
230
+ writeDictionary(e, s, r) {
231
231
  this.ensureElementType(
232
232
  10
233
233
  /* Dict */
234
234
  ), this.count++;
235
- const i = new Q(t, s);
235
+ const i = new Q(e, s);
236
236
  r(i);
237
237
  const n = i.finish();
238
238
  this.payload.writeBytes(n);
239
239
  }
240
240
  finish() {
241
- const t = new p();
242
- return t.writeByte(K(this.elementType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
241
+ const e = new b();
242
+ return e.writeByte(K(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
243
243
  }
244
- ensureElementType(t) {
245
- if (this.elementType !== t)
246
- throw new Error(`Array element type is ${U[this.elementType]}, expected ${U[t]}`);
244
+ ensureElementType(e) {
245
+ if (this.elementType !== e)
246
+ throw new Error(`Array element type is ${U[this.elementType]}, expected ${U[e]}`);
247
247
  }
248
248
  }
249
249
  class Q {
250
- constructor(t, s) {
251
- this.keyType = t, this.valueType = s, et(t);
250
+ constructor(e, s) {
251
+ this.keyType = e, this.valueType = s, et(e);
252
252
  }
253
- payload = new p();
253
+ payload = new b();
254
254
  count = 0;
255
255
  entryOpen = !1;
256
256
  beginEntry() {
@@ -263,131 +263,131 @@ class Q {
263
263
  finish() {
264
264
  if (this.entryOpen)
265
265
  throw new Error("Dictionary entry not completed");
266
- const t = new p();
267
- return t.writeByte(K(this.keyType)), t.writeByte(K(this.valueType)), t.writeVarUInt(this.count), t.writeBytes(this.payload.toUint8Array()), t.toUint8Array();
266
+ const e = new b();
267
+ return e.writeByte(K(this.keyType)), e.writeByte(K(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
268
268
  }
269
269
  }
270
270
  class ie {
271
- constructor(t, s, r, i) {
272
- this.keyType = t, this.valueType = s, this.payload = r, this.onComplete = i;
271
+ constructor(e, s, r, i) {
272
+ this.keyType = e, this.valueType = s, this.payload = r, this.onComplete = i;
273
273
  }
274
274
  keyWritten = !1;
275
275
  valueWritten = !1;
276
276
  completed = !1;
277
- writeKeyInt32(t) {
277
+ writeKeyInt32(e) {
278
278
  this.ensureKeyType(
279
279
  3
280
280
  /* Int32 */
281
- ), this.payload.writeInt32(t | 0), this.keyWritten = !0;
281
+ ), this.payload.writeInt32(e | 0), this.keyWritten = !0;
282
282
  }
283
- writeKeyUInt32(t) {
283
+ writeKeyUInt32(e) {
284
284
  this.ensureKeyType(
285
285
  5
286
286
  /* UInt32 */
287
- ), this.payload.writeUInt32(t >>> 0), this.keyWritten = !0;
287
+ ), this.payload.writeUInt32(e >>> 0), this.keyWritten = !0;
288
288
  }
289
- writeKeyInt64(t) {
289
+ writeKeyInt64(e) {
290
290
  this.ensureKeyType(
291
291
  4
292
292
  /* Int64 */
293
- ), this.payload.writeBigInt64(t), this.keyWritten = !0;
293
+ ), this.payload.writeBigInt64(e), this.keyWritten = !0;
294
294
  }
295
- writeKeyUInt64(t) {
295
+ writeKeyUInt64(e) {
296
296
  this.ensureKeyType(
297
297
  6
298
298
  /* UInt64 */
299
- ), this.payload.writeBigUInt64(t), this.keyWritten = !0;
299
+ ), this.payload.writeBigUInt64(e), this.keyWritten = !0;
300
300
  }
301
- writeKeyFloat32(t) {
301
+ writeKeyFloat32(e) {
302
302
  this.ensureKeyType(
303
303
  7
304
304
  /* Float32 */
305
- ), this.payload.writeFloat32(t), this.keyWritten = !0;
305
+ ), this.payload.writeFloat32(e), this.keyWritten = !0;
306
306
  }
307
- writeKeyFloat64(t) {
307
+ writeKeyFloat64(e) {
308
308
  this.ensureKeyType(
309
309
  8
310
310
  /* Float64 */
311
- ), this.payload.writeFloat64(t), this.keyWritten = !0;
311
+ ), this.payload.writeFloat64(e), this.keyWritten = !0;
312
312
  }
313
- writeKeyBool(t) {
313
+ writeKeyBool(e) {
314
314
  this.ensureKeyType(
315
315
  2
316
316
  /* Bool */
317
- ), this.payload.writeByte(t ? 1 : 0), this.keyWritten = !0;
317
+ ), this.payload.writeByte(e ? 1 : 0), this.keyWritten = !0;
318
318
  }
319
- writeKeyGuid(t) {
319
+ writeKeyGuid(e) {
320
320
  this.ensureKeyType(
321
321
  14
322
322
  /* Guid */
323
323
  );
324
- const s = t instanceof d ? t.asBytes() : t;
324
+ const s = e instanceof T ? e.asBytes() : e;
325
325
  if (s.length !== 16)
326
326
  throw new Error("Guid payload must be 16 bytes");
327
327
  this.payload.writeBytes(s), this.keyWritten = !0;
328
328
  }
329
- writeKeyString(t) {
329
+ writeKeyString(e) {
330
330
  this.ensureKeyType(
331
331
  12
332
332
  /* String */
333
333
  );
334
- const s = W.encode(t ?? "");
334
+ const s = W.encode(e ?? "");
335
335
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.keyWritten = !0;
336
336
  }
337
- writeKeyBinary(t) {
337
+ writeKeyBinary(e) {
338
338
  this.ensureKeyType(
339
339
  13
340
340
  /* Binary */
341
- ), this.payload.writeVarUInt(t.length), this.payload.writeBytes(t), this.keyWritten = !0;
341
+ ), this.payload.writeVarUInt(e.length), this.payload.writeBytes(e), this.keyWritten = !0;
342
342
  }
343
- writeValueInt32(t) {
343
+ writeValueInt32(e) {
344
344
  this.ensureValueType(
345
345
  3
346
346
  /* Int32 */
347
- ), this.payload.writeInt32(t | 0), this.valueWritten = !0;
347
+ ), this.payload.writeInt32(e | 0), this.valueWritten = !0;
348
348
  }
349
- writeValueUInt32(t) {
349
+ writeValueUInt32(e) {
350
350
  this.ensureValueType(
351
351
  5
352
352
  /* UInt32 */
353
- ), this.payload.writeUInt32(t >>> 0), this.valueWritten = !0;
353
+ ), this.payload.writeUInt32(e >>> 0), this.valueWritten = !0;
354
354
  }
355
- writeValueInt64(t) {
355
+ writeValueInt64(e) {
356
356
  this.ensureValueType(
357
357
  4
358
358
  /* Int64 */
359
- ), this.payload.writeBigInt64(t), this.valueWritten = !0;
359
+ ), this.payload.writeBigInt64(e), this.valueWritten = !0;
360
360
  }
361
- writeValueUInt64(t) {
361
+ writeValueUInt64(e) {
362
362
  this.ensureValueType(
363
363
  6
364
364
  /* UInt64 */
365
- ), this.payload.writeBigUInt64(t), this.valueWritten = !0;
365
+ ), this.payload.writeBigUInt64(e), this.valueWritten = !0;
366
366
  }
367
- writeValueFloat32(t) {
367
+ writeValueFloat32(e) {
368
368
  this.ensureValueType(
369
369
  7
370
370
  /* Float32 */
371
- ), this.payload.writeFloat32(t), this.valueWritten = !0;
371
+ ), this.payload.writeFloat32(e), this.valueWritten = !0;
372
372
  }
373
- writeValueFloat64(t) {
373
+ writeValueFloat64(e) {
374
374
  this.ensureValueType(
375
375
  8
376
376
  /* Float64 */
377
- ), this.payload.writeFloat64(t), this.valueWritten = !0;
377
+ ), this.payload.writeFloat64(e), this.valueWritten = !0;
378
378
  }
379
- writeValueBool(t) {
379
+ writeValueBool(e) {
380
380
  this.ensureValueType(
381
381
  2
382
382
  /* Bool */
383
- ), this.payload.writeByte(t ? 1 : 0), this.valueWritten = !0;
383
+ ), this.payload.writeByte(e ? 1 : 0), this.valueWritten = !0;
384
384
  }
385
- writeValueGuid(t) {
385
+ writeValueGuid(e) {
386
386
  this.ensureValueType(
387
387
  14
388
388
  /* Guid */
389
389
  );
390
- const s = t instanceof d ? t.asBytes() : t;
390
+ const s = e instanceof T ? e.asBytes() : e;
391
391
  if (s.length !== 16)
392
392
  throw new Error("Guid payload must be 16 bytes");
393
393
  this.payload.writeBytes(s), this.valueWritten = !0;
@@ -398,46 +398,46 @@ class ie {
398
398
  /* Null */
399
399
  ), this.valueWritten = !0;
400
400
  }
401
- writeValueBinary(t) {
401
+ writeValueBinary(e) {
402
402
  this.ensureValueType(
403
403
  13
404
404
  /* Binary */
405
- ), this.payload.writeVarUInt(t.length), this.payload.writeBytes(t), this.valueWritten = !0;
405
+ ), this.payload.writeVarUInt(e.length), this.payload.writeBytes(e), this.valueWritten = !0;
406
406
  }
407
- writeValueString(t) {
407
+ writeValueString(e) {
408
408
  this.ensureValueType(
409
409
  12
410
410
  /* String */
411
411
  );
412
- const s = W.encode(t ?? "");
412
+ const s = W.encode(e ?? "");
413
413
  this.payload.writeVarUInt(s.length), this.payload.writeBytes(s), this.valueWritten = !0;
414
414
  }
415
- writeValueObject(t, s) {
415
+ writeValueObject(e, s) {
416
416
  this.ensureValueType(
417
417
  11
418
418
  /* Object */
419
419
  );
420
- const r = new B(t);
420
+ const r = new B(e);
421
421
  s(r);
422
422
  const i = r.finish();
423
423
  this.payload.writeVarUInt(i.length), this.payload.writeBytes(i), this.valueWritten = !0;
424
424
  }
425
- writeValueArray(t, s) {
425
+ writeValueArray(e, s) {
426
426
  this.ensureValueType(
427
427
  9
428
428
  /* Array */
429
429
  );
430
- const r = new Y(t);
430
+ const r = new Y(e);
431
431
  s(r);
432
432
  const i = r.finish();
433
433
  this.payload.writeBytes(i), this.valueWritten = !0;
434
434
  }
435
- writeValueDictionary(t, s, r) {
435
+ writeValueDictionary(e, s, r) {
436
436
  this.ensureValueType(
437
437
  10
438
438
  /* Dict */
439
439
  );
440
- const i = new Q(t, s);
440
+ const i = new Q(e, s);
441
441
  r(i);
442
442
  const n = i.finish();
443
443
  this.payload.writeBytes(n), this.valueWritten = !0;
@@ -449,36 +449,36 @@ class ie {
449
449
  this.completed = !0, this.onComplete();
450
450
  }
451
451
  }
452
- ensureKeyType(t) {
453
- if (this.keyType !== t)
454
- throw new Error(`Dictionary key type is ${U[this.keyType]}, expected ${U[t]}`);
452
+ ensureKeyType(e) {
453
+ if (this.keyType !== e)
454
+ throw new Error(`Dictionary key type is ${U[this.keyType]}, expected ${U[e]}`);
455
455
  }
456
- ensureValueType(t) {
457
- if (this.valueType !== t)
458
- throw new Error(`Dictionary value type is ${U[this.valueType]}, expected ${U[t]}`);
456
+ ensureValueType(e) {
457
+ if (this.valueType !== e)
458
+ throw new Error(`Dictionary value type is ${U[this.valueType]}, expected ${U[e]}`);
459
459
  }
460
460
  }
461
- class O {
462
- constructor(t, s, r) {
463
- this.buffer = t, this.version = s, this.offset = r, this.end = t.length - 1;
461
+ class g {
462
+ constructor(e, s, r) {
463
+ this.buffer = e, this.version = s, this.offset = r, this.end = e.length - 1;
464
464
  }
465
465
  offset;
466
466
  end;
467
- static create(t) {
468
- const s = G(t);
467
+ static create(e) {
468
+ const s = G(e);
469
469
  if (s.length < 2)
470
470
  throw new Error("Teleport payload too short");
471
471
  if (s[0] !== lt || s[s.length - 1] !== It)
472
472
  throw new Error("Teleport object missing markers");
473
473
  const r = { offset: 1 }, i = C(s, r, "InvalidLength");
474
- return new O(s, i, r.offset);
474
+ return new g(s, i, r.offset);
475
475
  }
476
476
  next() {
477
477
  if (this.offset >= this.end)
478
478
  return null;
479
479
  if (this.offset + 5 > this.buffer.length)
480
480
  throw new Error("Teleport object truncated");
481
- const t = Ie(this.buffer, this.offset);
481
+ const e = Ie(this.buffer, this.offset);
482
482
  this.offset += 4;
483
483
  const s = this.buffer[this.offset++], r = s >> 4 & 15;
484
484
  if ((s & 15) !== 0)
@@ -491,12 +491,12 @@ class O {
491
491
  const o = { offset: this.offset }, a = C(this.buffer, o, "InvalidLength");
492
492
  N(this.buffer, o.offset, a), n = this.buffer.subarray(o.offset, o.offset + a), this.offset = o.offset + a;
493
493
  }
494
- return new ne(t, r, n);
494
+ return new ne(e, r, n);
495
495
  }
496
496
  }
497
- class g {
498
- constructor(t, s) {
499
- this.type = t, this.payload = s;
497
+ class O {
498
+ constructor(e, s) {
499
+ this.type = e, this.payload = s;
500
500
  }
501
501
  asInt32() {
502
502
  return this.ensureType(
@@ -562,13 +562,13 @@ class g {
562
562
  return this.ensureType(
563
563
  14
564
564
  /* Guid */
565
- ), d.fromBytes(this.payload);
565
+ ), T.fromBytes(this.payload);
566
566
  }
567
567
  asObject() {
568
568
  return this.ensureType(
569
569
  11
570
570
  /* Object */
571
- ), O.create(this.payload);
571
+ ), g.create(this.payload);
572
572
  }
573
573
  asArray() {
574
574
  return this.ensureType(
@@ -582,14 +582,14 @@ class g {
582
582
  /* Dict */
583
583
  ), tt.create(this.payload);
584
584
  }
585
- ensureType(t) {
586
- if (this.type !== t)
587
- throw new Error(`Teleport value has type ${U[this.type]}, expected ${U[t]}`);
585
+ ensureType(e) {
586
+ if (this.type !== e)
587
+ throw new Error(`Teleport value has type ${U[this.type]}, expected ${U[e]}`);
588
588
  }
589
589
  }
590
- class ne extends g {
591
- constructor(t, s, r) {
592
- super(s, r), this.fieldId = t;
590
+ class ne extends O {
591
+ constructor(e, s, r) {
592
+ super(s, r), this.fieldId = e;
593
593
  }
594
594
  get isNull() {
595
595
  return this.type === 1;
@@ -601,17 +601,17 @@ class Z {
601
601
  count;
602
602
  offset;
603
603
  index = 0;
604
- constructor(t) {
605
- if (this.payload = t, t.length === 0)
604
+ constructor(e) {
605
+ if (this.payload = e, e.length === 0)
606
606
  throw new Error("Array payload too short");
607
- const s = t[0];
607
+ const s = e[0];
608
608
  if (this.elementType = s >> 4 & 15, (s & 15) !== 0)
609
609
  throw new Error("Array flags must be zero");
610
610
  const r = { offset: 1 };
611
- this.count = C(t, r, "ArrayMalformed"), this.offset = r.offset;
611
+ this.count = C(e, r, "ArrayMalformed"), this.offset = r.offset;
612
612
  }
613
- static create(t) {
614
- return new Z(G(t));
613
+ static create(e) {
614
+ return new Z(G(e));
615
615
  }
616
616
  next() {
617
617
  if (this.index >= this.count) {
@@ -619,8 +619,8 @@ class Z {
619
619
  throw new Error("Array payload contains trailing data");
620
620
  return null;
621
621
  }
622
- const t = this.readValue();
623
- return this.index++, t;
622
+ const e = this.readValue();
623
+ return this.index++, e;
624
624
  }
625
625
  readValue() {
626
626
  switch (this.elementType) {
@@ -632,40 +632,40 @@ class Z {
632
632
  case 4:
633
633
  case 6:
634
634
  case 14: {
635
- const t = F(this.elementType);
636
- N(this.payload, this.offset, t);
637
- const s = this.payload.subarray(this.offset, this.offset + t);
638
- return this.offset += t, new V(this.elementType, s);
635
+ const e = F(this.elementType);
636
+ N(this.payload, this.offset, e);
637
+ const s = this.payload.subarray(this.offset, this.offset + e);
638
+ return this.offset += e, new V(this.elementType, s);
639
639
  }
640
640
  case 12:
641
641
  case 13: {
642
- const t = { offset: this.offset }, s = C(this.payload, t, "ArrayMalformed");
643
- N(this.payload, t.offset, s);
644
- const r = this.payload.subarray(t.offset, t.offset + s);
645
- return this.offset = t.offset + s, new V(this.elementType, r);
642
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
643
+ N(this.payload, e.offset, s);
644
+ const r = this.payload.subarray(e.offset, e.offset + s);
645
+ return this.offset = e.offset + s, new V(this.elementType, r);
646
646
  }
647
647
  case 11: {
648
- const t = { offset: this.offset }, s = C(this.payload, t, "ArrayMalformed");
649
- N(this.payload, t.offset, s);
650
- const r = this.payload.subarray(t.offset, t.offset + s);
651
- return this.offset = t.offset + s, new V(11, r);
648
+ const e = { offset: this.offset }, s = C(this.payload, e, "ArrayMalformed");
649
+ N(this.payload, e.offset, s);
650
+ const r = this.payload.subarray(e.offset, e.offset + s);
651
+ return this.offset = e.offset + s, new V(11, r);
652
652
  }
653
653
  case 9: {
654
- const t = st(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
655
- return this.offset += t, new V(9, s);
654
+ const e = st(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
655
+ return this.offset += e, new V(9, s);
656
656
  }
657
657
  case 10: {
658
- const t = rt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
659
- return this.offset += t, new V(10, s);
658
+ const e = rt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
659
+ return this.offset += e, new V(10, s);
660
660
  }
661
661
  default:
662
662
  throw new Error(`Unsupported array element type ${U[this.elementType]}`);
663
663
  }
664
664
  }
665
665
  }
666
- class V extends g {
667
- constructor(t, s) {
668
- super(t, s);
666
+ class V extends O {
667
+ constructor(e, s) {
668
+ super(e, s);
669
669
  }
670
670
  }
671
671
  class tt {
@@ -675,17 +675,17 @@ class tt {
675
675
  count;
676
676
  offset;
677
677
  index = 0;
678
- constructor(t) {
679
- if (this.payload = t, t.length < 2)
678
+ constructor(e) {
679
+ if (this.payload = e, e.length < 2)
680
680
  throw new Error("Dictionary payload too short");
681
- if (this.keyType = t[0] >> 4 & 15, this.valueType = t[1] >> 4 & 15, (t[0] & 15) !== 0 || (t[1] & 15) !== 0)
681
+ if (this.keyType = e[0] >> 4 & 15, this.valueType = e[1] >> 4 & 15, (e[0] & 15) !== 0 || (e[1] & 15) !== 0)
682
682
  throw new Error("Dictionary key/value flags must be zero");
683
683
  et(this.keyType);
684
684
  const s = { offset: 2 };
685
- this.count = C(t, s, "DictMalformed"), this.offset = s.offset;
685
+ this.count = C(e, s, "DictMalformed"), this.offset = s.offset;
686
686
  }
687
- static create(t) {
688
- return new tt(G(t));
687
+ static create(e) {
688
+ return new tt(G(e));
689
689
  }
690
690
  next() {
691
691
  if (this.index >= this.count) {
@@ -693,21 +693,21 @@ class tt {
693
693
  throw new Error("Dictionary payload contains trailing data");
694
694
  return null;
695
695
  }
696
- const t = this.readKey(), s = this.readValue();
697
- return this.index++, new oe(t, s);
696
+ const e = this.readKey(), s = this.readValue();
697
+ return this.index++, new oe(e, s);
698
698
  }
699
699
  readKey() {
700
- const t = F(this.keyType);
701
- if (t >= 0) {
702
- N(this.payload, this.offset, t);
703
- const s = this.payload.subarray(this.offset, this.offset + t);
704
- return this.offset += t, new g(this.keyType, s);
700
+ const e = F(this.keyType);
701
+ if (e >= 0) {
702
+ N(this.payload, this.offset, e);
703
+ const s = this.payload.subarray(this.offset, this.offset + e);
704
+ return this.offset += e, new O(this.keyType, s);
705
705
  }
706
706
  if (this.keyType === 12 || this.keyType === 13) {
707
707
  const s = { offset: this.offset }, r = C(this.payload, s, "DictMalformed");
708
708
  N(this.payload, s.offset, r);
709
709
  const i = this.payload.subarray(s.offset, s.offset + r);
710
- return this.offset = s.offset + r, new g(this.keyType, i);
710
+ return this.offset = s.offset + r, new O(this.keyType, i);
711
711
  }
712
712
  throw new Error("Unsupported dictionary key type");
713
713
  }
@@ -715,24 +715,24 @@ class tt {
715
715
  switch (this.valueType) {
716
716
  case 12:
717
717
  case 13: {
718
- const t = { offset: this.offset }, s = C(this.payload, t, "DictMalformed");
719
- N(this.payload, t.offset, s);
720
- const r = this.payload.subarray(t.offset, t.offset + s);
721
- return this.offset = t.offset + s, new g(this.valueType, r);
718
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
719
+ N(this.payload, e.offset, s);
720
+ const r = this.payload.subarray(e.offset, e.offset + s);
721
+ return this.offset = e.offset + s, new O(this.valueType, r);
722
722
  }
723
723
  case 11: {
724
- const t = { offset: this.offset }, s = C(this.payload, t, "DictMalformed");
725
- N(this.payload, t.offset, s);
726
- const r = this.payload.subarray(t.offset, t.offset + s);
727
- return this.offset = t.offset + s, new g(11, r);
724
+ const e = { offset: this.offset }, s = C(this.payload, e, "DictMalformed");
725
+ N(this.payload, e.offset, s);
726
+ const r = this.payload.subarray(e.offset, e.offset + s);
727
+ return this.offset = e.offset + s, new O(11, r);
728
728
  }
729
729
  case 9: {
730
- const t = st(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
731
- return this.offset += t, new g(9, s);
730
+ const e = st(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
731
+ return this.offset += e, new O(9, s);
732
732
  }
733
733
  case 10: {
734
- const t = rt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
735
- return this.offset += t, new g(10, s);
734
+ const e = rt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + e);
735
+ return this.offset += e, new O(10, s);
736
736
  }
737
737
  case 3:
738
738
  case 5:
@@ -743,10 +743,10 @@ class tt {
743
743
  case 6:
744
744
  case 14:
745
745
  case 1: {
746
- const t = F(this.valueType);
747
- N(this.payload, this.offset, t);
748
- const s = this.payload.subarray(this.offset, this.offset + t);
749
- return this.offset += t, new g(this.valueType, s);
746
+ const e = F(this.valueType);
747
+ N(this.payload, this.offset, e);
748
+ const s = this.payload.subarray(this.offset, this.offset + e);
749
+ return this.offset += e, new O(this.valueType, s);
750
750
  }
751
751
  default:
752
752
  throw new Error(`Unsupported dictionary value type ${U[this.valueType]}`);
@@ -754,90 +754,90 @@ class tt {
754
754
  }
755
755
  }
756
756
  class oe {
757
- constructor(t, s) {
758
- this.key = t, this.value = s;
757
+ constructor(e, s) {
758
+ this.key = e, this.value = s;
759
759
  }
760
760
  }
761
- class d {
762
- constructor(t) {
763
- this.bytes = t;
761
+ class T {
762
+ constructor(e) {
763
+ this.bytes = e;
764
764
  }
765
- static fromString(t) {
766
- if (!t)
765
+ static fromString(e) {
766
+ if (!e)
767
767
  throw new Error("Guid string is empty");
768
- const s = t.replace(/-/g, "");
768
+ const s = e.replace(/-/g, "");
769
769
  if (s.length !== 32)
770
770
  throw new Error("Guid string must be 32 hex characters");
771
- const r = new Uint8Array(16), i = d.parseHexSlice(s, 0, 8), n = d.parseHexSlice(s, 8, 4), o = d.parseHexSlice(s, 12, 4);
772
- d.writeUInt32LE(r, 0, i), d.writeUInt16LE(r, 4, n), d.writeUInt16LE(r, 6, o);
771
+ const r = new Uint8Array(16), i = T.parseHexSlice(s, 0, 8), n = T.parseHexSlice(s, 8, 4), o = T.parseHexSlice(s, 12, 4);
772
+ T.writeUInt32LE(r, 0, i), T.writeUInt16LE(r, 4, n), T.writeUInt16LE(r, 6, o);
773
773
  for (let a = 0; a < 8; a++)
774
- r[8 + a] = d.parseHexSlice(s, 16 + a * 2, 2);
775
- return new d(r);
774
+ r[8 + a] = T.parseHexSlice(s, 16 + a * 2, 2);
775
+ return new T(r);
776
776
  }
777
- static fromBytes(t) {
778
- if (t.length !== 16)
777
+ static fromBytes(e) {
778
+ if (e.length !== 16)
779
779
  throw new Error("Guid byte array must be 16 bytes");
780
- return new d(Uint8Array.from(t));
780
+ return new T(Uint8Array.from(e));
781
781
  }
782
782
  static createZero() {
783
- return new d(new Uint8Array(16));
783
+ return new T(new Uint8Array(16));
784
784
  }
785
785
  static createRandom() {
786
- const t = new Uint8Array(16), s = globalThis.crypto;
786
+ const e = new Uint8Array(16), s = globalThis.crypto;
787
787
  if (s?.getRandomValues)
788
- s.getRandomValues(t);
788
+ s.getRandomValues(e);
789
789
  else
790
- for (let r = 0; r < t.length; r++)
791
- t[r] = Math.floor(Math.random() * 256);
792
- return t[6] = t[6] & 15 | 64, t[8] = t[8] & 63 | 128, new d(t);
790
+ for (let r = 0; r < e.length; r++)
791
+ e[r] = Math.floor(Math.random() * 256);
792
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new T(e);
793
793
  }
794
794
  toString() {
795
- const t = this.bytes;
795
+ const e = this.bytes;
796
796
  return [
797
- d.toHex(d.readUInt32LE(t, 0), 8),
798
- d.toHex(d.readUInt16LE(t, 4), 4),
799
- d.toHex(d.readUInt16LE(t, 6), 4),
800
- ot(t.subarray(8, 10)),
801
- ot(t.subarray(10, 16))
797
+ T.toHex(T.readUInt32LE(e, 0), 8),
798
+ T.toHex(T.readUInt16LE(e, 4), 4),
799
+ T.toHex(T.readUInt16LE(e, 6), 4),
800
+ ot(e.subarray(8, 10)),
801
+ ot(e.subarray(10, 16))
802
802
  ].join("-");
803
803
  }
804
804
  asBytes() {
805
805
  return this.bytes.slice();
806
806
  }
807
- static parseHexSlice(t, s, r) {
808
- const i = t.substr(s, r), n = Number.parseInt(i, 16);
807
+ static parseHexSlice(e, s, r) {
808
+ const i = e.substr(s, r), n = Number.parseInt(i, 16);
809
809
  if (Number.isNaN(n))
810
810
  throw new Error("Guid string contains invalid characters");
811
811
  return n >>> 0;
812
812
  }
813
- static writeUInt32LE(t, s, r) {
813
+ static writeUInt32LE(e, s, r) {
814
814
  const i = r >>> 0;
815
- t[s] = i & 255, t[s + 1] = i >>> 8 & 255, t[s + 2] = i >>> 16 & 255, t[s + 3] = i >>> 24 & 255;
815
+ e[s] = i & 255, e[s + 1] = i >>> 8 & 255, e[s + 2] = i >>> 16 & 255, e[s + 3] = i >>> 24 & 255;
816
816
  }
817
- static writeUInt16LE(t, s, r) {
817
+ static writeUInt16LE(e, s, r) {
818
818
  const i = r & 65535;
819
- t[s] = i & 255, t[s + 1] = i >>> 8 & 255;
819
+ e[s] = i & 255, e[s + 1] = i >>> 8 & 255;
820
820
  }
821
- static readUInt32LE(t, s) {
822
- return (t[s] | t[s + 1] << 8 | t[s + 2] << 16 | t[s + 3] << 24) >>> 0;
821
+ static readUInt32LE(e, s) {
822
+ return (e[s] | e[s + 1] << 8 | e[s + 2] << 16 | e[s + 3] << 24) >>> 0;
823
823
  }
824
- static readUInt16LE(t, s) {
825
- return (t[s] | t[s + 1] << 8) & 65535;
824
+ static readUInt16LE(e, s) {
825
+ return (e[s] | e[s + 1] << 8) & 65535;
826
826
  }
827
- static toHex(t, s) {
828
- return (t >>> 0).toString(16).padStart(s, "0");
827
+ static toHex(e, s) {
828
+ return (e >>> 0).toString(16).padStart(s, "0");
829
829
  }
830
830
  }
831
- class p {
831
+ class b {
832
832
  static INITIAL_CAPACITY = 256;
833
833
  buffer;
834
834
  dataView;
835
835
  length = 0;
836
836
  constructor() {
837
- this.buffer = new Uint8Array(p.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
837
+ this.buffer = new Uint8Array(b.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
838
838
  }
839
- ensureCapacity(t) {
840
- const s = this.length + t;
839
+ ensureCapacity(e) {
840
+ const s = this.length + e;
841
841
  if (s <= this.buffer.length)
842
842
  return;
843
843
  let r = this.buffer.length;
@@ -846,32 +846,32 @@ class p {
846
846
  const i = new Uint8Array(r);
847
847
  i.set(this.buffer.subarray(0, this.length)), this.buffer = i, this.dataView = new DataView(this.buffer.buffer);
848
848
  }
849
- writeByte(t) {
850
- this.ensureCapacity(1), this.buffer[this.length++] = t & 255;
849
+ writeByte(e) {
850
+ this.ensureCapacity(1), this.buffer[this.length++] = e & 255;
851
851
  }
852
- writeBytes(t) {
853
- this.ensureCapacity(t.length), this.buffer.set(t, this.length), this.length += t.length;
852
+ writeBytes(e) {
853
+ this.ensureCapacity(e.length), this.buffer.set(e, this.length), this.length += e.length;
854
854
  }
855
- writeUInt32(t) {
856
- this.ensureCapacity(4), this.dataView.setUint32(this.length, t >>> 0, !0), this.length += 4;
855
+ writeUInt32(e) {
856
+ this.ensureCapacity(4), this.dataView.setUint32(this.length, e >>> 0, !0), this.length += 4;
857
857
  }
858
- writeInt32(t) {
859
- this.ensureCapacity(4), this.dataView.setInt32(this.length, t | 0, !0), this.length += 4;
858
+ writeInt32(e) {
859
+ this.ensureCapacity(4), this.dataView.setInt32(this.length, e | 0, !0), this.length += 4;
860
860
  }
861
- writeFloat32(t) {
862
- this.ensureCapacity(4), this.dataView.setFloat32(this.length, t, !0), this.length += 4;
861
+ writeFloat32(e) {
862
+ this.ensureCapacity(4), this.dataView.setFloat32(this.length, e, !0), this.length += 4;
863
863
  }
864
- writeFloat64(t) {
865
- this.ensureCapacity(8), this.dataView.setFloat64(this.length, t, !0), this.length += 8;
864
+ writeFloat64(e) {
865
+ this.ensureCapacity(8), this.dataView.setFloat64(this.length, e, !0), this.length += 8;
866
866
  }
867
- writeBigInt64(t) {
868
- this.ensureCapacity(8), this.dataView.setBigInt64(this.length, t, !0), this.length += 8;
867
+ writeBigInt64(e) {
868
+ this.ensureCapacity(8), this.dataView.setBigInt64(this.length, e, !0), this.length += 8;
869
869
  }
870
- writeBigUInt64(t) {
871
- this.ensureCapacity(8), this.dataView.setBigUint64(this.length, t, !0), this.length += 8;
870
+ writeBigUInt64(e) {
871
+ this.ensureCapacity(8), this.dataView.setBigUint64(this.length, e, !0), this.length += 8;
872
872
  }
873
- writeVarUInt(t) {
874
- let s = t >>> 0;
873
+ writeVarUInt(e) {
874
+ let s = e >>> 0;
875
875
  for (; s >= 128; )
876
876
  this.ensureCapacity(1), this.buffer[this.length++] = s & 127 | 128, s >>>= 7;
877
877
  this.ensureCapacity(1), this.buffer[this.length++] = s & 127;
@@ -880,12 +880,12 @@ class p {
880
880
  return this.buffer.slice(0, this.length);
881
881
  }
882
882
  }
883
- function C(e, t, s) {
884
- if (t.offset >= e.length)
883
+ function C(t, e, s) {
884
+ if (e.offset >= t.length)
885
885
  throw new Error(s);
886
886
  let r = 0, i = 0, n = 0;
887
- for (; t.offset < e.length; ) {
888
- const o = e[t.offset++];
887
+ for (; e.offset < t.length; ) {
888
+ const o = t[e.offset++];
889
889
  if (n++, r |= (o & 127) << i, (o & 128) === 0) {
890
890
  if (n !== ae(r))
891
891
  throw new Error("Teleport VarUInt is not canonical");
@@ -896,19 +896,19 @@ function C(e, t, s) {
896
896
  }
897
897
  throw new Error(s);
898
898
  }
899
- function ae(e) {
900
- return e < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5;
899
+ function ae(t) {
900
+ return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
901
901
  }
902
- function K(e, t = 0) {
903
- if ((t & 240) !== 0)
902
+ function K(t, e = 0) {
903
+ if ((e & 240) !== 0)
904
904
  throw new Error("Teleport flags must fit into 4 bits");
905
- return (e & 15) << 4 | t & 15;
905
+ return (t & 15) << 4 | e & 15;
906
906
  }
907
- function le(e) {
908
- return e === 12 || e === 13 || e === 9 || e === 11 || e === 10;
907
+ function le(t) {
908
+ return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
909
909
  }
910
- function F(e) {
911
- switch (e) {
910
+ function F(t) {
911
+ switch (t) {
912
912
  case 3:
913
913
  case 5:
914
914
  case 7:
@@ -927,1253 +927,1253 @@ function F(e) {
927
927
  return -1;
928
928
  }
929
929
  }
930
- function et(e) {
931
- if (e === 9 || e === 11 || e === 10 || e === 1)
930
+ function et(t) {
931
+ if (t === 9 || t === 11 || t === 10 || t === 1)
932
932
  throw new Error("Dictionary keys must be primitive Teleport types");
933
933
  }
934
- function N(e, t, s) {
935
- if (t < 0 || s < 0 || t + s > e.length)
934
+ function N(t, e, s) {
935
+ if (e < 0 || s < 0 || e + s > t.length)
936
936
  throw new Error("Teleport payload exceeds bounds");
937
937
  }
938
- function Ie(e, t) {
939
- return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
938
+ function Ie(t, e) {
939
+ return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
940
940
  }
941
- function st(e, t) {
942
- if (t >= e.length)
941
+ function st(t, e) {
942
+ if (e >= t.length)
943
943
  throw new Error("Array payload exceeds bounds");
944
- const s = e[t], r = s >> 4 & 15;
944
+ const s = t[e], r = s >> 4 & 15;
945
945
  if ((s & 15) !== 0)
946
946
  throw new Error("Array flags must be zero");
947
- const i = { offset: t + 1 }, n = C(e, i, "ArrayMalformed"), o = F(r);
947
+ const i = { offset: e + 1 }, n = C(t, i, "ArrayMalformed"), o = F(r);
948
948
  if (o >= 0) {
949
949
  const l = o * n;
950
- return N(e, i.offset, l), i.offset + l - t;
950
+ return N(t, i.offset, l), i.offset + l - e;
951
951
  }
952
952
  let a = i.offset;
953
953
  for (let l = 0; l < n; l++)
954
- a = X(r, e, a, "ArrayMalformed");
955
- return a - t;
954
+ a = X(r, t, a, "ArrayMalformed");
955
+ return a - e;
956
956
  }
957
- function rt(e, t) {
958
- if (t + 2 > e.length)
957
+ function rt(t, e) {
958
+ if (e + 2 > t.length)
959
959
  throw new Error("Dictionary payload too short");
960
- const s = e[t] >> 4 & 15, r = e[t + 1] >> 4 & 15;
961
- if ((e[t] & 15) !== 0 || (e[t + 1] & 15) !== 0)
960
+ const s = t[e] >> 4 & 15, r = t[e + 1] >> 4 & 15;
961
+ if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
962
962
  throw new Error("Dictionary key/value flags must be zero");
963
963
  et(s);
964
- const i = { offset: t + 2 }, n = C(e, i, "DictMalformed");
964
+ const i = { offset: e + 2 }, n = C(t, i, "DictMalformed");
965
965
  let o = i.offset;
966
966
  for (let a = 0; a < n; a++)
967
- o = X(s, e, o, "DictMalformed"), o = X(r, e, o, "DictMalformed");
968
- return o - t;
967
+ o = X(s, t, o, "DictMalformed"), o = X(r, t, o, "DictMalformed");
968
+ return o - e;
969
969
  }
970
- function X(e, t, s, r) {
971
- const i = F(e);
970
+ function X(t, e, s, r) {
971
+ const i = F(t);
972
972
  if (i >= 0)
973
- return N(t, s, i), s + i;
974
- switch (e) {
973
+ return N(e, s, i), s + i;
974
+ switch (t) {
975
975
  case 12:
976
976
  case 13: {
977
- const n = { offset: s }, o = C(t, n, r);
978
- return N(t, n.offset, o), n.offset + o;
977
+ const n = { offset: s }, o = C(e, n, r);
978
+ return N(e, n.offset, o), n.offset + o;
979
979
  }
980
980
  case 11: {
981
- const n = { offset: s }, o = C(t, n, r);
982
- return N(t, n.offset, o), n.offset + o;
981
+ const n = { offset: s }, o = C(e, n, r);
982
+ return N(e, n.offset, o), n.offset + o;
983
983
  }
984
984
  case 9:
985
- return s + st(t, s);
985
+ return s + st(e, s);
986
986
  case 10:
987
- return s + rt(t, s);
987
+ return s + rt(e, s);
988
988
  default:
989
- throw new Error(`Unsupported Teleport type ${U[e]}`);
989
+ throw new Error(`Unsupported Teleport type ${U[t]}`);
990
990
  }
991
991
  }
992
- function ot(e) {
993
- return Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join("");
992
+ function ot(t) {
993
+ return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
994
994
  }
995
- function G(e) {
996
- return e instanceof Uint8Array ? e : new Uint8Array(e);
995
+ function G(t) {
996
+ return t instanceof Uint8Array ? t : new Uint8Array(t);
997
997
  }
998
- var ht = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(ht || {}), ct = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(ct || {}), Et = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e))(Et || {}), ut = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(ut || {}), _t = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(_t || {}), ft = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ft || {}), dt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(dt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(Tt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(yt || {}), St = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(St || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
999
- const he = 161083277, ce = 265814330, Ee = 1368629611, ue = 2431514951, _e = 2745379226, fe = 3282782683, de = 3284746250, Te = 4101844078;
1000
- function At(e) {
1001
- const t = {};
1002
- return Nt(t), t;
998
+ var ht = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ht || {}), ct = /* @__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))(ct || {}), Et = /* @__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))(Et || {}), _t = /* @__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))(_t || {}), 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 || {}), ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(ft || {}), Tt = /* @__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))(Tt || {}), 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 || {}), At = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(At || {}), St = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(St || {}), m = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", 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.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", 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))(m || {});
999
+ const he = 161083277, ce = 265814330, Ee = 1368629611, _e = 2431514951, ue = 2745379226, fe = 3282782683, Te = 3284746250, de = 4101844078;
1000
+ function yt(t) {
1001
+ const e = {};
1002
+ return Nt(e), e;
1003
1003
  }
1004
- function Nt(e) {
1005
- return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = ht.Unknown, e.CodecDetails = "", e.SampleRate = 0, e.Channels = 0, e.ShapeSets = void 0, e;
1004
+ function Nt(t) {
1005
+ return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = ht.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
1006
1006
  }
1007
- function ye(e, t) {
1008
- const s = t ?? At();
1009
- return Nt(s), Se(e, s), s;
1007
+ function Ae(t, e) {
1008
+ const s = e ?? yt();
1009
+ return Nt(s), Se(t, s), s;
1010
1010
  }
1011
- function Se(e, t) {
1011
+ function Se(t, e) {
1012
1012
  let s;
1013
- for (; (s = e.next()) !== null; )
1013
+ for (; (s = t.next()) !== null; )
1014
1014
  switch (s.fieldId) {
1015
1015
  case he: {
1016
1016
  if (s.isNull) throw new Error();
1017
- t.StreamId = s.asString();
1017
+ e.StreamId = s.asString();
1018
1018
  break;
1019
1019
  }
1020
1020
  case ce: {
1021
1021
  if (s.isNull) {
1022
- t.ShapeSets = void 0;
1022
+ e.ShapeSets = void 0;
1023
1023
  break;
1024
1024
  }
1025
- t.ShapeSets = Ae(s.asArray());
1025
+ e.ShapeSets = ye(s.asArray());
1026
1026
  break;
1027
1027
  }
1028
1028
  case Ee: {
1029
1029
  if (s.isNull) throw new Error();
1030
- t.Description = s.asString();
1030
+ e.Description = s.asString();
1031
1031
  break;
1032
1032
  }
1033
- case ue: {
1033
+ case _e: {
1034
1034
  if (s.isNull) throw new Error();
1035
- t.Channels = s.asInt32();
1035
+ e.Channels = s.asInt32();
1036
1036
  break;
1037
1037
  }
1038
- case _e: {
1038
+ case ue: {
1039
1039
  if (s.isNull) throw new Error();
1040
- t.CodecDetails = s.asString();
1040
+ e.CodecDetails = s.asString();
1041
1041
  break;
1042
1042
  }
1043
1043
  case fe: {
1044
1044
  if (s.isNull) throw new Error();
1045
- t.SourceType = s.asString();
1045
+ e.SourceType = s.asString();
1046
1046
  break;
1047
1047
  }
1048
- case de: {
1048
+ case Te: {
1049
1049
  if (s.isNull) throw new Error();
1050
- t.Codec = s.asInt32();
1050
+ e.Codec = s.asInt32();
1051
1051
  break;
1052
1052
  }
1053
- case Te: {
1053
+ case de: {
1054
1054
  if (s.isNull) throw new Error();
1055
- t.SampleRate = s.asInt32();
1055
+ e.SampleRate = s.asInt32();
1056
1056
  break;
1057
1057
  }
1058
1058
  }
1059
1059
  }
1060
- function Ae(e) {
1061
- const t = [];
1060
+ function ye(t) {
1061
+ const e = [];
1062
1062
  let s;
1063
- for (; (s = e.next()) !== null; )
1064
- t.push(De(s.asObject()));
1065
- return t;
1063
+ for (; (s = t.next()) !== null; )
1064
+ e.push(De(s.asObject()));
1065
+ return e;
1066
1066
  }
1067
1067
  const Ne = 1107713536, we = 1154362099, Ce = 1185721362;
1068
- function Ue(e) {
1069
- const t = {};
1070
- return wt(t), t;
1068
+ function Ue(t) {
1069
+ const e = {};
1070
+ return wt(e), e;
1071
1071
  }
1072
- function wt(e) {
1073
- return e.SetId = 0, e.Name = "", e.ShapeNames = [], e;
1072
+ function wt(t) {
1073
+ return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
1074
1074
  }
1075
- function De(e, t) {
1076
- const s = t ?? Ue();
1077
- return wt(s), Re(e, s), s;
1075
+ function De(t, e) {
1076
+ const s = e ?? Ue();
1077
+ return wt(s), Re(t, s), s;
1078
1078
  }
1079
- function Re(e, t) {
1079
+ function Re(t, e) {
1080
1080
  let s;
1081
- for (; (s = e.next()) !== null; )
1081
+ for (; (s = t.next()) !== null; )
1082
1082
  switch (s.fieldId) {
1083
1083
  case Ne: {
1084
1084
  if (s.isNull) throw new Error();
1085
- t.Name = s.asString();
1085
+ e.Name = s.asString();
1086
1086
  break;
1087
1087
  }
1088
1088
  case we: {
1089
1089
  if (s.isNull) throw new Error();
1090
- t.SetId = s.asUInt32();
1090
+ e.SetId = s.asUInt32();
1091
1091
  break;
1092
1092
  }
1093
1093
  case Ce: {
1094
1094
  if (s.isNull) throw new Error();
1095
- t.ShapeNames = me(s.asArray());
1095
+ e.ShapeNames = Le(s.asArray());
1096
1096
  break;
1097
1097
  }
1098
1098
  }
1099
1099
  }
1100
- function me(e) {
1101
- const t = [];
1100
+ function Le(t) {
1101
+ const e = [];
1102
1102
  let s;
1103
- for (; (s = e.next()) !== null; )
1104
- t.push(s.asString());
1105
- return t;
1103
+ for (; (s = t.next()) !== null; )
1104
+ e.push(s.asString());
1105
+ return e;
1106
1106
  }
1107
- const Le = 76337612, ge = 185396121, Oe = 250031587, pe = 388632637, be = 417197284, Pe = 469070965, Fe = 470595159, ke = 594855258, Ve = 781727218, ve = 834078886, Me = 1043273762, Be = 1236999138, Ge = 1286979607, xe = 1368629611, He = 1715899485, We = 1942830531, Ke = 1999510636, Ye = 2033288346, $e = 2079864626, je = 2142346422, Xe = 2232517119, ze = 2598291686, Je = 2719718823, qe = 2810953526, Qe = 2840065720, Ze = 2885165957, ts = 3542818975, es = 3586157513, ss = 3717933110, rs = 4062655306;
1108
- function is(e) {
1109
- const t = {};
1110
- return Ct(t), t;
1107
+ const me = 76337612, Oe = 185396121, ge = 250031587, be = 388632637, pe = 417197284, Pe = 469070965, Fe = 470595159, ke = 594855258, Ve = 781727218, ve = 834078886, Me = 1043273762, Be = 1236999138, Ge = 1286979607, xe = 1368629611, He = 1715899485, We = 1942830531, Ke = 1999510636, Ye = 2033288346, $e = 2079864626, je = 2142346422, Xe = 2232517119, ze = 2598291686, Je = 2719718823, qe = 2810953526, Qe = 2840065720, Ze = 2885165957, ts = 3542818975, es = 3586157513, ss = 3717933110, rs = 4062655306;
1108
+ function is(t) {
1109
+ const e = {};
1110
+ return Ct(e), e;
1111
1111
  }
1112
- function Ct(e) {
1113
- return e.ContextType = Et.Unknown, e.UserType = ft.Unknown, e.PayloadType = ut.Unknown, e.Description = "", e.UserId = "", e.DeviceId = "", e.ProductId = "", e.VersionId = "", e.InstallId = "", e.Locale = "", e.SessionId = -1, e.IsInternal = !1, e.IsReady = !1, e.HasInput = !1, e.ChannelLocale = "", e.EmbeddedSpaceId = "", e.AuthSessionId = "", e.ReceiveAllMessages = !1, e.PreciseJoinedAt = 0n, e.UserAgent = "", e.ClientType = ct.Unknown, e.UniqueSessionId = "", e.Parameters = /* @__PURE__ */ Object.create(null), e.SdkType = Tt.Unknown, e.ViewportWidth = 0, e.ViewportHeight = 0, e.Theme = "", e.Timezone = "", e.IsTouchDevice = !1, e.InitialPath = "", e;
1112
+ function Ct(t) {
1113
+ return t.ContextType = Et.Unknown, t.UserType = ft.Unknown, t.PayloadType = _t.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 = ct.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = dt.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
1114
1114
  }
1115
- function ns(e, t) {
1116
- const s = t ?? is();
1117
- return Ct(s), os(e, s), s;
1115
+ function ns(t, e) {
1116
+ const s = e ?? is();
1117
+ return Ct(s), os(t, s), s;
1118
1118
  }
1119
- function os(e, t) {
1119
+ function os(t, e) {
1120
1120
  let s;
1121
- for (; (s = e.next()) !== null; )
1121
+ for (; (s = t.next()) !== null; )
1122
1122
  switch (s.fieldId) {
1123
- case Le: {
1123
+ case me: {
1124
1124
  if (s.isNull) throw new Error();
1125
- t.DeviceId = s.asString();
1125
+ e.DeviceId = s.asString();
1126
1126
  break;
1127
1127
  }
1128
- case ge: {
1128
+ case Oe: {
1129
1129
  if (s.isNull) throw new Error();
1130
- t.InstallId = s.asString();
1130
+ e.InstallId = s.asString();
1131
1131
  break;
1132
1132
  }
1133
- case Oe: {
1133
+ case ge: {
1134
1134
  if (s.isNull) throw new Error();
1135
- t.Theme = s.asString();
1135
+ e.Theme = s.asString();
1136
1136
  break;
1137
1137
  }
1138
- case pe: {
1138
+ case be: {
1139
1139
  if (s.isNull) throw new Error();
1140
- t.UserAgent = s.asString();
1140
+ e.UserAgent = s.asString();
1141
1141
  break;
1142
1142
  }
1143
- case be: {
1143
+ case pe: {
1144
1144
  if (s.isNull) throw new Error();
1145
- t.ContextType = s.asInt32();
1145
+ e.ContextType = s.asInt32();
1146
1146
  break;
1147
1147
  }
1148
1148
  case Pe: {
1149
1149
  if (s.isNull) throw new Error();
1150
- t.HasInput = s.asBool();
1150
+ e.HasInput = s.asBool();
1151
1151
  break;
1152
1152
  }
1153
1153
  case Fe: {
1154
1154
  if (s.isNull) throw new Error();
1155
- t.UserType = s.asInt32();
1155
+ e.UserType = s.asInt32();
1156
1156
  break;
1157
1157
  }
1158
1158
  case ke: {
1159
1159
  if (s.isNull) throw new Error();
1160
- t.InitialPath = s.asString();
1160
+ e.InitialPath = s.asString();
1161
1161
  break;
1162
1162
  }
1163
1163
  case Ve: {
1164
1164
  if (s.isNull) throw new Error();
1165
- t.UserId = s.asString();
1165
+ e.UserId = s.asString();
1166
1166
  break;
1167
1167
  }
1168
1168
  case ve: {
1169
1169
  if (s.isNull) throw new Error();
1170
- t.ProductId = s.asString();
1170
+ e.ProductId = s.asString();
1171
1171
  break;
1172
1172
  }
1173
1173
  case Me: {
1174
1174
  if (s.isNull) throw new Error();
1175
- t.AuthSessionId = s.asString();
1175
+ e.AuthSessionId = s.asString();
1176
1176
  break;
1177
1177
  }
1178
1178
  case Be: {
1179
1179
  if (s.isNull) throw new Error();
1180
- t.ReceiveAllMessages = s.asBool();
1180
+ e.ReceiveAllMessages = s.asBool();
1181
1181
  break;
1182
1182
  }
1183
1183
  case Ge: {
1184
1184
  if (s.isNull) throw new Error();
1185
- t.ViewportHeight = s.asInt32();
1185
+ e.ViewportHeight = s.asInt32();
1186
1186
  break;
1187
1187
  }
1188
1188
  case xe: {
1189
1189
  if (s.isNull) throw new Error();
1190
- t.Description = s.asString();
1190
+ e.Description = s.asString();
1191
1191
  break;
1192
1192
  }
1193
1193
  case He: {
1194
1194
  if (s.isNull) throw new Error();
1195
- t.Locale = s.asString();
1195
+ e.Locale = s.asString();
1196
1196
  break;
1197
1197
  }
1198
1198
  case We: {
1199
1199
  if (s.isNull) throw new Error();
1200
- t.SdkType = s.asInt32();
1200
+ e.SdkType = s.asInt32();
1201
1201
  break;
1202
1202
  }
1203
1203
  case Ke: {
1204
1204
  if (s.isNull) throw new Error();
1205
- t.SessionId = s.asInt32();
1205
+ e.SessionId = s.asInt32();
1206
1206
  break;
1207
1207
  }
1208
1208
  case Ye: {
1209
1209
  if (s.isNull) throw new Error();
1210
- t.ViewportWidth = s.asInt32();
1210
+ e.ViewportWidth = s.asInt32();
1211
1211
  break;
1212
1212
  }
1213
1213
  case $e: {
1214
1214
  if (s.isNull) throw new Error();
1215
- t.PreciseJoinedAt = s.asUInt64();
1215
+ e.PreciseJoinedAt = s.asUInt64();
1216
1216
  break;
1217
1217
  }
1218
1218
  case je: {
1219
1219
  if (s.isNull) throw new Error();
1220
- t.PayloadType = s.asInt32();
1220
+ e.PayloadType = s.asInt32();
1221
1221
  break;
1222
1222
  }
1223
1223
  case Xe: {
1224
1224
  if (s.isNull) throw new Error();
1225
- t.IsTouchDevice = s.asBool();
1225
+ e.IsTouchDevice = s.asBool();
1226
1226
  break;
1227
1227
  }
1228
1228
  case ze: {
1229
1229
  if (s.isNull) throw new Error();
1230
- t.VersionId = s.asString();
1230
+ e.VersionId = s.asString();
1231
1231
  break;
1232
1232
  }
1233
1233
  case Je: {
1234
1234
  if (s.isNull) throw new Error();
1235
- t.UniqueSessionId = s.asString();
1235
+ e.UniqueSessionId = s.asString();
1236
1236
  break;
1237
1237
  }
1238
1238
  case qe: {
1239
1239
  if (s.isNull) throw new Error();
1240
- t.ClientType = s.asInt32();
1240
+ e.ClientType = s.asInt32();
1241
1241
  break;
1242
1242
  }
1243
1243
  case Qe: {
1244
1244
  if (s.isNull) throw new Error();
1245
- t.IsReady = s.asBool();
1245
+ e.IsReady = s.asBool();
1246
1246
  break;
1247
1247
  }
1248
1248
  case Ze: {
1249
1249
  if (s.isNull) throw new Error();
1250
- t.Parameters = as(s.asDictionary());
1250
+ e.Parameters = as(s.asDictionary());
1251
1251
  break;
1252
1252
  }
1253
1253
  case ts: {
1254
1254
  if (s.isNull) throw new Error();
1255
- t.Timezone = s.asString();
1255
+ e.Timezone = s.asString();
1256
1256
  break;
1257
1257
  }
1258
1258
  case es: {
1259
1259
  if (s.isNull) throw new Error();
1260
- t.IsInternal = s.asBool();
1260
+ e.IsInternal = s.asBool();
1261
1261
  break;
1262
1262
  }
1263
1263
  case ss: {
1264
1264
  if (s.isNull) throw new Error();
1265
- t.ChannelLocale = s.asString();
1265
+ e.ChannelLocale = s.asString();
1266
1266
  break;
1267
1267
  }
1268
1268
  case rs: {
1269
1269
  if (s.isNull) throw new Error();
1270
- t.EmbeddedSpaceId = s.asString();
1270
+ e.EmbeddedSpaceId = s.asString();
1271
1271
  break;
1272
1272
  }
1273
1273
  }
1274
1274
  }
1275
- function as(e) {
1276
- const t = /* @__PURE__ */ Object.create(null);
1275
+ function as(t) {
1276
+ const e = /* @__PURE__ */ Object.create(null);
1277
1277
  let s;
1278
- for (; (s = e.next()) !== null; ) {
1278
+ for (; (s = t.next()) !== null; ) {
1279
1279
  const r = s.key.asString();
1280
- t[r] = s.value.asString();
1280
+ e[r] = s.value.asString();
1281
1281
  }
1282
- return t;
1282
+ return e;
1283
1283
  }
1284
- const ls = 703025676, Is = 814454131, hs = 972460562, cs = 976255570, Es = 1368629611, us = 1479280922, _s = 1533537016, fs = 1909301063, ds = 2274386296, Ts = 2603556958, ys = 2885165957, Ss = 3568439632;
1285
- function As(e) {
1286
- const t = {};
1287
- return Ut(t), t;
1284
+ const ls = 703025676, Is = 814454131, hs = 972460562, cs = 976255570, Es = 1368629611, _s = 1479280922, us = 1533537016, fs = 1909301063, Ts = 2274386296, ds = 2603556958, As = 2885165957, Ss = 3568439632;
1285
+ function ys(t) {
1286
+ const e = {};
1287
+ return Ut(e), e;
1288
1288
  }
1289
- function Ut(e) {
1290
- return e.FunctionId = d.fromBytes(new Uint8Array(16)), e.FunctionName = "", e.Parameters = [], e.ResultTypeName = "", e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.IsCancellable = !1, e.Description = "", e.LlmInlineResult = !1, e.LlmCallOnlyOnce = !1, e.RequiresInstance = !1, e.Versions = [], e;
1289
+ function Ut(t) {
1290
+ 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.Versions = [], t;
1291
1291
  }
1292
- function Ns(e, t) {
1293
- const s = t ?? As();
1294
- return Ut(s), ws(e, s), s;
1292
+ function Ns(t, e) {
1293
+ const s = e ?? ys();
1294
+ return Ut(s), ws(t, s), s;
1295
1295
  }
1296
- function ws(e, t) {
1296
+ function ws(t, e) {
1297
1297
  let s;
1298
- for (; (s = e.next()) !== null; )
1298
+ for (; (s = t.next()) !== null; )
1299
1299
  switch (s.fieldId) {
1300
1300
  case ls: {
1301
1301
  if (s.isNull) throw new Error();
1302
- t.ResultTypeName = s.asString();
1302
+ e.ResultTypeName = s.asString();
1303
1303
  break;
1304
1304
  }
1305
1305
  case Is: {
1306
1306
  if (s.isNull) throw new Error();
1307
- t.FunctionName = s.asString();
1307
+ e.FunctionName = s.asString();
1308
1308
  break;
1309
1309
  }
1310
1310
  case hs: {
1311
1311
  if (s.isNull) throw new Error();
1312
- t.EnumerableItemTypeName = s.asString();
1312
+ e.EnumerableItemTypeName = s.asString();
1313
1313
  break;
1314
1314
  }
1315
1315
  case cs: {
1316
1316
  if (s.isNull) throw new Error();
1317
- t.FunctionId = s.asGuid();
1317
+ e.FunctionId = s.asGuid();
1318
1318
  break;
1319
1319
  }
1320
1320
  case Es: {
1321
1321
  if (s.isNull) throw new Error();
1322
- t.Description = s.asString();
1322
+ e.Description = s.asString();
1323
1323
  break;
1324
1324
  }
1325
- case us: {
1325
+ case _s: {
1326
1326
  if (s.isNull) throw new Error();
1327
- t.IsCancellable = s.asBool();
1327
+ e.IsCancellable = s.asBool();
1328
1328
  break;
1329
1329
  }
1330
- case _s: {
1330
+ case us: {
1331
1331
  if (s.isNull) throw new Error();
1332
- t.RequiresInstance = s.asBool();
1332
+ e.RequiresInstance = s.asBool();
1333
1333
  break;
1334
1334
  }
1335
1335
  case fs: {
1336
1336
  if (s.isNull) throw new Error();
1337
- t.Versions = Cs(s.asArray());
1337
+ e.Versions = Cs(s.asArray());
1338
1338
  break;
1339
1339
  }
1340
- case ds: {
1340
+ case Ts: {
1341
1341
  if (s.isNull) throw new Error();
1342
- t.LlmInlineResult = s.asBool();
1342
+ e.LlmInlineResult = s.asBool();
1343
1343
  break;
1344
1344
  }
1345
- case Ts: {
1345
+ case ds: {
1346
1346
  if (s.isNull) throw new Error();
1347
- t.IsEnumerable = s.asBool();
1347
+ e.IsEnumerable = s.asBool();
1348
1348
  break;
1349
1349
  }
1350
- case ys: {
1350
+ case As: {
1351
1351
  if (s.isNull) throw new Error();
1352
- t.Parameters = Us(s.asArray());
1352
+ e.Parameters = Us(s.asArray());
1353
1353
  break;
1354
1354
  }
1355
1355
  case Ss: {
1356
1356
  if (s.isNull) throw new Error();
1357
- t.LlmCallOnlyOnce = s.asBool();
1357
+ e.LlmCallOnlyOnce = s.asBool();
1358
1358
  break;
1359
1359
  }
1360
1360
  }
1361
1361
  }
1362
- function Cs(e) {
1363
- const t = [];
1362
+ function Cs(t) {
1363
+ const e = [];
1364
1364
  let s;
1365
- for (; (s = e.next()) !== null; )
1366
- t.push(s.asString());
1367
- return t;
1365
+ for (; (s = t.next()) !== null; )
1366
+ e.push(s.asString());
1367
+ return e;
1368
1368
  }
1369
- function Us(e) {
1370
- const t = [];
1369
+ function Us(t) {
1370
+ const e = [];
1371
1371
  let s;
1372
- for (; (s = e.next()) !== null; )
1373
- t.push(ks(s.asObject()));
1374
- return t;
1372
+ for (; (s = t.next()) !== null; )
1373
+ e.push(ks(s.asObject()));
1374
+ return e;
1375
1375
  }
1376
- const Ds = 607861992, Rs = 894485888, ms = 972460562, Ls = 1368629611, gs = 1883521406, Os = 2603556958, ps = 3609695522, bs = 4075263697, Ps = 4257460908;
1377
- function Fs(e) {
1378
- const t = {};
1379
- return Dt(t), t;
1376
+ const Ds = 607861992, Rs = 894485888, Ls = 972460562, ms = 1368629611, Os = 1883521406, gs = 2603556958, bs = 3609695522, ps = 4075263697, Ps = 4257460908;
1377
+ function Fs(t) {
1378
+ const e = {};
1379
+ return Dt(e), e;
1380
1380
  }
1381
- function Dt(e) {
1382
- return e.ParameterIndex = 0, e.ParameterName = "", e.TypeName = "", e.HasDefaultValue = !1, e.DefaultValueJson = "", e.DefaultValueData = new Uint8Array(0), e.IsEnumerable = !1, e.EnumerableItemTypeName = "", e.Description = "", e;
1381
+ function Dt(t) {
1382
+ 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;
1383
1383
  }
1384
- function ks(e, t) {
1385
- const s = t ?? Fs();
1386
- return Dt(s), Vs(e, s), s;
1384
+ function ks(t, e) {
1385
+ const s = e ?? Fs();
1386
+ return Dt(s), Vs(t, s), s;
1387
1387
  }
1388
- function Vs(e, t) {
1388
+ function Vs(t, e) {
1389
1389
  let s;
1390
- for (; (s = e.next()) !== null; )
1390
+ for (; (s = t.next()) !== null; )
1391
1391
  switch (s.fieldId) {
1392
1392
  case Ds: {
1393
1393
  if (s.isNull) throw new Error();
1394
- t.HasDefaultValue = s.asBool();
1394
+ e.HasDefaultValue = s.asBool();
1395
1395
  break;
1396
1396
  }
1397
1397
  case Rs: {
1398
1398
  if (s.isNull) throw new Error();
1399
- t.DefaultValueJson = s.asString();
1400
- break;
1401
- }
1402
- case ms: {
1403
- if (s.isNull) throw new Error();
1404
- t.EnumerableItemTypeName = s.asString();
1399
+ e.DefaultValueJson = s.asString();
1405
1400
  break;
1406
1401
  }
1407
1402
  case Ls: {
1408
1403
  if (s.isNull) throw new Error();
1409
- t.Description = s.asString();
1404
+ e.EnumerableItemTypeName = s.asString();
1410
1405
  break;
1411
1406
  }
1412
- case gs: {
1407
+ case ms: {
1413
1408
  if (s.isNull) throw new Error();
1414
- t.DefaultValueData = s.asBinary();
1409
+ e.Description = s.asString();
1415
1410
  break;
1416
1411
  }
1417
1412
  case Os: {
1418
1413
  if (s.isNull) throw new Error();
1419
- t.IsEnumerable = s.asBool();
1414
+ e.DefaultValueData = s.asBinary();
1420
1415
  break;
1421
1416
  }
1422
- case ps: {
1417
+ case gs: {
1423
1418
  if (s.isNull) throw new Error();
1424
- t.TypeName = s.asString();
1419
+ e.IsEnumerable = s.asBool();
1425
1420
  break;
1426
1421
  }
1427
1422
  case bs: {
1428
1423
  if (s.isNull) throw new Error();
1429
- t.ParameterName = s.asString();
1424
+ e.TypeName = s.asString();
1425
+ break;
1426
+ }
1427
+ case ps: {
1428
+ if (s.isNull) throw new Error();
1429
+ e.ParameterName = s.asString();
1430
1430
  break;
1431
1431
  }
1432
1432
  case Ps: {
1433
1433
  if (s.isNull) throw new Error();
1434
- t.ParameterIndex = s.asInt32();
1434
+ e.ParameterIndex = s.asInt32();
1435
1435
  break;
1436
1436
  }
1437
1437
  }
1438
1438
  }
1439
1439
  const vs = 3167053791, Ms = 3342364356, Bs = 3612929027;
1440
- function Rt(e) {
1441
- const t = {};
1442
- return mt(t), t;
1440
+ function Rt(t) {
1441
+ const e = {};
1442
+ return Lt(e), e;
1443
1443
  }
1444
- function mt(e) {
1445
- return e.Category = "", e.Type = _t.Face, e.FaceBlendshapes = [], e;
1444
+ function Lt(t) {
1445
+ return t.Category = "", t.Type = ut.Face, t.FaceBlendshapes = [], t;
1446
1446
  }
1447
- function Gs(e, t) {
1448
- const s = t ?? Rt();
1449
- return mt(s), xs(e, s), s;
1447
+ function Gs(t, e) {
1448
+ const s = e ?? Rt();
1449
+ return Lt(s), xs(t, s), s;
1450
1450
  }
1451
- function xs(e, t) {
1451
+ function xs(t, e) {
1452
1452
  let s;
1453
- for (; (s = e.next()) !== null; )
1453
+ for (; (s = t.next()) !== null; )
1454
1454
  switch (s.fieldId) {
1455
1455
  case vs: {
1456
1456
  if (s.isNull) throw new Error();
1457
- t.Type = s.asInt32();
1457
+ e.Type = s.asInt32();
1458
1458
  break;
1459
1459
  }
1460
1460
  case Ms: {
1461
1461
  if (s.isNull) throw new Error();
1462
- t.FaceBlendshapes = Hs(s.asArray());
1462
+ e.FaceBlendshapes = Hs(s.asArray());
1463
1463
  break;
1464
1464
  }
1465
1465
  case Bs: {
1466
1466
  if (s.isNull) throw new Error();
1467
- t.Category = s.asString();
1467
+ e.Category = s.asString();
1468
1468
  break;
1469
1469
  }
1470
1470
  }
1471
1471
  }
1472
- function Hs(e) {
1473
- const t = [];
1472
+ function Hs(t) {
1473
+ const e = [];
1474
1474
  let s;
1475
- for (; (s = e.next()) !== null; )
1476
- t.push(s.asString());
1477
- return t;
1475
+ for (; (s = t.next()) !== null; )
1476
+ e.push(s.asString());
1477
+ return e;
1478
1478
  }
1479
1479
  const Ws = 3612929027;
1480
- function Lt(e) {
1481
- const t = {};
1482
- return gt(t), t;
1480
+ function mt(t) {
1481
+ const e = {};
1482
+ return Ot(e), e;
1483
1483
  }
1484
- function gt(e) {
1485
- return e.Category = "", e;
1484
+ function Ot(t) {
1485
+ return t.Category = "", t;
1486
1486
  }
1487
- function Ks(e, t) {
1488
- const s = t ?? Lt();
1489
- return gt(s), Ys(e, s), s;
1487
+ function Ks(t, e) {
1488
+ const s = e ?? mt();
1489
+ return Ot(s), Ys(t, s), s;
1490
1490
  }
1491
- function Ys(e, t) {
1491
+ function Ys(t, e) {
1492
1492
  let s;
1493
- for (; (s = e.next()) !== null; )
1493
+ for (; (s = t.next()) !== null; )
1494
1494
  switch (s.fieldId) {
1495
1495
  case Ws: {
1496
1496
  if (s.isNull) throw new Error();
1497
- t.Category = s.asString();
1497
+ e.Category = s.asString();
1498
1498
  break;
1499
1499
  }
1500
1500
  }
1501
1501
  }
1502
1502
  const $s = 161083277, js = 164808083, Xs = 1368629611, zs = 2745379226, Js = 2950031986, qs = 3282782683, Qs = 3284746250, Zs = 4065070594;
1503
- function Ot(e) {
1504
- const t = {};
1505
- return pt(t), t;
1503
+ function gt(t) {
1504
+ const e = {};
1505
+ return bt(e), e;
1506
1506
  }
1507
- function pt(e) {
1508
- return e.StreamId = "", e.Description = "", e.SourceType = "", e.Codec = dt.H264, e.CodecDetails = "", e.Width = 0, e.Height = 0, e.Framerate = 30, e;
1507
+ function bt(t) {
1508
+ return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = Tt.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
1509
1509
  }
1510
- function tr(e, t) {
1511
- const s = t ?? Ot();
1512
- return pt(s), er(e, s), s;
1510
+ function tr(t, e) {
1511
+ const s = e ?? gt();
1512
+ return bt(s), er(t, s), s;
1513
1513
  }
1514
- function er(e, t) {
1514
+ function er(t, e) {
1515
1515
  let s;
1516
- for (; (s = e.next()) !== null; )
1516
+ for (; (s = t.next()) !== null; )
1517
1517
  switch (s.fieldId) {
1518
1518
  case $s: {
1519
1519
  if (s.isNull) throw new Error();
1520
- t.StreamId = s.asString();
1520
+ e.StreamId = s.asString();
1521
1521
  break;
1522
1522
  }
1523
1523
  case js: {
1524
1524
  if (s.isNull) throw new Error();
1525
- t.Framerate = s.asFloat64();
1525
+ e.Framerate = s.asFloat64();
1526
1526
  break;
1527
1527
  }
1528
1528
  case Xs: {
1529
1529
  if (s.isNull) throw new Error();
1530
- t.Description = s.asString();
1530
+ e.Description = s.asString();
1531
1531
  break;
1532
1532
  }
1533
1533
  case zs: {
1534
1534
  if (s.isNull) throw new Error();
1535
- t.CodecDetails = s.asString();
1535
+ e.CodecDetails = s.asString();
1536
1536
  break;
1537
1537
  }
1538
1538
  case Js: {
1539
1539
  if (s.isNull) throw new Error();
1540
- t.Height = s.asInt32();
1540
+ e.Height = s.asInt32();
1541
1541
  break;
1542
1542
  }
1543
1543
  case qs: {
1544
1544
  if (s.isNull) throw new Error();
1545
- t.SourceType = s.asString();
1545
+ e.SourceType = s.asString();
1546
1546
  break;
1547
1547
  }
1548
1548
  case Qs: {
1549
1549
  if (s.isNull) throw new Error();
1550
- t.Codec = s.asInt32();
1550
+ e.Codec = s.asInt32();
1551
1551
  break;
1552
1552
  }
1553
1553
  case Zs: {
1554
1554
  if (s.isNull) throw new Error();
1555
- t.Width = s.asInt32();
1555
+ e.Width = s.asInt32();
1556
1556
  break;
1557
1557
  }
1558
1558
  }
1559
1559
  }
1560
- const sr = 65539, rr = 693643444, ir = 1144553441, nr = 1497620243, or = 1559330978, ar = 1976546434, lr = 1999510636, Ir = 2271236852, hr = 2277643855, cr = 2469008121, Er = 3042922213, ur = 3064612128, _r = 3219210453, fr = 3504054055, dr = 3678477544, Tr = 3696445035, yr = 3707543140, Sr = 3712281496, Ar = 3895362455, Nr = 3897397815, wr = 4225107827;
1561
- function Cr(e) {
1562
- const t = {};
1563
- return bt(t), t;
1560
+ const sr = 65539, rr = 693643444, ir = 1144553441, nr = 1497620243, or = 1559330978, ar = 1976546434, lr = 1999510636, Ir = 2271236852, hr = 2277643855, cr = 2469008121, Er = 3042922213, _r = 3064612128, ur = 3219210453, fr = 3504054055, Tr = 3678477544, dr = 3696445035, Ar = 3707543140, Sr = 3712281496, yr = 3895362455, Nr = 3897397815, wr = 4225107827;
1561
+ function Cr(t) {
1562
+ const e = {};
1563
+ return pt(e), e;
1564
1564
  }
1565
- function bt(e) {
1566
- return e.Clients = /* @__PURE__ */ Object.create(null), e.Functions = /* @__PURE__ */ Object.create(null), e.UIStreams = /* @__PURE__ */ Object.create(null), e.AudioStreams = /* @__PURE__ */ Object.create(null), e.VideoStreams = /* @__PURE__ */ Object.create(null), e.TrackingStreams = /* @__PURE__ */ Object.create(null), e.SpaceId = "", e.ChannelId = "", e.SessionId = "", e.ChannelUrl = "", e.SessionChannelUrl = "", e.FirstUserId = "", e.PrimaryUserId = "", e.OrganisationName = "", e.SpaceName = "", e.ChannelName = "", e.ServerRunType = yt.Local, e.AppSourceType = St.Bundle, e.PublicAccess = !1, e.DebugMode = !1, e;
1565
+ function pt(t) {
1566
+ return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__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.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = At.Local, t.AppSourceType = St.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
1567
1567
  }
1568
- function Ur(e, t) {
1569
- const s = O.create(e);
1570
- return Dr(s, t);
1568
+ function Ur(t, e) {
1569
+ const s = g.create(t);
1570
+ return Dr(s, e);
1571
1571
  }
1572
- function Dr(e, t) {
1573
- const s = t ?? Cr();
1574
- return bt(s), Rr(e, s), s;
1572
+ function Dr(t, e) {
1573
+ const s = e ?? Cr();
1574
+ return pt(s), Rr(t, s), s;
1575
1575
  }
1576
- function Rr(e, t) {
1576
+ function Rr(t, e) {
1577
1577
  let s;
1578
- for (; (s = e.next()) !== null; )
1578
+ for (; (s = t.next()) !== null; )
1579
1579
  switch (s.fieldId) {
1580
1580
  case rr: {
1581
1581
  if (s.isNull) throw new Error();
1582
- t.FirstUserId = s.asString();
1582
+ e.FirstUserId = s.asString();
1583
1583
  break;
1584
1584
  }
1585
1585
  case ir: {
1586
1586
  if (s.isNull) throw new Error();
1587
- t.Clients = Lr(s.asDictionary());
1587
+ e.Clients = mr(s.asDictionary());
1588
1588
  break;
1589
1589
  }
1590
1590
  case nr: {
1591
1591
  if (s.isNull) throw new Error();
1592
- t.TrackingStreams = gr(s.asDictionary());
1592
+ e.TrackingStreams = Or(s.asDictionary());
1593
1593
  break;
1594
1594
  }
1595
1595
  case or: {
1596
1596
  if (s.isNull) throw new Error();
1597
- t.ChannelId = s.asString();
1597
+ e.ChannelId = s.asString();
1598
1598
  break;
1599
1599
  }
1600
1600
  case ar: {
1601
1601
  if (s.isNull) throw new Error();
1602
- t.AppSourceType = s.asInt32();
1602
+ e.AppSourceType = s.asInt32();
1603
1603
  break;
1604
1604
  }
1605
1605
  case lr: {
1606
1606
  if (s.isNull) throw new Error();
1607
- t.SessionId = s.asString();
1607
+ e.SessionId = s.asString();
1608
1608
  break;
1609
1609
  }
1610
1610
  case Ir: {
1611
1611
  if (s.isNull) throw new Error();
1612
- t.SessionChannelUrl = s.asString();
1612
+ e.SessionChannelUrl = s.asString();
1613
1613
  break;
1614
1614
  }
1615
1615
  case hr: {
1616
1616
  if (s.isNull) throw new Error();
1617
- t.ChannelUrl = s.asString();
1617
+ e.ChannelUrl = s.asString();
1618
1618
  break;
1619
1619
  }
1620
1620
  case cr: {
1621
1621
  if (s.isNull) throw new Error();
1622
- t.ChannelName = s.asString();
1622
+ e.ChannelName = s.asString();
1623
1623
  break;
1624
1624
  }
1625
1625
  case Er: {
1626
1626
  if (s.isNull) throw new Error();
1627
- t.PublicAccess = s.asBool();
1627
+ e.PublicAccess = s.asBool();
1628
1628
  break;
1629
1629
  }
1630
- case ur: {
1630
+ case _r: {
1631
1631
  if (s.isNull) throw new Error();
1632
- t.ServerRunType = s.asInt32();
1632
+ e.ServerRunType = s.asInt32();
1633
1633
  break;
1634
1634
  }
1635
- case _r: {
1635
+ case ur: {
1636
1636
  if (s.isNull) throw new Error();
1637
- t.OrganisationName = s.asString();
1637
+ e.OrganisationName = s.asString();
1638
1638
  break;
1639
1639
  }
1640
1640
  case fr: {
1641
1641
  if (s.isNull) throw new Error();
1642
- t.DebugMode = s.asBool();
1642
+ e.DebugMode = s.asBool();
1643
1643
  break;
1644
1644
  }
1645
- case dr: {
1645
+ case Tr: {
1646
1646
  if (s.isNull) throw new Error();
1647
- t.Functions = Or(s.asDictionary());
1647
+ e.Functions = gr(s.asDictionary());
1648
1648
  break;
1649
1649
  }
1650
- case Tr: {
1650
+ case dr: {
1651
1651
  if (s.isNull) throw new Error();
1652
- t.UIStreams = pr(s.asDictionary());
1652
+ e.UIStreams = br(s.asDictionary());
1653
1653
  break;
1654
1654
  }
1655
- case yr: {
1655
+ case Ar: {
1656
1656
  if (s.isNull) throw new Error();
1657
- t.SpaceId = s.asString();
1657
+ e.SpaceId = s.asString();
1658
1658
  break;
1659
1659
  }
1660
1660
  case Sr: {
1661
1661
  if (s.isNull) throw new Error();
1662
- t.PrimaryUserId = s.asString();
1662
+ e.PrimaryUserId = s.asString();
1663
1663
  break;
1664
1664
  }
1665
- case Ar: {
1665
+ case yr: {
1666
1666
  if (s.isNull) throw new Error();
1667
- t.AudioStreams = br(s.asDictionary());
1667
+ e.AudioStreams = pr(s.asDictionary());
1668
1668
  break;
1669
1669
  }
1670
1670
  case Nr: {
1671
1671
  if (s.isNull) throw new Error();
1672
- t.VideoStreams = Pr(s.asDictionary());
1672
+ e.VideoStreams = Pr(s.asDictionary());
1673
1673
  break;
1674
1674
  }
1675
1675
  case wr: {
1676
1676
  if (s.isNull) throw new Error();
1677
- t.SpaceName = s.asString();
1677
+ e.SpaceName = s.asString();
1678
1678
  break;
1679
1679
  }
1680
1680
  }
1681
1681
  }
1682
- async function mr(e, t) {
1683
- const s = await M(e, sr);
1684
- return Ur(s, t);
1682
+ async function Lr(t, e) {
1683
+ const s = await M(t, sr);
1684
+ return Ur(s, e);
1685
1685
  }
1686
- function Lr(e) {
1687
- const t = /* @__PURE__ */ Object.create(null);
1686
+ function mr(t) {
1687
+ const e = /* @__PURE__ */ Object.create(null);
1688
1688
  let s;
1689
- for (; (s = e.next()) !== null; ) {
1689
+ for (; (s = t.next()) !== null; ) {
1690
1690
  const r = s.key.asInt32();
1691
- t[r] = ns(s.value.asObject());
1691
+ e[r] = ns(s.value.asObject());
1692
1692
  }
1693
- return t;
1693
+ return e;
1694
1694
  }
1695
- function gr(e) {
1696
- const t = /* @__PURE__ */ Object.create(null);
1695
+ function Or(t) {
1696
+ const e = /* @__PURE__ */ Object.create(null);
1697
1697
  let s;
1698
- for (; (s = e.next()) !== null; ) {
1698
+ for (; (s = t.next()) !== null; ) {
1699
1699
  const r = s.key.asString();
1700
- t[r] = ai(s.value.asObject());
1700
+ e[r] = ai(s.value.asObject());
1701
1701
  }
1702
- return t;
1702
+ return e;
1703
1703
  }
1704
- function Or(e) {
1705
- const t = /* @__PURE__ */ Object.create(null);
1704
+ function gr(t) {
1705
+ const e = /* @__PURE__ */ Object.create(null);
1706
1706
  let s;
1707
- for (; (s = e.next()) !== null; ) {
1707
+ for (; (s = t.next()) !== null; ) {
1708
1708
  const r = s.key.asInt32();
1709
- t[r] = Fr(s.value.asArray());
1709
+ e[r] = Fr(s.value.asArray());
1710
1710
  }
1711
- return t;
1711
+ return e;
1712
1712
  }
1713
- function pr(e) {
1714
- const t = /* @__PURE__ */ Object.create(null);
1713
+ function br(t) {
1714
+ const e = /* @__PURE__ */ Object.create(null);
1715
1715
  let s;
1716
- for (; (s = e.next()) !== null; ) {
1716
+ for (; (s = t.next()) !== null; ) {
1717
1717
  const r = s.key.asString();
1718
- t[r] = Gr(s.value.asObject());
1718
+ e[r] = Gr(s.value.asObject());
1719
1719
  }
1720
- return t;
1720
+ return e;
1721
1721
  }
1722
- function br(e) {
1723
- const t = /* @__PURE__ */ Object.create(null);
1722
+ function pr(t) {
1723
+ const e = /* @__PURE__ */ Object.create(null);
1724
1724
  let s;
1725
- for (; (s = e.next()) !== null; ) {
1725
+ for (; (s = t.next()) !== null; ) {
1726
1726
  const r = s.key.asString();
1727
- t[r] = jr(s.value.asObject());
1727
+ e[r] = jr(s.value.asObject());
1728
1728
  }
1729
- return t;
1729
+ return e;
1730
1730
  }
1731
- function Pr(e) {
1732
- const t = /* @__PURE__ */ Object.create(null);
1731
+ function Pr(t) {
1732
+ const e = /* @__PURE__ */ Object.create(null);
1733
1733
  let s;
1734
- for (; (s = e.next()) !== null; ) {
1734
+ for (; (s = t.next()) !== null; ) {
1735
1735
  const r = s.key.asString();
1736
- t[r] = ti(s.value.asObject());
1736
+ e[r] = ti(s.value.asObject());
1737
1737
  }
1738
- return t;
1738
+ return e;
1739
1739
  }
1740
- function Fr(e) {
1741
- const t = [];
1740
+ function Fr(t) {
1741
+ const e = [];
1742
1742
  let s;
1743
- for (; (s = e.next()) !== null; )
1744
- t.push(Ns(s.asObject()));
1745
- return t;
1743
+ for (; (s = t.next()) !== null; )
1744
+ e.push(Ns(s.asObject()));
1745
+ return e;
1746
1746
  }
1747
1747
  const kr = 161083277, Vr = 325678206, vr = 3469892363, Mr = 3645544153;
1748
- function Br(e) {
1749
- const t = {};
1750
- return Pt(t), t;
1748
+ function Br(t) {
1749
+ const e = {};
1750
+ return Pt(e), e;
1751
1751
  }
1752
- function Pt(e) {
1753
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Lt(), e;
1752
+ function Pt(t) {
1753
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = mt(), t;
1754
1754
  }
1755
- function Gr(e, t) {
1756
- const s = t ?? Br();
1757
- return Pt(s), xr(e, s), s;
1755
+ function Gr(t, e) {
1756
+ const s = e ?? Br();
1757
+ return Pt(s), xr(t, s), s;
1758
1758
  }
1759
- function xr(e, t) {
1759
+ function xr(t, e) {
1760
1760
  let s;
1761
- for (; (s = e.next()) !== null; )
1761
+ for (; (s = t.next()) !== null; )
1762
1762
  switch (s.fieldId) {
1763
1763
  case kr: {
1764
1764
  if (s.isNull) throw new Error();
1765
- t.StreamId = s.asString();
1765
+ e.StreamId = s.asString();
1766
1766
  break;
1767
1767
  }
1768
1768
  case Vr: {
1769
1769
  if (s.isNull) throw new Error();
1770
- t.ClientSessionId = s.asInt32();
1770
+ e.ClientSessionId = s.asInt32();
1771
1771
  break;
1772
1772
  }
1773
1773
  case vr: {
1774
1774
  if (s.isNull) throw new Error();
1775
- t.TrackId = s.asInt32();
1775
+ e.TrackId = s.asInt32();
1776
1776
  break;
1777
1777
  }
1778
1778
  case Mr: {
1779
1779
  if (s.isNull) throw new Error();
1780
- t.Info = Ks(s.asObject());
1780
+ e.Info = Ks(s.asObject());
1781
1781
  break;
1782
1782
  }
1783
1783
  }
1784
1784
  }
1785
1785
  const Hr = 161083277, Wr = 325678206, Kr = 3469892363, Yr = 3645544153;
1786
- function $r(e) {
1787
- const t = {};
1788
- return Ft(t), t;
1786
+ function $r(t) {
1787
+ const e = {};
1788
+ return Ft(e), e;
1789
1789
  }
1790
- function Ft(e) {
1791
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = At(), e;
1790
+ function Ft(t) {
1791
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = yt(), t;
1792
1792
  }
1793
- function jr(e, t) {
1794
- const s = t ?? $r();
1795
- return Ft(s), Xr(e, s), s;
1793
+ function jr(t, e) {
1794
+ const s = e ?? $r();
1795
+ return Ft(s), Xr(t, s), s;
1796
1796
  }
1797
- function Xr(e, t) {
1797
+ function Xr(t, e) {
1798
1798
  let s;
1799
- for (; (s = e.next()) !== null; )
1799
+ for (; (s = t.next()) !== null; )
1800
1800
  switch (s.fieldId) {
1801
1801
  case Hr: {
1802
1802
  if (s.isNull) throw new Error();
1803
- t.StreamId = s.asString();
1803
+ e.StreamId = s.asString();
1804
1804
  break;
1805
1805
  }
1806
1806
  case Wr: {
1807
1807
  if (s.isNull) throw new Error();
1808
- t.ClientSessionId = s.asInt32();
1808
+ e.ClientSessionId = s.asInt32();
1809
1809
  break;
1810
1810
  }
1811
1811
  case Kr: {
1812
1812
  if (s.isNull) throw new Error();
1813
- t.TrackId = s.asInt32();
1813
+ e.TrackId = s.asInt32();
1814
1814
  break;
1815
1815
  }
1816
1816
  case Yr: {
1817
1817
  if (s.isNull) throw new Error();
1818
- t.Info = ye(s.asObject());
1818
+ e.Info = Ae(s.asObject());
1819
1819
  break;
1820
1820
  }
1821
1821
  }
1822
1822
  }
1823
1823
  const zr = 161083277, Jr = 325678206, qr = 3469892363, Qr = 3645544153;
1824
- function Zr(e) {
1825
- const t = {};
1826
- return kt(t), t;
1824
+ function Zr(t) {
1825
+ const e = {};
1826
+ return kt(e), e;
1827
1827
  }
1828
- function kt(e) {
1829
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Ot(), e;
1828
+ function kt(t) {
1829
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = gt(), t;
1830
1830
  }
1831
- function ti(e, t) {
1832
- const s = t ?? Zr();
1833
- return kt(s), ei(e, s), s;
1831
+ function ti(t, e) {
1832
+ const s = e ?? Zr();
1833
+ return kt(s), ei(t, s), s;
1834
1834
  }
1835
- function ei(e, t) {
1835
+ function ei(t, e) {
1836
1836
  let s;
1837
- for (; (s = e.next()) !== null; )
1837
+ for (; (s = t.next()) !== null; )
1838
1838
  switch (s.fieldId) {
1839
1839
  case zr: {
1840
1840
  if (s.isNull) throw new Error();
1841
- t.StreamId = s.asString();
1841
+ e.StreamId = s.asString();
1842
1842
  break;
1843
1843
  }
1844
1844
  case Jr: {
1845
1845
  if (s.isNull) throw new Error();
1846
- t.ClientSessionId = s.asInt32();
1846
+ e.ClientSessionId = s.asInt32();
1847
1847
  break;
1848
1848
  }
1849
1849
  case qr: {
1850
1850
  if (s.isNull) throw new Error();
1851
- t.TrackId = s.asInt32();
1851
+ e.TrackId = s.asInt32();
1852
1852
  break;
1853
1853
  }
1854
1854
  case Qr: {
1855
1855
  if (s.isNull) throw new Error();
1856
- t.Info = tr(s.asObject());
1856
+ e.Info = tr(s.asObject());
1857
1857
  break;
1858
1858
  }
1859
1859
  }
1860
1860
  }
1861
1861
  const si = 161083277, ri = 325678206, ii = 3469892363, ni = 3645544153;
1862
- function oi(e) {
1863
- const t = {};
1864
- return Vt(t), t;
1862
+ function oi(t) {
1863
+ const e = {};
1864
+ return Vt(e), e;
1865
1865
  }
1866
- function Vt(e) {
1867
- return e.StreamId = "", e.ClientSessionId = 0, e.TrackId = 0, e.Info = Rt(), e;
1866
+ function Vt(t) {
1867
+ return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Rt(), t;
1868
1868
  }
1869
- function ai(e, t) {
1870
- const s = t ?? oi();
1871
- return Vt(s), li(e, s), s;
1869
+ function ai(t, e) {
1870
+ const s = e ?? oi();
1871
+ return Vt(s), li(t, s), s;
1872
1872
  }
1873
- function li(e, t) {
1873
+ function li(t, e) {
1874
1874
  let s;
1875
- for (; (s = e.next()) !== null; )
1875
+ for (; (s = t.next()) !== null; )
1876
1876
  switch (s.fieldId) {
1877
1877
  case si: {
1878
1878
  if (s.isNull) throw new Error();
1879
- t.StreamId = s.asString();
1879
+ e.StreamId = s.asString();
1880
1880
  break;
1881
1881
  }
1882
1882
  case ri: {
1883
1883
  if (s.isNull) throw new Error();
1884
- t.ClientSessionId = s.asInt32();
1884
+ e.ClientSessionId = s.asInt32();
1885
1885
  break;
1886
1886
  }
1887
1887
  case ii: {
1888
1888
  if (s.isNull) throw new Error();
1889
- t.TrackId = s.asInt32();
1889
+ e.TrackId = s.asInt32();
1890
1890
  break;
1891
1891
  }
1892
1892
  case ni: {
1893
1893
  if (s.isNull) throw new Error();
1894
- t.Info = Gs(s.asObject());
1894
+ e.Info = Gs(s.asObject());
1895
1895
  break;
1896
1896
  }
1897
1897
  }
1898
1898
  }
1899
1899
  const Ii = 1405462580, hi = 2968276160;
1900
- function ci(e) {
1901
- const t = {};
1902
- return vt(t), t;
1900
+ function ci(t) {
1901
+ const e = {};
1902
+ return vt(e), e;
1903
1903
  }
1904
- function vt(e) {
1905
- return e.MimeType = "", e.Value = new Uint8Array(0), e;
1904
+ function vt(t) {
1905
+ return t.MimeType = "", t.Value = new Uint8Array(0), t;
1906
1906
  }
1907
- function Ei(e, t) {
1908
- const s = t ?? ci();
1909
- return vt(s), ui(e, s), s;
1907
+ function Ei(t, e) {
1908
+ const s = e ?? ci();
1909
+ return vt(s), _i(t, s), s;
1910
1910
  }
1911
- function ui(e, t) {
1911
+ function _i(t, e) {
1912
1912
  let s;
1913
- for (; (s = e.next()) !== null; )
1913
+ for (; (s = t.next()) !== null; )
1914
1914
  switch (s.fieldId) {
1915
1915
  case Ii: {
1916
1916
  if (s.isNull) throw new Error();
1917
- t.Value = s.asBinary();
1917
+ e.Value = s.asBinary();
1918
1918
  break;
1919
1919
  }
1920
1920
  case hi: {
1921
1921
  if (s.isNull) throw new Error();
1922
- t.MimeType = s.asString();
1922
+ e.MimeType = s.asString();
1923
1923
  break;
1924
1924
  }
1925
1925
  }
1926
1926
  }
1927
- const _i = 2097188, fi = 979822885, di = 2374537704;
1928
- function Ti(e) {
1929
- const t = {};
1930
- return Mt(t), t;
1927
+ const ui = 2097188, fi = 979822885, Ti = 2374537704;
1928
+ function di(t) {
1929
+ const e = {};
1930
+ return Mt(e), e;
1931
1931
  }
1932
- function Mt(e) {
1933
- return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
1932
+ function Mt(t) {
1933
+ return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
1934
1934
  }
1935
- function yi(e, t) {
1936
- const s = O.create(e);
1937
- return Si(s, t);
1935
+ function Ai(t, e) {
1936
+ const s = g.create(t);
1937
+ return Si(s, e);
1938
1938
  }
1939
- function Si(e, t) {
1940
- const s = t ?? Ti();
1941
- return Mt(s), Ai(e, s), s;
1939
+ function Si(t, e) {
1940
+ const s = e ?? di();
1941
+ return Mt(s), yi(t, s), s;
1942
1942
  }
1943
- function Ai(e, t) {
1943
+ function yi(t, e) {
1944
1944
  let s;
1945
- for (; (s = e.next()) !== null; )
1945
+ for (; (s = t.next()) !== null; )
1946
1946
  switch (s.fieldId) {
1947
1947
  case fi: {
1948
1948
  if (s.isNull) throw new Error();
1949
- t.StyleId = s.asString();
1949
+ e.StyleId = s.asString();
1950
1950
  break;
1951
1951
  }
1952
- case di: {
1952
+ case Ti: {
1953
1953
  if (s.isNull) throw new Error();
1954
- t.Style = wi(s.asDictionary());
1954
+ e.Style = wi(s.asDictionary());
1955
1955
  break;
1956
1956
  }
1957
1957
  }
1958
1958
  }
1959
- async function Ni(e, t) {
1960
- const s = await M(e, _i);
1961
- return yi(s, t);
1959
+ async function Ni(t, e) {
1960
+ const s = await M(t, ui);
1961
+ return Ai(s, e);
1962
1962
  }
1963
- function wi(e) {
1964
- const t = /* @__PURE__ */ Object.create(null);
1963
+ function wi(t) {
1964
+ const e = /* @__PURE__ */ Object.create(null);
1965
1965
  let s;
1966
- for (; (s = e.next()) !== null; ) {
1966
+ for (; (s = t.next()) !== null; ) {
1967
1967
  const r = s.key.asString();
1968
- t[r] = s.value.asString();
1968
+ e[r] = s.value.asString();
1969
1969
  }
1970
- return t;
1970
+ return e;
1971
1971
  }
1972
1972
  const Ci = 2097192, Ui = 2136687806;
1973
- function Di(e) {
1974
- const t = {};
1975
- return Bt(t), t;
1973
+ function Di(t) {
1974
+ const e = {};
1975
+ return Bt(e), e;
1976
1976
  }
1977
- function Bt(e) {
1978
- return e.Styles = [], e;
1977
+ function Bt(t) {
1978
+ return t.Styles = [], t;
1979
1979
  }
1980
- function Ri(e, t) {
1981
- const s = O.create(e);
1982
- return mi(s, t);
1980
+ function Ri(t, e) {
1981
+ const s = g.create(t);
1982
+ return Li(s, e);
1983
1983
  }
1984
- function mi(e, t) {
1985
- const s = t ?? Di();
1986
- return Bt(s), Li(e, s), s;
1984
+ function Li(t, e) {
1985
+ const s = e ?? Di();
1986
+ return Bt(s), mi(t, s), s;
1987
1987
  }
1988
- function Li(e, t) {
1988
+ function mi(t, e) {
1989
1989
  let s;
1990
- for (; (s = e.next()) !== null; )
1990
+ for (; (s = t.next()) !== null; )
1991
1991
  switch (s.fieldId) {
1992
1992
  case Ui: {
1993
1993
  if (s.isNull) throw new Error();
1994
- t.Styles = Oi(s.asArray());
1994
+ e.Styles = gi(s.asArray());
1995
1995
  break;
1996
1996
  }
1997
1997
  }
1998
1998
  }
1999
- async function gi(e, t) {
2000
- const s = await M(e, Ci);
2001
- return Ri(s, t);
1999
+ async function Oi(t, e) {
2000
+ const s = await M(t, Ci);
2001
+ return Ri(s, e);
2002
2002
  }
2003
- function Oi(e) {
2004
- const t = [];
2003
+ function gi(t) {
2004
+ const e = [];
2005
2005
  let s;
2006
- for (; (s = e.next()) !== null; )
2007
- t.push(Fi(s.asObject()));
2008
- return t;
2006
+ for (; (s = t.next()) !== null; )
2007
+ e.push(Fi(s.asObject()));
2008
+ return e;
2009
2009
  }
2010
- const pi = 979822885, bi = 2374537704;
2011
- function Pi(e) {
2012
- const t = {};
2013
- return Gt(t), t;
2010
+ const bi = 979822885, pi = 2374537704;
2011
+ function Pi(t) {
2012
+ const e = {};
2013
+ return Gt(e), e;
2014
2014
  }
2015
- function Gt(e) {
2016
- return e.StyleId = "", e.Style = /* @__PURE__ */ Object.create(null), e;
2015
+ function Gt(t) {
2016
+ return t.StyleId = "", t.Style = /* @__PURE__ */ Object.create(null), t;
2017
2017
  }
2018
- function Fi(e, t) {
2019
- const s = t ?? Pi();
2020
- return Gt(s), ki(e, s), s;
2018
+ function Fi(t, e) {
2019
+ const s = e ?? Pi();
2020
+ return Gt(s), ki(t, s), s;
2021
2021
  }
2022
- function ki(e, t) {
2022
+ function ki(t, e) {
2023
2023
  let s;
2024
- for (; (s = e.next()) !== null; )
2024
+ for (; (s = t.next()) !== null; )
2025
2025
  switch (s.fieldId) {
2026
- case pi: {
2026
+ case bi: {
2027
2027
  if (s.isNull) throw new Error();
2028
- t.StyleId = s.asString();
2028
+ e.StyleId = s.asString();
2029
2029
  break;
2030
2030
  }
2031
- case bi: {
2031
+ case pi: {
2032
2032
  if (s.isNull) throw new Error();
2033
- t.Style = Vi(s.asDictionary());
2033
+ e.Style = Vi(s.asDictionary());
2034
2034
  break;
2035
2035
  }
2036
2036
  }
2037
2037
  }
2038
- function Vi(e) {
2039
- const t = /* @__PURE__ */ Object.create(null);
2038
+ function Vi(t) {
2039
+ const e = /* @__PURE__ */ Object.create(null);
2040
2040
  let s;
2041
- for (; (s = e.next()) !== null; ) {
2041
+ for (; (s = t.next()) !== null; ) {
2042
2042
  const r = s.key.asString();
2043
- t[r] = s.value.asString();
2043
+ e[r] = s.value.asString();
2044
2044
  }
2045
- return t;
2045
+ return e;
2046
2046
  }
2047
2047
  const vi = 2097193, Mi = 1415642792;
2048
- function Bi(e) {
2049
- const t = {};
2050
- return xt(t), t;
2048
+ function Bi(t) {
2049
+ const e = {};
2050
+ return xt(e), e;
2051
2051
  }
2052
- function xt(e) {
2053
- return e.StyleIds = [], e;
2052
+ function xt(t) {
2053
+ return t.StyleIds = [], t;
2054
2054
  }
2055
- function Gi(e, t) {
2056
- const s = O.create(e);
2057
- return xi(s, t);
2055
+ function Gi(t, e) {
2056
+ const s = g.create(t);
2057
+ return xi(s, e);
2058
2058
  }
2059
- function xi(e, t) {
2060
- const s = t ?? Bi();
2061
- return xt(s), Hi(e, s), s;
2059
+ function xi(t, e) {
2060
+ const s = e ?? Bi();
2061
+ return xt(s), Hi(t, s), s;
2062
2062
  }
2063
- function Hi(e, t) {
2063
+ function Hi(t, e) {
2064
2064
  let s;
2065
- for (; (s = e.next()) !== null; )
2065
+ for (; (s = t.next()) !== null; )
2066
2066
  switch (s.fieldId) {
2067
2067
  case Mi: {
2068
2068
  if (s.isNull) throw new Error();
2069
- t.StyleIds = Ki(s.asArray());
2069
+ e.StyleIds = Ki(s.asArray());
2070
2070
  break;
2071
2071
  }
2072
2072
  }
2073
2073
  }
2074
- async function Wi(e, t) {
2075
- const s = await M(e, vi);
2076
- return Gi(s, t);
2074
+ async function Wi(t, e) {
2075
+ const s = await M(t, vi);
2076
+ return Gi(s, e);
2077
2077
  }
2078
- function Ki(e) {
2079
- const t = [];
2078
+ function Ki(t) {
2079
+ const e = [];
2080
2080
  let s;
2081
- for (; (s = e.next()) !== null; )
2082
- t.push(s.asString());
2083
- return t;
2081
+ for (; (s = t.next()) !== null; )
2082
+ e.push(s.asString());
2083
+ return e;
2084
2084
  }
2085
2085
  const Yi = 2097190, $i = 425183262, ji = 653781469;
2086
- function Xi(e) {
2087
- const t = {};
2088
- return Ht(t), t;
2086
+ function Xi(t) {
2087
+ const e = {};
2088
+ return Ht(e), e;
2089
2089
  }
2090
- function Ht(e) {
2091
- return e.Json = "", e.Payloads = /* @__PURE__ */ Object.create(null), e;
2090
+ function Ht(t) {
2091
+ return t.Json = "", t.Payloads = /* @__PURE__ */ Object.create(null), t;
2092
2092
  }
2093
- function zi(e, t) {
2094
- const s = O.create(e);
2095
- return Ji(s, t);
2093
+ function zi(t, e) {
2094
+ const s = g.create(t);
2095
+ return Ji(s, e);
2096
2096
  }
2097
- function Ji(e, t) {
2098
- const s = t ?? Xi();
2099
- return Ht(s), qi(e, s), s;
2097
+ function Ji(t, e) {
2098
+ const s = e ?? Xi();
2099
+ return Ht(s), qi(t, s), s;
2100
2100
  }
2101
- function qi(e, t) {
2101
+ function qi(t, e) {
2102
2102
  let s;
2103
- for (; (s = e.next()) !== null; )
2103
+ for (; (s = t.next()) !== null; )
2104
2104
  switch (s.fieldId) {
2105
2105
  case $i: {
2106
2106
  if (s.isNull) throw new Error();
2107
- t.Json = s.asString();
2107
+ e.Json = s.asString();
2108
2108
  break;
2109
2109
  }
2110
2110
  case ji: {
2111
2111
  if (s.isNull) throw new Error();
2112
- t.Payloads = Zi(s.asDictionary());
2112
+ e.Payloads = Zi(s.asDictionary());
2113
2113
  break;
2114
2114
  }
2115
2115
  }
2116
2116
  }
2117
- async function Qi(e, t) {
2118
- const s = await M(e, Yi);
2119
- return zi(s, t);
2117
+ async function Qi(t, e) {
2118
+ const s = await M(t, Yi);
2119
+ return zi(s, e);
2120
2120
  }
2121
- function Zi(e) {
2122
- const t = /* @__PURE__ */ Object.create(null);
2121
+ function Zi(t) {
2122
+ const e = /* @__PURE__ */ Object.create(null);
2123
2123
  let s;
2124
- for (; (s = e.next()) !== null; ) {
2124
+ for (; (s = t.next()) !== null; ) {
2125
2125
  const r = s.key.asString();
2126
- t[r] = Ei(s.value.asObject());
2126
+ e[r] = Ei(s.value.asObject());
2127
2127
  }
2128
- return t;
2128
+ return e;
2129
2129
  }
2130
2130
  const Wt = 1, tn = 1048636, en = 2610786289;
2131
- function sn(e) {
2132
- const t = new B(Wt);
2133
- return rn(e, t), t.finish();
2131
+ function sn(t) {
2132
+ const e = new B(Wt);
2133
+ return rn(t, e), e.finish();
2134
2134
  }
2135
- function rn(e, t) {
2136
- t.writeUInt32Field(en, e.Version >>> 0);
2135
+ function rn(t, e) {
2136
+ e.writeUInt32Field(en, t.Version >>> 0);
2137
2137
  }
2138
- function nn(e, t, s) {
2139
- const r = sn(e);
2140
- return ee(tn, r, Wt, t, s);
2138
+ function nn(t, e, s) {
2139
+ const r = sn(t);
2140
+ return ee(tn, r, Wt, e, s);
2141
2141
  }
2142
- function w(e) {
2143
- return typeof e == "object" && e !== null && !Array.isArray(e);
2142
+ function w(t) {
2143
+ return typeof t == "object" && t !== null && !Array.isArray(t);
2144
2144
  }
2145
- function Kt(e) {
2146
- const t = {}, s = Object.keys(e);
2145
+ function Kt(t) {
2146
+ const e = {}, s = Object.keys(t);
2147
2147
  for (let r = 0; r < s.length; r++) {
2148
2148
  const i = s[r];
2149
- t[i] = e[i];
2149
+ e[i] = t[i];
2150
2150
  }
2151
- return t;
2151
+ return e;
2152
2152
  }
2153
- function Yt(e, t, s, r) {
2154
- if (!(e === void 0 && r)) {
2155
- if (Array.isArray(e)) {
2153
+ function Yt(t, e, s, r) {
2154
+ if (!(t === void 0 && r)) {
2155
+ if (Array.isArray(t)) {
2156
2156
  const i = [];
2157
- for (let n = 0; n < e.length; n++) {
2158
- const o = e[n];
2157
+ for (let n = 0; n < t.length; n++) {
2158
+ const o = t[n];
2159
2159
  if (typeof o != "string")
2160
- throw new Error(`Invalid styleIds entry at ${t}.styleIds[${n}] for element ${s}`);
2160
+ throw new Error(`Invalid styleIds entry at ${e}.styleIds[${n}] for element ${s}`);
2161
2161
  const a = o.trim();
2162
2162
  a.length !== 0 && i.push(a);
2163
2163
  }
2164
2164
  return i;
2165
2165
  }
2166
- if (e != null)
2166
+ if (t != null)
2167
2167
  throw new Error(`Invalid styleIds for element ${s}`);
2168
2168
  return [];
2169
2169
  }
2170
2170
  }
2171
- function it(e, t) {
2172
- if (!e || typeof e != "object")
2173
- throw new Error(`Invalid UI node at ${t}`);
2174
- const s = e.Id, r = e.Type, i = e.Props, n = e.Children, o = e.StyleIds;
2171
+ function it(t, e) {
2172
+ if (!t || typeof t != "object")
2173
+ throw new Error(`Invalid UI node at ${e}`);
2174
+ const s = t.Id, r = t.Type, i = t.Props, n = t.Children, o = t.StyleIds;
2175
2175
  if (typeof s != "string")
2176
- throw new Error(`Invalid or missing node id at ${t}`);
2176
+ throw new Error(`Invalid or missing node id at ${e}`);
2177
2177
  if (typeof r != "string")
2178
2178
  throw new Error(`Invalid or missing node type for ${s}`);
2179
2179
  let a = {};
@@ -2184,9 +2184,9 @@ function it(e, t) {
2184
2184
  }
2185
2185
  let l = [];
2186
2186
  Array.isArray(n) && (l = n.map(
2187
- (I, c) => it(I ?? {}, `${t}.children[${c}]`)
2187
+ (I, c) => it(I ?? {}, `${e}.children[${c}]`)
2188
2188
  ));
2189
- const h = Yt(o, t, s, !1);
2189
+ const h = Yt(o, e, s, !1);
2190
2190
  return {
2191
2191
  id: s,
2192
2192
  type: r,
@@ -2195,25 +2195,25 @@ function it(e, t) {
2195
2195
  styleIds: h ?? []
2196
2196
  };
2197
2197
  }
2198
- function on(e, t) {
2199
- if (!w(e))
2200
- throw new Error(`Invalid text delta at ${t}`);
2201
- const s = e.NodeId, r = e.PropertyName, i = e.Start, n = e.End, o = e.InsertedText;
2198
+ function on(t, e) {
2199
+ if (!w(t))
2200
+ throw new Error(`Invalid text delta at ${e}`);
2201
+ const s = t.NodeId, r = t.PropertyName, i = t.Start, n = t.End, o = t.InsertedText;
2202
2202
  if (typeof s != "string" || s.length === 0)
2203
- throw new Error(`Invalid text delta node id at ${t}`);
2203
+ throw new Error(`Invalid text delta node id at ${e}`);
2204
2204
  if (typeof r != "string" || r.length === 0)
2205
- throw new Error(`Invalid text delta property name at ${t}`);
2205
+ throw new Error(`Invalid text delta property name at ${e}`);
2206
2206
  if (typeof i != "number" || !Number.isFinite(i))
2207
- throw new Error(`Invalid text delta start at ${t}`);
2207
+ throw new Error(`Invalid text delta start at ${e}`);
2208
2208
  if (typeof o != "string")
2209
- throw new Error(`Invalid text delta inserted text at ${t}`);
2209
+ throw new Error(`Invalid text delta inserted text at ${e}`);
2210
2210
  let a;
2211
2211
  if (typeof n == "number") {
2212
2212
  if (!Number.isFinite(n))
2213
- throw new Error(`Invalid text delta end at ${t}`);
2213
+ throw new Error(`Invalid text delta end at ${e}`);
2214
2214
  a = n;
2215
2215
  } else if (n != null)
2216
- throw new Error(`Invalid text delta end at ${t}`);
2216
+ throw new Error(`Invalid text delta end at ${e}`);
2217
2217
  return {
2218
2218
  nodeId: s,
2219
2219
  propertyName: r,
@@ -2222,74 +2222,74 @@ function on(e, t) {
2222
2222
  insertedText: o
2223
2223
  };
2224
2224
  }
2225
- function an(e, t) {
2226
- if (!w(e))
2227
- throw new Error(`Invalid child insert at ${t}`);
2228
- const s = e.Index, r = e.Node;
2225
+ function an(t, e) {
2226
+ if (!w(t))
2227
+ throw new Error(`Invalid child insert at ${e}`);
2228
+ const s = t.Index, r = t.Node;
2229
2229
  if (typeof s != "number" || !Number.isFinite(s))
2230
- throw new Error(`Invalid child insert index at ${t}`);
2230
+ throw new Error(`Invalid child insert index at ${e}`);
2231
2231
  if (!w(r))
2232
- throw new Error(`Invalid child insert node at ${t}`);
2232
+ throw new Error(`Invalid child insert node at ${e}`);
2233
2233
  return {
2234
2234
  index: s,
2235
- node: it(r, `${t}.node`)
2235
+ node: it(r, `${e}.node`)
2236
2236
  };
2237
2237
  }
2238
- function ln(e, t) {
2239
- if (!w(e))
2240
- throw new Error(`Invalid child move at ${t}`);
2241
- const s = e.NodeId, r = e.FromIndex, i = e.ToIndex;
2238
+ function ln(t, e) {
2239
+ if (!w(t))
2240
+ throw new Error(`Invalid child move at ${e}`);
2241
+ const s = t.NodeId, r = t.FromIndex, i = t.ToIndex;
2242
2242
  if (typeof s != "string" || s.length === 0)
2243
- throw new Error(`Invalid child move nodeId at ${t}`);
2243
+ throw new Error(`Invalid child move nodeId at ${e}`);
2244
2244
  if (typeof r != "number" || !Number.isFinite(r))
2245
- throw new Error(`Invalid child move fromIndex at ${t}`);
2245
+ throw new Error(`Invalid child move fromIndex at ${e}`);
2246
2246
  if (typeof i != "number" || !Number.isFinite(i))
2247
- throw new Error(`Invalid child move toIndex at ${t}`);
2247
+ throw new Error(`Invalid child move toIndex at ${e}`);
2248
2248
  return {
2249
2249
  nodeId: s,
2250
2250
  fromIndex: r,
2251
2251
  toIndex: i
2252
2252
  };
2253
2253
  }
2254
- function In(e, t) {
2255
- if (!w(e))
2256
- throw new Error(`Invalid child remove at ${t}`);
2257
- const s = e.NodeId, r = e.Index;
2254
+ function In(t, e) {
2255
+ if (!w(t))
2256
+ throw new Error(`Invalid child remove at ${e}`);
2257
+ const s = t.NodeId, r = t.Index;
2258
2258
  if (typeof s != "string" || s.length === 0)
2259
- throw new Error(`Invalid child remove nodeId at ${t}`);
2259
+ throw new Error(`Invalid child remove nodeId at ${e}`);
2260
2260
  if (typeof r != "number" || !Number.isFinite(r))
2261
- throw new Error(`Invalid child remove index at ${t}`);
2261
+ throw new Error(`Invalid child remove index at ${e}`);
2262
2262
  return {
2263
2263
  nodeId: s,
2264
2264
  index: r
2265
2265
  };
2266
2266
  }
2267
- function hn(e, t) {
2268
- if (!w(e))
2269
- throw new Error(`Invalid node change at ${t}`);
2270
- const s = e.nodeId;
2267
+ function hn(t, e) {
2268
+ if (!w(t))
2269
+ throw new Error(`Invalid node change at ${e}`);
2270
+ const s = t.nodeId;
2271
2271
  if (typeof s != "string" || s.length === 0)
2272
- throw new Error(`Invalid node change nodeId at ${t}`);
2273
- const r = Array.isArray(e.inserts) ? e.inserts.map(
2274
- (I, c) => an(I ?? {}, `${t}.inserts[${c}]`)
2275
- ) : void 0, i = Array.isArray(e.moves) ? e.moves.map(
2276
- (I, c) => ln(I ?? {}, `${t}.moves[${c}]`)
2277
- ) : void 0, n = Array.isArray(e.removals) ? e.removals.map(
2278
- (I, c) => In(I ?? {}, `${t}.removals[${c}]`)
2272
+ throw new Error(`Invalid node change nodeId at ${e}`);
2273
+ const r = Array.isArray(t.inserts) ? t.inserts.map(
2274
+ (I, c) => an(I ?? {}, `${e}.inserts[${c}]`)
2275
+ ) : void 0, i = Array.isArray(t.moves) ? t.moves.map(
2276
+ (I, c) => ln(I ?? {}, `${e}.moves[${c}]`)
2277
+ ) : void 0, n = Array.isArray(t.removals) ? t.removals.map(
2278
+ (I, c) => In(I ?? {}, `${e}.removals[${c}]`)
2279
2279
  ) : void 0;
2280
2280
  let o;
2281
- if (w(e.changedProps)) {
2281
+ if (w(t.changedProps)) {
2282
2282
  o = /* @__PURE__ */ new Map();
2283
- for (const [I, c] of Object.entries(e.changedProps)) {
2283
+ for (const [I, c] of Object.entries(t.changedProps)) {
2284
2284
  if (!w(c))
2285
2285
  continue;
2286
2286
  const E = c.New;
2287
2287
  E === void 0 ? o.set(I, void 0) : w(E) ? o.set(I, Kt(E)) : o.set(I, E);
2288
2288
  }
2289
2289
  }
2290
- const a = Array.isArray(e.textUpdates) ? e.textUpdates.map(
2291
- (I, c) => on(I ?? {}, `${t}.textUpdates[${c}]`)
2292
- ) : void 0, l = e.styleIds, h = l !== void 0 ? Yt(l, t, s, !0) : void 0;
2290
+ const a = Array.isArray(t.textUpdates) ? t.textUpdates.map(
2291
+ (I, c) => on(I ?? {}, `${e}.textUpdates[${c}]`)
2292
+ ) : void 0, l = t.styleIds, h = l !== void 0 ? Yt(l, e, s, !0) : void 0;
2293
2293
  return {
2294
2294
  nodeId: s,
2295
2295
  ...r && r.length > 0 ? { inserts: r } : {},
@@ -2300,19 +2300,19 @@ function hn(e, t) {
2300
2300
  ...h !== void 0 ? { styleIds: h } : {}
2301
2301
  };
2302
2302
  }
2303
- function cn(e) {
2304
- const t = /* @__PURE__ */ new Map();
2305
- for (const [s, r] of Object.entries(e))
2306
- t.set(s, r);
2307
- return t;
2303
+ function cn(t) {
2304
+ const e = /* @__PURE__ */ new Map();
2305
+ for (const [s, r] of Object.entries(t))
2306
+ e.set(s, r);
2307
+ return e;
2308
2308
  }
2309
- function En(e, t, s) {
2310
- if (!e || typeof e != "object")
2309
+ function En(t, e, s) {
2310
+ if (!t || typeof t != "object")
2311
2311
  throw new D("UI update graph is missing");
2312
- const r = it(e, "graph");
2312
+ const r = it(t, "graph");
2313
2313
  if (r.type !== "root")
2314
2314
  throw new D('UI update root element must have type "root"');
2315
- const i = _n(r.props, t);
2315
+ const i = un(r.props, e);
2316
2316
  return {
2317
2317
  type: "full",
2318
2318
  version: s,
@@ -2320,17 +2320,17 @@ function En(e, t, s) {
2320
2320
  metadata: i
2321
2321
  };
2322
2322
  }
2323
- function un(e, t, s) {
2324
- if (!Array.isArray(e))
2323
+ function _n(t, e, s) {
2324
+ if (!Array.isArray(t))
2325
2325
  throw new D("UI diff changes must be an array");
2326
- if (!w(t))
2326
+ if (!w(e))
2327
2327
  throw new D("UI diff metadata must be an object");
2328
- const r = t.viewId;
2328
+ const r = e.viewId;
2329
2329
  if (typeof r != "string" || r.length === 0)
2330
2330
  throw new D("UI diff metadata is missing viewId");
2331
- const i = e.map(
2331
+ const i = t.map(
2332
2332
  (c, E) => hn(c ?? {}, `changes[${E}]`)
2333
- ), n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, o = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, l = z(t.optimisticPatch), h = J(t.optimisticReconcile), I = {
2333
+ ), n = 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 = z(e.optimisticPatch), h = J(e.optimisticReconcile), I = {
2334
2334
  viewId: r,
2335
2335
  ...n !== void 0 ? { optimisticActionId: n } : {},
2336
2336
  ...o !== void 0 ? { isOptimistic: o } : {},
@@ -2345,12 +2345,12 @@ function un(e, t, s) {
2345
2345
  metadata: I
2346
2346
  };
2347
2347
  }
2348
- function _n(e, t) {
2349
- const s = e.viewId;
2348
+ function un(t, e) {
2349
+ const s = t.viewId;
2350
2350
  if (typeof s != "string" || s.length === 0)
2351
2351
  throw new D("UI update root is missing viewId");
2352
- let r = s, i = e.optimisticActionId === null || typeof e.optimisticActionId == "string" ? e.optimisticActionId : void 0, n = typeof e.isOptimistic == "boolean" ? e.isOptimistic : void 0, o = typeof e.isUpdate == "boolean" ? e.isUpdate : void 0, a = z(e.optimisticPatch), l = J(e.optimisticReconcile);
2353
- return w(t) && (typeof t.viewId == "string" && t.viewId.length > 0 && (r = t.viewId), (t.optimisticActionId === null || typeof t.optimisticActionId == "string") && (i = t.optimisticActionId), typeof t.isOptimistic == "boolean" && (n = t.isOptimistic), typeof t.isUpdate == "boolean" && (o = t.isUpdate), t.optimisticPatch !== void 0 && (a = z(t.optimisticPatch)), t.optimisticReconcile !== void 0 && (l = J(t.optimisticReconcile))), {
2352
+ let r = s, i = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, n = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, o = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, a = z(t.optimisticPatch), l = J(t.optimisticReconcile);
2353
+ return w(e) && (typeof e.viewId == "string" && e.viewId.length > 0 && (r = e.viewId), (e.optimisticActionId === null || typeof e.optimisticActionId == "string") && (i = e.optimisticActionId), typeof e.isOptimistic == "boolean" && (n = e.isOptimistic), typeof e.isUpdate == "boolean" && (o = e.isUpdate), e.optimisticPatch !== void 0 && (a = z(e.optimisticPatch)), e.optimisticReconcile !== void 0 && (l = J(e.optimisticReconcile))), {
2354
2354
  viewId: r,
2355
2355
  ...i !== void 0 ? { optimisticActionId: i } : {},
2356
2356
  ...n !== void 0 ? { isOptimistic: n } : {},
@@ -2359,10 +2359,10 @@ function _n(e, t) {
2359
2359
  ...l ? { optimisticReconcile: l } : {}
2360
2360
  };
2361
2361
  }
2362
- function z(e) {
2363
- if (!w(e))
2362
+ function z(t) {
2363
+ if (!w(t))
2364
2364
  return;
2365
- const t = e, s = t.id, r = t.actionId, i = t.ordinal, n = t.baseVersion, o = t.supersedes;
2365
+ const e = t, s = e.id, r = e.actionId, i = e.ordinal, n = e.baseVersion, o = e.supersedes;
2366
2366
  if (typeof s != "string" || s.length === 0 || typeof r != "string" || r.length === 0 || typeof i != "number" || !Number.isFinite(i) || typeof n != "number" || !Number.isFinite(n))
2367
2367
  return;
2368
2368
  let a;
@@ -2380,10 +2380,10 @@ function z(e) {
2380
2380
  ...a && a.length > 0 ? { supersedes: a } : {}
2381
2381
  };
2382
2382
  }
2383
- function J(e) {
2384
- if (!w(e))
2383
+ function J(t) {
2384
+ if (!w(t))
2385
2385
  return;
2386
- const t = e, s = t.baseVersion, r = t.drop;
2386
+ const e = t, s = e.baseVersion, r = e.drop;
2387
2387
  if (typeof s != "number" || !Number.isFinite(s))
2388
2388
  return;
2389
2389
  let i;
@@ -2399,39 +2399,39 @@ function J(e) {
2399
2399
  };
2400
2400
  }
2401
2401
  class D extends Error {
2402
- constructor(t, s) {
2403
- super(t), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
2402
+ constructor(e, s) {
2403
+ super(e), this.causeError = s, this.name = "UiUpdateParseError", s instanceof Error && (this.stack = s.stack);
2404
2404
  }
2405
2405
  }
2406
- function fn(e) {
2407
- let t;
2406
+ function fn(t) {
2407
+ let e;
2408
2408
  try {
2409
- t = JSON.parse(e.Json);
2409
+ e = JSON.parse(t.Json);
2410
2410
  } catch (o) {
2411
2411
  throw new D("Failed to parse UIUpdate.Json payload", o);
2412
2412
  }
2413
- if (!t || typeof t != "object")
2413
+ if (!e || typeof e != "object")
2414
2414
  throw new D("UI update snapshot must be an object");
2415
- const { type: s, version: r } = t;
2415
+ const { type: s, version: r } = e;
2416
2416
  if (s !== "full" && s !== "diff")
2417
2417
  throw new D(`Unknown UI update type: ${String(s)}`);
2418
2418
  if (typeof r != "number")
2419
2419
  throw new D("UI update version must be a number");
2420
- const i = s === "full" ? En(t.graph, t.metadata, r) : un(t.changes, t.metadata, r), n = e.Payloads ? cn(e.Payloads) : /* @__PURE__ */ new Map();
2420
+ const i = s === "full" ? En(e.graph, e.metadata, r) : _n(e.changes, e.metadata, r), n = t.Payloads ? cn(t.Payloads) : /* @__PURE__ */ new Map();
2421
2421
  return {
2422
2422
  snapshot: i,
2423
2423
  payloads: n
2424
2424
  };
2425
2425
  }
2426
- class dn {
2426
+ class Tn {
2427
2427
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2428
2428
  cache = /* @__PURE__ */ new Map();
2429
2429
  /**
2430
2430
  * Get a cached void handler (no payload) for a node/action combination.
2431
2431
  * Creates and caches the handler if it doesn't exist.
2432
2432
  */
2433
- getHandler(t, s, r) {
2434
- const i = `${t}:${s}`;
2433
+ getHandler(e, s, r) {
2434
+ const i = `${e}:${s}`;
2435
2435
  let n = this.cache.get(i);
2436
2436
  return n || (n = () => r(s), this.cache.set(i, n)), n;
2437
2437
  }
@@ -2439,40 +2439,40 @@ class dn {
2439
2439
  * Get a cached handler that accepts a payload.
2440
2440
  * Creates and caches the handler if it doesn't exist.
2441
2441
  */
2442
- getHandlerWithPayload(t, s, r) {
2443
- const i = `${t}:${s}:payload`;
2442
+ getHandlerWithPayload(e, s, r) {
2443
+ const i = `${e}:${s}:payload`;
2444
2444
  let n = this.cache.get(i);
2445
2445
  return n || (n = (o) => r(s, o), this.cache.set(i, n)), n;
2446
2446
  }
2447
2447
  /**
2448
2448
  * Get a cached handler for boolean payloads.
2449
2449
  */
2450
- getBooleanHandler(t, s, r) {
2451
- return this.getHandlerWithPayload(t, s, r);
2450
+ getBooleanHandler(e, s, r) {
2451
+ return this.getHandlerWithPayload(e, s, r);
2452
2452
  }
2453
2453
  /**
2454
2454
  * Get a cached handler for string payloads.
2455
2455
  */
2456
- getStringHandler(t, s, r) {
2457
- return this.getHandlerWithPayload(t, s, r);
2456
+ getStringHandler(e, s, r) {
2457
+ return this.getHandlerWithPayload(e, s, r);
2458
2458
  }
2459
2459
  /**
2460
2460
  * Get a cached handler for number payloads.
2461
2461
  */
2462
- getNumberHandler(t, s, r) {
2463
- return this.getHandlerWithPayload(t, s, r);
2462
+ getNumberHandler(e, s, r) {
2463
+ return this.getHandlerWithPayload(e, s, r);
2464
2464
  }
2465
2465
  /**
2466
2466
  * Get a cached handler for number array payloads.
2467
2467
  */
2468
- getNumberArrayHandler(t, s, r) {
2469
- return this.getHandlerWithPayload(t, s, r);
2468
+ getNumberArrayHandler(e, s, r) {
2469
+ return this.getHandlerWithPayload(e, s, r);
2470
2470
  }
2471
2471
  /**
2472
2472
  * Get a cached handler for nullable boolean payloads.
2473
2473
  */
2474
- getNullableBooleanHandler(t, s, r) {
2475
- const i = `${t}:${s}:nullable-bool`;
2474
+ getNullableBooleanHandler(e, s, r) {
2475
+ const i = `${e}:${s}:nullable-bool`;
2476
2476
  let n = this.cache.get(i);
2477
2477
  return n || (n = (o) => r(s, o ?? null), this.cache.set(i, n)), n;
2478
2478
  }
@@ -2480,16 +2480,16 @@ class dn {
2480
2480
  * Invalidate all cached handlers for a specific node.
2481
2481
  * Call this when a node is removed from the tree.
2482
2482
  */
2483
- invalidateNode(t) {
2484
- const s = `${t}:`;
2483
+ invalidateNode(e) {
2484
+ const s = `${e}:`;
2485
2485
  for (const r of this.cache.keys())
2486
2486
  r.startsWith(s) && this.cache.delete(r);
2487
2487
  }
2488
2488
  /**
2489
2489
  * Invalidate a specific handler.
2490
2490
  */
2491
- invalidateHandler(t, s) {
2492
- this.cache.delete(`${t}:${s}`), this.cache.delete(`${t}:${s}:payload`), this.cache.delete(`${t}:${s}:nullable-bool`);
2491
+ invalidateHandler(e, s) {
2492
+ this.cache.delete(`${e}:${s}`), this.cache.delete(`${e}:${s}:payload`), this.cache.delete(`${e}:${s}:nullable-bool`);
2493
2493
  }
2494
2494
  /**
2495
2495
  * Clear all cached handlers.
@@ -2504,7 +2504,7 @@ class dn {
2504
2504
  return this.cache.size;
2505
2505
  }
2506
2506
  }
2507
- class Tn {
2507
+ class dn {
2508
2508
  views = /* @__PURE__ */ new Map();
2509
2509
  listeners = /* @__PURE__ */ new Set();
2510
2510
  payloads = /* @__PURE__ */ new Map();
@@ -2526,27 +2526,27 @@ class Tn {
2526
2526
  patchesDirty = !0;
2527
2527
  payloadsDirty = !0;
2528
2528
  // Handler cache for stable event handlers
2529
- handlerCache = new dn();
2530
- getSortedPatches(t) {
2531
- const s = this.buildPatchCacheKey(t.patches);
2532
- if (t.sortedPatchesCacheKey === s && t.sortedPatchesCache)
2533
- return t.sortedPatchesCache;
2534
- const r = [...t.patches.values()].sort((i, n) => i.ordinal - n.ordinal);
2535
- return t.sortedPatchesCache = r, t.sortedPatchesCacheKey = s, r;
2536
- }
2537
- buildPatchCacheKey(t) {
2538
- if (t.size === 0) return "";
2529
+ handlerCache = new Tn();
2530
+ getSortedPatches(e) {
2531
+ const s = this.buildPatchCacheKey(e.patches);
2532
+ if (e.sortedPatchesCacheKey === s && e.sortedPatchesCache)
2533
+ return e.sortedPatchesCache;
2534
+ const r = [...e.patches.values()].sort((i, n) => i.ordinal - n.ordinal);
2535
+ return e.sortedPatchesCache = r, e.sortedPatchesCacheKey = s, r;
2536
+ }
2537
+ buildPatchCacheKey(e) {
2538
+ if (e.size === 0) return "";
2539
2539
  let s = "";
2540
- for (const [r, i] of t)
2540
+ for (const [r, i] of e)
2541
2541
  s += s ? `,${r}:${i.ordinal}` : `${r}:${i.ordinal}`;
2542
2542
  return s;
2543
2543
  }
2544
- invalidatePatchCache(t) {
2545
- t.sortedPatchesCache = void 0, t.sortedPatchesCacheKey = void 0;
2544
+ invalidatePatchCache(e) {
2545
+ e.sortedPatchesCache = void 0, e.sortedPatchesCacheKey = void 0;
2546
2546
  }
2547
- apply(t) {
2547
+ apply(e) {
2548
2548
  if (this.snapshotMode) {
2549
- if (t.snapshot.type !== "full")
2549
+ if (e.snapshot.type !== "full")
2550
2550
  return !1;
2551
2551
  this.snapshotMode = !1, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.patchesDirty = !0, this.payloadsDirty = !0, this.snapshot = {
2552
2552
  views: /* @__PURE__ */ new Map(),
@@ -2555,7 +2555,7 @@ class Tn {
2555
2555
  version: -1
2556
2556
  };
2557
2557
  }
2558
- const { snapshot: s, payloads: r } = t, { metadata: i } = s, { viewId: n } = i;
2558
+ const { snapshot: s, payloads: r } = e, { metadata: i } = s, { viewId: n } = i;
2559
2559
  let o = this.views.get(n);
2560
2560
  o || (o = {
2561
2561
  version: 0,
@@ -2574,7 +2574,7 @@ class Tn {
2574
2574
  o.patches.delete(I) && (l = !0, this.patchesDirty = !0, this.invalidatePatchCache(o));
2575
2575
  const h = o.composite ?? o.baseline;
2576
2576
  if (s.type === "full")
2577
- o.baseline = s.root, o.composite = s.root, o.baselineVersion = i.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);
2577
+ o.baseline = s.root, o.composite = s.root, o.baselineVersion = i.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 && p(s.root, this.changedNodeIds);
2578
2578
  else if (i.optimisticPatch) {
2579
2579
  if (!h)
2580
2580
  return !1;
@@ -2595,61 +2595,61 @@ class Tn {
2595
2595
  const c = j(I, s.changes);
2596
2596
  c !== I ? (o.baseline = c, l = !0, this.viewsDirty = !0) : o.baseline = c, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? s.version;
2597
2597
  let E = o.baseline ?? c;
2598
- const u = this.getSortedPatches(o);
2599
- for (const f of u) {
2598
+ const _ = this.getSortedPatches(o);
2599
+ for (const f of _) {
2600
2600
  const S = j(E, f.changes);
2601
2601
  S !== E && (l = !0, this.viewsDirty = !0), E = S, f.baseVersion = o.baselineVersion;
2602
2602
  }
2603
- o.composite !== E && (o.composite = E, l = !0, this.viewsDirty = !0), h && E ? H(h, E, this.changedNodeIds) : E && b(E, this.changedNodeIds), o.version = s.version;
2603
+ o.composite !== E && (o.composite = E, l = !0, this.viewsDirty = !0), h && E ? H(h, E, this.changedNodeIds) : E && p(E, this.changedNodeIds), o.version = s.version;
2604
2604
  }
2605
2605
  for (const [I, c] of r)
2606
2606
  this.payloads.get(I) !== c && (this.payloads.set(I, c), l = !0, this.payloadsDirty = !0);
2607
2607
  return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
2608
2608
  }
2609
- replaceFromWire(t) {
2609
+ replaceFromWire(e) {
2610
2610
  const s = {
2611
- rootViewId: t.rootViewId,
2612
- views: new Map(t.views),
2613
- payloads: new Map(t.payloads),
2614
- optimisticPatches: new Map(t.optimisticPatches),
2615
- version: t.version
2611
+ rootViewId: e.rootViewId,
2612
+ views: new Map(e.views),
2613
+ payloads: new Map(e.payloads),
2614
+ optimisticPatches: new Map(e.optimisticPatches),
2615
+ version: e.version
2616
2616
  };
2617
2617
  return this.replaceSnapshot(s);
2618
2618
  }
2619
- patchFromOp(t) {
2619
+ patchFromOp(e) {
2620
2620
  this.snapshotMode = !0;
2621
- const s = t.expectedBaseVersion;
2621
+ const s = e.expectedBaseVersion;
2622
2622
  if (s !== void 0 && this.snapshot.version !== s)
2623
2623
  return !1;
2624
2624
  let r = !1, i = null, n = null, o = null;
2625
2625
  const a = () => (i || (i = new Map(this.snapshot.views)), i), l = () => (n || (n = new Map(this.snapshot.payloads)), n), h = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
2626
- if (t.deleteViews && t.deleteViews.length > 0)
2627
- for (const E of t.deleteViews)
2626
+ if (e.deleteViews && e.deleteViews.length > 0)
2627
+ for (const E of e.deleteViews)
2628
2628
  a().delete(E) && (r = !0, this.structureChanged = !0);
2629
- if (t.upsertViews && t.upsertViews.length > 0)
2630
- for (const [E, u] of t.upsertViews) {
2629
+ if (e.upsertViews && e.upsertViews.length > 0)
2630
+ for (const [E, _] of e.upsertViews) {
2631
2631
  const f = a(), S = f.get(E);
2632
- S !== u && (f.set(E, u), r = !0, S ? H(S, u, this.changedNodeIds) : (b(u, this.changedNodeIds), this.structureChanged = !0));
2632
+ S !== _ && (f.set(E, _), r = !0, S ? H(S, _, this.changedNodeIds) : (p(_, this.changedNodeIds), this.structureChanged = !0));
2633
2633
  }
2634
- if (t.deletePayloads && t.deletePayloads.length > 0)
2635
- for (const E of t.deletePayloads)
2634
+ if (e.deletePayloads && e.deletePayloads.length > 0)
2635
+ for (const E of e.deletePayloads)
2636
2636
  l().delete(E) && (r = !0);
2637
- if (t.upsertPayloads && t.upsertPayloads.length > 0)
2638
- for (const [E, u] of t.upsertPayloads) {
2637
+ if (e.upsertPayloads && e.upsertPayloads.length > 0)
2638
+ for (const [E, _] of e.upsertPayloads) {
2639
2639
  const f = l();
2640
- f.get(E) !== u && (f.set(E, u), r = !0);
2640
+ f.get(E) !== _ && (f.set(E, _), r = !0);
2641
2641
  }
2642
- if (t.deleteOptimisticPatchesForViews && t.deleteOptimisticPatchesForViews.length > 0)
2643
- for (const E of t.deleteOptimisticPatchesForViews)
2642
+ if (e.deleteOptimisticPatchesForViews && e.deleteOptimisticPatchesForViews.length > 0)
2643
+ for (const E of e.deleteOptimisticPatchesForViews)
2644
2644
  h().delete(E) && (r = !0);
2645
- if (t.upsertOptimisticPatches && t.upsertOptimisticPatches.length > 0)
2646
- for (const [E, u] of t.upsertOptimisticPatches) {
2645
+ if (e.upsertOptimisticPatches && e.upsertOptimisticPatches.length > 0)
2646
+ for (const [E, _] of e.upsertOptimisticPatches) {
2647
2647
  const f = h(), S = f.get(E);
2648
- Nn(S, u) || (f.set(E, u), r = !0);
2648
+ Nn(S, _) || (f.set(E, _), r = !0);
2649
2649
  }
2650
- const I = t.rootViewId ?? this.snapshot.rootViewId;
2650
+ const I = e.rootViewId ?? this.snapshot.rootViewId;
2651
2651
  I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
2652
- const c = t.nextVersion;
2652
+ const c = e.nextVersion;
2653
2653
  if (c !== this.snapshot.version && (r = !0), !r)
2654
2654
  return this.snapshot = { ...this.snapshot, version: c }, !1;
2655
2655
  for (const E of this.changedNodeIds)
@@ -2662,17 +2662,17 @@ class Tn {
2662
2662
  version: c
2663
2663
  }, this.notify(), !0;
2664
2664
  }
2665
- replaceSnapshot(t) {
2665
+ replaceSnapshot(e) {
2666
2666
  this.snapshotMode = !0;
2667
- const s = this.snapshot, r = s.version !== t.version || s.rootViewId !== t.rootViewId || s.views.size !== t.views.size || s.payloads.size !== t.payloads.size || s.optimisticPatches.size !== t.optimisticPatches.size;
2668
- (s.rootViewId !== t.rootViewId || s.views.size !== t.views.size) && (this.structureChanged = !0);
2669
- for (const [i, n] of t.views) {
2667
+ const s = this.snapshot, r = s.version !== e.version || s.rootViewId !== e.rootViewId || s.views.size !== e.views.size || s.payloads.size !== e.payloads.size || s.optimisticPatches.size !== e.optimisticPatches.size;
2668
+ (s.rootViewId !== e.rootViewId || s.views.size !== e.views.size) && (this.structureChanged = !0);
2669
+ for (const [i, n] of e.views) {
2670
2670
  const o = s.views.get(i);
2671
- o ? H(o, n, this.changedNodeIds) : (b(n, this.changedNodeIds), this.structureChanged = !0);
2671
+ o ? H(o, n, this.changedNodeIds) : (p(n, this.changedNodeIds), this.structureChanged = !0);
2672
2672
  }
2673
2673
  for (const i of this.changedNodeIds)
2674
2674
  this.nodeVersions.set(i, (this.nodeVersions.get(i) ?? 0) + 1);
2675
- return this.snapshot = t, r && this.notify(), r;
2675
+ return this.snapshot = e, r && this.notify(), r;
2676
2676
  }
2677
2677
  clear() {
2678
2678
  (this.snapshot.rootViewId === void 0 || this.snapshot.rootViewId.length === 0) && this.snapshot.views.size === 0 && this.snapshot.payloads.size === 0 && this.snapshot.optimisticPatches.size === 0 || (this.snapshotMode = !0, this.views.clear(), this.payloads.clear(), this.rootViewId = void 0, this.viewsDirty = !0, this.patchesDirty = !0, this.payloadsDirty = !0, this.snapshot = {
@@ -2685,37 +2685,37 @@ class Tn {
2685
2685
  getSnapshot() {
2686
2686
  return this.snapshot;
2687
2687
  }
2688
- subscribe(t) {
2689
- return this.listeners.add(t), () => {
2690
- this.listeners.delete(t);
2688
+ subscribe(e) {
2689
+ return this.listeners.add(e), () => {
2690
+ this.listeners.delete(e);
2691
2691
  };
2692
2692
  }
2693
- subscribeNode(t, s) {
2694
- let r = this.nodeListeners.get(t);
2695
- return r || (r = /* @__PURE__ */ new Set(), this.nodeListeners.set(t, r)), r.add(s), () => {
2696
- r && (r.delete(s), r.size === 0 && this.nodeListeners.delete(t));
2693
+ subscribeNode(e, s) {
2694
+ let r = this.nodeListeners.get(e);
2695
+ return r || (r = /* @__PURE__ */ new Set(), this.nodeListeners.set(e, r)), r.add(s), () => {
2696
+ r && (r.delete(s), r.size === 0 && this.nodeListeners.delete(e));
2697
2697
  };
2698
2698
  }
2699
- getNode(t) {
2700
- const s = this.snapshot.views.get(t);
2699
+ getNode(e) {
2700
+ const s = this.snapshot.views.get(e);
2701
2701
  if (s)
2702
2702
  return s;
2703
2703
  for (const r of this.snapshot.views.values()) {
2704
- const i = Xt(r, t);
2704
+ const i = Xt(r, e);
2705
2705
  if (i)
2706
2706
  return i;
2707
2707
  }
2708
2708
  }
2709
- getNodeVersion(t) {
2710
- return this.nodeVersions.get(t) ?? 0;
2709
+ getNodeVersion(e) {
2710
+ return this.nodeVersions.get(e) ?? 0;
2711
2711
  }
2712
2712
  notifyNodes() {
2713
2713
  if (this.changedNodeIds.size === 0 || this.nodeListeners.size === 0) {
2714
2714
  this.changedNodeIds.clear();
2715
2715
  return;
2716
2716
  }
2717
- for (const t of this.changedNodeIds) {
2718
- const s = this.nodeListeners.get(t);
2717
+ for (const e of this.changedNodeIds) {
2718
+ const s = this.nodeListeners.get(e);
2719
2719
  if (s)
2720
2720
  for (const r of s)
2721
2721
  r();
@@ -2723,14 +2723,14 @@ class Tn {
2723
2723
  this.changedNodeIds.clear();
2724
2724
  }
2725
2725
  commitSnapshot() {
2726
- let t, s, r;
2726
+ let e, s, r;
2727
2727
  if (this.viewsDirty) {
2728
2728
  const n = /* @__PURE__ */ new Map();
2729
2729
  for (const [o, a] of this.views)
2730
2730
  a.composite ? n.set(o, a.composite) : a.baseline && n.set(o, a.baseline);
2731
- t = n, this.viewsDirty = !1;
2731
+ e = n, this.viewsDirty = !1;
2732
2732
  } else
2733
- t = this.snapshot.views;
2733
+ e = this.snapshot.views;
2734
2734
  if (this.patchesDirty) {
2735
2735
  const n = /* @__PURE__ */ new Map();
2736
2736
  for (const [o, a] of this.views)
@@ -2756,7 +2756,7 @@ class Tn {
2756
2756
  i = i === void 0 ? n.version : Math.max(i, n.version);
2757
2757
  this.snapshot = {
2758
2758
  rootViewId: this.rootViewId,
2759
- views: t,
2759
+ views: e,
2760
2760
  payloads: r,
2761
2761
  optimisticPatches: s,
2762
2762
  version: i
@@ -2767,183 +2767,183 @@ class Tn {
2767
2767
  notify() {
2768
2768
  if (this.notifyNodes(), this.structureChanged) {
2769
2769
  this.structureChanged = !1;
2770
- for (const t of this.listeners)
2771
- t();
2770
+ for (const e of this.listeners)
2771
+ e();
2772
2772
  }
2773
2773
  }
2774
2774
  }
2775
- class yn {
2775
+ class An {
2776
2776
  streams = /* @__PURE__ */ new Map();
2777
2777
  listeners = /* @__PURE__ */ new Set();
2778
- apply(t, s) {
2779
- const i = this.getOrCreateStreamEntry(t).store.apply(s);
2780
- return i && this.notify(t), i;
2781
- }
2782
- applyStoreOp(t) {
2783
- if (t.type === "ReplaceStreamSnapshot") {
2784
- const s = this.getOrCreateStreamEntry(t.snapshot.streamId), r = s.category !== t.snapshot.category;
2785
- return s.category = t.snapshot.category, s.store.replaceFromWire(t.snapshot) || r ? (this.notify(t.snapshot.streamId), !0) : !1;
2778
+ apply(e, s) {
2779
+ const i = this.getOrCreateStreamEntry(e).store.apply(s);
2780
+ return i && this.notify(e), i;
2781
+ }
2782
+ applyStoreOp(e) {
2783
+ if (e.type === "ReplaceStreamSnapshot") {
2784
+ const s = this.getOrCreateStreamEntry(e.snapshot.streamId), r = s.category !== e.snapshot.category;
2785
+ return s.category = e.snapshot.category, s.store.replaceFromWire(e.snapshot) || r ? (this.notify(e.snapshot.streamId), !0) : !1;
2786
2786
  }
2787
- if (t.type === "PatchStreamSnapshot") {
2788
- const s = this.getOrCreateStreamEntry(t.streamId), r = t.category !== void 0 && s.category !== t.category;
2789
- return t.category !== void 0 && (s.category = t.category), s.store.patchFromOp(t) || r ? (this.notify(t.streamId), !0) : !1;
2787
+ if (e.type === "PatchStreamSnapshot") {
2788
+ const s = this.getOrCreateStreamEntry(e.streamId), r = e.category !== void 0 && s.category !== e.category;
2789
+ return e.category !== void 0 && (s.category = e.category), s.store.patchFromOp(e) || r ? (this.notify(e.streamId), !0) : !1;
2790
2790
  }
2791
- if (t.type === "ClearStream") {
2792
- const s = this.streams.get(t.streamId);
2793
- return s ? (s.store.clear(), this.notify(t.streamId), !0) : !1;
2791
+ if (e.type === "ClearStream") {
2792
+ const s = this.streams.get(e.streamId);
2793
+ return s ? (s.store.clear(), this.notify(e.streamId), !0) : !1;
2794
2794
  }
2795
- return t.type === "RemoveStream" ? this.streams.delete(t.streamId) ? (this.notify(t.streamId), !0) : !1 : t.type === "SetStreamCategory" ? (this.setCategory(t.streamId, t.category), !0) : !1;
2795
+ return e.type === "RemoveStream" ? this.streams.delete(e.streamId) ? (this.notify(e.streamId), !0) : !1 : e.type === "SetStreamCategory" ? (this.setCategory(e.streamId, e.category), !0) : !1;
2796
2796
  }
2797
- applyStoreOps(t) {
2798
- for (const s of t)
2797
+ applyStoreOps(e) {
2798
+ for (const s of e)
2799
2799
  this.applyStoreOp(s);
2800
2800
  }
2801
- clear(t) {
2802
- const s = this.streams.get(t);
2803
- s && (s.store.clear(), this.notify(t));
2801
+ clear(e) {
2802
+ const s = this.streams.get(e);
2803
+ s && (s.store.clear(), this.notify(e));
2804
2804
  }
2805
- remove(t) {
2806
- this.streams.delete(t) && this.notify(t);
2805
+ remove(e) {
2806
+ this.streams.delete(e) && this.notify(e);
2807
2807
  }
2808
- setCategory(t, s) {
2809
- const r = this.getOrCreateStreamEntry(t);
2810
- r.category !== s && (r.category = s, this.notify(t));
2808
+ setCategory(e, s) {
2809
+ const r = this.getOrCreateStreamEntry(e);
2810
+ r.category !== s && (r.category = s, this.notify(e));
2811
2811
  }
2812
- getSnapshot(t) {
2813
- const s = this.streams.get(t);
2812
+ getSnapshot(e) {
2813
+ const s = this.streams.get(e);
2814
2814
  return s ? {
2815
2815
  ...s.store.getSnapshot(),
2816
- streamId: t,
2816
+ streamId: e,
2817
2817
  category: s.category
2818
2818
  } : void 0;
2819
2819
  }
2820
2820
  getSnapshots() {
2821
- const t = [];
2821
+ const e = [];
2822
2822
  for (const [s, r] of this.streams) {
2823
2823
  const i = r.store.getSnapshot();
2824
- t.push({
2824
+ e.push({
2825
2825
  ...i,
2826
2826
  streamId: s,
2827
2827
  category: r.category
2828
2828
  });
2829
2829
  }
2830
- return t;
2830
+ return e;
2831
2831
  }
2832
- subscribe(t) {
2833
- return this.listeners.add(t), () => {
2834
- this.listeners.delete(t);
2832
+ subscribe(e) {
2833
+ return this.listeners.add(e), () => {
2834
+ this.listeners.delete(e);
2835
2835
  };
2836
2836
  }
2837
- getOrCreateStreamEntry(t) {
2838
- let s = this.streams.get(t);
2839
- return s || (s = { store: new Tn() }, this.streams.set(t, s)), s;
2837
+ getOrCreateStreamEntry(e) {
2838
+ let s = this.streams.get(e);
2839
+ return s || (s = { store: new dn() }, this.streams.set(e, s)), s;
2840
2840
  }
2841
- notify(t) {
2841
+ notify(e) {
2842
2842
  for (const s of this.listeners)
2843
- s(t);
2843
+ s(e);
2844
2844
  }
2845
2845
  }
2846
- function j(e, t, s) {
2847
- if (t.length === 0)
2848
- return e;
2846
+ function j(t, e, s) {
2847
+ if (e.length === 0)
2848
+ return t;
2849
2849
  const r = /* @__PURE__ */ new Map();
2850
- for (const i of t)
2850
+ for (const i of e)
2851
2851
  r.set(i.nodeId, i);
2852
- return $t(e, r);
2852
+ return $t(t, r);
2853
2853
  }
2854
- function $t(e, t, s) {
2855
- const r = t.get(e.id);
2856
- let i = e, n = !1;
2854
+ function $t(t, e, s) {
2855
+ const r = e.get(t.id);
2856
+ let i = t, n = !1;
2857
2857
  if (r?.textUpdates && r.textUpdates.length > 0) {
2858
- const _ = Cn(e, r.textUpdates);
2859
- i = _.node, n = _.changed;
2858
+ const u = Cn(t, r.textUpdates);
2859
+ i = u.node, n = u.changed;
2860
2860
  }
2861
2861
  let o = !1, a = i.props;
2862
2862
  if (r?.changedProps && r.changedProps.size > 0)
2863
- for (const [_, A] of r.changedProps.entries()) {
2864
- const T = a[_];
2865
- if (A === void 0)
2866
- (T !== void 0 || _ in a) && (o || (a = v(a), o = !0), delete a[_]);
2867
- else if (q(A)) {
2868
- const y = v(A);
2869
- k(y, T) || (o || (a = v(a), o = !0), a[_] = y);
2863
+ for (const [u, y] of r.changedProps.entries()) {
2864
+ const d = a[u];
2865
+ if (y === void 0)
2866
+ (d !== void 0 || u in a) && (o || (a = v(a), o = !0), delete a[u]);
2867
+ else if (q(y)) {
2868
+ const A = v(y);
2869
+ k(A, d) || (o || (a = v(a), o = !0), a[u] = A);
2870
2870
  } else
2871
- k(A, T) || (o || (a = v(a), o = !0), a[_] = A);
2871
+ k(y, d) || (o || (a = v(a), o = !0), a[u] = y);
2872
2872
  }
2873
2873
  let l = !1, h = i.styleIds;
2874
2874
  r?.styleIds !== void 0 && (zt(i.styleIds, r.styleIds) || (h = r.styleIds, l = !0));
2875
2875
  const I = i.children ?? [];
2876
2876
  let c = I, E = !1;
2877
2877
  if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
2878
- const _ = c.slice();
2878
+ const u = c.slice();
2879
2879
  if (r?.removals && r.removals.length > 0) {
2880
- const A = [...r.removals].sort((T, y) => y.index - T.index);
2881
- for (const T of A)
2882
- if (T.index >= 0 && T.index < _.length && _[T.index].id === T.nodeId)
2883
- _.splice(T.index, 1);
2880
+ const y = [...r.removals].sort((d, A) => A.index - d.index);
2881
+ for (const d of y)
2882
+ if (d.index >= 0 && d.index < u.length && u[d.index].id === d.nodeId)
2883
+ u.splice(d.index, 1);
2884
2884
  else {
2885
- const y = _.findIndex((R) => R.id === T.nodeId);
2886
- y >= 0 && _.splice(y, 1);
2885
+ const A = u.findIndex((R) => R.id === d.nodeId);
2886
+ A >= 0 && u.splice(A, 1);
2887
2887
  }
2888
2888
  E = !0;
2889
2889
  }
2890
2890
  if (r?.moves && r.moves.length > 0) {
2891
- const A = [...r.moves].sort((y, R) => y.toIndex - R.toIndex), T = /* @__PURE__ */ new Map();
2892
- for (const y of A) {
2893
- const R = _.findIndex(($) => $.id === y.nodeId);
2894
- R >= 0 && (T.set(y.nodeId, _[R]), _.splice(R, 1));
2891
+ const y = [...r.moves].sort((A, R) => A.toIndex - R.toIndex), d = /* @__PURE__ */ new Map();
2892
+ for (const A of y) {
2893
+ const R = u.findIndex(($) => $.id === A.nodeId);
2894
+ R >= 0 && (d.set(A.nodeId, u[R]), u.splice(R, 1));
2895
2895
  }
2896
- for (const y of A) {
2897
- const R = T.get(y.nodeId);
2896
+ for (const A of y) {
2897
+ const R = d.get(A.nodeId);
2898
2898
  if (R) {
2899
- const $ = Math.min(y.toIndex, _.length);
2900
- _.splice($, 0, R);
2899
+ const $ = Math.min(A.toIndex, u.length);
2900
+ u.splice($, 0, R);
2901
2901
  }
2902
2902
  }
2903
2903
  E = !0;
2904
2904
  }
2905
2905
  if (r?.inserts && r.inserts.length > 0) {
2906
- const A = [...r.inserts].sort((T, y) => T.index - y.index);
2907
- for (const T of A) {
2908
- const y = Math.min(T.index, _.length);
2909
- _.splice(y, 0, T.node);
2906
+ const y = [...r.inserts].sort((d, A) => d.index - A.index);
2907
+ for (const d of y) {
2908
+ const A = Math.min(d.index, u.length);
2909
+ u.splice(A, 0, d.node);
2910
2910
  }
2911
2911
  E = !0;
2912
2912
  }
2913
- c = _;
2913
+ c = u;
2914
2914
  }
2915
2915
  let f;
2916
- for (let _ = 0; _ < c.length; _++) {
2917
- const A = c[_], T = $t(A, t);
2918
- T !== A && (f || (f = c.slice()), f[_] = T);
2916
+ for (let u = 0; u < c.length; u++) {
2917
+ const y = c[u], d = $t(y, e);
2918
+ d !== y && (f || (f = c.slice()), f[u] = d);
2919
2919
  }
2920
2920
  return f && (c = f, E = !0), n || o || l || E ? !o && !E && !l ? i : {
2921
- id: e.id,
2922
- type: e.type,
2921
+ id: t.id,
2922
+ type: t.type,
2923
2923
  props: o ? a : i.props,
2924
2924
  children: E ? c : I,
2925
2925
  styleIds: l ? h : i.styleIds
2926
- } : e;
2926
+ } : t;
2927
2927
  }
2928
- function b(e, t) {
2929
- if (t.add(e.id), e.children)
2930
- for (const s of e.children)
2931
- b(s, t);
2928
+ function p(t, e) {
2929
+ if (e.add(t.id), t.children)
2930
+ for (const s of t.children)
2931
+ p(s, e);
2932
2932
  }
2933
2933
  const x = [];
2934
- function Sn(e) {
2935
- for (; x.length <= e; )
2934
+ function Sn(t) {
2935
+ for (; x.length <= t; )
2936
2936
  x.push(/* @__PURE__ */ new Map());
2937
- return x[e].clear(), x[e];
2937
+ return x[t].clear(), x[t];
2938
2938
  }
2939
- function H(e, t, s) {
2940
- jt(e, t, s, 0);
2939
+ function H(t, e, s) {
2940
+ jt(t, e, s, 0);
2941
2941
  }
2942
- function jt(e, t, s, r) {
2943
- if (e === t)
2942
+ function jt(t, e, s, r) {
2943
+ if (t === e)
2944
2944
  return;
2945
- (e.type !== t.type || !An(e.props, t.props) || !zt(e.styleIds, t.styleIds)) && s.add(t.id);
2946
- const n = e.children ?? [], o = t.children ?? [];
2945
+ (t.type !== e.type || !yn(t.props, e.props) || !zt(t.styleIds, e.styleIds)) && s.add(e.id);
2946
+ const n = t.children ?? [], o = e.children ?? [];
2947
2947
  if (n !== o) {
2948
2948
  const a = Sn(r);
2949
2949
  for (const h of n)
@@ -2951,42 +2951,42 @@ function jt(e, t, s, r) {
2951
2951
  let l = !1;
2952
2952
  for (let h = 0; h < o.length; h++) {
2953
2953
  const I = o[h], c = a.get(I.id);
2954
- c ? (jt(c, I, s, r + 1), !l && h < n.length && n[h].id !== I.id && (l = !0)) : (b(I, s), l = !0);
2954
+ c ? (jt(c, I, s, r + 1), !l && h < n.length && n[h].id !== I.id && (l = !0)) : (p(I, s), l = !0);
2955
2955
  }
2956
- (n.length !== o.length || l) && s.add(t.id);
2956
+ (n.length !== o.length || l) && s.add(e.id);
2957
2957
  }
2958
2958
  }
2959
- function An(e, t) {
2960
- return k(e, t);
2959
+ function yn(t, e) {
2960
+ return k(t, e);
2961
2961
  }
2962
- function Xt(e, t) {
2963
- if (e.id === t)
2964
- return e;
2965
- if (e.children)
2966
- for (const s of e.children) {
2967
- const r = Xt(s, t);
2962
+ function Xt(t, e) {
2963
+ if (t.id === e)
2964
+ return t;
2965
+ if (t.children)
2966
+ for (const s of t.children) {
2967
+ const r = Xt(s, e);
2968
2968
  if (r)
2969
2969
  return r;
2970
2970
  }
2971
2971
  }
2972
- function zt(e, t) {
2973
- return k(e, t);
2972
+ function zt(t, e) {
2973
+ return k(t, e);
2974
2974
  }
2975
- function Nn(e, t) {
2976
- if (e === t) return !0;
2977
- if (!e || !t || e.length !== t.length) return !1;
2978
- for (let s = 0; s < e.length; s++) {
2979
- const r = e[s], i = t[s];
2975
+ function Nn(t, e) {
2976
+ if (t === e) return !0;
2977
+ if (!t || !e || t.length !== e.length) return !1;
2978
+ for (let s = 0; s < t.length; s++) {
2979
+ const r = t[s], i = e[s];
2980
2980
  if (r.id !== i.id || r.actionId !== i.actionId || r.ordinal !== i.ordinal || r.baseVersion !== i.baseVersion)
2981
2981
  return !1;
2982
2982
  }
2983
2983
  return !0;
2984
2984
  }
2985
- function wn(e, t) {
2986
- if (t.length === 0)
2987
- return e;
2988
- const s = [...t].sort((n, o) => n.start - o.start);
2989
- let r = e, i = 0;
2985
+ function wn(t, e) {
2986
+ if (e.length === 0)
2987
+ return t;
2988
+ const s = [...e].sort((n, o) => n.start - o.start);
2989
+ let r = t, i = 0;
2990
2990
  for (const n of s) {
2991
2991
  const o = at(n.start + i, 0, r.length);
2992
2992
  if (n.end == null) {
@@ -2999,19 +2999,19 @@ function wn(e, t) {
2999
2999
  }
3000
3000
  return r;
3001
3001
  }
3002
- function Cn(e, t, s) {
3003
- if (t.length === 0)
3004
- return { node: e, changed: !1 };
3002
+ function Cn(t, e, s) {
3003
+ if (e.length === 0)
3004
+ return { node: t, changed: !1 };
3005
3005
  const r = /* @__PURE__ */ new Map();
3006
- for (const i of t) {
3006
+ for (const i of e) {
3007
3007
  const n = r.get(i.nodeId);
3008
3008
  n ? n.push(i) : r.set(i.nodeId, [i]);
3009
3009
  }
3010
- return Jt(e, r);
3010
+ return Jt(t, r);
3011
3011
  }
3012
- function Jt(e, t, s) {
3013
- const r = t.get(e.id) ?? [];
3014
- let i = !1, n = e.props;
3012
+ function Jt(t, e, s) {
3013
+ const r = e.get(t.id) ?? [];
3014
+ let i = !1, n = t.props;
3015
3015
  if (r.length > 0) {
3016
3016
  const h = /* @__PURE__ */ new Map();
3017
3017
  for (const I of r) {
@@ -3024,85 +3024,85 @@ function Jt(e, t, s) {
3024
3024
  }
3025
3025
  }
3026
3026
  let o = !1;
3027
- const a = e.children ?? [];
3027
+ const a = t.children ?? [];
3028
3028
  let l = a;
3029
3029
  if (a.length > 0) {
3030
3030
  let h;
3031
3031
  for (let I = 0; I < a.length; I++) {
3032
- const c = a[I], E = Jt(c, t);
3032
+ const c = a[I], E = Jt(c, e);
3033
3033
  E.changed && (h || (h = [...a]), h[I] = E.node);
3034
3034
  }
3035
3035
  h && (l = h, o = !0);
3036
3036
  }
3037
- return !i && !o ? { node: e, changed: !1 } : {
3037
+ return !i && !o ? { node: t, changed: !1 } : {
3038
3038
  node: {
3039
- id: e.id,
3040
- type: e.type,
3041
- props: i ? n : e.props,
3039
+ id: t.id,
3040
+ type: t.type,
3041
+ props: i ? n : t.props,
3042
3042
  children: o ? l : a,
3043
- styleIds: e.styleIds
3043
+ styleIds: t.styleIds
3044
3044
  },
3045
3045
  changed: !0
3046
3046
  };
3047
3047
  }
3048
- function at(e, t, s) {
3049
- return Math.max(t, Math.min(s, e));
3048
+ function at(t, e, s) {
3049
+ return Math.max(e, Math.min(s, t));
3050
3050
  }
3051
- function Un(e, t) {
3052
- const s = Math.min(e.length, t.length);
3051
+ function Un(t, e) {
3052
+ const s = Math.min(t.length, e.length);
3053
3053
  let r = 0;
3054
- for (; r < s && e.charCodeAt(r) === t.charCodeAt(r); )
3054
+ for (; r < s && t.charCodeAt(r) === e.charCodeAt(r); )
3055
3055
  r++;
3056
3056
  return r;
3057
3057
  }
3058
- function v(e) {
3059
- const t = {}, s = Object.keys(e);
3058
+ function v(t) {
3059
+ const e = {}, s = Object.keys(t);
3060
3060
  for (let r = 0; r < s.length; r++) {
3061
3061
  const i = s[r];
3062
- t[i] = e[i];
3062
+ e[i] = t[i];
3063
3063
  }
3064
- return t;
3064
+ return e;
3065
3065
  }
3066
- function q(e) {
3067
- return typeof e == "object" && e !== null && !Array.isArray(e);
3066
+ function q(t) {
3067
+ return typeof t == "object" && t !== null && !Array.isArray(t);
3068
3068
  }
3069
- function k(e, t) {
3070
- if (Object.is(e, t))
3069
+ function k(t, e) {
3070
+ if (Object.is(t, e))
3071
3071
  return !0;
3072
- if (Array.isArray(e) && Array.isArray(t)) {
3073
- if (e.length !== t.length)
3072
+ if (Array.isArray(t) && Array.isArray(e)) {
3073
+ if (t.length !== e.length)
3074
3074
  return !1;
3075
- for (let s = 0; s < e.length; s++)
3076
- if (!k(e[s], t[s]))
3075
+ for (let s = 0; s < t.length; s++)
3076
+ if (!k(t[s], e[s]))
3077
3077
  return !1;
3078
3078
  return !0;
3079
3079
  }
3080
- if (q(e) && q(t)) {
3081
- const s = Object.keys(e), r = Object.keys(t);
3080
+ if (q(t) && q(e)) {
3081
+ const s = Object.keys(t), r = Object.keys(e);
3082
3082
  if (s.length !== r.length)
3083
3083
  return !1;
3084
3084
  for (const i of s)
3085
- if (!k(e[i], t[i]))
3085
+ if (!k(t[i], e[i]))
3086
3086
  return !1;
3087
3087
  return !0;
3088
3088
  }
3089
3089
  return !1;
3090
3090
  }
3091
- function Dn(e) {
3091
+ function Dn(t) {
3092
3092
  return new Worker(
3093
- "" + new URL("assets/ui-worker-CgUxgLaW.js", import.meta.url).href,
3093
+ "" + new URL("assets/ui-worker-4F8aYHI_.js", import.meta.url).href,
3094
3094
  {
3095
3095
  type: "module",
3096
- name: e?.name
3096
+ name: t?.name
3097
3097
  }
3098
3098
  );
3099
3099
  }
3100
- const m = qt("IkonUiCore");
3101
- class Ln {
3100
+ const L = qt("IkonUiCore");
3101
+ class mn {
3102
3102
  unsubscribeProtocolMessages;
3103
3103
  unsubscribeState;
3104
3104
  client = null;
3105
- uiStore = new yn();
3105
+ uiStore = new An();
3106
3106
  uiWorker = null;
3107
3107
  uiStyles = /* @__PURE__ */ new Map();
3108
3108
  uiUpdateListeners = /* @__PURE__ */ new Set();
@@ -3110,48 +3110,48 @@ class Ln {
3110
3110
  uiStyleDeleteListeners = /* @__PURE__ */ new Set();
3111
3111
  uiStreamClearedListeners = /* @__PURE__ */ new Set();
3112
3112
  useUiWorker;
3113
- constructor(t) {
3114
- const s = t?.threading?.uiWorker ?? "auto";
3115
- this.useUiWorker = s !== "disabled" && typeof Worker < "u", t?.client && this.initialize(t.client, t);
3113
+ constructor(e) {
3114
+ const s = e?.threading?.uiWorker ?? "auto";
3115
+ this.useUiWorker = s !== "disabled" && typeof Worker < "u", e?.client && this.initialize(e.client, e);
3116
3116
  }
3117
3117
  dispose() {
3118
3118
  this.unsubscribeProtocolMessages?.(), this.unsubscribeState?.(), this.uiWorker?.terminate(), this.uiWorker = null, this.client = null, this.uiStyleListeners.clear(), this.uiStyleDeleteListeners.clear(), this.uiStyles.clear();
3119
3119
  }
3120
3120
  clearAllState() {
3121
3121
  this.uiWorker && this.uiWorker.postMessage({ type: "clear" });
3122
- for (const t of this.uiStore.getSnapshots())
3123
- this.uiStore.remove(t.streamId), this.notifyUiStreamCleared(t.streamId);
3122
+ for (const e of this.uiStore.getSnapshots())
3123
+ this.uiStore.remove(e.streamId), this.notifyUiStreamCleared(e.streamId);
3124
3124
  this.uiStyles.clear();
3125
3125
  }
3126
- subscribeToUiUpdates(t) {
3127
- return this.uiUpdateListeners.add(t), () => {
3128
- this.uiUpdateListeners.delete(t);
3126
+ subscribeToUiUpdates(e) {
3127
+ return this.uiUpdateListeners.add(e), () => {
3128
+ this.uiUpdateListeners.delete(e);
3129
3129
  };
3130
3130
  }
3131
- subscribeToUiStreamCleared(t) {
3132
- return this.uiStreamClearedListeners.add(t), () => {
3133
- this.uiStreamClearedListeners.delete(t);
3131
+ subscribeToUiStreamCleared(e) {
3132
+ return this.uiStreamClearedListeners.add(e), () => {
3133
+ this.uiStreamClearedListeners.delete(e);
3134
3134
  };
3135
3135
  }
3136
- subscribeToUiStyles(t) {
3137
- return this.uiStyleListeners.add(t), () => {
3138
- this.uiStyleListeners.delete(t);
3136
+ subscribeToUiStyles(e) {
3137
+ return this.uiStyleListeners.add(e), () => {
3138
+ this.uiStyleListeners.delete(e);
3139
3139
  };
3140
3140
  }
3141
- subscribeToUiStyleDeletes(t) {
3142
- return this.uiStyleDeleteListeners.add(t), () => {
3143
- this.uiStyleDeleteListeners.delete(t);
3141
+ subscribeToUiStyleDeletes(e) {
3142
+ return this.uiStyleDeleteListeners.add(e), () => {
3143
+ this.uiStyleDeleteListeners.delete(e);
3144
3144
  };
3145
3145
  }
3146
3146
  getUiStyles() {
3147
3147
  return Array.from(this.uiStyles.values());
3148
3148
  }
3149
- initialize(t, s) {
3150
- this.client = t, this.useUiWorker && this.startUiWorker(s);
3149
+ initialize(e, s) {
3150
+ this.client = e, this.useUiWorker && this.startUiWorker(s);
3151
3151
  const r = {
3152
- opcodeGroupsMask: L.GROUP_CORE | L.GROUP_UI | L.GROUP_ACTIONS
3152
+ opcodeGroupsMask: m.GROUP_CORE | m.GROUP_UI | m.GROUP_ACTIONS
3153
3153
  };
3154
- this.unsubscribeProtocolMessages = t.subscribeToProtocolMessages((n) => {
3154
+ this.unsubscribeProtocolMessages = e.subscribeToProtocolMessages((n) => {
3155
3155
  if (this.uiWorker) {
3156
3156
  this.forwardMessageToWorker(n);
3157
3157
  return;
@@ -3159,85 +3159,85 @@ class Ln {
3159
3159
  this.handleProtocolMessage(n);
3160
3160
  }, r);
3161
3161
  let i = !1;
3162
- this.unsubscribeState = t.subscribeToState((n) => {
3162
+ this.unsubscribeState = e.subscribeToState((n) => {
3163
3163
  n === "reconnecting" ? i = !0 : n === "connected" && i ? (i = !1, this.clearAllState()) : (i = !1, (n === "offline" || n === "offlineError") && this.clearAllState());
3164
3164
  });
3165
3165
  }
3166
- startUiWorker(t) {
3166
+ startUiWorker(e) {
3167
3167
  try {
3168
3168
  this.uiWorker = new Dn();
3169
3169
  } catch (i) {
3170
- m.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
3170
+ L.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
3171
3171
  return;
3172
3172
  }
3173
- const s = t?.threading?.flushIntervalMs, r = t?.threading?.maxLatencyMs;
3173
+ const s = e?.threading?.flushIntervalMs, r = e?.threading?.maxLatencyMs;
3174
3174
  this.uiWorker.postMessage({ type: "configure", flushIntervalMs: s, maxLatencyMs: r }), this.uiWorker.addEventListener("message", (i) => {
3175
3175
  this.handleUiStoreOpBatch(i.data);
3176
3176
  }), this.uiWorker.addEventListener("error", (i) => {
3177
3177
  const n = [i.message, i.filename, i.lineno, i.colno].filter((o) => o != null && String(o).length > 0);
3178
- m.warn(`UI worker failed, falling back to main thread: ${n.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
3178
+ L.warn(`UI worker failed, falling back to main thread: ${n.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
3179
3179
  });
3180
3180
  }
3181
3181
  rehydrateStoresForMainThread() {
3182
- for (const t of this.uiStore.getSnapshots()) {
3183
- if (!t.rootViewId)
3182
+ for (const e of this.uiStore.getSnapshots()) {
3183
+ if (!e.rootViewId)
3184
3184
  continue;
3185
- const s = t.views.get(t.rootViewId);
3185
+ const s = e.views.get(e.rootViewId);
3186
3186
  if (!s)
3187
3187
  continue;
3188
3188
  const r = {
3189
3189
  snapshot: {
3190
3190
  type: "full",
3191
- version: t.version ?? 0,
3192
- metadata: { viewId: t.rootViewId },
3191
+ version: e.version ?? 0,
3192
+ metadata: { viewId: e.rootViewId },
3193
3193
  root: s
3194
3194
  },
3195
- payloads: t.payloads
3195
+ payloads: e.payloads
3196
3196
  };
3197
- this.uiStore.apply(t.streamId, r);
3197
+ this.uiStore.apply(e.streamId, r);
3198
3198
  }
3199
3199
  }
3200
- forwardMessageToWorker(t) {
3200
+ forwardMessageToWorker(e) {
3201
3201
  if (this.uiWorker)
3202
3202
  try {
3203
- const s = t.slice().buffer;
3203
+ const s = e.slice().buffer;
3204
3204
  this.uiWorker.postMessage({ type: "protocol", message: s }, [s]);
3205
3205
  } catch (s) {
3206
- m.warn("Failed to forward message to UI worker", s);
3206
+ L.warn("Failed to forward message to UI worker", s);
3207
3207
  }
3208
3208
  }
3209
- handleUiStoreOpBatch(t) {
3210
- for (const s of t.ops)
3209
+ handleUiStoreOpBatch(e) {
3210
+ for (const s of e.ops)
3211
3211
  this.applyUiStoreOp(s);
3212
- if (t.acks && t.acks.length > 0)
3213
- for (const s of t.acks)
3212
+ if (e.acks && e.acks.length > 0)
3213
+ for (const s of e.acks)
3214
3214
  this.sendUiUpdateAck(s.trackId, s.version, s.senderId);
3215
3215
  }
3216
- applyUiStoreOp(t) {
3217
- if (t.type === "UpsertUiStyle") {
3218
- this.uiStyles.set(t.style.styleId, t.style), this.notifyUiStyle(t.style);
3216
+ applyUiStoreOp(e) {
3217
+ if (e.type === "UpsertUiStyle") {
3218
+ this.uiStyles.set(e.style.styleId, e.style), this.notifyUiStyle(e.style);
3219
3219
  return;
3220
3220
  }
3221
- if (t.type === "RemoveUiStyle") {
3222
- this.uiStyles.delete(t.styleId) && this.notifyUiStyleDelete([t.styleId]);
3221
+ if (e.type === "RemoveUiStyle") {
3222
+ this.uiStyles.delete(e.styleId) && this.notifyUiStyleDelete([e.styleId]);
3223
3223
  return;
3224
3224
  }
3225
- if (t.type === "ClearStream") {
3226
- this.uiStore.applyStoreOp(t), this.notifyUiStreamCleared(t.streamId);
3225
+ if (e.type === "ClearStream") {
3226
+ this.uiStore.applyStoreOp(e), this.notifyUiStreamCleared(e.streamId);
3227
3227
  return;
3228
3228
  }
3229
- if (t.type === "RemoveStream") {
3230
- this.uiStore.applyStoreOp(t), this.notifyUiStreamCleared(t.streamId);
3229
+ if (e.type === "RemoveStream") {
3230
+ this.uiStore.applyStoreOp(e), this.notifyUiStreamCleared(e.streamId);
3231
3231
  return;
3232
3232
  }
3233
- if (t.type === "SetStreamCategory") {
3234
- this.uiStore.applyStoreOp(t);
3233
+ if (e.type === "SetStreamCategory") {
3234
+ this.uiStore.applyStoreOp(e);
3235
3235
  return;
3236
3236
  }
3237
- if (t.type === "ReplaceStreamSnapshot" || t.type === "PatchStreamSnapshot") {
3238
- if (!this.uiStore.applyStoreOp(t))
3237
+ if (e.type === "ReplaceStreamSnapshot" || e.type === "PatchStreamSnapshot") {
3238
+ if (!this.uiStore.applyStoreOp(e))
3239
3239
  return;
3240
- const r = t.type === "ReplaceStreamSnapshot" ? t.snapshot.streamId : t.streamId, i = this.uiStore.getSnapshot(r);
3240
+ const r = e.type === "ReplaceStreamSnapshot" ? e.snapshot.streamId : e.streamId, i = this.uiStore.getSnapshot(r);
3241
3241
  if (!i?.rootViewId)
3242
3242
  return;
3243
3243
  const n = i.views.get(i.rootViewId);
@@ -3256,52 +3256,52 @@ class Ln {
3256
3256
  return;
3257
3257
  }
3258
3258
  }
3259
- handleProtocolMessage(t) {
3260
- switch (Qt(t)) {
3261
- case L.CORE_GLOBAL_STATE:
3262
- this.handleGlobalState(t);
3259
+ handleProtocolMessage(e) {
3260
+ switch (Qt(e)) {
3261
+ case m.CORE_GLOBAL_STATE:
3262
+ this.handleGlobalState(e);
3263
3263
  return;
3264
- case L.UI_UPDATE:
3265
- this.handleUiUpdate(t);
3264
+ case m.UI_UPDATE:
3265
+ this.handleUiUpdate(e);
3266
3266
  return;
3267
- case L.UI_STYLES:
3268
- this.handleUiStyles(t);
3267
+ case m.UI_STYLES:
3268
+ this.handleUiStyles(e);
3269
3269
  return;
3270
- case L.UI_STYLES_BATCH:
3271
- this.handleUiStylesBatch(t);
3270
+ case m.UI_STYLES_BATCH:
3271
+ this.handleUiStylesBatch(e);
3272
3272
  return;
3273
- case L.UI_STYLES_DELETE:
3274
- this.handleUiStylesDelete(t);
3273
+ case m.UI_STYLES_DELETE:
3274
+ this.handleUiStylesDelete(e);
3275
3275
  return;
3276
- case L.ACTION_UI_CLEAR_STREAM:
3277
- this.handleClearStream(t);
3276
+ case m.ACTION_UI_CLEAR_STREAM:
3277
+ this.handleClearStream(e);
3278
3278
  return;
3279
3279
  default:
3280
3280
  return;
3281
3281
  }
3282
3282
  }
3283
- handleGlobalState(t) {
3284
- mr(t).then((s) => {
3283
+ handleGlobalState(e) {
3284
+ Lr(e).then((s) => {
3285
3285
  const r = /* @__PURE__ */ new Set();
3286
3286
  for (const i of Object.values(s.UIStreams ?? {}))
3287
3287
  r.add(i.StreamId), this.uiStore.setCategory(i.StreamId, i.Info?.Category);
3288
3288
  for (const i of this.uiStore.getSnapshots())
3289
3289
  r.has(i.streamId) || (this.uiStore.remove(i.streamId), this.notifyUiStreamCleared(i.streamId));
3290
3290
  }).catch((s) => {
3291
- m.error("Failed to handle global state", s);
3291
+ L.error("Failed to handle global state", s);
3292
3292
  });
3293
3293
  }
3294
- handleUiUpdate(t) {
3295
- const s = nt(t), r = `${s.senderId}_${s.trackId}`;
3296
- Qi(t).then((i) => {
3294
+ handleUiUpdate(e) {
3295
+ const s = nt(e), r = `${s.senderId}_${s.trackId}`;
3296
+ Qi(e).then((i) => {
3297
3297
  const n = fn(i);
3298
3298
  this.notifyUiUpdate(r, n), this.uiStore.apply(r, n), this.sendUiUpdateAck(s.trackId, n.snapshot.version, s.senderId);
3299
3299
  }).catch((i) => {
3300
- i instanceof D ? m.warn("Failed to parse UI update", i.causeError ?? i) : m.error("Failed to apply UI update", i);
3300
+ i instanceof D ? L.warn("Failed to parse UI update", i.causeError ?? i) : L.error("Failed to apply UI update", i);
3301
3301
  });
3302
3302
  }
3303
- handleUiStyles(t) {
3304
- Ni(t).then((s) => {
3303
+ handleUiStyles(e) {
3304
+ Ni(e).then((s) => {
3305
3305
  if (!s.StyleId) return;
3306
3306
  const r = {
3307
3307
  styleId: s.StyleId,
@@ -3310,11 +3310,11 @@ class Ln {
3310
3310
  };
3311
3311
  this.uiStyles.set(r.styleId, r), this.notifyUiStyle(r);
3312
3312
  }).catch((s) => {
3313
- m.error("Failed to handle UI styles", s);
3313
+ L.error("Failed to handle UI styles", s);
3314
3314
  });
3315
3315
  }
3316
- handleUiStylesBatch(t) {
3317
- gi(t).then((s) => {
3316
+ handleUiStylesBatch(e) {
3317
+ Oi(e).then((s) => {
3318
3318
  if (s.Styles)
3319
3319
  for (const r of s.Styles) {
3320
3320
  if (!r.StyleId) continue;
@@ -3326,55 +3326,55 @@ class Ln {
3326
3326
  this.uiStyles.set(i.styleId, i), this.notifyUiStyle(i);
3327
3327
  }
3328
3328
  }).catch((s) => {
3329
- m.error("Failed to handle UI styles batch", s);
3329
+ L.error("Failed to handle UI styles batch", s);
3330
3330
  });
3331
3331
  }
3332
- handleUiStylesDelete(t) {
3333
- Wi(t).then((s) => {
3332
+ handleUiStylesDelete(e) {
3333
+ Wi(e).then((s) => {
3334
3334
  if (!(!s.StyleIds || s.StyleIds.length === 0)) {
3335
3335
  for (const r of s.StyleIds)
3336
3336
  this.uiStyles.delete(r);
3337
3337
  this.notifyUiStyleDelete(s.StyleIds);
3338
3338
  }
3339
3339
  }).catch((s) => {
3340
- m.error("Failed to handle UI styles delete", s);
3340
+ L.error("Failed to handle UI styles delete", s);
3341
3341
  });
3342
3342
  }
3343
- handleClearStream(t) {
3344
- const s = nt(t), r = `${s.senderId}_${s.trackId}`;
3343
+ handleClearStream(e) {
3344
+ const s = nt(e), r = `${s.senderId}_${s.trackId}`;
3345
3345
  this.uiStore.clear(r), this.notifyUiStreamCleared(r);
3346
3346
  }
3347
- notifyUiUpdate(t, s) {
3347
+ notifyUiUpdate(e, s) {
3348
3348
  for (const r of this.uiUpdateListeners)
3349
- r(t, s);
3349
+ r(e, s);
3350
3350
  }
3351
- notifyUiStyle(t) {
3351
+ notifyUiStyle(e) {
3352
3352
  for (const s of this.uiStyleListeners)
3353
- s(t);
3353
+ s(e);
3354
3354
  }
3355
- notifyUiStyleDelete(t) {
3355
+ notifyUiStyleDelete(e) {
3356
3356
  for (const s of this.uiStyleDeleteListeners)
3357
- s(t);
3357
+ s(e);
3358
3358
  }
3359
- notifyUiStreamCleared(t) {
3359
+ notifyUiStreamCleared(e) {
3360
3360
  for (const s of this.uiStreamClearedListeners)
3361
- s(t);
3361
+ s(e);
3362
3362
  }
3363
- sendUiUpdateAck(t, s, r) {
3363
+ sendUiUpdateAck(e, s, r) {
3364
3364
  if (this.client && !(!Number.isFinite(s) || s < 0))
3365
3365
  try {
3366
- const i = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, n = nn({ Version: s }, this.client.sessionId ?? 0, i);
3366
+ const i = r !== void 0 ? { trackId: e, targetIds: [r] } : { trackId: e }, n = nn({ Version: s }, this.client.sessionId ?? 0, i);
3367
3367
  this.client.sendProtocolMessage(n);
3368
3368
  } catch (i) {
3369
- m.warn("Failed to send UI update ack", i);
3369
+ L.warn("Failed to send UI update ack", i);
3370
3370
  }
3371
3371
  }
3372
3372
  }
3373
3373
  export {
3374
- dn as HandlerCache,
3375
- Ln as IkonUiCore,
3376
- yn as UiStore,
3377
- Tn as UiStreamStore,
3374
+ Tn as HandlerCache,
3375
+ mn as IkonUiCore,
3376
+ An as UiStore,
3377
+ dn as UiStreamStore,
3378
3378
  D as UiUpdateParseError,
3379
3379
  fn as parseUiUpdate
3380
3380
  };