@ikonai/sdk 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,30 +7,30 @@ function ct(t) {
7
7
  return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
8
8
  }
9
9
  function et(t) {
10
- const e = F(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
10
+ const e = M(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), o = r.getUint32(16, !0), _ = r.getUint32(20, !0), E = r.getUint8(24), l = r.getUint8(25), I = r.getUint8(26);
14
- if (27 + _ * 4 > e.length)
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), l = r.getUint8(25), I = r.getUint8(26);
14
+ if (27 + E * 4 > e.length)
15
15
  throw new Error("Protocol header exceeds payload length");
16
16
  const N = [];
17
- let w = 27;
18
- for (let m = 0; m < _; m++)
19
- N.push(r.getUint32(w, !0)), w += 4;
17
+ let O = 27;
18
+ for (let m = 0; m < E; m++)
19
+ N.push(r.getUint32(O, !0)), O += 4;
20
20
  return {
21
21
  length: s,
22
22
  opcode: n,
23
23
  senderId: a,
24
24
  trackId: i,
25
- sequenceId: o,
25
+ sequenceId: _,
26
26
  targetIds: N,
27
- payloadVersion: E,
27
+ payloadVersion: o,
28
28
  payloadType: l,
29
29
  flags: I
30
30
  };
31
31
  }
32
32
  async function rt(t, e, r) {
33
- const s = F(t), n = et(s);
33
+ const s = M(t), n = et(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)
@@ -47,34 +47,34 @@ async function Nt(t) {
47
47
  const n = e.readable.getReader(), a = [];
48
48
  let i = 0;
49
49
  for (; ; ) {
50
- const { done: E, value: l } = await n.read();
51
- if (E) break;
50
+ const { done: o, value: l } = await n.read();
51
+ if (o) break;
52
52
  a.push(l), i += l.length;
53
53
  }
54
- const o = new Uint8Array(i);
55
- let _ = 0;
56
- for (let E = 0; E < a.length; E++)
57
- o.set(a[E], _), _ += a[E].length;
58
- return o;
54
+ const _ = new Uint8Array(i);
55
+ let E = 0;
56
+ for (let o = 0; o < a.length; o++)
57
+ _.set(a[o], E), E += a[o].length;
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
61
  const St = 161, Ct = 162;
62
62
  new TextEncoder();
63
63
  const Rt = new TextDecoder("utf-8", { fatal: !0 });
64
- class M {
64
+ class F {
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 = F(e);
71
+ const r = M(e);
72
72
  if (r.length < 2)
73
73
  throw new Error("Teleport payload too short");
74
74
  if (r[0] !== St || r[r.length - 1] !== Ct)
75
75
  throw new Error("Teleport object missing markers");
76
- const s = { offset: 1 }, n = A(r, s, "InvalidLength");
77
- return new M(r, n, s.offset);
76
+ const s = { offset: 1 }, n = f(r, s, "InvalidLength");
77
+ return new F(r, n, s.offset);
78
78
  }
79
79
  next() {
80
80
  if (this.offset >= this.end)
@@ -86,13 +86,13 @@ class M {
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 = d(s);
89
+ const n = P(s);
90
90
  let a;
91
91
  if (n >= 0)
92
- f(this.buffer, this.offset, n), a = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
92
+ h(this.buffer, this.offset, n), a = this.buffer.subarray(this.offset, this.offset + n), this.offset += n;
93
93
  else {
94
- const i = { offset: this.offset }, o = A(this.buffer, i, "InvalidLength");
95
- f(this.buffer, i.offset, o), a = this.buffer.subarray(i.offset, i.offset + o), this.offset = i.offset + o;
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 + _;
96
96
  }
97
97
  return new Ut(e, s, a);
98
98
  }
@@ -165,13 +165,13 @@ class S {
165
165
  return this.ensureType(
166
166
  14
167
167
  /* Guid */
168
- ), u.fromBytes(this.payload);
168
+ ), A.fromBytes(this.payload);
169
169
  }
170
170
  asObject() {
171
171
  return this.ensureType(
172
172
  11
173
173
  /* Object */
174
- ), M.create(this.payload);
174
+ ), F.create(this.payload);
175
175
  }
176
176
  asArray() {
177
177
  return this.ensureType(
@@ -211,10 +211,10 @@ class H {
211
211
  if (this.elementType = r >> 4 & 15, (r & 15) !== 0)
212
212
  throw new Error("Array flags must be zero");
213
213
  const s = { offset: 1 };
214
- this.count = A(e, s, "ArrayMalformed"), this.offset = s.offset;
214
+ this.count = f(e, s, "ArrayMalformed"), this.offset = s.offset;
215
215
  }
216
216
  static create(e) {
217
- return new H(F(e));
217
+ return new H(M(e));
218
218
  }
219
219
  next() {
220
220
  if (this.index >= this.count) {
@@ -235,38 +235,38 @@ class H {
235
235
  case 4:
236
236
  case 6:
237
237
  case 14: {
238
- const e = d(this.elementType);
239
- f(this.payload, this.offset, e);
238
+ const e = P(this.elementType);
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 O(this.elementType, r);
241
+ return this.offset += e, new w(this.elementType, r);
242
242
  }
243
243
  case 12:
244
244
  case 13: {
245
- const e = { offset: this.offset }, r = A(this.payload, e, "ArrayMalformed");
246
- f(this.payload, e.offset, r);
245
+ const e = { offset: this.offset }, r = f(this.payload, e, "ArrayMalformed");
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 O(this.elementType, s);
248
+ return this.offset = e.offset + r, new w(this.elementType, s);
249
249
  }
250
250
  case 11: {
251
- const e = { offset: this.offset }, r = A(this.payload, e, "ArrayMalformed");
252
- f(this.payload, e.offset, r);
251
+ const e = { offset: this.offset }, r = f(this.payload, e, "ArrayMalformed");
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 O(11, s);
254
+ return this.offset = e.offset + r, new w(11, s);
255
255
  }
256
256
  case 9: {
257
- const e = Y(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
258
- return this.offset += e, new O(9, r);
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);
259
259
  }
260
260
  case 10: {
261
- const e = K(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
262
- return this.offset += e, new O(10, r);
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);
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 O extends S {
269
+ class w extends S {
270
270
  constructor(e, r) {
271
271
  super(e, r);
272
272
  }
@@ -285,10 +285,10 @@ class W {
285
285
  throw new Error("Dictionary key/value flags must be zero");
286
286
  st(this.keyType);
287
287
  const r = { offset: 2 };
288
- this.count = A(e, r, "DictMalformed"), this.offset = r.offset;
288
+ this.count = f(e, r, "DictMalformed"), this.offset = r.offset;
289
289
  }
290
290
  static create(e) {
291
- return new W(F(e));
291
+ return new W(M(e));
292
292
  }
293
293
  next() {
294
294
  if (this.index >= this.count) {
@@ -300,15 +300,15 @@ class W {
300
300
  return this.index++, new mt(e, r);
301
301
  }
302
302
  readKey() {
303
- const e = d(this.keyType);
303
+ const e = P(this.keyType);
304
304
  if (e >= 0) {
305
- f(this.payload, this.offset, e);
305
+ h(this.payload, this.offset, e);
306
306
  const r = this.payload.subarray(this.offset, this.offset + e);
307
307
  return this.offset += e, new S(this.keyType, r);
308
308
  }
309
309
  if (this.keyType === 12 || this.keyType === 13) {
310
- const r = { offset: this.offset }, s = A(this.payload, r, "DictMalformed");
311
- f(this.payload, r.offset, s);
310
+ const r = { offset: this.offset }, s = f(this.payload, r, "DictMalformed");
311
+ h(this.payload, r.offset, s);
312
312
  const n = this.payload.subarray(r.offset, r.offset + s);
313
313
  return this.offset = r.offset + s, new S(this.keyType, n);
314
314
  }
@@ -318,23 +318,23 @@ class W {
318
318
  switch (this.valueType) {
319
319
  case 12:
320
320
  case 13: {
321
- const e = { offset: this.offset }, r = A(this.payload, e, "DictMalformed");
322
- f(this.payload, e.offset, r);
321
+ const e = { offset: this.offset }, r = f(this.payload, e, "DictMalformed");
322
+ h(this.payload, e.offset, r);
323
323
  const s = this.payload.subarray(e.offset, e.offset + r);
324
324
  return this.offset = e.offset + r, new S(this.valueType, s);
325
325
  }
326
326
  case 11: {
327
- const e = { offset: this.offset }, r = A(this.payload, e, "DictMalformed");
328
- f(this.payload, e.offset, r);
327
+ const e = { offset: this.offset }, r = f(this.payload, e, "DictMalformed");
328
+ h(this.payload, e.offset, r);
329
329
  const s = this.payload.subarray(e.offset, e.offset + r);
330
330
  return this.offset = e.offset + r, new S(11, s);
331
331
  }
332
332
  case 9: {
333
- const e = Y(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
333
+ const e = K(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
334
334
  return this.offset += e, new S(9, r);
335
335
  }
336
336
  case 10: {
337
- const e = K(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
337
+ const e = Y(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
338
338
  return this.offset += e, new S(10, r);
339
339
  }
340
340
  case 3:
@@ -346,8 +346,8 @@ class W {
346
346
  case 6:
347
347
  case 14:
348
348
  case 1: {
349
- const e = d(this.valueType);
350
- f(this.payload, this.offset, e);
349
+ const e = P(this.valueType);
350
+ h(this.payload, this.offset, e);
351
351
  const r = this.payload.subarray(this.offset, this.offset + e);
352
352
  return this.offset += e, new S(this.valueType, r);
353
353
  }
@@ -361,7 +361,7 @@ class mt {
361
361
  this.key = e, this.value = r;
362
362
  }
363
363
  }
364
- class u {
364
+ class A {
365
365
  constructor(e) {
366
366
  this.bytes = e;
367
367
  }
@@ -371,19 +371,19 @@ class u {
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 = u.parseHexSlice(r, 0, 8), a = u.parseHexSlice(r, 8, 4), i = u.parseHexSlice(r, 12, 4);
375
- u.writeUInt32LE(s, 0, n), u.writeUInt16LE(s, 4, a), u.writeUInt16LE(s, 6, i);
376
- for (let o = 0; o < 8; o++)
377
- s[8 + o] = u.parseHexSlice(r, 16 + o * 2, 2);
378
- return new u(s);
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);
376
+ for (let _ = 0; _ < 8; _++)
377
+ s[8 + _] = A.parseHexSlice(r, 16 + _ * 2, 2);
378
+ return new A(s);
379
379
  }
380
380
  static fromBytes(e) {
381
381
  if (e.length !== 16)
382
382
  throw new Error("Guid byte array must be 16 bytes");
383
- return new u(Uint8Array.from(e));
383
+ return new A(Uint8Array.from(e));
384
384
  }
385
385
  static createZero() {
386
- return new u(new Uint8Array(16));
386
+ return new A(new Uint8Array(16));
387
387
  }
388
388
  static createRandom() {
389
389
  const e = new Uint8Array(16), r = globalThis.crypto;
@@ -392,14 +392,14 @@ class u {
392
392
  else
393
393
  for (let s = 0; s < e.length; s++)
394
394
  e[s] = Math.floor(Math.random() * 256);
395
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new u(e);
395
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, new A(e);
396
396
  }
397
397
  toString() {
398
398
  const e = this.bytes;
399
399
  return [
400
- u.toHex(u.readUInt32LE(e, 0), 8),
401
- u.toHex(u.readUInt16LE(e, 4), 4),
402
- u.toHex(u.readUInt16LE(e, 6), 4),
400
+ A.toHex(A.readUInt32LE(e, 0), 8),
401
+ A.toHex(A.readUInt16LE(e, 4), 4),
402
+ A.toHex(A.readUInt16LE(e, 6), 4),
403
403
  j(e.subarray(8, 10)),
404
404
  j(e.subarray(10, 16))
405
405
  ].join("-");
@@ -431,7 +431,7 @@ class u {
431
431
  return (e >>> 0).toString(16).padStart(r, "0");
432
432
  }
433
433
  }
434
- function A(t, e, r) {
434
+ function f(t, e, r) {
435
435
  if (e.offset >= t.length)
436
436
  throw new Error(r);
437
437
  let s = 0, n = 0, a = 0;
@@ -450,7 +450,7 @@ function A(t, e, r) {
450
450
  function Lt(t) {
451
451
  return t < 128 ? 1 : t < 16384 ? 2 : t < 2097152 ? 3 : t < 268435456 ? 4 : 5;
452
452
  }
453
- function d(t) {
453
+ function P(t) {
454
454
  switch (t) {
455
455
  case 3:
456
456
  case 5:
@@ -474,60 +474,60 @@ function st(t) {
474
474
  if (t === 9 || t === 11 || t === 10 || t === 1)
475
475
  throw new Error("Dictionary keys must be primitive Teleport types");
476
476
  }
477
- function f(t, e, r) {
477
+ 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
481
  function Dt(t, e) {
482
482
  return (t[e] | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;
483
483
  }
484
- function Y(t, e) {
484
+ function K(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 = A(t, n, "ArrayMalformed"), i = d(s);
490
+ const n = { offset: e + 1 }, a = f(t, n, "ArrayMalformed"), i = P(s);
491
491
  if (i >= 0) {
492
- const _ = i * a;
493
- return f(t, n.offset, _), n.offset + _ - e;
492
+ const E = i * a;
493
+ return h(t, n.offset, E), n.offset + E - e;
494
494
  }
495
- let o = n.offset;
496
- for (let _ = 0; _ < a; _++)
497
- o = x(s, t, o, "ArrayMalformed");
498
- return o - e;
495
+ let _ = n.offset;
496
+ for (let E = 0; E < a; E++)
497
+ _ = x(s, t, _, "ArrayMalformed");
498
+ return _ - e;
499
499
  }
500
- function K(t, e) {
500
+ function Y(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 = A(t, n, "DictMalformed");
507
+ const n = { offset: e + 2 }, a = f(t, n, "DictMalformed");
508
508
  let i = n.offset;
509
- for (let o = 0; o < a; o++)
509
+ for (let _ = 0; _ < a; _++)
510
510
  i = x(r, t, i, "DictMalformed"), i = x(s, t, i, "DictMalformed");
511
511
  return i - e;
512
512
  }
513
513
  function x(t, e, r, s) {
514
- const n = d(t);
514
+ const n = P(t);
515
515
  if (n >= 0)
516
- return f(e, r, n), r + n;
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 = A(e, a, s);
521
- return f(e, a.offset, i), a.offset + i;
520
+ const a = { offset: r }, i = f(e, a, s);
521
+ return h(e, a.offset, i), a.offset + i;
522
522
  }
523
523
  case 11: {
524
- const a = { offset: r }, i = A(e, a, s);
525
- return f(e, a.offset, i), a.offset + i;
524
+ const a = { offset: r }, i = f(e, a, s);
525
+ return h(e, a.offset, i), a.offset + i;
526
526
  }
527
527
  case 9:
528
- return r + Y(e, r);
529
- case 10:
530
528
  return r + K(e, r);
529
+ case 10:
530
+ return r + Y(e, r);
531
531
  default:
532
532
  throw new Error(`Unsupported Teleport type ${y[t]}`);
533
533
  }
@@ -535,11 +535,11 @@ function x(t, e, r, s) {
535
535
  function j(t) {
536
536
  return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
537
537
  }
538
- function F(t) {
538
+ function M(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.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, dt = 205938238, Pt = 717315017, wt = 1594075008, Ot = 2026534360, gt = 3409001585, Mt = 3466650495, Ft = 4007456593, Bt = 4017217601, bt = 4065417427, Gt = 4086360332;
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.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
543
  function Vt(t) {
544
544
  const e = {};
545
545
  return nt(e), e;
@@ -548,7 +548,7 @@ function nt(t) {
548
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
549
  }
550
550
  function vt(t, e) {
551
- const r = M.create(t);
551
+ const r = F.create(t);
552
552
  return kt(r, e);
553
553
  }
554
554
  function kt(t, e) {
@@ -559,12 +559,12 @@ function pt(t, e) {
559
559
  let r;
560
560
  for (; (r = t.next()) !== null; )
561
561
  switch (r.fieldId) {
562
- case dt: {
562
+ case Pt: {
563
563
  if (r.isNull) throw new Error();
564
564
  e.AverageVolume = r.asFloat32();
565
565
  break;
566
566
  }
567
- case Pt: {
567
+ case dt: {
568
568
  if (r.isNull) {
569
569
  e.ShapeSetValues = void 0;
570
570
  break;
@@ -572,12 +572,12 @@ function pt(t, e) {
572
572
  e.ShapeSetValues = Ht(r.asArray());
573
573
  break;
574
574
  }
575
- case wt: {
575
+ case Ot: {
576
576
  if (r.isNull) throw new Error();
577
577
  e.IsFirst = r.asBool();
578
578
  break;
579
579
  }
580
- case Ot: {
580
+ case wt: {
581
581
  if (r.isNull) throw new Error();
582
582
  e.TimeStampInInterleavedSamples = r.asUInt64();
583
583
  break;
@@ -587,12 +587,12 @@ function pt(t, e) {
587
587
  e.Samples = r.asBinary();
588
588
  break;
589
589
  }
590
- case Mt: {
590
+ case Ft: {
591
591
  if (r.isNull) throw new Error();
592
592
  e.AudioEventEstimatedDuration = r.asFloat32();
593
593
  break;
594
594
  }
595
- case Ft: {
595
+ case Mt: {
596
596
  if (r.isNull) throw new Error();
597
597
  e.FrameSizeInInterleavedSamples = r.asUInt32();
598
598
  break;
@@ -625,8 +625,8 @@ function Ht(t) {
625
625
  e.push(Xt(r.asObject()));
626
626
  return e;
627
627
  }
628
- const Wt = 1154362099, Yt = 3974819915;
629
- function Kt(t) {
628
+ const Wt = 1154362099, Kt = 3974819915;
629
+ function Yt(t) {
630
630
  const e = {};
631
631
  return it(e), e;
632
632
  }
@@ -634,7 +634,7 @@ function it(t) {
634
634
  return t.SetId = 0, t.Values = [], t;
635
635
  }
636
636
  function Xt(t, e) {
637
- const r = e ?? Kt();
637
+ const r = e ?? Yt();
638
638
  return it(r), zt(t, r), r;
639
639
  }
640
640
  function zt(t, e) {
@@ -646,7 +646,7 @@ function zt(t, e) {
646
646
  e.SetId = r.asUInt32();
647
647
  break;
648
648
  }
649
- case Yt: {
649
+ case Kt: {
650
650
  if (r.isNull) throw new Error();
651
651
  e.Values = $t(r.asArray());
652
652
  break;
@@ -669,14 +669,14 @@ function at(t) {
669
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;
670
670
  }
671
671
  function ie(t, e) {
672
- const r = M.create(t);
672
+ const r = F.create(t);
673
673
  return ae(r, e);
674
674
  }
675
675
  function ae(t, e) {
676
676
  const r = e ?? ne();
677
- return at(r), oe(t, r), r;
677
+ return at(r), _e(t, r), r;
678
678
  }
679
- function oe(t, e) {
679
+ function _e(t, e) {
680
680
  let r;
681
681
  for (; (r = t.next()) !== null; )
682
682
  switch (r.fieldId) {
@@ -690,7 +690,7 @@ function oe(t, e) {
690
690
  e.ShapeSets = void 0;
691
691
  break;
692
692
  }
693
- e.ShapeSets = Ee(r.asArray());
693
+ e.ShapeSets = oe(r.asArray());
694
694
  break;
695
695
  }
696
696
  case Zt: {
@@ -725,30 +725,30 @@ function oe(t, e) {
725
725
  }
726
726
  }
727
727
  }
728
- async function _e(t, e) {
728
+ async function Ee(t, e) {
729
729
  const r = await rt(t, jt);
730
730
  return ie(r, e);
731
731
  }
732
- function Ee(t) {
732
+ function oe(t) {
733
733
  const e = [];
734
734
  let r;
735
735
  for (; (r = t.next()) !== null; )
736
- e.push(fe(r.asObject()));
736
+ e.push(he(r.asObject()));
737
737
  return e;
738
738
  }
739
- const le = 1107713536, Ie = 1154362099, ue = 1185721362;
740
- function he(t) {
739
+ const le = 1107713536, Ie = 1154362099, Ae = 1185721362;
740
+ function ue(t) {
741
741
  const e = {};
742
- return ot(e), e;
742
+ return _t(e), e;
743
743
  }
744
- function ot(t) {
744
+ function _t(t) {
745
745
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
746
746
  }
747
- function fe(t, e) {
748
- const r = e ?? he();
749
- return ot(r), Ae(t, r), r;
747
+ function he(t, e) {
748
+ const r = e ?? ue();
749
+ return _t(r), fe(t, r), r;
750
750
  }
751
- function Ae(t, e) {
751
+ function fe(t, e) {
752
752
  let r;
753
753
  for (; (r = t.next()) !== null; )
754
754
  switch (r.fieldId) {
@@ -762,7 +762,7 @@ function Ae(t, e) {
762
762
  e.SetId = r.asUInt32();
763
763
  break;
764
764
  }
765
- case ue: {
765
+ case Ae: {
766
766
  if (r.isNull) throw new Error();
767
767
  e.ShapeNames = Te(r.asArray());
768
768
  break;
@@ -850,33 +850,33 @@ function b(t, e, r, s) {
850
850
  message: r,
851
851
  args: s
852
852
  };
853
- for (const [o, _] of Ne) {
854
- const E = _?.minLevel ?? 2;
855
- if (t >= E)
853
+ for (const [_, E] of Ne) {
854
+ const o = E?.minLevel ?? 2;
855
+ if (t >= o)
856
856
  try {
857
- o(i);
857
+ _(i);
858
858
  } catch {
859
859
  }
860
860
  }
861
861
  if (ce <= t) {
862
- const o = Ce(e, r);
862
+ const _ = Ce(e, r);
863
863
  switch (t) {
864
864
  case 0:
865
- console.debug(o, ...s);
865
+ console.debug(_, ...s);
866
866
  break;
867
867
  case 1:
868
- console.info(o, ...s);
868
+ console.info(_, ...s);
869
869
  break;
870
870
  case 2:
871
- console.warn(o, ...s);
871
+ console.warn(_, ...s);
872
872
  break;
873
873
  case 3:
874
- console.error(o, ...s);
874
+ console.error(_, ...s);
875
875
  break;
876
876
  }
877
877
  }
878
878
  }
879
- function _t(t) {
879
+ function Et(t) {
880
880
  return {
881
881
  debug(e, ...r) {
882
882
  b(0, t, e, r);
@@ -892,7 +892,7 @@ function _t(t) {
892
892
  }
893
893
  };
894
894
  }
895
- const G = _t("Capabilities"), Re = globalThis;
895
+ const G = Et("Capabilities"), Re = globalThis;
896
896
  function Ue() {
897
897
  if (typeof SharedArrayBuffer > "u")
898
898
  return G.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
@@ -907,19 +907,19 @@ function Ue() {
907
907
  }
908
908
  return !0;
909
909
  }
910
- const Et = 48e3, lt = 2, me = 1500, Le = 10, J = 80, De = 50, Z = 64, X = _t("AudioPlaybackWorker"), P = (t, e) => {
910
+ const ot = 48e3, lt = 2, me = 1500, Le = 10, J = 80, De = 50, Z = 64, X = Et("AudioPlaybackWorker"), d = (t, e) => {
911
911
  self.postMessage(t, e ?? []);
912
912
  }, ye = Ue();
913
- let v = "pcm", It = !0, R = Et, C = lt, D = null;
913
+ let v = "pcm", It = !0, R = ot, C = lt, D = null;
914
914
  function L(t, e) {
915
915
  const r = t instanceof Error ? t : new Error(String(t));
916
- P({ type: "error", error: { name: r.name, message: r.message, stack: r.stack }, streamId: e });
916
+ d({ type: "error", error: { name: r.name, message: r.message, stack: r.stack }, streamId: e });
917
917
  }
918
918
  function z(t) {
919
919
  const e = et(t);
920
920
  return `${e.senderId}_${e.trackId}`;
921
921
  }
922
- class de {
922
+ class Pe {
923
923
  mode;
924
924
  ring = null;
925
925
  sab = void 0;
@@ -957,7 +957,7 @@ class de {
957
957
  if (!(e || this.pcmBatchOffset >= s || this.lastPcmFlushTimeMs > 0 && r - this.lastPcmFlushTimeMs >= De))
958
958
  return;
959
959
  const a = new Float32Array(this.pcmBatchOffset);
960
- a.set(this.pcmBatchBuffer.subarray(0, this.pcmBatchOffset)), this.pcmBatchOffset = 0, this.lastPcmFlushTimeMs = r, P({ type: "pcm", streamId: this.streamId, pcm: a }, [a.buffer]);
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]);
961
961
  }
962
962
  drainPcm() {
963
963
  this.flushPendingPcm(!0);
@@ -968,12 +968,12 @@ class de {
968
968
  if (this.mode === "sab" && this.ring) {
969
969
  const n = this.ring, a = this.outputChannels;
970
970
  let i = e;
971
- const o = Math.floor(Math.max(0, n.capacity - 1) / a) * a;
972
- i.length > o && (i = i.subarray(i.length - o));
973
- const _ = Math.floor(n.availableWrite() / a) * a;
974
- if (_ <= 0)
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;
974
+ if (E <= 0)
975
975
  return;
976
- i.length > _ && (i = i.subarray(i.length - _)), n.push(i);
976
+ i.length > E && (i = i.subarray(i.length - E)), n.push(i);
977
977
  return;
978
978
  }
979
979
  const r = Math.max(1, Math.round(this.outputSampleRate * this.outputChannels * J / 1e3)), s = this.pcmBatchOffset + e.length;
@@ -990,7 +990,7 @@ class de {
990
990
  this.closed || (this.pcmBatchOffset = 0, this.lastPcmFlushTimeMs = 0, this.ring?.flush());
991
991
  }
992
992
  }
993
- function Pe(t) {
993
+ function de(t) {
994
994
  switch (t) {
995
995
  case T.Opus:
996
996
  return "opus";
@@ -1001,7 +1001,7 @@ function Pe(t) {
1001
1001
  }
1002
1002
  }
1003
1003
  let g = null;
1004
- function we(t) {
1004
+ function Oe(t) {
1005
1005
  const e = new DataView(t.buffer, t.byteOffset, t.byteLength), r = Math.floor(t.byteLength / 2);
1006
1006
  (!g || g.length < r) && (g = new Float32Array(r));
1007
1007
  for (let s = 0; s < r; s++)
@@ -1035,26 +1035,26 @@ class $ {
1035
1035
  n.length > 0 && this.sink.writePcm(n);
1036
1036
  }
1037
1037
  convertAudioData(e) {
1038
- const r = e.numberOfFrames, s = e.numberOfChannels, n = e.format, a = typeof n == "string" && n.includes("planar"), i = "f32-planar", o = "f32", _ = () => {
1038
+ const r = e.numberOfFrames, s = e.numberOfChannels, n = e.format, a = typeof n == "string" && n.includes("planar"), i = "f32-planar", _ = "f32", E = () => {
1039
1039
  const I = new Array(s);
1040
- for (let h = 0; h < s; h++) {
1040
+ for (let u = 0; u < s; u++) {
1041
1041
  const N = new Float32Array(r);
1042
- e.copyTo(N, { planeIndex: h, format: i }), I[h] = N;
1042
+ e.copyTo(N, { planeIndex: u, format: i }), I[u] = N;
1043
1043
  }
1044
1044
  return xe(I, r);
1045
- }, E = () => {
1045
+ }, o = () => {
1046
1046
  const I = new Float32Array(r * s);
1047
- return e.copyTo(I, { planeIndex: 0, format: o }), I;
1047
+ return e.copyTo(I, { planeIndex: 0, format: _ }), I;
1048
1048
  };
1049
1049
  let l;
1050
1050
  if (a)
1051
1051
  try {
1052
- l = _();
1052
+ l = E();
1053
1053
  } catch (I) {
1054
- X.debug(`Failed to read planar audio data, falling back to interleaved copy: ${I}`), l = E();
1054
+ X.debug(`Failed to read planar audio data, falling back to interleaved copy: ${I}`), l = o();
1055
1055
  }
1056
1056
  else
1057
- l = E();
1057
+ l = o();
1058
1058
  return l;
1059
1059
  }
1060
1060
  convertPcmBuffer(e, r, s) {
@@ -1062,20 +1062,20 @@ class $ {
1062
1062
  return e;
1063
1063
  let n = e, a = e.length, i = r;
1064
1064
  if (s !== R) {
1065
- const o = a / i, E = Math.max(1, Math.round(o * R / s)) * i, l = this.getResampleBuffer(E);
1065
+ const _ = a / i, o = Math.max(1, Math.round(_ * R / s)) * i, l = this.getResampleBuffer(o);
1066
1066
  a = We(n, l, i, s, R), n = l;
1067
1067
  }
1068
1068
  if (i !== C) {
1069
- const _ = a / i * C, E = this.getRemixBuffer(_);
1070
- a = Ye(n.subarray(0, a), E, i, C), n = E, 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;
1071
1071
  }
1072
1072
  return n.subarray(0, a);
1073
1073
  }
1074
1074
  }
1075
- class Oe extends $ {
1075
+ class we extends $ {
1076
1076
  feedChunk(e) {
1077
1077
  e.isFirst && this.reset();
1078
- const r = we(e.data);
1078
+ const r = Oe(e.data);
1079
1079
  this.writeConvertedPcm(r, this.inputChannels, this.inputSampleRate), e.isLast && this.reset();
1080
1080
  }
1081
1081
  close() {
@@ -1140,7 +1140,7 @@ class ge extends $ {
1140
1140
  }
1141
1141
  }
1142
1142
  }
1143
- class Me extends $ {
1143
+ class Fe extends $ {
1144
1144
  decoder = null;
1145
1145
  isReady = !1;
1146
1146
  decoderSampleRate = 48e3;
@@ -1148,7 +1148,7 @@ class Me extends $ {
1148
1148
  async initialise(e, r) {
1149
1149
  const { OpusDecoder: s, getOpusModule: n } = await import("./index-Cns_7uAI.js");
1150
1150
  await n();
1151
- const i = [8e3, 12e3, 16e3, 24e3, 48e3].reduce((o, _) => Math.abs(_ - r) < Math.abs(o - r) ? _ : o);
1151
+ const i = [8e3, 12e3, 16e3, 24e3, 48e3].reduce((_, E) => Math.abs(E - r) < Math.abs(_ - r) ? E : _);
1152
1152
  this.decoderSampleRate = i, this.decoder = new s({ channels: e, sampleRate: this.decoderSampleRate }), await this.decoder.ready, this.isReady = !0, this.flushPendingChunks();
1153
1153
  }
1154
1154
  flushPendingChunks() {
@@ -1178,20 +1178,20 @@ class Me extends $ {
1178
1178
  const s = this.decoder.decodeFrame(e.data), n = s.channelData, a = s.samplesDecoded, i = n.length;
1179
1179
  if (!i || !a)
1180
1180
  return;
1181
- const o = a * i, _ = this.getInterleavedBuffer(o);
1181
+ const _ = a * i, E = this.getInterleavedBuffer(_);
1182
1182
  if (i === 2) {
1183
- const E = n[0], l = n[1];
1184
- for (let I = 0, h = 0; I < a; I++)
1185
- _[h++] = E[I], _[h++] = l[I];
1183
+ const o = n[0], l = n[1];
1184
+ for (let I = 0, u = 0; I < a; I++)
1185
+ E[u++] = o[I], E[u++] = l[I];
1186
1186
  } else if (i === 1)
1187
- _.set(n[0].subarray(0, a));
1187
+ E.set(n[0].subarray(0, a));
1188
1188
  else {
1189
- let E = 0;
1189
+ let o = 0;
1190
1190
  for (let l = 0; l < a; l++)
1191
1191
  for (let I = 0; I < i; I++)
1192
- _[E++] = n[I][l];
1192
+ E[o++] = n[I][l];
1193
1193
  }
1194
- this.writeConvertedPcm(_.subarray(0, o), i, this.decoderSampleRate), e.isLast && this.reset();
1194
+ this.writeConvertedPcm(E.subarray(0, _), i, this.decoderSampleRate), e.isLast && this.reset();
1195
1195
  } catch (r) {
1196
1196
  L(r), this.reset();
1197
1197
  }
@@ -1212,16 +1212,16 @@ class Me extends $ {
1212
1212
  }
1213
1213
  }
1214
1214
  const c = /* @__PURE__ */ new Map();
1215
- async function Fe(t) {
1215
+ async function Me(t) {
1216
1216
  if (t.closed || t.decoder)
1217
1217
  return;
1218
1218
  if (t.codec === T.RawPcm16) {
1219
- t.decoder = new Oe({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1219
+ t.decoder = new we({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1220
1220
  return;
1221
1221
  }
1222
1222
  if (t.codec !== T.Opus && t.codec !== T.Mp3)
1223
1223
  throw new Error(`Unsupported audio codec: ${T[t.codec] ?? t.codec}`);
1224
- const e = Pe(t.codec);
1224
+ const e = de(t.codec);
1225
1225
  if (It && typeof AudioDecoder < "u" && e !== null)
1226
1226
  try {
1227
1227
  if ((await AudioDecoder.isConfigSupported({ codec: e, numberOfChannels: t.inputChannels, sampleRate: t.inputSampleRate })).supported) {
@@ -1242,7 +1242,7 @@ async function Fe(t) {
1242
1242
  X.warn(`WebCodecs AudioDecoder failed, falling back to WASM: ${s instanceof Error ? s.message : String(s)}`);
1243
1243
  }
1244
1244
  if (t.codec === T.Opus) {
1245
- const s = new Me({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1245
+ const s = new Fe({ inputChannels: t.inputChannels, inputSampleRate: t.inputSampleRate, sink: t.sink });
1246
1246
  if (await s.initialise(t.inputChannels, t.inputSampleRate), t.closed) {
1247
1247
  s.close();
1248
1248
  return;
@@ -1266,30 +1266,30 @@ function Be(t) {
1266
1266
  return;
1267
1267
  const e = t.pendingFrames.splice(0);
1268
1268
  for (const r of e)
1269
- ut(t, r);
1269
+ At(t, r);
1270
1270
  }
1271
- function ut(t, e) {
1271
+ function At(t, e) {
1272
1272
  if (t.closed || !t.decoder)
1273
1273
  return;
1274
1274
  const r = e.Epoch, s = Number(e.TimeStampInInterleavedSamples), n = e.FrameSizeInInterleavedSamples;
1275
1275
  if (t.currentEpoch !== r && (t.currentEpoch = r, t.epochSet = !1, t.lastArrivalTimeMs = 0, t.jitterMs = 0, t.sink.flush(), t.decoder.reset()), !t.epochSet) {
1276
1276
  t.epochSet = !0;
1277
- const h = t.inputSampleRate * t.inputChannels;
1278
- t.expectedIntervalMs = n * 1e3 / h;
1277
+ const u = t.inputSampleRate * t.inputChannels;
1278
+ t.expectedIntervalMs = n * 1e3 / u;
1279
1279
  }
1280
1280
  const a = performance.now();
1281
1281
  if (t.lastArrivalTimeMs > 0) {
1282
- const h = a - t.lastArrivalTimeMs, N = Math.abs(h - t.expectedIntervalMs);
1282
+ const u = a - t.lastArrivalTimeMs, N = Math.abs(u - t.expectedIntervalMs);
1283
1283
  t.jitterMs = t.jitterMs + (N - t.jitterMs) / Le;
1284
1284
  }
1285
1285
  t.lastArrivalTimeMs = a;
1286
- const i = t.inputSampleRate * t.inputChannels, o = R * C, _ = Math.round(s * o / i), E = Math.round(n * o / i), l = Math.round(s * 1e6 / i), I = Math.round(n * 1e6 / i);
1287
- P({
1286
+ const i = t.inputSampleRate * t.inputChannels, _ = R * C, E = Math.round(s * _ / i), o = Math.round(n * _ / i), l = Math.round(s * 1e6 / i), I = Math.round(n * 1e6 / i);
1287
+ d({
1288
1288
  type: "frame",
1289
1289
  streamId: t.streamId,
1290
1290
  epoch: r,
1291
- timestampInterleavedSamples: _,
1292
- frameSizeInterleavedSamples: E,
1291
+ timestampInterleavedSamples: E,
1292
+ frameSizeInterleavedSamples: o,
1293
1293
  isFirst: e.IsFirst,
1294
1294
  isLast: e.IsLast,
1295
1295
  jitterMs: t.jitterMs,
@@ -1303,7 +1303,7 @@ function ut(t, e) {
1303
1303
  });
1304
1304
  }
1305
1305
  async function be(t) {
1306
- const e = z(t), r = await _e(t), s = c.get(e);
1306
+ const e = z(t), r = await Ee(t), s = c.get(e);
1307
1307
  if (s) {
1308
1308
  s.closed = !0, s.pendingFrames.splice(0);
1309
1309
  try {
@@ -1316,7 +1316,7 @@ async function be(t) {
1316
1316
  }
1317
1317
  c.delete(e);
1318
1318
  }
1319
- const n = new de(e), a = {
1319
+ const n = new Pe(e), a = {
1320
1320
  streamId: e,
1321
1321
  codec: r.Codec,
1322
1322
  inputSampleRate: r.SampleRate,
@@ -1333,7 +1333,7 @@ async function be(t) {
1333
1333
  expectedIntervalMs: 20,
1334
1334
  shapeSets: r.ShapeSets
1335
1335
  };
1336
- c.set(e, a), P({
1336
+ c.set(e, a), d({
1337
1337
  type: "streamBegin",
1338
1338
  streamId: e,
1339
1339
  sharedArrayBuffer: n.getSharedArrayBuffer(),
@@ -1342,7 +1342,7 @@ async function be(t) {
1342
1342
  }
1343
1343
  function Ge() {
1344
1344
  for (const t of c.values())
1345
- P({
1345
+ d({
1346
1346
  type: "streamBegin",
1347
1347
  streamId: t.streamId,
1348
1348
  sharedArrayBuffer: t.sink.getSharedArrayBuffer(),
@@ -1361,7 +1361,7 @@ function Ve(t) {
1361
1361
  r.decoder?.close();
1362
1362
  } catch {
1363
1363
  }
1364
- r.decoder = null, c.delete(e), P({ type: "streamEnd", streamId: e });
1364
+ r.decoder = null, c.delete(e), d({ type: "streamEnd", streamId: e });
1365
1365
  }
1366
1366
  }
1367
1367
  async function ve(t) {
@@ -1374,12 +1374,12 @@ async function ve(t) {
1374
1374
  const n = r.pendingFrames.length - Z + 1;
1375
1375
  r.pendingFrames.splice(0, n), X.warn(`Dropped ${n} frames waiting for decoder, streamId=${e.substring(0, 8)}`);
1376
1376
  }
1377
- r.pendingFrames.push(s), r.initTask || (r.initTask = Fe(r).then(() => Be(r)).catch((n) => {
1377
+ r.pendingFrames.push(s), r.initTask || (r.initTask = Me(r).then(() => Be(r)).catch((n) => {
1378
1378
  r.closed || L(n, e);
1379
1379
  }));
1380
1380
  return;
1381
1381
  }
1382
- ut(r, s);
1382
+ At(r, s);
1383
1383
  }
1384
1384
  function ke(t) {
1385
1385
  switch (ct(t)) {
@@ -1396,7 +1396,7 @@ function ke(t) {
1396
1396
  return;
1397
1397
  }
1398
1398
  }
1399
- function ht() {
1399
+ function ut() {
1400
1400
  if (D) {
1401
1401
  try {
1402
1402
  D.close();
@@ -1406,7 +1406,7 @@ function ht() {
1406
1406
  }
1407
1407
  }
1408
1408
  function pe() {
1409
- ht();
1409
+ ut();
1410
1410
  for (const t of c.values()) {
1411
1411
  try {
1412
1412
  t.sink.drainPcm(), t.sink.close();
@@ -1422,11 +1422,11 @@ function pe() {
1422
1422
  self.addEventListener("message", (t) => {
1423
1423
  const e = t.data;
1424
1424
  if (e.type === "configure") {
1425
- v = e.transport, It = e.preferWebCodecs ?? !0, R = Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 ? e.outputSampleRate : Et, C = Number.isFinite(e.outputChannels) && e.outputChannels > 0 ? e.outputChannels : lt;
1425
+ v = e.transport, It = e.preferWebCodecs ?? !0, R = Number.isFinite(e.outputSampleRate) && e.outputSampleRate > 0 ? e.outputSampleRate : ot, C = Number.isFinite(e.outputChannels) && e.outputChannels > 0 ? e.outputChannels : lt;
1426
1426
  return;
1427
1427
  }
1428
1428
  if (e.type === "attachProtocolPort") {
1429
- ht(), D = e.port, D.addEventListener("message", (r) => {
1429
+ ut(), D = e.port, D.addEventListener("message", (r) => {
1430
1430
  const s = r.data;
1431
1431
  s?.type === "protocol" && s.message instanceof ArrayBuffer && ke(new Uint8Array(s.message));
1432
1432
  }), D.start?.();
@@ -1449,8 +1449,8 @@ function xe(t, e) {
1449
1449
  const s = e * r;
1450
1450
  if ((!U || U.length < s) && (U = new Float32Array(s)), r === 2) {
1451
1451
  const n = t[0], a = t[1];
1452
- for (let i = 0, o = 0; i < e; i++)
1453
- U[o++] = n[i], U[o++] = a[i];
1452
+ for (let i = 0, _ = 0; i < e; i++)
1453
+ U[_++] = n[i], U[_++] = a[i];
1454
1454
  } else {
1455
1455
  let n = 0;
1456
1456
  for (let a = 0; a < e; a++)
@@ -1472,46 +1472,46 @@ function He(t, e) {
1472
1472
  function We(t, e, r, s, n) {
1473
1473
  if (s === n)
1474
1474
  return e.set(t), t.length;
1475
- const a = t.length / r, i = Math.max(1, Math.round(a * n / s)), o = s / n, _ = o > 1 ? o : 1, E = Math.ceil(q * _);
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);
1476
1476
  for (let l = 0; l < r; l++)
1477
1477
  for (let I = 0; I < i; I++) {
1478
- const h = I * o, N = Math.floor(h);
1479
- let w = 0, m = 0;
1480
- for (let k = -E + 1; k <= E; k++) {
1478
+ const u = I * _, N = Math.floor(u);
1479
+ let O = 0, m = 0;
1480
+ for (let k = -o + 1; k <= o; k++) {
1481
1481
  const B = N + k;
1482
1482
  if (B < 0 || B >= a)
1483
1483
  continue;
1484
- const ft = (h - B) / _, p = He(ft, q);
1484
+ const ht = (u - B) / E, p = He(ht, q);
1485
1485
  if (p !== 0) {
1486
- const At = t[B * r + l] ?? 0;
1487
- w += At * p, m += p;
1486
+ const ft = t[B * r + l] ?? 0;
1487
+ O += ft * p, m += p;
1488
1488
  }
1489
1489
  }
1490
- e[I * r + l] = m > 0 ? w / m : 0;
1490
+ e[I * r + l] = m > 0 ? O / m : 0;
1491
1491
  }
1492
1492
  return i * r;
1493
1493
  }
1494
- function Ye(t, e, r, s) {
1494
+ function Ke(t, e, r, s) {
1495
1495
  const n = t.length / r;
1496
1496
  if (r === s)
1497
1497
  return e.set(t), t.length;
1498
1498
  if (r === 1 && s === 2) {
1499
1499
  for (let i = 0; i < n; i++) {
1500
- const o = t[i] ?? 0;
1501
- e[i * 2] = o, e[i * 2 + 1] = o;
1500
+ const _ = t[i] ?? 0;
1501
+ e[i * 2] = _, e[i * 2 + 1] = _;
1502
1502
  }
1503
1503
  return n * 2;
1504
1504
  }
1505
1505
  if (r === 2 && s === 1) {
1506
1506
  for (let i = 0; i < n; i++) {
1507
- const o = t[i * 2] ?? 0, _ = t[i * 2 + 1] ?? 0;
1508
- e[i] = (o + _) * 0.5;
1507
+ const _ = t[i * 2] ?? 0, E = t[i * 2 + 1] ?? 0;
1508
+ e[i] = (_ + E) * 0.5;
1509
1509
  }
1510
1510
  return n;
1511
1511
  }
1512
1512
  const a = Math.min(r, s);
1513
1513
  for (let i = 0; i < n; i++)
1514
- for (let o = 0; o < a; o++)
1515
- e[i * s + o] = t[i * r + o] ?? 0;
1514
+ for (let _ = 0; _ < a; _++)
1515
+ e[i * s + _] = t[i * r + _] ?? 0;
1516
1516
  return n * s;
1517
1517
  }