@ikonai/sdk 1.0.61 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fa = {
2
2
  Compressed: 8
3
3
  };
4
- function sI(t) {
4
+ function lI(t) {
5
5
  return t;
6
6
  }
7
7
  function Be(t) {
@@ -20,9 +20,9 @@ function Q(t) {
20
20
  if (27 + c * 4 > e.length)
21
21
  throw new Error("Protocol header exceeds payload length");
22
22
  const p = [];
23
- let m = 27;
23
+ let _ = 27;
24
24
  for (let I = 0; I < c; I++)
25
- p.push(n.getUint32(m, !0)), m += 4;
25
+ p.push(n.getUint32(_, !0)), _ += 4;
26
26
  return {
27
27
  length: r,
28
28
  opcode: i,
@@ -57,9 +57,9 @@ async function Ke(t, e, n) {
57
57
  function k(t, e, n, r, i) {
58
58
  const s = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, c = i?.targetIds ?? [], l = i?.payloadType ?? 8, d = 27 + c.length * 4, h = d + e.length, u = new Uint8Array(h), p = new DataView(u.buffer);
59
59
  p.setUint32(0, h, !0), p.setUint32(4, t >>> 0, !0), p.setUint32(8, r >>> 0, !0), p.setUint32(12, s >>> 0, !0), p.setUint32(16, o >>> 0, !0), p.setUint32(20, c.length >>> 0, !0), p.setUint8(24, n & 255), p.setUint8(25, l & 255), p.setUint8(26, a & 255);
60
- let m = 27;
60
+ let _ = 27;
61
61
  for (let I = 0; I < c.length; I++)
62
- p.setUint32(m, c[I] >>> 0, !0), m += 4;
62
+ p.setUint32(_, c[I] >>> 0, !0), _ += 4;
63
63
  return u.set(e, d), u;
64
64
  }
65
65
  async function pa(t) {
@@ -477,7 +477,7 @@ class ma {
477
477
  throw new Error(`Dictionary value type is ${U[this.valueType]}, expected ${U[e]}`);
478
478
  }
479
479
  }
480
- class P {
480
+ class F {
481
481
  constructor(e, n, r) {
482
482
  this.buffer = e, this.version = n, this.offset = r, this.end = e.length - 1;
483
483
  }
@@ -490,7 +490,7 @@ class P {
490
490
  if (n[0] !== ar || n[n.length - 1] !== cr)
491
491
  throw new Error("Teleport object missing markers");
492
492
  const r = { offset: 1 }, i = G(n, r, "InvalidLength");
493
- return new P(n, i, r.offset);
493
+ return new F(n, i, r.offset);
494
494
  }
495
495
  next() {
496
496
  if (this.offset >= this.end)
@@ -587,7 +587,7 @@ class X {
587
587
  return this.ensureType(
588
588
  11
589
589
  /* Object */
590
- ), P.create(this.payload);
590
+ ), F.create(this.payload);
591
591
  }
592
592
  asArray() {
593
593
  return this.ensureType(
@@ -970,7 +970,7 @@ function on(t, e) {
970
970
  }
971
971
  let a = i.offset;
972
972
  for (let c = 0; c < s; c++)
973
- a = Ft(r, t, a, "ArrayMalformed");
973
+ a = Pt(r, t, a, "ArrayMalformed");
974
974
  return a - e;
975
975
  }
976
976
  function an(t, e) {
@@ -983,10 +983,10 @@ function an(t, e) {
983
983
  const i = { offset: e + 2 }, s = G(t, i, "DictMalformed");
984
984
  let o = i.offset;
985
985
  for (let a = 0; a < s; a++)
986
- o = Ft(n, t, o, "DictMalformed"), o = Ft(r, t, o, "DictMalformed");
986
+ o = Pt(n, t, o, "DictMalformed"), o = Pt(r, t, o, "DictMalformed");
987
987
  return o - e;
988
988
  }
989
- function Ft(t, e, n, r) {
989
+ function Pt(t, e, n, r) {
990
990
  const i = Te(t);
991
991
  if (i >= 0)
992
992
  return B(e, n, i), n + i;
@@ -1018,7 +1018,7 @@ let Rt;
1018
1018
  function cn() {
1019
1019
  return Rt === void 0 && (Rt = typeof CompressionStream < "u" && typeof DecompressionStream < "u"), Rt;
1020
1020
  }
1021
- var fe = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Trace = 1] = "Trace", t[t.Debug = 2] = "Debug", t[t.Info = 4] = "Info", t[t.Warning = 8] = "Warning", t[t.Error = 16] = "Error", t[t.Critical = 32] = "Critical", t[t.Event = 64] = "Event", t[t.Usage = 128] = "Usage", t[t.Exception = 256] = "Exception", t))(fe || {}), lr = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(lr || {}), me = /* @__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))(me || {}), Ae = /* @__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))(Ae || {}), y = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t[t.Udp = 512] = "Udp", t[t.UdpDtls = 1024] = "UdpDtls", t))(y || {}), ur = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(ur || {}), ye = /* @__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))(ye || {}), dr = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(dr || {}), ln = /* @__PURE__ */ ((t) => (t[t.Css = 0] = "Css", t[t.Flutter = 1] = "Flutter", t))(ln || {}), Re = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Re || {}), un = /* @__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))(un || {}), dn = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t[t.Dart = 4] = "Dart", t[t.Rust = 5] = "Rust", t))(dn || {}), hr = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(hr || {}), fr = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(fr || {}), 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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", t[t.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", t[t.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", t[t.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", t[t.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
1021
+ var fe = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Trace = 1] = "Trace", t[t.Debug = 2] = "Debug", t[t.Info = 4] = "Info", t[t.Warning = 8] = "Warning", t[t.Error = 16] = "Error", t[t.Critical = 32] = "Critical", t[t.Event = 64] = "Event", t[t.Usage = 128] = "Usage", t[t.Exception = 256] = "Exception", t))(fe || {}), lr = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(lr || {}), me = /* @__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))(me || {}), Ae = /* @__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))(Ae || {}), y = /* @__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[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t[t.Udp = 512] = "Udp", t[t.UdpDtls = 1024] = "UdpDtls", t))(y || {}), ur = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(ur || {}), ye = /* @__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))(ye || {}), dr = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(dr || {}), ln = /* @__PURE__ */ ((t) => (t[t.Css = 0] = "Css", t[t.Flutter = 1] = "Flutter", t))(ln || {}), Re = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(Re || {}), un = /* @__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))(un || {}), dn = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t[t.Dart = 4] = "Dart", t[t.Rust = 5] = "Rust", t))(dn || {}), hr = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(hr || {}), fr = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(fr || {}), 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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", t[t.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", t[t.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", t[t.CORE_ON_FRONTEND_RELOADED = 65563] = "CORE_ON_FRONTEND_RELOADED", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", t[t.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", t[t.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(S || {});
1022
1022
  const pr = 2, Sa = 1048637, Ca = 727023925, Aa = 3395085689, ya = 3748161056;
1023
1023
  function Ra(t) {
1024
1024
  const e = new R(pr);
@@ -1040,7 +1040,7 @@ function Er(t) {
1040
1040
  return t.CallId = w.fromBytes(new Uint8Array(16)), t;
1041
1041
  }
1042
1042
  function Oa(t, e) {
1043
- const n = P.create(t);
1043
+ const n = F.create(t);
1044
1044
  return Ua(n, e);
1045
1045
  }
1046
1046
  function Ua(t, e) {
@@ -1062,7 +1062,7 @@ async function Ma(t, e) {
1062
1062
  const n = await Ke(t, ka);
1063
1063
  return Oa(n, e);
1064
1064
  }
1065
- const mr = 1, Pa = 1048642, Fa = 3748018590;
1065
+ const mr = 1, Fa = 1048642, Pa = 3748018590;
1066
1066
  function Ba(t) {
1067
1067
  const e = {};
1068
1068
  return xa(e), t && Object.assign(e, t), e;
@@ -1075,11 +1075,11 @@ function Wa(t) {
1075
1075
  return Ga(t, e), e.finish();
1076
1076
  }
1077
1077
  function Ga(t, e) {
1078
- e.writeStringField(Fa, t.Path);
1078
+ e.writeStringField(Pa, t.Path);
1079
1079
  }
1080
1080
  function Va(t, e, n) {
1081
1081
  const r = Wa(t);
1082
- return k(Pa, r, mr, e, n);
1082
+ return k(Fa, r, mr, e, n);
1083
1083
  }
1084
1084
  const Ha = 161083277, $a = 265814330, Ka = 1368629611, Ya = 2431514951, ja = 2514959030, za = 2745379226, Xa = 3282782683, Ja = 3284746250, Qa = 4101844078;
1085
1085
  function _r(t) {
@@ -1197,7 +1197,7 @@ function ac(t) {
1197
1197
  e.push(n.asString());
1198
1198
  return e;
1199
1199
  }
1200
- const Ye = 2, gr = 76337612, wr = 185396121, Sr = 250031587, Cr = 388632637, Ar = 417197284, yr = 425972532, Rr = 469070965, br = 470595159, Nr = 594855258, kr = 617065367, Dr = 661691032, vr = 781727218, Or = 834078886, Ur = 1043273762, Lr = 1236999138, Mr = 1286979607, Pr = 1368629611, Fr = 1437068682, Br = 1715899485, xr = 1942830531, Wr = 1999510636, Gr = 2033288346, Vr = 2079864626, Hr = 2142346422, $r = 2228539873, Kr = 2232517119, Yr = 2598291686, jr = 2719718823, zr = 2810953526, Xr = 2840065720, Jr = 2885165957, Qr = 3542818975, Zr = 3586157513, qr = 3717933110, ei = 4062655306;
1200
+ const Ye = 2, gr = 76337612, wr = 185396121, Sr = 250031587, Cr = 388632637, Ar = 417197284, yr = 425972532, Rr = 469070965, br = 470595159, Nr = 594855258, kr = 617065367, Dr = 661691032, vr = 781727218, Or = 834078886, Ur = 1043273762, Lr = 1236999138, Mr = 1286979607, Fr = 1368629611, Pr = 1437068682, Br = 1715899485, xr = 1942830531, Wr = 1999510636, Gr = 2033288346, Vr = 2079864626, Hr = 2142346422, $r = 2228539873, Kr = 2232517119, Yr = 2598291686, jr = 2719718823, zr = 2810953526, Xr = 2840065720, Jr = 2885165957, Qr = 3542818975, Zr = 3586157513, qr = 3717933110, ei = 4062655306;
1201
1201
  function ut(t) {
1202
1202
  const e = {};
1203
1203
  return ti(e), e;
@@ -1206,7 +1206,7 @@ function ti(t) {
1206
1206
  return t.ContextType = Ae.Unknown, t.UserType = Re.Unknown, t.PayloadType = ye.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 = me.Unknown, t.UniqueSessionId = "", t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = dn.Unknown, t.SdkCapability = 0, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t.StyleFormat = ln.Css, t.SupportsCompression = !0, t.IsSoftDisconnected = !1, t.SoftDisconnectAt = 0n, t;
1207
1207
  }
1208
1208
  function je(t, e) {
1209
- e.writeStringField(gr, t.DeviceId), e.writeStringField(wr, t.InstallId), e.writeStringField(Sr, t.Theme), e.writeStringField(Cr, t.UserAgent), e.writeInt32Field(Ar, t.ContextType), e.writeUInt64Field(yr, t.SoftDisconnectAt), e.writeBoolField(Rr, t.HasInput), e.writeInt32Field(br, t.UserType), e.writeStringField(Nr, t.InitialPath), e.writeBoolField(kr, t.IsSoftDisconnected), e.writeBoolField(Dr, t.SupportsCompression), e.writeStringField(vr, t.UserId), e.writeStringField(Or, t.ProductId), e.writeStringField(Ur, t.AuthSessionId), e.writeBoolField(Lr, t.ReceiveAllMessages), e.writeInt32Field(Mr, t.ViewportHeight | 0), e.writeStringField(Pr, t.Description), e.writeInt32Field(Fr, t.SdkCapability | 0), e.writeStringField(Br, t.Locale), e.writeInt32Field(xr, t.SdkType), e.writeInt32Field(Wr, t.SessionId | 0), e.writeInt32Field(Gr, t.ViewportWidth | 0), e.writeUInt64Field(Vr, t.PreciseJoinedAt), e.writeInt32Field(Hr, t.PayloadType), e.writeInt32Field($r, t.StyleFormat), e.writeBoolField(Kr, t.IsTouchDevice), e.writeStringField(Yr, t.VersionId), e.writeStringField(jr, t.UniqueSessionId), e.writeInt32Field(zr, t.ClientType), e.writeBoolField(Xr, t.IsReady), e.writeDictionaryField(Jr, U.String, U.String, (n) => {
1209
+ e.writeStringField(gr, t.DeviceId), e.writeStringField(wr, t.InstallId), e.writeStringField(Sr, t.Theme), e.writeStringField(Cr, t.UserAgent), e.writeInt32Field(Ar, t.ContextType), e.writeUInt64Field(yr, t.SoftDisconnectAt), e.writeBoolField(Rr, t.HasInput), e.writeInt32Field(br, t.UserType), e.writeStringField(Nr, t.InitialPath), e.writeBoolField(kr, t.IsSoftDisconnected), e.writeBoolField(Dr, t.SupportsCompression), e.writeStringField(vr, t.UserId), e.writeStringField(Or, t.ProductId), e.writeStringField(Ur, t.AuthSessionId), e.writeBoolField(Lr, t.ReceiveAllMessages), e.writeInt32Field(Mr, t.ViewportHeight | 0), e.writeStringField(Fr, t.Description), e.writeInt32Field(Pr, t.SdkCapability | 0), e.writeStringField(Br, t.Locale), e.writeInt32Field(xr, t.SdkType), e.writeInt32Field(Wr, t.SessionId | 0), e.writeInt32Field(Gr, t.ViewportWidth | 0), e.writeUInt64Field(Vr, t.PreciseJoinedAt), e.writeInt32Field(Hr, t.PayloadType), e.writeInt32Field($r, t.StyleFormat), e.writeBoolField(Kr, t.IsTouchDevice), e.writeStringField(Yr, t.VersionId), e.writeStringField(jr, t.UniqueSessionId), e.writeInt32Field(zr, t.ClientType), e.writeBoolField(Xr, t.IsReady), e.writeDictionaryField(Jr, U.String, U.String, (n) => {
1210
1210
  const r = t.Parameters;
1211
1211
  for (const i of Object.keys(r)) {
1212
1212
  const s = i, o = r[i];
@@ -1305,12 +1305,12 @@ function cc(t, e) {
1305
1305
  e.ViewportHeight = n.asInt32();
1306
1306
  break;
1307
1307
  }
1308
- case Pr: {
1308
+ case Fr: {
1309
1309
  if (n.isNull) throw new Error();
1310
1310
  e.Description = n.asString();
1311
1311
  break;
1312
1312
  }
1313
- case Fr: {
1313
+ case Pr: {
1314
1314
  if (n.isNull) throw new Error();
1315
1315
  e.SdkCapability = n.asInt32();
1316
1316
  break;
@@ -1477,19 +1477,19 @@ function Sc(t, e) {
1477
1477
  }
1478
1478
  }
1479
1479
  const Cc = 65537, Ac = 166277978, yc = 1482635149, Rc = 1559330978, bc = 1728010665, Nc = 1844681390, kc = 2802434353, Dc = 3085883711, vc = 3669484338, Oc = 3707543140, Uc = 3712281496, Lc = 3823842552, Mc = 3914217035;
1480
- function Pc(t) {
1480
+ function Fc(t) {
1481
1481
  const e = {};
1482
1482
  return ri(e), e;
1483
1483
  }
1484
1484
  function ri(t) {
1485
1485
  return t.ClientContext = ut(), t.ServerContext = ut(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t.ServerSessionId = "", t.KeepaliveTimeoutMs = 0, t.ServerCapability = 0, t;
1486
1486
  }
1487
- function Fc(t, e) {
1488
- const n = P.create(t);
1487
+ function Pc(t, e) {
1488
+ const n = F.create(t);
1489
1489
  return Bc(n, e);
1490
1490
  }
1491
1491
  function Bc(t, e) {
1492
- const n = e ?? Pc();
1492
+ const n = e ?? Fc();
1493
1493
  return ri(n), xc(t, n), n;
1494
1494
  }
1495
1495
  function xc(t, e) {
@@ -1560,7 +1560,7 @@ function xc(t, e) {
1560
1560
  }
1561
1561
  async function Wc(t, e) {
1562
1562
  const n = await Ke(t, Cc);
1563
- return Fc(n, e);
1563
+ return Pc(n, e);
1564
1564
  }
1565
1565
  function Gc(t) {
1566
1566
  const e = [];
@@ -1628,7 +1628,7 @@ function Zc(t, e) {
1628
1628
  }), e.writeGuidField(fi, t.CallId), e.writeGuidField(pi, t.InstanceId);
1629
1629
  }
1630
1630
  function qc(t, e) {
1631
- const n = P.create(t);
1631
+ const n = F.create(t);
1632
1632
  return el(n, e);
1633
1633
  }
1634
1634
  function el(t, e) {
@@ -1807,7 +1807,7 @@ function Rl(t, e) {
1807
1807
  e.writeStringField(Ri, t.ErrorCode), e.writeStringField(bi, t.ErrorTypeName), e.writeStringField(Ni, t.ErrorMessage), e.writeGuidField(ki, t.CallId), e.writeStringField(Di, t.StackTrace), e.writeGuidField(vi, t.InstanceId);
1808
1808
  }
1809
1809
  function bl(t, e) {
1810
- const n = P.create(t);
1810
+ const n = F.create(t);
1811
1811
  return Nl(n, e);
1812
1812
  }
1813
1813
  function Nl(t, e) {
@@ -1858,7 +1858,7 @@ function vl(t, e) {
1858
1858
  const n = Z(t, yi);
1859
1859
  return bl(n, e);
1860
1860
  }
1861
- const hn = 1, Li = 1048600, Mi = 703025676, Pi = 814454131, Fi = 972460562, Bi = 976255570, xi = 1368629611, Wi = 1479280922, Gi = 1533537016, Vi = 1909301063, Hi = 2274386296, $i = 2603556958, Ki = 2885165957, Yi = 3568439632;
1861
+ const hn = 1, Li = 1048600, Mi = 703025676, Fi = 814454131, Pi = 972460562, Bi = 976255570, xi = 1368629611, Wi = 1479280922, Gi = 1533537016, Vi = 1909301063, Hi = 2274386296, $i = 2603556958, Ki = 2885165957, Yi = 3568439632;
1862
1862
  function Ol(t) {
1863
1863
  const e = {};
1864
1864
  return ji(e), e;
@@ -1871,7 +1871,7 @@ function Ul(t) {
1871
1871
  return zi(t, e), e.finish();
1872
1872
  }
1873
1873
  function zi(t, e) {
1874
- e.writeStringField(Mi, t.ResultTypeName), e.writeStringField(Pi, t.FunctionName), e.writeStringField(Fi, t.EnumerableItemTypeName), e.writeGuidField(Bi, t.FunctionId), e.writeStringField(xi, t.Description), e.writeBoolField(Wi, t.IsCancellable), e.writeBoolField(Gi, t.RequiresInstance), e.writeArrayField(Vi, U.String, (n) => {
1874
+ e.writeStringField(Mi, t.ResultTypeName), e.writeStringField(Fi, t.FunctionName), e.writeStringField(Pi, t.EnumerableItemTypeName), e.writeGuidField(Bi, t.FunctionId), e.writeStringField(xi, t.Description), e.writeBoolField(Wi, t.IsCancellable), e.writeBoolField(Gi, t.RequiresInstance), e.writeArrayField(Vi, U.String, (n) => {
1875
1875
  for (const r of t.Versions)
1876
1876
  n.writeString(r);
1877
1877
  }), e.writeBoolField(Hi, t.LlmInlineResult), e.writeBoolField($i, t.IsEnumerable), e.writeArrayField(Ki, U.Object, (n) => {
@@ -1882,7 +1882,7 @@ function zi(t, e) {
1882
1882
  }), e.writeBoolField(Yi, t.LlmCallOnlyOnce);
1883
1883
  }
1884
1884
  function Ll(t, e) {
1885
- const n = P.create(t);
1885
+ const n = F.create(t);
1886
1886
  return _t(n, e);
1887
1887
  }
1888
1888
  function _t(t, e) {
@@ -1898,12 +1898,12 @@ function Ml(t, e) {
1898
1898
  e.ResultTypeName = n.asString();
1899
1899
  break;
1900
1900
  }
1901
- case Pi: {
1901
+ case Fi: {
1902
1902
  if (n.isNull) throw new Error();
1903
1903
  e.FunctionName = n.asString();
1904
1904
  break;
1905
1905
  }
1906
- case Fi: {
1906
+ case Pi: {
1907
1907
  if (n.isNull) throw new Error();
1908
1908
  e.EnumerableItemTypeName = n.asString();
1909
1909
  break;
@@ -1955,11 +1955,11 @@ function Ml(t, e) {
1955
1955
  }
1956
1956
  }
1957
1957
  }
1958
- function Pl(t, e, n) {
1958
+ function Fl(t, e, n) {
1959
1959
  const r = Ul(t);
1960
1960
  return k(Li, r, hn, e, n);
1961
1961
  }
1962
- function Fl(t, e) {
1962
+ function Pl(t, e) {
1963
1963
  const n = Z(t, Li);
1964
1964
  return Ll(n, e);
1965
1965
  }
@@ -2064,7 +2064,7 @@ function Yl(t, e) {
2064
2064
  });
2065
2065
  }
2066
2066
  function jl(t, e) {
2067
- const n = P.create(t);
2067
+ const n = F.create(t);
2068
2068
  return zl(n, e);
2069
2069
  }
2070
2070
  function zl(t, e) {
@@ -2113,7 +2113,7 @@ function eu(t, e) {
2113
2113
  e.writeBinaryField(hs, t.ResultData), e.writeStringField(fs, t.ResultTypeName), e.writeBinaryField(ps, t.ResultTeleport), e.writeStringField(Es, t.ResultJson), e.writeGuidField(ms, t.CallId), e.writeGuidField(_s, t.InstanceId);
2114
2114
  }
2115
2115
  function tu(t, e) {
2116
- const n = P.create(t);
2116
+ const n = F.create(t);
2117
2117
  return nu(n, e);
2118
2118
  }
2119
2119
  function nu(t, e) {
@@ -2234,7 +2234,7 @@ function ks(t) {
2234
2234
  return t.Functions = /* @__PURE__ */ Object.create(null), t;
2235
2235
  }
2236
2236
  function fu(t, e) {
2237
- const n = P.create(t);
2237
+ const n = F.create(t);
2238
2238
  return pu(n, e);
2239
2239
  }
2240
2240
  function pu(t, e) {
@@ -2346,7 +2346,7 @@ function vu(t, e, n) {
2346
2346
  const r = Du();
2347
2347
  return k(Nu, r, Ls, e, n);
2348
2348
  }
2349
- const Ms = 6, Ou = 8388609, Ps = 161083277, Fs = 164808083, Bs = 1368629611, xs = 2514959030, Ws = 2745379226, Gs = 2950031986, Vs = 3282782683, Hs = 3284746250, $s = 4065070594;
2349
+ const Ms = 6, Ou = 8388609, Fs = 161083277, Ps = 164808083, Bs = 1368629611, xs = 2514959030, Ws = 2745379226, Gs = 2950031986, Vs = 3282782683, Hs = 3284746250, $s = 4065070594;
2350
2350
  function fn(t) {
2351
2351
  const e = {};
2352
2352
  return Ks(e), t && Object.assign(e, t), e;
@@ -2359,24 +2359,24 @@ function Uu(t) {
2359
2359
  return Lu(t, e), e.finish();
2360
2360
  }
2361
2361
  function Lu(t, e) {
2362
- e.writeStringField(Ps, t.StreamId), e.writeFloat64Field(Fs, t.Framerate), e.writeStringField(Bs, t.Description);
2362
+ e.writeStringField(Fs, t.StreamId), e.writeFloat64Field(Ps, t.Framerate), e.writeStringField(Bs, t.Description);
2363
2363
  const n = t.CorrelationId;
2364
2364
  n != null && e.writeStringField(xs, n), e.writeStringField(Ws, t.CodecDetails), e.writeInt32Field(Gs, t.Height | 0), e.writeStringField(Vs, t.SourceType), e.writeInt32Field(Hs, t.Codec), e.writeInt32Field($s, t.Width | 0);
2365
2365
  }
2366
2366
  function Mu(t, e) {
2367
2367
  const n = e ?? fn();
2368
- return Ks(n), Pu(t, n), n;
2368
+ return Ks(n), Fu(t, n), n;
2369
2369
  }
2370
- function Pu(t, e) {
2370
+ function Fu(t, e) {
2371
2371
  let n;
2372
2372
  for (; (n = t.next()) !== null; )
2373
2373
  switch (n.fieldId) {
2374
- case Ps: {
2374
+ case Fs: {
2375
2375
  if (n.isNull) throw new Error();
2376
2376
  e.StreamId = n.asString();
2377
2377
  break;
2378
2378
  }
2379
- case Fs: {
2379
+ case Ps: {
2380
2380
  if (n.isNull) throw new Error();
2381
2381
  e.Framerate = n.asFloat64();
2382
2382
  break;
@@ -2421,7 +2421,7 @@ function Pu(t, e) {
2421
2421
  }
2422
2422
  }
2423
2423
  }
2424
- function Fu(t, e, n) {
2424
+ function Pu(t, e, n) {
2425
2425
  const r = Uu(t);
2426
2426
  return k(Ou, r, Ms, e, n);
2427
2427
  }
@@ -2457,7 +2457,7 @@ function zs(t) {
2457
2457
  return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ServerSessionId = "", t.SessionHash = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = hr.Local, t.AppSourceType = fr.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
2458
2458
  }
2459
2459
  function fd(t, e) {
2460
- const n = P.create(t);
2460
+ const n = F.create(t);
2461
2461
  return pd(n, e);
2462
2462
  }
2463
2463
  function pd(t, e) {
@@ -2620,7 +2620,7 @@ function wd(t) {
2620
2620
  let n;
2621
2621
  for (; (n = t.next()) !== null; ) {
2622
2622
  const r = n.key.asString();
2623
- e[r] = Pd(n.value.asObject());
2623
+ e[r] = Fd(n.value.asObject());
2624
2624
  }
2625
2625
  return e;
2626
2626
  }
@@ -2686,11 +2686,11 @@ function Md(t) {
2686
2686
  function Js(t) {
2687
2687
  return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _r(), t;
2688
2688
  }
2689
- function Pd(t, e) {
2689
+ function Fd(t, e) {
2690
2690
  const n = e ?? Md();
2691
- return Js(n), Fd(t, n), n;
2691
+ return Js(n), Pd(t, n), n;
2692
2692
  }
2693
- function Fd(t, e) {
2693
+ function Pd(t, e) {
2694
2694
  let n;
2695
2695
  for (; (n = t.next()) !== null; )
2696
2696
  switch (n.fieldId) {
@@ -2823,7 +2823,7 @@ function ro(t) {
2823
2823
  return t.Events = [], t;
2824
2824
  }
2825
2825
  function ah(t, e) {
2826
- const n = P.create(t);
2826
+ const n = F.create(t);
2827
2827
  return ch(n, e);
2828
2828
  }
2829
2829
  function ch(t, e) {
@@ -2932,11 +2932,11 @@ function Mh(t, e) {
2932
2932
  je(t.ClientContext, n);
2933
2933
  });
2934
2934
  }
2935
- function Ph(t, e, n) {
2935
+ function Fh(t, e, n) {
2936
2936
  const r = Lh(t);
2937
2937
  return k(Oh, r, co, e, n);
2938
2938
  }
2939
- const lo = 1, Fh = 65542, Bh = 2802434353;
2939
+ const lo = 1, Ph = 65542, Bh = 2802434353;
2940
2940
  function xh(t) {
2941
2941
  const e = new R(lo);
2942
2942
  return Wh(t, e), e.finish();
@@ -2948,7 +2948,7 @@ function Wh(t, e) {
2948
2948
  }
2949
2949
  function Gh(t, e, n) {
2950
2950
  const r = xh(t);
2951
- return k(Fh, r, lo, e, n);
2951
+ return k(Ph, r, lo, e, n);
2952
2952
  }
2953
2953
  const uo = 1, Vh = 65558, Hh = 250031587, $h = 1286979607, Kh = 2033288346, Yh = 3542818975;
2954
2954
  function jh(t) {
@@ -2978,7 +2978,7 @@ function fo(t) {
2978
2978
  return t.Sdp = "", t.IceServersJson = "", t;
2979
2979
  }
2980
2980
  function tf(t, e) {
2981
- const n = P.create(t);
2981
+ const n = F.create(t);
2982
2982
  return nf(n, e);
2983
2983
  }
2984
2984
  function nf(t, e) {
@@ -3041,7 +3041,7 @@ function ff(t, e) {
3041
3041
  e.writeStringField(mo, t.Candidate), e.writeStringField(_o, t.SdpMid), e.writeInt32Field(Io, t.SdpMLineIndex | 0);
3042
3042
  }
3043
3043
  function pf(t, e) {
3044
- const n = P.create(t);
3044
+ const n = F.create(t);
3045
3045
  return Ef(n, e);
3046
3046
  }
3047
3047
  function Ef(t, e) {
@@ -3105,14 +3105,14 @@ function Co(t) {
3105
3105
  return t.Success = !0, t.ErrorMessage = "", t;
3106
3106
  }
3107
3107
  function Lf(t, e) {
3108
- const n = P.create(t);
3108
+ const n = F.create(t);
3109
3109
  return Mf(n, e);
3110
3110
  }
3111
3111
  function Mf(t, e) {
3112
3112
  const n = e ?? Uf();
3113
- return Co(n), Pf(t, n), n;
3113
+ return Co(n), Ff(t, n), n;
3114
3114
  }
3115
- function Pf(t, e) {
3115
+ function Ff(t, e) {
3116
3116
  let n;
3117
3117
  for (; (n = t.next()) !== null; )
3118
3118
  switch (n.fieldId) {
@@ -3128,7 +3128,7 @@ function Pf(t, e) {
3128
3128
  }
3129
3129
  }
3130
3130
  }
3131
- function Ff(t, e) {
3131
+ function Pf(t, e) {
3132
3132
  const n = Z(t, So);
3133
3133
  return Lf(n, e);
3134
3134
  }
@@ -3141,7 +3141,7 @@ function yo(t) {
3141
3141
  return t.Kind = "", t.TrackIndex = 0, t.SenderId = 0, t.SenderTrackId = 0, t.StreamId = "", t.SourceType = "", t.Active = !0, t;
3142
3142
  }
3143
3143
  function Yf(t, e) {
3144
- const n = P.create(t);
3144
+ const n = F.create(t);
3145
3145
  return jf(n, e);
3146
3146
  }
3147
3147
  function jf(t, e) {
@@ -3238,7 +3238,7 @@ class pe extends $ {
3238
3238
  super(e, n), this.name = "AuthRejectedError";
3239
3239
  }
3240
3240
  }
3241
- class Pn extends It {
3241
+ class Fn extends It {
3242
3242
  constructor(e) {
3243
3243
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
3244
3244
  }
@@ -3248,17 +3248,17 @@ class bo extends L {
3248
3248
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
3249
3249
  }
3250
3250
  }
3251
- class oI extends L {
3251
+ class uI extends L {
3252
3252
  constructor(e) {
3253
3253
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
3254
3254
  }
3255
3255
  }
3256
- class aI extends L {
3256
+ class dI extends L {
3257
3257
  constructor(e) {
3258
3258
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
3259
3259
  }
3260
3260
  }
3261
- class cI extends L {
3261
+ class hI extends L {
3262
3262
  constructor() {
3263
3263
  super("No channels available in this space"), this.name = "NoChannelsError";
3264
3264
  }
@@ -3292,22 +3292,22 @@ function No(t, e) {
3292
3292
  e?.addEventListener("abort", i, { once: !0 });
3293
3293
  });
3294
3294
  }
3295
- var te = /* @__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))(te || {});
3295
+ var ne = /* @__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))(ne || {});
3296
3296
  let mn = 1, ht = null;
3297
3297
  const xt = /* @__PURE__ */ new Map();
3298
3298
  function ko(t) {
3299
3299
  mn = t;
3300
3300
  }
3301
- function Fn() {
3301
+ function Pn() {
3302
3302
  return mn;
3303
3303
  }
3304
3304
  function sp(t) {
3305
3305
  ht = t;
3306
3306
  }
3307
- function lI() {
3307
+ function fI() {
3308
3308
  return ht;
3309
3309
  }
3310
- function uI(t, e) {
3310
+ function pI(t, e) {
3311
3311
  return xt.set(t, e ?? {
3312
3312
  minLevel: 2
3313
3313
  /* WARN */
@@ -3377,7 +3377,7 @@ function M(t) {
3377
3377
  }
3378
3378
  };
3379
3379
  }
3380
- const cp = "ikon-proxy", lp = "ikon-websocket", up = "ikon-webtransport", Do = "ikon-debug", dp = "ikon-lang", vo = "ikon-server-url", dI = "ikon-git-source", hI = "ikon-git-branch", hp = "ikon-audio", fp = "ikon-video", pp = "ikon-webrtc", Oo = "ikon-inspect", Ep = "ikon-debug-overlay", mp = "ikon-auth", _p = "ikon-retry", Ip = "ikon-api";
3380
+ const cp = "ikon-proxy", lp = "ikon-websocket", up = "ikon-webtransport", Do = "ikon-debug", dp = "ikon-lang", vo = "ikon-server-url", EI = "ikon-git-source", mI = "ikon-git-branch", hp = "ikon-audio", fp = "ikon-video", pp = "ikon-webrtc", Oo = "ikon-inspect", Ep = "ikon-debug-overlay", mp = "ikon-auth", _p = "ikon-retry", Ip = "ikon-api";
3381
3381
  function wt(t, e) {
3382
3382
  if (typeof window > "u")
3383
3383
  return null;
@@ -3409,7 +3409,7 @@ function wp() {
3409
3409
  function Sp() {
3410
3410
  return Y(Do) === !0;
3411
3411
  }
3412
- function fI() {
3412
+ function _I() {
3413
3413
  return wt(dp);
3414
3414
  }
3415
3415
  function Cp() {
@@ -3427,14 +3427,14 @@ function bt() {
3427
3427
  function Rp() {
3428
3428
  return Y(Oo) === !0;
3429
3429
  }
3430
- function pI() {
3430
+ function II() {
3431
3431
  return Y(Ep) === !0;
3432
3432
  }
3433
3433
  function bp() {
3434
3434
  const t = wt(mp);
3435
3435
  return t === "true" || t === "same";
3436
3436
  }
3437
- function oe() {
3437
+ function te() {
3438
3438
  return Y(_p) !== !1;
3439
3439
  }
3440
3440
  function Np() {
@@ -3493,8 +3493,8 @@ class Dp {
3493
3493
  }
3494
3494
  if (this.isClosed)
3495
3495
  return;
3496
- const p = u.wasClean && (u.code === 1e3 || u.code === 1001), m = u.reason || `code=${u.code}`;
3497
- this.callbacks.onClose(m, p);
3496
+ const p = u.wasClean && (u.code === 1e3 || u.code === 1001), _ = u.reason || `code=${u.code}`;
3497
+ this.callbacks.onClose(_, p);
3498
3498
  }, this.ws.onmessage = (u) => {
3499
3499
  this.handleProtocolMessage(new Uint8Array(u.data));
3500
3500
  };
@@ -3890,8 +3890,8 @@ class Lp {
3890
3890
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
3891
3891
  }
3892
3892
  }
3893
- const F = M("ChannelManager"), Mp = 5e3;
3894
- class Pp {
3893
+ const P = M("ChannelManager"), Mp = 5e3;
3894
+ class Fp {
3895
3895
  channels = /* @__PURE__ */ new Map();
3896
3896
  // keyed by opcode group
3897
3897
  activeType = null;
@@ -3947,7 +3947,7 @@ class Pp {
3947
3947
  i.send(e);
3948
3948
  return;
3949
3949
  }
3950
- this.state === "connected" && F.warn("No channel found for message");
3950
+ this.state === "connected" && P.warn("No channel found for message");
3951
3951
  }
3952
3952
  /**
3953
3953
  * Send a protocol message to all channels (for broadcast messages).
@@ -3975,7 +3975,7 @@ class Pp {
3975
3975
  */
3976
3976
  triggerReconnect(e) {
3977
3977
  if (this.state === "connected") {
3978
- F.debug(`Forcing reconnect: ${e}`);
3978
+ P.debug(`Forcing reconnect: ${e}`);
3979
3979
  for (const n of this.channels.values())
3980
3980
  n.triggerReconnect(e);
3981
3981
  }
@@ -3994,30 +3994,30 @@ class Pp {
3994
3994
  const s = new Set(r.keys());
3995
3995
  i = this.config.orderedEndpointTypes.filter((o) => s.has(o));
3996
3996
  } else this.config.endpointSelector ? i = this.config.endpointSelector.getOrderedTypes(r) : i = Array.from(r.keys());
3997
- this.connectionTimeoutMs = i.length > 1 ? 5e3 : 1e4, F.debug(`Endpoint types to try: [${i.map((s) => y[s]).join(", ")}], transport timeout: ${this.connectionTimeoutMs}ms`);
3997
+ this.connectionTimeoutMs = i.length > 1 ? 5e3 : 1e4, P.debug(`Endpoint types to try: [${i.map((s) => y[s]).join(", ")}], transport timeout: ${this.connectionTimeoutMs}ms`);
3998
3998
  for (const s of i) {
3999
3999
  if (!this.shouldReconnect)
4000
4000
  return;
4001
4001
  const o = r.get(s), a = Date.now();
4002
- F.debug(`Trying ${y[s]} (${o.length} channel(s))`);
4002
+ P.debug(`Trying ${y[s]} (${o.length} channel(s))`);
4003
4003
  try {
4004
- await this.connectAllChannels(o), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, F.debug(`Connected via ${y[s]} in ${Date.now() - a}ms`), this.setState("connected"), this.startStabilityTimer();
4004
+ await this.connectAllChannels(o), this.config.endpointSelector?.rememberWorkingType(s), this.config.onRememberWorkingType?.(s), this.activeType = s, P.debug(`Connected via ${y[s]} in ${Date.now() - a}ms`), this.setState("connected"), this.startStabilityTimer();
4005
4005
  return;
4006
4006
  } catch (c) {
4007
- F.warn(`Failed to connect using ${y[s]} after ${Date.now() - a}ms: ${c instanceof Error ? c.message : c}`);
4007
+ P.warn(`Failed to connect using ${y[s]} after ${Date.now() - a}ms: ${c instanceof Error ? c.message : c}`);
4008
4008
  const l = this.channels.size > 0;
4009
4009
  if (this.disconnectAll(), c instanceof pe)
4010
4010
  throw c;
4011
4011
  if (l && this.config.onRefreshEntrypoints)
4012
4012
  try {
4013
- F.info("Partial connection detected, refreshing entrypoints");
4013
+ P.info("Partial connection detected, refreshing entrypoints");
4014
4014
  const d = await this.config.onRefreshEntrypoints();
4015
4015
  this.entrypoints = d.entrypoints, this.config.sessionId = d.sessionId;
4016
4016
  const h = d.entrypoints.filter((p) => p.Type !== y.WebRTC), u = this.groupByType(h);
4017
- for (const [p, m] of u)
4018
- r.set(p, m);
4017
+ for (const [p, _] of u)
4018
+ r.set(p, _);
4019
4019
  } catch (d) {
4020
- F.warn(`Failed to refresh entrypoints: ${d}`);
4020
+ P.warn(`Failed to refresh entrypoints: ${d}`);
4021
4021
  }
4022
4022
  }
4023
4023
  }
@@ -4085,7 +4085,7 @@ class Pp {
4085
4085
  * dropped, and we reconnect.
4086
4086
  */
4087
4087
  handleChannelClose(e, n, r) {
4088
- this.state === "idle" || this.state === "stopped" || this.state === "offline" || this.channels.has(e) && this.state === "connected" && (F.warn("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
4088
+ this.state === "idle" || this.state === "stopped" || this.state === "offline" || this.channels.has(e) && this.state === "connected" && (P.warn("Channel closed unexpectedly, attempting reconnect"), this.disconnectAll(), this.attemptReconnect());
4089
4089
  }
4090
4090
  /**
4091
4091
  * Attempt to reconnect with fixed-interval retry.
@@ -4093,20 +4093,20 @@ class Pp {
4093
4093
  */
4094
4094
  async attemptReconnect() {
4095
4095
  if (this.shouldReconnect) {
4096
- if (!oe()) {
4097
- F.warn("Retry disabled via ikon-retry=false, skipping reconnect"), this.setState("offline"), this.config.onError?.(new Pn(0));
4096
+ if (!te()) {
4097
+ P.warn("Retry disabled via ikon-retry=false, skipping reconnect"), this.setState("offline"), this.config.onError?.(new Fn(0));
4098
4098
  return;
4099
4099
  }
4100
4100
  if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
4101
- F.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Pn(this.config.maxReconnectAttempts));
4101
+ P.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Fn(this.config.maxReconnectAttempts));
4102
4102
  return;
4103
4103
  }
4104
- if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (F.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await No(this.config.reconnectBackoffMs, this.abortController?.signal)) : F.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
4104
+ if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (P.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await No(this.config.reconnectBackoffMs, this.abortController?.signal)) : P.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
4105
4105
  try {
4106
4106
  await this.connectInternal(!0);
4107
4107
  } catch (e) {
4108
4108
  if (e instanceof pe) {
4109
- F.warn("Auth rejected during reconnect, stopping retries and signaling full re-auth"), this.config.onError?.(e), this.setState("offline");
4109
+ P.warn("Auth rejected during reconnect, stopping retries and signaling full re-auth"), this.config.onError?.(e), this.setState("offline");
4110
4110
  return;
4111
4111
  }
4112
4112
  await this.attemptReconnect();
@@ -4136,7 +4136,7 @@ class Pp {
4136
4136
  this.stabilityTimer && (clearTimeout(this.stabilityTimer), this.stabilityTimer = null);
4137
4137
  }
4138
4138
  }
4139
- const EI = "opus", mI = 48e3, _I = 2, II = 64e3, Fp = 150, TI = "VP8", Bp = 5e6, gI = 30, xp = 0.05, Wp = "max-bundle", Gp = "require", Vp = 16, Hp = 16, $p = "ikon-data", Kp = !1, Yp = 0, V = M("WebRTCConnection");
4139
+ const TI = "opus", gI = 48e3, wI = 2, SI = 64e3, Pp = 150, CI = "VP8", Bp = 5e6, AI = 30, xp = 0.05, Wp = "max-bundle", Gp = "require", Vp = 16, Hp = 16, $p = "ikon-data", Kp = !1, Yp = 0, V = M("WebRTCConnection");
4140
4140
  class jp {
4141
4141
  pc = null;
4142
4142
  dataChannel = null;
@@ -4258,7 +4258,7 @@ class jp {
4258
4258
  }, this.pc.ontrack = (e) => {
4259
4259
  const n = e.track;
4260
4260
  if (n.kind === "audio") {
4261
- const r = Fp;
4261
+ const r = Pp;
4262
4262
  try {
4263
4263
  e.receiver.jitterBufferTarget = r;
4264
4264
  } catch (o) {
@@ -4488,7 +4488,7 @@ class zp {
4488
4488
  Framerate: s,
4489
4489
  CorrelationId: o
4490
4490
  });
4491
- this.sendMessage(Fu(a, this.config.sessionId, { trackId: n }));
4491
+ this.sendMessage(Pu(a, this.config.sessionId, { trackId: n }));
4492
4492
  }
4493
4493
  sendVideoStreamEnd(e) {
4494
4494
  if (!this.sendMessage) return;
@@ -4575,7 +4575,7 @@ class zp {
4575
4575
  }
4576
4576
  handleReady(e) {
4577
4577
  try {
4578
- const n = Ff(e);
4578
+ const n = Pf(e);
4579
4579
  n.Success ? (N.debug("WebRTC connection ready"), this.isConnecting = !1) : (N.error(`WebRTC connection failed (server): ${n.ErrorMessage}`), this.disconnect());
4580
4580
  } catch (n) {
4581
4581
  N.error("Failed to handle WebRTC ready:", n);
@@ -4592,20 +4592,20 @@ class zp {
4592
4592
  }
4593
4593
  const Xp = 5e3, Jp = 18e4, Qp = 3e4, xn = 2e3, Wn = 2, Zp = 5e3, Mo = 6e4, qp = 300 * 1e3, eE = 10 * 1e3, Wt = "ikon.login.pendingCall", Gt = /* @__PURE__ */ new Set();
4594
4594
  let _n = { required: !1, reason: null };
4595
- function Po() {
4595
+ function Fo() {
4596
4596
  for (const t of Gt)
4597
4597
  t();
4598
4598
  }
4599
- function wI() {
4599
+ function yI() {
4600
4600
  return _n;
4601
4601
  }
4602
- function Fo(t) {
4603
- _n = { required: !0, reason: t }, Po();
4602
+ function Po(t) {
4603
+ _n = { required: !0, reason: t }, Fo();
4604
4604
  }
4605
- function SI() {
4606
- _n = { required: !1, reason: null }, Po();
4605
+ function RI() {
4606
+ _n = { required: !1, reason: null }, Fo();
4607
4607
  }
4608
- function CI(t) {
4608
+ function bI(t) {
4609
4609
  return Gt.add(t), () => Gt.delete(t);
4610
4610
  }
4611
4611
  function tE(t) {
@@ -4902,7 +4902,7 @@ const ME = {
4902
4902
  description: "Exit browser fullscreen mode",
4903
4903
  returnType: { kind: "boolean" }
4904
4904
  };
4905
- function PE() {
4905
+ function FE() {
4906
4906
  if (typeof document > "u")
4907
4907
  return !1;
4908
4908
  try {
@@ -4912,7 +4912,7 @@ function PE() {
4912
4912
  return !1;
4913
4913
  }
4914
4914
  }
4915
- const FE = {
4915
+ const PE = {
4916
4916
  name: "ikon.client.logout",
4917
4917
  description: "Clear the auth session and return to the login screen at the site root",
4918
4918
  returnType: { kind: "boolean" }
@@ -4933,7 +4933,7 @@ const xE = {
4933
4933
  returnType: { kind: "boolean" }
4934
4934
  };
4935
4935
  function WE(t) {
4936
- return typeof window > "u" ? !1 : (Fo(typeof t == "string" ? t : null), !0);
4936
+ return typeof window > "u" ? !1 : (Po(typeof t == "string" ? t : null), !0);
4937
4937
  }
4938
4938
  const GE = {
4939
4939
  name: "ikon.client.getLocation",
@@ -5093,8 +5093,8 @@ const qE = [
5093
5093
  { definition: kE, handler: DE },
5094
5094
  { definition: vE, handler: OE },
5095
5095
  { definition: UE, handler: LE },
5096
- { definition: ME, handler: PE },
5097
- { definition: FE, handler: BE },
5096
+ { definition: ME, handler: FE },
5097
+ { definition: PE, handler: BE },
5098
5098
  { definition: xE, handler: WE },
5099
5099
  { definition: GE, handler: VE },
5100
5100
  { definition: YE, handler: jE },
@@ -5164,7 +5164,7 @@ function At() {
5164
5164
  return Dt();
5165
5165
  }
5166
5166
  }
5167
- function AI() {
5167
+ function NI() {
5168
5168
  if (!(typeof localStorage > "u"))
5169
5169
  try {
5170
5170
  localStorage.removeItem(Kt);
@@ -5181,7 +5181,7 @@ function nm(t) {
5181
5181
  return null;
5182
5182
  }
5183
5183
  }
5184
- const ft = {}, Yt = "https://api.prod.ikon.live", jt = "https://api.dev.ikon.live", vt = "https://auth.ikonai.com", Ot = "https://auth.dev.ikonai.com", yI = "https://auth.ikonai.com", rm = [".ikonai.app", ".ikonai.com", ".ikonai.run", ".ikon.live"];
5184
+ const ft = {}, Yt = "https://api.prod.ikon.live", jt = "https://api.dev.ikon.live", vt = "https://auth.ikonai.com", Ot = "https://auth.dev.ikonai.com", kI = "https://auth.ikonai.com", rm = [".ikonai.app", ".ikonai.com", ".ikonai.run", ".ikon.live"];
5185
5185
  function Cn(t) {
5186
5186
  return rm.some((n) => t.endsWith(n)) ? t.includes(".dev.") ? "development" : "production" : null;
5187
5187
  }
@@ -5223,7 +5223,7 @@ function Ut(t) {
5223
5223
  const n = Go();
5224
5224
  return n || (typeof window > "u" ? Yt : ze() ? (Cn(window.location.hostname) ?? Me ?? "production") === "development" ? jt : Yt : jt);
5225
5225
  }
5226
- function RI() {
5226
+ function DI() {
5227
5227
  const t = typeof import.meta < "u" ? ft.VITE_IKON_BACKEND_TYPE : void 0;
5228
5228
  if (t === "development" || t === "production")
5229
5229
  return t;
@@ -5254,7 +5254,7 @@ function yt() {
5254
5254
  return e;
5255
5255
  }
5256
5256
  const lm = ["ikon_token", "ikon_provider", "error"];
5257
- function bI() {
5257
+ function vI() {
5258
5258
  if (typeof window > "u")
5259
5259
  return { parameters: {} };
5260
5260
  const t = window.location.pathname;
@@ -5284,7 +5284,7 @@ function ze() {
5284
5284
  function An() {
5285
5285
  return typeof window > "u" ? "" : window.location.pathname.replace(/^\/(s|c)\/[^/]+/, "") || "/";
5286
5286
  }
5287
- function NI() {
5287
+ function OI() {
5288
5288
  if (typeof window > "u") return;
5289
5289
  const t = window.location.pathname, e = t.match(/^\/s\/[^/]+/), n = t.match(/^\/c\/[^/]+/);
5290
5290
  if (e || n) {
@@ -5506,8 +5506,8 @@ async function Sm(t, e) {
5506
5506
  const u = (await d.json()).token;
5507
5507
  if (!u)
5508
5508
  throw new L("Server did not return a token");
5509
- const p = `${n}/connect?token=${encodeURIComponent(u)}`, m = await Ee(p, e);
5510
- return m.directUrl = p, m.backendUrl = Ut(t.backendUrl), m.authToken = a, m;
5509
+ const p = `${n}/connect?token=${encodeURIComponent(u)}`, _ = await Ee(p, e);
5510
+ return _.directUrl = p, _.backendUrl = Ut(t.backendUrl), _.authToken = a, _;
5511
5511
  }
5512
5512
  async function Cm(t, e, n = "auto", r = !1) {
5513
5513
  if (t.sessionId && t.channelKey)
@@ -5533,10 +5533,10 @@ async function Cm(t, e, n = "auto", r = !1) {
5533
5533
  const a = (await s.json()).token;
5534
5534
  if (!a)
5535
5535
  throw new L("Backend did not return a token");
5536
- const c = yt(), l = t.provisioningTimeoutMs ?? Mo, d = { ...c, ...t.parameters }, h = In(), u = oe() ? $o : 1;
5536
+ const c = yt(), l = t.provisioningTimeoutMs ?? Mo, d = { ...c, ...t.parameters }, h = In(), u = te() ? $o : 1;
5537
5537
  for (let p = 0; p < u; p++)
5538
5538
  try {
5539
- const m = {
5539
+ const _ = {
5540
5540
  space: t.spaceId,
5541
5541
  key: t.channelKey,
5542
5542
  hash: t.sessionId,
@@ -5567,15 +5567,15 @@ async function Cm(t, e, n = "auto", r = !1) {
5567
5567
  sdkType: 2,
5568
5568
  sdkCapability: yn,
5569
5569
  supportsCompression: cn()
5570
- }, I = e ? Ct([e, le(l)]) : le(l), T = await Yo(i, m, a, I);
5570
+ }, I = e ? Ct([e, le(l)]) : le(l), T = await Yo(i, _, a, I);
5571
5571
  if (T.state?.toLowerCase() !== "running" || !T.configuration?.url)
5572
5572
  throw new bo(l);
5573
5573
  const E = await jo(T.configuration.url, T.configuration.proxyUrl, n, r, I);
5574
5574
  return E.backendUrl = i, E.authToken = a, E.brandingRequired = T.configuration.brandingRequired ?? !1, xo(T.configuration.push), E;
5575
- } catch (m) {
5576
- if (m instanceof Tt || m instanceof gt || p === u - 1)
5577
- throw m;
5578
- H.debug(`Init attempt ${p + 1}/${u} failed, retrying: ${m}`);
5575
+ } catch (_) {
5576
+ if (_ instanceof Tt || _ instanceof gt || p === u - 1)
5577
+ throw _;
5578
+ H.debug(`Init attempt ${p + 1}/${u} failed, retrying: ${_}`);
5579
5579
  }
5580
5580
  throw new L("Failed to init after all attempts");
5581
5581
  }
@@ -5584,7 +5584,7 @@ async function Am(t, e, n = "auto", r = !1) {
5584
5584
  throw new L("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
5585
5585
  const i = Vo(t.backendType), s = t.token;
5586
5586
  H.debug(`Authenticating with session token to: ${i}, space ID: ${t.spaceId}`);
5587
- const o = yt(), a = t.provisioningTimeoutMs ?? Mo, c = { ...o, ...t.parameters }, l = In(), d = oe() ? $o : 1;
5587
+ const o = yt(), a = t.provisioningTimeoutMs ?? Mo, c = { ...o, ...t.parameters }, l = In(), d = te() ? $o : 1;
5588
5588
  for (let h = 0; h < d; h++)
5589
5589
  try {
5590
5590
  const u = {
@@ -5618,11 +5618,11 @@ async function Am(t, e, n = "auto", r = !1) {
5618
5618
  sdkType: 2,
5619
5619
  sdkCapability: yn,
5620
5620
  supportsCompression: cn()
5621
- }, p = e ? Ct([e, le(a)]) : le(a), m = await Yo(i, u, s, p);
5622
- if (m.state?.toLowerCase() !== "running" || !m.configuration?.url)
5621
+ }, p = e ? Ct([e, le(a)]) : le(a), _ = await Yo(i, u, s, p);
5622
+ if (_.state?.toLowerCase() !== "running" || !_.configuration?.url)
5623
5623
  throw new bo(a);
5624
- const I = await jo(m.configuration.url, m.configuration.proxyUrl, n, r, p);
5625
- return I.backendUrl = i, I.authToken = s, I.brandingRequired = m.configuration.brandingRequired ?? !1, xo(m.configuration.push), I;
5624
+ const I = await jo(_.configuration.url, _.configuration.proxyUrl, n, r, p);
5625
+ return I.backendUrl = i, I.authToken = s, I.brandingRequired = _.configuration.brandingRequired ?? !1, xo(_.configuration.push), I;
5626
5626
  } catch (u) {
5627
5627
  if (u instanceof Tt || u instanceof gt || h === d - 1)
5628
5628
  throw u;
@@ -5847,10 +5847,10 @@ class km {
5847
5847
  ValueJson: "",
5848
5848
  ValueData: h
5849
5849
  });
5850
- const p = i.parameters[u], m = p ? p.TypeName : this.inferTypeName(h);
5850
+ const p = i.parameters[u], _ = p ? p.TypeName : this.inferTypeName(h);
5851
5851
  return Bt({
5852
5852
  ParameterIndex: u,
5853
- TypeName: m,
5853
+ TypeName: _,
5854
5854
  ValueJson: JSON.stringify(h ?? null),
5855
5855
  ValueData: $n
5856
5856
  });
@@ -5967,7 +5967,7 @@ class km {
5967
5967
  return this.handleFunctionError(e), !0;
5968
5968
  if (n === S.ACTION_FUNCTION_REGISTER) {
5969
5969
  const r = Q(e);
5970
- return r.senderId !== this.config?.sessionId && this.registerRemoteFunction(Fl(e), r.senderId), !0;
5970
+ return r.senderId !== this.config?.sessionId && this.registerRemoteFunction(Pl(e), r.senderId), !0;
5971
5971
  }
5972
5972
  if (n === S.ACTION_FUNCTION_REGISTER_BATCH) {
5973
5973
  const r = Q(e);
@@ -6042,7 +6042,7 @@ class km {
6042
6042
  sendRegistration(e) {
6043
6043
  if (!this.config)
6044
6044
  return;
6045
- const n = Pl(e.registerPayload, this.config.sessionId);
6045
+ const n = Fl(e.registerPayload, this.config.sessionId);
6046
6046
  this.config.sendProtocolMessage(n);
6047
6047
  }
6048
6048
  /**
@@ -6210,7 +6210,7 @@ function Yn(t) {
6210
6210
  return zt.warn("Failed to parse reactive value JSON, returning raw string:", e), t;
6211
6211
  }
6212
6212
  }
6213
- const Mm = "login_required", Pm = (t, e) => (t.code !== Mm || (tE({ functionName: e.functionName, args: e.args }), Fo(t.message)), null), _e = 1280, Ie = 720, Fm = 30, Et = "image/jpeg", Xo = 0.92;
6213
+ const Mm = "login_required", Fm = (t, e) => (t.code !== Mm || (tE({ functionName: e.functionName, args: e.args }), Po(t.message)), null), _e = 1280, Ie = 720, Pm = 30, Et = "image/jpeg", Xo = 0.92;
6214
6214
  function Bm() {
6215
6215
  if (typeof navigator > "u")
6216
6216
  return !1;
@@ -6263,8 +6263,8 @@ class xm {
6263
6263
  } catch {
6264
6264
  }
6265
6265
  try {
6266
- await new Promise((p, m) => {
6267
- const I = () => p(), T = () => m(new Error("Failed to load video element"));
6266
+ await new Promise((p, _) => {
6267
+ const I = () => p(), T = () => _(new Error("Failed to load video element"));
6268
6268
  i.addEventListener("loadedmetadata", I, { once: !0 }), i.addEventListener("error", T, { once: !0 });
6269
6269
  });
6270
6270
  try {
@@ -6326,8 +6326,8 @@ class xm {
6326
6326
  } catch {
6327
6327
  }
6328
6328
  try {
6329
- await new Promise((p, m) => {
6330
- const I = () => p(), T = () => m(new Error("Failed to load video element"));
6329
+ await new Promise((p, _) => {
6330
+ const I = () => p(), T = () => _(new Error("Failed to load video element"));
6331
6331
  i.addEventListener("loadedmetadata", I, { once: !0 }), i.addEventListener("error", T, { once: !0 });
6332
6332
  });
6333
6333
  try {
@@ -6441,8 +6441,8 @@ async function Gm(t, e) {
6441
6441
  c,
6442
6442
  l
6443
6443
  );
6444
- }), m = await p.arrayBuffer();
6445
- return { mime: p.type || c, width: o, height: a, data: new Uint8Array(m) };
6444
+ }), _ = await p.arrayBuffer();
6445
+ return { mime: p.type || c, width: o, height: a, data: new Uint8Array(_) };
6446
6446
  }
6447
6447
  function Vm(t) {
6448
6448
  const e = t?.facingMode;
@@ -6760,14 +6760,14 @@ class qo {
6760
6760
  }
6761
6761
  function s_(t) {
6762
6762
  return new Worker(
6763
- "" + new URL("assets/audio-playback-worker-BhikbMvg.js", import.meta.url).href,
6763
+ "" + new URL("assets/audio-playback-worker-CC2FKp8X.js", import.meta.url).href,
6764
6764
  {
6765
6765
  type: "module",
6766
6766
  name: t?.name
6767
6767
  }
6768
6768
  );
6769
6769
  }
6770
- const tt = 48e3, W = 2, ea = 1500, zn = 512, Xn = "playback", o_ = 120, a_ = 300, c_ = 4, l_ = 200, u_ = 100, d_ = 8e3, h_ = 10, ta = 100, Qt = 50, na = 128, f_ = 20, p_ = !0, ie = 1500, E_ = -20, Jn = -100, Qn = 200, O = M("IkonAudioPlayback"), m_ = () => {
6770
+ const tt = 48e3, W = 2, ea = 1500, zn = 512, Xn = "playback", o_ = 120, a_ = 300, c_ = 4, l_ = 200, u_ = 100, d_ = 8e3, h_ = 10, ta = 100, Qt = 50, na = 128, f_ = 20, p_ = !0, se = 1500, E_ = -20, Jn = -100, Qn = 200, O = M("IkonAudioPlayback"), m_ = () => {
6771
6771
  if (typeof navigator > "u" || typeof window > "u")
6772
6772
  return !1;
6773
6773
  const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
@@ -6776,7 +6776,7 @@ const tt = 48e3, W = 2, ea = 1500, zn = 512, Xn = "playback", o_ = 120, a_ = 300
6776
6776
  enabled: !1,
6777
6777
  statusIntervalMs: 1e3
6778
6778
  };
6779
- function se(t) {
6779
+ function oe(t) {
6780
6780
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
6781
6781
  }
6782
6782
  function __(t) {
@@ -7872,7 +7872,7 @@ class Rn {
7872
7872
  });
7873
7873
  this.audioContext = e, this.outputSampleRateHz = e.sampleRate, e.resume(), this.setupAudioGraphAfterRecreate();
7874
7874
  } catch (e) {
7875
- O.error(`iOS audio recovery failed: ${se(e)}`), this.addUnlockHandler();
7875
+ O.error(`iOS audio recovery failed: ${oe(e)}`), this.addUnlockHandler();
7876
7876
  }
7877
7877
  return;
7878
7878
  }
@@ -7964,17 +7964,17 @@ class Rn {
7964
7964
  const o = n - s.playbackStartContextTime;
7965
7965
  if (o < 0)
7966
7966
  continue;
7967
- const a = o * r * i, c = s.frames, l = s.count, h = (s.head - l + ie) % ie;
7967
+ const a = o * r * i, c = s.frames, l = s.count, h = (s.head - l + se) % se;
7968
7968
  let u = null, p = null;
7969
7969
  for (let f = 0; f < l; f++) {
7970
- const C = (h + f) % ie, A = c[C], v = A.samplePosition + Math.max(A.frameSamples, 1);
7970
+ const C = (h + f) % se, A = c[C], v = A.samplePosition + Math.max(A.frameSamples, 1);
7971
7971
  if (A.samplePosition <= a && (u = A), v > a && !p && (p = A, A.samplePosition <= a))
7972
7972
  break;
7973
7973
  }
7974
7974
  if (!u)
7975
7975
  continue;
7976
- const m = u.samplePosition + Math.max(u.frameSamples, 1);
7977
- if (a > m && !p)
7976
+ const _ = u.samplePosition + Math.max(u.frameSamples, 1);
7977
+ if (a > _ && !p)
7978
7978
  continue;
7979
7979
  if (!p)
7980
7980
  return this._visemeResult.mouthOpenY = u.mouthOpenY, this._visemeResult.mouthForm = u.mouthForm, this._visemeResult;
@@ -8009,14 +8009,14 @@ class Rn {
8009
8009
  a.epochTimestampSamples = r;
8010
8010
  const h = this.audioContext;
8011
8011
  if (h) {
8012
- const u = (h.outputLatency ?? 0) + (h.baseLatency ?? 0), p = this.visemeDelayMs + u * 1e3, m = Math.min(Qn, Math.max(Jn, p));
8013
- a.playbackStartContextTime = h.currentTime + m / 1e3;
8012
+ const u = (h.outputLatency ?? 0) + (h.baseLatency ?? 0), p = this.visemeDelayMs + u * 1e3, _ = Math.min(Qn, Math.max(Jn, p));
8013
+ a.playbackStartContextTime = h.currentTime + _ / 1e3;
8014
8014
  }
8015
8015
  a.timingEstablished = !0;
8016
8016
  }
8017
8017
  if (i > 0) {
8018
8018
  const h = a.frames[a.head];
8019
- h.samplePosition = r - a.epochTimestampSamples, h.frameSamples = i, h.mouthOpenY = d.Values[0], h.mouthForm = d.Values[1], a.head = (a.head + 1) % ie, a.count < ie && a.count++;
8019
+ h.samplePosition = r - a.epochTimestampSamples, h.frameSamples = i, h.mouthOpenY = d.Values[0], h.mouthForm = d.Values[1], a.head = (a.head + 1) % se, a.count < se && a.count++;
8020
8020
  }
8021
8021
  }
8022
8022
  }
@@ -8050,12 +8050,12 @@ class Rn {
8050
8050
  try {
8051
8051
  this.audioContext = new AudioContext();
8052
8052
  } catch (h) {
8053
- O.warn(`Failed to create AudioContext: ${se(h)}`), this.audioContext = null;
8053
+ O.warn(`Failed to create AudioContext: ${oe(h)}`), this.audioContext = null;
8054
8054
  return;
8055
8055
  }
8056
- O.debug(`AudioContext latencyHint unsupported: ${se(d)}`);
8056
+ O.debug(`AudioContext latencyHint unsupported: ${oe(d)}`);
8057
8057
  }
8058
- O.debug(`AudioContext sample rate request unsupported: ${se(l)}`);
8058
+ O.debug(`AudioContext sample rate request unsupported: ${oe(l)}`);
8059
8059
  }
8060
8060
  this.outputSampleRateHz = this.audioContext.sampleRate || tt, this.outputSampleRateHz !== a && O.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
8061
8061
  }
@@ -8193,7 +8193,7 @@ class Rn {
8193
8193
  this.workletModuleKey = s, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([__({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: W })], { type: "text/javascript" }));
8194
8194
  }
8195
8195
  this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((d) => {
8196
- throw O.warn(`Failed to load AudioWorklet module, falling back: ${se(d)}`), d;
8196
+ throw O.warn(`Failed to load AudioWorklet module, falling back: ${oe(d)}`), d;
8197
8197
  }));
8198
8198
  try {
8199
8199
  await this.workletReady;
@@ -8246,19 +8246,19 @@ class Rn {
8246
8246
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
8247
8247
  const r = 1024, i = new Float32Array(r * W), s = Math.round(this.outputSampleRateHz * ta / 1e3), o = Math.round(this.outputSampleRateHz * Qt / 1e3), a = 1 / s, c = 1 / o, l = new Array(W), d = [], h = e.createScriptProcessor(r, 0, W);
8248
8248
  h.onaudioprocess = (u) => {
8249
- const p = u.outputBuffer, m = p.numberOfChannels, I = p.length;
8250
- for (let E = 0; E < m; E++) {
8249
+ const p = u.outputBuffer, _ = p.numberOfChannels, I = p.length;
8250
+ for (let E = 0; E < _; E++) {
8251
8251
  const f = p.getChannelData(E);
8252
8252
  f.fill(0), l[E] = f;
8253
8253
  }
8254
8254
  let T = 0;
8255
8255
  d.length = 0;
8256
8256
  for (const [E, f] of this.fallbackQueues.entries()) {
8257
- f.totalSamples > 0 && (T += 1), (f.ending || f.inputDrained) && f.fadeDirection !== "out" && f.totalSamples / m * 1e3 / this.outputSampleRateHz <= Qt * 2 && (f.fadeDirection = "out"), this.readFromFallbackQueue(f, i), (f.totalSamples > 0 || !f.hasLastOut) && ((!f.lastOut || f.lastOut.length !== i.length) && (f.lastOut = new Float32Array(i.length)), f.lastOut.set(i), f.hasLastOut = !0);
8257
+ f.totalSamples > 0 && (T += 1), (f.ending || f.inputDrained) && f.fadeDirection !== "out" && f.totalSamples / _ * 1e3 / this.outputSampleRateHz <= Qt * 2 && (f.fadeDirection = "out"), this.readFromFallbackQueue(f, i), (f.totalSamples > 0 || !f.hasLastOut) && ((!f.lastOut || f.lastOut.length !== i.length) && (f.lastOut = new Float32Array(i.length)), f.lastOut.set(i), f.hasLastOut = !0);
8258
8258
  for (let A = 0; A < I; A++) {
8259
8259
  f.fadeDirection === "in" ? (f.fadeGain = Math.min(1, f.fadeGain + a), f.fadeGain >= 1 && (f.fadeDirection = "none")) : f.fadeDirection === "out" && (f.fadeGain = Math.max(0, f.fadeGain - c), f.fadeGain <= 0 && (f.fadeDirection = "none"));
8260
- for (let v = 0; v < m; v++) {
8261
- const g = i[A * m + v];
8260
+ for (let v = 0; v < _; v++) {
8261
+ const g = i[A * _ + v];
8262
8262
  l[v][A] += g * f.fadeGain;
8263
8263
  }
8264
8264
  }
@@ -8277,9 +8277,9 @@ class Rn {
8277
8277
  const A = f.lastOut, v = I - 1;
8278
8278
  for (let g = 0; g < I; g++) {
8279
8279
  f.fadeGain = Math.max(0, f.fadeGain - c), f.fadeGain <= 0 && (f.fadeDirection = "none");
8280
- for (let re = 0; re < m; re++) {
8281
- const Dn = A[v * m + re];
8282
- l[re][g] += Dn * f.fadeGain;
8280
+ for (let ie = 0; ie < _; ie++) {
8281
+ const Dn = A[v * _ + ie];
8282
+ l[ie][g] += Dn * f.fadeGain;
8283
8283
  }
8284
8284
  }
8285
8285
  }
@@ -8292,11 +8292,11 @@ class Rn {
8292
8292
  if (T > 1) {
8293
8293
  const E = 1 / Math.sqrt(T);
8294
8294
  for (let f = 0; f < I; f++)
8295
- for (let C = 0; C < m; C++)
8295
+ for (let C = 0; C < _; C++)
8296
8296
  l[C][f] *= E;
8297
8297
  }
8298
8298
  for (let E = 0; E < I; E++)
8299
- for (let f = 0; f < m; f++) {
8299
+ for (let f = 0; f < _; f++) {
8300
8300
  const C = l[f][E];
8301
8301
  l[f][E] = C > 1 ? 1 : C < -1 ? -1 : C;
8302
8302
  }
@@ -8367,7 +8367,7 @@ class Rn {
8367
8367
  try {
8368
8368
  await this.resumeWithTimeout(e), this.removeUnlockHandler();
8369
8369
  } catch (o) {
8370
- O.warn(`Failed to resume AudioContext: ${se(o)}`), this.addUnlockHandler();
8370
+ O.warn(`Failed to resume AudioContext: ${oe(o)}`), this.addUnlockHandler();
8371
8371
  }
8372
8372
  }
8373
8373
  async recoverAudioContext(e) {
@@ -8441,12 +8441,12 @@ class Rn {
8441
8441
  try {
8442
8442
  this.audioWorker = new s_();
8443
8443
  } catch (u) {
8444
- O.warn(`Failed to create audio worker: ${se(u)}`), this.protocolPort.close(), this.protocolPort = null;
8444
+ O.warn(`Failed to create audio worker: ${oe(u)}`), this.protocolPort.close(), this.protocolPort = null;
8445
8445
  return;
8446
8446
  }
8447
8447
  const n = this.audioWorker;
8448
8448
  n.addEventListener("message", (u) => this.onAudioWorkerMessage(u.data)), n.addEventListener("error", (u) => {
8449
- const p = [u.message, u.filename, u.lineno, u.colno].filter((m) => m != null && String(m).length > 0);
8449
+ const p = [u.message, u.filename, u.lineno, u.colno].filter((_) => _ != null && String(_).length > 0);
8450
8450
  O.error(`Audio worker failed: ${p.join(" ")}`.trim());
8451
8451
  });
8452
8452
  const i = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && at(), s = this.config.performance?.preferWebCodecs ?? !0, o = this.client.isWebRtcEnabled, a = {
@@ -8464,8 +8464,8 @@ class Rn {
8464
8464
  onAudioWorkerMessage(e) {
8465
8465
  if (e.type === "streamBegin") {
8466
8466
  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((i) => i.Name === "Viseme"))) {
8467
- const i = new Array(ie);
8468
- for (let s = 0; s < ie; s++)
8467
+ const i = new Array(se);
8468
+ for (let s = 0; s < se; s++)
8469
8469
  i[s] = { samplePosition: 0, frameSamples: 0, mouthOpenY: 0, mouthForm: 0 };
8470
8470
  this.visemeBuffers.set(e.streamId, {
8471
8471
  frames: i,
@@ -8631,7 +8631,7 @@ class Rn {
8631
8631
  }
8632
8632
  function I_(t) {
8633
8633
  return new Worker(
8634
- "" + new URL("assets/video-playback-worker-Cfg2cyD1.js", import.meta.url).href,
8634
+ "" + new URL("assets/video-playback-worker-BTMuFG90.js", import.meta.url).href,
8635
8635
  {
8636
8636
  type: "module",
8637
8637
  name: t?.name
@@ -9210,7 +9210,7 @@ class D_ {
9210
9210
  } catch {
9211
9211
  }
9212
9212
  e.pendingRestartTimer && clearTimeout(e.pendingRestartTimer);
9213
- const p = e.restartCount, m = e.onError, I = {
9213
+ const p = e.restartCount, _ = e.onError, I = {
9214
9214
  ...e.originalRequest,
9215
9215
  constraints: e.currentConstraints,
9216
9216
  options: e.currentOptions,
@@ -9225,9 +9225,9 @@ class D_ {
9225
9225
  D.warn(`Auto-restart failed: ${T}`);
9226
9226
  const E = T instanceof Error ? T : new Error(String(T));
9227
9227
  let f = "unknown";
9228
- if (E.name === "NotAllowedError" && (f = "permission-revoked"), m)
9228
+ if (E.name === "NotAllowedError" && (f = "permission-revoked"), _)
9229
9229
  try {
9230
- m(
9230
+ _(
9231
9231
  new Error(`Auto-restart failed: ${E.message}`),
9232
9232
  f,
9233
9233
  p < l && f !== "permission-revoked"
@@ -9737,10 +9737,10 @@ class D_ {
9737
9737
  this.setupAudioContextStateListener(o, g), this.setupVisibilityChangeListener(g), this.setupBFCacheHandlers(g), g.healthCheckTimer = setInterval(() => {
9738
9738
  this.performHealthCheck(g);
9739
9739
  }, A_);
9740
- const re = () => {
9740
+ const ie = () => {
9741
9741
  g.stopped || (D.warn(`Microphone track ended unexpectedly, captureId=${r.substring(0, 8)}`), this.handleRecoverableError(g, new Error("Microphone track ended unexpectedly"), "track-ended"));
9742
9742
  };
9743
- return g.trackEndedHandler = re, l.addEventListener("ended", re), this.captures.set(r, g), this.pendingCaptures.delete(r), {
9743
+ return g.trackEndedHandler = ie, l.addEventListener("ended", ie), this.captures.set(r, g), this.pendingCaptures.delete(r), {
9744
9744
  captureId: r,
9745
9745
  streamId: r,
9746
9746
  get isActive() {
@@ -9949,7 +9949,7 @@ class D_ {
9949
9949
  }
9950
9950
  function v_(t) {
9951
9951
  return new Worker(
9952
- "" + new URL("assets/video-capture-worker-aMgUqmMd.js", import.meta.url).href,
9952
+ "" + new URL("assets/video-capture-worker-CzOnKSIv.js", import.meta.url).href,
9953
9953
  {
9954
9954
  type: "module",
9955
9955
  name: t?.name
@@ -10010,7 +10010,7 @@ class L_ {
10010
10010
  async getMediaStream(e) {
10011
10011
  if (!navigator.mediaDevices)
10012
10012
  throw new Error("Media devices are not available in this environment");
10013
- const n = e.constraints ?? {}, r = e.options?.framerate ?? Fm;
10013
+ const n = e.constraints ?? {}, r = e.options?.framerate ?? Pm;
10014
10014
  if (e.sourceType === "screen") {
10015
10015
  const a = {
10016
10016
  ...n,
@@ -10097,13 +10097,13 @@ class L_ {
10097
10097
  if (!s)
10098
10098
  throw i.getTracks().forEach((E) => E.stop()), new Error("No video track available");
10099
10099
  e.sourceType === "screen" && await new Promise((E) => setTimeout(E, 200));
10100
- const o = s.getSettings(), a = e.sourceType === "screen" ? o.width ?? _e : e.options?.width ?? o.width ?? _e, c = e.sourceType === "screen" ? o.height ?? Ie : e.options?.height ?? o.height ?? Ie, l = U_(), h = new l({ track: s }).readable, u = this.allocateTrackId(), p = this.ensureWorker(), m = e.sourceType, I = e.onStopped;
10100
+ const o = s.getSettings(), a = e.sourceType === "screen" ? o.width ?? _e : e.options?.width ?? o.width ?? _e, c = e.sourceType === "screen" ? o.height ?? Ie : e.options?.height ?? o.height ?? Ie, l = U_(), h = new l({ track: s }).readable, u = this.allocateTrackId(), p = this.ensureWorker(), _ = e.sourceType, I = e.onStopped;
10101
10101
  p.postMessage(
10102
10102
  {
10103
10103
  type: "start",
10104
10104
  captureId: r,
10105
10105
  streamId: r,
10106
- sourceType: m,
10106
+ sourceType: _,
10107
10107
  kind: e.sourceType,
10108
10108
  senderId: n,
10109
10109
  trackId: u,
@@ -10236,81 +10236,116 @@ class M_ {
10236
10236
  }
10237
10237
  const ra = M("DebugMode");
10238
10238
  let ae = !1;
10239
- function P_() {
10240
- return ae ? !0 : (ae = Sp(), ae && (ko(te.DEBUG), ra.warn("Debug mode enabled")), ae);
10239
+ function F_() {
10240
+ return ae ? !0 : (ae = Sp(), ae && (ko(ne.DEBUG), ra.info("Debug mode enabled")), ae);
10241
10241
  }
10242
10242
  function er() {
10243
10243
  return ae;
10244
10244
  }
10245
- function F_() {
10246
- ae || (ae = !0, ko(te.DEBUG), ra.warn("Debug mode enabled"), Uo(Do, "true"));
10245
+ function P_() {
10246
+ ae || (ae = !0, ko(ne.DEBUG), ra.info("Debug mode enabled"), Uo(Do, "true"));
10247
10247
  }
10248
10248
  let Ve = !1;
10249
10249
  function B_() {
10250
10250
  return Ve = Rp(), Ve;
10251
10251
  }
10252
- function kI() {
10252
+ function UI() {
10253
10253
  return Ve;
10254
10254
  }
10255
- function DI() {
10255
+ function LI() {
10256
10256
  Ve || (Ve = !0, Uo(Oo, "true"));
10257
10257
  }
10258
- const ia = 1e3, sa = te.INFO;
10258
+ const x_ = /* @__PURE__ */ new Set([
10259
+ "http",
10260
+ "https",
10261
+ "file",
10262
+ "ftp",
10263
+ "blob",
10264
+ "data",
10265
+ "about",
10266
+ "javascript",
10267
+ "view-source",
10268
+ "ws",
10269
+ "wss",
10270
+ "chrome",
10271
+ "chrome-extension",
10272
+ "edge",
10273
+ "moz-extension",
10274
+ "safari-web-extension"
10275
+ ]), W_ = /^([a-z][a-z0-9+.-]*):/i;
10276
+ function G_(t) {
10277
+ const e = W_.exec(t.trim());
10278
+ return e ? !x_.has(e[1].toLowerCase()) : !1;
10279
+ }
10280
+ function V_(t) {
10281
+ if (typeof document > "u")
10282
+ return;
10283
+ const e = document.createElement("iframe");
10284
+ e.setAttribute("aria-hidden", "true"), e.style.display = "none", document.body.appendChild(e);
10285
+ try {
10286
+ const n = e.contentWindow;
10287
+ n ? n.location.href = t : e.src = t;
10288
+ } catch {
10289
+ e.src = t;
10290
+ }
10291
+ window.setTimeout(() => e.remove(), 2e3);
10292
+ }
10293
+ const ia = 1e3, sa = ne.INFO;
10259
10294
  let K = [], Zt = ia, oa = sa, qt = null;
10260
- function x_(t) {
10295
+ function H_(t) {
10261
10296
  t.level < oa || (K.push(t), K.length > Zt && (K = K.slice(-Zt)));
10262
10297
  }
10263
- function W_(t) {
10264
- Zt = t?.maxBufferSize ?? ia, oa = t?.minLevel ?? sa, K = [], sp(x_);
10298
+ function $_(t) {
10299
+ Zt = t?.maxBufferSize ?? ia, oa = t?.minLevel ?? sa, K = [], sp(H_);
10265
10300
  }
10266
- function vI(t) {
10301
+ function MI(t) {
10267
10302
  qt = t;
10268
10303
  }
10269
- function OI() {
10304
+ function FI() {
10270
10305
  return K;
10271
10306
  }
10272
10307
  function aa() {
10273
10308
  const t = K;
10274
10309
  return K = [], t;
10275
10310
  }
10276
- function UI() {
10311
+ function PI() {
10277
10312
  if (!qt || K.length === 0)
10278
10313
  return 0;
10279
10314
  const t = aa();
10280
10315
  return qt(t), t.length;
10281
10316
  }
10282
- function LI() {
10317
+ function BI() {
10283
10318
  K = [];
10284
10319
  }
10285
- function MI() {
10320
+ function xI() {
10286
10321
  return K.length;
10287
10322
  }
10288
- W_();
10289
- const G_ = M("LogSender"), He = 1e3, V_ = 6e4, tr = 10 * 1024, H_ = 400 * 1024, nr = "…[truncated]", $_ = {
10290
- [te.DEBUG]: fe.Debug,
10291
- [te.INFO]: fe.Info,
10292
- [te.WARN]: fe.Warning,
10293
- [te.ERROR]: fe.Error
10323
+ $_();
10324
+ const K_ = M("LogSender"), He = 1e3, Y_ = 6e4, tr = 10 * 1024, j_ = 400 * 1024, nr = "…[truncated]", z_ = {
10325
+ [ne.DEBUG]: fe.Debug,
10326
+ [ne.INFO]: fe.Info,
10327
+ [ne.WARN]: fe.Warning,
10328
+ [ne.ERROR]: fe.Error
10294
10329
  };
10295
- let $e, bn, Nn, kn, ne, ee = [], Se = 0, Pe;
10296
- function K_(t) {
10330
+ let $e, bn, Nn, kn, re, ee = [], Se = 0, Fe;
10331
+ function X_(t) {
10297
10332
  return t.length <= tr ? t : t.slice(0, tr - nr.length) + nr;
10298
10333
  }
10299
- function Y_(t) {
10334
+ function J_(t) {
10300
10335
  return {
10301
10336
  Time: t.timestamp,
10302
- Type: $_[t.level] ?? fe.Info,
10303
- Message: K_(`[${t.component}] ${t.message}`),
10337
+ Type: z_[t.level] ?? fe.Info,
10338
+ Message: X_(`[${t.component}] ${t.message}`),
10304
10339
  Parameters: "{}"
10305
10340
  };
10306
10341
  }
10307
10342
  function ca(t) {
10308
10343
  return JSON.stringify({ type: "sdk-typescript", event: { Logs: t }, session: Nn, room: kn });
10309
10344
  }
10310
- function j_(t) {
10345
+ function Q_(t) {
10311
10346
  if (t.length === 0)
10312
10347
  return [];
10313
- const e = ca([]).length, n = H_ - e, r = [];
10348
+ const e = ca([]).length, n = j_ - e, r = [];
10314
10349
  let i = [], s = 0;
10315
10350
  for (const o of t) {
10316
10351
  const a = JSON.stringify(o).length + 1;
@@ -10318,7 +10353,7 @@ function j_(t) {
10318
10353
  }
10319
10354
  return i.length > 0 && r.push(i), r;
10320
10355
  }
10321
- async function z_(t) {
10356
+ async function Z_(t) {
10322
10357
  if (t.length === 0 || !$e)
10323
10358
  return;
10324
10359
  const e = `${$e}/events/logs/json`, n = {
@@ -10331,64 +10366,64 @@ async function z_(t) {
10331
10366
  });
10332
10367
  if (!r.ok) {
10333
10368
  if (r.status >= 400 && r.status < 500) {
10334
- G_.warn(`Dropping ${t.length} log entries due to ${r.status}`);
10369
+ K_.warn(`Dropping ${t.length} log entries due to ${r.status}`);
10335
10370
  return;
10336
10371
  }
10337
10372
  throw new Error(`Failed to send logs: ${r.status}`);
10338
10373
  }
10339
10374
  }
10340
- function X_() {
10375
+ function q_() {
10341
10376
  if (Se === 0)
10342
10377
  return He;
10343
10378
  const t = He * (1 << Math.min(Se, 6));
10344
- return Math.min(t, V_);
10379
+ return Math.min(t, Y_);
10345
10380
  }
10346
- function Fe(t) {
10347
- $e && (ne = setTimeout(() => void J_(), t));
10381
+ function Pe(t) {
10382
+ $e && (re = setTimeout(() => void eI(), t));
10348
10383
  }
10349
- async function J_() {
10350
- ne = void 0;
10384
+ async function eI() {
10385
+ re = void 0;
10351
10386
  const t = aa();
10352
- if (ee = ee.concat(t.map(Y_)), typeof navigator < "u" && navigator.onLine === !1) {
10353
- Fe(He);
10387
+ if (ee = ee.concat(t.map(J_)), typeof navigator < "u" && navigator.onLine === !1) {
10388
+ Pe(He);
10354
10389
  return;
10355
10390
  }
10356
10391
  if (ee.length === 0) {
10357
- Fe(He);
10392
+ Pe(He);
10358
10393
  return;
10359
10394
  }
10360
10395
  const e = ee;
10361
10396
  ee = [];
10362
- const n = j_(e);
10397
+ const n = Q_(e);
10363
10398
  let r = !1;
10364
10399
  for (let i = 0; i < n.length; i++)
10365
10400
  try {
10366
- await z_(n[i]);
10401
+ await Z_(n[i]);
10367
10402
  } catch {
10368
10403
  ee = n.slice(i).flat().concat(ee), r = !0;
10369
10404
  break;
10370
10405
  }
10371
- r ? Se++ : Se = 0, Fe(X_());
10406
+ r ? Se++ : Se = 0, Pe(q_());
10372
10407
  }
10373
- function Q_() {
10374
- ne !== void 0 && (clearTimeout(ne), ne = void 0), Fe(0);
10408
+ function tI() {
10409
+ re !== void 0 && (clearTimeout(re), re = void 0), Pe(0);
10375
10410
  }
10376
- function Z_(t, e, n, r) {
10377
- la(), $e = t, bn = e, Nn = n, kn = r, Se = 0, typeof window < "u" && (Pe = Q_, window.addEventListener("online", Pe)), Fe(He);
10411
+ function nI(t, e, n, r) {
10412
+ la(), $e = t, bn = e, Nn = n, kn = r, Se = 0, typeof window < "u" && (Fe = tI, window.addEventListener("online", Fe)), Pe(He);
10378
10413
  }
10379
10414
  function la() {
10380
- ne !== void 0 && (clearTimeout(ne), ne = void 0), Pe !== void 0 && typeof window < "u" && (window.removeEventListener("online", Pe), Pe = void 0), $e = void 0, bn = void 0, Nn = void 0, kn = void 0, ee = [], Se = 0;
10415
+ re !== void 0 && (clearTimeout(re), re = void 0), Fe !== void 0 && typeof window < "u" && (window.removeEventListener("online", Fe), Fe = void 0), $e = void 0, bn = void 0, Nn = void 0, kn = void 0, ee = [], Se = 0;
10381
10416
  }
10382
- const q_ = [
10417
+ const rI = [
10383
10418
  { name: "WebSocket", isPresent: () => typeof WebSocket < "u" },
10384
10419
  { name: "fetch", isPresent: () => typeof fetch < "u" },
10385
10420
  { name: "BigInt", isPresent: () => typeof BigInt < "u" },
10386
10421
  { name: "globalThis", isPresent: () => typeof globalThis < "u" },
10387
10422
  { name: "Promise.allSettled", isPresent: () => typeof Promise < "u" && typeof Promise.allSettled == "function" }
10388
10423
  ];
10389
- function eI() {
10424
+ function iI() {
10390
10425
  const t = [];
10391
- for (const e of q_) {
10426
+ for (const e of rI) {
10392
10427
  let n;
10393
10428
  try {
10394
10429
  n = e.isPresent();
@@ -10401,7 +10436,7 @@ function eI() {
10401
10436
  }
10402
10437
  function rr(t) {
10403
10438
  return new Worker(
10404
- "" + new URL("assets/protocol-worker-C1bzc65g.js", import.meta.url).href,
10439
+ "" + new URL("assets/protocol-worker-DCLZvHGe.js", import.meta.url).href,
10405
10440
  {
10406
10441
  type: "module",
10407
10442
  name: t?.name
@@ -10413,8 +10448,8 @@ const ir = {
10413
10448
  [y.WebSocket]: 1,
10414
10449
  [y.WebTransportProxy]: 2,
10415
10450
  [y.WebSocketProxy]: 3
10416
- }, rt = /* @__PURE__ */ new Set([y.WebTransportProxy, y.WebSocketProxy]), Pt = /* @__PURE__ */ new Set([y.WebTransport, y.WebSocket]), sr = /* @__PURE__ */ new Set([y.WebSocket, y.WebSocketProxy]), or = /* @__PURE__ */ new Set([y.WebTransport, y.WebTransportProxy]), de = M("EndpointSelector"), it = "ikon_endpoint_type", he = "ikon_proxy_preferred", Ue = "ikon_endpoint_ts", tI = 1440 * 60 * 1e3;
10417
- class nI {
10451
+ }, rt = /* @__PURE__ */ new Set([y.WebTransportProxy, y.WebSocketProxy]), Ft = /* @__PURE__ */ new Set([y.WebTransport, y.WebSocket]), sr = /* @__PURE__ */ new Set([y.WebSocket, y.WebSocketProxy]), or = /* @__PURE__ */ new Set([y.WebTransport, y.WebTransportProxy]), de = M("EndpointSelector"), it = "ikon_endpoint_type", he = "ikon_proxy_preferred", Ue = "ikon_endpoint_ts", sI = 1440 * 60 * 1e3;
10452
+ class oI {
10418
10453
  isLocal;
10419
10454
  _proxyMode;
10420
10455
  _websocket;
@@ -10461,13 +10496,13 @@ class nI {
10461
10496
  if (this.isLocal)
10462
10497
  return n;
10463
10498
  let r;
10464
- this._proxyMode === "force-proxy" ? r = n.filter((s) => rt.has(s)) : this._proxyMode === "force-direct" ? r = n.filter((s) => Pt.has(s)) : r = n, r = this.filterByTransport(r);
10499
+ this._proxyMode === "force-proxy" ? r = n.filter((s) => rt.has(s)) : this._proxyMode === "force-direct" ? r = n.filter((s) => Ft.has(s)) : r = n, r = this.filterByTransport(r);
10465
10500
  const i = [...r].sort((s, o) => {
10466
10501
  const a = ir[s] ?? 999, c = ir[o] ?? 999;
10467
10502
  return a - c;
10468
10503
  });
10469
10504
  if (this._proxyMode === "auto" && this._proxyPreferred) {
10470
- const s = i.filter((a) => rt.has(a)), o = i.filter((a) => Pt.has(a));
10505
+ const s = i.filter((a) => rt.has(a)), o = i.filter((a) => Ft.has(a));
10471
10506
  i.length = 0, i.push(...s, ...o);
10472
10507
  }
10473
10508
  if (this.workingEndpointType !== null && e.has(this.workingEndpointType) && (!this._proxyPreferred || rt.has(this.workingEndpointType))) {
@@ -10497,7 +10532,7 @@ class nI {
10497
10532
  localStorage.setItem(he, "true");
10498
10533
  } catch {
10499
10534
  }
10500
- } else if (Pt.has(e)) {
10535
+ } else if (Ft.has(e)) {
10501
10536
  this._proxyPreferred = !1;
10502
10537
  try {
10503
10538
  localStorage.removeItem(he);
@@ -10526,7 +10561,7 @@ class nI {
10526
10561
  const e = localStorage.getItem(Ue);
10527
10562
  if (e !== null) {
10528
10563
  const n = Date.now() - Number(e);
10529
- if (n > tI)
10564
+ if (n > sI)
10530
10565
  return de.warn(`Preferences expired (age: ${Math.round(n / 36e5)}h), clearing`), localStorage.removeItem(it), localStorage.removeItem(he), localStorage.removeItem(Ue), !0;
10531
10566
  }
10532
10567
  } catch {
@@ -10555,11 +10590,11 @@ class nI {
10555
10590
  }
10556
10591
  }
10557
10592
  }
10558
- const _ = M("IkonClient");
10559
- function rI() {
10593
+ const m = M("IkonClient");
10594
+ function aI() {
10560
10595
  return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
10561
10596
  }
10562
- class PI {
10597
+ class WI {
10563
10598
  channelManager = null;
10564
10599
  protocolWorker = null;
10565
10600
  preloadedWorker = null;
@@ -10603,6 +10638,7 @@ class PI {
10603
10638
  boundPopstate = null;
10604
10639
  boundOnline = null;
10605
10640
  boundOffline = null;
10641
+ boundExternalLinkClick = null;
10606
10642
  // GlobalState handling
10607
10643
  _globalState = null;
10608
10644
  _globalStateReceived = !1;
@@ -10647,7 +10683,7 @@ class PI {
10647
10683
  _serverStopped = !1;
10648
10684
  _hasBeenConnected = !1;
10649
10685
  // External connect URL mode
10650
- _waitForExternalConnectUrl = rI();
10686
+ _waitForExternalConnectUrl = aI();
10651
10687
  _externalConnectUrlCleanup = null;
10652
10688
  /**
10653
10689
  * SDK-provided media pipelines (audio/video).
@@ -10730,14 +10766,14 @@ class PI {
10730
10766
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
10731
10767
  if (n > 1)
10732
10768
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
10733
- P_(), qe() && sE();
10769
+ F_(), qe() && sE();
10734
10770
  const r = e.local ? null : Tp() ?? e.proxy ?? null, i = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", s = e.local ? null : gp(), o = e.local ? null : wp(), a = s ?? e.websocket, c = o ?? e.webtransport ?? !1;
10735
- this.endpointSelector = new nI({
10771
+ this.endpointSelector = new oI({
10736
10772
  local: e.local,
10737
10773
  proxyMode: i,
10738
10774
  websocket: a,
10739
10775
  webtransport: c
10740
- }), i !== "auto" ? _.info(`Proxy mode: ${i}`) : this.endpointSelector.proxyPreferred && _.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && _.debug(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new km(), this._reactiveRegistry = new Lm(this._functionRegistry), qe() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = em(this._functionRegistry), this.unregisterSoundFunctions = n_(this._functionRegistry)), qe() && (this.unregisterLoginInterceptor = this._functionRegistry.addErrorInterceptor(Pm));
10776
+ }), i !== "auto" ? m.info(`Proxy mode: ${i}`) : this.endpointSelector.proxyPreferred && m.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && m.debug(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new km(), this._reactiveRegistry = new Lm(this._functionRegistry), qe() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = em(this._functionRegistry), this.unregisterSoundFunctions = n_(this._functionRegistry)), qe() && (this.unregisterLoginInterceptor = this._functionRegistry.addErrorInterceptor(Fm));
10741
10777
  const l = Ap(), d = yp();
10742
10778
  this._audioEnabled = l ?? e.audio?.enabled ?? !0, this._videoEnabled = d ?? e.video?.enabled ?? !0;
10743
10779
  const h = e.audio ? {
@@ -10818,7 +10854,7 @@ class PI {
10818
10854
  if (this._connectStarted)
10819
10855
  throw new Error(`Cannot connect: already started (state: ${this.currentState})`);
10820
10856
  this._connectStarted = !0;
10821
- const e = eI();
10857
+ const e = iI();
10822
10858
  if (!e.supported) {
10823
10859
  this.setErrorState(new ip(e.missingFeatures));
10824
10860
  return;
@@ -10826,14 +10862,14 @@ class PI {
10826
10862
  this.setupLifecycleHandlers();
10827
10863
  const n = Cp();
10828
10864
  if (n) {
10829
- _.info("Found external connect URL in query parameter"), await this.executeConnection(() => Ee(n, this.abortController.signal));
10865
+ m.info("Found external connect URL in query parameter"), await this.executeConnection(() => Ee(n, this.abortController.signal));
10830
10866
  return;
10831
10867
  }
10832
10868
  if (this._waitForExternalConnectUrl) {
10833
- _.info("Waiting for external connect URL from parent window"), this.setState("waitingForExternalConnectUrl"), this._externalConnectUrlCleanup = this.setupExternalConnectUrlListener();
10869
+ m.info("Waiting for external connect URL from parent window"), this.setState("waitingForExternalConnectUrl"), this._externalConnectUrlCleanup = this.setupExternalConnectUrlListener();
10834
10870
  return;
10835
10871
  }
10836
- _.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
10872
+ m.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
10837
10873
  }
10838
10874
  /**
10839
10875
  * Execute the connection flow with the provided authentication function.
@@ -10845,15 +10881,15 @@ class PI {
10845
10881
  } catch {
10846
10882
  }
10847
10883
  this.setState("connecting"), this.connectionTimer = setTimeout(() => {
10848
- this.currentState === "connecting" && (_.error("Connection timeout"), this.abortController?.abort("Connection timeout"), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
10884
+ this.currentState === "connecting" && (m.error("Connection timeout"), this.abortController?.abort("Connection timeout"), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
10849
10885
  }, this.connectionTimeoutMs);
10850
10886
  try {
10851
10887
  const n = await e();
10852
- if (this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, this._connectUrl = n.directUrl, this._brandingRequired = n.brandingRequired ?? !1, _.info(`Authenticated to Ikon server (${n.authResponse.ServerSessionId})`), !this.config.local && n.backendUrl && n.authToken && Z_(n.backendUrl, n.authToken, n.authResponse.ServerSessionId, n.authResponse.ChannelInstanceId), n.usedProxyUrl && n.directUrl) {
10853
- _.info("Auth fell back to proxy, marking proxy preferred");
10888
+ if (this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, this._connectUrl = n.directUrl, this._brandingRequired = n.brandingRequired ?? !1, m.info(`Authenticated to Ikon server (${n.authResponse.ServerSessionId})`), !this.config.local && n.backendUrl && n.authToken && nI(n.backendUrl, n.authToken, n.authResponse.ServerSessionId, n.authResponse.ChannelInstanceId), n.usedProxyUrl && n.directUrl) {
10889
+ m.info("Auth fell back to proxy, marking proxy preferred");
10854
10890
  const r = n.directUrl;
10855
10891
  Tm(r).then((i) => {
10856
- i && (_.info("Background probe: direct server reachable, clearing proxy preference for next connection"), this.endpointSelector.clearProxyPreference());
10892
+ i && (m.info("Background probe: direct server reachable, clearing proxy preference for next connection"), this.endpointSelector.clearProxyPreference());
10857
10893
  }).catch(() => {
10858
10894
  });
10859
10895
  }
@@ -10861,14 +10897,14 @@ class PI {
10861
10897
  } catch (n) {
10862
10898
  if (n instanceof DOMException && n.name === "AbortError")
10863
10899
  return;
10864
- throw _.error("Connection failed:", n), this.clearTimers(), this.setState("offline"), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), n;
10900
+ throw m.error("Connection failed:", n), this.clearTimers(), this.setState("offline"), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), n;
10865
10901
  }
10866
10902
  }
10867
10903
  /**
10868
10904
  * Disconnect from the server.
10869
10905
  */
10870
10906
  disconnect() {
10871
- _.info("Disconnecting from Ikon server"), this.sendDisconnectSignal(), la(), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalConnectUrlCleanup && (this._externalConnectUrlCleanup(), this._externalConnectUrlCleanup = null), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterSoundFunctions && (this.unregisterSoundFunctions(), this.unregisterSoundFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.unregisterLoginInterceptor && (this.unregisterLoginInterceptor(), this.unregisterLoginInterceptor = null), this.abortController?.abort(), this.abortController = null, this._fullReauthAttempted = !1, this._softReconnectAttempted = !1, this._lastFailureWasAuthRejected = !1, this._reauthInProgress = !1, this._disconnectedAt = null, this._serverStopped = !1, this._hasBeenConnected = !1, this.releaseKeepaliveLock(), this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._environmentTrackingSetup = !1;
10907
+ m.info("Disconnecting from Ikon server"), this.sendDisconnectSignal(), la(), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalConnectUrlCleanup && (this._externalConnectUrlCleanup(), this._externalConnectUrlCleanup = null), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterSoundFunctions && (this.unregisterSoundFunctions(), this.unregisterSoundFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.unregisterLoginInterceptor && (this.unregisterLoginInterceptor(), this.unregisterLoginInterceptor = null), this.abortController?.abort(), this.abortController = null, this._fullReauthAttempted = !1, this._softReconnectAttempted = !1, this._lastFailureWasAuthRejected = !1, this._reauthInProgress = !1, this._disconnectedAt = null, this._serverStopped = !1, this._hasBeenConnected = !1, this.releaseKeepaliveLock(), this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1, this._environmentTrackingSetup = !1;
10872
10908
  for (const e of this._webRtcAudioElements.values())
10873
10909
  e.pause(), e.srcObject = null, e.remove();
10874
10910
  this._webRtcAudioElements.clear(), this._webRtcAudioStreams.clear(), this._webRtcVideoStreams.clear(), this._webRtcTrackMap.clear(), this._pendingActiveAudioTracks.clear(), this.removeWebRtcAudioUnlockHandler(), this._webRtcMediaSession.cleanup(), this._functionRegistry.detach(), this._reactiveRegistry.detach(), this.setState("offline");
@@ -10898,7 +10934,7 @@ class PI {
10898
10934
  this._pendingActionAcks.set(e, n);
10899
10935
  }
10900
10936
  onActionAckTimeout(e) {
10901
- this.currentState === "connected" && (_.warn(`No ActionCallAck received within ${this.actionAckTimeoutMs}ms for CallId ${e}, forcing reconnect`), this.clearPendingActionAcks(), this.protocolWorker ? this.protocolWorker.postMessage({ type: "triggerReconnect", reason: "Action ack timeout" }) : this.channelManager?.triggerReconnect("Action ack timeout"));
10937
+ this.currentState === "connected" && (m.warn(`No ActionCallAck received within ${this.actionAckTimeoutMs}ms for CallId ${e}, forcing reconnect`), this.clearPendingActionAcks(), this.protocolWorker ? this.protocolWorker.postMessage({ type: "triggerReconnect", reason: "Action ack timeout" }) : this.channelManager?.triggerReconnect("Action ack timeout"));
10902
10938
  }
10903
10939
  clearPendingActionAcks() {
10904
10940
  for (const e of this._pendingActionAcks.values())
@@ -10924,7 +10960,7 @@ class PI {
10924
10960
  this.channelManager.sendProtocolMessage(e);
10925
10961
  return;
10926
10962
  }
10927
- _.warn("Cannot send: not connected");
10963
+ m.warn("Cannot send: not connected");
10928
10964
  }
10929
10965
  /**
10930
10966
  * Send a client context update to the server.
@@ -10932,7 +10968,7 @@ class PI {
10932
10968
  */
10933
10969
  sendUpdateClientContext(e) {
10934
10970
  if (!this._sessionId) {
10935
- _.warn("Cannot send UpdateClientContext: not connected");
10971
+ m.warn("Cannot send UpdateClientContext: not connected");
10936
10972
  return;
10937
10973
  }
10938
10974
  const n = Qh(
@@ -11041,7 +11077,7 @@ class PI {
11041
11077
  return;
11042
11078
  this.channelManager?.sendProtocolMessage(c);
11043
11079
  } catch (c) {
11044
- _.warn(`Failed to forward protocol send port message: ${c}`);
11080
+ m.warn(`Failed to forward protocol send port message: ${c}`);
11045
11081
  }
11046
11082
  };
11047
11083
  try {
@@ -11124,18 +11160,18 @@ class PI {
11124
11160
  const s = i.CallId.toString(), o = this._pendingActionAcks.get(s);
11125
11161
  o !== void 0 && (clearTimeout(o), this._pendingActionAcks.delete(s));
11126
11162
  }).catch((i) => {
11127
- _.warn("Failed to parse ActionCallAck:", i);
11163
+ m.warn("Failed to parse ActionCallAck:", i);
11128
11164
  });
11129
11165
  return;
11130
11166
  }
11131
11167
  if (n === S.CORE_GLOBAL_STATE && md(e).then((i) => {
11132
- this._globalState = i, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(i, this._sessionId), this._globalState.DebugMode && F_(), er() && this.protocolWorker && (this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this.protocolWorker.postMessage({ type: "setLogLevel", level: Fn() })), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
11168
+ this._globalState = i, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(i, this._sessionId), this._globalState.DebugMode && P_(), er() && this.protocolWorker && (this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this.protocolWorker.postMessage({ type: "setLogLevel", level: Pn() })), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
11133
11169
  }).catch((i) => {
11134
- _.error("Failed to parse GlobalState:", i);
11170
+ m.error("Failed to parse GlobalState:", i);
11135
11171
  }), n === S.CORE_CLIENT_INITIALIZATION && mu(e).then((i) => {
11136
11172
  this._sessionId !== void 0 && this._functionRegistry.registerFromClientInitialization(i, this._sessionId);
11137
11173
  }).catch((i) => {
11138
- _.error("Failed to parse ClientInitialization:", i);
11174
+ m.error("Failed to parse ClientInitialization:", i);
11139
11175
  }), n === S.CORE_CLIENT_LIFECYCLE_BATCH) {
11140
11176
  const i = uh(e), s = Q(e).senderId;
11141
11177
  for (const o of i.Events) {
@@ -11146,6 +11182,10 @@ class PI {
11146
11182
  }
11147
11183
  return;
11148
11184
  }
11185
+ if (n === S.CORE_ON_FRONTEND_RELOADED) {
11186
+ m.info("Frontend rebuilt — reloading the page"), typeof window < "u" && window.location.reload();
11187
+ return;
11188
+ }
11149
11189
  this.notifyMessageSubscribers(e, n, r);
11150
11190
  }
11151
11191
  buildLifecycleMessageFromEvent(e, n) {
@@ -11157,7 +11197,7 @@ class PI {
11157
11197
  case S.CORE_ON_CLIENT_LEFT:
11158
11198
  return Rh({ ClientContext: e.ClientContext }, n);
11159
11199
  case S.CORE_ON_USER_JOINED:
11160
- return Ph({ ClientContext: e.ClientContext }, n);
11200
+ return Fh({ ClientContext: e.ClientContext }, n);
11161
11201
  case S.CORE_ON_USER_LEFT:
11162
11202
  return Gh({ ClientContext: e.ClientContext }, n);
11163
11203
  default:
@@ -11173,7 +11213,7 @@ class PI {
11173
11213
  }
11174
11214
  this.handleProtocolMessage(n);
11175
11215
  } catch (n) {
11176
- _.warn("Failed to parse DataChannel message:", n);
11216
+ m.warn("Failed to parse DataChannel message:", n);
11177
11217
  }
11178
11218
  }
11179
11219
  /**
@@ -11197,7 +11237,7 @@ class PI {
11197
11237
  }
11198
11238
  i[a](e);
11199
11239
  } catch (l) {
11200
- _.error("Message subscriber error:", l);
11240
+ m.error("Message subscriber error:", l);
11201
11241
  }
11202
11242
  }
11203
11243
  }
@@ -11216,12 +11256,12 @@ class PI {
11216
11256
  case "stopped":
11217
11257
  if (this._serverStopped)
11218
11258
  break;
11219
- _.info("Server signaled shutdown"), this._serverStopped = !0, this.clearReconnectTimer(), this.clearTimers(), this.setState("offline");
11259
+ m.info("Server signaled shutdown"), this._serverStopped = !0, this.clearReconnectTimer(), this.clearTimers(), this.setState("offline");
11220
11260
  break;
11221
11261
  case "offline":
11222
11262
  if (this._reauthInProgress)
11223
11263
  break;
11224
- if (this._hasBeenConnected && !this._serverStopped && oe()) {
11264
+ if (this._hasBeenConnected && !this._serverStopped && te()) {
11225
11265
  this.currentState === "connected" && (this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this._functionRegistry.detach(), this._reactiveRegistry.detach(), this.releaseKeepaliveLock(), this.setState("reconnecting")), this.attemptReconnect();
11226
11266
  break;
11227
11267
  }
@@ -11251,8 +11291,8 @@ class PI {
11251
11291
  */
11252
11292
  setState(e) {
11253
11293
  if (!this._isUnloading) {
11254
- if (e === "offline" && this._hasBeenConnected && !this._serverStopped && oe()) {
11255
- _.error("Refusing to set offline state from connected session — scheduling reconnect retry instead. This is a bug; investigate the call site."), this.setState("reconnecting"), this.scheduleReconnectRetry();
11294
+ if (e === "offline" && this._hasBeenConnected && !this._serverStopped && te()) {
11295
+ m.error("Refusing to set offline state from connected session — scheduling reconnect retry instead. This is a bug; investigate the call site."), this.setState("reconnecting"), this.scheduleReconnectRetry();
11256
11296
  return;
11257
11297
  }
11258
11298
  if (this.currentState !== e) {
@@ -11261,7 +11301,7 @@ class PI {
11261
11301
  try {
11262
11302
  n(e);
11263
11303
  } catch (r) {
11264
- _.error("State subscriber error:", r);
11304
+ m.error("State subscriber error:", r);
11265
11305
  }
11266
11306
  this.config.onConnectionStateChange?.(e);
11267
11307
  }
@@ -11273,13 +11313,13 @@ class PI {
11273
11313
  * is surfaced via the companion field so consumers don't need a separate state to handle.
11274
11314
  */
11275
11315
  setErrorState(e) {
11276
- if (_.error("SDK error, going offline:", e), this._lastError = e, this.clearReconnectTimer(), this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState !== "offline") {
11316
+ if (m.error("SDK error, going offline:", e), this._lastError = e, this.clearReconnectTimer(), this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState !== "offline") {
11277
11317
  this.currentState = "offline";
11278
11318
  for (const n of this.stateSubscribers)
11279
11319
  try {
11280
11320
  n("offline");
11281
11321
  } catch (r) {
11282
- _.error("State subscriber error:", r);
11322
+ m.error("State subscriber error:", r);
11283
11323
  }
11284
11324
  this.config.onConnectionStateChange?.("offline");
11285
11325
  }
@@ -11297,14 +11337,14 @@ class PI {
11297
11337
  try {
11298
11338
  r = new rr();
11299
11339
  } catch (h) {
11300
- _.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e, n);
11340
+ m.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e, n);
11301
11341
  return;
11302
11342
  }
11303
11343
  this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
11304
11344
  const i = new Promise((h, u) => {
11305
- let p = !1, m;
11345
+ let p = !1, _;
11306
11346
  const I = () => {
11307
- m !== void 0 && (clearTimeout(m), m = void 0);
11347
+ _ !== void 0 && (clearTimeout(_), _ = void 0);
11308
11348
  }, T = (E) => {
11309
11349
  const f = E.data;
11310
11350
  if (f?.type === "protocol" && f.message instanceof ArrayBuffer) {
@@ -11327,7 +11367,7 @@ class PI {
11327
11367
  sessionId: this._sessionId
11328
11368
  });
11329
11369
  }).catch((C) => {
11330
- _.warn(`Failed to refresh entrypoints for worker: ${C}`), r.postMessage({ type: "refreshEntrypointsFailed" });
11370
+ m.warn(`Failed to refresh entrypoints for worker: ${C}`), r.postMessage({ type: "refreshEntrypointsFailed" });
11331
11371
  }) : r.postMessage({ type: "refreshEntrypointsFailed" });
11332
11372
  return;
11333
11373
  }
@@ -11339,15 +11379,15 @@ class PI {
11339
11379
  r.addEventListener("message", T), r.addEventListener("error", (E) => {
11340
11380
  const f = [E.message, E.filename, E.lineno, E.colno].filter((C) => C != null && String(C).length > 0);
11341
11381
  if (p) {
11342
- _.error("Protocol worker crashed after connect, attempting reconnect"), this.workerManagerState = "offline", this.handleChannelManagerStateChange("reconnecting"), this.attemptReconnect();
11382
+ m.error("Protocol worker crashed after connect, attempting reconnect"), this.workerManagerState = "offline", this.handleChannelManagerStateChange("reconnecting"), this.attemptReconnect();
11343
11383
  return;
11344
11384
  }
11345
11385
  I(), u(new Error(`Protocol worker failed: ${f.join(" ")}`.trim()));
11346
- }), m = setTimeout(() => {
11347
- p || (m = void 0, u(new Error("Protocol worker connect timed out")));
11386
+ }), _ = setTimeout(() => {
11387
+ p || (_ = void 0, u(new Error("Protocol worker connect timed out")));
11348
11388
  }, Qp);
11349
11389
  }), s = this.computeOrderedEndpointTypes(e), o = this.getServerKeepaliveTimeoutMs(), a = this.config.timeouts?.reconnectBackoffMs ?? xn, c = this.config.timeouts?.maxReconnectAttempts ?? Wn;
11350
- this.updateWorkerInterestMask(), er() && (r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({ type: "setLogLevel", level: Fn() })), B_();
11390
+ this.updateWorkerInterestMask(), er() && (r.postMessage({ type: "enableDevtools", enabled: !0 }), r.postMessage({ type: "setLogLevel", level: Pn() })), B_();
11351
11391
  const d = bt() ?? this.config.webRtc?.enabled ?? !0;
11352
11392
  r.postMessage({
11353
11393
  type: "connect",
@@ -11367,10 +11407,10 @@ class PI {
11367
11407
  this.disconnectProtocol(), this.handleChannelManagerStateChange("offline");
11368
11408
  return;
11369
11409
  }
11370
- _.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e, n);
11410
+ m.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e, n);
11371
11411
  }
11372
11412
  d && (this._audioEnabled || this._videoEnabled) && this.setupWebRtcSignaling().catch((h) => {
11373
- _.warn(`WebRTC signaling setup failed: ${h}`);
11413
+ m.warn(`WebRTC signaling setup failed: ${h}`);
11374
11414
  });
11375
11415
  }
11376
11416
  async setupWebRtcSignaling() {
@@ -11415,9 +11455,9 @@ class PI {
11415
11455
  try {
11416
11456
  await this._webRtcSignaling.connect((r) => {
11417
11457
  this.sendProtocolMessage(r);
11418
- }), _.debug("WebRTC signaling started");
11458
+ }), m.debug("WebRTC signaling started");
11419
11459
  } catch (r) {
11420
- _.error("Failed to setup WebRTC signaling:", r), this._webRtcSignaling = null;
11460
+ m.error("Failed to setup WebRTC signaling:", r), this._webRtcSignaling = null;
11421
11461
  }
11422
11462
  }
11423
11463
  _webRtcAudioUnlockHandler = null;
@@ -11444,7 +11484,7 @@ class PI {
11444
11484
  }, 300);
11445
11485
  }).catch(() => {
11446
11486
  this.ensureWebRtcAudioUnlockHandler();
11447
- }), _.debug(`WebRTC audio track ${e} created`), this._webRtcAudioElements.size === 1 && this.setupWebRtcMediaSession();
11487
+ }), m.debug(`WebRTC audio track ${e} created`), this._webRtcAudioElements.size === 1 && this.setupWebRtcMediaSession();
11448
11488
  }
11449
11489
  destroyWebRtcAudioElement(e) {
11450
11490
  const n = this._webRtcAudioElements.get(e);
@@ -11455,7 +11495,7 @@ class PI {
11455
11495
  let a = 0;
11456
11496
  const c = setInterval(() => {
11457
11497
  if (a++, a >= i) {
11458
- clearInterval(c), n.pause(), n.srcObject = null, n.remove(), _.debug(`WebRTC audio track ${e} destroyed`);
11498
+ clearInterval(c), n.pause(), n.srcObject = null, n.remove(), m.debug(`WebRTC audio track ${e} destroyed`);
11459
11499
  return;
11460
11500
  }
11461
11501
  n.volume = Math.max(0, n.volume - o);
@@ -11500,7 +11540,7 @@ class PI {
11500
11540
  async connectProtocolOnMainThread(e, n = !1) {
11501
11541
  this.workerManagerState = null, this.protocolWorker = null;
11502
11542
  const r = bt() ?? this.config.webRtc?.enabled ?? !0;
11503
- _.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new Pp({
11543
+ m.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new Fp({
11504
11544
  sessionId: this._sessionId,
11505
11545
  keepaliveTimeoutMs: this.getServerKeepaliveTimeoutMs(),
11506
11546
  reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? xn,
@@ -11590,63 +11630,76 @@ class PI {
11590
11630
  }
11591
11631
  async attemptFullReauth() {
11592
11632
  if (this._reauthInProgress) {
11593
- _.warn("Full re-authentication already in progress, skipping");
11633
+ m.warn("Full re-authentication already in progress, skipping");
11594
11634
  return;
11595
11635
  }
11596
- this._fullReauthAttempted = !0, this._reauthInProgress = !0, _.info("Fast reconnect exhausted, attempting full re-authentication"), this.endpointSelector.clearRememberedType(), this.disconnectProtocol(), this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1;
11636
+ this._fullReauthAttempted = !0, this._reauthInProgress = !0, m.info("Fast reconnect exhausted, attempting full re-authentication"), this.endpointSelector.clearRememberedType(), this.disconnectProtocol(), this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1;
11597
11637
  try {
11598
11638
  const e = await this.authenticate();
11599
- this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, this._connectUrl = e.directUrl, _.info("Re-authenticated, connecting to new server"), await this.connectProtocol(this.authResponse.Entrypoints);
11639
+ this.authResponse = e.authResponse, this._sessionId = e.authResponse.ClientContext.SessionId, this._connectUrl = e.directUrl, m.info("Re-authenticated, connecting to new server"), await this.connectProtocol(this.authResponse.Entrypoints);
11600
11640
  } catch (e) {
11601
11641
  if (e instanceof DOMException && e.name === "AbortError")
11602
11642
  return;
11603
- _.error("Full re-authentication failed:", e), this.config.onError?.(e instanceof Error ? e : new Error(String(e))), this._hasBeenConnected ? this.scheduleReconnectRetry() : (this.clearTimers(), this.setState("offline"));
11643
+ m.error("Full re-authentication failed:", e), this.config.onError?.(e instanceof Error ? e : new Error(String(e))), this._hasBeenConnected ? this.scheduleReconnectRetry() : (this.clearTimers(), this.setState("offline"));
11604
11644
  } finally {
11605
11645
  this._reauthInProgress = !1;
11606
11646
  }
11607
11647
  }
11608
11648
  attemptReconnect() {
11609
- if (!oe()) {
11610
- _.warn("Retry disabled via ikon-retry=false, going offline"), this.clearTimers(), this.setState("offline");
11649
+ if (!te()) {
11650
+ m.warn("Retry disabled via ikon-retry=false, going offline"), this.clearTimers(), this.setState("offline");
11611
11651
  return;
11612
11652
  }
11613
11653
  if (this._reauthInProgress)
11614
11654
  return;
11615
11655
  this.clearReconnectTimer();
11616
11656
  const e = this._disconnectedAt !== null ? Date.now() - this._disconnectedAt : 1 / 0, n = e > qp;
11617
- if (_.info(`Reconnect decision: disconnected ${e === 1 / 0 ? "?" : Math.round(e / 1e3)}s, softExpired=${n}, softAttempted=${this._softReconnectAttempted}, fullAttempted=${this._fullReauthAttempted}, authRejected=${this._lastFailureWasAuthRejected}`), this._lastFailureWasAuthRejected)
11618
- _.info("Skipping soft reconnect — last failure was auth-rejected, going straight to full re-auth"), this._lastFailureWasAuthRejected = !1, this._softReconnectAttempted = !0;
11657
+ if (m.info(`Reconnect decision: disconnected ${e === 1 / 0 ? "?" : Math.round(e / 1e3)}s, softExpired=${n}, softAttempted=${this._softReconnectAttempted}, fullAttempted=${this._fullReauthAttempted}, authRejected=${this._lastFailureWasAuthRejected}`), this._lastFailureWasAuthRejected)
11658
+ m.info("Skipping soft reconnect — last failure was auth-rejected, going straight to full re-auth"), this._lastFailureWasAuthRejected = !1, this._softReconnectAttempted = !0;
11619
11659
  else if (!n && !this._softReconnectAttempted && !this._fullReauthAttempted && this.authResponse) {
11620
- _.info("Attempting soft reconnect with cached entrypoints"), this._softReconnectAttempted = !0, this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this.disconnectProtocol(), this.connectProtocol(this.authResponse.Entrypoints, !0);
11660
+ m.info("Attempting soft reconnect with cached entrypoints"), this._softReconnectAttempted = !0, this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this.disconnectProtocol(), this.connectProtocol(this.authResponse.Entrypoints, !0);
11661
+ return;
11662
+ }
11663
+ if (n && m.info("Disconnected for more than 5 minutes, skipping soft retry"), this._waitForExternalConnectUrl) {
11664
+ m.info("Soft reconnect exhausted, re-requesting external connect URL from parent window"), this.requestExternalConnectUrl();
11621
11665
  return;
11622
11666
  }
11623
- if (n && _.info("Disconnected for more than 5 minutes, skipping soft retry"), !this.canAttemptFullReauth()) {
11667
+ if (!this.canAttemptFullReauth()) {
11624
11668
  if (this._hasBeenConnected) {
11625
- _.warn("Cannot attempt reconnection right now, scheduling retry"), this.scheduleReconnectRetry();
11669
+ m.warn("Cannot attempt reconnection right now, scheduling retry"), this.scheduleReconnectRetry();
11626
11670
  return;
11627
11671
  }
11628
- _.warn("Cannot attempt reconnection, going offline"), this.clearTimers(), this.setState("offline");
11672
+ m.warn("Cannot attempt reconnection, going offline"), this.clearTimers(), this.setState("offline");
11629
11673
  return;
11630
11674
  }
11631
11675
  this.attemptFullReauth();
11632
11676
  }
11633
11677
  scheduleReconnectRetry() {
11634
- if (!oe()) {
11635
- _.warn("Retry disabled via ikon-retry=false, going offline instead of scheduling retry"), this.clearTimers(), this.setState("offline");
11678
+ if (!te()) {
11679
+ m.warn("Retry disabled via ikon-retry=false, going offline instead of scheduling retry"), this.clearTimers(), this.setState("offline");
11636
11680
  return;
11637
11681
  }
11638
- this.clearReconnectTimer(), _.info("Scheduling reconnect retry in 10 seconds"), this._reconnectTimer = setTimeout(() => {
11682
+ this.clearReconnectTimer(), m.info("Scheduling reconnect retry in 10 seconds"), this._reconnectTimer = setTimeout(() => {
11639
11683
  this._reconnectTimer = null, this.attemptReconnect();
11640
11684
  }, eE);
11641
11685
  }
11642
11686
  clearReconnectTimer() {
11643
11687
  this._reconnectTimer && (clearTimeout(this._reconnectTimer), this._reconnectTimer = null);
11644
11688
  }
11689
+ /**
11690
+ * Re-enter the external-connect-URL waiting state and re-arm the listener so
11691
+ * the parent window can hand over a fresh connect URL after the cached
11692
+ * entrypoints have gone stale (e.g. the preview server restarted). Without
11693
+ * this the preview iframe wedges forever, because it has no self-auth path.
11694
+ */
11695
+ requestExternalConnectUrl() {
11696
+ this.clearReconnectTimer(), this.disconnectProtocol(), this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this._softReconnectAttempted = !1, this._fullReauthAttempted = !1, this._externalConnectUrlCleanup && (this._externalConnectUrlCleanup(), this._externalConnectUrlCleanup = null), this.setState("waitingForExternalConnectUrl"), this._externalConnectUrlCleanup = this.setupExternalConnectUrlListener();
11697
+ }
11645
11698
  attemptReconnectOnVisible() {
11646
- this.currentState === "reconnecting" && this._reconnectTimer && (_.info("Page became visible/online while reconnecting, retrying now"), this.attemptReconnect());
11699
+ this.currentState === "reconnecting" && this._reconnectTimer && (m.info("Page became visible/online while reconnecting, retrying now"), this.attemptReconnect());
11647
11700
  }
11648
11701
  handleBrowserOffline() {
11649
- this.currentState === "connected" && (_.info("Browser reports offline, triggering reconnect"), this.protocolWorker ? this.protocolWorker.postMessage({ type: "triggerReconnect", reason: "Browser offline event" }) : this.channelManager?.triggerReconnect("Browser offline event"));
11702
+ this.currentState === "connected" && (m.info("Browser reports offline, triggering reconnect"), this.protocolWorker ? this.protocolWorker.postMessage({ type: "triggerReconnect", reason: "Browser offline event" }) : this.channelManager?.triggerReconnect("Browser offline event"));
11650
11703
  }
11651
11704
  /**
11652
11705
  * Clear all timers.
@@ -11658,13 +11711,28 @@ class PI {
11658
11711
  * Set up browser lifecycle event handlers.
11659
11712
  */
11660
11713
  setupLifecycleHandlers() {
11661
- typeof window > "u" || (this.boundBeforeUnload = () => this.handleBeforeUnload(), window.addEventListener("beforeunload", this.boundBeforeUnload), this.boundPageHide = (e) => this.handlePageHide(e), window.addEventListener("pagehide", this.boundPageHide), this.boundVisibilityChange = () => this.handleVisibilityChange(), document.addEventListener("visibilitychange", this.boundVisibilityChange), this.boundPopstate = () => this.handlePopstate(), window.addEventListener("popstate", this.boundPopstate), this.boundOnline = () => this.attemptReconnectOnVisible(), window.addEventListener("online", this.boundOnline), this.boundOffline = () => this.handleBrowserOffline(), window.addEventListener("offline", this.boundOffline));
11714
+ typeof window > "u" || (this.boundBeforeUnload = () => this.handleBeforeUnload(), window.addEventListener("beforeunload", this.boundBeforeUnload), this.boundPageHide = (e) => this.handlePageHide(e), window.addEventListener("pagehide", this.boundPageHide), this.boundVisibilityChange = () => this.handleVisibilityChange(), document.addEventListener("visibilitychange", this.boundVisibilityChange), this.boundPopstate = () => this.handlePopstate(), window.addEventListener("popstate", this.boundPopstate), this.boundOnline = () => this.attemptReconnectOnVisible(), window.addEventListener("online", this.boundOnline), this.boundOffline = () => this.handleBrowserOffline(), window.addEventListener("offline", this.boundOffline), this.boundExternalLinkClick = (e) => this.handleExternalLinkClick(e), document.addEventListener("click", this.boundExternalLinkClick, !0));
11662
11715
  }
11663
11716
  /**
11664
11717
  * Clean up browser lifecycle event handlers.
11665
11718
  */
11666
11719
  cleanupLifecycleHandlers() {
11667
- typeof window > "u" || (this.boundBeforeUnload && (window.removeEventListener("beforeunload", this.boundBeforeUnload), this.boundBeforeUnload = null), this.boundPageHide && (window.removeEventListener("pagehide", this.boundPageHide), this.boundPageHide = null), this.boundVisibilityChange && (document.removeEventListener("visibilitychange", this.boundVisibilityChange), this.boundVisibilityChange = null), this.boundPopstate && (window.removeEventListener("popstate", this.boundPopstate), this.boundPopstate = null), this.boundOnline && (window.removeEventListener("online", this.boundOnline), this.boundOnline = null), this.boundOffline && (window.removeEventListener("offline", this.boundOffline), this.boundOffline = null));
11720
+ typeof window > "u" || (this.boundBeforeUnload && (window.removeEventListener("beforeunload", this.boundBeforeUnload), this.boundBeforeUnload = null), this.boundPageHide && (window.removeEventListener("pagehide", this.boundPageHide), this.boundPageHide = null), this.boundVisibilityChange && (document.removeEventListener("visibilitychange", this.boundVisibilityChange), this.boundVisibilityChange = null), this.boundPopstate && (window.removeEventListener("popstate", this.boundPopstate), this.boundPopstate = null), this.boundOnline && (window.removeEventListener("online", this.boundOnline), this.boundOnline = null), this.boundOffline && (window.removeEventListener("offline", this.boundOffline), this.boundOffline = null), this.boundExternalLinkClick && (document.removeEventListener("click", this.boundExternalLinkClick, !0), this.boundExternalLinkClick = null));
11721
+ }
11722
+ /**
11723
+ * Intercept clicks on external-handler links (mailto:/tel:/sms:). Launching one as a normal
11724
+ * top-level navigation makes the browser fire beforeunload/pagehide before it hands off to the OS
11725
+ * and aborts the navigation — which disconnects us even though the page never unloads. Launch it
11726
+ * through {@link launchExternalHandler} (a transient iframe) instead so the document is untouched.
11727
+ */
11728
+ handleExternalLinkClick(e) {
11729
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
11730
+ return;
11731
+ const r = e.target?.closest?.("a[href]");
11732
+ if (!r || r.target && r.target !== "_self")
11733
+ return;
11734
+ const i = r.getAttribute("href") ?? "";
11735
+ G_(i) && (e.preventDefault(), V_(i));
11668
11736
  }
11669
11737
  /**
11670
11738
  * Send an in-band "I'm leaving" signal over the live channel. Best-effort: reliable on a
@@ -11677,7 +11745,7 @@ class PI {
11677
11745
  const e = rh(th(), this._sessionId);
11678
11746
  this.sendProtocolMessage(e);
11679
11747
  } catch (e) {
11680
- _.debug("Failed to send disconnect signal:", e);
11748
+ m.debug("Failed to send disconnect signal:", e);
11681
11749
  }
11682
11750
  }
11683
11751
  /**
@@ -11697,7 +11765,7 @@ class PI {
11697
11765
  const r = new Uint8Array(e.AuthTicket.byteLength);
11698
11766
  r.set(e.AuthTicket), navigator.sendBeacon(n.toString(), r.buffer);
11699
11767
  } catch (n) {
11700
- _.debug("Failed to send disconnect beacon:", n);
11768
+ m.debug("Failed to send disconnect beacon:", n);
11701
11769
  }
11702
11770
  }
11703
11771
  /**
@@ -11705,14 +11773,14 @@ class PI {
11705
11773
  * Close connection cleanly to avoid orphaned connections on the server.
11706
11774
  */
11707
11775
  handleBeforeUnload() {
11708
- _.debug("Page unloading, closing connection..."), this._isUnloading = !0, this.sendDisconnectBeacon(), this.disconnect();
11776
+ m.debug("Page unloading, closing connection..."), this._isUnloading = !0, this.sendDisconnectBeacon(), this.disconnect();
11709
11777
  }
11710
11778
  /**
11711
11779
  * Handle page hide event (mobile-friendly, bfcache compatible).
11712
11780
  * Only disconnect if page is actually being unloaded (not persisted).
11713
11781
  */
11714
11782
  handlePageHide(e) {
11715
- e.persisted || (_.debug("Page hidden (not persisted), closing connection..."), this._isUnloading = !0, this.sendDisconnectBeacon(), this.disconnect());
11783
+ e.persisted || (m.debug("Page hidden (not persisted), closing connection..."), this._isUnloading = !0, this.sendDisconnectBeacon(), this.disconnect());
11716
11784
  }
11717
11785
  /**
11718
11786
  * Handle visibility change event.
@@ -11741,10 +11809,10 @@ class PI {
11741
11809
  */
11742
11810
  checkConnectionHealth() {
11743
11811
  if (this.protocolWorker) {
11744
- this.currentState === "connected" && this.workerManagerState !== "connected" && (_.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
11812
+ this.currentState === "connected" && this.workerManagerState !== "connected" && (m.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
11745
11813
  return;
11746
11814
  }
11747
- this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (_.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
11815
+ this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (m.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
11748
11816
  }
11749
11817
  /**
11750
11818
  * Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
@@ -11765,7 +11833,7 @@ class PI {
11765
11833
  const e = Un(On(), this._sessionId ?? 0);
11766
11834
  this.sendProtocolMessage(e);
11767
11835
  } catch (e) {
11768
- _.error("onJoined callback error:", e);
11836
+ m.error("onJoined callback error:", e);
11769
11837
  const n = Un(On(), this._sessionId ?? 0);
11770
11838
  this.sendProtocolMessage(n);
11771
11839
  }
@@ -11801,17 +11869,23 @@ class PI {
11801
11869
  */
11802
11870
  setupExternalConnectUrlListener() {
11803
11871
  const e = (n) => {
11804
- n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (_.info("Received external connect URL from parent window"), this.handleExternalConnectUrl(n.data.serverUrl).catch((r) => {
11805
- _.error("Failed to connect with external connect URL:", r), this.setErrorState(r instanceof Error ? r : new Error(String(r)));
11872
+ n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (m.info("Received external connect URL from parent window"), this.handleExternalConnectUrl(n.data.serverUrl).catch((r) => {
11873
+ if (!(r instanceof DOMException && r.name === "AbortError")) {
11874
+ if (this._hasBeenConnected && te()) {
11875
+ m.warn("External connect URL connection failed, scheduling retry:", r), this.scheduleReconnectRetry();
11876
+ return;
11877
+ }
11878
+ m.error("Failed to connect with external connect URL:", r), this.setErrorState(r instanceof Error ? r : new Error(String(r)));
11879
+ }
11806
11880
  }));
11807
11881
  };
11808
- if (window.addEventListener("message", e), _.debug("External connect URL listener registered"), window.parent && window.parent !== window)
11882
+ if (window.addEventListener("message", e), m.debug("External connect URL listener registered"), window.parent && window.parent !== window)
11809
11883
  try {
11810
- window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"), _.debug("Posted IKON_CLIENT_READY_FOR_CONNECT_URL to parent window");
11884
+ window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"), m.debug("Posted IKON_CLIENT_READY_FOR_CONNECT_URL to parent window");
11811
11885
  } catch {
11812
11886
  }
11813
11887
  return () => {
11814
- window.removeEventListener("message", e), _.debug("External connect URL listener removed");
11888
+ window.removeEventListener("message", e), m.debug("External connect URL listener removed");
11815
11889
  };
11816
11890
  }
11817
11891
  /**
@@ -11820,7 +11894,7 @@ class PI {
11820
11894
  async handleExternalConnectUrl(e) {
11821
11895
  if (this.currentState !== "waitingForExternalConnectUrl")
11822
11896
  throw new Error(`Cannot connect with external connect URL: already in state ${this.currentState}`);
11823
- _.info("Connecting with external connect URL");
11897
+ m.info("Connecting with external connect URL");
11824
11898
  try {
11825
11899
  await this.executeConnection(() => Ee(e, this.abortController.signal));
11826
11900
  } finally {
@@ -11828,7 +11902,7 @@ class PI {
11828
11902
  }
11829
11903
  }
11830
11904
  }
11831
- class iI {
11905
+ class cI {
11832
11906
  constructor(e) {
11833
11907
  this.client = e;
11834
11908
  }
@@ -11853,29 +11927,29 @@ class iI {
11853
11927
  } };
11854
11928
  }
11855
11929
  }
11856
- function FI(t) {
11857
- return new iI(t);
11930
+ function GI(t) {
11931
+ return new cI(t);
11858
11932
  }
11859
- function BI(t) {
11933
+ function VI(t) {
11860
11934
  return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
11861
11935
  }
11862
- function xI(t) {
11936
+ function HI(t) {
11863
11937
  return t === "connected";
11864
11938
  }
11865
- function WI(t) {
11939
+ function $I(t) {
11866
11940
  return t === "offline" || t === "offlineError";
11867
11941
  }
11868
- function GI(t) {
11942
+ function KI(t) {
11869
11943
  return t === "offlineError";
11870
11944
  }
11871
11945
  const ua = /* @__PURE__ */ new Map();
11872
11946
  for (const [t, e] of Object.entries(S))
11873
11947
  typeof e == "number" && ua.set(e, t);
11874
- function VI(t) {
11948
+ function YI(t) {
11875
11949
  return ua.get(t) ?? `UNKNOWN_${t}`;
11876
11950
  }
11877
11951
  const en = "ikon.login.appRoute";
11878
- function HI(t) {
11952
+ function jI(t) {
11879
11953
  if (typeof window > "u")
11880
11954
  return;
11881
11955
  try {
@@ -11885,7 +11959,7 @@ function HI(t) {
11885
11959
  const e = new URL(window.location.href);
11886
11960
  e.searchParams.set(vo, t), window.location.href = e.toString();
11887
11961
  }
11888
- function $I() {
11962
+ function zI() {
11889
11963
  let t = null;
11890
11964
  try {
11891
11965
  t = sessionStorage.getItem(en), sessionStorage.removeItem(en);
@@ -11895,21 +11969,21 @@ function $I() {
11895
11969
  }
11896
11970
  export {
11897
11971
  Tt as AccessDeniedError,
11898
- iI as AppMessaging,
11972
+ cI as AppMessaging,
11899
11973
  pe as AuthRejectedError,
11900
11974
  L as AuthenticationError,
11901
11975
  ip as BrowserNotSupportedError,
11902
11976
  Lp as Channel,
11903
- Pp as ChannelManager,
11904
- oI as ChannelNotFoundError,
11977
+ Fp as ChannelManager,
11978
+ uI as ChannelNotFoundError,
11905
11979
  me as ClientType,
11906
11980
  It as ConnectionError,
11907
11981
  Ae as ContextType,
11908
- nI as EndpointSelector,
11982
+ oI as EndpointSelector,
11909
11983
  y as EntrypointType,
11910
11984
  bm as FunctionCallError,
11911
11985
  km as FunctionRegistry,
11912
- yI as IKON_AUTH_BASE_URL,
11986
+ kI as IKON_AUTH_BASE_URL,
11913
11987
  Ot as IKON_AUTH_URL_DEV,
11914
11988
  vt as IKON_AUTH_URL_PROD,
11915
11989
  jt as IKON_BACKEND_URL_DEV,
@@ -11918,8 +11992,8 @@ export {
11918
11992
  mp as IKON_PARAM_AUTH,
11919
11993
  Do as IKON_PARAM_DEBUG,
11920
11994
  Ep as IKON_PARAM_DEBUG_OVERLAY,
11921
- hI as IKON_PARAM_GIT_BRANCH,
11922
- dI as IKON_PARAM_GIT_SOURCE,
11995
+ mI as IKON_PARAM_GIT_BRANCH,
11996
+ EI as IKON_PARAM_GIT_SOURCE,
11923
11997
  Oo as IKON_PARAM_INSPECT,
11924
11998
  dp as IKON_PARAM_LANG,
11925
11999
  cp as IKON_PARAM_PROXY,
@@ -11931,27 +12005,27 @@ export {
11931
12005
  up as IKON_PARAM_WEBTRANSPORT,
11932
12006
  D_ as IkonAudioCapture,
11933
12007
  Rn as IkonAudioPlayback,
11934
- PI as IkonClient,
12008
+ WI as IkonClient,
11935
12009
  xm as IkonImageCapture,
11936
12010
  g_ as IkonMedia,
11937
12011
  M_ as IkonMediaCapture,
11938
12012
  L_ as IkonVideoCapture,
11939
12013
  T_ as IkonVideoPlayback,
11940
12014
  En as KeepaliveTimeoutError,
11941
- te as LogLevel,
11942
- Pn as MaxRetriesExceededError,
11943
- cI as NoChannelsError,
12015
+ ne as LogLevel,
12016
+ Fn as MaxRetriesExceededError,
12017
+ hI as NoChannelsError,
11944
12018
  S as Opcode,
11945
12019
  bo as ProvisioningTimeoutError,
11946
12020
  gt as ServerFullError,
11947
- aI as SpaceNotFoundError,
12021
+ dI as SpaceNotFoundError,
11948
12022
  $ as TransportError,
11949
12023
  Re as UserType,
11950
- II as WEBRTC_AUDIO_BITRATE,
11951
- _I as WEBRTC_AUDIO_CHANNELS,
11952
- EI as WEBRTC_AUDIO_CODEC,
11953
- Fp as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
11954
- mI as WEBRTC_AUDIO_SAMPLE_RATE,
12024
+ SI as WEBRTC_AUDIO_BITRATE,
12025
+ wI as WEBRTC_AUDIO_CHANNELS,
12026
+ TI as WEBRTC_AUDIO_CODEC,
12027
+ Pp as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
12028
+ gI as WEBRTC_AUDIO_SAMPLE_RATE,
11955
12029
  Wp as WEBRTC_BUNDLE_POLICY,
11956
12030
  $p as WEBRTC_DATA_CHANNEL_LABEL,
11957
12031
  Yp as WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS,
@@ -11959,81 +12033,81 @@ export {
11959
12033
  Vp as WEBRTC_MAX_AUDIO_TRACKS,
11960
12034
  Hp as WEBRTC_MAX_VIDEO_TRACKS,
11961
12035
  Gp as WEBRTC_RTCP_MUX_POLICY,
11962
- TI as WEBRTC_VIDEO_CODEC,
12036
+ CI as WEBRTC_VIDEO_CODEC,
11963
12037
  Bp as WEBRTC_VIDEO_MAX_BITRATE,
11964
- gI as WEBRTC_VIDEO_MAX_FRAMERATE,
12038
+ AI as WEBRTC_VIDEO_MAX_FRAMERATE,
11965
12039
  jp as WebRTCConnection,
11966
12040
  zp as WebRTCSignaling,
11967
12041
  Ct as abortSignalAny,
11968
12042
  le as abortSignalTimeout,
11969
- FI as appMessaging,
11970
- sI as asProtocolMessage,
11971
- eI as checkBrowserSupport,
11972
- AI as clearDeviceId,
11973
- LI as clearLogBuffer,
11974
- SI as clearLoginPrompt,
11975
- NI as clearSessionParamsFromUrl,
11976
- $I as consumeLoginHandoff,
12043
+ GI as appMessaging,
12044
+ lI as asProtocolMessage,
12045
+ iI as checkBrowserSupport,
12046
+ NI as clearDeviceId,
12047
+ BI as clearLogBuffer,
12048
+ RI as clearLoginPrompt,
12049
+ OI as clearSessionParamsFromUrl,
12050
+ zI as consumeLoginHandoff,
11977
12051
  nE as consumeLoginPendingCall,
11978
12052
  M as createLogger,
11979
12053
  cm as deriveAuthUrl,
11980
- RI as deriveBackendType,
12054
+ DI as deriveBackendType,
11981
12055
  Ut as deriveBackendUrl,
11982
- DI as enableInspectMode,
12056
+ LI as enableInspectMode,
11983
12057
  nm as extractUserIdFromToken,
11984
- UI as flushLogs,
12058
+ PI as flushLogs,
11985
12059
  Ap as getAudioParam,
11986
12060
  bp as getAuthSameOriginParam,
11987
- OI as getBufferedLogs,
11988
- pI as getDebugOverlayParam,
12061
+ FI as getBufferedLogs,
12062
+ II as getDebugOverlayParam,
11989
12063
  Sp as getDebugParam,
11990
12064
  Rp as getInspectParam,
11991
- fI as getLangParam,
11992
- MI as getLogBufferSize,
11993
- Fn as getLogLevel,
11994
- lI as getLogSink,
11995
- wI as getLoginPromptState,
11996
- VI as getOpcodeName,
12065
+ _I as getLangParam,
12066
+ xI as getLogBufferSize,
12067
+ Pn as getLogLevel,
12068
+ fI as getLogSink,
12069
+ yI as getLoginPromptState,
12070
+ YI as getOpcodeName,
11997
12071
  At as getOrCreateDeviceId,
11998
12072
  Tp as getProxyParam,
11999
- oe as getRetryParam,
12073
+ te as getRetryParam,
12000
12074
  sm as getSameOriginAuthUrl,
12001
12075
  Cp as getServerUrlParam,
12002
12076
  yp as getVideoParam,
12003
12077
  bt as getWebRtcParam,
12004
12078
  gp as getWebSocketParam,
12005
12079
  wp as getWebTransportParam,
12006
- P_ as initializeDebugMode,
12080
+ F_ as initializeDebugMode,
12007
12081
  B_ as initializeInspectMode,
12008
- W_ as initializeLogSink,
12082
+ $_ as initializeLogSink,
12009
12083
  Zo as isAudioWorkletSupported,
12010
12084
  qe as isBrowserEnvironment,
12011
12085
  ze as isCloudEnvironment,
12012
- xI as isConnected,
12013
- BI as isConnecting,
12086
+ HI as isConnected,
12087
+ VI as isConnecting,
12014
12088
  er as isDebugModeEnabled,
12015
- GI as isError,
12016
- kI as isInspectModeEnabled,
12089
+ KI as isError,
12090
+ UI as isInspectModeEnabled,
12017
12091
  Bm as isMobileBrowserLikely,
12018
- WI as isOffline,
12092
+ $I as isOffline,
12019
12093
  at as isSharedArrayBufferSupported,
12020
12094
  Lo as isWebTransportSupported,
12021
- Pm as loginErrorInterceptor,
12022
- bI as parseUrlParams,
12095
+ Fm as loginErrorInterceptor,
12096
+ vI as parseUrlParams,
12023
12097
  Dt as randomUuid,
12024
12098
  Be as readOpcode,
12025
12099
  st as readOpcodeGroup,
12026
12100
  Q as readProtocolMessageHeaders,
12027
12101
  em as registerBrowserFunctions,
12028
- HI as reprovisionAfterLogin,
12102
+ jI as reprovisionAfterLogin,
12029
12103
  ko as setLogLevel,
12030
12104
  sp as setLogSink,
12031
12105
  Uo as setSdkUrlParam,
12032
- vI as setSendLogsCallback,
12033
- Z_ as startLogSender,
12106
+ MI as setSendLogsCallback,
12107
+ nI as startLogSender,
12034
12108
  la as stopLogSender,
12035
- CI as subscribeLoginPrompt,
12036
- uI as subscribeToLogEvents,
12109
+ bI as subscribeLoginPrompt,
12110
+ pI as subscribeToLogEvents,
12037
12111
  aa as takeBufferedLogs,
12038
12112
  Hn as withResultData
12039
12113
  };