@voicenter-team/events-sdk 0.0.69 → 0.0.71

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.
@@ -1,7 +1,8 @@
1
1
  var xr = Object.defineProperty;
2
2
  var Ir = (t, e, r) => e in t ? xr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var H = (t, e, r) => (Ir(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- function Rr(t) {
4
+ import Rr from "ws";
5
+ function Br(t) {
5
6
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
6
7
  }
7
8
  var er = { exports: {} }, rr = { exports: {} };
@@ -70,7 +71,7 @@ var er = { exports: {} }, rr = { exports: {} };
70
71
  };
71
72
  rr.exports = e;
72
73
  })();
73
- var Br = rr.exports, ue = {
74
+ var _r = rr.exports, ue = {
74
75
  // UTF-8 encoding
75
76
  utf8: {
76
77
  // Convert a string to a byte array
@@ -104,17 +105,17 @@ var Br = rr.exports, ue = {
104
105
  * @author Feross Aboukhadijeh <https://feross.org>
105
106
  * @license MIT
106
107
  */
107
- var _r = function(t) {
108
- return t != null && (nr(t) || Lr(t) || !!t._isBuffer);
108
+ var Lr = function(t) {
109
+ return t != null && (nr(t) || Ur(t) || !!t._isBuffer);
109
110
  };
110
111
  function nr(t) {
111
112
  return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
112
113
  }
113
- function Lr(t) {
114
+ function Ur(t) {
114
115
  return typeof t.readFloatLE == "function" && typeof t.slice == "function" && nr(t.slice(0, 0));
115
116
  }
116
117
  (function() {
117
- var t = Br, e = Ue.utf8, r = _r, n = Ue.bin, o = function(i, u) {
118
+ var t = _r, e = Ue.utf8, r = Lr, n = Ue.bin, o = function(i, u) {
118
119
  i.constructor == String ? u && u.encoding === "binary" ? i = n.stringToBytes(i) : i = e.stringToBytes(i) : r(i) ? i = Array.prototype.slice.call(i, 0) : !Array.isArray(i) && i.constructor !== Uint8Array && (i = i.toString());
119
120
  for (var h = t.bytesToWords(i), f = i.length * 8, c = 1732584193, l = -271733879, p = -1732584194, a = 271733878, s = 0; s < h.length; s++)
120
121
  h[s] = (h[s] << 8 | h[s] >>> 24) & 16711935 | (h[s] << 24 | h[s] >>> 8) & 4278255360;
@@ -144,8 +145,8 @@ function Lr(t) {
144
145
  return u && u.asBytes ? h : u && u.asString ? n.bytesToString(h) : t.bytesToHex(h);
145
146
  };
146
147
  })();
147
- var Ur = er.exports;
148
- const Dr = /* @__PURE__ */ Rr(Ur);
148
+ var Dr = er.exports;
149
+ const Pr = /* @__PURE__ */ Br(Dr);
149
150
  var vt = /* @__PURE__ */ ((t) => (t.MAIN = "main", t.NEXT = "next", t))(vt || {}), it = /* @__PURE__ */ ((t) => (t.USER = "User", t.TOKEN = "Token", t))(it || {});
150
151
  class It {
151
152
  static async getSessionStorageDataByKey(e, r = !0) {
@@ -169,11 +170,11 @@ class It {
169
170
  typeof chrome < "u" && typeof chrome.storage < "u" && chrome.storage.session.clear(), typeof window < "u" && typeof window.sessionStorage < "u" && typeof window.sessionStorage.clear == "function" && window.sessionStorage.clear();
170
171
  }
171
172
  }
172
- var Pr = Object.defineProperty, Fr = (t, e, r) => e in t ? Pr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, V = (t, e, r) => (Fr(t, typeof e != "symbol" ? e + "" : e, r), r);
173
- function jr(t) {
173
+ var Fr = Object.defineProperty, jr = (t, e, r) => e in t ? Fr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, V = (t, e, r) => (jr(t, typeof e != "symbol" ? e + "" : e, r), r);
174
+ function Mr(t) {
174
175
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
175
176
  }
176
- function Mr(t) {
177
+ function qr(t) {
177
178
  if (t.__esModule)
178
179
  return t;
179
180
  var e = t.default;
@@ -194,7 +195,7 @@ function Mr(t) {
194
195
  });
195
196
  }), r;
196
197
  }
197
- var le = { exports: {} }, qr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, zr = [
198
+ var le = { exports: {} }, zr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, Xr = [
198
199
  "source",
199
200
  "protocol",
200
201
  "authority",
@@ -212,32 +213,32 @@ var le = { exports: {} }, qr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/
212
213
  ], or = function(t) {
213
214
  var e = t, r = t.indexOf("["), n = t.indexOf("]");
214
215
  r != -1 && n != -1 && (t = t.substring(0, r) + t.substring(r, n).replace(/:/g, ";") + t.substring(n, t.length));
215
- for (var o = qr.exec(t || ""), i = {}, u = 14; u--; )
216
- i[zr[u]] = o[u] || "";
217
- return r != -1 && n != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = Xr(i, i.path), i.queryKey = Wr(i, i.query), i;
216
+ for (var o = zr.exec(t || ""), i = {}, u = 14; u--; )
217
+ i[Xr[u]] = o[u] || "";
218
+ return r != -1 && n != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = Wr(i, i.path), i.queryKey = Kr(i, i.query), i;
218
219
  };
219
- function Xr(t, e) {
220
+ function Wr(t, e) {
220
221
  var r = /\/{2,9}/g, n = e.replace(r, "/").split("/");
221
222
  return (e.substr(0, 1) == "/" || e.length === 0) && n.splice(0, 1), e.substr(e.length - 1, 1) == "/" && n.splice(n.length - 1, 1), n;
222
223
  }
223
- function Wr(t, e) {
224
+ function Kr(t, e) {
224
225
  var r = {};
225
226
  return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(n, o, i) {
226
227
  o && (r[o] = i);
227
228
  }), r;
228
229
  }
229
- var fe = { exports: {} }, de = { exports: {} }, Rt = 1e3, Bt = Rt * 60, _t = Bt * 60, Lt = _t * 24, Kr = Lt * 365.25, Hr = function(t, e) {
230
+ var fe = { exports: {} }, de = { exports: {} }, Rt = 1e3, Bt = Rt * 60, _t = Bt * 60, Lt = _t * 24, Hr = Lt * 365.25, Jr = function(t, e) {
230
231
  e = e || {};
231
232
  var r = typeof t;
232
233
  if (r === "string" && t.length > 0)
233
- return Jr(t);
234
+ return Vr(t);
234
235
  if (r === "number" && isNaN(t) === !1)
235
- return e.long ? $r(t) : Vr(t);
236
+ return e.long ? Gr(t) : $r(t);
236
237
  throw new Error(
237
238
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(t)
238
239
  );
239
240
  };
240
- function Jr(t) {
241
+ function Vr(t) {
241
242
  if (t = String(t), !(t.length > 100)) {
242
243
  var e = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
243
244
  t
@@ -250,7 +251,7 @@ function Jr(t) {
250
251
  case "yrs":
251
252
  case "yr":
252
253
  case "y":
253
- return r * Kr;
254
+ return r * Hr;
254
255
  case "days":
255
256
  case "day":
256
257
  case "d":
@@ -285,10 +286,10 @@ function Jr(t) {
285
286
  }
286
287
  }
287
288
  }
288
- function Vr(t) {
289
+ function $r(t) {
289
290
  return t >= Lt ? Math.round(t / Lt) + "d" : t >= _t ? Math.round(t / _t) + "h" : t >= Bt ? Math.round(t / Bt) + "m" : t >= Rt ? Math.round(t / Rt) + "s" : t + "ms";
290
291
  }
291
- function $r(t) {
292
+ function Gr(t) {
292
293
  return Dt(t, Lt, "day") || Dt(t, _t, "hour") || Dt(t, Bt, "minute") || Dt(t, Rt, "second") || t + " ms";
293
294
  }
294
295
  function Dt(t, e, r) {
@@ -296,7 +297,7 @@ function Dt(t, e, r) {
296
297
  return t < e * 1.5 ? Math.floor(t / e) + " " + r : Math.ceil(t / e) + " " + r + "s";
297
298
  }
298
299
  (function(t, e) {
299
- e = t.exports = n.debug = n.default = n, e.coerce = f, e.disable = u, e.enable = i, e.enabled = h, e.humanize = Hr, e.instances = [], e.names = [], e.skips = [], e.formatters = {};
300
+ e = t.exports = n.debug = n.default = n, e.coerce = f, e.disable = u, e.enable = i, e.enabled = h, e.humanize = Jr, e.instances = [], e.names = [], e.skips = [], e.formatters = {};
300
301
  function r(c) {
301
302
  var l = 0, p;
302
303
  for (p in c)
@@ -363,9 +364,9 @@ function Dt(t, e, r) {
363
364
  return c instanceof Error ? c.stack || c.message : c;
364
365
  }
365
366
  })(de, de.exports);
366
- var Gr = de.exports;
367
+ var Yr = de.exports;
367
368
  (function(t, e) {
368
- e = t.exports = Gr, e.log = o, e.formatArgs = n, e.save = i, e.load = u, e.useColors = r, e.storage = typeof chrome < "u" && typeof chrome.storage < "u" ? chrome.storage.local : h(), e.colors = [
369
+ e = t.exports = Yr, e.log = o, e.formatArgs = n, e.save = i, e.load = u, e.useColors = r, e.storage = typeof chrome < "u" && typeof chrome.storage < "u" ? chrome.storage.local : h(), e.colors = [
369
370
  "#0000CC",
370
371
  "#0000FF",
371
372
  "#0033CC",
@@ -493,10 +494,10 @@ var Gr = de.exports;
493
494
  }
494
495
  }
495
496
  })(fe, fe.exports);
496
- var lt = fe.exports, Yr = or, De = lt("socket.io-client:url"), Qr = Zr;
497
- function Zr(t, e) {
497
+ var lt = fe.exports, Qr = or, De = lt("socket.io-client:url"), Zr = tn;
498
+ function tn(t, e) {
498
499
  var r = t;
499
- e = e || typeof location < "u" && location, t == null && (t = e.protocol + "//" + e.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = e.protocol + t : t = e.host + t), /^(https?|wss?):\/\//.test(t) || (De("protocol-less url %s", t), typeof e < "u" ? t = e.protocol + "//" + t : t = "https://" + t), De("parse %s", t), r = Yr(t)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
500
+ e = e || typeof location < "u" && location, t == null && (t = e.protocol + "//" + e.host), typeof t == "string" && (t.charAt(0) === "/" && (t.charAt(1) === "/" ? t = e.protocol + t : t = e.host + t), /^(https?|wss?):\/\//.test(t) || (De("protocol-less url %s", t), typeof e < "u" ? t = e.protocol + "//" + t : t = "https://" + t), De("parse %s", t), r = Qr(t)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/";
500
501
  var n = r.host.indexOf(":") !== -1, o = n ? "[" + r.host + "]" : r.host;
501
502
  return r.id = r.protocol + "://" + o + ":" + r.port, r.href = r.protocol + "://" + o + (e && e.port === r.port ? "" : ":" + r.port), r;
502
503
  }
@@ -549,15 +550,15 @@ var Xt = {}, sr = { exports: {} };
549
550
  return !!this.listeners(n).length;
550
551
  };
551
552
  })(sr);
552
- var St = sr.exports, Wt = {}, tn = {}.toString, Ce = Array.isArray || function(t) {
553
- return tn.call(t) == "[object Array]";
554
- }, ir = on, en = typeof Buffer == "function" && typeof Buffer.isBuffer == "function", rn = typeof ArrayBuffer == "function", nn = function(t) {
553
+ var St = sr.exports, Wt = {}, en = {}.toString, Ce = Array.isArray || function(t) {
554
+ return en.call(t) == "[object Array]";
555
+ }, ir = sn, rn = typeof Buffer == "function" && typeof Buffer.isBuffer == "function", nn = typeof ArrayBuffer == "function", on = function(t) {
555
556
  return typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer;
556
557
  };
557
- function on(t) {
558
- return en && Buffer.isBuffer(t) || rn && (t instanceof ArrayBuffer || nn(t));
558
+ function sn(t) {
559
+ return rn && Buffer.isBuffer(t) || nn && (t instanceof ArrayBuffer || on(t));
559
560
  }
560
- var we = Ce, ar = ir, cr = Object.prototype.toString, sn = typeof Blob == "function" || typeof Blob < "u" && cr.call(Blob) === "[object BlobConstructor]", an = typeof File == "function" || typeof File < "u" && cr.call(File) === "[object FileConstructor]";
561
+ var we = Ce, ar = ir, cr = Object.prototype.toString, an = typeof Blob == "function" || typeof Blob < "u" && cr.call(Blob) === "[object BlobConstructor]", cn = typeof File == "function" || typeof File < "u" && cr.call(File) === "[object FileConstructor]";
561
562
  Wt.deconstructPacket = function(t) {
562
563
  var e = [], r = t.data, n = t;
563
564
  return n.data = ye(r, e), n.attachments = e.length, { packet: n, buffers: e };
@@ -603,7 +604,7 @@ Wt.removeBlobs = function(t, e) {
603
604
  function r(i, u, h) {
604
605
  if (!i)
605
606
  return i;
606
- if (sn && i instanceof Blob || an && i instanceof File) {
607
+ if (an && i instanceof Blob || cn && i instanceof File) {
607
608
  n++;
608
609
  var f = new FileReader();
609
610
  f.onload = function() {
@@ -763,12 +764,12 @@ try {
763
764
  } catch {
764
765
  me.exports = !1;
765
766
  }
766
- var cn = me.exports, Ee = function() {
767
+ var hn = me.exports, Ee = function() {
767
768
  return typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
768
- }(), hn = cn, pn = Ee, Ae = function(t) {
769
+ }(), pn = hn, un = Ee, Ae = function(t) {
769
770
  var e = t.xdomain, r = t.xscheme, n = t.enablesXDR;
770
771
  try {
771
- if (typeof XMLHttpRequest < "u" && (!e || hn))
772
+ if (typeof XMLHttpRequest < "u" && (!e || pn))
772
773
  return new XMLHttpRequest();
773
774
  } catch {
774
775
  }
@@ -779,10 +780,10 @@ var cn = me.exports, Ee = function() {
779
780
  }
780
781
  if (!e)
781
782
  try {
782
- return new pn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
783
+ return new un[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
783
784
  } catch {
784
785
  }
785
- }, Te = { exports: {} }, kt = {}, un = Object.keys || function(t) {
786
+ }, Te = { exports: {} }, kt = {}, ln = Object.keys || function(t) {
786
787
  var e = [], r = Object.prototype.hasOwnProperty;
787
788
  for (var n in t)
788
789
  r.call(t, n) && e.push(n);
@@ -814,7 +815,7 @@ function hr() {
814
815
  }
815
816
  return re;
816
817
  }
817
- var ln = function(t, e, r) {
818
+ var fn = function(t, e, r) {
818
819
  var n = t.byteLength;
819
820
  if (e = e || 0, r = r || n, t.slice)
820
821
  return t.slice(e, r);
@@ -823,17 +824,17 @@ var ln = function(t, e, r) {
823
824
  for (var o = new Uint8Array(t), i = new Uint8Array(r - e), u = e, h = 0; u < r; u++, h++)
824
825
  i[h] = o[u];
825
826
  return i.buffer;
826
- }, fn = dn;
827
- function dn(t, e, r) {
827
+ }, dn = yn;
828
+ function yn(t, e, r) {
828
829
  var n = !1;
829
- return r = r || yn, o.count = t, t === 0 ? e() : o;
830
+ return r = r || gn, o.count = t, t === 0 ? e() : o;
830
831
  function o(i, u) {
831
832
  if (o.count <= 0)
832
833
  throw new Error("after called too many times");
833
834
  --o.count, i ? (n = !0, e(i), e = r) : o.count === 0 && !n && e(null, u);
834
835
  }
835
836
  }
836
- function yn() {
837
+ function gn() {
837
838
  }
838
839
  /*! https://mths.be/utf8js v2.1.2 by @mathias */
839
840
  var dt = String.fromCharCode;
@@ -842,7 +843,7 @@ function pr(t) {
842
843
  o = t.charCodeAt(r++), o >= 55296 && o <= 56319 && r < n ? (i = t.charCodeAt(r++), (i & 64512) == 56320 ? e.push(((o & 1023) << 10) + (i & 1023) + 65536) : (e.push(o), r--)) : e.push(o);
843
844
  return e;
844
845
  }
845
- function gn(t) {
846
+ function mn(t) {
846
847
  for (var e = t.length, r = -1, n, o = ""; ++r < e; )
847
848
  n = t[r], n > 65535 && (n -= 65536, o += dt(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), o += dt(n);
848
849
  return o;
@@ -860,16 +861,16 @@ function ur(t, e) {
860
861
  function ne(t, e) {
861
862
  return dt(t >> e & 63 | 128);
862
863
  }
863
- function mn(t, e) {
864
+ function vn(t, e) {
864
865
  if (!(t & 4294967168))
865
866
  return dt(t);
866
867
  var r = "";
867
868
  return t & 4294965248 ? t & 4294901760 ? t & 4292870144 || (r = dt(t >> 18 & 7 | 240), r += ne(t, 12), r += ne(t, 6)) : (ur(t, e) || (t = 65533), r = dt(t >> 12 & 15 | 224), r += ne(t, 6)) : r = dt(t >> 6 & 31 | 192), r += dt(t & 63 | 128), r;
868
869
  }
869
- function vn(t, e) {
870
+ function kn(t, e) {
870
871
  e = e || {};
871
872
  for (var r = e.strict !== !1, n = pr(t), o = n.length, i = -1, u, h = ""; ++i < o; )
872
- u = n[i], h += mn(u, r);
873
+ u = n[i], h += vn(u, r);
873
874
  return h;
874
875
  }
875
876
  function bt() {
@@ -880,7 +881,7 @@ function bt() {
880
881
  return t & 63;
881
882
  throw Error("Invalid continuation byte");
882
883
  }
883
- function kn(t) {
884
+ function bn(t) {
884
885
  var e, r, n, o, i;
885
886
  if (yt > Mt)
886
887
  throw Error("Invalid byte index");
@@ -903,20 +904,20 @@ function kn(t) {
903
904
  throw Error("Invalid UTF-8 detected");
904
905
  }
905
906
  var jt, Mt, yt;
906
- function bn(t, e) {
907
+ function Cn(t, e) {
907
908
  e = e || {};
908
909
  var r = e.strict !== !1;
909
910
  jt = pr(t), Mt = jt.length, yt = 0;
910
- for (var n = [], o; (o = kn(r)) !== !1; )
911
+ for (var n = [], o; (o = bn(r)) !== !1; )
911
912
  n.push(o);
912
- return gn(n);
913
+ return mn(n);
913
914
  }
914
- var Cn = {
915
+ var wn = {
915
916
  version: "2.1.2",
916
- encode: vn,
917
- decode: bn
917
+ encode: kn,
918
+ decode: Cn
918
919
  }, oe = {}, Fe;
919
- function wn() {
920
+ function Sn() {
920
921
  return Fe || (Fe = 1, function(t) {
921
922
  oe.encode = function(e) {
922
923
  var r = new Uint8Array(e), n, o = r.length, i = "";
@@ -934,7 +935,7 @@ function wn() {
934
935
  }("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")), oe;
935
936
  }
936
937
  var se, je;
937
- function Sn() {
938
+ function En() {
938
939
  if (je)
939
940
  return se;
940
941
  je = 1;
@@ -981,8 +982,8 @@ function Sn() {
981
982
  }(), se;
982
983
  }
983
984
  (function(t) {
984
- var e = un, r = hr(), n = ln, o = fn, i = Cn, u;
985
- typeof ArrayBuffer < "u" && (u = wn());
985
+ var e = ln, r = hr(), n = fn, o = dn, i = wn, u;
986
+ typeof ArrayBuffer < "u" && (u = Sn());
986
987
  var h = typeof navigator < "u" && /Android/i.test(navigator.userAgent), f = typeof navigator < "u" && /PhantomJS/i.test(navigator.userAgent), c = h || f;
987
988
  t.protocol = 3;
988
989
  var l = t.packets = {
@@ -993,7 +994,7 @@ function Sn() {
993
994
  message: 4,
994
995
  upgrade: 5,
995
996
  noop: 6
996
- }, p = e(l), a = { type: "error", data: "parser error" }, s = Sn();
997
+ }, p = e(l), a = { type: "error", data: "parser error" }, s = En();
997
998
  t.encodePacket = function(b, S, m, C) {
998
999
  typeof S == "function" && (C = S, S = !1), typeof m == "function" && (C = m, m = null);
999
1000
  var E = b.data === void 0 ? void 0 : b.data.buffer || b.data;
@@ -1271,7 +1272,7 @@ function ve(t) {
1271
1272
  while (t > 0);
1272
1273
  return e;
1273
1274
  }
1274
- function En(t) {
1275
+ function An(t) {
1275
1276
  var e = 0;
1276
1277
  for (gt = 0; gt < t.length; gt++)
1277
1278
  e = e * qt + fr[t.charAt(gt)];
@@ -1284,16 +1285,16 @@ function Oe() {
1284
1285
  for (; gt < qt; gt++)
1285
1286
  fr[lr[gt]] = gt;
1286
1287
  Oe.encode = ve;
1287
- Oe.decode = En;
1288
- var dr = Oe, yr = Ne(), An = Ht(), gr = kt, Tn = Jt, Nn = dr, ht = lt("engine.io-client:polling"), mr = pt, On = function() {
1288
+ Oe.decode = An;
1289
+ var dr = Oe, yr = Ne(), Tn = Ht(), gr = kt, Nn = Jt, On = dr, ht = lt("engine.io-client:polling"), mr = pt, xn = function() {
1289
1290
  var t = Ae, e = new t({ xdomain: !1 });
1290
1291
  return e.responseType != null;
1291
1292
  }();
1292
1293
  function pt(t) {
1293
1294
  var e = t && t.forceBase64;
1294
- (!On || e) && (this.supportsBinary = !1), yr.call(this, t);
1295
+ (!xn || e) && (this.supportsBinary = !1), yr.call(this, t);
1295
1296
  }
1296
- Tn(pt, yr);
1297
+ Nn(pt, yr);
1297
1298
  pt.prototype.name = "polling";
1298
1299
  pt.prototype.doOpen = function() {
1299
1300
  this.poll();
@@ -1346,11 +1347,11 @@ pt.prototype.write = function(t) {
1346
1347
  };
1347
1348
  pt.prototype.uri = function() {
1348
1349
  var t = this.query || {}, e = this.secure ? "https" : "http", r = "";
1349
- this.timestampRequests !== !1 && (t[this.timestampParam] = Nn()), !this.supportsBinary && !t.sid && (t.b64 = 1), t = An.encode(t), this.port && (e === "https" && Number(this.port) !== 443 || e === "http" && Number(this.port) !== 80) && (r = ":" + this.port), t.length && (t = "?" + t);
1350
+ this.timestampRequests !== !1 && (t[this.timestampParam] = On()), !this.supportsBinary && !t.sid && (t.b64 = 1), t = Tn.encode(t), this.port && (e === "https" && Number(this.port) !== 443 || e === "http" && Number(this.port) !== 80) && (r = ":" + this.port), t.length && (t = "?" + t);
1350
1351
  var n = this.hostname.indexOf(":") !== -1;
1351
1352
  return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
1352
1353
  };
1353
- var xn = Ae, vr = mr, In = St, Rn = Jt, ke = lt("engine.io-client:polling-xhr"), Bn = Ee;
1354
+ var In = Ae, vr = mr, Rn = St, Bn = Jt, ke = lt("engine.io-client:polling-xhr"), _n = Ee;
1354
1355
  Te.exports = Et;
1355
1356
  Te.exports.Request = Y;
1356
1357
  function We() {
@@ -1361,7 +1362,7 @@ function Et(t) {
1361
1362
  r || (r = e ? 443 : 80), this.xd = typeof location < "u" && t.hostname !== location.hostname || r !== t.port, this.xs = t.secure !== e;
1362
1363
  }
1363
1364
  }
1364
- Rn(Et, vr);
1365
+ Bn(Et, vr);
1365
1366
  Et.prototype.supportsBinary = !0;
1366
1367
  Et.prototype.request = function(t) {
1367
1368
  return t = t || {}, t.uri = this.uri(), t.xd = this.xd, t.xs = this.xs, t.agent = this.agent || !1, t.supportsBinary = this.supportsBinary, t.enablesXDR = this.enablesXDR, t.withCredentials = this.withCredentials, t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized, t.requestTimeout = this.requestTimeout, t.extraHeaders = this.extraHeaders, new Y(t);
@@ -1384,11 +1385,11 @@ Et.prototype.doPoll = function() {
1384
1385
  function Y(t) {
1385
1386
  this.method = t.method || "GET", this.uri = t.uri, this.xd = !!t.xd, this.xs = !!t.xs, this.async = t.async !== !1, this.data = t.data !== void 0 ? t.data : null, this.agent = t.agent, this.isBinary = t.isBinary, this.supportsBinary = t.supportsBinary, this.enablesXDR = t.enablesXDR, this.withCredentials = t.withCredentials, this.requestTimeout = t.requestTimeout, this.pfx = t.pfx, this.key = t.key, this.passphrase = t.passphrase, this.cert = t.cert, this.ca = t.ca, this.ciphers = t.ciphers, this.rejectUnauthorized = t.rejectUnauthorized, this.extraHeaders = t.extraHeaders, this.create();
1386
1387
  }
1387
- In(Y.prototype);
1388
+ Rn(Y.prototype);
1388
1389
  Y.prototype.create = function() {
1389
1390
  var t = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
1390
1391
  t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized;
1391
- var e = this.xhr = new xn(t), r = this;
1392
+ var e = this.xhr = new In(t), r = this;
1392
1393
  try {
1393
1394
  ke("xhr open %s: %s", this.method, this.uri), e.open(this.method, this.uri, this.async);
1394
1395
  try {
@@ -1476,16 +1477,16 @@ if (typeof document < "u") {
1476
1477
  if (typeof attachEvent == "function")
1477
1478
  attachEvent("onunload", Ke);
1478
1479
  else if (typeof addEventListener == "function") {
1479
- var _n = "onpagehide" in Bn ? "pagehide" : "unload";
1480
- addEventListener(_n, Ke, !1);
1480
+ var Ln = "onpagehide" in _n ? "pagehide" : "unload";
1481
+ addEventListener(Ln, Ke, !1);
1481
1482
  }
1482
1483
  }
1483
1484
  function Ke() {
1484
1485
  for (var t in Y.requests)
1485
1486
  Y.requests.hasOwnProperty(t) && Y.requests[t].abort();
1486
1487
  }
1487
- var Ln = Te.exports, xe = mr, Un = Jt, He = Ee, Dn = At, Pn = /\n/g, Fn = /\\n/g, Pt;
1488
- function jn() {
1488
+ var Un = Te.exports, xe = mr, Dn = Jt, He = Ee, Pn = At, Fn = /\n/g, jn = /\\n/g, Pt;
1489
+ function Mn() {
1489
1490
  }
1490
1491
  function At(t) {
1491
1492
  xe.call(this, t), this.query = this.query || {}, Pt || (Pt = He.___eio = He.___eio || []), this.index = Pt.length;
@@ -1493,10 +1494,10 @@ function At(t) {
1493
1494
  Pt.push(function(r) {
1494
1495
  e.onData(r);
1495
1496
  }), this.query.j = this.index, typeof addEventListener == "function" && addEventListener("beforeunload", function() {
1496
- e.script && (e.script.onerror = jn);
1497
+ e.script && (e.script.onerror = Mn);
1497
1498
  }, !1);
1498
1499
  }
1499
- Un(At, xe);
1500
+ Dn(At, xe);
1500
1501
  At.prototype.supportsBinary = !1;
1501
1502
  At.prototype.doClose = function() {
1502
1503
  this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), xe.prototype.doClose.call(this);
@@ -1539,8 +1540,8 @@ At.prototype.doWrite = function(t, e) {
1539
1540
  }
1540
1541
  u.id = r.iframeId, r.form.appendChild(u), r.iframe = u;
1541
1542
  }
1542
- f(), t = t.replace(Fn, `\\
1543
- `), this.area.value = t.replace(Pn, "\\n");
1543
+ f(), t = t.replace(jn, `\\
1544
+ `), this.area.value = t.replace(Fn, "\\n");
1544
1545
  try {
1545
1546
  this.form.submit();
1546
1547
  } catch {
@@ -1549,23 +1550,23 @@ At.prototype.doWrite = function(t, e) {
1549
1550
  r.iframe.readyState === "complete" && h();
1550
1551
  } : this.iframe.onload = h;
1551
1552
  };
1552
- const Mn = {}, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1553
+ const qn = {}, zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1553
1554
  __proto__: null,
1554
- default: Mn
1555
- }, Symbol.toStringTag, { value: "Module" })), zn = /* @__PURE__ */ Mr(qn);
1556
- var Ie = Ne(), Xn = kt, Wn = Ht(), Kn = Jt, Hn = dr, Jn = lt("engine.io-client:websocket"), zt, Re;
1555
+ default: qn
1556
+ }, Symbol.toStringTag, { value: "Module" })), Xn = /* @__PURE__ */ qr(zn);
1557
+ var Ie = Ne(), Wn = kt, Kn = Ht(), Hn = Jt, Jn = dr, Vn = lt("engine.io-client:websocket"), zt, Re;
1557
1558
  typeof WebSocket < "u" ? zt = WebSocket : typeof self < "u" && (zt = self.WebSocket || self.MozWebSocket);
1558
1559
  if (typeof window > "u")
1559
1560
  try {
1560
- Re = zn;
1561
+ Re = Xn;
1561
1562
  } catch {
1562
1563
  }
1563
- var wt = zt || Re, Vn = st;
1564
+ var wt = zt || Re, $n = st;
1564
1565
  function st(t) {
1565
1566
  var e = t && t.forceBase64;
1566
1567
  e && (this.supportsBinary = !1), this.perMessageDeflate = t.perMessageDeflate, this.usingBrowserWebSocket = zt && !t.forceNode, this.protocols = t.protocols, this.usingBrowserWebSocket || (wt = Re), Ie.call(this, t);
1567
1568
  }
1568
- Kn(st, Ie);
1569
+ Hn(st, Ie);
1569
1570
  st.prototype.name = "websocket";
1570
1571
  st.prototype.supportsBinary = !0;
1571
1572
  st.prototype.doOpen = function() {
@@ -1597,7 +1598,7 @@ st.prototype.write = function(t) {
1597
1598
  this.writable = !1;
1598
1599
  for (var r = t.length, n = 0, o = r; n < o; n++)
1599
1600
  (function(u) {
1600
- Xn.encodePacket(u, e.supportsBinary, function(h) {
1601
+ Wn.encodePacket(u, e.supportsBinary, function(h) {
1601
1602
  if (!e.usingBrowserWebSocket) {
1602
1603
  var f = {};
1603
1604
  if (u.options && (f.compress = u.options.compress), e.perMessageDeflate) {
@@ -1608,7 +1609,7 @@ st.prototype.write = function(t) {
1608
1609
  try {
1609
1610
  e.usingBrowserWebSocket ? e.ws.send(h) : e.ws.send(h, f);
1610
1611
  } catch {
1611
- Jn("websocket closed before onclose event");
1612
+ Vn("websocket closed before onclose event");
1612
1613
  }
1613
1614
  --r || i();
1614
1615
  });
@@ -1627,43 +1628,43 @@ st.prototype.doClose = function() {
1627
1628
  };
1628
1629
  st.prototype.uri = function() {
1629
1630
  var t = this.query || {}, e = this.secure ? "wss" : "ws", r = "";
1630
- this.port && (e === "wss" && Number(this.port) !== 443 || e === "ws" && Number(this.port) !== 80) && (r = ":" + this.port), this.timestampRequests && (t[this.timestampParam] = Hn()), this.supportsBinary || (t.b64 = 1), t = Wn.encode(t), t.length && (t = "?" + t);
1631
+ this.port && (e === "wss" && Number(this.port) !== 443 || e === "ws" && Number(this.port) !== 80) && (r = ":" + this.port), this.timestampRequests && (t[this.timestampParam] = Jn()), this.supportsBinary || (t.b64 = 1), t = Kn.encode(t), t.length && (t = "?" + t);
1631
1632
  var n = this.hostname.indexOf(":") !== -1;
1632
1633
  return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
1633
1634
  };
1634
1635
  st.prototype.check = function() {
1635
1636
  return !!wt && !("__initialize" in wt && this.name === st.prototype.name);
1636
1637
  };
1637
- var $n = Ae, Gn = Ln, Yn = Dn, Qn = Vn;
1638
- Kt.polling = Zn;
1639
- Kt.websocket = Qn;
1640
- function Zn(t) {
1638
+ var Gn = Ae, Yn = Un, Qn = Pn, Zn = $n;
1639
+ Kt.polling = to;
1640
+ Kt.websocket = Zn;
1641
+ function to(t) {
1641
1642
  var e, r = !1, n = !1, o = t.jsonp !== !1;
1642
1643
  if (typeof location < "u") {
1643
1644
  var i = location.protocol === "https:", u = location.port;
1644
1645
  u || (u = i ? 443 : 80), r = t.hostname !== location.hostname || u !== t.port, n = t.secure !== i;
1645
1646
  }
1646
- if (t.xdomain = r, t.xscheme = n, e = new $n(t), "open" in e && !t.forceJSONP)
1647
- return new Gn(t);
1647
+ if (t.xdomain = r, t.xscheme = n, e = new Gn(t), "open" in e && !t.forceJSONP)
1648
+ return new Yn(t);
1648
1649
  if (!o)
1649
1650
  throw new Error("JSONP disabled");
1650
- return new Yn(t);
1651
+ return new Qn(t);
1651
1652
  }
1652
- var to = [].indexOf, kr = function(t, e) {
1653
- if (to)
1653
+ var eo = [].indexOf, kr = function(t, e) {
1654
+ if (eo)
1654
1655
  return t.indexOf(e);
1655
1656
  for (var r = 0; r < t.length; ++r)
1656
1657
  if (t[r] === e)
1657
1658
  return r;
1658
1659
  return -1;
1659
- }, eo = Kt, ro = St, G = lt("engine.io-client:socket"), no = kr, br = kt, Je = or, oo = Ht(), so = W;
1660
+ }, ro = Kt, no = St, G = lt("engine.io-client:socket"), oo = kr, br = kt, Je = or, so = Ht(), io = W;
1660
1661
  function W(t, e) {
1661
1662
  if (!(this instanceof W))
1662
1663
  return new W(t, e);
1663
- e = e || {}, t && typeof t == "object" && (e = t, t = null), t ? (t = Je(t), e.hostname = t.host, e.secure = t.protocol === "https" || t.protocol === "wss", e.port = t.port, t.query && (e.query = t.query)) : e.host && (e.hostname = Je(e.host).host), this.secure = e.secure != null ? e.secure : typeof location < "u" && location.protocol === "https:", e.hostname && !e.port && (e.port = this.secure ? "443" : "80"), this.agent = e.agent || !1, this.hostname = e.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = e.port || (typeof location < "u" && location.port ? location.port : this.secure ? 443 : 80), this.query = e.query || {}, typeof this.query == "string" && (this.query = oo.decode(this.query)), this.upgrade = e.upgrade !== !1, this.path = (e.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e.forceJSONP, this.jsonp = e.jsonp !== !1, this.forceBase64 = !!e.forceBase64, this.enablesXDR = !!e.enablesXDR, this.withCredentials = e.withCredentials !== !1, this.timestampParam = e.timestampParam || "t", this.timestampRequests = e.timestampRequests, this.transports = e.transports || ["polling", "websocket"], this.transportOptions = e.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = e.policyPort || 843, this.rememberUpgrade = e.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = e.onlyBinaryUpgrades, this.perMessageDeflate = e.perMessageDeflate !== !1 ? e.perMessageDeflate || {} : !1, this.perMessageDeflate === !0 && (this.perMessageDeflate = {}), this.perMessageDeflate && this.perMessageDeflate.threshold == null && (this.perMessageDeflate.threshold = 1024), this.pfx = e.pfx || void 0, this.key = e.key || void 0, this.passphrase = e.passphrase || void 0, this.cert = e.cert || void 0, this.ca = e.ca || void 0, this.ciphers = e.ciphers || void 0, this.rejectUnauthorized = e.rejectUnauthorized === void 0 ? !0 : e.rejectUnauthorized, this.forceNode = !!e.forceNode, this.isReactNative = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative", (typeof self > "u" || this.isReactNative) && (e.extraHeaders && Object.keys(e.extraHeaders).length > 0 && (this.extraHeaders = e.extraHeaders), e.localAddress && (this.localAddress = e.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open();
1664
+ e = e || {}, t && typeof t == "object" && (e = t, t = null), t ? (t = Je(t), e.hostname = t.host, e.secure = t.protocol === "https" || t.protocol === "wss", e.port = t.port, t.query && (e.query = t.query)) : e.host && (e.hostname = Je(e.host).host), this.secure = e.secure != null ? e.secure : typeof location < "u" && location.protocol === "https:", e.hostname && !e.port && (e.port = this.secure ? "443" : "80"), this.agent = e.agent || !1, this.hostname = e.hostname || (typeof location < "u" ? location.hostname : "localhost"), this.port = e.port || (typeof location < "u" && location.port ? location.port : this.secure ? 443 : 80), this.query = e.query || {}, typeof this.query == "string" && (this.query = so.decode(this.query)), this.upgrade = e.upgrade !== !1, this.path = (e.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e.forceJSONP, this.jsonp = e.jsonp !== !1, this.forceBase64 = !!e.forceBase64, this.enablesXDR = !!e.enablesXDR, this.withCredentials = e.withCredentials !== !1, this.timestampParam = e.timestampParam || "t", this.timestampRequests = e.timestampRequests, this.transports = e.transports || ["polling", "websocket"], this.transportOptions = e.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = e.policyPort || 843, this.rememberUpgrade = e.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = e.onlyBinaryUpgrades, this.perMessageDeflate = e.perMessageDeflate !== !1 ? e.perMessageDeflate || {} : !1, this.perMessageDeflate === !0 && (this.perMessageDeflate = {}), this.perMessageDeflate && this.perMessageDeflate.threshold == null && (this.perMessageDeflate.threshold = 1024), this.pfx = e.pfx || void 0, this.key = e.key || void 0, this.passphrase = e.passphrase || void 0, this.cert = e.cert || void 0, this.ca = e.ca || void 0, this.ciphers = e.ciphers || void 0, this.rejectUnauthorized = e.rejectUnauthorized === void 0 ? !0 : e.rejectUnauthorized, this.forceNode = !!e.forceNode, this.isReactNative = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative", (typeof self > "u" || this.isReactNative) && (e.extraHeaders && Object.keys(e.extraHeaders).length > 0 && (this.extraHeaders = e.extraHeaders), e.localAddress && (this.localAddress = e.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open();
1664
1665
  }
1665
1666
  W.priorWebsocketSuccess = !1;
1666
- ro(W.prototype);
1667
+ no(W.prototype);
1667
1668
  W.protocol = br.protocol;
1668
1669
  W.Socket = W;
1669
1670
  W.Transport = Ne();
@@ -1671,11 +1672,11 @@ W.transports = Kt;
1671
1672
  W.parser = kt;
1672
1673
  W.prototype.createTransport = function(t) {
1673
1674
  G('creating transport "%s"', t);
1674
- var e = io(this.query);
1675
+ var e = ao(this.query);
1675
1676
  e.EIO = br.protocol, e.transport = t;
1676
1677
  var r = this.transportOptions[t] || {};
1677
1678
  this.id && (e.sid = this.id);
1678
- var n = new eo[t]({
1679
+ var n = new ro[t]({
1679
1680
  query: e,
1680
1681
  socket: this,
1681
1682
  agent: r.agent || this.agent,
@@ -1708,7 +1709,7 @@ W.prototype.createTransport = function(t) {
1708
1709
  });
1709
1710
  return n;
1710
1711
  };
1711
- function io(t) {
1712
+ function ao(t) {
1712
1713
  var e = {};
1713
1714
  for (var r in t)
1714
1715
  t.hasOwnProperty(r) && (e[r] = t[r]);
@@ -1893,13 +1894,13 @@ W.prototype.onClose = function(t, e) {
1893
1894
  };
1894
1895
  W.prototype.filterUpgrades = function(t) {
1895
1896
  for (var e = [], r = 0, n = t.length; r < n; r++)
1896
- ~no(this.transports, t[r]) && e.push(t[r]);
1897
+ ~oo(this.transports, t[r]) && e.push(t[r]);
1897
1898
  return e;
1898
1899
  };
1899
- Se.exports = so;
1900
+ Se.exports = io;
1900
1901
  Se.exports.parser = kt;
1901
- var ao = Se.exports, Ve = { exports: {} }, ce, $e;
1902
- function co() {
1902
+ var co = Se.exports, Ve = { exports: {} }, ce, $e;
1903
+ function ho() {
1903
1904
  if ($e)
1904
1905
  return ce;
1905
1906
  $e = 1, ce = t;
@@ -1912,8 +1913,8 @@ function co() {
1912
1913
  }
1913
1914
  return ce;
1914
1915
  }
1915
- var Cr = ho;
1916
- function ho(t, e, r) {
1916
+ var Cr = po;
1917
+ function po(t, e, r) {
1917
1918
  return t.on(e, r), {
1918
1919
  destroy: function() {
1919
1920
  t.removeListener(e, r);
@@ -1930,7 +1931,7 @@ var Ge = [].slice, wr = function(t, e) {
1930
1931
  }, Ye;
1931
1932
  function Sr() {
1932
1933
  return Ye || (Ye = 1, function(t, e) {
1933
- var r = Xt, n = St, o = co(), i = Cr, u = wr, h = lt("socket.io-client:socket"), f = Ht(), c = hr();
1934
+ var r = Xt, n = St, o = ho(), i = Cr, u = wr, h = lt("socket.io-client:socket"), f = Ht(), c = hr();
1934
1935
  t.exports = a;
1935
1936
  var l = {
1936
1937
  connect: 1,
@@ -2055,7 +2056,7 @@ function Sr() {
2055
2056
  };
2056
2057
  }(Ve)), Ve.exports;
2057
2058
  }
2058
- var po = Tt;
2059
+ var uo = Tt;
2059
2060
  function Tt(t) {
2060
2061
  t = t || {}, this.ms = t.min || 100, this.max = t.max || 1e4, this.factor = t.factor || 2, this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0, this.attempts = 0;
2061
2062
  }
@@ -2079,16 +2080,16 @@ Tt.prototype.setMax = function(t) {
2079
2080
  Tt.prototype.setJitter = function(t) {
2080
2081
  this.jitter = t;
2081
2082
  };
2082
- var uo = ao, lo = Sr(), fo = St, yo = Xt, ft = Cr, Ct = wr, Z = lt("socket.io-client:manager"), Er = kr, go = po, Ar = Object.prototype.hasOwnProperty, Qe = K;
2083
+ var lo = co, fo = Sr(), yo = St, go = Xt, ft = Cr, Ct = wr, Z = lt("socket.io-client:manager"), Er = kr, mo = uo, Ar = Object.prototype.hasOwnProperty, Qe = K;
2083
2084
  function K(t, e) {
2084
2085
  if (!(this instanceof K))
2085
2086
  return new K(t, e);
2086
- t && typeof t == "object" && (e = t, t = void 0), e = e || {}, e.path = e.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e, this.reconnection(e.reconnection !== !1), this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e.reconnectionDelay || 1e3), this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3), this.randomizationFactor(e.randomizationFactor || 0.5), this.backoff = new go({
2087
+ t && typeof t == "object" && (e = t, t = void 0), e = e || {}, e.path = e.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e, this.reconnection(e.reconnection !== !1), this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e.reconnectionDelay || 1e3), this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3), this.randomizationFactor(e.randomizationFactor || 0.5), this.backoff = new mo({
2087
2088
  min: this.reconnectionDelay(),
2088
2089
  max: this.reconnectionDelayMax(),
2089
2090
  jitter: this.randomizationFactor()
2090
2091
  }), this.timeout(e.timeout == null ? 2e4 : e.timeout), this.readyState = "closed", this.uri = t, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [];
2091
- var r = e.parser || yo;
2092
+ var r = e.parser || go;
2092
2093
  this.encoder = new r.Encoder(), this.decoder = new r.Decoder(), this.autoConnect = e.autoConnect !== !1, this.autoConnect && this.open();
2093
2094
  }
2094
2095
  K.prototype.emitAll = function() {
@@ -2103,7 +2104,7 @@ K.prototype.updateSocketIds = function() {
2103
2104
  K.prototype.generateId = function(t) {
2104
2105
  return (t === "/" ? "" : t + "#") + this.engine.id;
2105
2106
  };
2106
- fo(K.prototype);
2107
+ yo(K.prototype);
2107
2108
  K.prototype.reconnection = function(t) {
2108
2109
  return arguments.length ? (this._reconnection = !!t, this) : this._reconnection;
2109
2110
  };
@@ -2128,7 +2129,7 @@ K.prototype.maybeReconnectOnOpen = function() {
2128
2129
  K.prototype.open = K.prototype.connect = function(t, e) {
2129
2130
  if (Z("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
2130
2131
  return this;
2131
- Z("opening %s", this.uri), this.engine = uo(this.uri, this.opts);
2132
+ Z("opening %s", this.uri), this.engine = lo(this.uri, this.opts);
2132
2133
  var r = this.engine, n = this;
2133
2134
  this.readyState = "opening", this.skipReconnect = !1;
2134
2135
  var o = ft(r, "open", function() {
@@ -2177,7 +2178,7 @@ K.prototype.onerror = function(t) {
2177
2178
  K.prototype.socket = function(t, e) {
2178
2179
  var r = this.nsps[t];
2179
2180
  if (!r) {
2180
- r = new lo(this, t, e), this.nsps[t] = r;
2181
+ r = new fo(this, t, e), this.nsps[t] = r;
2181
2182
  var n = this;
2182
2183
  r.on("connecting", o), r.on("connect", function() {
2183
2184
  r.id = n.generateId(t);
@@ -2247,7 +2248,7 @@ K.prototype.onreconnect = function() {
2247
2248
  this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t);
2248
2249
  };
2249
2250
  (function(t, e) {
2250
- var r = Qr, n = Xt, o = Qe, i = lt("socket.io-client");
2251
+ var r = Zr, n = Xt, o = Qe, i = lt("socket.io-client");
2251
2252
  t.exports = e = h;
2252
2253
  var u = e.managers = {};
2253
2254
  function h(f, c) {
@@ -2257,38 +2258,38 @@ K.prototype.onreconnect = function() {
2257
2258
  }
2258
2259
  e.protocol = n.protocol, e.connect = h, e.Manager = Qe, e.Socket = Sr();
2259
2260
  })(le, le.exports);
2260
- var mo = le.exports;
2261
- const vo = /* @__PURE__ */ jr(mo);
2261
+ var vo = le.exports;
2262
+ const ko = /* @__PURE__ */ Mr(vo);
2262
2263
  let Ft;
2263
- const ko = new Uint8Array(16);
2264
- function bo() {
2264
+ const bo = new Uint8Array(16);
2265
+ function Co() {
2265
2266
  if (!Ft && (Ft = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ft))
2266
2267
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2267
- return Ft(ko);
2268
+ return Ft(bo);
2268
2269
  }
2269
2270
  const Q = [];
2270
2271
  for (let t = 0; t < 256; ++t)
2271
2272
  Q.push((t + 256).toString(16).slice(1));
2272
- function Co(t, e = 0) {
2273
+ function wo(t, e = 0) {
2273
2274
  return Q[t[e + 0]] + Q[t[e + 1]] + Q[t[e + 2]] + Q[t[e + 3]] + "-" + Q[t[e + 4]] + Q[t[e + 5]] + "-" + Q[t[e + 6]] + Q[t[e + 7]] + "-" + Q[t[e + 8]] + Q[t[e + 9]] + "-" + Q[t[e + 10]] + Q[t[e + 11]] + Q[t[e + 12]] + Q[t[e + 13]] + Q[t[e + 14]] + Q[t[e + 15]];
2274
2275
  }
2275
- const wo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ze = {
2276
- randomUUID: wo
2276
+ const So = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ze = {
2277
+ randomUUID: So
2277
2278
  };
2278
- function So(t, e, r) {
2279
+ function Eo(t, e, r) {
2279
2280
  if (Ze.randomUUID && !e && !t)
2280
2281
  return Ze.randomUUID();
2281
2282
  t = t || {};
2282
- const n = t.random || (t.rng || bo)();
2283
+ const n = t.random || (t.rng || Co)();
2283
2284
  if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
2284
2285
  r = r || 0;
2285
2286
  for (let o = 0; o < 16; ++o)
2286
2287
  e[r + o] = n[o];
2287
2288
  return e;
2288
2289
  }
2289
- return Co(n);
2290
+ return wo(n);
2290
2291
  }
2291
- function Eo(t, e) {
2292
+ function Ao(t, e) {
2292
2293
  const r = e.map((o) => JSON.stringify(o)).join(" "), n = (/* @__PURE__ */ new Date()).toISOString();
2293
2294
  return JSON.stringify({
2294
2295
  level: t,
@@ -2296,11 +2297,11 @@ function Eo(t, e) {
2296
2297
  message: r
2297
2298
  });
2298
2299
  }
2299
- function Ao(t, e) {
2300
+ function To(t, e) {
2300
2301
  const r = JSON.parse(t);
2301
2302
  return e.forEach((n) => delete r[n]), r;
2302
2303
  }
2303
- function To(t) {
2304
+ function No(t) {
2304
2305
  if (typeof t == "object" && t !== null)
2305
2306
  return t;
2306
2307
  try {
@@ -2309,7 +2310,7 @@ function To(t) {
2309
2310
  return { extraData: t };
2310
2311
  }
2311
2312
  }
2312
- function No(t) {
2313
+ function Oo(t) {
2313
2314
  const e = /\(([^)]+)\)/, r = t.match(e);
2314
2315
  if (r && r[1]) {
2315
2316
  const n = r[1].split(";");
@@ -2329,7 +2330,7 @@ function tr(t) {
2329
2330
  }
2330
2331
  });
2331
2332
  }
2332
- const Oo = {
2333
+ const xo = {
2333
2334
  reconnection: !0,
2334
2335
  reconnectionDelay: 5e3,
2335
2336
  reconnectionAttempts: 10,
@@ -2361,7 +2362,7 @@ const Oo = {
2361
2362
  CHECK: "Check",
2362
2363
  WEBHOOK: "Webhook",
2363
2364
  WSCONNECT: "WSConnect"
2364
- }, xo = {
2365
+ }, Io = {
2365
2366
  Create: 1,
2366
2367
  Read: 2,
2367
2368
  Update: 3,
@@ -2394,7 +2395,7 @@ const Oo = {
2394
2395
  DEBUG: "debug"
2395
2396
  };
2396
2397
  let rt = console;
2397
- class Io {
2398
+ class Ro {
2398
2399
  /**
2399
2400
  * Initialize storage logger
2400
2401
  * @param options The configuration of the logger.
@@ -2414,7 +2415,7 @@ class Io {
2414
2415
  * @return void
2415
2416
  */
2416
2417
  setupStorageFunctions(e, r, n) {
2417
- this.getItem = e && typeof e == "function" ? this.isGetItemAsync ? e : tr(e) : this.defaultGetItemFunction, this.setItem = r && typeof r == "function" ? this.isSetItemAsync ? r : tr(r) : this.defaultSetItemFunction, this.parseLog = n && typeof n == "function" ? n : Eo;
2418
+ this.getItem = e && typeof e == "function" ? this.isGetItemAsync ? e : tr(e) : this.defaultGetItemFunction, this.setItem = r && typeof r == "function" ? this.isSetItemAsync ? r : tr(r) : this.defaultSetItemFunction, this.parseLog = n && typeof n == "function" ? n : Ao;
2418
2419
  }
2419
2420
  /**
2420
2421
  * Used to initialize logger. Initializes storage, establishes socket connection and overloads console if needed
@@ -2443,10 +2444,10 @@ class Io {
2443
2444
  */
2444
2445
  createConnection(e, r = {}) {
2445
2446
  const n = {
2446
- ...Oo,
2447
+ ...xo,
2447
2448
  ...r
2448
2449
  };
2449
- return vo(e, n);
2450
+ return ko(e, n);
2450
2451
  }
2451
2452
  /**
2452
2453
  * Emits stored logs to the server and clears the log storage in case the emit operation was successful
@@ -2469,7 +2470,7 @@ class Io {
2469
2470
  if (!this.socket || !this.socket.connected)
2470
2471
  throw new Error("Socket is disconnected");
2471
2472
  for (const f of i) {
2472
- const c = To(n[f]), l = {
2473
+ const c = No(n[f]), l = {
2473
2474
  ...this.staticObject,
2474
2475
  ...c
2475
2476
  }, p = this.populateSendingLog(l);
@@ -2478,7 +2479,7 @@ class Io {
2478
2479
  const u = await this.getItem(this.storageId);
2479
2480
  if (!u)
2480
2481
  return;
2481
- const h = Ao(u, o);
2482
+ const h = To(u, o);
2482
2483
  this.localObject = {}, await this.setItem(this.storageId, JSON.stringify(h));
2483
2484
  } catch (e) {
2484
2485
  this._errorMethod(e);
@@ -2494,7 +2495,7 @@ class Io {
2494
2495
  const r = {
2495
2496
  ...e
2496
2497
  }, n = r.ActionName;
2497
- return n && (r.ActionID = xo[n]), r;
2498
+ return n && (r.ActionID = Io[n]), r;
2498
2499
  }
2499
2500
  /**
2500
2501
  * Used to set a static object which will be send in every message
@@ -2512,7 +2513,7 @@ class Io {
2512
2513
  let r;
2513
2514
  typeof window < "u" && typeof window.document < "u" ? r = window == null ? void 0 : window.navigator.userAgent : typeof self < "u" && self.navigator && (r = self.navigator.userAgent);
2514
2515
  let n;
2515
- return r && (n = No(r)), {
2516
+ return r && (n = Oo(r)), {
2516
2517
  System: this.system,
2517
2518
  DateTime: e,
2518
2519
  UserAgent: r,
@@ -2578,7 +2579,7 @@ class Io {
2578
2579
  * @return string
2579
2580
  */
2580
2581
  getStorageName() {
2581
- const e = So();
2582
+ const e = Eo();
2582
2583
  return this.system.toString().toUpperCase() + e + Date.now();
2583
2584
  }
2584
2585
  /**
@@ -2690,7 +2691,7 @@ class Io {
2690
2691
  return this.logIndex++, `${e}-${this.system}-${r}-${this.logIndex}`;
2691
2692
  }
2692
2693
  }
2693
- class Ro {
2694
+ class Bo {
2694
2695
  constructor(e) {
2695
2696
  H(this, "delay", 1e3);
2696
2697
  H(this, "lastLoginTimestamp");
@@ -2706,7 +2707,7 @@ class Ro {
2706
2707
  email: this.eventsSdkClass.options.email && this.eventsSdkClass.options.email,
2707
2708
  password: this.eventsSdkClass.options.password && this.eventsSdkClass.options.password
2708
2709
  };
2709
- if (this.storageKey = Dr(JSON.stringify({
2710
+ if (this.storageKey = Pr(JSON.stringify({
2710
2711
  ...this.eventsSdkClass.options,
2711
2712
  loggerSocketConnection: null
2712
2713
  }, this.eventsSdkClass.getCircularReplacer())), this.lastLoginTimestamp && this.lastLoginTimestamp + this.delay > (/* @__PURE__ */ new Date()).getTime())
@@ -2886,7 +2887,7 @@ class Ro {
2886
2887
  return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
2887
2888
  }
2888
2889
  }
2889
- const Bo = {
2890
+ const _o = {
2890
2891
  isNewStack: !1,
2891
2892
  loginUrl: "https://loginapi.voicenter.co.il/monitorAPI/Login",
2892
2893
  refreshTokenUrl: "https://loginapi.voicenter.co.il/monitorAPI/RefreshIdentityToken",
@@ -2920,8 +2921,8 @@ const Bo = {
2920
2921
  debug: !1
2921
2922
  }
2922
2923
  };
2923
- function _o() {
2924
- return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), function t(e, r, n) {
2924
+ function Lo() {
2925
+ return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), typeof self > "u" && typeof global == "object" && (global.self = global, global.WebSocket = Rr, typeof self.navigator > "u" && (self.navigator = { userAgent: "node" })), function t(e, r, n) {
2925
2926
  function o(h, f) {
2926
2927
  if (!r[h]) {
2927
2928
  if (!e[h]) {
@@ -5101,32 +5102,32 @@ function _o() {
5101
5102
  }, {}]
5102
5103
  }, {}, [1])(1);
5103
5104
  }
5104
- const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5105
+ const Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5105
5106
  __proto__: null,
5106
- default: _o
5107
- }, Symbol.toStringTag, { value: "Module" })), Uo = /* @__PURE__ */ Object.assign({
5108
- "./v1_3_7.js": Lo
5109
- }), Do = /v\d+_\d+_\d+/;
5110
- function Po(t) {
5107
+ default: Lo
5108
+ }, Symbol.toStringTag, { value: "Module" })), Do = /* @__PURE__ */ Object.assign({
5109
+ "./v1_3_7.js": Uo
5110
+ }), Po = /v\d+_\d+_\d+/;
5111
+ function Fo(t) {
5111
5112
  return typeof t == "function";
5112
5113
  }
5113
- const be = Object.entries(Uo).reduce(
5114
+ const be = Object.entries(Do).reduce(
5114
5115
  (t, e) => {
5115
5116
  var o;
5116
- const r = e[1].default, n = (o = e[0].match(Do)) == null ? void 0 : o[0];
5117
- return Po(r) && n && (t[n] = r()), t;
5117
+ const r = e[1].default, n = (o = e[0].match(Po)) == null ? void 0 : o[0];
5118
+ return Fo(r) && n && (t[n] = r()), t;
5118
5119
  },
5119
5120
  {}
5120
5121
  ), Tr = (t) => {
5121
5122
  if (t in be)
5122
5123
  return be[t];
5123
5124
  throw new Error(`Socket version ${t} not found`);
5124
- }, Fo = (t, ...e) => Tr(t)(...e), jo = {
5125
+ }, jo = (t, ...e) => Tr(t)(...e), Mo = {
5125
5126
  ...be,
5126
5127
  getSocketVersion: Tr,
5127
- makeSocketVersion: Fo
5128
+ makeSocketVersion: jo
5128
5129
  };
5129
- var Mo = /* @__PURE__ */ ((t) => (t.RINGING = "Ringing", t.TALKING = "Talking", t.DIALING = "Dialing", t.HOLD = "Hold", t))(Mo || {}), qo = /* @__PURE__ */ ((t) => (t.INCOMING = "Incoming", t.OUTGOING = "Outgoing", t))(qo || {}), mt = /* @__PURE__ */ ((t) => (t.CONNECTED = "connected", t.DISCONNECTED = "disconnected", t.TRYING_TO_CONNECT = "tryingToConnect", t))(mt || {}), zo = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "Automatic", t.IVR = "IVR", t))(zo || {}), Xo = /* @__PURE__ */ ((t) => (t.INCOMINC = "Incoming", t.OUTGOING = "Outgoing", t.SPY = "Spy", t.CLICK2CALL = "Click2Call", t))(Xo || {}), Wo = /* @__PURE__ */ ((t) => (t.RESPONSE_FROM_API_VALID = "RESPONSE_FROM_API_VALID", t.RESPONSE_FROM_API_INVALID = "RESPONSE_FROM_API_INVALID", t))(Wo || {}), z = /* @__PURE__ */ ((t) => (t.ALL_DIALER_STATUS = "AllDialersStatus", t.ALL_EXTENSION_STATUS = "AllExtensionsStatus", t.ALL_USERS_STATUS = "AllUsersStatus", t.CONNECT = "connect", t.DISCONNECT = "disconnect", t.CONNECT_ERROR_EVENT = "connect_error", t.EXTENSION_EVENT = "ExtensionEvent", t.KEEP_ALIVE = "keepalive", t.KEEP_ALIVE_RESPONSE = "keepaliveResponse", t.LOGIN_STATUS = "loginStatus", t.LOGIN_SUCCESS = "loginSuccess", t.QUEUE_EVENT = "QueueEvent", t.ONLINE_STATUS_EVENT = "onlineStatusEvent", t.DIALER_EVENT = "DialerEvent", t.EXTENSIONS_UPDATED = "ExtensionsUpdated", t))(z || {}), Nr = /* @__PURE__ */ ((t) => (t.NEWCALL = "NEWCALL", t.ANSWER = "ANSWER", t.HOLD = "HOLD", t.UNHOLD = "UNHOLD", t.HANGUP = "HANGUP", t.USER_STATUS_UPDATE = "userStatusUpdate", t))(Nr || {}), Ko = /* @__PURE__ */ ((t) => (t.NORMAL_HANGUP = "Normal hangup", t.USER_BUSY = "User busy", t.CALL_REJECTED = "Call Rejected", t.UNALLOCATED_NUMBER = "Unallocated (unassigned) number", t.UNKNOWN = "Unknown", t.NO_USER_RESPONDING = "No user responding", t.USER_ALERTING = "User alerting, no answer", t.ANSWERED_ELSEWHERE = "Answered elsewhere", t))(Ko || {}), Ho = /* @__PURE__ */ ((t) => (t.ANSWER = "ANSWER", t.ABANDONED = "ABANDONED", t.EXIT = "EXIT", t.JOIN = "JOIN", t))(Ho || {});
5130
+ var qo = /* @__PURE__ */ ((t) => (t.RINGING = "Ringing", t.TALKING = "Talking", t.DIALING = "Dialing", t.HOLD = "Hold", t))(qo || {}), zo = /* @__PURE__ */ ((t) => (t.INCOMING = "Incoming", t.OUTGOING = "Outgoing", t))(zo || {}), mt = /* @__PURE__ */ ((t) => (t.CONNECTED = "connected", t.DISCONNECTED = "disconnected", t.TRYING_TO_CONNECT = "tryingToConnect", t))(mt || {}), Xo = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "Automatic", t.IVR = "IVR", t))(Xo || {}), Wo = /* @__PURE__ */ ((t) => (t.INCOMINC = "Incoming", t.OUTGOING = "Outgoing", t.SPY = "Spy", t.CLICK2CALL = "Click2Call", t))(Wo || {}), Ko = /* @__PURE__ */ ((t) => (t.RESPONSE_FROM_API_VALID = "RESPONSE_FROM_API_VALID", t.RESPONSE_FROM_API_INVALID = "RESPONSE_FROM_API_INVALID", t))(Ko || {}), z = /* @__PURE__ */ ((t) => (t.ALL_DIALER_STATUS = "AllDialersStatus", t.ALL_EXTENSION_STATUS = "AllExtensionsStatus", t.ALL_USERS_STATUS = "AllUsersStatus", t.CONNECT = "connect", t.DISCONNECT = "disconnect", t.CONNECT_ERROR_EVENT = "connect_error", t.EXTENSION_EVENT = "ExtensionEvent", t.KEEP_ALIVE = "keepalive", t.KEEP_ALIVE_RESPONSE = "keepaliveResponse", t.LOGIN_STATUS = "loginStatus", t.LOGIN_SUCCESS = "loginSuccess", t.QUEUE_EVENT = "QueueEvent", t.ONLINE_STATUS_EVENT = "onlineStatusEvent", t.DIALER_EVENT = "DialerEvent", t.EXTENSIONS_UPDATED = "ExtensionsUpdated", t))(z || {}), Nr = /* @__PURE__ */ ((t) => (t.NEWCALL = "NEWCALL", t.ANSWER = "ANSWER", t.HOLD = "HOLD", t.UNHOLD = "UNHOLD", t.HANGUP = "HANGUP", t.USER_STATUS_UPDATE = "userStatusUpdate", t))(Nr || {}), Ho = /* @__PURE__ */ ((t) => (t.NORMAL_HANGUP = "Normal hangup", t.USER_BUSY = "User busy", t.CALL_REJECTED = "Call Rejected", t.UNALLOCATED_NUMBER = "Unallocated (unassigned) number", t.UNKNOWN = "Unknown", t.NO_USER_RESPONDING = "No user responding", t.USER_ALERTING = "User alerting, no answer", t.ANSWERED_ELSEWHERE = "Answered elsewhere", t))(Ho || {}), Jo = /* @__PURE__ */ ((t) => (t.ANSWER = "ANSWER", t.ABANDONED = "ABANDONED", t.EXIT = "EXIT", t.JOIN = "JOIN", t))(Jo || {});
5130
5131
  class pe {
5131
5132
  static mapExtensionEvent(e) {
5132
5133
  var u, h;
@@ -5266,7 +5267,7 @@ class pe {
5266
5267
  }
5267
5268
  }
5268
5269
  var Or = /* @__PURE__ */ ((t) => (t.UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions", t.KEEP_ALIVE = "keepAlive", t))(Or || {});
5269
- class Jo {
5270
+ class Vo {
5270
5271
  constructor(e) {
5271
5272
  H(this, "io");
5272
5273
  H(this, "ioFunction");
@@ -5279,7 +5280,7 @@ class Jo {
5279
5280
  }
5280
5281
  getSocketIoFunction(e) {
5281
5282
  const r = e.split("v="), n = "v".concat(r[r.length - 1]).replaceAll(".", "_");
5282
- this.ioFunction = jo.getSocketVersion(n);
5283
+ this.ioFunction = Mo.getSocketVersion(n);
5283
5284
  }
5284
5285
  initSocketConnection() {
5285
5286
  const e = this.eventsSdkClass.authClass.token, r = this.eventsSdkClass.options.protocol, n = this.eventsSdkClass.server;
@@ -5306,7 +5307,7 @@ class Jo {
5306
5307
  token: e
5307
5308
  }), this.ioFunction && i)
5308
5309
  this.io = this.ioFunction(i, u), this.eventsSdkClass.loggerClass.log({
5309
- Message: `${this.eventsSdkClass.options.loggerConfig.system} tries to connect to WS server ${o}`,
5310
+ Message: `${this.eventsSdkClass.options.loggerConfig.system} is trying to connect to WS server ${o}`,
5310
5311
  ActionName: at.WSCONNECT,
5311
5312
  isShowClient: !1,
5312
5313
  Status: "Switching Protocols",
@@ -5423,7 +5424,7 @@ class Jo {
5423
5424
  this.eventsSdkClass.eventEmitterClass.emit(z.ONLINE_STATUS_EVENT, {
5424
5425
  connectionStatus: this.doReconnect ? mt.TRYING_TO_CONNECT : mt.DISCONNECTED
5425
5426
  }), this.eventsSdkClass.loggerClass.log({
5426
- Message: `Sdk tries to connect to the socket server ${this.eventsSdkClass.URL} but error (${e})`,
5427
+ Message: `Sdk attempt to connect to the socket server ${this.eventsSdkClass.URL} failed (${e})`,
5427
5428
  ActionName: at.WSCONNECT,
5428
5429
  isShowClient: !1,
5429
5430
  Status: "Connection attempt error",
@@ -5438,7 +5439,7 @@ class Jo {
5438
5439
  );
5439
5440
  }
5440
5441
  }
5441
- class Vo {
5442
+ class $o {
5442
5443
  constructor(e) {
5443
5444
  H(this, "storageLogger");
5444
5445
  this.eventsSdkClass = e, this.eventsSdkClass = e;
@@ -5454,7 +5455,7 @@ class Vo {
5454
5455
  this.eventsSdkClass.options.loggerSocketConnection && (e = this.eventsSdkClass.options.loggerSocketConnection), this.eventsSdkClass.socketIoClass.ioFunction && !e && (e = this.eventsSdkClass.socketIoClass.ioFunction(
5455
5456
  this.eventsSdkClass.options.loggerServer,
5456
5457
  this.eventsSdkClass.options.loggerConnectOptions
5457
- )), e && (this.storageLogger = new Io({
5458
+ )), e && (this.storageLogger = new Ro({
5458
5459
  socket: e,
5459
5460
  loggerOptions: this.eventsSdkClass.options.loggerConfig
5460
5461
  }));
@@ -5463,7 +5464,7 @@ class Vo {
5463
5464
  this.storageLogger && this.storageLogger.stop();
5464
5465
  }
5465
5466
  log(e) {
5466
- this.storageLogger ? e.Level === tt.INFO ? this.storageLogger.log(e) : e.Level === tt.ERROR && this.storageLogger.error(e) : e.Level === tt.INFO ? console.log(e) : e.Level === tt.ERROR && console.error(e);
5467
+ this.eventsSdkClass.options.useLogger && (this.storageLogger ? e.Level === tt.INFO ? this.storageLogger.log(e) : e.Level === tt.ERROR && this.storageLogger.error(e) : e.Level === tt.INFO ? console.log(e) : e.Level === tt.ERROR && console.error(e));
5467
5468
  }
5468
5469
  sdkInitializedLog() {
5469
5470
  const e = {
@@ -5483,7 +5484,7 @@ class Vo {
5483
5484
  });
5484
5485
  }
5485
5486
  }
5486
- class $o {
5487
+ class Go {
5487
5488
  constructor(e) {
5488
5489
  H(this, "listeners", {
5489
5490
  [z.ALL_EXTENSION_STATUS]: [],
@@ -5527,7 +5528,7 @@ class $o {
5527
5528
  this.allListeners.forEach((o) => o(n));
5528
5529
  }
5529
5530
  }
5530
- class Yo {
5531
+ class Zo {
5531
5532
  constructor(e) {
5532
5533
  H(this, "options");
5533
5534
  H(this, "servers", []);
@@ -5537,10 +5538,10 @@ class Yo {
5537
5538
  H(this, "socket");
5538
5539
  H(this, "mainServer");
5539
5540
  H(this, "alreadyAttemptedOtherServers", []);
5540
- H(this, "authClass", new Ro(this));
5541
- H(this, "socketIoClass", new Jo(this));
5542
- H(this, "loggerClass", new Vo(this));
5543
- H(this, "eventEmitterClass", new $o(this));
5541
+ H(this, "authClass", new Bo(this));
5542
+ H(this, "socketIoClass", new Vo(this));
5543
+ H(this, "loggerClass", new $o(this));
5544
+ H(this, "eventEmitterClass", new Go(this));
5544
5545
  H(this, "getCircularReplacer", () => {
5545
5546
  const e = /* @__PURE__ */ new WeakSet();
5546
5547
  return (r, n) => {
@@ -5555,7 +5556,7 @@ class Yo {
5555
5556
  };
5556
5557
  });
5557
5558
  this.options = {
5558
- ...Bo,
5559
+ ..._o,
5559
5560
  ...e
5560
5561
  };
5561
5562
  }
@@ -5566,7 +5567,13 @@ class Yo {
5566
5567
  this.socketIoClass.io && this.socketIoClass.io.emit(e, ...r);
5567
5568
  }
5568
5569
  connect(e) {
5569
- e === vt.MAIN && this.findMainServer(), e === vt.NEXT && this.findNextServer(), this.socketIoClass.doReconnect = !0, this.loggerClass.init(), this.socketIoClass.initSocketConnection(), this.socketIoClass.initSocketEvents(), this.socketIoClass.initKeepAlive();
5570
+ e === vt.MAIN && this.findMainServer(), e === vt.NEXT && this.findNextServer(), this.socketIoClass.doReconnect = !0;
5571
+ try {
5572
+ this.loggerClass.init();
5573
+ } catch (r) {
5574
+ console.error(r);
5575
+ }
5576
+ this.socketIoClass.initSocketConnection(), this.socketIoClass.initSocketEvents(), this.socketIoClass.initKeepAlive();
5570
5577
  }
5571
5578
  disconnect() {
5572
5579
  this.socketIoClass.doReconnect = !1, this.socketIoClass.closeAllConnections(), this.loggerClass.stop();
@@ -5608,18 +5615,18 @@ class Yo {
5608
5615
  }
5609
5616
  }
5610
5617
  export {
5611
- Mo as CallStatusEnum,
5612
- qo as CallTypeEnum,
5618
+ qo as CallStatusEnum,
5619
+ zo as CallTypeEnum,
5613
5620
  mt as ConnectionStatusEnum,
5614
- zo as DialerTypeEnum,
5615
- Xo as DirectionEnum,
5616
- Wo as DoNotCallMeStatusCodeEnum,
5621
+ Xo as DialerTypeEnum,
5622
+ Wo as DirectionEnum,
5623
+ Ko as DoNotCallMeStatusCodeEnum,
5617
5624
  z as EventsEnum,
5618
5625
  Nr as ExtensionEventReasonEnum,
5619
- Ko as ExtensionHangupCauseEnum,
5626
+ Ho as ExtensionHangupCauseEnum,
5620
5627
  it as LoginType,
5621
- Ho as QueueEventReasonEnum,
5628
+ Jo as QueueEventReasonEnum,
5622
5629
  Or as ServerListenerEventsEnum,
5623
- Yo as default
5630
+ Zo as default
5624
5631
  };
5625
5632
  //# sourceMappingURL=voicenter-events-sdk.es.js.map