@ikonai/sdk 1.0.4 → 1.0.5

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.
@@ -14,9 +14,9 @@ function X(t) {
14
14
  if (27 + a * 4 > e.length)
15
15
  throw new Error("Protocol header exceeds payload length");
16
16
  const I = [];
17
- let b = 27;
17
+ let O = 27;
18
18
  for (let d = 0; d < a; d++)
19
- I.push(r.getUint32(b, !0)), b += 4;
19
+ I.push(r.getUint32(O, !0)), O += 4;
20
20
  return {
21
21
  length: s,
22
22
  opcode: n,
@@ -32,15 +32,15 @@ function X(t) {
32
32
  function nt(t, e, r, s, n) {
33
33
  const a = [], f = 27 + a.length * 4, _ = f + e.length, m = new Uint8Array(_), I = new DataView(m.buffer);
34
34
  I.setUint32(0, _, !0), I.setUint32(4, t >>> 0, !0), I.setUint32(8, s >>> 0, !0), I.setUint32(12, 0, !0), I.setUint32(16, 0, !0), I.setUint32(20, a.length >>> 0, !0), I.setUint8(24, r & 255), I.setUint8(25, 8), I.setUint8(26, 0);
35
- let b = 27;
35
+ let O = 27;
36
36
  for (let d = 0; d < a.length; d++)
37
- I.setUint32(b, a[d] >>> 0, !0), b += 4;
37
+ I.setUint32(O, a[d] >>> 0, !0), O += 4;
38
38
  return m.set(e, f), m;
39
39
  }
40
40
  var g = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(g || {});
41
- const it = 161, at = 162, G = new TextEncoder();
41
+ const it = 161, at = 162, p = new TextEncoder();
42
42
  new TextDecoder("utf-8", { fatal: !0 });
43
- class B {
43
+ class M {
44
44
  constructor(e = 1) {
45
45
  this.version = e, this.buffer.writeByte(it), this.buffer.writeVarUInt(e >>> 0);
46
46
  }
@@ -75,14 +75,14 @@ class B {
75
75
  this.writeFixedField(e, 14, () => this.buffer.writeBytes(s));
76
76
  }
77
77
  writeStringField(e, r) {
78
- const s = G.encode(r ?? "");
78
+ const s = p.encode(r ?? "");
79
79
  this.writeVariableField(e, 12, s);
80
80
  }
81
81
  writeBinaryField(e, r) {
82
82
  this.writeVariableField(e, 13, r);
83
83
  }
84
84
  writeObjectField(e, r, s) {
85
- const n = new B(r);
85
+ const n = new M(r);
86
86
  s(n);
87
87
  const i = n.finish();
88
88
  this.writeVariableField(e, 11, i);
@@ -175,7 +175,7 @@ class W {
175
175
  12
176
176
  /* String */
177
177
  ), this.count++;
178
- const r = G.encode(e ?? "");
178
+ const r = p.encode(e ?? "");
179
179
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r);
180
180
  }
181
181
  writeBinary(e) {
@@ -189,7 +189,7 @@ class W {
189
189
  11
190
190
  /* Object */
191
191
  ), this.count++;
192
- const s = new B(e);
192
+ const s = new M(e);
193
193
  r(s);
194
194
  const n = s.finish();
195
195
  this.payload.writeVarUInt(n.length), this.payload.writeBytes(n);
@@ -308,7 +308,7 @@ class ot {
308
308
  12
309
309
  /* String */
310
310
  );
311
- const r = G.encode(e ?? "");
311
+ const r = p.encode(e ?? "");
312
312
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.keyWritten = !0;
313
313
  }
314
314
  writeKeyBinary(e) {
@@ -386,7 +386,7 @@ class ot {
386
386
  12
387
387
  /* String */
388
388
  );
389
- const r = G.encode(e ?? "");
389
+ const r = p.encode(e ?? "");
390
390
  this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.valueWritten = !0;
391
391
  }
392
392
  writeValueObject(e, r) {
@@ -394,7 +394,7 @@ class ot {
394
394
  11
395
395
  /* Object */
396
396
  );
397
- const s = new B(e);
397
+ const s = new M(e);
398
398
  r(s);
399
399
  const n = s.finish();
400
400
  this.payload.writeVarUInt(n.length), this.payload.writeBytes(n), this.valueWritten = !0;
@@ -575,13 +575,13 @@ function j(t) {
575
575
  function Et(t) {
576
576
  return t instanceof Uint8Array ? t : new Uint8Array(t);
577
577
  }
578
- var w = /* @__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))(w || {}), O = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT = 524297] = "ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(O || {});
578
+ var U = /* @__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))(U || {}), B = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(B || {});
579
579
  const J = 1, _t = 131074;
580
580
  function Z(t) {
581
581
  return {};
582
582
  }
583
583
  function It(t) {
584
- return new B(J).finish();
584
+ return new M(J).finish();
585
585
  }
586
586
  function tt(t, e, r) {
587
587
  const s = It();
@@ -660,7 +660,7 @@ function F(t) {
660
660
  }
661
661
  };
662
662
  }
663
- const p = F("WebSocketTransport"), Nt = 1e4;
663
+ const G = F("WebSocketTransport"), Nt = 1e4;
664
664
  class ft {
665
665
  ws = null;
666
666
  keepaliveTimeout = null;
@@ -692,7 +692,7 @@ class ft {
692
692
  this.ws.onopen = () => {
693
693
  i = !0, clearTimeout(a), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, s());
694
694
  }, this.ws.onerror = () => {
695
- clearTimeout(a), p.error("WebSocket error"), o || (o = !0, E(), n(new L("WebSocket connection failed")));
695
+ clearTimeout(a), G.error("WebSocket error"), o || (o = !0, E(), n(new L("WebSocket connection failed")));
696
696
  }, this.ws.onclose = (h) => {
697
697
  if (this.clearKeepaliveTimeout(), !i && !o) {
698
698
  o = !0, E(), n(new L("WebSocket connection closed before opening"));
@@ -706,7 +706,7 @@ class ft {
706
706
  });
707
707
  }
708
708
  send(e) {
709
- this.ws?.readyState === WebSocket.OPEN ? this.ws.send(e) : p.warn("Cannot send: WebSocket not connected");
709
+ this.ws?.readyState === WebSocket.OPEN ? this.ws.send(e) : G.warn("Cannot send: WebSocket not connected");
710
710
  }
711
711
  close() {
712
712
  this.clearKeepaliveTimeout(), this.ws && (this.ws.close(1e3, "Client closing"), this.ws = null);
@@ -719,18 +719,18 @@ class ft {
719
719
  }
720
720
  handleProtocolMessage(e) {
721
721
  try {
722
- if (X(e).opcode === O.KEEPALIVE_REQUEST) {
722
+ if (X(e).opcode === B.KEEPALIVE_REQUEST) {
723
723
  this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
724
724
  return;
725
725
  }
726
726
  this.resetKeepaliveTimeout(), this.callbacks.onProtocolMessage(e);
727
727
  } catch (r) {
728
- p.error("Failed to process protocol message:", r), this.callbacks.onError(r instanceof Error ? r : new Error(String(r)));
728
+ G.error("Failed to process protocol message:", r), this.callbacks.onError(r instanceof Error ? r : new Error(String(r)));
729
729
  }
730
730
  }
731
731
  resetKeepaliveTimeout() {
732
732
  this.clearKeepaliveTimeout(), this.keepaliveTimeout = setTimeout(() => {
733
- p.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new z(this.keepaliveTimeoutMs)), this.close();
733
+ G.error(`No keepalive received in ${this.keepaliveTimeoutMs}ms, closing connection`), this.callbacks.onError(new z(this.keepaliveTimeoutMs)), this.close();
734
734
  }, this.keepaliveTimeoutMs);
735
735
  }
736
736
  clearKeepaliveTimeout() {
@@ -861,7 +861,7 @@ class Rt {
861
861
  */
862
862
  handleProtocolMessage(e) {
863
863
  try {
864
- if (X(e).opcode === O.KEEPALIVE_REQUEST) {
864
+ if (X(e).opcode === B.KEEPALIVE_REQUEST) {
865
865
  this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
866
866
  return;
867
867
  }
@@ -903,7 +903,7 @@ class Rt {
903
903
  }
904
904
  }
905
905
  }
906
- const D = F("Channel");
906
+ const b = F("Channel");
907
907
  class yt {
908
908
  state = "disconnected";
909
909
  transport = null;
@@ -946,7 +946,7 @@ class yt {
946
946
  try {
947
947
  await this.connectTransport(), this.setState("connected");
948
948
  } catch (e) {
949
- throw D.error("Channel connection failed:", e), this.setState("disconnected"), e;
949
+ throw b.error("Channel connection failed:", e), this.setState("disconnected"), e;
950
950
  }
951
951
  }
952
952
  /**
@@ -960,7 +960,7 @@ class yt {
960
960
  */
961
961
  send(e) {
962
962
  if (!this.transport?.isConnected) {
963
- D.warn("Cannot send: channel not connected");
963
+ b.warn("Cannot send: channel not connected");
964
964
  return;
965
965
  }
966
966
  this.transport.send(e);
@@ -979,18 +979,18 @@ class yt {
979
979
  }
980
980
  };
981
981
  switch (e.Type) {
982
- case w.WebSocket:
983
- case w.WebSocketProxy:
982
+ case U.WebSocket:
983
+ case U.WebSocketProxy:
984
984
  this.transport = new ft(r);
985
985
  break;
986
- case w.WebTransport:
987
- case w.WebTransportProxy:
986
+ case U.WebTransport:
987
+ case U.WebTransportProxy:
988
988
  if (!rt())
989
989
  throw new Error("WebTransport is not supported in this browser");
990
990
  this.transport = new Rt(r);
991
991
  break;
992
992
  default:
993
- throw new Error(`Unsupported entrypoint type: ${w[e.Type]}`);
993
+ throw new Error(`Unsupported entrypoint type: ${U[e.Type]}`);
994
994
  }
995
995
  await this.transport.connect(e.Uri, e.AuthTicket);
996
996
  }
@@ -1000,13 +1000,13 @@ class yt {
1000
1000
  handleProtocolMessage(e) {
1001
1001
  try {
1002
1002
  const r = e;
1003
- if ($(r) === O.CORE_ON_SERVER_STOPPING) {
1004
- D.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
1003
+ if ($(r) === B.CORE_ON_SERVER_STOPPING) {
1004
+ b.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
1005
1005
  return;
1006
1006
  }
1007
1007
  this.config.onProtocolMessage?.(r);
1008
1008
  } catch (r) {
1009
- D.error("Failed to handle protocol message:", r), this.config.onError?.(r instanceof Error ? r : new Error(String(r)));
1009
+ b.error("Failed to handle protocol message:", r), this.config.onError?.(r instanceof Error ? r : new Error(String(r)));
1010
1010
  }
1011
1011
  }
1012
1012
  /**
@@ -1019,7 +1019,7 @@ class yt {
1019
1019
  * Handle transport error.
1020
1020
  */
1021
1021
  handleError(e) {
1022
- D.error("Channel error:", e), this.config.onError?.(e), e instanceof z && this.handleClose("Keepalive timeout", !1);
1022
+ b.error("Channel error:", e), this.config.onError?.(e), e instanceof z && this.handleClose("Keepalive timeout", !1);
1023
1023
  }
1024
1024
  /**
1025
1025
  * Update and notify state change.
@@ -1029,7 +1029,7 @@ class yt {
1029
1029
  }
1030
1030
  }
1031
1031
  const R = F("ChannelManager");
1032
- class Ut {
1032
+ class wt {
1033
1033
  channels = /* @__PURE__ */ new Map();
1034
1034
  // keyed by opcode group
1035
1035
  activeType = null;
@@ -1110,7 +1110,7 @@ class Ut {
1110
1110
  await this.connectAllChannels(i), this.config.endpointSelector?.rememberWorkingType(n), this.config.onRememberWorkingType?.(n), this.activeType = n, this.reconnectAttempts = 0, this.setState("connected");
1111
1111
  return;
1112
1112
  } catch (o) {
1113
- R.warn(`Failed to connect using ${w[n]}: ${o}`), this.disconnectAll();
1113
+ R.warn(`Failed to connect using ${U[n]}: ${o}`), this.disconnectAll();
1114
1114
  }
1115
1115
  }
1116
1116
  throw R.error("All endpoint types failed"), e || this.setState("offline"), new Error("Failed to connect using any endpoint type");
@@ -1216,8 +1216,8 @@ class Ut {
1216
1216
  const st = F("ProtocolWorker"), S = (t, e) => {
1217
1217
  self.postMessage(t, e ?? []);
1218
1218
  };
1219
- let N = null, H, T = null;
1220
- const U = [], u = [], v = /* @__PURE__ */ new Map(), A = [], c = [], y = /* @__PURE__ */ new Map(), x = [];
1219
+ let N = null, H, c = null;
1220
+ const w = [], u = [], D = /* @__PURE__ */ new Map(), A = [], T = [], y = /* @__PURE__ */ new Map(), x = [];
1221
1221
  function Y() {
1222
1222
  try {
1223
1223
  N?.disconnect();
@@ -1230,19 +1230,19 @@ function Y() {
1230
1230
  u[t].port.close();
1231
1231
  } catch {
1232
1232
  }
1233
- U.length = 0, u.length = 0, v.clear();
1234
- for (let t = 0; t < c.length; t++)
1233
+ w.length = 0, u.length = 0, D.clear();
1234
+ for (let t = 0; t < T.length; t++)
1235
1235
  try {
1236
- c[t].port.close();
1236
+ T[t].port.close();
1237
1237
  } catch {
1238
1238
  }
1239
- A.length = 0, c.length = 0, y.clear();
1239
+ A.length = 0, T.length = 0, y.clear();
1240
1240
  }
1241
- function M(t) {
1241
+ function v(t) {
1242
1242
  const e = t instanceof Error ? t : new Error(String(t));
1243
1243
  S({ type: "error", error: { name: e.name, message: e.message, stack: e.stack } });
1244
1244
  }
1245
- function wt() {
1245
+ function Ut() {
1246
1246
  let t = 0;
1247
1247
  for (let e = 0; e < u.length; e++)
1248
1248
  t |= u[e].opcodeGroupsMask;
@@ -1254,7 +1254,7 @@ function St(t) {
1254
1254
  const e = K(t);
1255
1255
  if ((e & H) !== 0)
1256
1256
  return !0;
1257
- const r = wt();
1257
+ const r = Ut();
1258
1258
  return (e & r) !== 0;
1259
1259
  }
1260
1260
  function gt(t) {
@@ -1277,13 +1277,13 @@ function Pt(t, e) {
1277
1277
  const s = new Uint8Array(r.message);
1278
1278
  if (!Lt(s, t))
1279
1279
  return;
1280
- N.sendProtocolMessage(s), T && T.postMessage({ direction: "sent", message: Array.from(s) });
1280
+ N.sendProtocolMessage(s), c && c.postMessage({ direction: "sent", message: Array.from(s) });
1281
1281
  } catch (s) {
1282
- M(s);
1282
+ v(s);
1283
1283
  }
1284
1284
  }
1285
1285
  async function mt(t) {
1286
- Y(), N = new Ut({
1286
+ Y(), N = new wt({
1287
1287
  sessionId: t.sessionId,
1288
1288
  keepaliveTimeoutMs: t.keepaliveTimeoutMs,
1289
1289
  reconnectBackoffMs: t.reconnectBackoffMs,
@@ -1296,14 +1296,10 @@ async function mt(t) {
1296
1296
  S({ type: "state", state: N?.managerState ?? "idle", activeType: N?.activeEndpointType ?? void 0 });
1297
1297
  },
1298
1298
  onError: (e) => {
1299
- M(e);
1299
+ v(e);
1300
1300
  },
1301
1301
  onProtocolMessage: (e) => {
1302
- if (T) {
1303
- T.postMessage({ direction: "received", message: Array.from(e) });
1304
- const i = $(e);
1305
- i === O.ANALYTICS_LOGS ? T.postMessage({ type: "serverLogs", message: Array.from(e) }) : i === O.ANALYTICS_DEVTOOLS_CONSOLE_OUTPUT && T.postMessage({ type: "serverConsole", message: Array.from(e) });
1306
- }
1302
+ c && (c.postMessage({ direction: "received", message: Array.from(e) }), $(e) === B.ANALYTICS_LOGS && c.postMessage({ type: "serverLogs", message: Array.from(e) }));
1307
1303
  const r = K(e), s = St(e), n = gt(r);
1308
1304
  if (!(!s && n.length === 0))
1309
1305
  try {
@@ -1339,7 +1335,7 @@ async function mt(t) {
1339
1335
  S({ type: "protocol", message: a, headers: i }, [a]);
1340
1336
  }
1341
1337
  } catch (i) {
1342
- M(i);
1338
+ v(i);
1343
1339
  }
1344
1340
  }
1345
1341
  }), await N.connect(t.entrypoints);
@@ -1348,7 +1344,7 @@ self.addEventListener("message", (t) => {
1348
1344
  const e = t.data;
1349
1345
  if (e.type === "connect") {
1350
1346
  mt(e).catch((r) => {
1351
- st.error(`Failed to connect: ${r}`), M(r), Y();
1347
+ st.error(`Failed to connect: ${r}`), v(r), Y();
1352
1348
  });
1353
1349
  return;
1354
1350
  }
@@ -1361,9 +1357,9 @@ self.addEventListener("message", (t) => {
1361
1357
  return;
1362
1358
  try {
1363
1359
  const r = new Uint8Array(e.message);
1364
- N.sendProtocolMessage(r), T && T.postMessage({ direction: "sent", message: Array.from(r) });
1360
+ N.sendProtocolMessage(r), c && c.postMessage({ direction: "sent", message: Array.from(r) });
1365
1361
  } catch (r) {
1366
- M(r);
1362
+ v(r);
1367
1363
  }
1368
1364
  return;
1369
1365
  }
@@ -1372,7 +1368,7 @@ self.addEventListener("message", (t) => {
1372
1368
  return;
1373
1369
  }
1374
1370
  if (e.type === "enableDevtools") {
1375
- e.enabled && !T ? T = new BroadcastChannel("ikon:devtools") : !e.enabled && T && (T.close(), T = null);
1371
+ e.enabled && !c ? c = new BroadcastChannel("ikon:devtools") : !e.enabled && c && (c.close(), c = null);
1376
1372
  return;
1377
1373
  }
1378
1374
  if (e.type === "attachPort") {
@@ -1380,31 +1376,31 @@ self.addEventListener("message", (t) => {
1380
1376
  e.port.start?.();
1381
1377
  } catch {
1382
1378
  }
1383
- const r = U.length;
1384
- U.push(e.portId), u.push({ port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }), v.set(e.portId, r);
1379
+ const r = w.length;
1380
+ w.push(e.portId), u.push({ port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }), D.set(e.portId, r);
1385
1381
  return;
1386
1382
  }
1387
1383
  if (e.type === "detachPort") {
1388
- const r = v.get(e.portId);
1384
+ const r = D.get(e.portId);
1389
1385
  if (r !== void 0) {
1390
1386
  const s = u[r];
1391
1387
  try {
1392
1388
  s.port.close();
1393
1389
  } catch {
1394
1390
  }
1395
- const n = U.length - 1;
1391
+ const n = w.length - 1;
1396
1392
  if (r !== n) {
1397
- const i = U[n];
1398
- U[r] = i, u[r] = u[n], v.set(i, r);
1393
+ const i = w[n];
1394
+ w[r] = i, u[r] = u[n], D.set(i, r);
1399
1395
  }
1400
- U.length--, u.length--, v.delete(e.portId);
1396
+ w.length--, u.length--, D.delete(e.portId);
1401
1397
  }
1402
1398
  return;
1403
1399
  }
1404
1400
  if (e.type === "attachSendPort") {
1405
1401
  const r = y.get(e.portId);
1406
1402
  if (r !== void 0) {
1407
- const i = c[r];
1403
+ const i = T[r];
1408
1404
  try {
1409
1405
  i.port.close();
1410
1406
  } catch {
@@ -1412,12 +1408,12 @@ self.addEventListener("message", (t) => {
1412
1408
  const o = A.length - 1;
1413
1409
  if (r !== o) {
1414
1410
  const E = A[o];
1415
- A[r] = E, c[r] = c[o], y.set(E, r);
1411
+ A[r] = E, T[r] = T[o], y.set(E, r);
1416
1412
  }
1417
- A.length--, c.length--, y.delete(e.portId);
1413
+ A.length--, T.length--, y.delete(e.portId);
1418
1414
  }
1419
1415
  const s = { port: e.port, opcodeGroupsMask: e.opcodeGroupsMask }, n = A.length;
1420
- A.push(e.portId), c.push(s), y.set(e.portId, n);
1416
+ A.push(e.portId), T.push(s), y.set(e.portId, n);
1421
1417
  try {
1422
1418
  s.port.start?.();
1423
1419
  } catch {
@@ -1430,7 +1426,7 @@ self.addEventListener("message", (t) => {
1430
1426
  if (e.type === "detachSendPort") {
1431
1427
  const r = y.get(e.portId);
1432
1428
  if (r !== void 0) {
1433
- const s = c[r];
1429
+ const s = T[r];
1434
1430
  try {
1435
1431
  s.port.close();
1436
1432
  } catch {
@@ -1438,9 +1434,9 @@ self.addEventListener("message", (t) => {
1438
1434
  const n = A.length - 1;
1439
1435
  if (r !== n) {
1440
1436
  const i = A[n];
1441
- A[r] = i, c[r] = c[n], y.set(i, r);
1437
+ A[r] = i, T[r] = T[n], y.set(i, r);
1442
1438
  }
1443
- A.length--, c.length--, y.delete(e.portId);
1439
+ A.length--, T.length--, y.delete(e.portId);
1444
1440
  }
1445
1441
  return;
1446
1442
  }