@ikonai/sdk 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/index.js +512 -701
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- function Ml(t) {
1
+ function El(t) {
2
2
  return t;
3
3
  }
4
4
  function ue(t) {
@@ -13,22 +13,22 @@ function ne(t) {
13
13
  const e = se(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
14
14
  if (e.length < 27)
15
15
  throw new Error("Protocol payload too short");
16
- const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), u = r.getUint8(24), p = r.getUint8(25), d = r.getUint8(26);
16
+ const n = r.getUint32(0, !0), s = r.getUint32(4, !0), i = r.getUint32(8, !0), o = r.getUint32(12, !0), a = r.getUint32(16, !0), c = r.getUint32(20, !0), u = r.getUint8(24), f = r.getUint8(25), d = r.getUint8(26);
17
17
  if (27 + c * 4 > e.length)
18
18
  throw new Error("Protocol header exceeds payload length");
19
- const f = [];
20
- let E = 27;
19
+ const E = [];
20
+ let p = 27;
21
21
  for (let I = 0; I < c; I++)
22
- f.push(r.getUint32(E, !0)), E += 4;
22
+ E.push(r.getUint32(p, !0)), p += 4;
23
23
  return {
24
24
  length: n,
25
25
  opcode: s,
26
26
  senderId: i,
27
27
  trackId: o,
28
28
  sequenceId: a,
29
- targetIds: f,
29
+ targetIds: E,
30
30
  payloadVersion: u,
31
- payloadType: p,
31
+ payloadType: f,
32
32
  flags: d
33
33
  };
34
34
  }
@@ -44,15 +44,15 @@ function Me(t, e, r) {
44
44
  return n.subarray(i, s.length);
45
45
  }
46
46
  function P(t, e, r, n, s) {
47
- const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], u = s?.payloadType ?? 8, p = 27 + c.length * 4, d = p + e.length, h = new Uint8Array(d), f = new DataView(h.buffer);
48
- f.setUint32(0, d, !0), f.setUint32(4, t >>> 0, !0), f.setUint32(8, n >>> 0, !0), f.setUint32(12, i >>> 0, !0), f.setUint32(16, o >>> 0, !0), f.setUint32(20, c.length >>> 0, !0), f.setUint8(24, r & 255), f.setUint8(25, u & 255), f.setUint8(26, a & 255);
49
- let E = 27;
47
+ const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], u = s?.payloadType ?? 8, f = 27 + c.length * 4, d = f + e.length, h = new Uint8Array(d), E = new DataView(h.buffer);
48
+ E.setUint32(0, d, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, n >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, r & 255), E.setUint8(25, u & 255), E.setUint8(26, a & 255);
49
+ let p = 27;
50
50
  for (let I = 0; I < c.length; I++)
51
- f.setUint32(E, c[I] >>> 0, !0), E += 4;
52
- return h.set(e, p), h;
51
+ E.setUint32(p, c[I] >>> 0, !0), p += 4;
52
+ return h.set(e, f), h;
53
53
  }
54
- var b = /* @__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))(b || {});
55
- const ht = 161, dt = 162, he = new TextEncoder(), Gr = new TextDecoder("utf-8", { fatal: !0 });
54
+ var R = /* @__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))(R || {});
55
+ const ht = 161, dt = 162, he = new TextEncoder(), xr = new TextDecoder("utf-8", { fatal: !0 });
56
56
  class D {
57
57
  constructor(e = 1) {
58
58
  this.version = e, this.buffer.writeByte(ht), this.buffer.writeVarUInt(e >>> 0);
@@ -233,7 +233,7 @@ class _e {
233
233
  }
234
234
  ensureElementType(e) {
235
235
  if (this.elementType !== e)
236
- throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
236
+ throw new Error(`Array element type is ${R[this.elementType]}, expected ${R[e]}`);
237
237
  }
238
238
  }
239
239
  class Oe {
@@ -441,11 +441,11 @@ class Vr {
441
441
  }
442
442
  ensureKeyType(e) {
443
443
  if (this.keyType !== e)
444
- throw new Error(`Dictionary key type is ${b[this.keyType]}, expected ${b[e]}`);
444
+ throw new Error(`Dictionary key type is ${R[this.keyType]}, expected ${R[e]}`);
445
445
  }
446
446
  ensureValueType(e) {
447
447
  if (this.valueType !== e)
448
- throw new Error(`Dictionary value type is ${b[this.valueType]}, expected ${b[e]}`);
448
+ throw new Error(`Dictionary value type is ${R[this.valueType]}, expected ${R[e]}`);
449
449
  }
450
450
  }
451
451
  class z {
@@ -546,7 +546,7 @@ class F {
546
546
  return this.ensureType(
547
547
  12
548
548
  /* String */
549
- ), Gr.decode(this.payload);
549
+ ), xr.decode(this.payload);
550
550
  }
551
551
  asGuid() {
552
552
  return this.ensureType(
@@ -574,7 +574,7 @@ class F {
574
574
  }
575
575
  ensureType(e) {
576
576
  if (this.type !== e)
577
- throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
577
+ throw new Error(`Teleport value has type ${R[this.type]}, expected ${R[e]}`);
578
578
  }
579
579
  }
580
580
  class Wr extends F {
@@ -625,35 +625,35 @@ class Le {
625
625
  const e = Y(this.elementType);
626
626
  C(this.payload, this.offset, e);
627
627
  const r = this.payload.subarray(this.offset, this.offset + e);
628
- return this.offset += e, new Z(this.elementType, r);
628
+ return this.offset += e, new q(this.elementType, r);
629
629
  }
630
630
  case 12:
631
631
  case 13: {
632
632
  const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
633
633
  C(this.payload, e.offset, r);
634
634
  const n = this.payload.subarray(e.offset, e.offset + r);
635
- return this.offset = e.offset + r, new Z(this.elementType, n);
635
+ return this.offset = e.offset + r, new q(this.elementType, n);
636
636
  }
637
637
  case 11: {
638
638
  const e = { offset: this.offset }, r = U(this.payload, e, "ArrayMalformed");
639
639
  C(this.payload, e.offset, r);
640
640
  const n = this.payload.subarray(e.offset, e.offset + r);
641
- return this.offset = e.offset + r, new Z(11, n);
641
+ return this.offset = e.offset + r, new q(11, n);
642
642
  }
643
643
  case 9: {
644
644
  const e = Pe(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
645
- return this.offset += e, new Z(9, r);
645
+ return this.offset += e, new q(9, r);
646
646
  }
647
647
  case 10: {
648
648
  const e = Be(this.payload, this.offset), r = this.payload.subarray(this.offset, this.offset + e);
649
- return this.offset += e, new Z(10, r);
649
+ return this.offset += e, new q(10, r);
650
650
  }
651
651
  default:
652
- throw new Error(`Unsupported array element type ${b[this.elementType]}`);
652
+ throw new Error(`Unsupported array element type ${R[this.elementType]}`);
653
653
  }
654
654
  }
655
655
  }
656
- class Z extends F {
656
+ class q extends F {
657
657
  constructor(e, r) {
658
658
  super(e, r);
659
659
  }
@@ -739,7 +739,7 @@ class ve {
739
739
  return this.offset += e, new F(this.valueType, r);
740
740
  }
741
741
  default:
742
- throw new Error(`Unsupported dictionary value type ${b[this.valueType]}`);
742
+ throw new Error(`Unsupported dictionary value type ${R[this.valueType]}`);
743
743
  }
744
744
  }
745
745
  }
@@ -976,7 +976,7 @@ function ye(t, e, r, n) {
976
976
  case 10:
977
977
  return r + Be(e, r);
978
978
  default:
979
- throw new Error(`Unsupported Teleport type ${b[t]}`);
979
+ throw new Error(`Unsupported Teleport type ${R[t]}`);
980
980
  }
981
981
  }
