@ikonai/sdk 1.0.41 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,103 +1,103 @@
1
- const Tt = {
1
+ const Nt = {
2
2
  Compressed: 8
3
3
  };
4
- function ct(t) {
4
+ function St(t) {
5
5
  if (t.length < 8)
6
6
  throw new Error("Protocol message too short");
7
7
  return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
8
8
  }
9
- function et(t) {
10
- const e = M(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
9
+ function rt(t) {
10
+ const e = B(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
11
11
  if (e.length < 27)
12
12
  throw new Error("Protocol payload too short");
13
- const s = r.getUint32(0, !0), n = r.getUint32(4, !0), a = r.getUint32(8, !0), i = r.getUint32(12, !0), _ = r.getUint32(16, !0), E = r.getUint32(20, !0), o = r.getUint8(24), I = r.getUint8(25), l = r.getUint8(26);
13
+ const s = r.getUint32(0, !0), n = r.getUint32(4, !0), i = r.getUint32(8, !0), a = r.getUint32(12, !0), _ = r.getUint32(16, !0), E = r.getUint32(20, !0), o = r.getUint8(24), I = r.getUint8(25), l = r.getUint8(26);
14
14
  if (27 + E * 4 > e.length)
15
15
  throw new Error("Protocol header exceeds payload length");
16
- const N = [];
17
- let O = 27;
18
- for (let m = 0; m < E; m++)
19
- N.push(r.getUint32(O, !0)), O += 4;
16
+ const S = [];
17
+ let w = 27;
18
+ for (let L = 0; L < E; L++)
19
+ S.push(r.getUint32(w, !0)), w += 4;
20
20
  return {
21
21
  length: s,
22
22
  opcode: n,
23
- senderId: a,
24
- trackId: i,
23
+ senderId: i,
24
+ trackId: a,
25
25
  sequenceId: _,
26
- targetIds: N,
26
+ targetIds: S,
27
27
  payloadVersion: o,
28
28
  payloadType: I,
29
29
  flags: l
30
30
  };
31
31
  }
32
- async function rt(t, e, r) {
33
- const s = M(t), n = et(s);
32
+ async function Y(t, e, r) {
33
+ const s = B(t), n = rt(s);
34
34
  if (e !== void 0 && n.opcode !== e)
35
35
  throw new Error(`Unexpected opcode ${n.opcode}`);
36
36
  if (n.payloadType !== 8)
37
37
  throw new Error(`Unexpected payload type ${n.payloadType}`);
38
- const a = 27 + n.targetIds.length * 4;
39
- let i = s.subarray(a, n.length);
40
- return (n.flags & Tt.Compressed) !== 0 && (i = await Nt(i)), i;
38
+ const i = 27 + n.targetIds.length * 4;
39
+ let a = s.subarray(i, n.length);
40
+ return (n.flags & Nt.Compressed) !== 0 && (a = await Ct(a)), a;
41
41
  }
42
- async function Nt(t) {
42
+ async function Ct(t) {
43
43
  if (typeof DecompressionStream > "u")
44
44
  throw new Error("DecompressionStream not supported");
45
45
  const e = new DecompressionStream("gzip"), r = e.writable.getWriter(), s = new Uint8Array(t);
46
46
  r.write(s), r.close();
47
- const n = e.readable.getReader(), a = [];
48
- let i = 0;
47
+ const n = e.readable.getReader(), i = [];
48
+ let a = 0;
49
49
  for (; ; ) {
50
50
  const { done: o, value: I } = await n.read();
51
51
  if (o) break;
52
- a.push(I), i += I.length;
52
+ i.push(I), a += I.length;
53
53
  }
54
- const _ = new Uint8Array(i);
54
+ const _ = new Uint8Array(a);
55
55
  let E = 0;
56
- for (let o = 0; o < a.length; o++)
57
- _.set(a[o], E), E += a[o].length;
56
+ for (let o = 0; o < i.length; o++)
57
+ _.set(i[o], E), E += i[o].length;
58
58
  return _;
59
59
  }
60
60
  var y = /* @__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))(y || {});
61
- const St = 161, Ct = 162;
61
+ const Rt = 161, Ut = 162;
62
62
  new TextEncoder();
63
- const Rt = new TextDecoder("utf-8", { fatal: !0 });
64
- class F {
63
+ const mt = new TextDecoder("utf-8", { fatal: !0 });
64
+ class d {
65
65
  constructor(e, r, s) {
66
66
  this.buffer = e, this.version = r, this.offset = s, this.end = e.length - 1;
67
67
  }
68
68
  offset;
69
69
  end;
70
70
  static create(e) {
71
- const r = M(e);
71
+ const r = B(e);
72
72
  if (r.length < 2)
73
73
  throw new Error("Teleport payload too short");
74
- if (r[0] !== St || r[r.length - 1] !== Ct)
74
+ if (r[0] !== Rt || r[r.length - 1] !== Ut)
75
75
  throw new Error("Teleport object missing markers");
76
76
  const s = { offset: 1 }, n = f(r, s, "InvalidLength");
77
- return new F(r, n, s.offset);
77
+ return new d(r, n, s.offset);
78
78
  }
79
79
  next() {
80
80
  if (this.offset >= this.end)
81
81
  return null;
82
82
  if (this.offset + 5 > this.buffer.length)
83
83
  throw new Error("Teleport object truncated");
84
- const e = Dt(this.buffer, this.offset);
84
+ const e = yt(this.buffer, this.offset);
85
85
  this.offset += 4;
86
86
  const r = this.buffer[this.offset++], s = r >> 4 & 15;
87
87
  if ((r & 15) !== 0)
88
88
  throw new Error("Teleport field flags must be zero");
89
- const n = P(s);
90
- let a;
89
+ const n = O(s);
90
+ let i;
91
91
  if (n >= 0)
92
- h(this.buffer, this.offset, n), a = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
92
+ h(this.buffer, this.offset, n), i = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
93
93
  else {
94
- const i = { offset: this.offset }, _ = f(this.buffer, i, "InvalidLength");
95
- h(this.buffer, i.offset, _), a = this.buffer.subarray(i.offset, i.offset + _), this.offset = i.offset + _;
94
+ const a = { offset: this.offset }, _ = f(this.buffer, a, "InvalidLength");
95
+ h(this.buffer, a.offset, _), i = this.buffer.subarray(a.offset, a.offset + _), this.offset = a.offset + _;
96
96
  }
97
- return new Ut(e, s, a);
97
+ return new Lt(e, s, i);
98
98
  }
99
99
  }
100
- class S {
100
+ class C {
101
101
  constructor(e, r) {
102
102
  this.type = e, this.payload = r;
103
103
  }
@@ -159,7 +159,7 @@ class S {
159
159
  return this.ensureType(
160
160
  12
161
161
  /* String */
162
- ), Rt.decode(this.payload);
162
+ ), mt.decode(this.payload);
163
163
  }
164
164
  asGuid() {
165
165
  return this.ensureType(
@@ -171,26 +171,26 @@ class S {
171
171
  return this.ensureType(
172
172
  11
173
173
  /* Object */
174
- ), F.create(this.payload);
174
+ ), d.create(this.payload);
175
175
  }
176
176
  asArray() {
177
177
  return this.ensureType(
178
178
  9
179
179
  /* Array */
180
- ), H.create(this.payload);
180
+ ), W.create(this.payload);
181
181
  }
182
182
  asDictionary() {
183
183
  return this.ensureType(
184
184
  10
185
185
  /* Dict */
186
- ), W.create(this.payload);
186
+ ), K.create(this.payload);
187
187
  }
188
188
  ensureType(e) {
189
189
  if (this.type !== e)
190
190
  throw new Error(`Teleport value has type ${y[this.type]}, expected ${y[e]}`);
191
191
  }
192
192
  }
193
- class Ut extends S {
193
+ class Lt extends C {
194
194
  constructor(e, r, s) {
195
195
  super(r, s), this.fieldId = e;
196
196
  }
@@ -198,7 +198,7 @@ class Ut extends S {
198
198
  return this.type === 1;
199
199
  }
200
200
  }
201
- class H {
201
+ class W {
202
202
  payload;
203
203
  elementType;
204
204
  count;
@@ -214,7 +214,7 @@ class H {
214
214
  this.count = f(e, s, "ArrayMalformed"), this.offset = s.offset;
215
215
  }
216
216
  static create(e) {
217
- return new H(M(e));
217
+ return new W(B(e));
218
218
  }
219
219
  next() {
220
220
  if (this.index >= this.count) {
@@ -235,43 +235,43 @@ class H {
235
235
  case 4:
236
236
  case 6:
237
237
  case 14: {
238
- const e = P(this.elementType);
238
+ const e = O(this.elementType);
239
239
  h(this.payload, this.offset, e);
240
240
  const r = this.payload.subarray(this.offset, this.offset + e);
241
- return this.offset += e, new w(this.elementType, r);
241
+ return this.offset += e, new F(this.elementType, r);
242
242
  }
243
243
  case 12:
244
244
  case 13: {
245
245
  const e = { offset: this.offset }, r = f(this.payload, e, "ArrayMalformed");
246
246
  h(this.payload, e.offset, r);
247
247
  const s = this.payload.subarray(e.offset, e.offset + r);
248
- return this.offset = e.offset + r, new w(this.elementType, s);
248
+ return this.offset = e.offset + r, new F(this.elementType, s);
249
249
  }
250
250
  case 11: {
251
251
  const e = { offset: this.offset }, r = f(this.payload, e, "ArrayMalformed");
252
252
  h(this.payload, e.offset, r);
253
253
  const s = this.payload.subarray(e.offset, e.offset + r);
254
- return this.offset = e.offset + r, new w(11, s);
254
+ return this.offset = e.offset + r, new F(11, s);
255
255
  }
256
256
  case 9: {
257
- const e = K(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
258
- return this.offset += e, new w(9, r);
257
+ const e = z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
258
+ return this.offset += e, new F(9, r);
259
259
  }
260
260
  case 10: {
261
- const e = Y(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
262
- return this.offset += e, new w(10, r);
261
+ const e = X(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
262
+ return this.offset += e, new F(10, r);
263
263
  }
264
264
  default:
265
265
  throw new Error(`Unsupported array element type ${y[this.elementType]}`);
266
266
  }
267
267
  }
268
268
  }
269
- class w extends S {
269
+ class F extends C {
270
270
  constructor(e, r) {
271
271
  super(e, r);
272
272
  }
273
273
  }
274
- class W {
274
+ class K {
275
275
  payload;
276
276
  keyType;
277
277
  valueType;
@@ -288,7 +288,7 @@ class W {
288
288
  this.count = f(e, r, "DictMalformed"), this.offset = r.offset;
289
289
  }
290
290
  static create(e) {
291
- return new W(M(e));
291
+ return new K(B(e));
292
292
  }
293
293
  next() {
294
294
  if (this.index >= this.count) {
@@ -297,20 +297,20 @@ class W {
297
297
  return null;
298
298
  }
299
299
  const e = this.readKey(), r = this.readValue();
300
- return this.index++, new mt(e, r);
300
+ return this.index++, new Dt(e, r);
301
301
  }
302
302
  readKey() {
303
- const e = P(this.keyType);
303
+ const e = O(this.keyType);
304
304
  if (e >= 0) {
305
305
  h(this.payload, this.offset, e);
306
306
  const r = this.payload.subarray(this.offset, this.offset + e);
307
- return this.offset += e, new S(this.keyType, r);
307
+ return this.offset += e, new C(this.keyType, r);
308
308
  }
309
309
  if (this.keyType === 12 || this.keyType === 13) {
310
310
  const r = { offset: this.offset }, s = f(this.payload, r, "DictMalformed");
311
311
  h(this.payload, r.offset, s);
312
312
  const n = this.payload.subarray(r.offset, r.offset + s);
313
- return this.offset = r.offset + s, new S(this.keyType, n);
313
+ return this.offset = r.offset + s, new C(this.keyType, n);
314
314
  }
315
315
  throw new Error("Unsupported dictionary key type");
316
316
  }
@@ -321,21 +321,21 @@ class W {
321
321
  const e = { offset: this.offset }, r = f(this.payload, e, "DictMalformed");
322
322
  h(this.payload, e.offset, r);
323
323
  const s = this.payload.subarray(e.offset, e.offset + r);
324
- return this.offset = e.offset + r, new S(this.valueType, s);
324
+ return this.offset = e.offset + r, new C(this.valueType, s);
325
325
  }
326
326
  case 11: {
327
327
  const e = { offset: this.offset }, r = f(this.payload, e, "DictMalformed");
328
328
  h(this.payload, e.offset, r);
329
329
  const s = this.payload.subarray(e.offset, e.offset + r);
330
- return this.offset = e.offset + r, new S(11, s);
330
+ return this.offset = e.offset + r, new C(11, s);
331
331
  }
332
332
  case 9: {
333
- const e = K(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
334
- return this.offset += e, new S(9, r);
333
+ const e = z(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
334
+ return this.offset += e, new C(9, r);
335
335
  }
336
336
  case 10: {
337
- const e = Y(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
338
- return this.offset += e, new S(10, r);
337
+ const e = X(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
338
+ return this.offset += e, new C(10, r);
339
339
  }
340
340
  case 3:
341
341
  case 5:
@@ -346,17 +346,17 @@ class W {
346
346
  case 6:
347
347
  case 14:
348
348
  case 1: {
349
- const e = P(this.valueType);
349
+ const e = O(this.valueType);
350
350
  h(this.payload, this.offset, e);
351
351
  const r = this.payload.subarray(this.offset, this.offset + e);
352
- return this.offset += e, new S(this.valueType, r);
352
+ return this.offset += e, new C(this.valueType, r);
353
353
  }
354
354
  default:
355
355
  throw new Error(`Unsupported dictionary value type ${y[this.valueType]}`);
356
356
  }
357
357
  }
358
358
  }
359
- class mt {
359
+ class Dt {
360
360
  constructor(e, r) {
361
361
  this.key = e, this.value = r;
362
362
  }
@@ -371,8 +371,8 @@ class A {
371
371
  const r = e.replace(/-/g, "");
372
372
  if (r.length !== 32)
373
373
  throw new Error("Guid string must be 32 hex characters");
374
- const s = new Uint8Array(16), n = A.parseHexSlice(r, 0, 8), a = A.parseHexSlice(r, 8, 4), i = A.parseHexSlice(r, 12, 4);
375
- A.writeUInt32LE(s, 0, n), A.writeUInt16LE(s, 4, a), A.writeUInt16LE(s, 6, i);
374
+ const s = new Uint8Array(16), n = A.parseHexSlice(r, 0, 8), i = A.parseHexSlice(r, 8, 4), a = A.parseHexSlice(r, 12, 4);
375
+ A.writeUInt32LE(s, 0, n), A.writeUInt16LE(s, 4, i), A.writeUInt16LE(s, 6, a);
376
376
  for (let _ = 0; _ < 8; _++)
377
377
  s[8 + _] = A.parseHexSlice(r, 16 + _ * 2, 2);
378
378
  return new A(s);
@@ -400,18 +400,18 @@ class A {
400
400
  A.toHex(A.readUInt32LE(e, 0), 8),
401
401
  A.toHex(A.readUInt16LE(e, 4), 4),
402
402
  A.toHex(A.readUInt16LE(e, 6), 4),
403
- j(e.subarray(8, 10)),
404
- j(e.subarray(10, 16))
403
+ Q(e.subarray(8, 10)),
404
+ Q(e.subarray(10, 16))
405
405
  ].join("-");
406
406
  }
407
407
  asBytes() {
408
408
  return this.bytes.slice();
409
409
  }
410
410
  static parseHexSlice(e, r, s) {
411
- const n = e.substr(r, s), a = Number.parseInt(n, 16);
412
- if (Number.isNaN(a))
411
+ const n = e.substr(r, s), i = Number.parseInt(n, 16);
412
+ if (Number.isNaN(i))
413
413
  throw new Error("Guid string contains invalid characters");
414
- return a >>> 0;
414
+ return i >>> 0;
415
415
  }
416
416
  static writeUInt32LE(e, r, s) {
417
417
  const n = s >>> 0;
@@ -434,11 +434,11 @@ class A {
434
434
  function f(t, e, r) {
435
435
  if (e.offset >= t.length)
436
436
  throw new Error(r);
437
- let s = 0, n = 0, a = 0;
437
+ let s = 0, n = 0, i = 0;
438
438
  for (; e.offset < t.length; ) {
439
- const i = t[e.offset++];
440
- if (a++, s |= (i & 127) << n, (i & 128) === 0) {
441
- if (a !== Lt(s))
439
+ const a = t[e.offset++];
440
+ if (i++, s |= (a & 127) << n, (a & 128) === 0) {
441
+ if (i !== Pt(s))
442
442
  throw new Error("Teleport VarUInt is not canonical");
443
443
  return s >>> 0;
444
444
  }
@@ -447,10 +447,10 @@ function f(t, e, r) {
447
447
  }
448
448
  throw new Error(r);
449
449
  }
450
- function Lt(t) {
450
+ function Pt(t) {
451
451
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
452
452
  }
453
- function P(t) {
453
+ function O(t) {
454
454
  switch (t) {
455
455
  case 3:
456
456
  case 5:
@@ -478,136 +478,128 @@ function h(t, e, r) {
478
478
  if (e < 0 || r < 0 || e + r > t.length)
479
479
  throw new Error("Teleport payload exceeds bounds");
480
480
  }
481
- function Dt(t, e) {
481
+ function yt(t, e) {
482
482
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
483
483
  }
484
- function K(t, e) {
484
+ function z(t, e) {
485
485
  if (e >= t.length)
486
486
  throw new Error("Array payload exceeds bounds");
487
487
  const r = t[e], s = r >> 4 & 15;
488
488
  if ((r & 15) !== 0)
489
489
  throw new Error("Array flags must be zero");
490
- const n = { offset: e + 1 }, a = f(t, n, "ArrayMalformed"), i = P(s);
491
- if (i >= 0) {
492
- const E = i * a;
490
+ const n = { offset: e + 1 }, i = f(t, n, "ArrayMalformed"), a = O(s);
491
+ if (a >= 0) {
492
+ const E = a * i;
493
493
  return h(t, n.offset, E), n.offset + E - e;
494
494
  }
495
495
  let _ = n.offset;
496
- for (let E = 0; E < a; E++)
496
+ for (let E = 0; E < i; E++)
497
497
  _ = x(s, t, _, "ArrayMalformed");
498
498
  return _ - e;
499
499
  }
500
- function Y(t, e) {
500
+ function X(t, e) {
501
501
  if (e + 2 > t.length)
502
502
  throw new Error("Dictionary payload too short");
503
503
  const r = t[e] >> 4 & 15, s = t[e + 1] >> 4 & 15;
504
504
  if ((t[e] & 15) !== 0 || (t[e + 1] & 15) !== 0)
505
505
  throw new Error("Dictionary key/value flags must be zero");
506
506
  st(r);
507
- const n = { offset: e + 2 }, a = f(t, n, "DictMalformed");
508
- let i = n.offset;
509
- for (let _ = 0; _ < a; _++)
510
- i = x(r, t, i, "DictMalformed"), i = x(s, t, i, "DictMalformed");
511
- return i - e;
507
+ const n = { offset: e + 2 }, i = f(t, n, "DictMalformed");
508
+ let a = n.offset;
509
+ for (let _ = 0; _ < i; _++)
510
+ a = x(r, t, a, "DictMalformed"), a = x(s, t, a, "DictMalformed");
511
+ return a - e;
512
512
  }
513
513
  function x(t, e, r, s) {
514
- const n = P(t);
514
+ const n = O(t);
515
515
  if (n >= 0)
516
516
  return h(e, r, n), r + n;
517
517
  switch (t) {
518
518
  case 12:
519
519
  case 13: {
520
- const a = { offset: r }, i = f(e, a, s);
521
- return h(e, a.offset, i), a.offset + i;
520
+ const i = { offset: r }, a = f(e, i, s);
521
+ return h(e, i.offset, a), i.offset + a;
522
522
  }
523
523
  case 11: {
524
- const a = { offset: r }, i = f(e, a, s);
525
- return h(e, a.offset, i), a.offset + i;
524
+ const i = { offset: r }, a = f(e, i, s);
525
+ return h(e, i.offset, a), i.offset + a;
526
526
  }
527
527
  case 9:
528
- return r + K(e, r);
528
+ return r + z(e, r);
529
529
  case 10:
530
- return r + Y(e, r);
530
+ return r + X(e, r);
531
531
  default:
532
532
  throw new Error(`Unsupported Teleport type ${y[t]}`);
533
533
  }
534
534
  }
535
- function j(t) {
535
+ function Q(t) {
536
536
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
537
537
  }
538
- function M(t) {
538
+ function B(t) {
539
539
  return t instanceof Uint8Array ? t : new Uint8Array(t);
540
540
  }
541
- var T = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(T || {}), V = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(V || {});
542
- const yt = 4194309, Pt = 205938238, dt = 717315017, Ot = 1594075008, wt = 2026534360, gt = 3409001585, Ft = 3466650495, Mt = 4007456593, Bt = 4017217601, bt = 4065417427, Gt = 4086360332;
543
- function Vt(t) {
541
+ var c = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(c || {}), g = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_RELAY_AGENT_HELLO = 65576] = "CORE_RELAY_AGENT_HELLO", t[t.CORE_RELAY_HELLO = 65577] = "CORE_RELAY_HELLO", 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.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.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.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.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(g || {});
542
+ const Ot = 4194309, dt = 205938238, wt = 1594075008, Ft = 2026534360, Mt = 3409001585, gt = 3466650495, Bt = 4007456593, bt = 4017217601, Gt = 4065417427, Vt = 4086360332;
543
+ function vt(t) {
544
544
  const e = {};
545
545
  return nt(e), e;
546
546
  }
547
547
  function nt(t) {
548
- return t.Samples = new Uint8Array(0), t.Epoch = 0, t.Sequence = 0, t.FrameSizeInInterleavedSamples = 0, t.TimeStampInInterleavedSamples = 0n, t.IsFirst = !1, t.IsLast = !1, t.AverageVolume = 0, t.AudioEventEstimatedDuration = 0, t.ShapeSetValues = void 0, t;
549
- }
550
- function vt(t, e) {
551
- const r = F.create(t);
552
- return kt(r, e);
548
+ return t.Samples = new Uint8Array(0), t.Epoch = 0, t.Sequence = 0, t.FrameSizeInInterleavedSamples = 0, t.TimeStampInInterleavedSamples = 0n, t.IsFirst = !1, t.IsLast = !1, t.AverageVolume = 0, t.AudioEventEstimatedDuration = 0, t;
553
549
  }
554
550
  function kt(t, e) {
555
- const r = e ?? Vt();
556
- return nt(r), pt(t, r), r;
551
+ const r = d.create(t);
552
+ return pt(r, e);
557
553
  }
558
554
  function pt(t, e) {
555
+ const r = e ?? vt();
556
+ return nt(r), Ht(t, r), r;
557
+ }
558
+ function Ht(t, e) {
559
559
  let r;
560
560
  for (; (r = t.next()) !== null; )
561
561
  switch (r.fieldId) {
562
- case Pt: {
562
+ case dt: {
563
563
  if (r.isNull) throw new Error();
564
564
  e.AverageVolume = r.asFloat32();
565
565
  break;
566
566
  }
567
- case dt: {
568
- if (r.isNull) {
569
- e.ShapeSetValues = void 0;
570
- break;
571
- }
572
- e.ShapeSetValues = Ht(r.asArray());
573
- break;
574
- }
575
- case Ot: {
567
+ case wt: {
576
568
  if (r.isNull) throw new Error();
577
569
  e.IsFirst = r.asBool();
578
570
  break;
579
571
  }
580
- case wt: {
572
+ case Ft: {
581
573
  if (r.isNull) throw new Error();
582
574
  e.TimeStampInInterleavedSamples = r.asUInt64();
583
575
  break;
584
576
  }
585
- case gt: {
577
+ case Mt: {
586
578
  if (r.isNull) throw new Error();
587
579
  e.Samples = r.asBinary();
588
580
  break;
589
581
  }
590
- case Ft: {
582
+ case gt: {
591
583
  if (r.isNull) throw new Error();
592
584
  e.AudioEventEstimatedDuration = r.asFloat32();
593
585
  break;
594
586
  }
595
- case Mt: {
587
+ case Bt: {
596
588
  if (r.isNull) throw new Error();
597
589
  e.FrameSizeInInterleavedSamples = r.asUInt32();
598
590
  break;
599
591
  }
600
- case Bt: {
592
+ case bt: {
601
593
  if (r.isNull) throw new Error();
602
594
  e.IsLast = r.asBool();
603
595
  break;
604
596
  }
605
- case bt: {
597
+ case Gt: {
606
598
  if (r.isNull) throw new Error();
607
599
  e.Sequence = r.asUInt32();
608
600
  break;
609
601
  }
610
- case Gt: {
602
+ case Vt: {
611
603
  if (r.isNull) throw new Error();
612
604
  e.Epoch = r.asUInt32();
613
605
  break;
@@ -615,168 +607,219 @@ function pt(t, e) {
615
607
  }
616
608
  }
617
609
  async function xt(t, e) {
618
- const r = await rt(t, yt);
619
- return vt(r, e);
610
+ const r = await Y(t, Ot);
611
+ return kt(r, e);
612
+ }
613
+ const Yt = 4194310, Wt = 717315017, Kt = 2026534360, zt = 4007456593, Xt = 4065417427, $t = 4086360332;
614
+ function jt(t) {
615
+ const e = {};
616
+ return at(e), e;
617
+ }
618
+ function at(t) {
619
+ return t.Epoch = 0, t.Sequence = 0, t.FrameSizeInInterleavedSamples = 0, t.TimeStampInInterleavedSamples = 0n, t.ShapeSetValues = [], t;
620
+ }
621
+ function Qt(t, e) {
622
+ const r = d.create(t);
623
+ return qt(r, e);
624
+ }
625
+ function qt(t, e) {
626
+ const r = e ?? jt();
627
+ return at(r), Zt(t, r), r;
628
+ }
629
+ function Zt(t, e) {
630
+ let r;
631
+ for (; (r = t.next()) !== null; )
632
+ switch (r.fieldId) {
633
+ case Wt: {
634
+ if (r.isNull) throw new Error();
635
+ e.ShapeSetValues = te(r.asArray());
636
+ break;
637
+ }
638
+ case Kt: {
639
+ if (r.isNull) throw new Error();
640
+ e.TimeStampInInterleavedSamples = r.asUInt64();
641
+ break;
642
+ }
643
+ case zt: {
644
+ if (r.isNull) throw new Error();
645
+ e.FrameSizeInInterleavedSamples = r.asUInt32();
646
+ break;
647
+ }
648
+ case Xt: {
649
+ if (r.isNull) throw new Error();
650
+ e.Sequence = r.asUInt32();
651
+ break;
652
+ }
653
+ case $t: {
654
+ if (r.isNull) throw new Error();
655
+ e.Epoch = r.asUInt32();
656
+ break;
657
+ }
658
+ }
659
+ }
660
+ async function Jt(t, e) {
661
+ const r = await Y(t, Yt);
662
+ return Qt(r, e);
620
663
  }
621
- function Ht(t) {
664
+ function te(t) {
622
665
  const e = [];
623
666
  let r;
624
667
  for (; (r = t.next()) !== null; )
625
- e.push(Xt(r.asObject()));
668
+ e.push(ne(r.asObject()));
626
669
  return e;
627
670
  }
628
- const Wt = 1154362099, Kt = 3974819915;
629
- function Yt(t) {
671
+ const ee = 1154362099, re = 3974819915;
672
+ function se(t) {
630
673
  const e = {};
631
674
  return it(e), e;
632
675
  }
633
676
  function it(t) {
634
677
  return t.SetId = 0, t.Values = [], t;
635
678
  }
636
- function Xt(t, e) {
637
- const r = e ?? Yt();
638
- return it(r), zt(t, r), r;
679
+ function ne(t, e) {
680
+ const r = e ?? se();
681
+ return it(r), ae(t, r), r;
639
682
  }
640
- function zt(t, e) {
683
+ function ae(t, e) {
641
684
  let r;
642
685
  for (; (r = t.next()) !== null; )
643
686
  switch (r.fieldId) {
644
- case Wt: {
687
+ case ee: {
645
688
  if (r.isNull) throw new Error();
646
689
  e.SetId = r.asUInt32();
647
690
  break;
648
691
  }
649
- case Kt: {
692
+ case re: {
650
693
  if (r.isNull) throw new Error();
651
- e.Values = $t(r.asArray());
694
+ e.Values = ie(r.asArray());
652
695
  break;
653
696
  }
654
697
  }
655
698
  }
656
- function $t(t) {
699
+ function ie(t) {
657
700
  const e = [];
658
701
  let r;
659
702
  for (; (r = t.next()) !== null; )
660
703
  e.push(r.asFloat32());
661
704
  return e;
662
705
  }
663
- const jt = 4194305, Qt = 161083277, Jt = 265814330, Zt = 1368629611, qt = 2431514951, te = 2745379226, ee = 3282782683, re = 3284746250, se = 4101844078;
664
- function ne(t) {
706
+ const _e = 4194305, Ee = 161083277, oe = 265814330, Ie = 1368629611, le = 2431514951, Ae = 2745379226, ue = 3282782683, he = 3284746250, fe = 4101844078;
707
+ function Te(t) {
665
708
  const e = {};
666
- return at(e), e;
709
+ return _t(e), e;
667
710
  }
668
- function at(t) {
669
- return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = T.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
711
+ function _t(t) {
712
+ return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = c.Unknown, t.CodecDetails = "", t.SampleRate = 0, t.Channels = 0, t.ShapeSets = void 0, t;
670
713
  }
671
- function ie(t, e) {
672
- const r = F.create(t);
673
- return ae(r, e);
714
+ function ce(t, e) {
715
+ const r = d.create(t);
716
+ return Ne(r, e);
674
717
  }
675
- function ae(t, e) {
676
- const r = e ?? ne();
677
- return at(r), _e(t, r), r;
718
+ function Ne(t, e) {
719
+ const r = e ?? Te();
720
+ return _t(r), Se(t, r), r;
678
721
  }
679
- function _e(t, e) {
722
+ function Se(t, e) {
680
723
  let r;
681
724
  for (; (r = t.next()) !== null; )
682
725
  switch (r.fieldId) {
683
- case Qt: {
726
+ case Ee: {
684
727
  if (r.isNull) throw new Error();
685
728
  e.StreamId = r.asString();
686
729
  break;
687
730
  }
688
- case Jt: {
731
+ case oe: {
689
732
  if (r.isNull) {
690
733
  e.ShapeSets = void 0;
691
734
  break;
692
735
  }
693
- e.ShapeSets = oe(r.asArray());
736
+ e.ShapeSets = Re(r.asArray());
694
737
  break;
695
738
  }
696
- case Zt: {
739
+ case Ie: {
697
740
  if (r.isNull) throw new Error();
698
741
  e.Description = r.asString();
699
742
  break;
700
743
  }
701
- case qt: {
744
+ case le: {
702
745
  if (r.isNull) throw new Error();
703
746
  e.Channels = r.asInt32();
704
747
  break;
705
748
  }
706
- case te: {
749
+ case Ae: {
707
750
  if (r.isNull) throw new Error();
708
751
  e.CodecDetails = r.asString();
709
752
  break;
710
753
  }
711
- case ee: {
754
+ case ue: {
712
755
  if (r.isNull) throw new Error();
713
756
  e.SourceType = r.asString();
714
757
  break;
715
758
  }
716
- case re: {
759
+ case he: {
717
760
  if (r.isNull) throw new Error();
718
761
  e.Codec = r.asInt32();
719
762
  break;
720
763
  }
721
- case se: {
764
+ case fe: {
722
765
  if (r.isNull) throw new Error();
723
766
  e.SampleRate = r.asInt32();
724
767
  break;
725
768
  }
726
769
  }
727
770
  }
728
- async function Ee(t, e) {
729
- const r = await rt(t, jt);
730
- return ie(r, e);
771
+ async function Ce(t, e) {
772
+ const r = await Y(t, _e);
773
+ return ce(r, e);
731
774
  }
732
- function oe(t) {
775
+ function Re(t) {
733
776
  const e = [];
734
777
  let r;
735
778
  for (; (r = t.next()) !== null; )
736
- e.push(he(r.asObject()));
779
+ e.push(Pe(r.asObject()));
737
780
  return e;
738
781
  }
739
- const Ie = 1107713536, le = 1154362099, Ae = 1185721362;
740
- function ue(t) {
782
+ const Ue = 1107713536, me = 1154362099, Le = 1185721362;
783
+ function De(t) {
741
784
  const e = {};
742
- return _t(e), e;
785
+ return Et(e), e;
743
786
  }
744
- function _t(t) {
787
+ function Et(t) {
745
788
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
746
789
  }
747
- function he(t, e) {
748
- const r = e ?? ue();
749
- return _t(r), fe(t, r), r;
790
+ function Pe(t, e) {
791
+ const r = e ?? De();
792
+ return Et(r), ye(t, r), r;
750
793
  }
751
- function fe(t, e) {
794
+ function ye(t, e) {
752
795
  let r;
753
796
  for (; (r = t.next()) !== null; )
754
797
  switch (r.fieldId) {
755
- case Ie: {
798
+ case Ue: {
756
799
  if (r.isNull) throw new Error();
757
800
  e.Name = r.asString();
758
801
  break;
759
802
  }
760
- case le: {
803
+ case me: {
761
804
  if (r.isNull) throw new Error();
762
805
  e.SetId = r.asUInt32();
763
806
  break;
764
807
  }
765
- case Ae: {
808
+ case Le: {
766
809
  if (r.isNull) throw new Error();
767
- e.ShapeNames = Te(r.asArray());
810
+ e.ShapeNames = Oe(r.asArray());
768
811
  break;
769
812
  }
770
813
  }
771
814
  }
772
- function Te(t) {
815
+ function Oe(t) {
773
816
  const e = [];
774
817
  let r;
775
818
  for (; (r = t.next()) !== null; )
776
819
  e.push(r.asString());
777
820
  return e;
778
821
  }
779
- class Q {
822
+ class q {
780
823
  static getStorageForCapacity(e, r) {
781
824
  const s = Int32Array.BYTES_PER_ELEMENT * 2, n = r.BYTES_PER_ELEMENT * e;
782
825
  return new SharedArrayBuffer(s + n);
@@ -809,8 +852,8 @@ class Q {
809
852
  let s = Atomics.load(this.readWrite, 1);
810
853
  const n = Math.min(r, this.capacity - s);
811
854
  this.storage.set(e.subarray(0, n), s);
812
- const a = r - n;
813
- return a > 0 && this.storage.set(e.subarray(n, n + a), 0), s = (s + r) % this.capacity, Atomics.store(this.readWrite, 1, s), Atomics.notify(this.readWrite, 1), r;
855
+ const i = r - n;
856
+ return i > 0 && this.storage.set(e.subarray(n, n + i), 0), s = (s + r) % this.capacity, Atomics.store(this.readWrite, 1, s), Atomics.notify(this.readWrite, 1), r;
814
857
  }
815
858
  pop(e) {
816
859
  const r = Math.min(this.availableRead(), e.length);
@@ -819,8 +862,8 @@ class Q {
819
862
  let s = Atomics.load(this.readWrite, 0);
820
863
  const n = Math.min(r, this.capacity - s);
821
864
  e.set(this.storage.subarray(s, s + n), 0);
822
- const a = r - n;
823
- return a > 0 && e.set(this.storage.subarray(0, a), n), s = (s + r) % this.capacity, Atomics.store(this.readWrite, 0, s), r;
865
+ const i = r - n;
866
+ return i > 0 && e.set(this.storage.subarray(0, i), n), s = (s + r) % this.capacity, Atomics.store(this.readWrite, 0, s), r;
824
867
  }
825
868
  skip(e) {
826
869
  const r = Math.min(this.availableRead(), e);
@@ -830,36 +873,36 @@ class Q {
830
873
  return s = (s + r) % this.capacity, Atomics.store(this.readWrite, 0, s), r;
831
874
  }
832
875
  }
833
- let ce = 1;
834
- const Ne = /* @__PURE__ */ new Map(), Se = {
876
+ let de = 1;
877
+ const we = /* @__PURE__ */ new Map(), Fe = {
835
878
  0: "DEBUG",
836
879
  1: "INFO",
837
880
  2: "WARN",
838
881
  3: "ERROR",
839
882
  4: "NONE"
840
883
  };
841
- function Ce(t, e) {
884
+ function Me(t, e) {
842
885
  return `[${t}] ${e}`;
843
886
  }
844
- function b(t, e, r, s) {
845
- const n = (/* @__PURE__ */ new Date()).toISOString(), a = Se[t], i = {
887
+ function G(t, e, r, s) {
888
+ const n = (/* @__PURE__ */ new Date()).toISOString(), i = Fe[t], a = {
846
889
  timestamp: n,
847
890
  level: t,
848
- levelName: a,
891
+ levelName: i,
849
892
  component: e,
850
893
  message: r,
851
894
  args: s
852
895
  };
853
- for (const [_, E] of Ne) {
896
+ for (const [_, E] of we) {
854
897
  const o = E?.minLevel ?? 2;
855
898
  if (t >= o)
856
899
  try {
857
- _(i);
900
+ _(a);
858
901
  } catch {
859
902
  }
860
903
  }
861
- if (ce <= t) {
862
- const _ = Ce(e, r);
904
+ if (de <= t) {
905
+ const _ = Me(e, r);
863
906
  switch (t) {
864
907
  case 0:
865
908
  console.debug(_, ...s);
@@ -876,50 +919,50 @@ function b(t, e, r, s) {
876
919
  }
877
920
  }
878
921
  }
879
- function Et(t) {
922
+ function ot(t) {
880
923
  return {
881
924
  debug(e, ...r) {
882
- b(0, t, e, r);
925
+ G(0, t, e, r);
883
926
  },
884
927
  info(e, ...r) {
885
- b(1, t, e, r);
928
+ G(1, t, e, r);
886
929
  },
887
930
  warn(e, ...r) {
888
- b(2, t, e, r);
931
+ G(2, t, e, r);
889
932
  },
890
933
  error(e, ...r) {
891
- b(3, t, e, r);
934
+ G(3, t, e, r);
892
935
  }
893
936
  };
894
937
  }
895
- const G = Et("Capabilities"), Re = globalThis;
896
- function Ue() {
938
+ const V = ot("Capabilities"), ge = globalThis;
939
+ function Be() {
897
940
  if (typeof SharedArrayBuffer > "u")
898
- return G.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
941
+ return V.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
899
942
  if (typeof Atomics > "u")
900
- return G.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
901
- if (Re.crossOriginIsolated === !1)
902
- return G.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
943
+ return V.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
944
+ if (ge.crossOriginIsolated === !1)
945
+ return V.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
903
946
  try {
904
947
  new SharedArrayBuffer(1);
905
948
  } catch (t) {
906
- return G.debug(`SharedArrayBuffer not supported: construction failed - ${t instanceof Error ? t.message : String(t)}`), !1;
949
+ return V.debug(`SharedArrayBuffer not supported: construction failed - ${t instanceof Error ? t.message : String(t)}`), !1;
907
950
  }
908
951
  return !0;
909
952
  }
910
- const ot = 48e3, It = 2, me = 1500, Le = 10, J = 80, De = 50, Z = 64, X = Et("AudioPlaybackWorker"), d = (t, e) => {
953
+ const It = 48e3, lt = 2, be = 1500, Ge = 10, Z = 80, Ve = 50, J = 64, $ = ot("AudioPlaybackWorker"), m = (t, e) => {
911
954
  self.postMessage(t, e ?? []);
912
- }, ye = Ue();
913
- let v = "pcm", lt = !0, R = ot, C = It, D = null;
914
- function L(t, e) {
955
+ }, ve = Be();
956
+ let v = "pcm", At = !0, ut = !1, R = It, N = lt, P = null;
957
+ function D(t, e) {
915
958
  const r = t instanceof Error ? t : new Error(String(t));
916
- d({ type: "error", error: { name: r.name, message: r.message, stack: r.stack }, streamId: e });
959
+ m({ type: "error", error: { name: r.name, message: r.message, stack: r.stack }, streamId: e });
917
960
  }
918
- function z(t) {
919
- const e = et(t);
961
+ function k(t) {
962
+ const e = rt(t);
920
963
  return `${e.senderId}_${e.trackId}`;
921
964
  }
922
- class Pe {
965
+ class ke {
923
966
  mode;
924
967
  ring = null;
925
968
  sab = void 0;
@@ -932,7 +975,7 @@ class Pe {
932
975
  pcmBatchOffset = 0;
933
976
  lastPcmFlushTimeMs = 0;
934
977
  constructor(e) {
935
- this.streamId = e, this.mode = "pcm", this.outputSampleRate = R, this.outputChannels = C, this.rebind(v);
978
+ this.streamId = e, this.mode = "pcm", this.outputSampleRate = R, this.outputChannels = N, this.rebind(v);
936
979
  }
937
980
  close() {
938
981
  this.closed = !0, this.pcmBatchBuffer = null, this.pcmBatchOffset = 0, this.ring = null, this.sab = void 0;
@@ -942,8 +985,8 @@ class Pe {
942
985
  }
943
986
  rebind(e) {
944
987
  if (!this.closed) {
945
- if (this.mode = e, e === "sab" && ye) {
946
- const r = Math.floor(me * this.outputSampleRate * this.outputChannels / 1e3), s = Q.getStorageForCapacity(r, Float32Array), n = new Q(s, Float32Array);
988
+ if (this.mode = e, e === "sab" && ve) {
989
+ const r = Math.floor(be * this.outputSampleRate * this.outputChannels / 1e3), s = q.getStorageForCapacity(r, Float32Array), n = new q(s, Float32Array);
947
990
  n.flush(), this.sab = s, this.ring = n;
948
991
  return;
949
992
  }
@@ -953,11 +996,11 @@ class Pe {
953
996
  flushPendingPcm(e) {
954
997
  if (this.closed || this.mode !== "pcm" || this.pcmBatchOffset <= 0)
955
998
  return;
956
- const r = performance.now(), s = Math.max(1, Math.round(this.outputSampleRate * this.outputChannels * J / 1e3));
957
- if (!(e || this.pcmBatchOffset >= s || this.lastPcmFlushTimeMs > 0 && r - this.lastPcmFlushTimeMs >= De))
999
+ const r = performance.now(), s = Math.max(1, Math.round(this.outputSampleRate * this.outputChannels * Z / 1e3));
1000
+ if (!(e || this.pcmBatchOffset >= s || this.lastPcmFlushTimeMs > 0 && r - this.lastPcmFlushTimeMs >= Ve))
958
1001
  return;
959
- const a = new Float32Array(this.pcmBatchOffset);
960
- a.set(this.pcmBatchBuffer.subarray(0, this.pcmBatchOffset)), this.pcmBatchOffset = 0, this.lastPcmFlushTimeMs = r, d({ type: "pcm", streamId: this.streamId, pcm: a }, [a.buffer]);
1002
+ const i = new Float32Array(this.pcmBatchOffset);
1003
+ i.set(this.pcmBatchBuffer.subarray(0, this.pcmBatchOffset)), this.pcmBatchOffset = 0, this.lastPcmFlushTimeMs = r, m({ type: "pcm", streamId: this.streamId, pcm: i }, [i.buffer]);
961
1004
  }
962
1005
  drainPcm() {
963
1006
  this.flushPendingPcm(!0);
@@ -966,20 +1009,20 @@ class Pe {
966
1009
  if (this.closed)
967
1010
  return;
968
1011
  if (this.mode === "sab" && this.ring) {
969
- const n = this.ring, a = this.outputChannels;
970
- let i = e;
971
- const _ = Math.floor(Math.max(0, n.capacity - 1) / a) * a;
972
- i.length > _ && (i = i.subarray(i.length - _));
973
- const E = Math.floor(n.availableWrite() / a) * a;
1012
+ const n = this.ring, i = this.outputChannels;
1013
+ let a = e;
1014
+ const _ = Math.floor(Math.max(0, n.capacity - 1) / i) * i;
1015
+ a.length > _ && (a = a.subarray(a.length - _));
1016
+ const E = Math.floor(n.availableWrite() / i) * i;
974
1017
  if (E <= 0)
975
1018
  return;
976
- i.length > E && (i = i.subarray(i.length - E)), n.push(i);
1019
+ a.length > E && (a = a.subarray(a.length - E)), n.push(a);
977
1020
  return;
978
1021
  }
979
- const r = Math.max(1, Math.round(this.outputSampleRate * this.outputChannels * J / 1e3)), s = this.pcmBatchOffset + e.length;
1022
+ const r = Math.max(1, Math.round(this.outputSampleRate * this.outputChannels * Z / 1e3)), s = this.pcmBatchOffset + e.length;
980
1023
  if (!this.pcmBatchBuffer || this.pcmBatchBuffer.length < s) {
981
- const n = Math.max(s, r * 2), a = new Float32Array(n);
982
- this.pcmBatchBuffer && this.pcmBatchOffset > 0 && a.set(this.pcmBatchBuffer.subarray(0, this.pcmBatchOffset)), this.pcmBatchBuffer = a;
1024
+ const n = Math.max(s, r * 2), i = new Float32Array(n);
1025
+ this.pcmBatchBuffer && this.pcmBatchOffset > 0 && i.set(this.pcmBatchBuffer.subarray(0, this.pcmBatchOffset)), this.pcmBatchBuffer = i;
983
1026
  }
984
1027
  this.pcmBatchBuffer.set(e, this.pcmBatchOffset), this.pcmBatchOffset += e.length, this.lastPcmFlushTimeMs === 0 && (this.lastPcmFlushTimeMs = performance.now()), this.flushPendingPcm(!1);
985
1028
  }
@@ -990,25 +1033,25 @@ class Pe {
990
1033
  this.closed || (this.pcmBatchOffset = 0, this.lastPcmFlushTimeMs = 0, this.ring?.flush());
991
1034
  }
992
1035
  }
993
- function de(t) {
1036
+ function pe(t) {
994
1037
  switch (t) {
995
- case T.Opus:
1038
+ case c.Opus:
996
1039
  return "opus";
997
- case T.Mp3:
1040
+ case c.Mp3:
998
1041
  return "mp3";
999
1042
  default:
1000
1043
  return null;
1001
1044
  }
1002
1045
  }
1003
- let g = null;
1004
- function Oe(t) {
1046
+ let M = null;
1047
+ function He(t) {
1005
1048
  const e = new DataView(t.buffer, t.byteOffset, t.byteLength), r = Math.floor(t.byteLength / 2);
1006
- (!g || g.length < r) && (g = new Float32Array(r));
1049
+ (!M || M.length < r) && (M = new Float32Array(r));
1007
1050
  for (let s = 0; s < r; s++)
1008
- g[s] = e.getInt16(s * 2, !0) / 32768;
1009
- return g.subarray(0, r);
1051
+ M[s] = e.getInt16(s * 2, !0) / 32768;
1052
+ return M.subarray(0, r);
1010
1053
  }
1011
- class $ {
1054
+ class j {
1012
1055
  inputSampleRate;
1013
1056
  inputChannels;
1014
1057
  sink;
@@ -1035,23 +1078,23 @@ class $ {
1035
1078
  n.length > 0 && this.sink.writePcm(n);
1036
1079
  }
1037
1080
  convertAudioData(e) {
1038
- const r = e.numberOfFrames, s = e.numberOfChannels, n = e.format, a = typeof n == "string" && n.includes("planar"), i = "f32-planar", _ = "f32", E = () => {
1081
+ const r = e.numberOfFrames, s = e.numberOfChannels, n = e.format, i = typeof n == "string" && n.includes("planar"), a = "f32-planar", _ = "f32", E = () => {
1039
1082
  const l = new Array(s);
1040
1083
  for (let u = 0; u < s; u++) {
1041
- const N = new Float32Array(r);
1042
- e.copyTo(N, { planeIndex: u, format: i }), l[u] = N;
1084
+ const S = new Float32Array(r);
1085
+ e.copyTo(S, { planeIndex: u, format: a }), l[u] = S;
1043
1086
  }
1044
- return xe(l, r);
1087
+ return tr(l, r);
1045
1088
  }, o = () => {
1046
1089
  const l = new Float32Array(r * s);
1047
1090
  return e.copyTo(l, { planeIndex: 0, format: _ }), l;
1048
1091
  };
1049
1092
  let I;
1050
- if (a)
1093
+ if (i)
1051
1094
  try {
1052
1095
  I = E();
1053
1096
  } catch (l) {
1054
- X.debug(`Failed to read planar audio data, falling back to interleaved copy: ${l}`), I = o();
1097
+ $.debug(`Failed to read planar audio data, falling back to interleaved copy: ${l}`), I = o();
1055
1098
  }
1056
1099
  else
1057
1100
  I = o();
@@ -1060,28 +1103,28 @@ class $ {
1060
1103
  convertPcmBuffer(e, r, s) {
1061
1104
  if (e.length === 0)
1062
1105
  return e;
1063
- let n = e, a = e.length, i = r;
1106
+ let n = e, i = e.length, a = r;
1064
1107
  if (s !== R) {
1065
- const _ = a / i, o = Math.max(1, Math.round(_ * R / s)) * i, I = this.getResampleBuffer(o);
1066
- a = We(n, I, i, s, R), n = I;
1108
+ const _ = i / a, o = Math.max(1, Math.round(_ * R / s)) * a, I = this.getResampleBuffer(o);
1109
+ i = rr(n, I, a, s, R), n = I;
1067
1110
  }
1068
- if (i !== C) {
1069
- const E = a / i * C, o = this.getRemixBuffer(E);
1070
- a = Ke(n.subarray(0, a), o, i, C), n = o, i = C;
1111
+ if (a !== N) {
1112
+ const E = i / a * N, o = this.getRemixBuffer(E);
1113
+ i = sr(n.subarray(0, i), o, a, N), n = o, a = N;
1071
1114
  }
1072
- return n.subarray(0, a);
1115
+ return n.subarray(0, i);
1073
1116
  }
1074
1117
  }
1075
- class we extends $ {
1118
+ class xe extends j {
1076
1119
  feedChunk(e) {
1077
1120
  e.isFirst && this.reset();
1078
- const r = Oe(e.data);
1121
+ const r = He(e.data);
1079
1122
  this.writeConvertedPcm(r, this.inputChannels, this.inputSampleRate), e.isLast && this.reset();
1080
1123
  }
1081
1124
  close() {
1082
1125
  }
1083
1126
  }
1084
- class ge extends $ {
1127
+ class Ye extends j {
1085
1128
  decoder;
1086
1129
  codec;
1087
1130
  constructor(e) {
@@ -1091,7 +1134,7 @@ class ge extends $ {
1091
1134
  const s = this.convertAudioData(r);
1092
1135
  this.writeConvertedPcm(s, r.numberOfChannels, r.sampleRate);
1093
1136
  } catch (s) {
1094
- L(s);
1137
+ D(s);
1095
1138
  } finally {
1096
1139
  try {
1097
1140
  r.close();
@@ -1100,7 +1143,7 @@ class ge extends $ {
1100
1143
  }
1101
1144
  },
1102
1145
  error: (r) => {
1103
- L(r);
1146
+ D(r);
1104
1147
  }
1105
1148
  }), this.decoder.configure({ codec: e.codec, numberOfChannels: e.inputChannels, sampleRate: e.inputSampleRate });
1106
1149
  }
@@ -1118,7 +1161,7 @@ class ge extends $ {
1118
1161
  ), e.isLast && this.decoder.flush().catch(() => {
1119
1162
  });
1120
1163
  } catch (r) {
1121
- L(r);
1164
+ D(r);
1122
1165
  try {
1123
1166
  this.reset();
1124
1167
  } catch {
@@ -1130,7 +1173,7 @@ class ge extends $ {
1130
1173
  try {
1131
1174
  this.decoder.reset(), this.decoder.configure({ codec: this.codec, numberOfChannels: this.inputChannels, sampleRate: this.inputSampleRate });
1132
1175
  } catch (e) {
1133
- L(e);
1176
+ D(e);
1134
1177
  }
1135
1178
  }
1136
1179
  close() {
@@ -1140,7 +1183,7 @@ class ge extends $ {
1140
1183
  }
1141
1184
  }
1142
1185
  }
1143
- class Fe extends $ {
1186
+ class We extends j {
1144
1187
  decoder = null;
1145
1188
  isReady = !1;
1146
1189
  decoderSampleRate = 48e3;
@@ -1148,8 +1191,8 @@ class Fe extends $ {
1148
1191
  async initialise(e, r) {
1149
1192
  const { OpusDecoder: s, getOpusModule: n } = await import("./index-Cns_7uAI.js");
1150
1193
  await n();
1151
- const i = [8e3, 12e3, 16e3, 24e3, 48e3].reduce((_, E) => Math.abs(E - r) < Math.abs(_ - r) ? E : _);
1152
- this.decoderSampleRate = i, this.decoder = new s({ channels: e, sampleRate: this.decoderSampleRate }), await this.decoder.ready, this.isReady = !0, this.flushPendingChunks();
1194
+ const a = [8e3, 12e3, 16e3, 24e3, 48e3].reduce((_, E) => Math.abs(E - r) < Math.abs(_ - r) ? E : _);
1195
+ this.decoderSampleRate = a, this.decoder = new s({ channels: e, sampleRate: this.decoderSampleRate }), await this.decoder.ready, this.isReady = !0, this.flushPendingChunks();
1153
1196
  }
1154
1197
  flushPendingChunks() {
1155
1198
  if (!this.isReady || !this.decoder) {
@@ -1175,25 +1218,25 @@ class Fe extends $ {
1175
1218
  try {
1176
1219
  if (e.data.byteLength === 0)
1177
1220
  return;
1178
- const s = this.decoder.decodeFrame(e.data), n = s.channelData, a = s.samplesDecoded, i = n.length;
1179
- if (!i || !a)
1221
+ const s = this.decoder.decodeFrame(e.data), n = s.channelData, i = s.samplesDecoded, a = n.length;
1222
+ if (!a || !i)
1180
1223
  return;
1181
- const _ = a * i, E = this.getInterleavedBuffer(_);
1182
- if (i === 2) {
1224
+ const _ = i * a, E = this.getInterleavedBuffer(_);
1225
+ if (a === 2) {
1183
1226
  const o = n[0], I = n[1];
1184
- for (let l = 0, u = 0; l < a; l++)
1227
+ for (let l = 0, u = 0; l < i; l++)
1185
1228
  E[u++] = o[l], E[u++] = I[l];
1186
- } else if (i === 1)
1187
- E.set(n[0].subarray(0, a));
1229
+ } else if (a === 1)
1230
+ E.set(n[0].subarray(0, i));
1188
1231
  else {
1189
1232
  let o = 0;
1190
- for (let I = 0; I < a; I++)
1191
- for (let l = 0; l < i; l++)
1233
+ for (let I = 0; I < i; I++)
1234
+ for (let l = 0; l < a; l++)
1192
1235
  E[o++] = n[l][I];
1193
1236
  }
1194
- this.writeConvertedPcm(E.subarray(0, _), i, this.decoderSampleRate), e.isLast && this.reset();
1237
+ this.writeConvertedPcm(E.subarray(0, _), a, this.decoderSampleRate), e.isLast && this.reset();
1195
1238
  } catch (r) {
1196
- L(r), this.reset();
1239
+ D(r), this.reset();
1197
1240
  }
1198
1241
  }
1199
1242
  feedChunk(e) {
@@ -1211,21 +1254,21 @@ class Fe extends $ {
1211
1254
  this.decoder = null, this.pendingChunks.length = 0;
1212
1255
  }
1213
1256
  }
1214
- const c = /* @__PURE__ */ new Map();
1215
- async function Me(t) {
1257
+ const T = /* @__PURE__ */ new Map();
1258
+ async function Ke(t) {
1216
1259
  if (t.closed || t.decoder)
1217
1260
  return;
1218
- if (t.codec === T.RawPcm16) {
1219
- t.decoder = new we({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1261
+ if (t.codec === c.RawPcm16) {
1262
+ t.decoder = new xe({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1220
1263
  return;
1221
1264
  }
1222
- if (t.codec !== T.Opus && t.codec !== T.Mp3)
1223
- throw new Error(`Unsupported audio codec: ${T[t.codec] ?? t.codec}`);
1224
- const e = de(t.codec);
1225
- if (lt && typeof AudioDecoder < "u" && e !== null)
1265
+ if (t.codec !== c.Opus && t.codec !== c.Mp3)
1266
+ throw new Error(`Unsupported audio codec: ${c[t.codec] ?? t.codec}`);
1267
+ const e = pe(t.codec);
1268
+ if (At && typeof AudioDecoder < "u" && e !== null)
1226
1269
  try {
1227
1270
  if ((await AudioDecoder.isConfigSupported({ codec: e, numberOfChannels: t.inputChannels, sampleRate: t.inputSampleRate })).supported) {
1228
- const n = new ge({
1271
+ const n = new Ye({
1229
1272
  codec: e,
1230
1273
  inputChannels: t.inputChannels,
1231
1274
  inputSampleRate: t.inputSampleRate,
@@ -1239,10 +1282,10 @@ async function Me(t) {
1239
1282
  return;
1240
1283
  }
1241
1284
  } catch (s) {
1242
- X.warn(`WebCodecs AudioDecoder failed, falling back to WASM: ${s instanceof Error ? s.message : String(s)}`);
1285
+ $.warn(`WebCodecs AudioDecoder failed, falling back to WASM: ${s instanceof Error ? s.message : String(s)}`);
1243
1286
  }
1244
- if (t.codec === T.Opus) {
1245
- const s = new Fe({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1287
+ if (t.codec === c.Opus) {
1288
+ const s = new We({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1246
1289
  if (await s.initialise(t.inputChannels, t.inputSampleRate), t.closed) {
1247
1290
  s.close();
1248
1291
  return;
@@ -1250,9 +1293,9 @@ async function Me(t) {
1250
1293
  t.decoder = s;
1251
1294
  return;
1252
1295
  }
1253
- throw new Error(`No available decoder for codec: ${T[t.codec] ?? t.codec}`);
1296
+ throw new Error(`No available decoder for codec: ${c[t.codec] ?? t.codec}`);
1254
1297
  }
1255
- function Be(t) {
1298
+ function ze(t) {
1256
1299
  if (t.closed) {
1257
1300
  t.pendingFrames.splice(0);
1258
1301
  try {
@@ -1266,9 +1309,9 @@ function Be(t) {
1266
1309
  return;
1267
1310
  const e = t.pendingFrames.splice(0);
1268
1311
  for (const r of e)
1269
- At(t, r);
1312
+ ht(t, r);
1270
1313
  }
1271
- function At(t, e) {
1314
+ function ht(t, e) {
1272
1315
  if (t.closed || !t.decoder)
1273
1316
  return;
1274
1317
  const r = e.Epoch, s = Number(e.TimeStampInInterleavedSamples), n = e.FrameSizeInInterleavedSamples;
@@ -1277,14 +1320,14 @@ function At(t, e) {
1277
1320
  const u = t.inputSampleRate * t.inputChannels;
1278
1321
  t.expectedIntervalMs = n * 1e3 / u;
1279
1322
  }
1280
- const a = performance.now();
1323
+ const i = performance.now();
1281
1324
  if (t.lastArrivalTimeMs > 0) {
1282
- const u = a - t.lastArrivalTimeMs, N = Math.abs(u - t.expectedIntervalMs);
1283
- t.jitterMs = t.jitterMs + (N - t.jitterMs) / Le;
1325
+ const u = i - t.lastArrivalTimeMs, S = Math.abs(u - t.expectedIntervalMs);
1326
+ t.jitterMs = t.jitterMs + (S - t.jitterMs) / Ge;
1284
1327
  }
1285
- t.lastArrivalTimeMs = a;
1286
- const i = t.inputSampleRate * t.inputChannels, _ = R * C, E = Math.round(s * _ / i), o = Math.round(n * _ / i), I = Math.round(s * 1e6 / i), l = Math.round(n * 1e6 / i);
1287
- d({
1328
+ t.lastArrivalTimeMs = i;
1329
+ const a = t.inputSampleRate * t.inputChannels, _ = R * N, E = Math.round(s * _ / a), o = Math.round(n * _ / a), I = Math.round(s * 1e6 / a), l = Math.round(n * 1e6 / a);
1330
+ m({
1288
1331
  type: "frame",
1289
1332
  streamId: t.streamId,
1290
1333
  epoch: r,
@@ -1292,8 +1335,7 @@ function At(t, e) {
1292
1335
  frameSizeInterleavedSamples: o,
1293
1336
  isFirst: e.IsFirst,
1294
1337
  isLast: e.IsLast,
1295
- jitterMs: t.jitterMs,
1296
- shapeSetValues: e.ShapeSetValues
1338
+ jitterMs: t.jitterMs
1297
1339
  }), t.decoder.feedChunk({
1298
1340
  data: e.Samples,
1299
1341
  isFirst: e.IsFirst,
@@ -1302,8 +1344,8 @@ function At(t, e) {
1302
1344
  durationUs: l
1303
1345
  });
1304
1346
  }
1305
- async function be(t) {
1306
- const e = z(t), r = await Ee(t), s = c.get(e);
1347
+ async function Xe(t) {
1348
+ const e = k(t), r = await Ce(t), s = T.get(e);
1307
1349
  if (s) {
1308
1350
  s.closed = !0, s.pendingFrames.splice(0);
1309
1351
  try {
@@ -1314,9 +1356,9 @@ async function be(t) {
1314
1356
  s.sink.drainPcm(), s.sink.close();
1315
1357
  } catch {
1316
1358
  }
1317
- c.delete(e);
1359
+ T.delete(e);
1318
1360
  }
1319
- const n = new Pe(e), a = {
1361
+ const n = new ke(e), i = {
1320
1362
  streamId: e,
1321
1363
  codec: r.Codec,
1322
1364
  inputSampleRate: r.SampleRate,
@@ -1333,24 +1375,24 @@ async function be(t) {
1333
1375
  expectedIntervalMs: 20,
1334
1376
  shapeSets: r.ShapeSets
1335
1377
  };
1336
- c.set(e, a), d({
1378
+ T.set(e, i), m({
1337
1379
  type: "streamBegin",
1338
1380
  streamId: e,
1339
1381
  sharedArrayBuffer: n.getSharedArrayBuffer(),
1340
1382
  shapeSets: r.ShapeSets
1341
1383
  });
1342
1384
  }
1343
- function Ge() {
1344
- for (const t of c.values())
1345
- d({
1385
+ function $e() {
1386
+ for (const t of T.values())
1387
+ m({
1346
1388
  type: "streamBegin",
1347
1389
  streamId: t.streamId,
1348
1390
  sharedArrayBuffer: t.sink.getSharedArrayBuffer(),
1349
1391
  shapeSets: t.shapeSets
1350
1392
  });
1351
1393
  }
1352
- function Ve(t) {
1353
- const e = z(t), r = c.get(e);
1394
+ function je(t) {
1395
+ const e = k(t), r = T.get(e);
1354
1396
  if (r) {
1355
1397
  r.closed = !0, r.pendingFrames.splice(0);
1356
1398
  try {
@@ -1361,53 +1403,76 @@ function Ve(t) {
1361
1403
  r.decoder?.close();
1362
1404
  } catch {
1363
1405
  }
1364
- r.decoder = null, c.delete(e), d({ type: "streamEnd", streamId: e });
1406
+ r.decoder = null, T.delete(e), m({ type: "streamEnd", streamId: e });
1365
1407
  }
1366
1408
  }
1367
- async function ve(t) {
1368
- const e = z(t), r = c.get(e);
1409
+ async function Qe(t) {
1410
+ const e = k(t), r = T.get(e);
1369
1411
  if (!r || r.closed)
1370
1412
  return;
1371
1413
  const s = await xt(t);
1372
- if (!r.decoder) {
1373
- if (r.pendingFrames.length >= Z) {
1374
- const n = r.pendingFrames.length - Z + 1;
1375
- r.pendingFrames.splice(0, n), X.warn(`Dropped ${n} frames waiting for decoder, streamId=${e.substring(0, 8)}`);
1414
+ if (!ut) {
1415
+ if (!r.decoder) {
1416
+ if (r.pendingFrames.length >= J) {
1417
+ const n = r.pendingFrames.length - J + 1;
1418
+ r.pendingFrames.splice(0, n), $.warn(`Dropped ${n} frames waiting for decoder, streamId=${e.substring(0, 8)}`);
1419
+ }
1420
+ r.pendingFrames.push(s), r.initTask || (r.initTask = Ke(r).then(() => ze(r)).catch((n) => {
1421
+ r.closed || D(n, e);
1422
+ }));
1423
+ return;
1376
1424
  }
1377
- r.pendingFrames.push(s), r.initTask || (r.initTask = Me(r).then(() => Be(r)).catch((n) => {
1378
- r.closed || L(n, e);
1379
- }));
1380
- return;
1425
+ ht(r, s);
1381
1426
  }
1382
- At(r, s);
1383
1427
  }
1384
- function ke(t) {
1385
- switch (ct(t)) {
1386
- case V.AUDIO_STREAM_BEGIN:
1387
- be(t);
1428
+ async function qe(t) {
1429
+ const e = k(t), r = T.get(e);
1430
+ if (!r || r.closed) return;
1431
+ const s = await Jt(t), n = r.inputSampleRate * r.inputChannels, i = R * N;
1432
+ m({
1433
+ type: "shapeFrame",
1434
+ streamId: e,
1435
+ epoch: s.Epoch,
1436
+ sequence: s.Sequence,
1437
+ timestampInterleavedSamples: Math.round(
1438
+ Number(s.TimeStampInInterleavedSamples) * i / n
1439
+ ),
1440
+ frameSizeInterleavedSamples: Math.round(
1441
+ s.FrameSizeInInterleavedSamples * i / n
1442
+ ),
1443
+ shapeSetValues: s.ShapeSetValues
1444
+ });
1445
+ }
1446
+ function Ze(t) {
1447
+ switch (St(t)) {
1448
+ case g.AUDIO_STREAM_BEGIN:
1449
+ Xe(t);
1450
+ return;
1451
+ case g.AUDIO_STREAM_END:
1452
+ je(t);
1388
1453
  return;
1389
- case V.AUDIO_STREAM_END:
1390
- Ve(t);
1454
+ case g.AUDIO_FRAME2:
1455
+ Qe(t);
1391
1456
  return;
1392
- case V.AUDIO_FRAME2:
1393
- ve(t);
1457
+ case g.AUDIO_SHAPE_FRAME:
1458
+ qe(t);
1394
1459
  return;
1395
1460
  default:
1396
1461
  return;
1397
1462
  }
1398
1463
  }
1399
- function ut() {
1400
- if (D) {
1464
+ function ft() {
1465
+ if (P) {
1401
1466
  try {
1402
- D.close();
1467
+ P.close();
1403
1468
  } catch {
1404
1469
  }
1405
- D = null;
1470
+ P = null;
1406
1471
  }
1407
1472
  }
1408
- function pe() {
1409
- ut();
1410
- for (const t of c.values()) {
1473
+ function Je() {
1474
+ ft();
1475
+ for (const t of T.values()) {
1411
1476
  try {
1412
1477
  t.sink.drainPcm(), t.sink.close();
1413
1478
  } catch {
@@ -1417,101 +1482,101 @@ function pe() {
1417
1482
  } catch {
1418
1483
  }
1419
1484
  }
1420
- c.clear();
1485
+ T.clear();
1421
1486
  }
1422
1487
  self.addEventListener("message", (t) => {
1423
1488
  const e = t.data;
1424
1489
  if (e.type === "configure") {
1425
- v = e.transport, lt = e.preferWebCodecs ?? !0, R = Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 ? e.outputSampleRate : ot, C = Number.isFinite(e.outputChannels) && e.outputChannels > 0 ? e.outputChannels : It;
1490
+ v = e.transport, At = e.preferWebCodecs ?? !0, ut = e.webRtcEnabled ?? !1, R = Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 ? e.outputSampleRate : It, N = Number.isFinite(e.outputChannels) && e.outputChannels > 0 ? e.outputChannels : lt;
1426
1491
  return;
1427
1492
  }
1428
1493
  if (e.type === "attachProtocolPort") {
1429
- ut(), D = e.port, D.addEventListener("message", (r) => {
1494
+ ft(), P = e.port, P.addEventListener("message", (r) => {
1430
1495
  const s = r.data;
1431
- s?.type === "protocol" && s.message instanceof ArrayBuffer && ke(new Uint8Array(s.message));
1432
- }), D.start?.();
1496
+ s?.type === "protocol" && s.message instanceof ArrayBuffer && Ze(new Uint8Array(s.message));
1497
+ }), P.start?.();
1433
1498
  return;
1434
1499
  }
1435
1500
  if (e.type === "rebind") {
1436
- v = e.transport, typeof e.outputSampleRate == "number" && Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 && (R = e.outputSampleRate), typeof e.outputChannels == "number" && Number.isFinite(e.outputChannels) && e.outputChannels > 0 && (C = e.outputChannels);
1437
- for (const r of c.values())
1438
- r.sink.setOutputFormat(R, C), r.sink.rebind(v);
1439
- Ge();
1501
+ v = e.transport, typeof e.outputSampleRate == "number" && Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 && (R = e.outputSampleRate), typeof e.outputChannels == "number" && Number.isFinite(e.outputChannels) && e.outputChannels > 0 && (N = e.outputChannels);
1502
+ for (const r of T.values())
1503
+ r.sink.setOutputFormat(R, N), r.sink.rebind(v);
1504
+ $e();
1440
1505
  return;
1441
1506
  }
1442
- e.type === "dispose" && pe();
1507
+ e.type === "dispose" && Je();
1443
1508
  });
1444
1509
  let U = null;
1445
- function xe(t, e) {
1510
+ function tr(t, e) {
1446
1511
  const r = t.length;
1447
1512
  if (r === 1)
1448
1513
  return t[0];
1449
1514
  const s = e * r;
1450
1515
  if ((!U || U.length < s) && (U = new Float32Array(s)), r === 2) {
1451
- const n = t[0], a = t[1];
1452
- for (let i = 0, _ = 0; i < e; i++)
1453
- U[_++] = n[i], U[_++] = a[i];
1516
+ const n = t[0], i = t[1];
1517
+ for (let a = 0, _ = 0; a < e; a++)
1518
+ U[_++] = n[a], U[_++] = i[a];
1454
1519
  } else {
1455
1520
  let n = 0;
1456
- for (let a = 0; a < e; a++)
1457
- for (let i = 0; i < r; i++)
1458
- U[n++] = t[i][a];
1521
+ for (let i = 0; i < e; i++)
1522
+ for (let a = 0; a < r; a++)
1523
+ U[n++] = t[a][i];
1459
1524
  }
1460
1525
  return U.subarray(0, s);
1461
1526
  }
1462
- const q = 3;
1463
- function tt(t) {
1527
+ const tt = 3;
1528
+ function et(t) {
1464
1529
  if (t === 0)
1465
1530
  return 1;
1466
1531
  const e = Math.PI * t;
1467
1532
  return Math.sin(e) / e;
1468
1533
  }
1469
- function He(t, e) {
1470
- return t === 0 ? 1 : Math.abs(t) >= e ? 0 : tt(t) * tt(t / e);
1534
+ function er(t, e) {
1535
+ return t === 0 ? 1 : Math.abs(t) >= e ? 0 : et(t) * et(t / e);
1471
1536
  }
1472
- function We(t, e, r, s, n) {
1537
+ function rr(t, e, r, s, n) {
1473
1538
  if (s === n)
1474
1539
  return e.set(t), t.length;
1475
- const a = t.length / r, i = Math.max(1, Math.round(a * n / s)), _ = s / n, E = _ > 1 ? _ : 1, o = Math.ceil(q * E);
1540
+ const i = t.length / r, a = Math.max(1, Math.round(i * n / s)), _ = s / n, E = _ > 1 ? _ : 1, o = Math.ceil(tt * E);
1476
1541
  for (let I = 0; I < r; I++)
1477
- for (let l = 0; l < i; l++) {
1478
- const u = l * _, N = Math.floor(u);
1479
- let O = 0, m = 0;
1480
- for (let k = -o + 1; k <= o; k++) {
1481
- const B = N + k;
1482
- if (B < 0 || B >= a)
1542
+ for (let l = 0; l < a; l++) {
1543
+ const u = l * _, S = Math.floor(u);
1544
+ let w = 0, L = 0;
1545
+ for (let p = -o + 1; p <= o; p++) {
1546
+ const b = S + p;
1547
+ if (b < 0 || b >= i)
1483
1548
  continue;
1484
- const ht = (u - B) / E, p = He(ht, q);
1485
- if (p !== 0) {
1486
- const ft = t[B * r + I] ?? 0;
1487
- O += ft * p, m += p;
1549
+ const Tt = (u - b) / E, H = er(Tt, tt);
1550
+ if (H !== 0) {
1551
+ const ct = t[b * r + I] ?? 0;
1552
+ w += ct * H, L += H;
1488
1553
  }
1489
1554
  }
1490
- e[l * r + I] = m > 0 ? O / m : 0;
1555
+ e[l * r + I] = L > 0 ? w / L : 0;
1491
1556
  }
1492
- return i * r;
1557
+ return a * r;
1493
1558
  }
1494
- function Ke(t, e, r, s) {
1559
+ function sr(t, e, r, s) {
1495
1560
  const n = t.length / r;
1496
1561
  if (r === s)
1497
1562
  return e.set(t), t.length;
1498
1563
  if (r === 1 && s === 2) {
1499
- for (let i = 0; i < n; i++) {
1500
- const _ = t[i] ?? 0;
1501
- e[i * 2] = _, e[i * 2 + 1] = _;
1564
+ for (let a = 0; a < n; a++) {
1565
+ const _ = t[a] ?? 0;
1566
+ e[a * 2] = _, e[a * 2 + 1] = _;
1502
1567
  }
1503
1568
  return n * 2;
1504
1569
  }
1505
1570
  if (r === 2 && s === 1) {
1506
- for (let i = 0; i < n; i++) {
1507
- const _ = t[i * 2] ?? 0, E = t[i * 2 + 1] ?? 0;
1508
- e[i] = (_ + E) * 0.5;
1571
+ for (let a = 0; a < n; a++) {
1572
+ const _ = t[a * 2] ?? 0, E = t[a * 2 + 1] ?? 0;
1573
+ e[a] = (_ + E) * 0.5;
1509
1574
  }
1510
1575
  return n;
1511
1576
  }
1512
- const a = Math.min(r, s);
1513
- for (let i = 0; i < n; i++)
1514
- for (let _ = 0; _ < a; _++)
1515
- e[i * s + _] = t[i * r + _] ?? 0;
1577
+ const i = Math.min(r, s);
1578
+ for (let a = 0; a < n; a++)
1579
+ for (let _ = 0; _ < i; _++)
1580
+ e[a * s + _] = t[a * r + _] ?? 0;
1516
1581
  return n * s;
1517
1582
  }