@ikonai/sdk-ui 1.0.66 → 1.0.67

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