982
982
  function ze(t) {
@@ -985,36 +985,36 @@ function ze(t) {
985
985
  function se(t) {
986
986
  return t instanceof Uint8Array ? t : new Uint8Array(t);
987
987
  }
988
- var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), pt = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(pt || {}), q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(Et || {}), xe = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(xe || {}), T = /* @__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.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.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))(T || {});
989
- const mt = 1, jr = 1048637, zr = 727023925, Xr = 3395085689;
988
+ var ft = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(ft || {}), X = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(X || {}), J = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(J || {}), k = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t))(k || {}), Q = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(Q || {}), Et = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(Et || {}), Z = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Z || {}), pt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(pt || {}), Ge = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(Ge || {}), S = /* @__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.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.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))(S || {});
989
+ const It = 1, jr = 1048637, zr = 727023925, Xr = 3395085689;
990
990
  function Jr(t) {
991
- const e = new D(mt);
991
+ const e = new D(It);
992
992
  return Qr(t, e), e.finish();
993
993
  }
994
994
  function Qr(t, e) {
995
995
  e.writeGuidField(zr, t.ActionId), e.writeStringField(Xr, t.PayloadJson);
996
996
  }
997
- function qr(t, e, r) {
997
+ function Zr(t, e, r) {
998
998
  const n = Jr(t);
999
- return P(jr, n, mt, e, r);
999
+ return P(jr, n, It, e, r);
1000
1000
  }
1001
- const Zr = 467348717, en = 972460562, tn = 1911490601, rn = 2603556958, nn = 3609695522, sn = 4094837378, on = 4257460908;
1001
+ const qr = 467348717, en = 972460562, tn = 1911490601, rn = 2603556958, nn = 3609695522, sn = 4094837378, on = 4257460908;
1002
1002
  function an(t) {
1003
1003
  const e = {};
1004
- return It(e), e;
1004
+ return mt(e), e;
1005
1005
  }
1006
- function It(t) {
1006
+ function mt(t) {
1007
1007
  return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = m.fromBytes(new Uint8Array(16)), t;
1008
1008
  }
1009
1009
  function cn(t, e) {
1010
1010
  const r = e ?? an();
1011
- return It(r), ln(t, r), r;
1011
+ return mt(r), ln(t, r), r;
1012
1012
  }
1013
1013
  function ln(t, e) {
1014
1014
  let r;
1015
1015
  for (; (r = t.next()) !== null; )
1016
1016
  switch (r.fieldId) {
1017
- case Zr: {
1017
+ case qr: {
1018
1018
  if (r.isNull) throw new Error();
1019
1019
  e.EnumerationId = r.asGuid();
1020
1020
  break;
@@ -1051,7 +1051,7 @@ function ln(t, e) {
1051
1051
  }
1052
1052
  }
1053
1053
  }
1054
- const un = 265814330, hn = 1368629611, dn = 2431514951, fn = 2914494629, pn = 3284746250, En = 4101844078;
1054
+ const un = 265814330, hn = 1368629611, dn = 2431514951, fn = 2914494629, En = 3284746250, pn = 4101844078;
1055
1055
  function _t(t) {
1056
1056
  const e = {};
1057
1057
  return Tt(e), e;
@@ -1059,11 +1059,11 @@ function _t(t) {
1059
1059
  function Tt(t) {
1060
1060
  return t.Description = "", t.Codec = ft.Unknown, t.SampleRate = 0, t.Channels = 0, t.BitDepth = 0, t.ShapeSets = void 0, t;
1061
1061
  }
1062
- function mn(t, e) {
1062
+ function In(t, e) {
1063
1063
  const r = e ?? _t();
1064
- return Tt(r), In(t, r), r;
1064
+ return Tt(r), mn(t, r), r;
1065
1065
  }
1066
- function In(t, e) {
1066
+ function mn(t, e) {
1067
1067
  let r;
1068
1068
  for (; (r = t.next()) !== null; )
1069
1069
  switch (r.fieldId) {
@@ -1090,12 +1090,12 @@ function In(t, e) {
1090
1090
  e.BitDepth = r.asInt32();
1091
1091
  break;
1092
1092
  }
1093
- case pn: {
1093
+ case En: {
1094
1094
  if (r.isNull) throw new Error();
1095
1095
  e.Codec = r.asInt32();
1096
1096
  break;
1097
1097
  }
1098
- case En: {
1098
+ case pn: {
1099
1099
  if (r.isNull) throw new Error();
1100
1100
  e.SampleRate = r.asInt32();
1101
1101
  break;
@@ -1149,13 +1149,13 @@ function gn(t) {
1149
1149
  e.push(r.asString());
1150
1150
  return e;
1151
1151
  }
1152
- const Cn = 76337612, bn = 185396121, Rn = 388632637, kn = 417197284, Un = 469070965, Dn = 470595159, Mn = 781727218, On = 834078886, Ln = 1043273762, vn = 1236999138, Fn = 1368629611, Pn = 1715899485, Bn = 1942830531, xn = 1999510636, Gn = 2079864626, Vn = 2142346422, Wn = 2598291686, Hn = 2719718823, $n = 2810953526, Kn = 2840065720, Yn = 2885165957, jn = 3586157513, zn = 3717933110, Xn = 4062655306;
1152
+ const Cn = 76337612, Rn = 185396121, bn = 388632637, kn = 417197284, Un = 469070965, Dn = 470595159, Mn = 781727218, On = 834078886, Ln = 1043273762, vn = 1236999138, Fn = 1368629611, Pn = 1715899485, Bn = 1942830531, Gn = 1999510636, xn = 2079864626, Vn = 2142346422, Wn = 2598291686, Hn = 2719718823, $n = 2810953526, Kn = 2840065720, Yn = 2885165957, jn = 3586157513, zn = 3717933110, Xn = 4062655306;
1153
1153
  function Ne(t) {
1154
1154
  const e = {};
1155
1155
  return wt(e), e;
1156
1156
  }
1157
1157
  function wt(t) {
1158
- return t.ContextType = J.Unknown, t.UserType = q.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = xe.Unknown, t;
1158
+ return t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = X.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
1159
1159
  }
1160
1160
  function ge(t, e) {
1161
1161
  const r = e ?? Ne();
@@ -1170,12 +1170,12 @@ function Jn(t, e) {
1170
1170
  e.DeviceId = r.asString();
1171
1171
  break;
1172
1172
  }
1173
- case bn: {
1173
+ case Rn: {
1174
1174
  if (r.isNull) throw new Error();
1175
1175
  e.InstallId = r.asString();
1176
1176
  break;
1177
1177
  }
1178
- case Rn: {
1178
+ case bn: {
1179
1179
  if (r.isNull) throw new Error();
1180
1180
  e.UserAgent = r.asString();
1181
1181
  break;
@@ -1230,12 +1230,12 @@ function Jn(t, e) {
1230
1230
  e.SdkType = r.asInt32();
1231
1231
  break;
1232
1232
  }
1233
- case xn: {
1233
+ case Gn: {
1234
1234
  if (r.isNull) throw new Error();
1235
1235
  e.SessionId = r.asInt32();
1236
1236
  break;
1237
1237
  }
1238
- case Gn: {
1238
+ case xn: {
1239
1239
  if (r.isNull) throw new Error();
1240
1240
  e.PreciseJoinedAt = r.asUInt64();
1241
1241
  break;
@@ -1296,13 +1296,13 @@ function Qn(t) {
1296
1296
  }
1297
1297
  return e;
1298
1298
  }
1299
- const qn = 746516514, Zn = 877841741, es = 1175184220, ts = 1368629611, rs = 2341021724, ns = 3167053791, ss = 3686066300;
1299
+ const Zn = 746516514, qn = 877841741, es = 1175184220, ts = 1368629611, rs = 2341021724, ns = 3167053791, ss = 3686066300;
1300
1300
  function is(t) {
1301
1301
  const e = {};
1302
1302
  return At(e), e;
1303
1303
  }
1304
1304
  function At(t) {
1305
- return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = T.NONE, t.OpcodeGroupsToServer = T.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
1305
+ return t.Type = k.None, t.Uri = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t;
1306
1306
  }
1307
1307
  function os(t, e) {
1308
1308
  const r = e ?? is();
@@ -1312,12 +1312,12 @@ function as(t, e) {
1312
1312
  let r;
1313
1313
  for (; (r = t.next()) !== null; )
1314
1314
  switch (r.fieldId) {
1315
- case qn: {
1315
+ case Zn: {
1316
1316
  if (r.isNull) throw new Error();
1317
1317
  e.AuthTicket = r.asBinary();
1318
1318
  break;
1319
1319
  }
1320
- case Zn: {
1320
+ case qn: {
1321
1321
  if (r.isNull) throw new Error();
1322
1322
  e.Priority = r.asInt32();
1323
1323
  break;
@@ -1349,7 +1349,7 @@ function as(t, e) {
1349
1349
  }
1350
1350
  }
1351
1351
  }
1352
- const cs = 5, ls = 65537, us = 166277978, hs = 1482635149, ds = 1559330978, fs = 2802434353, ps = 3085883711, Es = 3669484338, ms = 3707543140, Is = 3712281496, _s = 4160646707;
1352
+ const cs = 5, ls = 65537, us = 166277978, hs = 1482635149, ds = 1559330978, fs = 2802434353, Es = 3085883711, ps = 3669484338, Is = 3707543140, ms = 3712281496, _s = 4160646707;
1353
1353
  function Ts(t) {
1354
1354
  const e = {};
1355
1355
  return yt(e), e;
@@ -1389,22 +1389,22 @@ function As(t, e) {
1389
1389
  e.ClientContext = ge(r.asObject());
1390
1390
  break;
1391
1391
  }
1392
- case ps: {
1392
+ case Es: {
1393
1393
  if (r.isNull) throw new Error();
1394
1394
  e.ServerContext = ge(r.asObject());
1395
1395
  break;
1396
1396
  }
1397
- case Es: {
1397
+ case ps: {
1398
1398
  if (r.isNull) throw new Error();
1399
1399
  e.FeatureFlags = gs(r.asDictionary());
1400
1400
  break;
1401
1401
  }
1402
- case ms: {
1402
+ case Is: {
1403
1403
  if (r.isNull) throw new Error();
1404
1404
  e.SpaceId = r.asString();
1405
1405
  break;
1406
1406
  }
1407
- case Is: {
1407
+ case ms: {
1408
1408
  if (r.isNull) throw new Error();
1409
1409
  e.PrimaryUserId = r.asString();
1410
1410
  break;
@@ -1438,12 +1438,12 @@ function gs(t) {
1438
1438
  }
1439
1439
  function Cs(t) {
1440
1440
  const e = {};
1441
- return bs(e), t && Object.assign(e, t), e;
1441
+ return Rs(e), t && Object.assign(e, t), e;
1442
1442
  }
1443
- function bs(t) {
1444
- return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = q.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = T.NONE, t.OpcodeGroupsToServer = T.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = xe.Unknown, t;
1443
+ function Rs(t) {
1444
+ return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
1445
1445
  }
1446
- const Nt = 1, Rs = 1048632, ks = 3748161056, Us = 4289118421;
1446
+ const Nt = 1, bs = 1048632, ks = 3748161056, Us = 4289118421;
1447
1447
  function Ds(t) {
1448
1448
  const e = {};
1449
1449
  return Ms(e), t && Object.assign(e, t), e;
@@ -1460,9 +1460,9 @@ function Ls(t, e) {
1460
1460
  }
1461
1461
  function vs(t, e, r) {
1462
1462
  const n = Os(t);
1463
- return P(Rs, n, Nt, e, r);
1463
+ return P(bs, n, Nt, e, r);
1464
1464
  }
1465
- const Fs = 1, Ps = 1048601, Bs = 112005851, xs = 814454131, Gs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
1465
+ const Fs = 1, Ps = 1048601, Bs = 112005851, Gs = 814454131, xs = 976255570, Vs = 1123310456, Ws = 2885165957, Hs = 3748161056, $s = 4289118421;
1466
1466
  function Ks(t) {
1467
1467
  const e = {};
1468
1468
  return gt(e), e;
@@ -1487,12 +1487,12 @@ function zs(t, e) {
1487
1487
  e.Scopes = Js(r.asArray());
1488
1488
  break;
1489
1489
  }
1490
- case xs: {
1490
+ case Gs: {
1491
1491
  if (r.isNull) throw new Error();
1492
1492
  e.FunctionName = r.asString();
1493
1493
  break;
1494
1494
  }
1495
- case Gs: {
1495
+ case xs: {
1496
1496
  if (r.isNull) throw new Error();
1497
1497
  e.FunctionId = r.asGuid();
1498
1498
  break;
@@ -1537,7 +1537,7 @@ function Qs(t) {
1537
1537
  e.push(cn(r.asObject()));
1538
1538
  return e;
1539
1539
  }
1540
- const qs = 2994044322, Zs = 3167053791;
1540
+ const Zs = 2994044322, qs = 3167053791;
1541
1541
  function ei(t) {
1542
1542
  const e = {};
1543
1543
  return Ct(e), e;
@@ -1553,19 +1553,19 @@ function ri(t, e) {
1553
1553
  let r;
1554
1554
  for (; (r = t.next()) !== null; )
1555
1555
  switch (r.fieldId) {
1556
- case qs: {
1556
+ case Zs: {
1557
1557
  if (r.isNull) throw new Error();
1558
1558
  e.Id = r.asString();
1559
1559
  break;
1560
1560
  }
1561
- case Zs: {
1561
+ case qs: {
1562
1562
  if (r.isNull) throw new Error();
1563
1563
  e.Type = r.asString();
1564
1564
  break;
1565
1565
  }
1566
1566
  }
1567
1567
  }
1568
- const bt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
1568
+ const Rt = 1, ni = 1048631, si = 2205234621, ii = 2838554230, oi = 3748161056, ai = 4194102057, ci = 4289118421;
1569
1569
  function li(t) {
1570
1570
  const e = {};
1571
1571
  return ui(e), t && Object.assign(e, t), e;
@@ -1574,7 +1574,7 @@ function ui(t) {
1574
1574
  return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
1575
1575
  }
1576
1576
  function hi(t) {
1577
- const e = new D(bt);
1577
+ const e = new D(Rt);
1578
1578
  return di(t, e), e.finish();
1579
1579
  }
1580
1580
  function di(t, e) {
@@ -1582,37 +1582,37 @@ function di(t, e) {
1582
1582
  }
1583
1583
  function fi(t, e, r) {
1584
1584
  const n = hi(t);
1585
- return P(ni, n, bt, e, r);
1585
+ return P(ni, n, Rt, e, r);
1586
1586
  }
1587
- const Ge = 1, pi = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Ft = 2603556958, Pt = 2885165957, Bt = 3568439632;
1588
- function Ei(t) {
1587
+ const xe = 1, Ei = 1048600, bt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Ft = 2603556958, Pt = 2885165957, Bt = 3568439632;
1588
+ function pi(t) {
1589
1589
  const e = {};
1590
- return xt(e), e;
1590
+ return Gt(e), e;
1591
1591
  }
1592
- function xt(t) {
1592
+ function Gt(t) {
1593
1593
  return t.FunctionId = m.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
1594
1594
  }
1595
- function mi(t) {
1596
- const e = new D(Ge);
1597
- return Gt(t, e), e.finish();
1595
+ function Ii(t) {
1596
+ const e = new D(xe);
1597
+ return xt(t, e), e.finish();
1598
1598
  }
1599
- function Gt(t, e) {
1600
- e.writeStringField(Rt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Ft, t.IsEnumerable), e.writeArrayField(Pt, b.Object, (r) => {
1599
+ function xt(t, e) {
1600
+ e.writeStringField(bt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Ft, t.IsEnumerable), e.writeArrayField(Pt, R.Object, (r) => {
1601
1601
  for (const n of t.Parameters)
1602
1602
  r.writeObject(wi, (s) => {
1603
1603
  yi(n, s);
1604
1604
  });
1605
1605
  }), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
1606
1606
  }
1607
- function Ii(t, e) {
1608
- const r = e ?? Ei();
1609
- return xt(r), _i(t, r), r;
1607
+ function mi(t, e) {
1608
+ const r = e ?? pi();
1609
+ return Gt(r), _i(t, r), r;
1610
1610
  }
1611
1611
  function _i(t, e) {
1612
1612
  let r;
1613
1613
  for (; (r = t.next()) !== null; )
1614
1614
  switch (r.fieldId) {
1615
- case Rt: {
1615
+ case bt: {
1616
1616
  if (r.isNull) throw new Error();
1617
1617
  e.ResultTypeName = r.asString();
1618
1618
  break;
@@ -1670,8 +1670,8 @@ function _i(t, e) {
1670
1670
  }
1671
1671
  }
1672
1672
  function Ti(t, e, r) {
1673
- const n = mi(t);
1674
- return P(pi, n, Ge, e, r);
1673
+ const n = Ii(t);
1674
+ return P(Ei, n, xe, e, r);
1675
1675
  }
1676
1676
  function Si(t) {
1677
1677
  const e = [];
@@ -1746,8 +1746,8 @@ function gi(t, e) {
1746
1746
  }
1747
1747
  }
1748
1748
  }
1749
- const Qt = 1, Ci = 1048638, bi = 3678477544;
1750
- function Ri(t) {
1749
+ const Qt = 1, Ci = 1048638, Ri = 3678477544;
1750
+ function bi(t) {
1751
1751
  const e = {};
1752
1752
  return ki(e), t && Object.assign(e, t), e;
1753
1753
  }
@@ -1759,10 +1759,10 @@ function Ui(t) {
1759
1759
  return Di(t, e), e.finish();
1760
1760
  }
1761
1761
  function Di(t, e) {
1762
- e.writeArrayField(bi, b.Object, (r) => {
1762
+ e.writeArrayField(Ri, R.Object, (r) => {
1763
1763
  for (const n of t.Functions)
1764
- r.writeObject(Ge, (s) => {
1765
- Gt(n, s);
1764
+ r.writeObject(xe, (s) => {
1765
+ xt(n, s);
1766
1766
  });
1767
1767
  });
1768
1768
  }
@@ -1770,16 +1770,16 @@ function Mi(t, e, r) {
1770
1770
  const n = Ui(t);
1771
1771
  return P(Ci, n, Qt, e, r);
1772
1772
  }
1773
- const qt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Fi = 3403385840, Pi = 3748161056, Bi = 4289118421;
1774
- function xi(t) {
1773
+ const Zt = 1, Oi = 1048602, Li = 349453957, vi = 703025676, Fi = 3403385840, Pi = 3748161056, Bi = 4289118421;
1774
+ function Gi(t) {
1775
1775
  const e = {};
1776
- return Gi(e), t && Object.assign(e, t), e;
1776
+ return xi(e), t && Object.assign(e, t), e;
1777
1777
  }
1778
- function Gi(t) {
1778
+ function xi(t) {
1779
1779
  return t.CallId = m.fromBytes(new Uint8Array(16)), t.InstanceId = m.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
1780
1780
  }
1781
1781
  function Vi(t) {
1782
- const e = new D(qt);
1782
+ const e = new D(Zt);
1783
1783
  return Wi(t, e), e.finish();
1784
1784
  }
1785
1785
  function Wi(t, e) {
@@ -1787,18 +1787,18 @@ function Wi(t, e) {
1787
1787
  }
1788
1788
  function Hi(t, e, r) {
1789
1789
  const n = Vi(t);
1790
- return P(Oi, n, qt, e, r);
1790
+ return P(Oi, n, Zt, e, r);
1791
1791
  }
1792
- const Zt = 1, $i = 65549;
1792
+ const qt = 1, $i = 65549;
1793
1793
  function Xe(t) {
1794
1794
  return {};
1795
1795
  }
1796
1796
  function Ki(t) {
1797
- return new D(Zt).finish();
1797
+ return new D(qt).finish();
1798
1798
  }
1799
1799
  function Je(t, e, r) {
1800
1800
  const n = Ki();
1801
- return P($i, n, Zt, e, r);
1801
+ return P($i, n, qt, e, r);
1802
1802
  }
1803
1803
  const Yi = 3167053791, ji = 3342364356, zi = 3612929027;
1804
1804
  function er(t) {
@@ -1806,7 +1806,7 @@ function er(t) {
1806
1806
  return tr(e), e;
1807
1807
  }
1808
1808
  function tr(t) {
1809
- return t.Category = "", t.Type = pt.Face, t.FaceBlendshapes = [], t;
1809
+ return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
1810
1810
  }
1811
1811
  function Xi(t, e) {
1812
1812
  const r = e ?? er();
@@ -1840,7 +1840,7 @@ function Qi(t) {
1840
1840
  e.push(r.asString());
1841
1841
  return e;
1842
1842
  }
1843
- const qi = 3612929027;
1843
+ const Zi = 3612929027;
1844
1844
  function rr(t) {
1845
1845
  const e = {};
1846
1846
  return nr(e), e;
@@ -1848,7 +1848,7 @@ function rr(t) {
1848
1848
  function nr(t) {
1849
1849
  return t.Category = "", t;
1850
1850
  }
1851
- function Zi(t, e) {
1851
+ function qi(t, e) {
1852
1852
  const r = e ?? rr();
1853
1853
  return nr(r), eo(t, r), r;
1854
1854
  }
@@ -1856,7 +1856,7 @@ function eo(t, e) {
1856
1856
  let r;
1857
1857
  for (; (r = t.next()) !== null; )
1858
1858
  switch (r.fieldId) {
1859
- case qi: {
1859
+ case Zi: {
1860
1860
  if (r.isNull) throw new Error();
1861
1861
  e.Category = r.asString();
1862
1862
  break;
@@ -1869,7 +1869,7 @@ function sr(t) {
1869
1869
  return ir(e), e;
1870
1870
  }
1871
1871
  function ir(t) {
1872
- return t.Description = "", t.Codec = Et.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
1872
+ return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
1873
1873
  }
1874
1874
  function co(t, e) {
1875
1875
  const r = e ?? sr();
@@ -1916,7 +1916,7 @@ function lo(t, e) {
1916
1916
  }
1917
1917
  }
1918
1918
  }
1919
- const uo = 3, ho = 65539, fo = 693643444, po = 1144553441, Eo = 1497620243, mo = 1559330978, Io = 1999510636, _o = 2277643855, To = 2469008121, So = 2589786682, wo = 3219210453, Ao = 3678477544, yo = 3696445035, No = 3707543140, go = 3712281496, Co = 3823842552, bo = 3895362455, Ro = 3897397815, ko = 4225107827;
1919
+ const uo = 3, ho = 65539, fo = 693643444, Eo = 1144553441, po = 1497620243, Io = 1559330978, mo = 1999510636, _o = 2277643855, To = 2469008121, So = 2589786682, wo = 3219210453, Ao = 3678477544, yo = 3696445035, No = 3707543140, go = 3712281496, Co = 3823842552, Ro = 3895362455, bo = 3897397815, ko = 4225107827;
1920
1920
  function Uo(t) {
1921
1921
  const e = {};
1922
1922
  return or(e), e;
@@ -1941,22 +1941,22 @@ function Oo(t, e) {
1941
1941
  e.FirstUserId = r.asString();
1942
1942
  break;
1943
1943
  }
1944
- case po: {
1944
+ case Eo: {
1945
1945
  if (r.isNull) throw new Error();
1946
1946
  e.Clients = vo(r.asDictionary());
1947
1947
  break;
1948
1948
  }
1949
- case Eo: {
1949
+ case po: {
1950
1950
  if (r.isNull) throw new Error();
1951
1951
  e.TrackingStreams = Fo(r.asDictionary());
1952
1952
  break;
1953
1953
  }
1954
- case mo: {
1954
+ case Io: {
1955
1955
  if (r.isNull) throw new Error();
1956
1956
  e.ChannelId = r.asString();
1957
1957
  break;
1958
1958
  }
1959
- case Io: {
1959
+ case mo: {
1960
1960
  if (r.isNull) throw new Error();
1961
1961
  e.SessionId = r.asString();
1962
1962
  break;
@@ -2006,14 +2006,14 @@ function Oo(t, e) {
2006
2006
  e.ChannelInstanceId = r.asString();
2007
2007
  break;
2008
2008
  }
2009
- case bo: {
2009
+ case Ro: {
2010
2010
  if (r.isNull) throw new Error();
2011
- e.AudioStreams = xo(r.asDictionary());
2011
+ e.AudioStreams = Go(r.asDictionary());
2012
2012
  break;
2013
2013
  }
2014
- case Ro: {
2014
+ case bo: {
2015
2015
  if (r.isNull) throw new Error();
2016
- e.VideoStreams = Go(r.asDictionary());
2016
+ e.VideoStreams = xo(r.asDictionary());
2017
2017
  break;
2018
2018
  }
2019
2019
  case ko: {
@@ -2041,7 +2041,7 @@ function Fo(t) {
2041
2041
  let r;
2042
2042
  for (; (r = t.next()) !== null; ) {
2043
2043
  const n = r.key.asString();
2044
- e[n] = pa(r.value.asObject());
2044
+ e[n] = Ea(r.value.asObject());
2045
2045
  }
2046
2046
  return e;
2047
2047
  }
@@ -2063,7 +2063,7 @@ function Bo(t) {
2063
2063
  }
2064
2064
  return e;
2065
2065
  }
2066
- function xo(t) {
2066
+ function Go(t) {
2067
2067
  const e = /* @__PURE__ */ Object.create(null);
2068
2068
  let r;
2069
2069
  for (; (r = t.next()) !== null; ) {
@@ -2072,7 +2072,7 @@ function xo(t) {
2072
2072
  }
2073
2073
  return e;
2074
2074
  }
2075
- function Go(t) {
2075
+ function xo(t) {
2076
2076
  const e = /* @__PURE__ */ Object.create(null);
2077
2077
  let r;
2078
2078
  for (; (r = t.next()) !== null; ) {
@@ -2085,7 +2085,7 @@ function Vo(t) {
2085
2085
  const e = [];
2086
2086
  let r;
2087
2087
  for (; (r = t.next()) !== null; )
2088
- e.push(Ii(r.asObject()));
2088
+ e.push(mi(r.asObject()));
2089
2089
  return e;
2090
2090
  }
2091
2091
  const Wo = 161083277, Ho = 325678206, $o = 3469892363, Ko = 3645544153;
@@ -2121,13 +2121,13 @@ function zo(t, e) {
2121
2121
  }
2122
2122
  case Ko: {
2123
2123
  if (r.isNull) throw new Error();
2124
- e.Info = Zi(r.asObject());
2124
+ e.Info = qi(r.asObject());
2125
2125
  break;
2126
2126
  }
2127
2127
  }
2128
2128
  }
2129
- const Xo = 161083277, Jo = 325678206, Qo = 3469892363, qo = 3645544153;
2130
- function Zo(t) {
2129
+ const Xo = 161083277, Jo = 325678206, Qo = 3469892363, Zo = 3645544153;
2130
+ function qo(t) {
2131
2131
  const e = {};
2132
2132
  return cr(e), e;
2133
2133
  }
@@ -2135,7 +2135,7 @@ function cr(t) {
2135
2135
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
2136
2136
  }
2137
2137
  function ea(t, e) {
2138
- const r = e ?? Zo();
2138
+ const r = e ?? qo();
2139
2139
  return cr(r), ta(t, r), r;
2140
2140
  }
2141
2141
  function ta(t, e) {
@@ -2157,9 +2157,9 @@ function ta(t, e) {
2157
2157
  e.TrackId = r.asInt32();
2158
2158
  break;
2159
2159
  }
2160
- case qo: {
2160
+ case Zo: {
2161
2161
  if (r.isNull) throw new Error();
2162
- e.Info = mn(r.asObject());
2162
+ e.Info = In(r.asObject());
2163
2163
  break;
2164
2164
  }
2165
2165
  }
@@ -2210,11 +2210,11 @@ function fa(t) {
2210
2210
  function ur(t) {
2211
2211
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
2212
2212
  }
2213
- function pa(t, e) {
2213
+ function Ea(t, e) {
2214
2214
  const r = e ?? fa();
2215
- return ur(r), Ea(t, r), r;
2215
+ return ur(r), pa(t, r), r;
2216
2216
  }
2217
- function Ea(t, e) {
2217
+ function pa(t, e) {
2218
2218
  let r;
2219
2219
  for (; (r = t.next()) !== null; )
2220
2220
  switch (r.fieldId) {
@@ -2240,27 +2240,27 @@ function Ea(t, e) {
2240
2240
  }
2241
2241
  }
2242
2242
  }
2243
- const hr = 1, ma = 131074;
2243
+ const hr = 1, Ia = 131074;
2244
2244
  function dr(t) {
2245
2245
  return {};
2246
2246
  }
2247
- function Ia(t) {
2247
+ function ma(t) {
2248
2248
  return new D(hr).finish();
2249
2249
  }
2250
2250
  function fr(t, e, r) {
2251
- const n = Ia();
2252
- return P(ma, n, hr, e, r);
2251
+ const n = ma();
2252
+ return P(Ia, n, hr, e, r);
2253
2253
  }
2254
- const pr = 1, _a = 8388612;
2254
+ const Er = 1, _a = 8388612;
2255
2255
  function Ta(t) {
2256
2256
  return {};
2257
2257
  }
2258
2258
  function Sa(t) {
2259
- return new D(pr).finish();
2259
+ return new D(Er).finish();
2260
2260
  }
2261
2261
  function wa(t, e, r) {
2262
2262
  const n = Sa();
2263
- return P(_a, n, pr, e, r);
2263
+ return P(_a, n, Er, e, r);
2264
2264
  }
2265
2265
  function Aa(t) {
2266
2266
  return new Worker(
@@ -2301,22 +2301,22 @@ class Na extends y {
2301
2301
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
2302
2302
  }
2303
2303
  }
2304
- class Ol extends y {
2304
+ class pl extends y {
2305
2305
  constructor(e) {
2306
2306
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2307
2307
  }
2308
2308
  }
2309
- class Ll extends y {
2309
+ class Il extends y {
2310
2310
  constructor(e) {
2311
2311
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
2312
2312
  }
2313
2313
  }
2314
- class vl extends y {
2314
+ class ml extends y {
2315
2315
  constructor() {
2316
2316
  super("No channels available in this space"), this.name = "NoChannelsError";
2317
2317
  }
2318
2318
  }
2319
- function Er(t, e) {
2319
+ function pr(t, e) {
2320
2320
  return new Promise((r, n) => {
2321
2321
  const s = () => {
2322
2322
  clearTimeout(i), n(new Error("Aborted"));
@@ -2330,18 +2330,18 @@ function Er(t, e) {
2330
2330
  e?.addEventListener("abort", s, { once: !0 });
2331
2331
  });
2332
2332
  }
2333
- var mr = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(mr || {});
2333
+ var Ir = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ir || {});
2334
2334
  let He = 1, fe = null;
2335
- function Fl(t) {
2335
+ function _l(t) {
2336
2336
  He = t;
2337
2337
  }
2338
- function Pl() {
2338
+ function Tl() {
2339
2339
  return He;
2340
2340
  }
2341
2341
  function ga(t) {
2342
2342
  fe = t;
2343
2343
  }
2344
- function Bl() {
2344
+ function Sl() {
2345
2345
  return fe;
2346
2346
  }
2347
2347
  const Ca = {
@@ -2351,7 +2351,7 @@ const Ca = {
2351
2351
  3: "ERROR",
2352
2352
  4: "NONE"
2353
2353
  };
2354
- function ba(t, e) {
2354
+ function Ra(t, e) {
2355
2355
  return `[${t}] ${e}`;
2356
2356
  }
2357
2357
  function ie(t, e, r, n) {
@@ -2364,7 +2364,7 @@ function ie(t, e, r, n) {
2364
2364
  message: r,
2365
2365
  args: n
2366
2366
  }), He <= t) {
2367
- const o = ba(e, r);
2367
+ const o = Ra(e, r);
2368
2368
  switch (t) {
2369
2369
  case 0:
2370
2370
  console.debug(o, ...n);
@@ -2397,7 +2397,7 @@ function L(t) {
2397
2397
  }
2398
2398
  };
2399
2399
  }
2400
- const oe = L("WebSocketTransport"), Ra = 1e4;
2400
+ const oe = L("WebSocketTransport"), ba = 1e4;
2401
2401
  class ka {
2402
2402
  ws = null;
2403
2403
  keepaliveTimeout = null;
@@ -2425,7 +2425,7 @@ class ka {
2425
2425
  clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
2426
2426
  }, c = setTimeout(() => {
2427
2427
  o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
2428
- }, Ra);
2428
+ }, ba);
2429
2429
  this.ws.onopen = () => {
2430
2430
  i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
2431
2431
  }, this.ws.onerror = () => {
@@ -2435,8 +2435,8 @@ class ka {
2435
2435
  o = !0, a(), s(new W("WebSocket connection closed before opening"));
2436
2436
  return;
2437
2437
  }
2438
- const p = u.wasClean && (u.code === 1e3 || u.code === 1001), d = u.code === 1e3 || u.code === 1001, h = u.reason || `code=${u.code}`;
2439
- this.callbacks.onClose(h, p, d);
2438
+ const f = u.wasClean && (u.code === 1e3 || u.code === 1001), d = u.code === 1e3 || u.code === 1001, h = u.reason || `code=${u.code}`;
2439
+ this.callbacks.onClose(h, f, d);
2440
2440
  }, this.ws.onmessage = (u) => {
2441
2441
  this.handleProtocolMessage(new Uint8Array(u.data));
2442
2442
  };
@@ -2456,7 +2456,7 @@ class ka {
2456
2456
  }
2457
2457
  handleProtocolMessage(e) {
2458
2458
  try {
2459
- if (ne(e).opcode === T.KEEPALIVE_REQUEST) {
2459
+ if (ne(e).opcode === S.KEEPALIVE_REQUEST) {
2460
2460
  this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
2461
2461
  return;
2462
2462
  }
@@ -2475,7 +2475,7 @@ class ka {
2475
2475
  }
2476
2476
  }
2477
2477
  const B = L("WebTransportTransport"), Qe = 4, Ua = 65536;
2478
- function Ir() {
2478
+ function mr() {
2479
2479
  return typeof WebTransport < "u";
2480
2480
  }
2481
2481
  class Da {
@@ -2504,7 +2504,7 @@ class Da {
2504
2504
  return this.transport !== null && this.writer !== null;
2505
2505
  }
2506
2506
  async connect(e, r) {
2507
- if (!Ir())
2507
+ if (!mr())
2508
2508
  throw new W("WebTransport is not supported in this browser");
2509
2509
  try {
2510
2510
  this.transport = new WebTransport(e), await this.transport.ready, B.debug(`Connected to WebTransport entrypoint: ${e}`), this.transport.closed.then(() => {
@@ -2598,7 +2598,7 @@ class Da {
2598
2598
  */
2599
2599
  handleProtocolMessage(e) {
2600
2600
  try {
2601
- if (ne(e).opcode === T.KEEPALIVE_REQUEST) {
2601
+ if (ne(e).opcode === S.KEEPALIVE_REQUEST) {
2602
2602
  this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
2603
2603
  return;
2604
2604
  }
@@ -2722,7 +2722,7 @@ class Ma {
2722
2722
  break;
2723
2723
  case k.WebTransport:
2724
2724
  case k.WebTransportProxy:
2725
- if (!Ir())
2725
+ if (!mr())
2726
2726
  throw new Error("WebTransport is not supported in this browser");
2727
2727
  this.transport = new Da(r);
2728
2728
  break;
@@ -2737,7 +2737,7 @@ class Ma {
2737
2737
  handleProtocolMessage(e) {
2738
2738
  try {
2739
2739
  const r = e;
2740
- if (ue(r) === T.CORE_ON_SERVER_STOPPING) {
2740
+ if (ue(r) === S.CORE_ON_SERVER_STOPPING) {
2741
2741
  ee.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
2742
2742
  return;
2743
2743
  }
@@ -2765,7 +2765,7 @@ class Ma {
2765
2765
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2766
2766
  }
2767
2767
  }
2768
- const x = L("ChannelManager");
2768
+ const G = L("ChannelManager");
2769
2769
  class Oa {
2770
2770
  channels = /* @__PURE__ */ new Map();
2771
2771
  // keyed by opcode group
@@ -2816,7 +2816,7 @@ class Oa {
2816
2816
  s.send(e);
2817
2817
  return;
2818
2818
  }
2819
- x.warn("No channel found for message");
2819
+ G.warn("No channel found for message");
2820
2820
  }
2821
2821
  /**
2822
2822
  * Send a protocol message to all channels (for broadcast messages).
@@ -2847,10 +2847,10 @@ class Oa {
2847
2847
  await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, this.reconnectAttempts = 0, this.setState("connected");
2848
2848
  return;
2849
2849
  } catch (o) {
2850
- x.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2850
+ G.warn(`Failed to connect using ${k[s]}: ${o}`), this.disconnectAll();
2851
2851
  }
2852
2852
  }
2853
- throw x.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
2853
+ throw G.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
2854
2854
  }
2855
2855
  /**
2856
2856
  * Connect all channels for a given endpoint type in parallel.
@@ -2910,10 +2910,10 @@ class Oa {
2910
2910
  handleChannelClose(e, r, n, s) {
2911
2911
  if (!(this.state === "idle" || this.state === "stopped" || this.state === "offline")) {
2912
2912
  if (n || s) {
2913
- x.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2913
+ G.debug("Channel closed by server"), this.shouldReconnect = !1, this.disconnectAll(), this.setState("stopped");
2914
2914
  return;
2915
2915
  }
2916
- this.state === "connected" && (x.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
2916
+ this.state === "connected" && (G.error("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
2917
2917
  }
2918
2918
  }
2919
2919
  /**
@@ -2923,16 +2923,16 @@ class Oa {
2923
2923
  if (!this.shouldReconnect)
2924
2924
  return;
2925
2925
  if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
2926
- x.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new ya(this.config.maxReconnectAttempts));
2926
+ G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new ya(this.config.maxReconnectAttempts));
2927
2927
  return;
2928
2928
  }
2929
2929
  this.setState("reconnecting"), this.reconnectAttempts++;
2930
2930
  const e = this.config.reconnectBackoffMs * Math.pow(2, this.reconnectAttempts - 1);
2931
- if (x.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await Er(e, this.abortController?.signal), !!this.shouldReconnect)
2931
+ if (G.info(`Reconnecting in ${e}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await pr(e, this.abortController?.signal), !!this.shouldReconnect)
2932
2932
  try {
2933
2933
  await this.connectInternal(!0);
2934
2934
  } catch (r) {
2935
- x.error("Reconnect failed:", r), await this.attemptReconnect();
2935
+ G.error("Reconnect failed:", r), await this.attemptReconnect();
2936
2936
  }
2937
2937
  }
2938
2938
  /**
@@ -2950,7 +2950,7 @@ class Oa {
2950
2950
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
2951
2951
  }
2952
2952
  }
2953
- const La = 5e3, va = 3e4, qe = 35e3, Ze = 500, et = 6, _r = 6e4, Ce = "ikon_device_id";
2953
+ const La = 5e3, va = 3e4, Ze = 35e3, qe = 500, et = 6, _r = 6e4, Ce = "ikon_device_id";
2954
2954
  function $e() {
2955
2955
  if (typeof window > "u" || typeof localStorage > "u")
2956
2956
  return crypto.randomUUID();
@@ -2961,14 +2961,14 @@ function $e() {
2961
2961
  return crypto.randomUUID();
2962
2962
  }
2963
2963
  }
2964
- function xl() {
2964
+ function wl() {
2965
2965
  if (!(typeof localStorage > "u"))
2966
2966
  try {
2967
2967
  localStorage.removeItem(Ce);
2968
2968
  } catch {
2969
2969
  }
2970
2970
  }
2971
- function Gl(t) {
2971
+ function Al(t) {
2972
2972
  try {
2973
2973
  const e = t.split(".");
2974
2974
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -2976,23 +2976,23 @@ function Gl(t) {
2976
2976
  return null;
2977
2977
  }
2978
2978
  }
2979
- const pe = {}, be = "https://api.prod.ikon.live", Ee = "https://api.dev.ikon.live", tt = "https://auth.ikonai.com", rt = "https://auth.dev.ikonai.com", Vl = "https://auth.ikonai.com";
2979
+ const Ee = {}, Re = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", tt = "https://auth.ikonai.com", rt = "https://auth.dev.ikonai.com", yl = "https://auth.ikonai.com";
2980
2980
  function Tr(t) {
2981
- return t === "development" ? Ee : be;
2981
+ return t === "development" ? pe : Re;
2982
2982
  }
2983
- function Wl() {
2984
- const t = typeof import.meta < "u" ? pe?.VITE_IKON_BACKEND_URL : void 0;
2985
- return t || (typeof window > "u" ? be : !Ke() || window.location.hostname.includes(".dev.") ? Ee : be);
2983
+ function Nl() {
2984
+ const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
2985
+ return t || (typeof window > "u" ? Re : !Ke() || window.location.hostname.includes(".dev.") ? pe : Re);
2986
2986
  }
2987
- function Hl() {
2988
- const t = typeof import.meta < "u" ? pe?.VITE_IKON_BACKEND_TYPE : void 0;
2987
+ function gl() {
2988
+ const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
2989
2989
  if (t === "development" || t === "production")
2990
2990
  return t;
2991
- const e = typeof import.meta < "u" ? pe?.VITE_IKON_BACKEND_URL : void 0;
2991
+ const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
2992
2992
  return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ke() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
2993
2993
  }
2994
- function $l() {
2995
- const t = typeof import.meta < "u" ? pe?.VITE_IKON_AUTH_URL : void 0;
2994
+ function Cl() {
2995
+ const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
2996
2996
  return t || (typeof window > "u" ? tt : !Ke() || window.location.hostname.includes(".dev.") ? rt : tt);
2997
2997
  }
2998
2998
  function Sr() {
@@ -3004,7 +3004,7 @@ function Sr() {
3004
3004
  return e;
3005
3005
  }
3006
3006
  const Fa = ["ikon_token", "ikon_provider", "error"];
3007
- function Kl() {
3007
+ function Rl() {
3008
3008
  if (typeof window > "u")
3009
3009
  return { parameters: {} };
3010
3010
  const t = window.location.pathname;
@@ -3031,10 +3031,10 @@ function Ke() {
3031
3031
  }
3032
3032
  return !0;
3033
3033
  }
3034
- const me = L("Authenticator"), j = T.GROUP_CORE | T.GROUP_KEEPALIVE | T.GROUP_EVENTS | T.GROUP_ACTIONS | T.GROUP_UI | T.GROUP_AUDIO | T.GROUP_VIDEO, Pa = 1e3, Ba = 5e3;
3035
- async function xa(t) {
3034
+ const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO, Pa = 1e3, Ba = 5e3;
3035
+ async function Ga(t) {
3036
3036
  try {
3037
- const e = await fetch(`${Ee}/users/me`, {
3037
+ const e = await fetch(`${pe}/users/me`, {
3038
3038
  credentials: "include",
3039
3039
  signal: t
3040
3040
  });
@@ -3068,7 +3068,7 @@ async function Ar(t, e, r, n, s, i, o) {
3068
3068
  }
3069
3069
  return await u.json();
3070
3070
  }
3071
- async function Ga(t, e, r, n) {
3071
+ async function xa(t, e, r, n) {
3072
3072
  const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
3073
3073
  if (!i.ok) {
3074
3074
  const o = await i.text().catch(() => "Unknown error");
@@ -3084,11 +3084,11 @@ async function yr(t, e, r, n, s) {
3084
3084
  throw new y("Connection aborted");
3085
3085
  if (Date.now() - i >= r)
3086
3086
  throw new Na(r);
3087
- const c = await Ga(t, e, n, s), u = c.state?.toLowerCase();
3087
+ const c = await xa(t, e, n, s), u = c.state?.toLowerCase();
3088
3088
  if (u === "running")
3089
3089
  return c;
3090
3090
  if (u === "provisioning") {
3091
- await Er(o, s), o = Math.min(o * 1.5, Ba);
3091
+ await pr(o, s), o = Math.min(o * 1.5, Ba);
3092
3092
  continue;
3093
3093
  }
3094
3094
  throw new y(`Unexpected channel state: ${c.state}`);
@@ -3108,7 +3108,7 @@ function Va(t, e) {
3108
3108
  ServerSessionId: "",
3109
3109
  // Server will fill this in
3110
3110
  ContextType: J.Browser,
3111
- UserType: q.Human,
3111
+ UserType: Z.Human,
3112
3112
  PayloadType: Q.Teleport,
3113
3113
  IsInternal: !1,
3114
3114
  Description: t.description ?? "Ikon SDK TypeScript",
@@ -3160,10 +3160,10 @@ function Wa(t) {
3160
3160
  }
3161
3161
  async function Ha(t, e) {
3162
3162
  const r = `https://${t.host}:${t.httpsPort}`;
3163
- me.debug(`Authenticating with local server: ${r}`);
3163
+ Ie.debug(`Authenticating with local server: ${r}`);
3164
3164
  const s = { ...Sr(), ...t.parameters };
3165
3165
  let i = t.userId;
3166
- i || (i = await xa(e), i || (i = "local", me.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3166
+ i || (i = await Ga(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
3167
3167
  const o = Va({ ...t, parameters: s }, i), a = Wa(o), c = await fetch(`${r}/connect-token`, {
3168
3168
  method: "POST",
3169
3169
  headers: {
@@ -3176,17 +3176,17 @@ async function Ha(t, e) {
3176
3176
  const h = await c.text().catch(() => "Unknown error");
3177
3177
  throw new y(`Failed to get connect token: ${c.status} ${h}`);
3178
3178
  }
3179
- const p = (await c.json()).token;
3180
- if (!p)
3179
+ const f = (await c.json()).token;
3180
+ if (!f)
3181
3181
  throw new y("Server did not return a token");
3182
- const d = `${r}/connect?token=${encodeURIComponent(p)}`;
3182
+ const d = `${r}/connect?token=${encodeURIComponent(f)}`;
3183
3183
  return Ye(d, e);
3184
3184
  }
3185
3185
  async function $a(t, e) {
3186
3186
  if (t.sessionId && t.channelKey)
3187
3187
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3188
3188
  const r = Tr(t.backendType);
3189
- me.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3189
+ Ie.debug(`Authenticating with cloud server: ${r}, space ID: ${t.spaceId}`);
3190
3190
  const n = await fetch(`${r}/auth/api-key`, {
3191
3191
  method: "POST",
3192
3192
  headers: {
@@ -3220,7 +3220,7 @@ async function $a(t, e) {
3220
3220
  const c = {
3221
3221
  code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e)).code,
3222
3222
  contextType: J.Plugin,
3223
- userType: t.userType ?? q.Human,
3223
+ userType: t.userType ?? Z.Human,
3224
3224
  clientType: t.clientType ?? X.DesktopWeb,
3225
3225
  payloadType: Q.Teleport,
3226
3226
  description: t.description ?? "Ikon SDK TypeScript",
@@ -3236,17 +3236,17 @@ async function $a(t, e) {
3236
3236
  launchParams: t.parameters,
3237
3237
  hash: t.sessionId,
3238
3238
  waitForRunning: !0
3239
- }, u = t.provisioningTimeoutMs ?? _r, p = await yr(r, c, u, i, e);
3240
- if (!p.configuration?.url)
3239
+ }, u = t.provisioningTimeoutMs ?? _r, f = await yr(r, c, u, i, e);
3240
+ if (!f.configuration?.url)
3241
3241
  throw new y("Backend did not return a connect URL");
3242
- const d = p.configuration.url;
3242
+ const d = f.configuration.url;
3243
3243
  return Ye(d, e);
3244
3244
  }
3245
3245
  async function Ka(t, e) {
3246
3246
  if (t.sessionId && t.channelKey)
3247
3247
  throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
3248
3248
  const r = Tr(t.backendType), n = t.token;
3249
- me.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3249
+ Ie.debug(`Authenticating with session token to: ${r}, space ID: ${t.spaceId}`);
3250
3250
  const s = await fetch(`${r}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
3251
3251
  method: "GET",
3252
3252
  headers: {
@@ -3255,13 +3255,13 @@ async function Ka(t, e) {
3255
3255
  signal: e
3256
3256
  });
3257
3257
  if (!s.ok) {
3258
- const p = await s.text().catch(() => "Unknown error");
3259
- throw new y(`Failed to get or create profile: ${s.status} ${p}`);
3258
+ const f = await s.text().catch(() => "Unknown error");
3259
+ throw new y(`Failed to get or create profile: ${s.status} ${f}`);
3260
3260
  }
3261
3261
  const o = {
3262
3262
  code: (await Ar(r, t.spaceId, t.channelKey, t.parameters, t.sessionId, n, e)).code,
3263
3263
  contextType: J.Browser,
3264
- userType: q.Human,
3264
+ userType: Z.Human,
3265
3265
  clientType: X.DesktopWeb,
3266
3266
  payloadType: Q.Teleport,
3267
3267
  description: t.description ?? "Ikon SDK TypeScript",
@@ -3283,7 +3283,7 @@ async function Ka(t, e) {
3283
3283
  const u = c.configuration.url;
3284
3284
  return Ye(u, e);
3285
3285
  }
3286
- const Nr = "ikon.theme", Re = "ikon.theme-user", Ya = "ikon.theme-change";
3286
+ const Nr = "ikon.theme", be = "ikon.theme-user", Ya = "ikon.theme-change";
3287
3287
  function gr(t) {
3288
3288
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3289
3289
  }
@@ -3295,7 +3295,7 @@ const ja = {
3295
3295
  function za() {
3296
3296
  if (typeof window > "u" || !window.localStorage)
3297
3297
  return null;
3298
- const t = window.localStorage.getItem(Re) ?? window.localStorage.getItem(Nr) ?? "light";
3298
+ const t = window.localStorage.getItem(be) ?? window.localStorage.getItem(Nr) ?? "light";
3299
3299
  return gr(t), t;
3300
3300
  }
3301
3301
  const Xa = {
@@ -3314,7 +3314,7 @@ function Ja(t, e) {
3314
3314
  if (!r)
3315
3315
  return !1;
3316
3316
  const n = e === void 0 ? !0 : !!e, s = window.localStorage;
3317
- n ? s.setItem(Re, r) : s.removeItem(Re), s.setItem(Nr, r);
3317
+ n ? s.setItem(be, r) : s.removeItem(be), s.setItem(Nr, r);
3318
3318
  try {
3319
3319
  window.dispatchEvent(new CustomEvent(Ya, { detail: { mode: r } }));
3320
3320
  } catch {
@@ -3322,125 +3322,34 @@ function Ja(t, e) {
3322
3322
  return gr(r), !0;
3323
3323
  }
3324
3324
  const Qa = {
3325
- name: "ikon.client.getLocation",
3326
- description: "Retrieve the current geolocation coordinates from the browser",
3327
- returnType: {
3328
- kind: "dictionary",
3329
- keyType: "string",
3330
- value: { kind: "number" },
3331
- nullable: !0
3332
- }
3333
- };
3334
- async function qa() {
3335
- if (typeof navigator > "u" || !navigator.geolocation)
3336
- return null;
3337
- try {
3338
- const t = await new Promise((e, r) => {
3339
- navigator.geolocation.getCurrentPosition(e, r, {
3340
- enableHighAccuracy: !0,
3341
- timeout: 1e4
3342
- });
3343
- });
3344
- return {
3345
- latitude: t.coords.latitude,
3346
- longitude: t.coords.longitude,
3347
- accuracy: t.coords.accuracy
3348
- };
3349
- } catch {
3350
- return null;
3351
- }
3352
- }
3353
- const Za = {
3354
- name: "ikon.client.share",
3355
- description: "Open the Web Share dialog when supported",
3356
- returnType: { kind: "boolean" },
3357
- parameters: [
3358
- { name: "title", type: { kind: "string", nullable: !0 }, description: "Share title" },
3359
- { name: "text", type: { kind: "string", nullable: !0 }, description: "Share text" },
3360
- { name: "url", type: { kind: "string", nullable: !0 }, description: "Share URL" }
3361
- ]
3362
- };
3363
- async function ec(t, e, r) {
3364
- if (typeof navigator > "u" || typeof navigator.share != "function")
3365
- return !1;
3366
- const n = typeof t == "string" ? t.trim() : "", s = typeof e == "string" ? e.trim() : "", i = typeof r == "string" ? r.trim() : "", o = {};
3367
- if (n && (o.title = n), s && (o.text = s), i && (o.url = i), !o.title && !o.text && !o.url)
3368
- return !1;
3369
- try {
3370
- return await navigator.share(o), !0;
3371
- } catch {
3372
- return !1;
3373
- }
3374
- }
3375
- const tc = {
3376
- name: "ikon.client.pickContacts",
3377
- description: "Launch the native contact picker when available",
3378
- returnType: { kind: "string", nullable: !0 },
3379
- parameters: [{ name: "multiple", type: { kind: "boolean", nullable: !0 }, description: "Allow multiple contacts" }]
3380
- };
3381
- async function rc(t) {
3382
- if (typeof navigator > "u")
3383
- return null;
3384
- const e = navigator, r = e.contacts?.select;
3385
- if (!r)
3386
- return null;
3387
- try {
3388
- const n = await r.call(e.contacts, ["name", "email", "tel"], {
3389
- multiple: !!t
3390
- }), s = (o) => Array.isArray(o) ? o.filter((a) => typeof a == "string" && a.length > 0) : [], i = n.map((o) => ({
3391
- names: s(o.name),
3392
- emails: s(o.email),
3393
- phones: s(o.tel)
3394
- }));
3395
- return JSON.stringify(i);
3396
- } catch {
3397
- return null;
3398
- }
3399
- }
3400
- const nc = {
3401
3325
  name: "ikon.client.getLanguage",
3402
3326
  description: "Get the browser language preference",
3403
3327
  returnType: { kind: "string" }
3404
3328
  };
3405
- function sc() {
3329
+ function Za() {
3406
3330
  return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
3407
3331
  }
3408
- const ic = {
3332
+ const qa = {
3409
3333
  name: "ikon.client.getTimezone",
3410
3334
  description: "Get the browser timezone (IANA format)",
3411
3335
  returnType: { kind: "string" }
3412
3336
  };
3413
- function oc() {
3337
+ function ec() {
3414
3338
  try {
3415
3339
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
3416
3340
  } catch {
3417
3341
  return "UTC";
3418
3342
  }
3419
3343
  }
3420
- const ac = {
3421
- name: "ikon.client.copyToClipboard",
3422
- description: "Copy text to clipboard",
3423
- returnType: { kind: "boolean" },
3424
- parameters: [{ name: "text", type: { kind: "string" }, description: "Text to copy" }]
3425
- };
3426
- async function cc(t) {
3427
- if (typeof navigator > "u" || !navigator.clipboard || typeof t != "string")
3428
- return !1;
3429
- try {
3430
- return await navigator.clipboard.writeText(t), !0;
3431
- } catch {
3432
- return !1;
3433
- }
3434
- }
3435
- const lc = {
3344
+ const tc = {
3436
3345
  name: "ikon.client.getUrl",
3437
3346
  description: "Get the current browser URL path and query string",
3438
3347
  returnType: { kind: "string", nullable: !0 }
3439
3348
  };
3440
- function uc() {
3349
+ function rc() {
3441
3350
  return typeof window > "u" ? null : window.location.pathname + window.location.search;
3442
3351
  }
3443
- const hc = {
3352
+ const nc = {
3444
3353
  name: "ikon.client.setUrl",
3445
3354
  description: "Update the browser URL without triggering a page reload",
3446
3355
  returnType: { kind: "boolean" },
@@ -3449,7 +3358,7 @@ const hc = {
3449
3358
  { name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
3450
3359
  ]
3451
3360
  };
3452
- function dc(t, e) {
3361
+ function sc(t, e) {
3453
3362
  if (typeof window > "u" || !window.history || typeof t != "string")
3454
3363
  return !1;
3455
3364
  const r = t.trim();
@@ -3461,13 +3370,13 @@ function dc(t, e) {
3461
3370
  return !1;
3462
3371
  }
3463
3372
  }
3464
- const fc = {
3373
+ const ic = {
3465
3374
  name: "ikon.client.vibrate",
3466
3375
  description: "Trigger haptic feedback on supported devices",
3467
3376
  returnType: { kind: "boolean" },
3468
3377
  parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
3469
3378
  };
3470
- function pc(t) {
3379
+ function oc(t) {
3471
3380
  if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
3472
3381
  return !1;
3473
3382
  try {
@@ -3477,105 +3386,14 @@ function pc(t) {
3477
3386
  return !1;
3478
3387
  }
3479
3388
  }
3480
- const Ec = {
3481
- name: "ikon.client.playSound",
3482
- description: "Play audio from a URL",
3483
- returnType: { kind: "boolean" },
3484
- parameters: [
3485
- { name: "url", type: { kind: "string" }, description: "URL of the audio file" },
3486
- { name: "volume", type: { kind: "number", nullable: !0 }, description: "Volume level from 0.0 to 1.0" }
3487
- ]
3488
- };
3489
- async function mc(t, e) {
3490
- if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
3491
- return !1;
3492
- try {
3493
- const r = new Audio(t.trim());
3494
- return r.volume = typeof e == "number" ? Math.max(0, Math.min(1, e)) : 1, await r.play(), !0;
3495
- } catch {
3496
- return !1;
3497
- }
3498
- }
3499
- const Ic = {
3500
- name: "ikon.client.showNotification",
3501
- description: "Show a browser notification (requests permission if needed)",
3502
- returnType: { kind: "boolean" },
3503
- parameters: [
3504
- { name: "title", type: { kind: "string" }, description: "Notification title" },
3505
- { name: "body", type: { kind: "string", nullable: !0 }, description: "Notification body text" },
3506
- { name: "icon", type: { kind: "string", nullable: !0 }, description: "URL of notification icon" }
3507
- ]
3508
- };
3509
- async function _c(t, e, r) {
3510
- if (typeof window > "u" || !("Notification" in window) || typeof t != "string" || !t.trim())
3511
- return !1;
3512
- try {
3513
- let n = Notification.permission;
3514
- if (n === "default" && (n = await Notification.requestPermission()), n !== "granted")
3515
- return !1;
3516
- const s = {};
3517
- return typeof e == "string" && e.trim() && (s.body = e.trim()), typeof r == "string" && r.trim() && (s.icon = r.trim()), new Notification(t.trim(), s), !0;
3518
- } catch {
3519
- return !1;
3520
- }
3521
- }
3522
- const Tc = {
3523
- name: "ikon.client.requestFullscreen",
3524
- description: "Enter fullscreen mode",
3525
- returnType: { kind: "boolean" }
3526
- };
3527
- async function Sc() {
3528
- if (typeof document > "u" || !document.documentElement)
3529
- return !1;
3530
- try {
3531
- const t = document.documentElement, e = t.requestFullscreen || t.webkitRequestFullscreen || t.msRequestFullscreen;
3532
- return e ? (await e.call(t), !0) : !1;
3533
- } catch {
3534
- return !1;
3535
- }
3536
- }
3537
- const wc = {
3538
- name: "ikon.client.exitFullscreen",
3539
- description: "Exit fullscreen mode",
3540
- returnType: { kind: "boolean" }
3541
- };
3542
- function Ac() {
3543
- if (typeof document > "u")
3544
- return !1;
3545
- try {
3546
- const t = document.exitFullscreen || document.webkitExitFullscreen || document.msExitFullscreen;
3547
- return t ? (t.call(document), !0) : !1;
3548
- } catch {
3549
- return !1;
3550
- }
3551
- }
3552
- const yc = {
3553
- name: "ikon.client.downloadFile",
3554
- description: "Trigger a file download",
3555
- returnType: { kind: "boolean" },
3556
- parameters: [
3557
- { name: "url", type: { kind: "string" }, description: "URL of the file to download" },
3558
- { name: "filename", type: { kind: "string", nullable: !0 }, description: "Suggested filename for the download" }
3559
- ]
3560
- };
3561
- function Nc(t, e) {
3562
- if (typeof document > "u" || typeof t != "string" || !t.trim())
3563
- return !1;
3564
- try {
3565
- const r = document.createElement("a");
3566
- return r.href = t.trim(), r.download = typeof e == "string" && e.trim() ? e.trim() : "", r.style.display = "none", document.body.appendChild(r), r.click(), document.body.removeChild(r), !0;
3567
- } catch {
3568
- return !1;
3569
- }
3570
- }
3571
3389
  let te = null;
3572
- const gc = {
3390
+ const ac = {
3573
3391
  name: "ikon.client.keepScreenAwake",
3574
3392
  description: "Prevent or allow the screen to sleep",
3575
3393
  returnType: { kind: "boolean" },
3576
3394
  parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
3577
3395
  };
3578
- async function Cc(t) {
3396
+ async function cc(t) {
3579
3397
  if (typeof navigator > "u" || !("wakeLock" in navigator))
3580
3398
  return !1;
3581
3399
  try {
@@ -3584,15 +3402,15 @@ async function Cc(t) {
3584
3402
  return !1;
3585
3403
  }
3586
3404
  }
3587
- const bc = {
3405
+ const lc = {
3588
3406
  name: "ikon.client.getVisibility",
3589
3407
  description: "Get the current page visibility state",
3590
3408
  returnType: { kind: "string", nullable: !0 }
3591
3409
  };
3592
- function Rc() {
3410
+ function uc() {
3593
3411
  return typeof document > "u" ? null : document.visibilityState || null;
3594
3412
  }
3595
- const kc = {
3413
+ const hc = {
3596
3414
  name: "ikon.client.scrollTo",
3597
3415
  description: "Scroll the page to a specific position",
3598
3416
  returnType: { kind: "boolean" },
@@ -3602,7 +3420,7 @@ const kc = {
3602
3420
  { name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
3603
3421
  ]
3604
3422
  };
3605
- function Uc(t, e, r) {
3423
+ function dc(t, e, r) {
3606
3424
  if (typeof window > "u" || typeof t != "number" || typeof e != "number")
3607
3425
  return !1;
3608
3426
  try {
@@ -3615,12 +3433,12 @@ function Uc(t, e, r) {
3615
3433
  return !1;
3616
3434
  }
3617
3435
  }
3618
- const Dc = {
3436
+ const fc = {
3619
3437
  name: "ikon.client.getBatteryLevel",
3620
3438
  description: "Get the current battery level (0-100)",
3621
3439
  returnType: { kind: "number", nullable: !0 }
3622
3440
  };
3623
- async function Mc() {
3441
+ async function Ec() {
3624
3442
  if (typeof navigator > "u" || !("getBattery" in navigator))
3625
3443
  return null;
3626
3444
  try {
@@ -3630,61 +3448,52 @@ async function Mc() {
3630
3448
  return null;
3631
3449
  }
3632
3450
  }
3633
- const Oc = {
3451
+ const pc = {
3634
3452
  name: "ikon.client.getNetworkType",
3635
3453
  description: "Get the current network connection type",
3636
3454
  returnType: { kind: "string", nullable: !0 }
3637
3455
  };
3638
- function Lc() {
3456
+ function Ic() {
3639
3457
  if (typeof navigator > "u")
3640
3458
  return null;
3641
3459
  const t = navigator.connection;
3642
3460
  return t && (t.effectiveType || t.type) || null;
3643
3461
  }
3644
- const vc = [
3462
+ const mc = [
3645
3463
  { definition: ja, handler: za },
3646
3464
  { definition: Xa, handler: Ja },
3647
- { definition: Qa, handler: qa },
3648
- { definition: Za, handler: ec },
3465
+ { definition: Qa, handler: Za },
3466
+ { definition: qa, handler: ec },
3649
3467
  { definition: tc, handler: rc },
3650
3468
  { definition: nc, handler: sc },
3651
3469
  { definition: ic, handler: oc },
3652
3470
  { definition: ac, handler: cc },
3653
3471
  { definition: lc, handler: uc },
3654
3472
  { definition: hc, handler: dc },
3655
- { definition: fc, handler: pc },
3656
- { definition: Ec, handler: mc },
3657
- { definition: Ic, handler: _c },
3658
- { definition: Tc, handler: Sc },
3659
- { definition: wc, handler: Ac },
3660
- { definition: yc, handler: Nc },
3661
- { definition: gc, handler: Cc },
3662
- { definition: bc, handler: Rc },
3663
- { definition: kc, handler: Uc },
3664
- { definition: Dc, handler: Mc },
3665
- { definition: Oc, handler: Lc }
3473
+ { definition: fc, handler: Ec },
3474
+ { definition: pc, handler: Ic }
3666
3475
  ];
3667
- function Fc(t) {
3668
- const e = vc.map(({ definition: r, handler: n }) => t.register(r, n));
3476
+ function _c(t) {
3477
+ const e = mc.map(({ definition: r, handler: n }) => t.register(r, n));
3669
3478
  return () => e.forEach((r) => r());
3670
3479
  }
3671
3480
  function nt() {
3672
3481
  return typeof window < "u" && typeof navigator < "u";
3673
3482
  }
3674
- const Pc = new Uint8Array(0);
3675
- function Ie(t) {
3483
+ const Tc = new Uint8Array(0);
3484
+ function me(t) {
3676
3485
  switch (t.kind) {
3677
3486
  case "array":
3678
3487
  return {
3679
3488
  kind: "array",
3680
- element: Ie(t.element),
3489
+ element: me(t.element),
3681
3490
  nullable: t.nullable ?? !1
3682
3491
  };
3683
3492
  case "dictionary":
3684
3493
  return {
3685
3494
  kind: "dictionary",
3686
3495
  keyType: t.keyType ?? "string",
3687
- value: Ie(t.value),
3496
+ value: me(t.value),
3688
3497
  nullable: t.nullable ?? !1
3689
3498
  };
3690
3499
  default:
@@ -3731,9 +3540,9 @@ function Cr(t, e) {
3731
3540
  }
3732
3541
  return JSON.stringify(t);
3733
3542
  }
3734
- function Bc(t, e) {
3543
+ function Sc(t, e) {
3735
3544
  const r = (t.parameters ?? []).map((i) => {
3736
- const o = Ie(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
3545
+ const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
3737
3546
  return {
3738
3547
  name: i.name,
3739
3548
  descriptor: o,
@@ -3741,7 +3550,7 @@ function Bc(t, e) {
3741
3550
  defaultValueJson: c,
3742
3551
  description: i.description
3743
3552
  };
3744
- }), n = Ie(t.returnType), s = {
3553
+ }), n = me(t.returnType), s = {
3745
3554
  FunctionId: m.createRandom(),
3746
3555
  FunctionName: t.name,
3747
3556
  Description: t.description ?? "",
@@ -3758,7 +3567,7 @@ function Bc(t, e) {
3758
3567
  TypeName: re(i.descriptor),
3759
3568
  HasDefaultValue: i.hasDefaultValue,
3760
3569
  DefaultValueJson: i.defaultValueJson,
3761
- DefaultValueData: Pc,
3570
+ DefaultValueData: Tc,
3762
3571
  IsEnumerable: !1,
3763
3572
  EnumerableItemTypeName: "",
3764
3573
  Description: i.description ?? ""
@@ -3772,11 +3581,11 @@ function Bc(t, e) {
3772
3581
  returnType: n
3773
3582
  };
3774
3583
  }
3775
- const it = L("FunctionRegistry"), xc = new Uint8Array(0);
3776
- function Gc(t) {
3584
+ const it = L("FunctionRegistry"), wc = new Uint8Array(0);
3585
+ function Ac(t) {
3777
3586
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
3778
3587
  }
3779
- class Vc {
3588
+ class yc {
3780
3589
  functions = /* @__PURE__ */ new Map();
3781
3590
  config = null;
3782
3591
  isConnected = !1;
@@ -3798,7 +3607,7 @@ class Vc {
3798
3607
  * If already connected, sends registration to server immediately.
3799
3608
  */
3800
3609
  register(e, r) {
3801
- const n = Bc(e, r);
3610
+ const n = Sc(e, r);
3802
3611
  return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
3803
3612
  }
3804
3613
  /**
@@ -3830,7 +3639,7 @@ class Vc {
3830
3639
  * Returns true if the message was handled.
3831
3640
  */
3832
3641
  handleProtocolMessage(e, r) {
3833
- if (r === T.ACTION_FUNCTION_CALL) {
3642
+ if (r === S.ACTION_FUNCTION_CALL) {
3834
3643
  const n = ne(e);
3835
3644
  return this.handleFunctionCall(e, n.senderId), !0;
3836
3645
  }
@@ -3843,7 +3652,7 @@ class Vc {
3843
3652
  sendAllRegistrations() {
3844
3653
  if (!this.config || this.functions.size === 0)
3845
3654
  return;
3846
- const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ri({ Functions: e }), n = Mi(r, this.config.sessionId);
3655
+ const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = bi({ Functions: e }), n = Mi(r, this.config.sessionId);
3847
3656
  this.config.sendProtocolMessage(n);
3848
3657
  }
3849
3658
  /**
@@ -3873,12 +3682,12 @@ class Vc {
3873
3682
  try {
3874
3683
  const s = [];
3875
3684
  for (let u = 0; u < e.parameters.length; u++) {
3876
- const p = e.parameters[u], h = r.Parameters?.[u]?.ValueJson;
3877
- h === void 0 || h === "" ? p.hasDefaultValue ? s.push(st(p.defaultValueJson, p.descriptor)) : s.push(void 0) : s.push(st(h, p.descriptor));
3685
+ const f = e.parameters[u], h = r.Parameters?.[u]?.ValueJson;
3686
+ h === void 0 || h === "" ? f.hasDefaultValue ? s.push(st(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(st(h, f.descriptor));
3878
3687
  }
3879
3688
  const i = await e.handler(...s);
3880
- let o = i, a = xc;
3881
- Gc(i) && (o = i.value, a = new Uint8Array(i.data));
3689
+ let o = i, a = wc;
3690
+ Ac(i) && (o = i.value, a = new Uint8Array(i.data));
3882
3691
  const c = Cr(o, e.returnType);
3883
3692
  this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
3884
3693
  } catch (s) {
@@ -3901,7 +3710,7 @@ class Vc {
3901
3710
  if (!this.config)
3902
3711
  return;
3903
3712
  const a = Hi(
3904
- xi({
3713
+ Gi({
3905
3714
  CallId: e,
3906
3715
  InstanceId: r,
3907
3716
  ResultTypeName: re(s.returnType),
@@ -3933,7 +3742,7 @@ class Vc {
3933
3742
  this.config.sendProtocolMessage(i);
3934
3743
  }
3935
3744
  }
3936
- function Wc(t, e) {
3745
+ function Nc(t, e) {
3937
3746
  return { value: t, data: e };
3938
3747
  }
3939
3748
  function Se(t) {
@@ -3949,7 +3758,7 @@ const Te = {
3949
3758
  StartAudioCapture: "ikon.client.startAudioCapture",
3950
3759
  StopCapture: "ikon.client.stopCapture",
3951
3760
  CaptureImage: "ikon.client.captureImage"
3952
- }, Hc = {
3761
+ }, gc = {
3953
3762
  name: Te.StartVideoCapture,
3954
3763
  description: "Start camera or screen capture and stream video frames to the server",
3955
3764
  returnType: { kind: "string" },
@@ -3957,26 +3766,26 @@ const Te = {
3957
3766
  { name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
3958
3767
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
3959
3768
  ]
3960
- }, $c = {
3769
+ }, Cc = {
3961
3770
  name: Te.StartAudioCapture,
3962
3771
  description: "Start microphone capture and stream audio frames to the server",
3963
3772
  returnType: { kind: "string" },
3964
3773
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3965
- }, Kc = {
3774
+ }, Rc = {
3966
3775
  name: Te.StopCapture,
3967
3776
  description: "Stop a previously started capture by captureId",
3968
3777
  returnType: { kind: "boolean" },
3969
3778
  parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
3970
- }, Yc = {
3779
+ }, bc = {
3971
3780
  name: Te.CaptureImage,
3972
3781
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
3973
3782
  returnType: { kind: "string" },
3974
3783
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
3975
3784
  };
3976
- function jc(t, e) {
3785
+ function kc(t, e) {
3977
3786
  const r = [];
3978
3787
  return r.push(
3979
- t.register(Hc, async (n, s) => {
3788
+ t.register(gc, async (n, s) => {
3980
3789
  const i = e.mediaCapture;
3981
3790
  if (!i)
3982
3791
  throw new Error("Media capture is not available in this environment");
@@ -3984,7 +3793,7 @@ function jc(t, e) {
3984
3793
  return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
3985
3794
  })
3986
3795
  ), r.push(
3987
- t.register($c, async (n) => {
3796
+ t.register(Cc, async (n) => {
3988
3797
  const s = e.mediaCapture;
3989
3798
  if (!s)
3990
3799
  throw new Error("Media capture is not available in this environment");
@@ -3992,7 +3801,7 @@ function jc(t, e) {
3992
3801
  return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
3993
3802
  })
3994
3803
  ), r.push(
3995
- t.register(Kc, async (n) => {
3804
+ t.register(Rc, async (n) => {
3996
3805
  const s = e.mediaCapture;
3997
3806
  if (!s || typeof n != "string" || !n.trim())
3998
3807
  return !1;
@@ -4000,7 +3809,7 @@ function jc(t, e) {
4000
3809
  return i || o;
4001
3810
  })
4002
3811
  ), r.push(
4003
- t.register(Yc, async (n) => {
3812
+ t.register(bc, async (n) => {
4004
3813
  const s = e.mediaCapture;
4005
3814
  if (!s)
4006
3815
  throw new Error("Media capture is not available in this environment");
@@ -4012,21 +3821,21 @@ function jc(t, e) {
4012
3821
  width: i.width,
4013
3822
  height: i.height
4014
3823
  }), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
4015
- return Wc(a, o.data);
3824
+ return Nc(a, o.data);
4016
3825
  })
4017
3826
  ), () => {
4018
3827
  for (const n of r)
4019
3828
  n();
4020
3829
  };
4021
3830
  }
4022
- const br = () => {
3831
+ const Rr = () => {
4023
3832
  if (typeof navigator > "u")
4024
3833
  return !1;
4025
3834
  const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
4026
3835
  return e || r;
4027
- }, zc = globalThis;
3836
+ }, Uc = globalThis;
4028
3837
  function le() {
4029
- if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || zc.crossOriginIsolated === !1)
3838
+ if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Uc.crossOriginIsolated === !1)
4030
3839
  return !1;
4031
3840
  try {
4032
3841
  new SharedArrayBuffer(1);
@@ -4035,10 +3844,10 @@ function le() {
4035
3844
  }
4036
3845
  return !0;
4037
3846
  }
4038
- function Rr(t) {
3847
+ function br(t) {
4039
3848
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
4040
3849
  }
4041
- function Xc(t) {
3850
+ function Dc(t) {
4042
3851
  return new Worker(
4043
3852
  "" + new URL("assets/audio-playback-worker-Cwm3GaAx.js", import.meta.url).href,
4044
3853
  {
@@ -4047,7 +3856,7 @@ function Xc(t) {
4047
3856
  }
4048
3857
  );
4049
3858
  }
4050
- const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Jc = 120, Qc = 300, qc = 4, Zc = 200, el = 100, tl = 8e3, rl = 10, Ur = 100, ke = 50, Dr = 128, nl = 20, sl = !0, G = 1500, il = -20, ol = -100, al = 200, g = L("IkonAudioPlayback"), cl = () => {
3859
+ const ae = 48e3, b = 2, kr = 1500, ot = 512, at = "playback", Mc = 120, Oc = 300, Lc = 4, vc = 200, Fc = 100, Pc = 8e3, Bc = 10, Ur = 100, ke = 50, Dr = 128, Gc = 20, xc = !0, x = 1500, Vc = -20, Wc = -100, Hc = 200, g = L("IkonAudioPlayback"), $c = () => {
4051
3860
  if (typeof navigator > "u" || typeof window > "u")
4052
3861
  return !1;
4053
3862
  const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
@@ -4059,19 +3868,19 @@ const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Jc = 120, Qc = 300
4059
3868
  function K(t) {
4060
3869
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
4061
3870
  }
4062
- function ll(t) {
3871
+ function Kc(t) {
4063
3872
  return `
4064
3873
  // Audio buffer constants
4065
3874
  const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
4066
3875
  const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
4067
- const BUFFER_TARGET_MIN_MS = ${Jc};
4068
- const BUFFER_TARGET_MAX_MS = ${Qc};
4069
- const JITTER_MULTIPLIER = ${qc};
3876
+ const BUFFER_TARGET_MIN_MS = ${Mc};
3877
+ const BUFFER_TARGET_MAX_MS = ${Oc};
3878
+ const JITTER_MULTIPLIER = ${Lc};
4070
3879
  const LOCAL_BUFFER_MAX_MS = ${kr};
4071
- const CONTROL_PERIOD_MS = ${Zc};
4072
- const UNDERRUN_JUMP_MS = ${el};
4073
- const STABLE_TIME_TO_DECREASE_MS = ${tl};
4074
- const DECREASE_STEP_MS = ${rl};
3880
+ const CONTROL_PERIOD_MS = ${vc};
3881
+ const UNDERRUN_JUMP_MS = ${Fc};
3882
+ const STABLE_TIME_TO_DECREASE_MS = ${Pc};
3883
+ const DECREASE_STEP_MS = ${Bc};
4075
3884
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
4076
3885
 
4077
3886
  // Pre-computed reciprocals for division-free calculations
@@ -4090,7 +3899,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
4090
3899
  const RENDER_QUANTUM_SIZE = ${Dr};
4091
3900
 
4092
3901
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
4093
- const BUFFER_REDUCTION_CROSSFADE_MS = ${nl};
3902
+ const BUFFER_REDUCTION_CROSSFADE_MS = ${Gc};
4094
3903
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
4095
3904
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
4096
3905
 
@@ -4301,7 +4110,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
4301
4110
  this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
4302
4111
 
4303
4112
  // Normalization config (hardcoded)
4304
- this.normalizationEnabled = ${sl};
4113
+ this.normalizationEnabled = ${xc};
4305
4114
 
4306
4115
  // Stream states for audio buffer
4307
4116
  this.streams = new Map();
@@ -4977,7 +4786,7 @@ class je {
4977
4786
  config;
4978
4787
  enabled = !1;
4979
4788
  stateUnsubscribe = null;
4980
- isMobile = cl();
4789
+ isMobile = $c();
4981
4790
  boundVisibilityChange = null;
4982
4791
  boundPageHide = null;
4983
4792
  unlockHandler = null;
@@ -5088,7 +4897,7 @@ class je {
5088
4897
  * (e.g., button click/release) to ensure the AudioContext can be recreated.
5089
4898
  */
5090
4899
  requestRecovery() {
5091
- if (this.enabled && br() && this.audioContext) {
4900
+ if (this.enabled && Rr() && this.audioContext) {
5092
4901
  this.stopAudioGraph();
5093
4902
  try {
5094
4903
  const e = new AudioContext({
@@ -5182,31 +4991,31 @@ class je {
5182
4991
  const e = this.audioContext;
5183
4992
  if (!e)
5184
4993
  return null;
5185
- const r = e.currentTime, n = e.sampleRate, s = R;
4994
+ const r = e.currentTime, n = e.sampleRate, s = b;
5186
4995
  for (const i of this.visemeBuffers.values()) {
5187
4996
  if (!i.timingEstablished || i.count === 0)
5188
4997
  continue;
5189
4998
  const o = r - i.playbackStartContextTime;
5190
4999
  if (o < 0)
5191
5000
  continue;
5192
- const a = o * n * s, c = i.frames, u = i.count, d = (i.head - u + G) % G;
5193
- let h = null, f = null;
5001
+ const a = o * n * s, c = i.frames, u = i.count, d = (i.head - u + x) % x;
5002
+ let h = null, E = null;
5194
5003
  for (let l = 0; l < u; l++) {
5195
- const N = (d + l) % G, S = c[N], v = S.samplePosition + Math.max(S.frameSamples, 1);
5196
- if (S.samplePosition <= a && (h = S), v > a && !f && (f = S, S.samplePosition <= a))
5004
+ const N = (d + l) % x, w = c[N], v = w.samplePosition + Math.max(w.frameSamples, 1);
5005
+ if (w.samplePosition <= a && (h = w), v > a && !E && (E = w, w.samplePosition <= a))
5197
5006
  break;
5198
5007
  }
5199
5008
  if (!h)
5200
5009
  continue;
5201
- const E = h.samplePosition + Math.max(h.frameSamples, 1);
5202
- if (a > E && !f)
5010
+ const p = h.samplePosition + Math.max(h.frameSamples, 1);
5011
+ if (a > p && !E)
5203
5012
  continue;
5204
- if (!f)
5013
+ if (!E)
5205
5014
  return this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm, this._visemeResult;
5206
- const I = h.samplePosition, w = Math.max(h.frameSamples, 1), _ = I + w;
5207
- if (h !== f && f.samplePosition > h.samplePosition && _ > I) {
5015
+ const I = h.samplePosition, T = Math.max(h.frameSamples, 1), _ = I + T;
5016
+ if (h !== E && E.samplePosition > h.samplePosition && _ > I) {
5208
5017
  const l = Math.min(1, Math.max(0, (a - I) / (_ - I)));
5209
- this._visemeResult.mouthOpenY = h.mouthOpenY + l * (f.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + l * (f.mouthForm - h.mouthForm);
5018
+ this._visemeResult.mouthOpenY = h.mouthOpenY + l * (E.mouthOpenY - h.mouthOpenY), this._visemeResult.mouthForm = h.mouthForm + l * (E.mouthForm - h.mouthForm);
5210
5019
  } else
5211
5020
  this._visemeResult.mouthOpenY = h.mouthOpenY, this._visemeResult.mouthForm = h.mouthForm;
5212
5021
  return this._visemeResult;
@@ -5237,21 +5046,21 @@ class je {
5237
5046
  } catch (u) {
5238
5047
  try {
5239
5048
  this.audioContext = new AudioContext({ latencyHint: c });
5240
- } catch (p) {
5049
+ } catch (f) {
5241
5050
  try {
5242
5051
  this.audioContext = new AudioContext();
5243
5052
  } catch (d) {
5244
5053
  g.warn(`Failed to create AudioContext: ${K(d)}`), this.audioContext = null;
5245
5054
  return;
5246
5055
  }
5247
- g.debug(`AudioContext latencyHint unsupported: ${K(p)}`);
5056
+ g.debug(`AudioContext latencyHint unsupported: ${K(f)}`);
5248
5057
  }
5249
5058
  g.debug(`AudioContext sample rate request unsupported: ${K(u)}`);
5250
5059
  }
5251
5060
  this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
5252
5061
  }
5253
5062
  const n = this.audioContext, s = this.resolveDiagnosticsConfig();
5254
- if ((this.config.performance?.preferAudioWorklet ?? !0) && Rr(n)) {
5063
+ if ((this.config.performance?.preferAudioWorklet ?? !0) && br(n)) {
5255
5064
  await this.ensureAudioWorklet(n, s, e, r);
5256
5065
  return;
5257
5066
  }
@@ -5301,9 +5110,9 @@ class je {
5301
5110
  setupMediaSession() {
5302
5111
  if (!(typeof document > "u")) {
5303
5112
  if (!this.silentAudioElement) {
5304
- const s = new ArrayBuffer(882044), i = new DataView(s), o = (u, p) => {
5305
- for (let d = 0; d < p.length; d++)
5306
- i.setUint8(u + d, p.charCodeAt(d));
5113
+ const s = new ArrayBuffer(882044), i = new DataView(s), o = (u, f) => {
5114
+ for (let d = 0; d < f.length; d++)
5115
+ i.setUint8(u + d, f.charCodeAt(d));
5307
5116
  };
5308
5117
  o(0, "RIFF"), i.setUint32(4, 36 + 441e3 * 2, !0), o(8, "WAVE"), o(12, "fmt "), i.setUint32(16, 16, !0), i.setUint16(20, 1, !0), i.setUint16(22, 1, !0), i.setUint32(24, 44100, !0), i.setUint32(28, 44100 * 2, !0), i.setUint16(32, 2, !0), i.setUint16(34, 16, !0), o(36, "data"), i.setUint32(40, 441e3 * 2, !0);
5309
5118
  const a = new Blob([s], { type: "audio/wav" }), c = URL.createObjectURL(a);
@@ -5404,17 +5213,17 @@ class je {
5404
5213
  await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
5405
5214
  } catch {
5406
5215
  }
5407
- const i = `${this.outputSampleRateHz}_${R}`;
5216
+ const i = `${this.outputSampleRateHz}_${b}`;
5408
5217
  if (!this.workletModuleUrl || this.workletModuleKey !== i) {
5409
5218
  if (this.workletModuleUrl)
5410
5219
  try {
5411
5220
  URL.revokeObjectURL(this.workletModuleUrl);
5412
5221
  } catch {
5413
5222
  }
5414
- this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([ll({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
5223
+ this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Kc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: b })], { type: "text/javascript" }));
5415
5224
  }
5416
- this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((p) => {
5417
- throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(p)}`), p;
5225
+ this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
5226
+ throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
5418
5227
  }));
5419
5228
  try {
5420
5229
  await this.workletReady;
@@ -5427,14 +5236,14 @@ class je {
5427
5236
  this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
5428
5237
  numberOfInputs: 0,
5429
5238
  numberOfOutputs: 1,
5430
- outputChannelCount: [R],
5239
+ outputChannelCount: [b],
5431
5240
  processorOptions: {
5432
5241
  outputAudioConfig: { diagnostics: r },
5433
5242
  useSharedArrayBuffer: a,
5434
- outputChannels: R
5243
+ outputChannels: b
5435
5244
  }
5436
- }), this.audioWorkletNode.port.onmessage = (p) => {
5437
- const d = p.data;
5245
+ }), this.audioWorkletNode.port.onmessage = (f) => {
5246
+ const d = f.data;
5438
5247
  if (!(!d || typeof d != "object")) {
5439
5248
  if (d.type === "stats") {
5440
5249
  if (!r.enabled)
@@ -5451,8 +5260,8 @@ class je {
5451
5260
  }
5452
5261
  }, this.audioWorkletNode.connect(e.destination), this.stopScriptProcessorDiagnostics(), await this.resumeAudioContextIfPossible(e, n, s), this.rebindWorkerTransportIfNeeded();
5453
5262
  const c = this.pendingWorkletMessages.splice(0);
5454
- for (const p of c)
5455
- this.postToWorklet(p);
5263
+ for (const f of c)
5264
+ this.postToWorklet(f);
5456
5265
  const u = this.getContextState(e) === "running";
5457
5266
  this.notifyPlaybackActive(u);
5458
5267
  }
@@ -5460,59 +5269,59 @@ class je {
5460
5269
  if (this.scriptProcessorNode)
5461
5270
  return;
5462
5271
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
5463
- const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * ke / 1e3), a = 1 / i, c = 1 / o, u = new Array(R), p = [], d = e.createScriptProcessor(n, 0, R);
5272
+ const n = 1024, s = new Float32Array(n * b), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * ke / 1e3), a = 1 / i, c = 1 / o, u = new Array(b), f = [], d = e.createScriptProcessor(n, 0, b);
5464
5273
  d.onaudioprocess = (h) => {
5465
- const f = h.outputBuffer, E = f.numberOfChannels, I = f.length;
5466
- for (let _ = 0; _ < E; _++) {
5467
- const l = f.getChannelData(_);
5274
+ const E = h.outputBuffer, p = E.numberOfChannels, I = E.length;
5275
+ for (let _ = 0; _ < p; _++) {
5276
+ const l = E.getChannelData(_);
5468
5277
  l.fill(0), u[_] = l;
5469
5278
  }
5470
- let w = 0;
5471
- p.length = 0;
5279
+ let T = 0;
5280
+ f.length = 0;
5472
5281
  for (const [_, l] of this.fallbackQueues.entries()) {
5473
- l.totalSamples > 0 && (w += 1), (l.ending || l.inputDrained) && l.fadeDirection !== "out" && l.totalSamples / E * 1e3 / this.outputSampleRateHz <= ke * 2 && (l.fadeDirection = "out"), this.readFromFallbackQueue(l, s), (l.totalSamples > 0 || !l.hasLastOut) && ((!l.lastOut || l.lastOut.length !== s.length) && (l.lastOut = new Float32Array(s.length)), l.lastOut.set(s), l.hasLastOut = !0);
5474
- for (let S = 0; S < I; S++) {
5282
+ l.totalSamples > 0 && (T += 1), (l.ending || l.inputDrained) && l.fadeDirection !== "out" && l.totalSamples / p * 1e3 / this.outputSampleRateHz <= ke * 2 && (l.fadeDirection = "out"), this.readFromFallbackQueue(l, s), (l.totalSamples > 0 || !l.hasLastOut) && ((!l.lastOut || l.lastOut.length !== s.length) && (l.lastOut = new Float32Array(s.length)), l.lastOut.set(s), l.hasLastOut = !0);
5283
+ for (let w = 0; w < I; w++) {
5475
5284
  l.fadeDirection === "in" ? (l.fadeGain = Math.min(1, l.fadeGain + a), l.fadeGain >= 1 && (l.fadeDirection = "none")) : l.fadeDirection === "out" && (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none"));
5476
- for (let v = 0; v < E; v++) {
5477
- const M = s[S * E + v];
5478
- u[v][S] += M * l.fadeGain;
5285
+ for (let v = 0; v < p; v++) {
5286
+ const M = s[w * p + v];
5287
+ u[v][w] += M * l.fadeGain;
5479
5288
  }
5480
5289
  }
5481
5290
  const N = l.ending || l.inputDrained;
5482
5291
  if (N && l.totalSamples <= 0) {
5483
5292
  if (l.fadeDirection === "out" && l.fadeGain > 1e-3) {
5484
- for (let S = 0; S < I; S++)
5293
+ for (let w = 0; w < I; w++)
5485
5294
  if (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 1e-3) {
5486
5295
  l.fadeGain = 0, l.fadeDirection = "none";
5487
5296
  break;
5488
5297
  }
5489
5298
  }
5490
- l.fadeGain <= 1e-3 && l.ending && p.push(_);
5299
+ l.fadeGain <= 1e-3 && l.ending && f.push(_);
5491
5300
  } else if (!N && l.totalSamples <= 0 && l.hasLastOut && l.lastOut && l.fadeGain > 1e-3) {
5492
5301
  l.fadeDirection = "out", l.underrunPending = !0;
5493
- const S = l.lastOut, v = I - 1;
5302
+ const w = l.lastOut, v = I - 1;
5494
5303
  for (let M = 0; M < I; M++) {
5495
5304
  l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none");
5496
- for (let $ = 0; $ < E; $++) {
5497
- const xr = S[v * E + $];
5498
- u[$][M] += xr * l.fadeGain;
5305
+ for (let $ = 0; $ < p; $++) {
5306
+ const Gr = w[v * p + $];
5307
+ u[$][M] += Gr * l.fadeGain;
5499
5308
  }
5500
5309
  }
5501
5310
  }
5502
5311
  }
5503
- if (p.length > 0) {
5504
- for (const _ of p)
5312
+ if (f.length > 0) {
5313
+ for (const _ of f)
5505
5314
  this.fallbackQueues.delete(_), this.activeStreams.delete(_);
5506
5315
  this.activeStreams.size === 0 && this.removeUnlockHandler();
5507
5316
  }
5508
- if (w > 1) {
5509
- const _ = 1 / Math.sqrt(w);
5317
+ if (T > 1) {
5318
+ const _ = 1 / Math.sqrt(T);
5510
5319
  for (let l = 0; l < I; l++)
5511
- for (let N = 0; N < E; N++)
5320
+ for (let N = 0; N < p; N++)
5512
5321
  u[N][l] *= _;
5513
5322
  }
5514
5323
  for (let _ = 0; _ < I; _++)
5515
- for (let l = 0; l < E; l++) {
5324
+ for (let l = 0; l < p; l++) {
5516
5325
  const N = u[l][_];
5517
5326
  u[l][_] = N > 1 ? 1 : N < -1 ? -1 : N;
5518
5327
  }
@@ -5536,7 +5345,7 @@ class je {
5536
5345
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
5537
5346
  }
5538
5347
  trimFallbackQueue(e) {
5539
- const r = Math.floor(this.outputSampleRateHz * R * kr / 1e3), n = e.totalSamples - r;
5348
+ const r = Math.floor(this.outputSampleRateHz * b * kr / 1e3), n = e.totalSamples - r;
5540
5349
  n <= 0 || this.skipFromFallbackQueue(e, n);
5541
5350
  }
5542
5351
  stopScriptProcessorDiagnostics() {
@@ -5555,7 +5364,7 @@ class je {
5555
5364
  for (const [n, s] of this.fallbackQueues.entries()) {
5556
5365
  if (s.totalSamples <= 0)
5557
5366
  continue;
5558
- const o = s.totalSamples / R * 1e3 / this.outputSampleRateHz;
5367
+ const o = s.totalSamples / b * 1e3 / this.outputSampleRateHz;
5559
5368
  g.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
5560
5369
  }
5561
5370
  }, r);
@@ -5638,7 +5447,7 @@ class je {
5638
5447
  type: "rebind",
5639
5448
  transport: s,
5640
5449
  outputSampleRate: this.outputSampleRateHz,
5641
- outputChannels: R
5450
+ outputChannels: b
5642
5451
  });
5643
5452
  } catch {
5644
5453
  }
@@ -5650,39 +5459,39 @@ class je {
5650
5459
  g.warn("Audio decode worker unavailable (Workers not supported)");
5651
5460
  return;
5652
5461
  }
5653
- const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_AUDIO });
5462
+ const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_AUDIO });
5654
5463
  if (!e) {
5655
5464
  this.enabled && g.debug("Audio pipeline waiting for client connection");
5656
5465
  return;
5657
5466
  }
5658
5467
  this.protocolPort = e;
5659
5468
  try {
5660
- this.audioWorker = new Xc();
5469
+ this.audioWorker = new Dc();
5661
5470
  } catch (d) {
5662
5471
  g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
5663
5472
  return;
5664
5473
  }
5665
5474
  const r = this.audioWorker;
5666
5475
  r.addEventListener("message", (d) => this.onAudioWorkerMessage(d.data)), r.addEventListener("error", (d) => {
5667
- const h = [d.message, d.filename, d.lineno, d.colno].filter((f) => f != null && String(f).length > 0);
5476
+ const h = [d.message, d.filename, d.lineno, d.colno].filter((E) => E != null && String(E).length > 0);
5668
5477
  g.error(`Audio worker failed: ${h.join(" ")}`.trim());
5669
5478
  });
5670
5479
  const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && le(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
5671
5480
  type: "configure",
5672
5481
  transport: s ? "sab" : "pcm",
5673
5482
  outputSampleRate: this.outputSampleRateHz,
5674
- outputChannels: R,
5483
+ outputChannels: b,
5675
5484
  preferWebCodecs: i
5676
5485
  };
5677
5486
  r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
5678
- const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", p = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
5679
- g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${p}, output=${this.outputSampleRateHz}Hz/${R}ch`);
5487
+ const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", f = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
5488
+ g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${b}ch`);
5680
5489
  }
5681
5490
  onAudioWorkerMessage(e) {
5682
5491
  if (e.type === "streamBegin") {
5683
5492
  if (this.activeStreams.add(e.streamId), e.shapeSets && e.shapeSets.length > 0 && (this.streamShapeSets.set(e.streamId, e.shapeSets), this.currentShapeSetValues.set(e.streamId, /* @__PURE__ */ new Map()), e.shapeSets.some((s) => s.Name === "Viseme"))) {
5684
- const s = new Array(G);
5685
- for (let i = 0; i < G; i++)
5493
+ const s = new Array(x);
5494
+ for (let i = 0; i < x; i++)
5686
5495
  s[i] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
5687
5496
  this.visemeBuffers.set(e.streamId, {
5688
5497
  frames: s,
@@ -5741,14 +5550,14 @@ class je {
5741
5550
  s.epochTimestampSamples = e.timestampInterleavedSamples;
5742
5551
  const c = this.audioContext;
5743
5552
  if (c) {
5744
- const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p = il + u * 1e3, d = Math.min(al, Math.max(ol, p));
5553
+ const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Vc + u * 1e3, d = Math.min(Hc, Math.max(Wc, f));
5745
5554
  s.playbackStartContextTime = c.currentTime + d / 1e3;
5746
5555
  }
5747
5556
  s.timingEstablished = !0;
5748
5557
  }
5749
5558
  if (e.frameSizeInterleavedSamples > 0) {
5750
5559
  const c = s.frames[s.head];
5751
- c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % G, s.count < G && s.count++;
5560
+ c.samplePosition = e.timestampInterleavedSamples - s.epochTimestampSamples, c.frameSamples = e.frameSizeInterleavedSamples, c.mouthOpenY = a.Values[0], c.mouthForm = a.Values[1], s.head = (s.head + 1) % x, s.count < x && s.count++;
5752
5561
  }
5753
5562
  }
5754
5563
  }
@@ -5864,7 +5673,7 @@ class je {
5864
5673
  }));
5865
5674
  }
5866
5675
  }
5867
- function ul(t) {
5676
+ function Yc(t) {
5868
5677
  return new Worker(
5869
5678
  "" + new URL("assets/video-playback-worker-Bfm3r5xW.js", import.meta.url).href,
5870
5679
  {
@@ -5877,7 +5686,7 @@ const V = L("IkonVideoPlayback");
5877
5686
  function we(t) {
5878
5687
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5879
5688
  }
5880
- class hl {
5689
+ class jc {
5881
5690
  client;
5882
5691
  config;
5883
5692
  enabled = !0;
@@ -5952,7 +5761,7 @@ class hl {
5952
5761
  }
5953
5762
  let e;
5954
5763
  try {
5955
- e = new ul();
5764
+ e = new Yc();
5956
5765
  } catch (r) {
5957
5766
  V.warn(`Failed to create video worker: ${we(r)}`);
5958
5767
  return;
@@ -6066,7 +5875,7 @@ class hl {
6066
5875
  ensureProtocolPort() {
6067
5876
  if (!this.worker || this.protocolPort)
6068
5877
  return;
6069
- const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_VIDEO });
5878
+ const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_VIDEO });
6070
5879
  if (e) {
6071
5880
  this.protocolPort = e;
6072
5881
  try {
@@ -6101,11 +5910,11 @@ class hl {
6101
5910
  }));
6102
5911
  }
6103
5912
  }
6104
- class dl {
5913
+ class zc {
6105
5914
  audio;
6106
5915
  video;
6107
5916
  constructor(e, r) {
6108
- this.audio = new je(e, r?.audio), this.video = new hl(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
5917
+ this.audio = new je(e, r?.audio), this.video = new jc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
6109
5918
  }
6110
5919
  /**
6111
5920
  * Releases media resources (workers, audio graph, decoders).
@@ -6116,7 +5925,7 @@ class dl {
6116
5925
  this.audio.dispose(), this.video.dispose();
6117
5926
  }
6118
5927
  }
6119
- class fl {
5928
+ class Xc {
6120
5929
  static getStorageForCapacity(e, r) {
6121
5930
  const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
6122
5931
  return new SharedArrayBuffer(n + s);
@@ -6170,7 +5979,7 @@ class fl {
6170
5979
  return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
6171
5980
  }
6172
5981
  }
6173
- function pl(t) {
5982
+ function Jc(t) {
6174
5983
  return new Worker(
6175
5984
  "" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
6176
5985
  {
@@ -6179,12 +5988,12 @@ function pl(t) {
6179
5988
  }
6180
5989
  );
6181
5990
  }
6182
- const El = L("IkonAudioCapture");
6183
- function ml() {
5991
+ const Qc = L("IkonAudioCapture");
5992
+ function Zc() {
6184
5993
  const t = globalThis.crypto;
6185
5994
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6186
5995
  }
6187
- function Il() {
5996
+ function qc() {
6188
5997
  return `
6189
5998
  class RingBuffer {
6190
5999
  static getStorageForCapacity(capacity, type) {
@@ -6313,7 +6122,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
6313
6122
  registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
6314
6123
  `;
6315
6124
  }
6316
- class _l {
6125
+ class el {
6317
6126
  constructor(e, r) {
6318
6127
  this.client = e, this.config = r ?? {};
6319
6128
  }
@@ -6333,12 +6142,12 @@ class _l {
6333
6142
  ensureWorker() {
6334
6143
  if (this.worker)
6335
6144
  return this.worker;
6336
- const e = new pl();
6145
+ const e = new Jc();
6337
6146
  return this.worker = e, e.addEventListener("message", (r) => {
6338
6147
  const n = r.data;
6339
6148
  if (n?.type === "error") {
6340
6149
  const s = n.error;
6341
- El.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6150
+ Qc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
6342
6151
  }
6343
6152
  }), e;
6344
6153
  }
@@ -6347,7 +6156,7 @@ class _l {
6347
6156
  throw new Error("Cannot start audio capture before client is connected");
6348
6157
  const r = this.ensureWorker();
6349
6158
  if (!this.sendPort) {
6350
- const n = this.client.createProtocolSendPort({ opcodeGroupsMask: T.GROUP_AUDIO });
6159
+ const n = this.client.createProtocolSendPort({ opcodeGroupsMask: S.GROUP_AUDIO });
6351
6160
  if (!n)
6352
6161
  throw new Error("Failed to create protocol send port for audio capture");
6353
6162
  this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
@@ -6374,9 +6183,9 @@ class _l {
6374
6183
  return await navigator.mediaDevices.getUserMedia({ audio: n });
6375
6184
  }
6376
6185
  async ensureWorklet(e) {
6377
- if (!Rr(e))
6186
+ if (!br(e))
6378
6187
  throw new Error("AudioWorklet is not supported in this browser");
6379
- this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([Il()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6188
+ this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([qc()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
6380
6189
  try {
6381
6190
  await this.workletReady;
6382
6191
  } catch (r) {
@@ -6392,16 +6201,16 @@ class _l {
6392
6201
  if (!i)
6393
6202
  throw s.getTracks().forEach((_) => _.stop()), new Error("No audio track available");
6394
6203
  await this.ensureWorklet(n);
6395
- const o = ml(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), u = n.createGain();
6204
+ const o = Zc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), u = n.createGain();
6396
6205
  u.gain.value = 0, u.connect(n.destination);
6397
6206
  const h = le() ? "sab" : "pcm";
6398
- let f;
6207
+ let E;
6399
6208
  if (h === "sab") {
6400
6209
  const _ = Math.floor(n.sampleRate * 2);
6401
- f = fl.getStorageForCapacity(_, Float32Array);
6210
+ E = Xc.getStorageForCapacity(_, Float32Array);
6402
6211
  }
6403
- const E = this.ensureWorker();
6404
- E.postMessage({
6212
+ const p = this.ensureWorker();
6213
+ p.postMessage({
6405
6214
  type: "start",
6406
6215
  captureId: o,
6407
6216
  senderId: r,
@@ -6413,21 +6222,21 @@ class _l {
6413
6222
  preferWebCodecs: this.config.performance?.preferWebCodecs
6414
6223
  },
6415
6224
  transport: h,
6416
- sharedArrayBuffer: f
6225
+ sharedArrayBuffer: E
6417
6226
  }), await new Promise((_, l) => {
6418
6227
  const N = setTimeout(() => {
6419
- E.removeEventListener("message", S), l(new Error("Audio capture worker start timeout"));
6420
- }, 1e4), S = (v) => {
6228
+ p.removeEventListener("message", w), l(new Error("Audio capture worker start timeout"));
6229
+ }, 1e4), w = (v) => {
6421
6230
  const M = v.data;
6422
6231
  if (M?.type === "started" && M.captureId === o)
6423
- clearTimeout(N), E.removeEventListener("message", S), _();
6232
+ clearTimeout(N), p.removeEventListener("message", w), _();
6424
6233
  else if (M?.type === "error" && M.captureId === o) {
6425
- clearTimeout(N), E.removeEventListener("message", S);
6234
+ clearTimeout(N), p.removeEventListener("message", w);
6426
6235
  const $ = M.error;
6427
6236
  l(new Error($?.message ?? "Audio capture failed to start"));
6428
6237
  }
6429
6238
  };
6430
- E.addEventListener("message", S);
6239
+ p.addEventListener("message", w);
6431
6240
  });
6432
6241
  const I = new AudioWorkletNode(n, "ikon-audio-capture", {
6433
6242
  numberOfInputs: 1,
@@ -6436,17 +6245,17 @@ class _l {
6436
6245
  processorOptions: {
6437
6246
  transport: h,
6438
6247
  channels: 1,
6439
- sharedArrayBuffer: f
6248
+ sharedArrayBuffer: E
6440
6249
  }
6441
6250
  });
6442
6251
  c.connect(I), I.connect(u), h === "pcm" && (I.port.onmessage = (_) => {
6443
6252
  const l = _.data;
6444
6253
  if (!(!l || typeof l != "object") && l.type === "pcm" && l.pcm instanceof Float32Array) {
6445
6254
  const N = l.pcm;
6446
- E.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
6255
+ p.postMessage({ type: "pcm", captureId: o, pcm: N }, [N.buffer]);
6447
6256
  }
6448
6257
  });
6449
- const w = {
6258
+ const T = {
6450
6259
  captureId: o,
6451
6260
  trackId: a,
6452
6261
  stream: s,
@@ -6457,14 +6266,14 @@ class _l {
6457
6266
  gain: u,
6458
6267
  stopped: !1,
6459
6268
  startSegment: () => {
6460
- w.stopped || E.postMessage({ type: "startSegment", captureId: o });
6269
+ T.stopped || p.postMessage({ type: "startSegment", captureId: o });
6461
6270
  },
6462
6271
  endSegment: () => {
6463
- w.stopped || (E.postMessage({ type: "endSegment", captureId: o }), br() && w.stop());
6272
+ T.stopped || (p.postMessage({ type: "endSegment", captureId: o }), Rr() && T.stop());
6464
6273
  },
6465
6274
  stop: async () => {
6466
- if (!w.stopped) {
6467
- w.stopped = !0, this.captures.delete(o);
6275
+ if (!T.stopped) {
6276
+ T.stopped = !0, this.captures.delete(o);
6468
6277
  try {
6469
6278
  c.disconnect();
6470
6279
  } catch {
@@ -6481,20 +6290,20 @@ class _l {
6481
6290
  s.getTracks().forEach((_) => _.stop());
6482
6291
  } catch {
6483
6292
  }
6484
- E.postMessage({ type: "stop", captureId: o });
6293
+ p.postMessage({ type: "stop", captureId: o });
6485
6294
  }
6486
6295
  }
6487
6296
  };
6488
6297
  return i.addEventListener("ended", () => {
6489
- w.stop();
6490
- }), this.captures.set(o, w), {
6298
+ T.stop();
6299
+ }), this.captures.set(o, T), {
6491
6300
  captureId: o,
6492
6301
  get isActive() {
6493
- return !w.stopped;
6302
+ return !T.stopped;
6494
6303
  },
6495
- startSegment: w.startSegment,
6496
- endSegment: w.endSegment,
6497
- stop: w.stop
6304
+ startSegment: T.startSegment,
6305
+ endSegment: T.endSegment,
6306
+ stop: T.stop
6498
6307
  };
6499
6308
  }
6500
6309
  async stop(e) {
@@ -6539,9 +6348,9 @@ class _l {
6539
6348
  }
6540
6349
  }
6541
6350
  }
6542
- const Mr = 1280, Or = 720, Tl = 30, Lr = "image/jpeg", Sl = 0.92;
6543
- async function wl(t, e) {
6544
- const r = e.mime ?? Lr, n = e.quality ?? Sl;
6351
+ const Mr = 1280, Or = 720, tl = 30, Lr = "image/jpeg", rl = 0.92;
6352
+ async function nl(t, e) {
6353
+ const r = e.mime ?? Lr, n = e.quality ?? rl;
6545
6354
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
6546
6355
  try {
6547
6356
  return await t.convertToBlob({ type: r, quality: n });
@@ -6558,7 +6367,7 @@ async function wl(t, e) {
6558
6367
  );
6559
6368
  });
6560
6369
  }
6561
- class Al {
6370
+ class sl {
6562
6371
  async acquireCameraStream(e) {
6563
6372
  if (!navigator.mediaDevices)
6564
6373
  throw new Error("Media devices are not available in this environment");
@@ -6575,9 +6384,9 @@ class Al {
6575
6384
  } catch {
6576
6385
  }
6577
6386
  try {
6578
- await new Promise((f, E) => {
6579
- const I = () => f(), w = () => E(new Error("Failed to load video element"));
6580
- s.addEventListener("loadedmetadata", I, { once: !0 }), s.addEventListener("error", w, { once: !0 });
6387
+ await new Promise((E, p) => {
6388
+ const I = () => E(), T = () => p(new Error("Failed to load video element"));
6389
+ s.addEventListener("loadedmetadata", I, { once: !0 }), s.addEventListener("error", T, { once: !0 });
6581
6390
  });
6582
6391
  try {
6583
6392
  await s.play();
@@ -6588,14 +6397,14 @@ class Al {
6588
6397
  if (typeof OffscreenCanvas < "u")
6589
6398
  u = new OffscreenCanvas(a, c);
6590
6399
  else {
6591
- const f = document.createElement("canvas");
6592
- f.width = a, f.height = c, u = f;
6400
+ const E = document.createElement("canvas");
6401
+ E.width = a, E.height = c, u = E;
6593
6402
  }
6594
- const p = u.getContext("2d", { alpha: !1 });
6595
- if (!p)
6403
+ const f = u.getContext("2d", { alpha: !1 });
6404
+ if (!f)
6596
6405
  throw new Error("2D canvas context unavailable");
6597
- p.drawImage(s, 0, 0, a, c);
6598
- const d = await wl(u, e), h = await d.arrayBuffer();
6406
+ f.drawImage(s, 0, 0, a, c);
6407
+ const d = await nl(u, e), h = await d.arrayBuffer();
6599
6408
  return {
6600
6409
  mime: d.type || e.mime || Lr,
6601
6410
  width: a,
@@ -6622,7 +6431,7 @@ class Al {
6622
6431
  }
6623
6432
  }
6624
6433
  }
6625
- function yl(t) {
6434
+ function il(t) {
6626
6435
  return new Worker(
6627
6436
  "" + new URL("assets/video-capture-worker-BBs_62Fq.js", import.meta.url).href,
6628
6437
  {
@@ -6632,17 +6441,17 @@ function yl(t) {
6632
6441
  );
6633
6442
  }
6634
6443
  const lt = L("IkonVideoCapture");
6635
- function Nl() {
6444
+ function ol() {
6636
6445
  const t = globalThis.crypto;
6637
6446
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
6638
6447
  }
6639
- function gl() {
6448
+ function al() {
6640
6449
  const t = globalThis.MediaStreamTrackProcessor;
6641
6450
  if (!t)
6642
6451
  throw new Error("MediaStreamTrackProcessor is not available in this browser");
6643
6452
  return t;
6644
6453
  }
6645
- class Cl {
6454
+ class cl {
6646
6455
  constructor(e) {
6647
6456
  this.client = e;
6648
6457
  }
@@ -6658,7 +6467,7 @@ class Cl {
6658
6467
  ensureWorker() {
6659
6468
  if (this.worker)
6660
6469
  return this.worker;
6661
- const e = new yl();
6470
+ const e = new il();
6662
6471
  return this.worker = e, e.addEventListener("message", (r) => {
6663
6472
  const n = r.data;
6664
6473
  if (n?.type === "error") {
@@ -6672,20 +6481,20 @@ class Cl {
6672
6481
  throw new Error("Cannot start video capture before client is connected");
6673
6482
  const r = this.ensureWorker();
6674
6483
  if (!this.sendPort) {
6675
- const n = this.client.createProtocolSendPort({ opcodeGroupsMask: T.GROUP_VIDEO });
6484
+ const n = this.client.createProtocolSendPort({ opcodeGroupsMask: S.GROUP_VIDEO });
6676
6485
  if (!n)
6677
6486
  throw new Error("Failed to create protocol send port for video capture");
6678
6487
  this.sendPort = n, r.postMessage({ type: "attachSendPort", port: n.port }, [n.port]);
6679
6488
  }
6680
6489
  if (!this.protocolPort) {
6681
- const n = this.client.createProtocolMessagePort({ opcodeGroupsMask: T.GROUP_VIDEO });
6490
+ const n = this.client.createProtocolMessagePort({ opcodeGroupsMask: S.GROUP_VIDEO });
6682
6491
  n && (this.protocolPort = n, r.postMessage({ type: "attachProtocolPort", port: n.port }, [n.port]));
6683
6492
  }
6684
6493
  }
6685
6494
  async getMediaStream(e) {
6686
6495
  if (!navigator.mediaDevices)
6687
6496
  throw new Error("Media devices are not available in this environment");
6688
- const r = e.constraints ?? {}, n = e.options?.framerate ?? Tl, s = {
6497
+ const r = e.constraints ?? {}, n = e.options?.framerate ?? tl, s = {
6689
6498
  ...r,
6690
6499
  frameRate: r.frameRate ?? { ideal: n }
6691
6500
  };
@@ -6696,11 +6505,11 @@ class Cl {
6696
6505
  if (!r)
6697
6506
  throw new Error("Cannot start video capture before client is connected");
6698
6507
  this.ensurePorts();
6699
- const n = Nl(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6508
+ const n = ol(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
6700
6509
  if (!i)
6701
6510
  throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
6702
- const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u = gl(), d = new u({ track: i }).readable, h = this.allocateTrackId(), f = this.ensureWorker();
6703
- f.postMessage(
6511
+ const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u = al(), d = new u({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
6512
+ E.postMessage(
6704
6513
  {
6705
6514
  type: "start",
6706
6515
  captureId: n,
@@ -6719,26 +6528,26 @@ class Cl {
6719
6528
  },
6720
6529
  [d]
6721
6530
  );
6722
- const E = {
6531
+ const p = {
6723
6532
  captureId: n,
6724
6533
  trackId: h,
6725
6534
  stream: s,
6726
6535
  track: i,
6727
6536
  stopped: !1,
6728
6537
  stop: async () => {
6729
- if (!E.stopped) {
6730
- E.stopped = !0, this.captures.delete(n);
6538
+ if (!p.stopped) {
6539
+ p.stopped = !0, this.captures.delete(n);
6731
6540
  try {
6732
6541
  s.getTracks().forEach((I) => I.stop());
6733
6542
  } catch {
6734
6543
  }
6735
- f.postMessage({ type: "stop", captureId: n });
6544
+ E.postMessage({ type: "stop", captureId: n });
6736
6545
  }
6737
6546
  }
6738
6547
  };
6739
6548
  return i.addEventListener("ended", () => {
6740
- E.stop();
6741
- }), this.captures.set(n, E), { captureId: n, stop: E.stop };
6549
+ p.stop();
6550
+ }), this.captures.set(n, p), { captureId: n, stop: p.stop };
6742
6551
  }
6743
6552
  async startCamera(e) {
6744
6553
  return this.start({ source: "camera", ...e });
@@ -6767,12 +6576,12 @@ class Cl {
6767
6576
  this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
6768
6577
  }
6769
6578
  }
6770
- class bl {
6579
+ class ll {
6771
6580
  audio;
6772
6581
  video;
6773
6582
  image;
6774
6583
  constructor(e, r) {
6775
- this.audio = new _l(e, r?.audio), this.video = new Cl(e), this.image = new Al();
6584
+ this.audio = new el(e, r?.audio), this.video = new cl(e), this.image = new sl();
6776
6585
  }
6777
6586
  dispose() {
6778
6587
  this.audio.dispose(), this.video.dispose();
@@ -6784,7 +6593,7 @@ const ut = {
6784
6593
  [k.WebTransportProxy]: 2,
6785
6594
  [k.WebSocketProxy]: 3
6786
6595
  }, Ae = "ikon_endpoint_type";
6787
- class Rl {
6596
+ class ul {
6788
6597
  isLocal;
6789
6598
  workingEndpointType = null;
6790
6599
  constructor(e) {
@@ -6846,7 +6655,7 @@ class Rl {
6846
6655
  }
6847
6656
  }
6848
6657
  const A = L("IkonClient");
6849
- class Yl {
6658
+ class bl {
6850
6659
  channelManager = null;
6851
6660
  protocolWorker = null;
6852
6661
  workerManagerState = null;
@@ -6907,21 +6716,21 @@ class Yl {
6907
6716
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
6908
6717
  if (r > 1)
6909
6718
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
6910
- this.endpointSelector = new Rl({
6719
+ this.endpointSelector = new ul({
6911
6720
  local: e.local
6912
- }), this._functionRegistry = new Vc(), nt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Fc(this._functionRegistry));
6721
+ }), this._functionRegistry = new yc(), nt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = _c(this._functionRegistry));
6913
6722
  const n = e.audio ? {
6914
6723
  performance: e.audio.performance,
6915
6724
  background: e.audio.background,
6916
6725
  diagnostics: e.audio.diagnostics
6917
6726
  } : void 0, s = e.video ? { performance: e.video.performance } : void 0;
6918
- this._media = new dl(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), nt() && (this._mediaCapture = new bl(this, {
6727
+ this._media = new zc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), nt() && (this._mediaCapture = new ll(this, {
6919
6728
  audio: {
6920
6729
  performance: {
6921
6730
  preferWebCodecs: e.audio?.performance?.preferWebCodecs
6922
6731
  }
6923
6732
  }
6924
- }), this.unregisterMediaCaptureFunctions = jc(this._functionRegistry, this));
6733
+ }), this.unregisterMediaCaptureFunctions = kc(this._functionRegistry, this));
6925
6734
  }
6926
6735
  _lastError = void 0;
6927
6736
  /**
@@ -6986,7 +6795,7 @@ class Yl {
6986
6795
  A.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this.setState("idle");
6987
6796
  }
6988
6797
  sendActionCall(e, r) {
6989
- const n = qr(
6798
+ const n = Zr(
6990
6799
  {
6991
6800
  ActionId: m.fromString(e),
6992
6801
  PayloadJson: r ?? "{}"
@@ -7178,7 +6987,7 @@ class Yl {
7178
6987
  this.notifyMessageSubscribers(e, r, n);
7179
6988
  return;
7180
6989
  }
7181
- if (r === T.CORE_GLOBAL_STATE)
6990
+ if (r === S.CORE_GLOBAL_STATE)
7182
6991
  try {
7183
6992
  this._globalState = Lo(e), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
7184
6993
  } catch (s) {
@@ -7269,37 +7078,39 @@ class Yl {
7269
7078
  let r;
7270
7079
  try {
7271
7080
  r = new Aa();
7272
- } catch (c) {
7273
- A.warn(`Failed to create protocol worker, falling back to main thread: ${c}`), await this.connectProtocolOnMainThread(e);
7081
+ } catch (f) {
7082
+ A.warn(`Failed to create protocol worker, falling back to main thread: ${f}`), await this.connectProtocolOnMainThread(e);
7274
7083
  return;
7275
7084
  }
7276
7085
  this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
7277
- const n = new Promise((c, u) => {
7278
- const p = (d) => {
7279
- const h = d.data;
7280
- if (h?.type === "protocol" && h.message instanceof ArrayBuffer) {
7281
- const f = new Uint8Array(h.message);
7282
- this.handleProtocolMessage(f);
7086
+ const n = new Promise((f, d) => {
7087
+ const h = (E) => {
7088
+ const p = E.data;
7089
+ if (p?.type === "protocol" && p.message instanceof ArrayBuffer) {
7090
+ const I = new Uint8Array(p.message);
7091
+ this.handleProtocolMessage(I);
7283
7092
  return;
7284
7093
  }
7285
- if (h?.type === "state") {
7286
- const f = h.state;
7287
- this.workerManagerState = f;
7288
- const E = h.activeType;
7289
- E !== void 0 && this.endpointSelector.rememberWorkingType(E), this.handleChannelManagerStateChange(f), f === "connected" && c();
7094
+ if (p?.type === "state") {
7095
+ const I = p.state;
7096
+ this.workerManagerState = I;
7097
+ const T = p.activeType;
7098
+ T !== void 0 && this.endpointSelector.rememberWorkingType(T), this.handleChannelManagerStateChange(I), I === "connected" && f();
7290
7099
  return;
7291
7100
  }
7292
- if (h?.type === "error") {
7293
- const f = h.error, E = new Error(String(f?.message ?? "Worker error"));
7294
- E.name = String(f?.name ?? "Error"), u(E);
7101
+ if (p?.type === "error") {
7102
+ const I = p.error, T = new Error(String(I?.message ?? "Worker error"));
7103
+ T.name = String(I?.name ?? "Error"), d(T);
7295
7104
  }
7296
7105
  };
7297
- r.addEventListener("message", p), r.addEventListener("error", (d) => {
7298
- const h = [d.message, d.filename, d.lineno, d.colno].filter((f) => f != null && String(f).length > 0);
7299
- u(new Error(`Protocol worker failed: ${h.join(" ")}`.trim()));
7106
+ r.addEventListener("message", h), r.addEventListener("error", (E) => {
7107
+ const p = [E.message, E.filename, E.lineno, E.colno].filter((I) => I != null && String(I).length > 0);
7108
+ d(new Error(`Protocol worker failed: ${p.join(" ")}`.trim()));
7300
7109
  });
7301
- }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? qe, o = this.config.timeouts?.reconnectBackoffMs ?? Ze, a = this.config.timeouts?.maxReconnectAttempts ?? et;
7302
- this.updateWorkerInterestMask(), this.config.debug?.devtools && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7110
+ }), s = this.computeOrderedEndpointTypes(e), i = this.config.timeouts?.keepaliveTimeoutMs ?? Ze, o = this.config.timeouts?.reconnectBackoffMs ?? qe, a = this.config.timeouts?.maxReconnectAttempts ?? et;
7111
+ this.updateWorkerInterestMask();
7112
+ const c = typeof window < "u" ? new URLSearchParams(window.location.search) : null;
7113
+ (this.config.debug?.devtools || c?.get("devtools") === "true") && r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({
7303
7114
  type: "connect",
7304
7115
  sessionId: this._sessionId,
7305
7116
  entrypoints: e,
@@ -7310,15 +7121,15 @@ class Yl {
7310
7121
  });
7311
7122
  try {
7312
7123
  await n;
7313
- } catch (c) {
7314
- A.warn(`Protocol worker connect failed, falling back to main thread: ${c}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
7124
+ } catch (f) {
7125
+ A.warn(`Protocol worker connect failed, falling back to main thread: ${f}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
7315
7126
  }
7316
7127
  }
7317
7128
  async connectProtocolOnMainThread(e) {
7318
7129
  this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new Oa({
7319
7130
  sessionId: this._sessionId,
7320
- keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? qe,
7321
- reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Ze,
7131
+ keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Ze,
7132
+ reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? qe,
7322
7133
  maxReconnectAttempts: this.config.timeouts?.maxReconnectAttempts ?? et,
7323
7134
  endpointSelector: this.endpointSelector,
7324
7135
  onProtocolMessage: (r) => {
@@ -7357,7 +7168,7 @@ class Yl {
7357
7168
  this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
7358
7169
  return;
7359
7170
  }
7360
- let e = T.GROUP_CORE | T.GROUP_ACTIONS;
7171
+ let e = S.GROUP_CORE | S.GROUP_ACTIONS;
7361
7172
  for (const [, r] of this.messageSubscribers.entries()) {
7362
7173
  if (!r || r.opcodeGroupsMask === void 0) {
7363
7174
  this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
@@ -7446,121 +7257,121 @@ class Yl {
7446
7257
  }
7447
7258
  }
7448
7259
  }
7449
- function jl(t) {
7260
+ function kl(t) {
7450
7261
  return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
7451
7262
  }
7452
- function zl(t) {
7263
+ function Ul(t) {
7453
7264
  return t === "connected";
7454
7265
  }
7455
- function Xl(t) {
7266
+ function Dl(t) {
7456
7267
  return t === "offline" || t === "offlineError" || t === "idle";
7457
7268
  }
7458
- function Jl(t) {
7269
+ function Ml(t) {
7459
7270
  return t === "offlineError";
7460
7271
  }
7461
7272
  const vr = /* @__PURE__ */ new Map();
7462
- for (const [t, e] of Object.entries(T))
7273
+ for (const [t, e] of Object.entries(S))
7463
7274
  typeof e == "number" && vr.set(e, t);
7464
- function Ql(t) {
7275
+ function Ol(t) {
7465
7276
  return vr.get(t) ?? `UNKNOWN_${t}`;
7466
7277
  }
7467
- const Fr = 1e3, Pr = mr.INFO;
7278
+ const Fr = 1e3, Pr = Ir.INFO;
7468
7279
  let O = [], Ue = Fr, Br = Pr, De = null;
7469
- function kl(t) {
7280
+ function hl(t) {
7470
7281
  t.level < Br || (O.push(t), O.length > Ue && (O = O.slice(-Ue)));
7471
7282
  }
7472
- function Ul(t) {
7473
- Ue = t?.maxBufferSize ?? Fr, Br = t?.minLevel ?? Pr, O = [], ga(kl);
7283
+ function dl(t) {
7284
+ Ue = t?.maxBufferSize ?? Fr, Br = t?.minLevel ?? Pr, O = [], ga(hl);
7474
7285
  }
7475
- function ql(t) {
7286
+ function Ll(t) {
7476
7287
  De = t;
7477
7288
  }
7478
- function Zl() {
7289
+ function vl() {
7479
7290
  return O;
7480
7291
  }
7481
- function Dl() {
7292
+ function fl() {
7482
7293
  const t = O;
7483
7294
  return O = [], t;
7484
7295
  }
7485
- function eu() {
7296
+ function Fl() {
7486
7297
  if (!De || O.length === 0)
7487
7298
  return 0;
7488
- const t = Dl();
7299
+ const t = fl();
7489
7300
  return De(t), t.length;
7490
7301
  }
7491
- function tu() {
7302
+ function Pl() {
7492
7303
  O = [];
7493
7304
  }
7494
- function ru() {
7305
+ function Bl() {
7495
7306
  return O.length;
7496
7307
  }
7497
- Ul();
7308
+ dl();
7498
7309
  export {
7499
7310
  y as AuthenticationError,
7500
7311
  Ma as Channel,
7501
7312
  Oa as ChannelManager,
7502
- Ol as ChannelNotFoundError,
7313
+ pl as ChannelNotFoundError,
7503
7314
  X as ClientType,
7504
7315
  Ve as ConnectionError,
7505
7316
  J as ContextType,
7506
- Rl as EndpointSelector,
7317
+ ul as EndpointSelector,
7507
7318
  k as EntrypointType,
7508
- Vc as FunctionRegistry,
7509
- Vl as IKON_AUTH_BASE_URL,
7319
+ yc as FunctionRegistry,
7320
+ yl as IKON_AUTH_BASE_URL,
7510
7321
  rt as IKON_AUTH_URL_DEV,
7511
7322
  tt as IKON_AUTH_URL_PROD,
7512
- Ee as IKON_BACKEND_URL_DEV,
7513
- be as IKON_BACKEND_URL_PROD,
7514
- _l as IkonAudioCapture,
7323
+ pe as IKON_BACKEND_URL_DEV,
7324
+ Re as IKON_BACKEND_URL_PROD,
7325
+ el as IkonAudioCapture,
7515
7326
  je as IkonAudioPlayback,
7516
- Yl as IkonClient,
7517
- Al as IkonImageCapture,
7518
- dl as IkonMedia,
7519
- bl as IkonMediaCapture,
7520
- Cl as IkonVideoCapture,
7521
- hl as IkonVideoPlayback,
7327
+ bl as IkonClient,
7328
+ sl as IkonImageCapture,
7329
+ zc as IkonMedia,
7330
+ ll as IkonMediaCapture,
7331
+ cl as IkonVideoCapture,
7332
+ jc as IkonVideoPlayback,
7522
7333
  We as KeepaliveTimeoutError,
7523
- mr as LogLevel,
7334
+ Ir as LogLevel,
7524
7335
  ya as MaxRetriesExceededError,
7525
- vl as NoChannelsError,
7526
- T as Opcode,
7336
+ ml as NoChannelsError,
7337
+ S as Opcode,
7527
7338
  Na as ProvisioningTimeoutError,
7528
- Ll as SpaceNotFoundError,
7339
+ Il as SpaceNotFoundError,
7529
7340
  W as TransportError,
7530
- q as UserType,
7531
- Ml as asProtocolMessage,
7532
- xl as clearDeviceId,
7533
- tu as clearLogBuffer,
7341
+ Z as UserType,
7342
+ El as asProtocolMessage,
7343
+ wl as clearDeviceId,
7344
+ Pl as clearLogBuffer,
7534
7345
  L as createLogger,
7535
- $l as deriveAuthUrl,
7536
- Hl as deriveBackendType,
7537
- Wl as deriveBackendUrl,
7538
- Gl as extractUserIdFromToken,
7539
- eu as flushLogs,
7540
- Zl as getBufferedLogs,
7541
- ru as getLogBufferSize,
7542
- Pl as getLogLevel,
7543
- Bl as getLogSink,
7544
- Ql as getOpcodeName,
7346
+ Cl as deriveAuthUrl,
7347
+ gl as deriveBackendType,
7348
+ Nl as deriveBackendUrl,
7349
+ Al as extractUserIdFromToken,
7350
+ Fl as flushLogs,
7351
+ vl as getBufferedLogs,
7352
+ Bl as getLogBufferSize,
7353
+ Tl as getLogLevel,
7354
+ Sl as getLogSink,
7355
+ Ol as getOpcodeName,
7545
7356
  $e as getOrCreateDeviceId,
7546
- Ul as initializeLogSink,
7547
- Rr as isAudioWorkletSupported,
7357
+ dl as initializeLogSink,
7358
+ br as isAudioWorkletSupported,
7548
7359
  nt as isBrowserEnvironment,
7549
7360
  Ke as isCloudEnvironment,
7550
- zl as isConnected,
7551
- jl as isConnecting,
7552
- Jl as isError,
7553
- Xl as isOffline,
7361
+ Ul as isConnected,
7362
+ kl as isConnecting,
7363
+ Ml as isError,
7364
+ Dl as isOffline,
7554
7365
  le as isSharedArrayBufferSupported,
7555
- Ir as isWebTransportSupported,
7556
- Kl as parseUrlParams,
7366
+ mr as isWebTransportSupported,
7367
+ Rl as parseUrlParams,
7557
7368
  ue as readOpcode,
7558
7369
  ce as readOpcodeGroup,
7559
7370
  ne as readProtocolMessageHeaders,
7560
- Fc as registerBrowserFunctions,
7561
- Fl as setLogLevel,
7371
+ _c as registerBrowserFunctions,
7372
+ _l as setLogLevel,
7562
7373
  ga as setLogSink,
7563
- ql as setSendLogsCallback,
7564
- Dl as takeBufferedLogs,
7565
- Wc as withResultData
7374
+ Ll as setSendLogsCallback,
7375
+ fl as takeBufferedLogs,
7376
+ Nc as withResultData
7566
7377
  };