@ikonai/sdk 1.0.17 → 1.0.19

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.
@@ -10,12 +10,12 @@ function et(t) {
10
10
  const e = F(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), E = r.getUint32(20, !0), _ = r.getUint8(24), l = r.getUint8(25), I = r.getUint8(26);
14
- if (27 + E * 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), 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)
15
15
  throw new Error("Protocol header exceeds payload length");
16
16
  const N = [];
17
17
  let w = 27;
18
- for (let U = 0; U < E; U++)
18
+ for (let m = 0; m < _; m++)
19
19
  N.push(r.getUint32(w, !0)), w += 4;
20
20
  return {
21
21
  length: s,
@@ -24,7 +24,7 @@ function et(t) {
24
24
  trackId: i,
25
25
  sequenceId: o,
26
26
  targetIds: N,
27
- payloadVersion: _,
27
+ payloadVersion: E,
28
28
  payloadType: l,
29
29
  flags: I
30
30
  };
@@ -47,17 +47,17 @@ async function Nt(t) {
47
47
  const n = e.readable.getReader(), a = [];
48
48
  let i = 0;
49
49
  for (; ; ) {
50
- const { done: _, value: l } = await n.read();
51
- if (_) break;
50
+ const { done: E, value: l } = await n.read();
51
+ if (E) break;
52
52
  a.push(l), i += l.length;
53
53
  }
54
54
  const o = new Uint8Array(i);
55
- let E = 0;
56
- for (let _ = 0; _ < a.length; _++)
57
- o.set(a[_], E), E += a[_].length;
55
+ let _ = 0;
56
+ for (let E = 0; E < a.length; E++)
57
+ o.set(a[E], _), _ += a[E].length;
58
58
  return o;
59
59
  }
60
- var D = /* @__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))(D || {});
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 });
@@ -81,7 +81,7 @@ class M {
81
81
  return null;
82
82
  if (this.offset + 5 > this.buffer.length)
83
83
  throw new Error("Teleport object truncated");
84
- const e = yt(this.buffer, this.offset);
84
+ const e = Dt(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)
@@ -94,7 +94,7 @@ class M {
94
94
  const i = { offset: this.offset }, o = A(this.buffer, i, "InvalidLength");
95
95
  f(this.buffer, i.offset, o), a = this.buffer.subarray(i.offset, i.offset + o), this.offset = i.offset + o;
96
96
  }
97
- return new mt(e, s, a);
97
+ return new Ut(e, s, a);
98
98
  }
99
99
  }
100
100
  class S {
@@ -187,10 +187,10 @@ class S {
187
187
  }
188
188
  ensureType(e) {
189
189
  if (this.type !== e)
190
- throw new Error(`Teleport value has type ${D[this.type]}, expected ${D[e]}`);
190
+ throw new Error(`Teleport value has type ${y[this.type]}, expected ${y[e]}`);
191
191
  }
192
192
  }
193
- class mt extends S {
193
+ class Ut extends S {
194
194
  constructor(e, r, s) {
195
195
  super(r, s), this.fieldId = e;
196
196
  }
@@ -262,7 +262,7 @@ class H {
262
262
  return this.offset += e, new O(10, r);
263
263
  }
264
264
  default:
265
- throw new Error(`Unsupported array element type ${D[this.elementType]}`);
265
+ throw new Error(`Unsupported array element type ${y[this.elementType]}`);
266
266
  }
267
267
  }
268
268
  }
@@ -297,7 +297,7 @@ class W {
297
297
  return null;
298
298
  }
299
299
  const e = this.readKey(), r = this.readValue();
300
- return this.index++, new Ut(e, r);
300
+ return this.index++, new mt(e, r);
301
301
  }
302
302
  readKey() {
303
303
  const e = d(this.keyType);
@@ -352,11 +352,11 @@ class W {
352
352
  return this.offset += e, new S(this.valueType, r);
353
353
  }
354
354
  default:
355
- throw new Error(`Unsupported dictionary value type ${D[this.valueType]}`);
355
+ throw new Error(`Unsupported dictionary value type ${y[this.valueType]}`);
356
356
  }
357
357
  }
358
358
  }
359
- class Ut {
359
+ class mt {
360
360
  constructor(e, r) {
361
361
  this.key = e, this.value = r;
362
362
  }
@@ -478,7 +478,7 @@ function f(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 yt(t, e) {
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
484
  function Y(t, e) {
@@ -489,11 +489,11 @@ function Y(t, e) {
489
489
  throw new Error("Array flags must be zero");
490
490
  const n = { offset: e + 1 }, a = A(t, n, "ArrayMalformed"), i = d(s);
491
491
  if (i >= 0) {
492
- const E = i * a;
493
- return f(t, n.offset, E), n.offset + E - e;
492
+ const _ = i * a;
493
+ return f(t, n.offset, _), n.offset + _ - e;
494
494
  }
495
495
  let o = n.offset;
496
- for (let E = 0; E < a; E++)
496
+ for (let _ = 0; _ < a; _++)
497
497
  o = x(s, t, o, "ArrayMalformed");
498
498
  return o - e;
499
499
  }
@@ -529,7 +529,7 @@ function x(t, e, r, s) {
529
529
  case 10:
530
530
  return r + K(e, r);
531
531
  default:
532
- throw new Error(`Unsupported Teleport type ${D[t]}`);
532
+ throw new Error(`Unsupported Teleport type ${y[t]}`);
533
533
  }
534
534
  }
535
535
  function j(t) {
@@ -538,8 +538,8 @@ function j(t) {
538
538
  function F(t) {
539
539
  return t instanceof Uint8Array ? t : new Uint8Array(t);
540
540
  }
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 || {}), 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_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.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.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 Dt = 4194309, dt = 205938238, Pt = 717315017, wt = 1594075008, Ot = 2026534360, gt = 3409001585, Mt = 3466650495, Ft = 4007456593, Bt = 4017217601, bt = 4065417427, Gt = 4086360332;
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 || {}), 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.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.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;
543
543
  function Vt(t) {
544
544
  const e = {};
545
545
  return nt(e), e;
@@ -615,7 +615,7 @@ function pt(t, e) {
615
615
  }
616
616
  }
617
617
  async function xt(t, e) {
618
- const r = await rt(t, Dt);
618
+ const r = await rt(t, yt);
619
619
  return vt(r, e);
620
620
  }
621
621
  function Ht(t) {
@@ -690,7 +690,7 @@ function oe(t, e) {
690
690
  e.ShapeSets = void 0;
691
691
  break;
692
692
  }
693
- e.ShapeSets = _e(r.asArray());
693
+ e.ShapeSets = Ee(r.asArray());
694
694
  break;
695
695
  }
696
696
  case Zt: {
@@ -725,11 +725,11 @@ function oe(t, e) {
725
725
  }
726
726
  }
727
727
  }
728
- async function Ee(t, e) {
728
+ async function _e(t, e) {
729
729
  const r = await rt(t, jt);
730
730
  return ie(r, e);
731
731
  }
732
- function _e(t) {
732
+ function Ee(t) {
733
733
  const e = [];
734
734
  let r;
735
735
  for (; (r = t.next()) !== null; )
@@ -850,9 +850,9 @@ function b(t, e, r, s) {
850
850
  message: r,
851
851
  args: s
852
852
  };
853
- for (const [o, E] of Ne) {
854
- const _ = E?.minLevel ?? 2;
855
- if (t >= _)
853
+ for (const [o, _] of Ne) {
854
+ const E = _?.minLevel ?? 2;
855
+ if (t >= E)
856
856
  try {
857
857
  o(i);
858
858
  } catch {
@@ -876,7 +876,7 @@ function b(t, e, r, s) {
876
876
  }
877
877
  }
878
878
  }
879
- function Et(t) {
879
+ function _t(t) {
880
880
  return {
881
881
  debug(e, ...r) {
882
882
  b(0, t, e, r);
@@ -892,8 +892,8 @@ function Et(t) {
892
892
  }
893
893
  };
894
894
  }
895
- const G = Et("Capabilities"), Re = globalThis;
896
- function me() {
895
+ const G = _t("Capabilities"), Re = globalThis;
896
+ function Ue() {
897
897
  if (typeof SharedArrayBuffer > "u")
898
898
  return G.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
899
899
  if (typeof Atomics > "u")
@@ -907,10 +907,10 @@ function me() {
907
907
  }
908
908
  return !0;
909
909
  }
910
- const _t = 48e3, lt = 2, Ue = 1500, Le = 10, J = 80, ye = 50, Z = 64, X = Et("AudioPlaybackWorker"), P = (t, e) => {
910
+ const Et = 48e3, lt = 2, me = 1500, Le = 10, J = 80, De = 50, Z = 64, X = _t("AudioPlaybackWorker"), P = (t, e) => {
911
911
  self.postMessage(t, e ?? []);
912
- }, De = me();
913
- let v = "pcm", It = !0, R = _t, C = lt, y = null;
912
+ }, ye = Ue();
913
+ let v = "pcm", It = !0, R = Et, C = lt, D = null;
914
914
  function L(t, e) {
915
915
  const r = t instanceof Error ? t : new Error(String(t));
916
916
  P({ type: "error", error: { name: r.name, message: r.message, stack: r.stack }, streamId: e });
@@ -942,8 +942,8 @@ class de {
942
942
  }
943
943
  rebind(e) {
944
944
  if (!this.closed) {
945
- if (this.mode = e, e === "sab" && De) {
946
- const r = Math.floor(Ue * this.outputSampleRate * this.outputChannels / 1e3), s = Q.getStorageForCapacity(r, Float32Array), n = new Q(s, Float32Array);
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);
947
947
  n.flush(), this.sab = s, this.ring = n;
948
948
  return;
949
949
  }
@@ -954,7 +954,7 @@ class de {
954
954
  if (this.closed || this.mode !== "pcm" || this.pcmBatchOffset <= 0)
955
955
  return;
956
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 >= ye))
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
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]);
@@ -970,10 +970,10 @@ class de {
970
970
  let i = e;
971
971
  const o = Math.floor(Math.max(0, n.capacity - 1) / a) * a;
972
972
  i.length > o && (i = i.subarray(i.length - o));
973
- const E = Math.floor(n.availableWrite() / a) * a;
974
- if (E <= 0)
973
+ const _ = Math.floor(n.availableWrite() / a) * a;
974
+ if (_ <= 0)
975
975
  return;
976
- i.length > E && (i = i.subarray(i.length - E)), n.push(i);
976
+ i.length > _ && (i = i.subarray(i.length - _)), 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;
@@ -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", E = () => {
1038
+ const r = e.numberOfFrames, s = e.numberOfChannels, n = e.format, a = typeof n == "string" && n.includes("planar"), i = "f32-planar", o = "f32", _ = () => {
1039
1039
  const I = new Array(s);
1040
1040
  for (let h = 0; h < s; h++) {
1041
1041
  const N = new Float32Array(r);
1042
1042
  e.copyTo(N, { planeIndex: h, format: i }), I[h] = N;
1043
1043
  }
1044
1044
  return xe(I, r);
1045
- }, _ = () => {
1045
+ }, E = () => {
1046
1046
  const I = new Float32Array(r * s);
1047
1047
  return e.copyTo(I, { planeIndex: 0, format: o }), I;
1048
1048
  };
1049
1049
  let l;
1050
1050
  if (a)
1051
1051
  try {
1052
- l = E();
1052
+ l = _();
1053
1053
  } catch (I) {
1054
- X.debug(`Failed to read planar audio data, falling back to interleaved copy: ${I}`), l = _();
1054
+ X.debug(`Failed to read planar audio data, falling back to interleaved copy: ${I}`), l = E();
1055
1055
  }
1056
1056
  else
1057
- l = _();
1057
+ l = E();
1058
1058
  return l;
1059
1059
  }
1060
1060
  convertPcmBuffer(e, r, s) {
@@ -1062,12 +1062,12 @@ 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, _ = Math.max(1, Math.round(o * R / s)) * i, l = this.getResampleBuffer(_);
1065
+ const o = a / i, E = Math.max(1, Math.round(o * R / s)) * i, l = this.getResampleBuffer(E);
1066
1066
  a = We(n, l, i, s, R), n = l;
1067
1067
  }
1068
1068
  if (i !== C) {
1069
- const E = a / i * C, _ = this.getRemixBuffer(E);
1070
- a = Ye(n.subarray(0, a), _, i, C), n = _, i = C;
1069
+ const _ = a / i * C, E = this.getRemixBuffer(_);
1070
+ a = Ye(n.subarray(0, a), E, i, C), n = E, i = C;
1071
1071
  }
1072
1072
  return n.subarray(0, a);
1073
1073
  }
@@ -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, E) => Math.abs(E - r) < Math.abs(o - r) ? E : o);
1151
+ const i = [8e3, 12e3, 16e3, 24e3, 48e3].reduce((o, _) => Math.abs(_ - r) < Math.abs(o - r) ? _ : o);
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, E = this.getInterleavedBuffer(o);
1181
+ const o = a * i, _ = this.getInterleavedBuffer(o);
1182
1182
  if (i === 2) {
1183
- const _ = n[0], l = n[1];
1183
+ const E = n[0], l = n[1];
1184
1184
  for (let I = 0, h = 0; I < a; I++)
1185
- E[h++] = _[I], E[h++] = l[I];
1185
+ _[h++] = E[I], _[h++] = l[I];
1186
1186
  } else if (i === 1)
1187
- E.set(n[0].subarray(0, a));
1187
+ _.set(n[0].subarray(0, a));
1188
1188
  else {
1189
- let _ = 0;
1189
+ let E = 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++] = n[I][l];
1193
1193
  }
1194
- this.writeConvertedPcm(E.subarray(0, o), i, this.decoderSampleRate), e.isLast && this.reset();
1194
+ this.writeConvertedPcm(_.subarray(0, o), i, this.decoderSampleRate), e.isLast && this.reset();
1195
1195
  } catch (r) {
1196
1196
  L(r), this.reset();
1197
1197
  }
@@ -1283,13 +1283,13 @@ function ut(t, e) {
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, E = Math.round(s * o / i), _ = Math.round(n * o / i), l = Math.round(s * 1e6 / i), I = Math.round(n * 1e6 / i);
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
1287
  P({
1288
1288
  type: "frame",
1289
1289
  streamId: t.streamId,
1290
1290
  epoch: r,
1291
- timestampInterleavedSamples: E,
1292
- frameSizeInterleavedSamples: _,
1291
+ timestampInterleavedSamples: _,
1292
+ frameSizeInterleavedSamples: E,
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 Ee(t), s = T.get(e);
1306
+ const e = z(t), r = await _e(t), s = T.get(e);
1307
1307
  if (s) {
1308
1308
  s.closed = !0, s.pendingFrames.splice(0);
1309
1309
  try {
@@ -1397,12 +1397,12 @@ function ke(t) {
1397
1397
  }
1398
1398
  }
1399
1399
  function ht() {
1400
- if (y) {
1400
+ if (D) {
1401
1401
  try {
1402
- y.close();
1402
+ D.close();
1403
1403
  } catch {
1404
1404
  }
1405
- y = null;
1405
+ D = null;
1406
1406
  }
1407
1407
  }
1408
1408
  function pe() {
@@ -1422,14 +1422,14 @@ 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 : _t, 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 : Et, C = Number.isFinite(e.outputChannels) && e.outputChannels > 0 ? e.outputChannels : lt;
1426
1426
  return;
1427
1427
  }
1428
1428
  if (e.type === "attachProtocolPort") {
1429
- ht(), y = e.port, y.addEventListener("message", (r) => {
1429
+ ht(), 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
- }), y.start?.();
1432
+ }), D.start?.();
1433
1433
  return;
1434
1434
  }
1435
1435
  if (e.type === "rebind") {
@@ -1441,23 +1441,23 @@ self.addEventListener("message", (t) => {
1441
1441
  }
1442
1442
  e.type === "dispose" && pe();
1443
1443
  });
1444
- let m = null;
1444
+ let U = null;
1445
1445
  function xe(t, e) {
1446
1446
  const r = t.length;
1447
1447
  if (r === 1)
1448
1448
  return t[0];
1449
1449
  const s = e * r;
1450
- if ((!m || m.length < s) && (m = new Float32Array(s)), r === 2) {
1450
+ if ((!U || U.length < s) && (U = new Float32Array(s)), r === 2) {
1451
1451
  const n = t[0], a = t[1];
1452
1452
  for (let i = 0, o = 0; i < e; i++)
1453
- m[o++] = n[i], m[o++] = a[i];
1453
+ U[o++] = n[i], U[o++] = a[i];
1454
1454
  } else {
1455
1455
  let n = 0;
1456
1456
  for (let a = 0; a < e; a++)
1457
1457
  for (let i = 0; i < r; i++)
1458
- m[n++] = t[i][a];
1458
+ U[n++] = t[i][a];
1459
1459
  }
1460
- return m.subarray(0, s);
1460
+ return U.subarray(0, s);
1461
1461
  }
1462
1462
  const q = 3;
1463
1463
  function tt(t) {
@@ -1472,22 +1472,22 @@ 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, E = o > 1 ? o : 1, _ = Math.ceil(q * E);
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 * _);
1476
1476
  for (let l = 0; l < r; l++)
1477
1477
  for (let I = 0; I < i; I++) {
1478
1478
  const h = I * o, N = Math.floor(h);
1479
- let w = 0, U = 0;
1480
- for (let k = -_ + 1; k <= _; k++) {
1479
+ let w = 0, m = 0;
1480
+ for (let k = -E + 1; k <= E; k++) {
1481
1481
  const B = N + k;
1482
1482
  if (B < 0 || B >= a)
1483
1483
  continue;
1484
- const ft = (h - B) / E, p = He(ft, q);
1484
+ const ft = (h - B) / _, p = He(ft, q);
1485
1485
  if (p !== 0) {
1486
1486
  const At = t[B * r + l] ?? 0;
1487
- w += At * p, U += p;
1487
+ w += At * p, m += p;
1488
1488
  }
1489
1489
  }
1490
- e[I * r + l] = U > 0 ? w / U : 0;
1490
+ e[I * r + l] = m > 0 ? w / m : 0;
1491
1491
  }
1492
1492
  return i * r;
1493
1493
  }
@@ -1504,8 +1504,8 @@ function Ye(t, e, r, s) {
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, E = t[i * 2 + 1] ?? 0;
1508
- e[i] = (o + E) * 0.5;
1507
+ const o = t[i * 2] ?? 0, _ = t[i * 2 + 1] ?? 0;
1508
+ e[i] = (o + _) * 0.5;
1509
1509
  }
1510
1510
  return n;
1511
1511
  }