@voicenter-team/events-sdk 0.0.66 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +338 -0
- package/dist/voicenter-events-sdk.cjs.js +8 -8
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +324 -845
- package/dist/voicenter-events-sdk.es.js +922 -899
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +8 -8
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +8 -8
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +60 -59
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var H = (t, e, r) => (
|
|
4
|
-
function
|
|
1
|
+
var xr = Object.defineProperty;
|
|
2
|
+
var Ir = (t, e, r) => e in t ? xr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var H = (t, e, r) => (Ir(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
function Rr(t) {
|
|
5
5
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var er = { exports: {} }, rr = { exports: {} };
|
|
8
8
|
(function() {
|
|
9
9
|
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = {
|
|
10
10
|
// Bit-wise rotation left
|
|
@@ -68,18 +68,18 @@ var Ve = { exports: {} }, $e = { exports: {} };
|
|
|
68
68
|
return n;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
rr.exports = e;
|
|
72
72
|
})();
|
|
73
|
-
var
|
|
73
|
+
var Br = rr.exports, ue = {
|
|
74
74
|
// UTF-8 encoding
|
|
75
75
|
utf8: {
|
|
76
76
|
// Convert a string to a byte array
|
|
77
77
|
stringToBytes: function(t) {
|
|
78
|
-
return
|
|
78
|
+
return ue.bin.stringToBytes(unescape(encodeURIComponent(t)));
|
|
79
79
|
},
|
|
80
80
|
// Convert a byte array to a string
|
|
81
81
|
bytesToString: function(t) {
|
|
82
|
-
return decodeURIComponent(escape(
|
|
82
|
+
return decodeURIComponent(escape(ue.bin.bytesToString(t)));
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
// Binary encoding
|
|
@@ -97,55 +97,55 @@ var Nr = $e.exports, he = {
|
|
|
97
97
|
return e.join("");
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Ue = ue;
|
|
101
101
|
/*!
|
|
102
102
|
* Determine if an object is a Buffer
|
|
103
103
|
*
|
|
104
104
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
105
105
|
* @license MIT
|
|
106
106
|
*/
|
|
107
|
-
var
|
|
108
|
-
return t != null && (
|
|
107
|
+
var _r = function(t) {
|
|
108
|
+
return t != null && (nr(t) || Lr(t) || !!t._isBuffer);
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function nr(t) {
|
|
111
111
|
return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return typeof t.readFloatLE == "function" && typeof t.slice == "function" &&
|
|
113
|
+
function Lr(t) {
|
|
114
|
+
return typeof t.readFloatLE == "function" && typeof t.slice == "function" && nr(t.slice(0, 0));
|
|
115
115
|
}
|
|
116
116
|
(function() {
|
|
117
|
-
var t =
|
|
117
|
+
var t = Br, e = Ue.utf8, r = _r, n = Ue.bin, o = function(i, u) {
|
|
118
118
|
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
|
-
for (var h = t.bytesToWords(i),
|
|
119
|
+
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
120
|
h[s] = (h[s] << 8 | h[s] >>> 24) & 16711935 | (h[s] << 24 | h[s] >>> 8) & 4278255360;
|
|
121
|
-
h[
|
|
122
|
-
for (var
|
|
121
|
+
h[f >>> 5] |= 128 << f % 32, h[(f + 64 >>> 9 << 4) + 14] = f;
|
|
122
|
+
for (var d = o._ff, y = o._gg, g = o._hh, w = o._ii, s = 0; s < h.length; s += 16) {
|
|
123
123
|
var B = c, _ = l, b = p, S = a;
|
|
124
|
-
c =
|
|
124
|
+
c = d(c, l, p, a, h[s + 0], 7, -680876936), a = d(a, c, l, p, h[s + 1], 12, -389564586), p = d(p, a, c, l, h[s + 2], 17, 606105819), l = d(l, p, a, c, h[s + 3], 22, -1044525330), c = d(c, l, p, a, h[s + 4], 7, -176418897), a = d(a, c, l, p, h[s + 5], 12, 1200080426), p = d(p, a, c, l, h[s + 6], 17, -1473231341), l = d(l, p, a, c, h[s + 7], 22, -45705983), c = d(c, l, p, a, h[s + 8], 7, 1770035416), a = d(a, c, l, p, h[s + 9], 12, -1958414417), p = d(p, a, c, l, h[s + 10], 17, -42063), l = d(l, p, a, c, h[s + 11], 22, -1990404162), c = d(c, l, p, a, h[s + 12], 7, 1804603682), a = d(a, c, l, p, h[s + 13], 12, -40341101), p = d(p, a, c, l, h[s + 14], 17, -1502002290), l = d(l, p, a, c, h[s + 15], 22, 1236535329), c = y(c, l, p, a, h[s + 1], 5, -165796510), a = y(a, c, l, p, h[s + 6], 9, -1069501632), p = y(p, a, c, l, h[s + 11], 14, 643717713), l = y(l, p, a, c, h[s + 0], 20, -373897302), c = y(c, l, p, a, h[s + 5], 5, -701558691), a = y(a, c, l, p, h[s + 10], 9, 38016083), p = y(p, a, c, l, h[s + 15], 14, -660478335), l = y(l, p, a, c, h[s + 4], 20, -405537848), c = y(c, l, p, a, h[s + 9], 5, 568446438), a = y(a, c, l, p, h[s + 14], 9, -1019803690), p = y(p, a, c, l, h[s + 3], 14, -187363961), l = y(l, p, a, c, h[s + 8], 20, 1163531501), c = y(c, l, p, a, h[s + 13], 5, -1444681467), a = y(a, c, l, p, h[s + 2], 9, -51403784), p = y(p, a, c, l, h[s + 7], 14, 1735328473), l = y(l, p, a, c, h[s + 12], 20, -1926607734), c = g(c, l, p, a, h[s + 5], 4, -378558), a = g(a, c, l, p, h[s + 8], 11, -2022574463), p = g(p, a, c, l, h[s + 11], 16, 1839030562), l = g(l, p, a, c, h[s + 14], 23, -35309556), c = g(c, l, p, a, h[s + 1], 4, -1530992060), a = g(a, c, l, p, h[s + 4], 11, 1272893353), p = g(p, a, c, l, h[s + 7], 16, -155497632), l = g(l, p, a, c, h[s + 10], 23, -1094730640), c = g(c, l, p, a, h[s + 13], 4, 681279174), a = g(a, c, l, p, h[s + 0], 11, -358537222), p = g(p, a, c, l, h[s + 3], 16, -722521979), l = g(l, p, a, c, h[s + 6], 23, 76029189), c = g(c, l, p, a, h[s + 9], 4, -640364487), a = g(a, c, l, p, h[s + 12], 11, -421815835), p = g(p, a, c, l, h[s + 15], 16, 530742520), l = g(l, p, a, c, h[s + 2], 23, -995338651), c = w(c, l, p, a, h[s + 0], 6, -198630844), a = w(a, c, l, p, h[s + 7], 10, 1126891415), p = w(p, a, c, l, h[s + 14], 15, -1416354905), l = w(l, p, a, c, h[s + 5], 21, -57434055), c = w(c, l, p, a, h[s + 12], 6, 1700485571), a = w(a, c, l, p, h[s + 3], 10, -1894986606), p = w(p, a, c, l, h[s + 10], 15, -1051523), l = w(l, p, a, c, h[s + 1], 21, -2054922799), c = w(c, l, p, a, h[s + 8], 6, 1873313359), a = w(a, c, l, p, h[s + 15], 10, -30611744), p = w(p, a, c, l, h[s + 6], 15, -1560198380), l = w(l, p, a, c, h[s + 13], 21, 1309151649), c = w(c, l, p, a, h[s + 4], 6, -145523070), a = w(a, c, l, p, h[s + 11], 10, -1120210379), p = w(p, a, c, l, h[s + 2], 15, 718787259), l = w(l, p, a, c, h[s + 9], 21, -343485551), c = c + B >>> 0, l = l + _ >>> 0, p = p + b >>> 0, a = a + S >>> 0;
|
|
125
125
|
}
|
|
126
126
|
return t.endian([c, l, p, a]);
|
|
127
127
|
};
|
|
128
|
-
o._ff = function(i, u, h,
|
|
129
|
-
var a = i + (u & h | ~u &
|
|
128
|
+
o._ff = function(i, u, h, f, c, l, p) {
|
|
129
|
+
var a = i + (u & h | ~u & f) + (c >>> 0) + p;
|
|
130
130
|
return (a << l | a >>> 32 - l) + u;
|
|
131
|
-
}, o._gg = function(i, u, h,
|
|
132
|
-
var a = i + (u &
|
|
131
|
+
}, o._gg = function(i, u, h, f, c, l, p) {
|
|
132
|
+
var a = i + (u & f | h & ~f) + (c >>> 0) + p;
|
|
133
133
|
return (a << l | a >>> 32 - l) + u;
|
|
134
|
-
}, o._hh = function(i, u, h,
|
|
135
|
-
var a = i + (u ^ h ^
|
|
134
|
+
}, o._hh = function(i, u, h, f, c, l, p) {
|
|
135
|
+
var a = i + (u ^ h ^ f) + (c >>> 0) + p;
|
|
136
136
|
return (a << l | a >>> 32 - l) + u;
|
|
137
|
-
}, o._ii = function(i, u, h,
|
|
138
|
-
var a = i + (h ^ (u | ~
|
|
137
|
+
}, o._ii = function(i, u, h, f, c, l, p) {
|
|
138
|
+
var a = i + (h ^ (u | ~f)) + (c >>> 0) + p;
|
|
139
139
|
return (a << l | a >>> 32 - l) + u;
|
|
140
|
-
}, o._blocksize = 16, o._digestsize = 16,
|
|
140
|
+
}, o._blocksize = 16, o._digestsize = 16, er.exports = function(i, u) {
|
|
141
141
|
if (i == null)
|
|
142
142
|
throw new Error("Illegal argument " + i);
|
|
143
143
|
var h = t.wordsToBytes(o(i, u));
|
|
144
144
|
return u && u.asBytes ? h : u && u.asString ? n.bytesToString(h) : t.bytesToHex(h);
|
|
145
145
|
};
|
|
146
146
|
})();
|
|
147
|
-
var
|
|
148
|
-
const
|
|
147
|
+
var Ur = er.exports;
|
|
148
|
+
const Dr = /* @__PURE__ */ Rr(Ur);
|
|
149
149
|
var vt = /* @__PURE__ */ ((t) => (t.MAIN = "main", t.NEXT = "next", t))(vt || {}), it = /* @__PURE__ */ ((t) => (t.USER = "User", t.TOKEN = "Token", t))(it || {});
|
|
150
150
|
class It {
|
|
151
151
|
static async getSessionStorageDataByKey(e, r = !0) {
|
|
@@ -169,11 +169,11 @@ class It {
|
|
|
169
169
|
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
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
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) {
|
|
174
174
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Mr(t) {
|
|
177
177
|
if (t.__esModule)
|
|
178
178
|
return t;
|
|
179
179
|
var e = t.default;
|
|
@@ -194,7 +194,7 @@ function Ur(t) {
|
|
|
194
194
|
});
|
|
195
195
|
}), r;
|
|
196
196
|
}
|
|
197
|
-
var
|
|
197
|
+
var le = { exports: {} }, qr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, zr = [
|
|
198
198
|
"source",
|
|
199
199
|
"protocol",
|
|
200
200
|
"authority",
|
|
@@ -209,35 +209,35 @@ var pe = { exports: {} }, Dr = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/
|
|
|
209
209
|
"file",
|
|
210
210
|
"query",
|
|
211
211
|
"anchor"
|
|
212
|
-
],
|
|
212
|
+
], or = function(t) {
|
|
213
213
|
var e = t, r = t.indexOf("["), n = t.indexOf("]");
|
|
214
214
|
r != -1 && n != -1 && (t = t.substring(0, r) + t.substring(r, n).replace(/:/g, ";") + t.substring(n, t.length));
|
|
215
|
-
for (var o =
|
|
216
|
-
i[
|
|
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 =
|
|
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;
|
|
218
218
|
};
|
|
219
|
-
function
|
|
219
|
+
function Xr(t, e) {
|
|
220
220
|
var r = /\/{2,9}/g, n = e.replace(r, "/").split("/");
|
|
221
221
|
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
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function Wr(t, e) {
|
|
224
224
|
var r = {};
|
|
225
225
|
return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function(n, o, i) {
|
|
226
226
|
o && (r[o] = i);
|
|
227
227
|
}), r;
|
|
228
228
|
}
|
|
229
|
-
var
|
|
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
230
|
e = e || {};
|
|
231
231
|
var r = typeof t;
|
|
232
232
|
if (r === "string" && t.length > 0)
|
|
233
|
-
return
|
|
233
|
+
return Jr(t);
|
|
234
234
|
if (r === "number" && isNaN(t) === !1)
|
|
235
|
-
return e.long ?
|
|
235
|
+
return e.long ? $r(t) : Vr(t);
|
|
236
236
|
throw new Error(
|
|
237
237
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(t)
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
|
-
function
|
|
240
|
+
function Jr(t) {
|
|
241
241
|
if (t = String(t), !(t.length > 100)) {
|
|
242
242
|
var e = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
|
243
243
|
t
|
|
@@ -250,29 +250,29 @@ function zr(t) {
|
|
|
250
250
|
case "yrs":
|
|
251
251
|
case "yr":
|
|
252
252
|
case "y":
|
|
253
|
-
return r *
|
|
253
|
+
return r * Kr;
|
|
254
254
|
case "days":
|
|
255
255
|
case "day":
|
|
256
256
|
case "d":
|
|
257
|
-
return r *
|
|
257
|
+
return r * Lt;
|
|
258
258
|
case "hours":
|
|
259
259
|
case "hour":
|
|
260
260
|
case "hrs":
|
|
261
261
|
case "hr":
|
|
262
262
|
case "h":
|
|
263
|
-
return r *
|
|
263
|
+
return r * _t;
|
|
264
264
|
case "minutes":
|
|
265
265
|
case "minute":
|
|
266
266
|
case "mins":
|
|
267
267
|
case "min":
|
|
268
268
|
case "m":
|
|
269
|
-
return r *
|
|
269
|
+
return r * Bt;
|
|
270
270
|
case "seconds":
|
|
271
271
|
case "second":
|
|
272
272
|
case "secs":
|
|
273
273
|
case "sec":
|
|
274
274
|
case "s":
|
|
275
|
-
return r *
|
|
275
|
+
return r * Rt;
|
|
276
276
|
case "milliseconds":
|
|
277
277
|
case "millisecond":
|
|
278
278
|
case "msecs":
|
|
@@ -285,18 +285,18 @@ function zr(t) {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
return t >=
|
|
288
|
+
function Vr(t) {
|
|
289
|
+
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
290
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
291
|
+
function $r(t) {
|
|
292
|
+
return Dt(t, Lt, "day") || Dt(t, _t, "hour") || Dt(t, Bt, "minute") || Dt(t, Rt, "second") || t + " ms";
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Dt(t, e, r) {
|
|
295
295
|
if (!(t < e))
|
|
296
296
|
return t < e * 1.5 ? Math.floor(t / e) + " " + r : Math.ceil(t / e) + " " + r + "s";
|
|
297
297
|
}
|
|
298
298
|
(function(t, e) {
|
|
299
|
-
e = t.exports = n.debug = n.default = n, e.coerce =
|
|
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
300
|
function r(c) {
|
|
301
301
|
var l = 0, p;
|
|
302
302
|
for (p in c)
|
|
@@ -307,8 +307,8 @@ function Pt(t, e, r) {
|
|
|
307
307
|
var l;
|
|
308
308
|
function p() {
|
|
309
309
|
if (p.enabled) {
|
|
310
|
-
var a = p, s = +/* @__PURE__ */ new Date(),
|
|
311
|
-
a.diff =
|
|
310
|
+
var a = p, s = +/* @__PURE__ */ new Date(), d = s - (l || s);
|
|
311
|
+
a.diff = d, a.prev = l, a.curr = s, l = s;
|
|
312
312
|
for (var y = new Array(arguments.length), g = 0; g < y.length; g++)
|
|
313
313
|
y[g] = arguments[g];
|
|
314
314
|
y[0] = e.coerce(y[0]), typeof y[0] != "string" && y.unshift("%O");
|
|
@@ -359,13 +359,13 @@ function Pt(t, e, r) {
|
|
|
359
359
|
return !0;
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function f(c) {
|
|
363
363
|
return c instanceof Error ? c.stack || c.message : c;
|
|
364
364
|
}
|
|
365
|
-
})(
|
|
366
|
-
var
|
|
365
|
+
})(de, de.exports);
|
|
366
|
+
var Gr = de.exports;
|
|
367
367
|
(function(t, e) {
|
|
368
|
-
e = t.exports =
|
|
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
369
|
"#0000CC",
|
|
370
370
|
"#0000FF",
|
|
371
371
|
"#0033CC",
|
|
@@ -450,40 +450,40 @@ var Kr = le.exports;
|
|
|
450
450
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
|
|
451
451
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
452
452
|
}
|
|
453
|
-
e.formatters.j = function(
|
|
453
|
+
e.formatters.j = function(f) {
|
|
454
454
|
try {
|
|
455
|
-
return JSON.stringify(
|
|
455
|
+
return JSON.stringify(f);
|
|
456
456
|
} catch (c) {
|
|
457
457
|
return "[UnexpectedJSONParseError]: " + c.message;
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
|
-
function n(
|
|
460
|
+
function n(f) {
|
|
461
461
|
var c = this.useColors;
|
|
462
|
-
if (
|
|
462
|
+
if (f[0] = (c ? "%c" : "") + this.namespace + (c ? " %c" : " ") + f[0] + (c ? "%c " : " ") + "+" + e.humanize(this.diff), !!c) {
|
|
463
463
|
var l = "color: " + this.color;
|
|
464
|
-
|
|
464
|
+
f.splice(1, 0, l, "color: inherit");
|
|
465
465
|
var p = 0, a = 0;
|
|
466
|
-
|
|
466
|
+
f[0].replace(/%[a-zA-Z%]/g, function(s) {
|
|
467
467
|
s !== "%%" && (p++, s === "%c" && (a = p));
|
|
468
|
-
}),
|
|
468
|
+
}), f.splice(a, 0, l);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
function o() {
|
|
472
472
|
return typeof console == "object" && console.log && Function.prototype.apply.call(console.log, console, arguments);
|
|
473
473
|
}
|
|
474
|
-
function i(
|
|
474
|
+
function i(f) {
|
|
475
475
|
try {
|
|
476
|
-
|
|
476
|
+
f == null ? e.storage.removeItem("debug") : e.storage.debug = f;
|
|
477
477
|
} catch {
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
function u() {
|
|
481
|
-
var
|
|
481
|
+
var f;
|
|
482
482
|
try {
|
|
483
|
-
|
|
483
|
+
f = e.storage.debug;
|
|
484
484
|
} catch {
|
|
485
485
|
}
|
|
486
|
-
return !
|
|
486
|
+
return !f && typeof process < "u" && "env" in process && (f = process.env.DEBUG), f;
|
|
487
487
|
}
|
|
488
488
|
e.enable(u());
|
|
489
489
|
function h() {
|
|
@@ -492,15 +492,15 @@ var Kr = le.exports;
|
|
|
492
492
|
} catch {
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
})(
|
|
496
|
-
var lt =
|
|
497
|
-
function
|
|
495
|
+
})(fe, fe.exports);
|
|
496
|
+
var lt = fe.exports, Yr = or, De = lt("socket.io-client:url"), Qr = Zr;
|
|
497
|
+
function Zr(t, e) {
|
|
498
498
|
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) || (
|
|
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
500
|
var n = r.host.indexOf(":") !== -1, o = n ? "[" + r.host + "]" : r.host;
|
|
501
501
|
return r.id = r.protocol + "://" + o + ":" + r.port, r.href = r.protocol + "://" + o + (e && e.port === r.port ? "" : ":" + r.port), r;
|
|
502
502
|
}
|
|
503
|
-
var
|
|
503
|
+
var Xt = {}, sr = { exports: {} };
|
|
504
504
|
(function(t) {
|
|
505
505
|
t.exports = e;
|
|
506
506
|
function e(n) {
|
|
@@ -548,42 +548,42 @@ var Kt = {}, Qe = { exports: {} };
|
|
|
548
548
|
}, e.prototype.hasListeners = function(n) {
|
|
549
549
|
return !!this.listeners(n).length;
|
|
550
550
|
};
|
|
551
|
-
})(
|
|
552
|
-
var St =
|
|
553
|
-
return
|
|
554
|
-
},
|
|
551
|
+
})(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) {
|
|
555
555
|
return typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t.buffer instanceof ArrayBuffer;
|
|
556
556
|
};
|
|
557
|
-
function
|
|
558
|
-
return
|
|
557
|
+
function on(t) {
|
|
558
|
+
return en && Buffer.isBuffer(t) || rn && (t instanceof ArrayBuffer || nn(t));
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
|
|
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
|
+
Wt.deconstructPacket = function(t) {
|
|
562
562
|
var e = [], r = t.data, n = t;
|
|
563
|
-
return n.data =
|
|
563
|
+
return n.data = ye(r, e), n.attachments = e.length, { packet: n, buffers: e };
|
|
564
564
|
};
|
|
565
|
-
function
|
|
565
|
+
function ye(t, e) {
|
|
566
566
|
if (!t)
|
|
567
567
|
return t;
|
|
568
|
-
if (
|
|
568
|
+
if (ar(t)) {
|
|
569
569
|
var r = { _placeholder: !0, num: e.length };
|
|
570
570
|
return e.push(t), r;
|
|
571
|
-
} else if (
|
|
571
|
+
} else if (we(t)) {
|
|
572
572
|
for (var n = new Array(t.length), o = 0; o < t.length; o++)
|
|
573
|
-
n[o] =
|
|
573
|
+
n[o] = ye(t[o], e);
|
|
574
574
|
return n;
|
|
575
575
|
} else if (typeof t == "object" && !(t instanceof Date)) {
|
|
576
576
|
var n = {};
|
|
577
577
|
for (var i in t)
|
|
578
|
-
n[i] =
|
|
578
|
+
n[i] = ye(t[i], e);
|
|
579
579
|
return n;
|
|
580
580
|
}
|
|
581
581
|
return t;
|
|
582
582
|
}
|
|
583
|
-
|
|
584
|
-
return t.data =
|
|
583
|
+
Wt.reconstructPacket = function(t, e) {
|
|
584
|
+
return t.data = ge(t.data, e), t.attachments = void 0, t;
|
|
585
585
|
};
|
|
586
|
-
function
|
|
586
|
+
function ge(t, e) {
|
|
587
587
|
if (!t)
|
|
588
588
|
return t;
|
|
589
589
|
if (t && t._placeholder === !0) {
|
|
@@ -591,28 +591,28 @@ function de(t, e) {
|
|
|
591
591
|
if (r)
|
|
592
592
|
return e[t.num];
|
|
593
593
|
throw new Error("illegal attachments");
|
|
594
|
-
} else if (
|
|
594
|
+
} else if (we(t))
|
|
595
595
|
for (var n = 0; n < t.length; n++)
|
|
596
|
-
t[n] =
|
|
596
|
+
t[n] = ge(t[n], e);
|
|
597
597
|
else if (typeof t == "object")
|
|
598
598
|
for (var o in t)
|
|
599
|
-
t[o] =
|
|
599
|
+
t[o] = ge(t[o], e);
|
|
600
600
|
return t;
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
Wt.removeBlobs = function(t, e) {
|
|
603
603
|
function r(i, u, h) {
|
|
604
604
|
if (!i)
|
|
605
605
|
return i;
|
|
606
|
-
if (
|
|
606
|
+
if (sn && i instanceof Blob || an && i instanceof File) {
|
|
607
607
|
n++;
|
|
608
|
-
var
|
|
609
|
-
|
|
608
|
+
var f = new FileReader();
|
|
609
|
+
f.onload = function() {
|
|
610
610
|
h ? h[u] = this.result : o = this.result, --n || e(o);
|
|
611
|
-
},
|
|
612
|
-
} else if (
|
|
611
|
+
}, f.readAsArrayBuffer(i);
|
|
612
|
+
} else if (we(i))
|
|
613
613
|
for (var c = 0; c < i.length; c++)
|
|
614
614
|
r(i[c], c, i);
|
|
615
|
-
else if (typeof i == "object" && !
|
|
615
|
+
else if (typeof i == "object" && !ar(i))
|
|
616
616
|
for (var l in i)
|
|
617
617
|
r(i[l], l, i);
|
|
618
618
|
}
|
|
@@ -620,7 +620,7 @@ Ht.removeBlobs = function(t, e) {
|
|
|
620
620
|
r(o), n || e(o);
|
|
621
621
|
};
|
|
622
622
|
(function(t) {
|
|
623
|
-
var e = lt("socket.io-parser"), r = St, n =
|
|
623
|
+
var e = lt("socket.io-parser"), r = St, n = Wt, o = Ce, i = ir;
|
|
624
624
|
t.protocol = 4, t.types = [
|
|
625
625
|
"CONNECT",
|
|
626
626
|
"DISCONNECT",
|
|
@@ -637,11 +637,11 @@ Ht.removeBlobs = function(t, e) {
|
|
|
637
637
|
if (e("encoding packet %j", g), t.BINARY_EVENT === g.type || t.BINARY_ACK === g.type)
|
|
638
638
|
l(g, w);
|
|
639
639
|
else {
|
|
640
|
-
var B =
|
|
640
|
+
var B = f(g);
|
|
641
641
|
w([B]);
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
-
function
|
|
644
|
+
function f(g) {
|
|
645
645
|
var w = "" + g.type;
|
|
646
646
|
if ((t.BINARY_EVENT === g.type || t.BINARY_ACK === g.type) && (w += g.attachments + "-"), g.nsp && g.nsp !== "/" && (w += g.nsp + ","), g.id != null && (w += g.id), g.data != null) {
|
|
647
647
|
var B = c(g.data);
|
|
@@ -661,7 +661,7 @@ Ht.removeBlobs = function(t, e) {
|
|
|
661
661
|
}
|
|
662
662
|
function l(g, w) {
|
|
663
663
|
function B(_) {
|
|
664
|
-
var b = n.deconstructPacket(_), S =
|
|
664
|
+
var b = n.deconstructPacket(_), S = f(b.packet), m = b.buffers;
|
|
665
665
|
m.unshift(S), w(m);
|
|
666
666
|
}
|
|
667
667
|
n.removeBlobs(g, B);
|
|
@@ -674,7 +674,7 @@ Ht.removeBlobs = function(t, e) {
|
|
|
674
674
|
if (typeof g == "string") {
|
|
675
675
|
if (this.reconstructor)
|
|
676
676
|
throw new Error("got plaintext data when reconstructing a packet");
|
|
677
|
-
w = a(g), t.BINARY_EVENT === w.type || t.BINARY_ACK === w.type ? (this.reconstructor = new
|
|
677
|
+
w = a(g), t.BINARY_EVENT === w.type || t.BINARY_ACK === w.type ? (this.reconstructor = new d(w), this.reconstructor.reconPack.attachments === 0 && this.emit("decoded", w)) : this.emit("decoded", w);
|
|
678
678
|
} else if (i(g) || g.base64)
|
|
679
679
|
if (this.reconstructor)
|
|
680
680
|
w = this.reconstructor.takeBinaryData(g), w && (this.reconstructor = null, this.emit("decoded", w));
|
|
@@ -738,16 +738,16 @@ Ht.removeBlobs = function(t, e) {
|
|
|
738
738
|
p.prototype.destroy = function() {
|
|
739
739
|
this.reconstructor && this.reconstructor.finishedReconstruction();
|
|
740
740
|
};
|
|
741
|
-
function
|
|
741
|
+
function d(g) {
|
|
742
742
|
this.reconPack = g, this.buffers = [];
|
|
743
743
|
}
|
|
744
|
-
|
|
744
|
+
d.prototype.takeBinaryData = function(g) {
|
|
745
745
|
if (this.buffers.push(g), this.buffers.length === this.reconPack.attachments) {
|
|
746
746
|
var w = n.reconstructPacket(this.reconPack, this.buffers);
|
|
747
747
|
return this.finishedReconstruction(), w;
|
|
748
748
|
}
|
|
749
749
|
return null;
|
|
750
|
-
},
|
|
750
|
+
}, d.prototype.finishedReconstruction = function() {
|
|
751
751
|
this.reconPack = null, this.buffers = [];
|
|
752
752
|
};
|
|
753
753
|
function y(g) {
|
|
@@ -756,19 +756,19 @@ Ht.removeBlobs = function(t, e) {
|
|
|
756
756
|
data: "parser error: " + g
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
})(
|
|
760
|
-
var
|
|
759
|
+
})(Xt);
|
|
760
|
+
var Se = { exports: {} }, Kt = {}, me = { exports: {} };
|
|
761
761
|
try {
|
|
762
|
-
|
|
762
|
+
me.exports = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
|
763
763
|
} catch {
|
|
764
|
-
|
|
764
|
+
me.exports = !1;
|
|
765
765
|
}
|
|
766
|
-
var
|
|
766
|
+
var cn = me.exports, Ee = function() {
|
|
767
767
|
return typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
|
|
768
|
-
}(),
|
|
768
|
+
}(), hn = cn, pn = Ee, Ae = function(t) {
|
|
769
769
|
var e = t.xdomain, r = t.xscheme, n = t.enablesXDR;
|
|
770
770
|
try {
|
|
771
|
-
if (typeof XMLHttpRequest < "u" && (!e ||
|
|
771
|
+
if (typeof XMLHttpRequest < "u" && (!e || hn))
|
|
772
772
|
return new XMLHttpRequest();
|
|
773
773
|
} catch {
|
|
774
774
|
}
|
|
@@ -779,34 +779,42 @@ var rn = ye.exports, we = function() {
|
|
|
779
779
|
}
|
|
780
780
|
if (!e)
|
|
781
781
|
try {
|
|
782
|
-
return new
|
|
782
|
+
return new pn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
|
|
783
783
|
} catch {
|
|
784
784
|
}
|
|
785
|
-
},
|
|
785
|
+
}, Te = { exports: {} }, kt = {}, un = Object.keys || function(t) {
|
|
786
786
|
var e = [], r = Object.prototype.hasOwnProperty;
|
|
787
787
|
for (var n in t)
|
|
788
788
|
r.call(t, n) && e.push(n);
|
|
789
789
|
return e;
|
|
790
|
-
},
|
|
791
|
-
function
|
|
792
|
-
if (
|
|
793
|
-
return
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
790
|
+
}, re, Pe;
|
|
791
|
+
function hr() {
|
|
792
|
+
if (Pe)
|
|
793
|
+
return re;
|
|
794
|
+
Pe = 1;
|
|
795
|
+
var t = Ce, e = Object.prototype.toString, r = typeof Blob == "function" || typeof Blob < "u" && e.call(Blob) === "[object BlobConstructor]", n = typeof File == "function" || typeof File < "u" && e.call(File) === "[object FileConstructor]";
|
|
796
|
+
re = o;
|
|
797
|
+
function o(i) {
|
|
798
|
+
if (!i || typeof i != "object")
|
|
799
|
+
return !1;
|
|
800
|
+
if (t(i)) {
|
|
801
|
+
for (var u = 0, h = i.length; u < h; u++)
|
|
802
|
+
if (o(i[u]))
|
|
803
|
+
return !0;
|
|
804
|
+
return !1;
|
|
805
|
+
}
|
|
806
|
+
if (typeof Buffer == "function" && Buffer.isBuffer && Buffer.isBuffer(i) || typeof ArrayBuffer == "function" && i instanceof ArrayBuffer || r && i instanceof Blob || n && i instanceof File)
|
|
807
|
+
return !0;
|
|
808
|
+
if (i.toJSON && typeof i.toJSON == "function" && arguments.length === 1)
|
|
809
|
+
return o(i.toJSON(), !0);
|
|
810
|
+
for (var f in i)
|
|
811
|
+
if (Object.prototype.hasOwnProperty.call(i, f) && o(i[f]))
|
|
797
812
|
return !0;
|
|
798
813
|
return !1;
|
|
799
814
|
}
|
|
800
|
-
|
|
801
|
-
return !0;
|
|
802
|
-
if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1)
|
|
803
|
-
return Mt(t.toJSON(), !0);
|
|
804
|
-
for (var n in t)
|
|
805
|
-
if (Object.prototype.hasOwnProperty.call(t, n) && Mt(t[n]))
|
|
806
|
-
return !0;
|
|
807
|
-
return !1;
|
|
815
|
+
return re;
|
|
808
816
|
}
|
|
809
|
-
var
|
|
817
|
+
var ln = function(t, e, r) {
|
|
810
818
|
var n = t.byteLength;
|
|
811
819
|
if (e = e || 0, r = r || n, t.slice)
|
|
812
820
|
return t.slice(e, r);
|
|
@@ -815,31 +823,31 @@ var pn = function(t, e, r) {
|
|
|
815
823
|
for (var o = new Uint8Array(t), i = new Uint8Array(r - e), u = e, h = 0; u < r; u++, h++)
|
|
816
824
|
i[h] = o[u];
|
|
817
825
|
return i.buffer;
|
|
818
|
-
},
|
|
819
|
-
function
|
|
826
|
+
}, fn = dn;
|
|
827
|
+
function dn(t, e, r) {
|
|
820
828
|
var n = !1;
|
|
821
|
-
return r = r ||
|
|
829
|
+
return r = r || yn, o.count = t, t === 0 ? e() : o;
|
|
822
830
|
function o(i, u) {
|
|
823
831
|
if (o.count <= 0)
|
|
824
832
|
throw new Error("after called too many times");
|
|
825
833
|
--o.count, i ? (n = !0, e(i), e = r) : o.count === 0 && !n && e(null, u);
|
|
826
834
|
}
|
|
827
835
|
}
|
|
828
|
-
function
|
|
836
|
+
function yn() {
|
|
829
837
|
}
|
|
830
838
|
/*! https://mths.be/utf8js v2.1.2 by @mathias */
|
|
831
839
|
var dt = String.fromCharCode;
|
|
832
|
-
function
|
|
840
|
+
function pr(t) {
|
|
833
841
|
for (var e = [], r = 0, n = t.length, o, i; r < n; )
|
|
834
842
|
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);
|
|
835
843
|
return e;
|
|
836
844
|
}
|
|
837
|
-
function
|
|
845
|
+
function gn(t) {
|
|
838
846
|
for (var e = t.length, r = -1, n, o = ""; ++r < e; )
|
|
839
847
|
n = t[r], n > 65535 && (n -= 65536, o += dt(n >>> 10 & 1023 | 55296), n = 56320 | n & 1023), o += dt(n);
|
|
840
848
|
return o;
|
|
841
849
|
}
|
|
842
|
-
function
|
|
850
|
+
function ur(t, e) {
|
|
843
851
|
if (t >= 55296 && t <= 57343) {
|
|
844
852
|
if (e)
|
|
845
853
|
throw Error(
|
|
@@ -852,33 +860,33 @@ function sr(t, e) {
|
|
|
852
860
|
function ne(t, e) {
|
|
853
861
|
return dt(t >> e & 63 | 128);
|
|
854
862
|
}
|
|
855
|
-
function
|
|
863
|
+
function mn(t, e) {
|
|
856
864
|
if (!(t & 4294967168))
|
|
857
865
|
return dt(t);
|
|
858
866
|
var r = "";
|
|
859
|
-
return t & 4294965248 ? t & 4294901760 ? t & 4292870144 || (r = dt(t >> 18 & 7 | 240), r += ne(t, 12), r += ne(t, 6)) : (
|
|
867
|
+
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;
|
|
860
868
|
}
|
|
861
|
-
function
|
|
869
|
+
function vn(t, e) {
|
|
862
870
|
e = e || {};
|
|
863
|
-
for (var r = e.strict !== !1, n =
|
|
864
|
-
u = n[i], h +=
|
|
871
|
+
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);
|
|
865
873
|
return h;
|
|
866
874
|
}
|
|
867
875
|
function bt() {
|
|
868
|
-
if (yt >=
|
|
876
|
+
if (yt >= Mt)
|
|
869
877
|
throw Error("Invalid byte index");
|
|
870
|
-
var t =
|
|
878
|
+
var t = jt[yt] & 255;
|
|
871
879
|
if (yt++, (t & 192) == 128)
|
|
872
880
|
return t & 63;
|
|
873
881
|
throw Error("Invalid continuation byte");
|
|
874
882
|
}
|
|
875
|
-
function
|
|
883
|
+
function kn(t) {
|
|
876
884
|
var e, r, n, o, i;
|
|
877
|
-
if (yt >
|
|
885
|
+
if (yt > Mt)
|
|
878
886
|
throw Error("Invalid byte index");
|
|
879
|
-
if (yt ==
|
|
887
|
+
if (yt == Mt)
|
|
880
888
|
return !1;
|
|
881
|
-
if (e =
|
|
889
|
+
if (e = jt[yt] & 255, yt++, !(e & 128))
|
|
882
890
|
return e;
|
|
883
891
|
if ((e & 224) == 192) {
|
|
884
892
|
if (r = bt(), i = (e & 31) << 6 | r, i >= 128)
|
|
@@ -887,49 +895,49 @@ function mn(t) {
|
|
|
887
895
|
}
|
|
888
896
|
if ((e & 240) == 224) {
|
|
889
897
|
if (r = bt(), n = bt(), i = (e & 15) << 12 | r << 6 | n, i >= 2048)
|
|
890
|
-
return
|
|
898
|
+
return ur(i, t) ? i : 65533;
|
|
891
899
|
throw Error("Invalid continuation byte");
|
|
892
900
|
}
|
|
893
901
|
if ((e & 248) == 240 && (r = bt(), n = bt(), o = bt(), i = (e & 7) << 18 | r << 12 | n << 6 | o, i >= 65536 && i <= 1114111))
|
|
894
902
|
return i;
|
|
895
903
|
throw Error("Invalid UTF-8 detected");
|
|
896
904
|
}
|
|
897
|
-
var
|
|
898
|
-
function
|
|
905
|
+
var jt, Mt, yt;
|
|
906
|
+
function bn(t, e) {
|
|
899
907
|
e = e || {};
|
|
900
908
|
var r = e.strict !== !1;
|
|
901
|
-
|
|
902
|
-
for (var n = [], o; (o =
|
|
909
|
+
jt = pr(t), Mt = jt.length, yt = 0;
|
|
910
|
+
for (var n = [], o; (o = kn(r)) !== !1; )
|
|
903
911
|
n.push(o);
|
|
904
|
-
return
|
|
912
|
+
return gn(n);
|
|
905
913
|
}
|
|
906
|
-
var
|
|
914
|
+
var Cn = {
|
|
907
915
|
version: "2.1.2",
|
|
908
|
-
encode:
|
|
909
|
-
decode:
|
|
910
|
-
}, oe = {},
|
|
911
|
-
function
|
|
912
|
-
return
|
|
916
|
+
encode: vn,
|
|
917
|
+
decode: bn
|
|
918
|
+
}, oe = {}, Fe;
|
|
919
|
+
function wn() {
|
|
920
|
+
return Fe || (Fe = 1, function(t) {
|
|
913
921
|
oe.encode = function(e) {
|
|
914
922
|
var r = new Uint8Array(e), n, o = r.length, i = "";
|
|
915
923
|
for (n = 0; n < o; n += 3)
|
|
916
924
|
i += t[r[n] >> 2], i += t[(r[n] & 3) << 4 | r[n + 1] >> 4], i += t[(r[n + 1] & 15) << 2 | r[n + 2] >> 6], i += t[r[n + 2] & 63];
|
|
917
925
|
return o % 3 === 2 ? i = i.substring(0, i.length - 1) + "=" : o % 3 === 1 && (i = i.substring(0, i.length - 2) + "=="), i;
|
|
918
926
|
}, oe.decode = function(e) {
|
|
919
|
-
var r = e.length * 0.75, n = e.length, o, i = 0, u, h,
|
|
927
|
+
var r = e.length * 0.75, n = e.length, o, i = 0, u, h, f, c;
|
|
920
928
|
e[e.length - 1] === "=" && (r--, e[e.length - 2] === "=" && r--);
|
|
921
929
|
var l = new ArrayBuffer(r), p = new Uint8Array(l);
|
|
922
930
|
for (o = 0; o < n; o += 4)
|
|
923
|
-
u = t.indexOf(e[o]), h = t.indexOf(e[o + 1]),
|
|
931
|
+
u = t.indexOf(e[o]), h = t.indexOf(e[o + 1]), f = t.indexOf(e[o + 2]), c = t.indexOf(e[o + 3]), p[i++] = u << 2 | h >> 4, p[i++] = (h & 15) << 4 | f >> 2, p[i++] = (f & 3) << 6 | c & 63;
|
|
924
932
|
return l;
|
|
925
933
|
};
|
|
926
934
|
}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")), oe;
|
|
927
935
|
}
|
|
928
|
-
var se,
|
|
929
|
-
function
|
|
930
|
-
if (
|
|
936
|
+
var se, je;
|
|
937
|
+
function Sn() {
|
|
938
|
+
if (je)
|
|
931
939
|
return se;
|
|
932
|
-
|
|
940
|
+
je = 1;
|
|
933
941
|
var t = typeof t < "u" ? t : typeof WebKitBlobBuilder < "u" ? WebKitBlobBuilder : typeof MSBlobBuilder < "u" ? MSBlobBuilder : typeof MozBlobBuilder < "u" ? MozBlobBuilder : !1, e = function() {
|
|
934
942
|
try {
|
|
935
943
|
var h = new Blob(["hi"]);
|
|
@@ -946,36 +954,36 @@ function Cn() {
|
|
|
946
954
|
}
|
|
947
955
|
}(), n = t && t.prototype.append && t.prototype.getBlob;
|
|
948
956
|
function o(h) {
|
|
949
|
-
return h.map(function(
|
|
950
|
-
if (
|
|
951
|
-
var c =
|
|
952
|
-
if (
|
|
953
|
-
var l = new Uint8Array(
|
|
954
|
-
l.set(new Uint8Array(c,
|
|
957
|
+
return h.map(function(f) {
|
|
958
|
+
if (f.buffer instanceof ArrayBuffer) {
|
|
959
|
+
var c = f.buffer;
|
|
960
|
+
if (f.byteLength !== c.byteLength) {
|
|
961
|
+
var l = new Uint8Array(f.byteLength);
|
|
962
|
+
l.set(new Uint8Array(c, f.byteOffset, f.byteLength)), c = l.buffer;
|
|
955
963
|
}
|
|
956
964
|
return c;
|
|
957
965
|
}
|
|
958
|
-
return
|
|
966
|
+
return f;
|
|
959
967
|
});
|
|
960
968
|
}
|
|
961
|
-
function i(h,
|
|
962
|
-
|
|
969
|
+
function i(h, f) {
|
|
970
|
+
f = f || {};
|
|
963
971
|
var c = new t();
|
|
964
972
|
return o(h).forEach(function(l) {
|
|
965
973
|
c.append(l);
|
|
966
|
-
}),
|
|
974
|
+
}), f.type ? c.getBlob(f.type) : c.getBlob();
|
|
967
975
|
}
|
|
968
|
-
function u(h,
|
|
969
|
-
return new Blob(o(h),
|
|
976
|
+
function u(h, f) {
|
|
977
|
+
return new Blob(o(h), f || {});
|
|
970
978
|
}
|
|
971
979
|
return typeof Blob < "u" && (i.prototype = Blob.prototype, u.prototype = Blob.prototype), se = /* @__PURE__ */ function() {
|
|
972
980
|
return e ? r ? Blob : u : n ? i : void 0;
|
|
973
981
|
}(), se;
|
|
974
982
|
}
|
|
975
983
|
(function(t) {
|
|
976
|
-
var e =
|
|
977
|
-
typeof ArrayBuffer < "u" && (u =
|
|
978
|
-
var h = typeof navigator < "u" && /Android/i.test(navigator.userAgent),
|
|
984
|
+
var e = un, r = hr(), n = ln, o = fn, i = Cn, u;
|
|
985
|
+
typeof ArrayBuffer < "u" && (u = wn());
|
|
986
|
+
var h = typeof navigator < "u" && /Android/i.test(navigator.userAgent), f = typeof navigator < "u" && /PhantomJS/i.test(navigator.userAgent), c = h || f;
|
|
979
987
|
t.protocol = 3;
|
|
980
988
|
var l = t.packets = {
|
|
981
989
|
open: 0,
|
|
@@ -985,7 +993,7 @@ function Cn() {
|
|
|
985
993
|
message: 4,
|
|
986
994
|
upgrade: 5,
|
|
987
995
|
noop: 6
|
|
988
|
-
}, p = e(l), a = { type: "error", data: "parser error" }, s =
|
|
996
|
+
}, p = e(l), a = { type: "error", data: "parser error" }, s = Sn();
|
|
989
997
|
t.encodePacket = function(b, S, m, C) {
|
|
990
998
|
typeof S == "function" && (C = S, S = !1), typeof m == "function" && (C = m, m = null);
|
|
991
999
|
var E = b.data === void 0 ? void 0 : b.data.buffer || b.data;
|
|
@@ -994,11 +1002,11 @@ function Cn() {
|
|
|
994
1002
|
if (typeof s < "u" && E instanceof s)
|
|
995
1003
|
return w(b, S, C);
|
|
996
1004
|
if (E && E.base64)
|
|
997
|
-
return
|
|
1005
|
+
return d(b, C);
|
|
998
1006
|
var v = l[b.type];
|
|
999
1007
|
return b.data !== void 0 && (v += m ? i.encode(String(b.data), { strict: !1 }) : String(b.data)), C("" + v);
|
|
1000
1008
|
};
|
|
1001
|
-
function
|
|
1009
|
+
function d(b, S) {
|
|
1002
1010
|
var m = "b" + t.packets[b.type] + b.data.data;
|
|
1003
1011
|
return S(m);
|
|
1004
1012
|
}
|
|
@@ -1203,11 +1211,11 @@ function Cn() {
|
|
|
1203
1211
|
});
|
|
1204
1212
|
};
|
|
1205
1213
|
})(kt);
|
|
1206
|
-
var ie,
|
|
1207
|
-
function
|
|
1208
|
-
if (
|
|
1214
|
+
var ie, Me;
|
|
1215
|
+
function Ne() {
|
|
1216
|
+
if (Me)
|
|
1209
1217
|
return ie;
|
|
1210
|
-
|
|
1218
|
+
Me = 1;
|
|
1211
1219
|
var t = kt, e = St;
|
|
1212
1220
|
ie = r;
|
|
1213
1221
|
function r(n) {
|
|
@@ -1236,55 +1244,56 @@ function Ae() {
|
|
|
1236
1244
|
this.readyState = "closed", this.emit("close");
|
|
1237
1245
|
}, ie;
|
|
1238
1246
|
}
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
};
|
|
1253
|
-
|
|
1247
|
+
var ae = {}, qe;
|
|
1248
|
+
function Ht() {
|
|
1249
|
+
return qe || (qe = 1, ae.encode = function(t) {
|
|
1250
|
+
var e = "";
|
|
1251
|
+
for (var r in t)
|
|
1252
|
+
t.hasOwnProperty(r) && (e.length && (e += "&"), e += encodeURIComponent(r) + "=" + encodeURIComponent(t[r]));
|
|
1253
|
+
return e;
|
|
1254
|
+
}, ae.decode = function(t) {
|
|
1255
|
+
for (var e = {}, r = t.split("&"), n = 0, o = r.length; n < o; n++) {
|
|
1256
|
+
var i = r[n].split("=");
|
|
1257
|
+
e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
|
|
1258
|
+
}
|
|
1259
|
+
return e;
|
|
1260
|
+
}), ae;
|
|
1261
|
+
}
|
|
1262
|
+
var Jt = function(t, e) {
|
|
1254
1263
|
var r = function() {
|
|
1255
1264
|
};
|
|
1256
1265
|
r.prototype = e.prototype, t.prototype = new r(), t.prototype.constructor = t;
|
|
1257
|
-
},
|
|
1258
|
-
function
|
|
1266
|
+
}, lr = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), qt = 64, fr = {}, ze = 0, gt = 0, Xe;
|
|
1267
|
+
function ve(t) {
|
|
1259
1268
|
var e = "";
|
|
1260
1269
|
do
|
|
1261
|
-
e =
|
|
1270
|
+
e = lr[t % qt] + e, t = Math.floor(t / qt);
|
|
1262
1271
|
while (t > 0);
|
|
1263
1272
|
return e;
|
|
1264
1273
|
}
|
|
1265
|
-
function
|
|
1274
|
+
function En(t) {
|
|
1266
1275
|
var e = 0;
|
|
1267
1276
|
for (gt = 0; gt < t.length; gt++)
|
|
1268
|
-
e = e *
|
|
1277
|
+
e = e * qt + fr[t.charAt(gt)];
|
|
1269
1278
|
return e;
|
|
1270
1279
|
}
|
|
1271
|
-
function
|
|
1272
|
-
var t =
|
|
1273
|
-
return t !==
|
|
1280
|
+
function Oe() {
|
|
1281
|
+
var t = ve(+/* @__PURE__ */ new Date());
|
|
1282
|
+
return t !== Xe ? (ze = 0, Xe = t) : t + "." + ve(ze++);
|
|
1274
1283
|
}
|
|
1275
|
-
for (; gt <
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
var
|
|
1280
|
-
var t =
|
|
1284
|
+
for (; gt < qt; gt++)
|
|
1285
|
+
fr[lr[gt]] = gt;
|
|
1286
|
+
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() {
|
|
1289
|
+
var t = Ae, e = new t({ xdomain: !1 });
|
|
1281
1290
|
return e.responseType != null;
|
|
1282
1291
|
}();
|
|
1283
1292
|
function pt(t) {
|
|
1284
1293
|
var e = t && t.forceBase64;
|
|
1285
|
-
(!
|
|
1294
|
+
(!On || e) && (this.supportsBinary = !1), yr.call(this, t);
|
|
1286
1295
|
}
|
|
1287
|
-
|
|
1296
|
+
Tn(pt, yr);
|
|
1288
1297
|
pt.prototype.name = "polling";
|
|
1289
1298
|
pt.prototype.doOpen = function() {
|
|
1290
1299
|
this.poll();
|
|
@@ -1316,7 +1325,7 @@ pt.prototype.onData = function(t) {
|
|
|
1316
1325
|
return e.onClose(), !1;
|
|
1317
1326
|
e.onPacket(n);
|
|
1318
1327
|
};
|
|
1319
|
-
|
|
1328
|
+
gr.decodePayload(t, this.socket.binaryType, r), this.readyState !== "closed" && (this.polling = !1, this.emit("pollComplete"), this.readyState === "open" ? this.poll() : ht('ignoring poll - transport state "%s"', this.readyState));
|
|
1320
1329
|
};
|
|
1321
1330
|
pt.prototype.doClose = function() {
|
|
1322
1331
|
var t = this;
|
|
@@ -1331,40 +1340,40 @@ pt.prototype.write = function(t) {
|
|
|
1331
1340
|
var r = function() {
|
|
1332
1341
|
e.writable = !0, e.emit("drain");
|
|
1333
1342
|
};
|
|
1334
|
-
|
|
1343
|
+
gr.encodePayload(t, this.supportsBinary, function(n) {
|
|
1335
1344
|
e.doWrite(n, r);
|
|
1336
1345
|
});
|
|
1337
1346
|
};
|
|
1338
1347
|
pt.prototype.uri = function() {
|
|
1339
1348
|
var t = this.query || {}, e = this.secure ? "https" : "http", r = "";
|
|
1340
|
-
this.timestampRequests !== !1 && (t[this.timestampParam] =
|
|
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);
|
|
1341
1350
|
var n = this.hostname.indexOf(":") !== -1;
|
|
1342
1351
|
return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
|
|
1343
1352
|
};
|
|
1344
|
-
var
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
function
|
|
1353
|
+
var xn = Ae, vr = mr, In = St, Rn = Jt, ke = lt("engine.io-client:polling-xhr"), Bn = Ee;
|
|
1354
|
+
Te.exports = Et;
|
|
1355
|
+
Te.exports.Request = Y;
|
|
1356
|
+
function We() {
|
|
1348
1357
|
}
|
|
1349
|
-
function
|
|
1350
|
-
if (
|
|
1358
|
+
function Et(t) {
|
|
1359
|
+
if (vr.call(this, t), this.requestTimeout = t.requestTimeout, this.extraHeaders = t.extraHeaders, typeof location < "u") {
|
|
1351
1360
|
var e = location.protocol === "https:", r = location.port;
|
|
1352
1361
|
r || (r = e ? 443 : 80), this.xd = typeof location < "u" && t.hostname !== location.hostname || r !== t.port, this.xs = t.secure !== e;
|
|
1353
1362
|
}
|
|
1354
1363
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1364
|
+
Rn(Et, vr);
|
|
1365
|
+
Et.prototype.supportsBinary = !0;
|
|
1366
|
+
Et.prototype.request = function(t) {
|
|
1358
1367
|
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);
|
|
1359
1368
|
};
|
|
1360
|
-
|
|
1369
|
+
Et.prototype.doWrite = function(t, e) {
|
|
1361
1370
|
var r = typeof t != "string" && t !== void 0, n = this.request({ method: "POST", data: t, isBinary: r }), o = this;
|
|
1362
1371
|
n.on("success", e), n.on("error", function(i) {
|
|
1363
1372
|
o.onError("xhr post error", i);
|
|
1364
1373
|
}), this.sendXhr = n;
|
|
1365
1374
|
};
|
|
1366
|
-
|
|
1367
|
-
|
|
1375
|
+
Et.prototype.doPoll = function() {
|
|
1376
|
+
ke("xhr poll");
|
|
1368
1377
|
var t = this.request(), e = this;
|
|
1369
1378
|
t.on("data", function(r) {
|
|
1370
1379
|
e.onData(r);
|
|
@@ -1375,13 +1384,13 @@ At.prototype.doPoll = function() {
|
|
|
1375
1384
|
function Y(t) {
|
|
1376
1385
|
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();
|
|
1377
1386
|
}
|
|
1378
|
-
|
|
1387
|
+
In(Y.prototype);
|
|
1379
1388
|
Y.prototype.create = function() {
|
|
1380
1389
|
var t = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
1381
1390
|
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;
|
|
1382
|
-
var e = this.xhr = new
|
|
1391
|
+
var e = this.xhr = new xn(t), r = this;
|
|
1383
1392
|
try {
|
|
1384
|
-
|
|
1393
|
+
ke("xhr open %s: %s", this.method, this.uri), e.open(this.method, this.uri, this.async);
|
|
1385
1394
|
try {
|
|
1386
1395
|
if (this.extraHeaders) {
|
|
1387
1396
|
e.setDisableHeaderCheck && e.setDisableHeaderCheck(!0);
|
|
@@ -1413,7 +1422,7 @@ Y.prototype.create = function() {
|
|
|
1413
1422
|
e.readyState === 4 && (e.status === 200 || e.status === 1223 ? r.onLoad() : setTimeout(function() {
|
|
1414
1423
|
r.onError(typeof e.status == "number" ? e.status : 0);
|
|
1415
1424
|
}, 0));
|
|
1416
|
-
},
|
|
1425
|
+
}, ke("xhr data %s", this.data), e.send(this.data);
|
|
1417
1426
|
} catch (o) {
|
|
1418
1427
|
setTimeout(function() {
|
|
1419
1428
|
r.onError(o);
|
|
@@ -1433,7 +1442,7 @@ Y.prototype.onError = function(t) {
|
|
|
1433
1442
|
};
|
|
1434
1443
|
Y.prototype.cleanup = function(t) {
|
|
1435
1444
|
if (!(typeof this.xhr > "u" || this.xhr === null)) {
|
|
1436
|
-
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror =
|
|
1445
|
+
if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = We : this.xhr.onreadystatechange = We, t)
|
|
1437
1446
|
try {
|
|
1438
1447
|
this.xhr.abort();
|
|
1439
1448
|
} catch {
|
|
@@ -1465,34 +1474,34 @@ Y.requestsCount = 0;
|
|
|
1465
1474
|
Y.requests = {};
|
|
1466
1475
|
if (typeof document < "u") {
|
|
1467
1476
|
if (typeof attachEvent == "function")
|
|
1468
|
-
attachEvent("onunload",
|
|
1477
|
+
attachEvent("onunload", Ke);
|
|
1469
1478
|
else if (typeof addEventListener == "function") {
|
|
1470
|
-
var
|
|
1471
|
-
addEventListener(
|
|
1479
|
+
var _n = "onpagehide" in Bn ? "pagehide" : "unload";
|
|
1480
|
+
addEventListener(_n, Ke, !1);
|
|
1472
1481
|
}
|
|
1473
1482
|
}
|
|
1474
|
-
function
|
|
1483
|
+
function Ke() {
|
|
1475
1484
|
for (var t in Y.requests)
|
|
1476
1485
|
Y.requests.hasOwnProperty(t) && Y.requests[t].abort();
|
|
1477
1486
|
}
|
|
1478
|
-
var
|
|
1479
|
-
function
|
|
1487
|
+
var Ln = Te.exports, xe = mr, Un = Jt, He = Ee, Dn = At, Pn = /\n/g, Fn = /\\n/g, Pt;
|
|
1488
|
+
function jn() {
|
|
1480
1489
|
}
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1490
|
+
function At(t) {
|
|
1491
|
+
xe.call(this, t), this.query = this.query || {}, Pt || (Pt = He.___eio = He.___eio || []), this.index = Pt.length;
|
|
1483
1492
|
var e = this;
|
|
1484
|
-
|
|
1493
|
+
Pt.push(function(r) {
|
|
1485
1494
|
e.onData(r);
|
|
1486
1495
|
}), this.query.j = this.index, typeof addEventListener == "function" && addEventListener("beforeunload", function() {
|
|
1487
|
-
e.script && (e.script.onerror =
|
|
1496
|
+
e.script && (e.script.onerror = jn);
|
|
1488
1497
|
}, !1);
|
|
1489
1498
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
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),
|
|
1499
|
+
Un(At, xe);
|
|
1500
|
+
At.prototype.supportsBinary = !1;
|
|
1501
|
+
At.prototype.doClose = function() {
|
|
1502
|
+
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);
|
|
1494
1503
|
};
|
|
1495
|
-
|
|
1504
|
+
At.prototype.doPoll = function() {
|
|
1496
1505
|
var t = this, e = document.createElement("script");
|
|
1497
1506
|
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), e.async = !0, e.src = this.uri(), e.onerror = function(o) {
|
|
1498
1507
|
t.onError("jsonp poll error", o);
|
|
@@ -1505,7 +1514,7 @@ Tt.prototype.doPoll = function() {
|
|
|
1505
1514
|
document.body.appendChild(o), document.body.removeChild(o);
|
|
1506
1515
|
}, 100);
|
|
1507
1516
|
};
|
|
1508
|
-
|
|
1517
|
+
At.prototype.doWrite = function(t, e) {
|
|
1509
1518
|
var r = this;
|
|
1510
1519
|
if (!this.form) {
|
|
1511
1520
|
var n = document.createElement("form"), o = document.createElement("textarea"), i = this.iframeId = "eio_iframe_" + this.index, u;
|
|
@@ -1513,9 +1522,9 @@ Tt.prototype.doWrite = function(t, e) {
|
|
|
1513
1522
|
}
|
|
1514
1523
|
this.form.action = this.uri();
|
|
1515
1524
|
function h() {
|
|
1516
|
-
|
|
1525
|
+
f(), e();
|
|
1517
1526
|
}
|
|
1518
|
-
function
|
|
1527
|
+
function f() {
|
|
1519
1528
|
if (r.iframe)
|
|
1520
1529
|
try {
|
|
1521
1530
|
r.form.removeChild(r.iframe);
|
|
@@ -1530,8 +1539,8 @@ Tt.prototype.doWrite = function(t, e) {
|
|
|
1530
1539
|
}
|
|
1531
1540
|
u.id = r.iframeId, r.form.appendChild(u), r.iframe = u;
|
|
1532
1541
|
}
|
|
1533
|
-
|
|
1534
|
-
`), this.area.value = t.replace(
|
|
1542
|
+
f(), t = t.replace(Fn, `\\
|
|
1543
|
+
`), this.area.value = t.replace(Pn, "\\n");
|
|
1535
1544
|
try {
|
|
1536
1545
|
this.form.submit();
|
|
1537
1546
|
} catch {
|
|
@@ -1540,23 +1549,23 @@ Tt.prototype.doWrite = function(t, e) {
|
|
|
1540
1549
|
r.iframe.readyState === "complete" && h();
|
|
1541
1550
|
} : this.iframe.onload = h;
|
|
1542
1551
|
};
|
|
1543
|
-
const
|
|
1552
|
+
const Mn = {}, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1544
1553
|
__proto__: null,
|
|
1545
|
-
default:
|
|
1546
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1547
|
-
var
|
|
1548
|
-
typeof WebSocket < "u" ?
|
|
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;
|
|
1557
|
+
typeof WebSocket < "u" ? zt = WebSocket : typeof self < "u" && (zt = self.WebSocket || self.MozWebSocket);
|
|
1549
1558
|
if (typeof window > "u")
|
|
1550
1559
|
try {
|
|
1551
|
-
|
|
1560
|
+
Re = zn;
|
|
1552
1561
|
} catch {
|
|
1553
1562
|
}
|
|
1554
|
-
var wt =
|
|
1563
|
+
var wt = zt || Re, Vn = st;
|
|
1555
1564
|
function st(t) {
|
|
1556
1565
|
var e = t && t.forceBase64;
|
|
1557
|
-
e && (this.supportsBinary = !1), this.perMessageDeflate = t.perMessageDeflate, this.usingBrowserWebSocket =
|
|
1566
|
+
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);
|
|
1558
1567
|
}
|
|
1559
|
-
|
|
1568
|
+
Kn(st, Ie);
|
|
1560
1569
|
st.prototype.name = "websocket";
|
|
1561
1570
|
st.prototype.supportsBinary = !0;
|
|
1562
1571
|
st.prototype.doOpen = function() {
|
|
@@ -1588,18 +1597,18 @@ st.prototype.write = function(t) {
|
|
|
1588
1597
|
this.writable = !1;
|
|
1589
1598
|
for (var r = t.length, n = 0, o = r; n < o; n++)
|
|
1590
1599
|
(function(u) {
|
|
1591
|
-
|
|
1600
|
+
Xn.encodePacket(u, e.supportsBinary, function(h) {
|
|
1592
1601
|
if (!e.usingBrowserWebSocket) {
|
|
1593
|
-
var
|
|
1594
|
-
if (u.options && (
|
|
1602
|
+
var f = {};
|
|
1603
|
+
if (u.options && (f.compress = u.options.compress), e.perMessageDeflate) {
|
|
1595
1604
|
var c = typeof h == "string" ? Buffer.byteLength(h) : h.length;
|
|
1596
|
-
c < e.perMessageDeflate.threshold && (
|
|
1605
|
+
c < e.perMessageDeflate.threshold && (f.compress = !1);
|
|
1597
1606
|
}
|
|
1598
1607
|
}
|
|
1599
1608
|
try {
|
|
1600
|
-
e.usingBrowserWebSocket ? e.ws.send(h) : e.ws.send(h,
|
|
1609
|
+
e.usingBrowserWebSocket ? e.ws.send(h) : e.ws.send(h, f);
|
|
1601
1610
|
} catch {
|
|
1602
|
-
|
|
1611
|
+
Jn("websocket closed before onclose event");
|
|
1603
1612
|
}
|
|
1604
1613
|
--r || i();
|
|
1605
1614
|
});
|
|
@@ -1611,62 +1620,62 @@ st.prototype.write = function(t) {
|
|
|
1611
1620
|
}
|
|
1612
1621
|
};
|
|
1613
1622
|
st.prototype.onClose = function() {
|
|
1614
|
-
|
|
1623
|
+
Ie.prototype.onClose.call(this);
|
|
1615
1624
|
};
|
|
1616
1625
|
st.prototype.doClose = function() {
|
|
1617
1626
|
typeof this.ws < "u" && this.ws.close();
|
|
1618
1627
|
};
|
|
1619
1628
|
st.prototype.uri = function() {
|
|
1620
1629
|
var t = this.query || {}, e = this.secure ? "wss" : "ws", r = "";
|
|
1621
|
-
this.port && (e === "wss" && Number(this.port) !== 443 || e === "ws" && Number(this.port) !== 80) && (r = ":" + this.port), this.timestampRequests && (t[this.timestampParam] =
|
|
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);
|
|
1622
1631
|
var n = this.hostname.indexOf(":") !== -1;
|
|
1623
1632
|
return e + "://" + (n ? "[" + this.hostname + "]" : this.hostname) + r + this.path + t;
|
|
1624
1633
|
};
|
|
1625
1634
|
st.prototype.check = function() {
|
|
1626
1635
|
return !!wt && !("__initialize" in wt && this.name === st.prototype.name);
|
|
1627
1636
|
};
|
|
1628
|
-
var
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
function
|
|
1637
|
+
var $n = Ae, Gn = Ln, Yn = Dn, Qn = Vn;
|
|
1638
|
+
Kt.polling = Zn;
|
|
1639
|
+
Kt.websocket = Qn;
|
|
1640
|
+
function Zn(t) {
|
|
1632
1641
|
var e, r = !1, n = !1, o = t.jsonp !== !1;
|
|
1633
1642
|
if (typeof location < "u") {
|
|
1634
1643
|
var i = location.protocol === "https:", u = location.port;
|
|
1635
1644
|
u || (u = i ? 443 : 80), r = t.hostname !== location.hostname || u !== t.port, n = t.secure !== i;
|
|
1636
1645
|
}
|
|
1637
|
-
if (t.xdomain = r, t.xscheme = n, e = new
|
|
1638
|
-
return new
|
|
1646
|
+
if (t.xdomain = r, t.xscheme = n, e = new $n(t), "open" in e && !t.forceJSONP)
|
|
1647
|
+
return new Gn(t);
|
|
1639
1648
|
if (!o)
|
|
1640
1649
|
throw new Error("JSONP disabled");
|
|
1641
|
-
return new
|
|
1650
|
+
return new Yn(t);
|
|
1642
1651
|
}
|
|
1643
|
-
var
|
|
1644
|
-
if (
|
|
1652
|
+
var to = [].indexOf, kr = function(t, e) {
|
|
1653
|
+
if (to)
|
|
1645
1654
|
return t.indexOf(e);
|
|
1646
1655
|
for (var r = 0; r < t.length; ++r)
|
|
1647
1656
|
if (t[r] === e)
|
|
1648
1657
|
return r;
|
|
1649
1658
|
return -1;
|
|
1650
|
-
},
|
|
1659
|
+
}, eo = Kt, ro = St, G = lt("engine.io-client:socket"), no = kr, br = kt, Je = or, oo = Ht(), so = W;
|
|
1651
1660
|
function W(t, e) {
|
|
1652
1661
|
if (!(this instanceof W))
|
|
1653
1662
|
return new W(t, e);
|
|
1654
|
-
e = e || {}, t && typeof t == "object" && (e = t, t = null), t ? (t =
|
|
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();
|
|
1655
1664
|
}
|
|
1656
1665
|
W.priorWebsocketSuccess = !1;
|
|
1657
|
-
|
|
1658
|
-
W.protocol =
|
|
1666
|
+
ro(W.prototype);
|
|
1667
|
+
W.protocol = br.protocol;
|
|
1659
1668
|
W.Socket = W;
|
|
1660
|
-
W.Transport =
|
|
1661
|
-
W.transports =
|
|
1669
|
+
W.Transport = Ne();
|
|
1670
|
+
W.transports = Kt;
|
|
1662
1671
|
W.parser = kt;
|
|
1663
1672
|
W.prototype.createTransport = function(t) {
|
|
1664
1673
|
G('creating transport "%s"', t);
|
|
1665
|
-
var e =
|
|
1666
|
-
e.EIO =
|
|
1674
|
+
var e = io(this.query);
|
|
1675
|
+
e.EIO = br.protocol, e.transport = t;
|
|
1667
1676
|
var r = this.transportOptions[t] || {};
|
|
1668
1677
|
this.id && (e.sid = this.id);
|
|
1669
|
-
var n = new
|
|
1678
|
+
var n = new eo[t]({
|
|
1670
1679
|
query: e,
|
|
1671
1680
|
socket: this,
|
|
1672
1681
|
agent: r.agent || this.agent,
|
|
@@ -1699,7 +1708,7 @@ W.prototype.createTransport = function(t) {
|
|
|
1699
1708
|
});
|
|
1700
1709
|
return n;
|
|
1701
1710
|
};
|
|
1702
|
-
function
|
|
1711
|
+
function io(t) {
|
|
1703
1712
|
var e = {};
|
|
1704
1713
|
for (var r in t)
|
|
1705
1714
|
t.hasOwnProperty(r) && (e[r] = t[r]);
|
|
@@ -1773,16 +1782,16 @@ W.prototype.probe = function(t) {
|
|
|
1773
1782
|
function h() {
|
|
1774
1783
|
u("transport closed");
|
|
1775
1784
|
}
|
|
1776
|
-
function
|
|
1785
|
+
function f() {
|
|
1777
1786
|
u("socket closed");
|
|
1778
1787
|
}
|
|
1779
1788
|
function c(p) {
|
|
1780
1789
|
e && p.name !== e.name && (G('"%s" works - aborting "%s"', p.name, e.name), i());
|
|
1781
1790
|
}
|
|
1782
1791
|
function l() {
|
|
1783
|
-
e.removeListener("open", o), e.removeListener("error", u), e.removeListener("close", h), n.removeListener("close",
|
|
1792
|
+
e.removeListener("open", o), e.removeListener("error", u), e.removeListener("close", h), n.removeListener("close", f), n.removeListener("upgrading", c);
|
|
1784
1793
|
}
|
|
1785
|
-
e.once("open", o), e.once("error", u), e.once("close", h), this.once("close",
|
|
1794
|
+
e.once("open", o), e.once("error", u), e.once("close", h), this.once("close", f), this.once("upgrading", c), e.open();
|
|
1786
1795
|
};
|
|
1787
1796
|
W.prototype.onOpen = function() {
|
|
1788
1797
|
if (G("socket open"), this.readyState = "open", W.priorWebsocketSuccess = this.transport.name === "websocket", this.emit("open"), this.flush(), this.readyState === "open" && this.upgrade && this.transport.pause) {
|
|
@@ -1884,165 +1893,173 @@ W.prototype.onClose = function(t, e) {
|
|
|
1884
1893
|
};
|
|
1885
1894
|
W.prototype.filterUpgrades = function(t) {
|
|
1886
1895
|
for (var e = [], r = 0, n = t.length; r < n; r++)
|
|
1887
|
-
~
|
|
1896
|
+
~no(this.transports, t[r]) && e.push(t[r]);
|
|
1888
1897
|
return e;
|
|
1889
1898
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
var
|
|
1893
|
-
function
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
+
Se.exports = so;
|
|
1900
|
+
Se.exports.parser = kt;
|
|
1901
|
+
var ao = Se.exports, Ve = { exports: {} }, ce, $e;
|
|
1902
|
+
function co() {
|
|
1903
|
+
if ($e)
|
|
1904
|
+
return ce;
|
|
1905
|
+
$e = 1, ce = t;
|
|
1906
|
+
function t(e, r) {
|
|
1907
|
+
var n = [];
|
|
1908
|
+
r = r || 0;
|
|
1909
|
+
for (var o = r || 0; o < e.length; o++)
|
|
1910
|
+
n[o - r] = e[o];
|
|
1911
|
+
return n;
|
|
1912
|
+
}
|
|
1913
|
+
return ce;
|
|
1899
1914
|
}
|
|
1900
|
-
var
|
|
1901
|
-
function
|
|
1915
|
+
var Cr = ho;
|
|
1916
|
+
function ho(t, e, r) {
|
|
1902
1917
|
return t.on(e, r), {
|
|
1903
1918
|
destroy: function() {
|
|
1904
1919
|
t.removeListener(e, r);
|
|
1905
1920
|
}
|
|
1906
1921
|
};
|
|
1907
1922
|
}
|
|
1908
|
-
var
|
|
1923
|
+
var Ge = [].slice, wr = function(t, e) {
|
|
1909
1924
|
if (typeof e == "string" && (e = t[e]), typeof e != "function")
|
|
1910
1925
|
throw new Error("bind() requires a function");
|
|
1911
|
-
var r =
|
|
1926
|
+
var r = Ge.call(arguments, 2);
|
|
1912
1927
|
return function() {
|
|
1913
|
-
return e.apply(t, r.concat(
|
|
1928
|
+
return e.apply(t, r.concat(Ge.call(arguments)));
|
|
1914
1929
|
};
|
|
1915
|
-
};
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
n(a.prototype), a.prototype.subEvents = function() {
|
|
1938
|
-
if (!this.subs) {
|
|
1939
|
-
var s = this.io;
|
|
1940
|
-
this.subs = [
|
|
1941
|
-
i(s, "open", u(this, "onopen")),
|
|
1942
|
-
i(s, "packet", u(this, "onpacket")),
|
|
1943
|
-
i(s, "close", u(this, "onclose"))
|
|
1944
|
-
];
|
|
1930
|
+
}, Ye;
|
|
1931
|
+
function Sr() {
|
|
1932
|
+
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
|
+
t.exports = a;
|
|
1935
|
+
var l = {
|
|
1936
|
+
connect: 1,
|
|
1937
|
+
connect_error: 1,
|
|
1938
|
+
connect_timeout: 1,
|
|
1939
|
+
connecting: 1,
|
|
1940
|
+
disconnect: 1,
|
|
1941
|
+
error: 1,
|
|
1942
|
+
reconnect: 1,
|
|
1943
|
+
reconnect_attempt: 1,
|
|
1944
|
+
reconnect_failed: 1,
|
|
1945
|
+
reconnect_error: 1,
|
|
1946
|
+
reconnecting: 1,
|
|
1947
|
+
ping: 1,
|
|
1948
|
+
pong: 1
|
|
1949
|
+
}, p = n.prototype.emit;
|
|
1950
|
+
function a(s, d, y) {
|
|
1951
|
+
this.io = s, this.nsp = d, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0, this.flags = {}, y && y.query && (this.query = y.query), this.io.autoConnect && this.open();
|
|
1945
1952
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
var f = o(arguments), y = {
|
|
1955
|
-
type: (this.flags.binary !== void 0 ? this.flags.binary : c(f)) ? r.BINARY_EVENT : r.EVENT,
|
|
1956
|
-
data: f
|
|
1957
|
-
};
|
|
1958
|
-
return y.options = {}, y.options.compress = !this.flags || this.flags.compress !== !1, typeof f[f.length - 1] == "function" && (h("emitting packet with ack id %d", this.ids), this.acks[this.ids] = f.pop(), y.id = this.ids++), this.connected ? this.packet(y) : this.sendBuffer.push(y), this.flags = {}, this;
|
|
1959
|
-
}, a.prototype.packet = function(s) {
|
|
1960
|
-
s.nsp = this.nsp, this.io.packet(s);
|
|
1961
|
-
}, a.prototype.onopen = function() {
|
|
1962
|
-
if (h("transport is open - connecting"), this.nsp !== "/")
|
|
1963
|
-
if (this.query) {
|
|
1964
|
-
var s = typeof this.query == "object" ? d.encode(this.query) : this.query;
|
|
1965
|
-
h("sending connect packet with query %s", s), this.packet({ type: r.CONNECT, query: s });
|
|
1966
|
-
} else
|
|
1967
|
-
this.packet({ type: r.CONNECT });
|
|
1968
|
-
}, a.prototype.onclose = function(s) {
|
|
1969
|
-
h("close (%s)", s), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", s);
|
|
1970
|
-
}, a.prototype.onpacket = function(s) {
|
|
1971
|
-
var f = s.nsp === this.nsp, y = s.type === r.ERROR && s.nsp === "/";
|
|
1972
|
-
if (!(!f && !y))
|
|
1973
|
-
switch (s.type) {
|
|
1974
|
-
case r.CONNECT:
|
|
1975
|
-
this.onconnect();
|
|
1976
|
-
break;
|
|
1977
|
-
case r.EVENT:
|
|
1978
|
-
this.onevent(s);
|
|
1979
|
-
break;
|
|
1980
|
-
case r.BINARY_EVENT:
|
|
1981
|
-
this.onevent(s);
|
|
1982
|
-
break;
|
|
1983
|
-
case r.ACK:
|
|
1984
|
-
this.onack(s);
|
|
1985
|
-
break;
|
|
1986
|
-
case r.BINARY_ACK:
|
|
1987
|
-
this.onack(s);
|
|
1988
|
-
break;
|
|
1989
|
-
case r.DISCONNECT:
|
|
1990
|
-
this.ondisconnect();
|
|
1991
|
-
break;
|
|
1992
|
-
case r.ERROR:
|
|
1993
|
-
this.emit("error", s.data);
|
|
1994
|
-
break;
|
|
1953
|
+
n(a.prototype), a.prototype.subEvents = function() {
|
|
1954
|
+
if (!this.subs) {
|
|
1955
|
+
var s = this.io;
|
|
1956
|
+
this.subs = [
|
|
1957
|
+
i(s, "open", u(this, "onopen")),
|
|
1958
|
+
i(s, "packet", u(this, "onpacket")),
|
|
1959
|
+
i(s, "close", u(this, "onclose"))
|
|
1960
|
+
];
|
|
1995
1961
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
1962
|
+
}, a.prototype.open = a.prototype.connect = function() {
|
|
1963
|
+
return this.connected ? this : (this.subEvents(), this.io.reconnecting || this.io.open(), this.io.readyState === "open" && this.onopen(), this.emit("connecting"), this);
|
|
1964
|
+
}, a.prototype.send = function() {
|
|
1965
|
+
var s = o(arguments);
|
|
1966
|
+
return s.unshift("message"), this.emit.apply(this, s), this;
|
|
1967
|
+
}, a.prototype.emit = function(s) {
|
|
1968
|
+
if (l.hasOwnProperty(s))
|
|
1969
|
+
return p.apply(this, arguments), this;
|
|
1970
|
+
var d = o(arguments), y = {
|
|
1971
|
+
type: (this.flags.binary !== void 0 ? this.flags.binary : c(d)) ? r.BINARY_EVENT : r.EVENT,
|
|
1972
|
+
data: d
|
|
1973
|
+
};
|
|
1974
|
+
return y.options = {}, y.options.compress = !this.flags || this.flags.compress !== !1, typeof d[d.length - 1] == "function" && (h("emitting packet with ack id %d", this.ids), this.acks[this.ids] = d.pop(), y.id = this.ids++), this.connected ? this.packet(y) : this.sendBuffer.push(y), this.flags = {}, this;
|
|
1975
|
+
}, a.prototype.packet = function(s) {
|
|
1976
|
+
s.nsp = this.nsp, this.io.packet(s);
|
|
1977
|
+
}, a.prototype.onopen = function() {
|
|
1978
|
+
if (h("transport is open - connecting"), this.nsp !== "/")
|
|
1979
|
+
if (this.query) {
|
|
1980
|
+
var s = typeof this.query == "object" ? f.encode(this.query) : this.query;
|
|
1981
|
+
h("sending connect packet with query %s", s), this.packet({ type: r.CONNECT, query: s });
|
|
1982
|
+
} else
|
|
1983
|
+
this.packet({ type: r.CONNECT });
|
|
1984
|
+
}, a.prototype.onclose = function(s) {
|
|
1985
|
+
h("close (%s)", s), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", s);
|
|
1986
|
+
}, a.prototype.onpacket = function(s) {
|
|
1987
|
+
var d = s.nsp === this.nsp, y = s.type === r.ERROR && s.nsp === "/";
|
|
1988
|
+
if (!(!d && !y))
|
|
1989
|
+
switch (s.type) {
|
|
1990
|
+
case r.CONNECT:
|
|
1991
|
+
this.onconnect();
|
|
1992
|
+
break;
|
|
1993
|
+
case r.EVENT:
|
|
1994
|
+
this.onevent(s);
|
|
1995
|
+
break;
|
|
1996
|
+
case r.BINARY_EVENT:
|
|
1997
|
+
this.onevent(s);
|
|
1998
|
+
break;
|
|
1999
|
+
case r.ACK:
|
|
2000
|
+
this.onack(s);
|
|
2001
|
+
break;
|
|
2002
|
+
case r.BINARY_ACK:
|
|
2003
|
+
this.onack(s);
|
|
2004
|
+
break;
|
|
2005
|
+
case r.DISCONNECT:
|
|
2006
|
+
this.ondisconnect();
|
|
2007
|
+
break;
|
|
2008
|
+
case r.ERROR:
|
|
2009
|
+
this.emit("error", s.data);
|
|
2010
|
+
break;
|
|
2011
|
+
}
|
|
2012
|
+
}, a.prototype.onevent = function(s) {
|
|
2013
|
+
var d = s.data || [];
|
|
2014
|
+
h("emitting event %j", d), s.id != null && (h("attaching ack callback to event"), d.push(this.ack(s.id))), this.connected ? p.apply(this, d) : this.receiveBuffer.push(d);
|
|
2015
|
+
}, a.prototype.ack = function(s) {
|
|
2016
|
+
var d = this, y = !1;
|
|
2017
|
+
return function() {
|
|
2018
|
+
if (!y) {
|
|
2019
|
+
y = !0;
|
|
2020
|
+
var g = o(arguments);
|
|
2021
|
+
h("sending ack %j", g), d.packet({
|
|
2022
|
+
type: c(g) ? r.BINARY_ACK : r.ACK,
|
|
2023
|
+
id: s,
|
|
2024
|
+
data: g
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
}, a.prototype.onack = function(s) {
|
|
2029
|
+
var d = this.acks[s.id];
|
|
2030
|
+
typeof d == "function" ? (h("calling ack %s with %j", s.id, s.data), d.apply(this, s.data), delete this.acks[s.id]) : h("bad ack %s", s.id);
|
|
2031
|
+
}, a.prototype.onconnect = function() {
|
|
2032
|
+
this.connected = !0, this.disconnected = !1, this.emitBuffered(), this.emit("connect");
|
|
2033
|
+
}, a.prototype.emitBuffered = function() {
|
|
2034
|
+
var s;
|
|
2035
|
+
for (s = 0; s < this.receiveBuffer.length; s++)
|
|
2036
|
+
p.apply(this, this.receiveBuffer[s]);
|
|
2037
|
+
for (this.receiveBuffer = [], s = 0; s < this.sendBuffer.length; s++)
|
|
2038
|
+
this.packet(this.sendBuffer[s]);
|
|
2039
|
+
this.sendBuffer = [];
|
|
2040
|
+
}, a.prototype.ondisconnect = function() {
|
|
2041
|
+
h("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
|
|
2042
|
+
}, a.prototype.destroy = function() {
|
|
2043
|
+
if (this.subs) {
|
|
2044
|
+
for (var s = 0; s < this.subs.length; s++)
|
|
2045
|
+
this.subs[s].destroy();
|
|
2046
|
+
this.subs = null;
|
|
2010
2047
|
}
|
|
2048
|
+
this.io.destroy(this);
|
|
2049
|
+
}, a.prototype.close = a.prototype.disconnect = function() {
|
|
2050
|
+
return this.connected && (h("performing disconnect (%s)", this.nsp), this.packet({ type: r.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
|
|
2051
|
+
}, a.prototype.compress = function(s) {
|
|
2052
|
+
return this.flags.compress = s, this;
|
|
2053
|
+
}, a.prototype.binary = function(s) {
|
|
2054
|
+
return this.flags.binary = s, this;
|
|
2011
2055
|
};
|
|
2012
|
-
},
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
this.connected = !0, this.disconnected = !1, this.emitBuffered(), this.emit("connect");
|
|
2017
|
-
}, a.prototype.emitBuffered = function() {
|
|
2018
|
-
var s;
|
|
2019
|
-
for (s = 0; s < this.receiveBuffer.length; s++)
|
|
2020
|
-
p.apply(this, this.receiveBuffer[s]);
|
|
2021
|
-
for (this.receiveBuffer = [], s = 0; s < this.sendBuffer.length; s++)
|
|
2022
|
-
this.packet(this.sendBuffer[s]);
|
|
2023
|
-
this.sendBuffer = [];
|
|
2024
|
-
}, a.prototype.ondisconnect = function() {
|
|
2025
|
-
h("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect");
|
|
2026
|
-
}, a.prototype.destroy = function() {
|
|
2027
|
-
if (this.subs) {
|
|
2028
|
-
for (var s = 0; s < this.subs.length; s++)
|
|
2029
|
-
this.subs[s].destroy();
|
|
2030
|
-
this.subs = null;
|
|
2031
|
-
}
|
|
2032
|
-
this.io.destroy(this);
|
|
2033
|
-
}, a.prototype.close = a.prototype.disconnect = function() {
|
|
2034
|
-
return this.connected && (h("performing disconnect (%s)", this.nsp), this.packet({ type: r.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
|
|
2035
|
-
}, a.prototype.compress = function(s) {
|
|
2036
|
-
return this.flags.compress = s, this;
|
|
2037
|
-
}, a.prototype.binary = function(s) {
|
|
2038
|
-
return this.flags.binary = s, this;
|
|
2039
|
-
};
|
|
2040
|
-
})(yr);
|
|
2041
|
-
var vr = yr.exports, ho = Nt;
|
|
2042
|
-
function Nt(t) {
|
|
2056
|
+
}(Ve)), Ve.exports;
|
|
2057
|
+
}
|
|
2058
|
+
var po = Tt;
|
|
2059
|
+
function Tt(t) {
|
|
2043
2060
|
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;
|
|
2044
2061
|
}
|
|
2045
|
-
|
|
2062
|
+
Tt.prototype.duration = function() {
|
|
2046
2063
|
var t = this.ms * Math.pow(this.factor, this.attempts++);
|
|
2047
2064
|
if (this.jitter) {
|
|
2048
2065
|
var e = Math.random(), r = Math.floor(e * this.jitter * t);
|
|
@@ -2050,43 +2067,43 @@ Nt.prototype.duration = function() {
|
|
|
2050
2067
|
}
|
|
2051
2068
|
return Math.min(t, this.max) | 0;
|
|
2052
2069
|
};
|
|
2053
|
-
|
|
2070
|
+
Tt.prototype.reset = function() {
|
|
2054
2071
|
this.attempts = 0;
|
|
2055
2072
|
};
|
|
2056
|
-
|
|
2073
|
+
Tt.prototype.setMin = function(t) {
|
|
2057
2074
|
this.ms = t;
|
|
2058
2075
|
};
|
|
2059
|
-
|
|
2076
|
+
Tt.prototype.setMax = function(t) {
|
|
2060
2077
|
this.max = t;
|
|
2061
2078
|
};
|
|
2062
|
-
|
|
2079
|
+
Tt.prototype.setJitter = function(t) {
|
|
2063
2080
|
this.jitter = t;
|
|
2064
2081
|
};
|
|
2065
|
-
var
|
|
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;
|
|
2066
2083
|
function K(t, e) {
|
|
2067
2084
|
if (!(this instanceof K))
|
|
2068
2085
|
return new K(t, e);
|
|
2069
|
-
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
|
|
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({
|
|
2070
2087
|
min: this.reconnectionDelay(),
|
|
2071
2088
|
max: this.reconnectionDelayMax(),
|
|
2072
2089
|
jitter: this.randomizationFactor()
|
|
2073
2090
|
}), this.timeout(e.timeout == null ? 2e4 : e.timeout), this.readyState = "closed", this.uri = t, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [];
|
|
2074
|
-
var r = e.parser ||
|
|
2091
|
+
var r = e.parser || yo;
|
|
2075
2092
|
this.encoder = new r.Encoder(), this.decoder = new r.Decoder(), this.autoConnect = e.autoConnect !== !1, this.autoConnect && this.open();
|
|
2076
2093
|
}
|
|
2077
2094
|
K.prototype.emitAll = function() {
|
|
2078
2095
|
this.emit.apply(this, arguments);
|
|
2079
2096
|
for (var t in this.nsps)
|
|
2080
|
-
|
|
2097
|
+
Ar.call(this.nsps, t) && this.nsps[t].emit.apply(this.nsps[t], arguments);
|
|
2081
2098
|
};
|
|
2082
2099
|
K.prototype.updateSocketIds = function() {
|
|
2083
2100
|
for (var t in this.nsps)
|
|
2084
|
-
|
|
2101
|
+
Ar.call(this.nsps, t) && (this.nsps[t].id = this.generateId(t));
|
|
2085
2102
|
};
|
|
2086
2103
|
K.prototype.generateId = function(t) {
|
|
2087
2104
|
return (t === "/" ? "" : t + "#") + this.engine.id;
|
|
2088
2105
|
};
|
|
2089
|
-
|
|
2106
|
+
fo(K.prototype);
|
|
2090
2107
|
K.prototype.reconnection = function(t) {
|
|
2091
2108
|
return arguments.length ? (this._reconnection = !!t, this) : this._reconnection;
|
|
2092
2109
|
};
|
|
@@ -2111,15 +2128,15 @@ K.prototype.maybeReconnectOnOpen = function() {
|
|
|
2111
2128
|
K.prototype.open = K.prototype.connect = function(t, e) {
|
|
2112
2129
|
if (Z("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
|
|
2113
2130
|
return this;
|
|
2114
|
-
Z("opening %s", this.uri), this.engine =
|
|
2131
|
+
Z("opening %s", this.uri), this.engine = uo(this.uri, this.opts);
|
|
2115
2132
|
var r = this.engine, n = this;
|
|
2116
2133
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
2117
2134
|
var o = ft(r, "open", function() {
|
|
2118
2135
|
n.onopen(), t && t();
|
|
2119
|
-
}), i = ft(r, "error", function(
|
|
2120
|
-
if (Z("connect_error"), n.cleanup(), n.readyState = "closed", n.emitAll("connect_error",
|
|
2136
|
+
}), i = ft(r, "error", function(f) {
|
|
2137
|
+
if (Z("connect_error"), n.cleanup(), n.readyState = "closed", n.emitAll("connect_error", f), t) {
|
|
2121
2138
|
var c = new Error("Connection error");
|
|
2122
|
-
c.data =
|
|
2139
|
+
c.data = f, t(c);
|
|
2123
2140
|
} else
|
|
2124
2141
|
n.maybeReconnectOnOpen();
|
|
2125
2142
|
});
|
|
@@ -2160,19 +2177,19 @@ K.prototype.onerror = function(t) {
|
|
|
2160
2177
|
K.prototype.socket = function(t, e) {
|
|
2161
2178
|
var r = this.nsps[t];
|
|
2162
2179
|
if (!r) {
|
|
2163
|
-
r = new
|
|
2180
|
+
r = new lo(this, t, e), this.nsps[t] = r;
|
|
2164
2181
|
var n = this;
|
|
2165
2182
|
r.on("connecting", o), r.on("connect", function() {
|
|
2166
2183
|
r.id = n.generateId(t);
|
|
2167
2184
|
}), this.autoConnect && o();
|
|
2168
2185
|
}
|
|
2169
2186
|
function o() {
|
|
2170
|
-
~
|
|
2187
|
+
~Er(n.connecting, r) || n.connecting.push(r);
|
|
2171
2188
|
}
|
|
2172
2189
|
return r;
|
|
2173
2190
|
};
|
|
2174
2191
|
K.prototype.destroy = function(t) {
|
|
2175
|
-
var e =
|
|
2192
|
+
var e = Er(this.connecting, t);
|
|
2176
2193
|
~e && this.connecting.splice(e, 1), !this.connecting.length && this.close();
|
|
2177
2194
|
};
|
|
2178
2195
|
K.prototype.packet = function(t) {
|
|
@@ -2230,48 +2247,42 @@ K.prototype.onreconnect = function() {
|
|
|
2230
2247
|
this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t);
|
|
2231
2248
|
};
|
|
2232
2249
|
(function(t, e) {
|
|
2233
|
-
var r =
|
|
2250
|
+
var r = Qr, n = Xt, o = Qe, i = lt("socket.io-client");
|
|
2234
2251
|
t.exports = e = h;
|
|
2235
2252
|
var u = e.managers = {};
|
|
2236
|
-
function h(
|
|
2237
|
-
typeof
|
|
2238
|
-
var l = r(
|
|
2253
|
+
function h(f, c) {
|
|
2254
|
+
typeof f == "object" && (c = f, f = void 0), c = c || {};
|
|
2255
|
+
var l = r(f), p = l.source, a = l.id, s = l.path, d = u[a] && s in u[a].nsps, y = c.forceNew || c["force new connection"] || c.multiplex === !1 || d, g;
|
|
2239
2256
|
return y ? (i("ignoring socket cache for %s", p), g = o(p, c)) : (u[a] || (i("new io instance for %s", p), u[a] = o(p, c)), g = u[a]), l.query && !c.query && (c.query = l.query), g.socket(l.path, c);
|
|
2240
2257
|
}
|
|
2241
|
-
e.protocol = n.protocol, e.connect = h, e.Manager =
|
|
2242
|
-
})(
|
|
2243
|
-
var
|
|
2244
|
-
const
|
|
2245
|
-
let
|
|
2246
|
-
const
|
|
2247
|
-
function
|
|
2248
|
-
if (!
|
|
2258
|
+
e.protocol = n.protocol, e.connect = h, e.Manager = Qe, e.Socket = Sr();
|
|
2259
|
+
})(le, le.exports);
|
|
2260
|
+
var mo = le.exports;
|
|
2261
|
+
const vo = /* @__PURE__ */ jr(mo);
|
|
2262
|
+
let Ft;
|
|
2263
|
+
const ko = new Uint8Array(16);
|
|
2264
|
+
function bo() {
|
|
2265
|
+
if (!Ft && (Ft = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ft))
|
|
2249
2266
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2250
|
-
return
|
|
2267
|
+
return Ft(ko);
|
|
2251
2268
|
}
|
|
2252
2269
|
const Q = [];
|
|
2253
2270
|
for (let t = 0; t < 256; ++t)
|
|
2254
2271
|
Q.push((t + 256).toString(16).slice(1));
|
|
2255
|
-
function
|
|
2272
|
+
function Co(t, e = 0) {
|
|
2256
2273
|
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]];
|
|
2257
2274
|
}
|
|
2258
|
-
const
|
|
2259
|
-
randomUUID:
|
|
2275
|
+
const wo = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ze = {
|
|
2276
|
+
randomUUID: wo
|
|
2260
2277
|
};
|
|
2261
|
-
function
|
|
2262
|
-
if (
|
|
2263
|
-
return
|
|
2278
|
+
function So(t, e, r) {
|
|
2279
|
+
if (Ze.randomUUID && !e && !t)
|
|
2280
|
+
return Ze.randomUUID();
|
|
2264
2281
|
t = t || {};
|
|
2265
|
-
const n = t.random || (t.rng ||
|
|
2266
|
-
|
|
2267
|
-
r = r || 0;
|
|
2268
|
-
for (let o = 0; o < 16; ++o)
|
|
2269
|
-
e[r + o] = n[o];
|
|
2270
|
-
return e;
|
|
2271
|
-
}
|
|
2272
|
-
return bo(n);
|
|
2282
|
+
const n = t.random || (t.rng || bo)();
|
|
2283
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Co(n);
|
|
2273
2284
|
}
|
|
2274
|
-
function
|
|
2285
|
+
function Eo(t, e) {
|
|
2275
2286
|
const r = e.map((o) => JSON.stringify(o)).join(" "), n = (/* @__PURE__ */ new Date()).toISOString();
|
|
2276
2287
|
return JSON.stringify({
|
|
2277
2288
|
level: t,
|
|
@@ -2279,11 +2290,11 @@ function So(t, e) {
|
|
|
2279
2290
|
message: r
|
|
2280
2291
|
});
|
|
2281
2292
|
}
|
|
2282
|
-
function
|
|
2293
|
+
function Ao(t, e) {
|
|
2283
2294
|
const r = JSON.parse(t);
|
|
2284
2295
|
return e.forEach((n) => delete r[n]), r;
|
|
2285
2296
|
}
|
|
2286
|
-
function
|
|
2297
|
+
function To(t) {
|
|
2287
2298
|
if (typeof t == "object" && t !== null)
|
|
2288
2299
|
return t;
|
|
2289
2300
|
try {
|
|
@@ -2292,7 +2303,7 @@ function Ao(t) {
|
|
|
2292
2303
|
return { extraData: t };
|
|
2293
2304
|
}
|
|
2294
2305
|
}
|
|
2295
|
-
function
|
|
2306
|
+
function No(t) {
|
|
2296
2307
|
const e = /\(([^)]+)\)/, r = t.match(e);
|
|
2297
2308
|
if (r && r[1]) {
|
|
2298
2309
|
const n = r[1].split(";");
|
|
@@ -2302,7 +2313,7 @@ function To(t) {
|
|
|
2302
2313
|
}
|
|
2303
2314
|
return "Unknown";
|
|
2304
2315
|
}
|
|
2305
|
-
function
|
|
2316
|
+
function tr(t) {
|
|
2306
2317
|
return (...e) => new Promise((r, n) => {
|
|
2307
2318
|
try {
|
|
2308
2319
|
const o = t(...e);
|
|
@@ -2312,7 +2323,7 @@ function Je(t) {
|
|
|
2312
2323
|
}
|
|
2313
2324
|
});
|
|
2314
2325
|
}
|
|
2315
|
-
const
|
|
2326
|
+
const Oo = {
|
|
2316
2327
|
reconnection: !0,
|
|
2317
2328
|
reconnectionDelay: 5e3,
|
|
2318
2329
|
reconnectionAttempts: 10,
|
|
@@ -2320,7 +2331,7 @@ const No = {
|
|
|
2320
2331
|
upgrade: !1,
|
|
2321
2332
|
transports: ["websocket"],
|
|
2322
2333
|
debug: !1
|
|
2323
|
-
},
|
|
2334
|
+
}, he = {
|
|
2324
2335
|
logToConsole: !0,
|
|
2325
2336
|
overloadGlobalConsole: !1,
|
|
2326
2337
|
socketEmitInterval: 6e4
|
|
@@ -2344,7 +2355,7 @@ const No = {
|
|
|
2344
2355
|
CHECK: "Check",
|
|
2345
2356
|
WEBHOOK: "Webhook",
|
|
2346
2357
|
WSCONNECT: "WSConnect"
|
|
2347
|
-
},
|
|
2358
|
+
}, xo = {
|
|
2348
2359
|
Create: 1,
|
|
2349
2360
|
Read: 2,
|
|
2350
2361
|
Update: 3,
|
|
@@ -2377,7 +2388,7 @@ const No = {
|
|
|
2377
2388
|
DEBUG: "debug"
|
|
2378
2389
|
};
|
|
2379
2390
|
let rt = console;
|
|
2380
|
-
class
|
|
2391
|
+
class Io {
|
|
2381
2392
|
/**
|
|
2382
2393
|
* Initialize storage logger
|
|
2383
2394
|
* @param options The configuration of the logger.
|
|
@@ -2387,7 +2398,7 @@ class xo {
|
|
|
2387
2398
|
const { loggerOptions: r } = e;
|
|
2388
2399
|
if (!r.system)
|
|
2389
2400
|
throw new Error("Config property 'system' should be provided!");
|
|
2390
|
-
this.isGetItemAsync = r.isGetItemAsync || !1, this.isSetItemAsync = r.isSetItemAsync || !1, this.setupStorageFunctions(r.getItem, r.setItem, r.parseLog), this.system = r.system, this.socketEmitInterval = r.socketEmitInterval ||
|
|
2401
|
+
this.isGetItemAsync = r.isGetItemAsync || !1, this.isSetItemAsync = r.isSetItemAsync || !1, this.setupStorageFunctions(r.getItem, r.setItem, r.parseLog), this.system = r.system, this.socketEmitInterval = r.socketEmitInterval || he.socketEmitInterval, this.logToConsole = r.logToConsole !== void 0 ? r.logToConsole : he.logToConsole, this.overloadGlobalConsole = r.overloadGlobalConsole !== void 0 ? r.overloadGlobalConsole : he.overloadGlobalConsole, this.storageId = this.getStorageName(), this.queue = [], this.processing = !1, this.storageInitialized = !1, this.emitInProgress = !1, this.logIndex = 0, this.init(e);
|
|
2391
2402
|
}
|
|
2392
2403
|
/**
|
|
2393
2404
|
* Used to setup storage functions and logs parser function.
|
|
@@ -2397,7 +2408,7 @@ class xo {
|
|
|
2397
2408
|
* @return void
|
|
2398
2409
|
*/
|
|
2399
2410
|
setupStorageFunctions(e, r, n) {
|
|
2400
|
-
this.getItem = e && typeof e == "function" ? this.isGetItemAsync ? e :
|
|
2411
|
+
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;
|
|
2401
2412
|
}
|
|
2402
2413
|
/**
|
|
2403
2414
|
* Used to initialize logger. Initializes storage, establishes socket connection and overloads console if needed
|
|
@@ -2426,10 +2437,10 @@ class xo {
|
|
|
2426
2437
|
*/
|
|
2427
2438
|
createConnection(e, r = {}) {
|
|
2428
2439
|
const n = {
|
|
2429
|
-
...
|
|
2440
|
+
...Oo,
|
|
2430
2441
|
...r
|
|
2431
2442
|
};
|
|
2432
|
-
return
|
|
2443
|
+
return vo(e, n);
|
|
2433
2444
|
}
|
|
2434
2445
|
/**
|
|
2435
2446
|
* Emits stored logs to the server and clears the log storage in case the emit operation was successful
|
|
@@ -2451,17 +2462,17 @@ class xo {
|
|
|
2451
2462
|
return;
|
|
2452
2463
|
if (!this.socket || !this.socket.connected)
|
|
2453
2464
|
throw new Error("Socket is disconnected");
|
|
2454
|
-
for (const
|
|
2455
|
-
const c =
|
|
2465
|
+
for (const f of i) {
|
|
2466
|
+
const c = To(n[f]), l = {
|
|
2456
2467
|
...this.staticObject,
|
|
2457
2468
|
...c
|
|
2458
2469
|
}, p = this.populateSendingLog(l);
|
|
2459
|
-
await this.socket.emit("Log", JSON.stringify(p)), o.push(
|
|
2470
|
+
await this.socket.emit("Log", JSON.stringify(p)), o.push(f);
|
|
2460
2471
|
}
|
|
2461
2472
|
const u = await this.getItem(this.storageId);
|
|
2462
2473
|
if (!u)
|
|
2463
2474
|
return;
|
|
2464
|
-
const h =
|
|
2475
|
+
const h = Ao(u, o);
|
|
2465
2476
|
this.localObject = {}, await this.setItem(this.storageId, JSON.stringify(h));
|
|
2466
2477
|
} catch (e) {
|
|
2467
2478
|
this._errorMethod(e);
|
|
@@ -2477,7 +2488,7 @@ class xo {
|
|
|
2477
2488
|
const r = {
|
|
2478
2489
|
...e
|
|
2479
2490
|
}, n = r.ActionName;
|
|
2480
|
-
return n && (r.ActionID =
|
|
2491
|
+
return n && (r.ActionID = xo[n]), r;
|
|
2481
2492
|
}
|
|
2482
2493
|
/**
|
|
2483
2494
|
* Used to set a static object which will be send in every message
|
|
@@ -2495,7 +2506,7 @@ class xo {
|
|
|
2495
2506
|
let r;
|
|
2496
2507
|
typeof window < "u" && typeof window.document < "u" ? r = window == null ? void 0 : window.navigator.userAgent : typeof self < "u" && self.navigator && (r = self.navigator.userAgent);
|
|
2497
2508
|
let n;
|
|
2498
|
-
return r && (n =
|
|
2509
|
+
return r && (n = No(r)), {
|
|
2499
2510
|
System: this.system,
|
|
2500
2511
|
DateTime: e,
|
|
2501
2512
|
UserAgent: r,
|
|
@@ -2503,11 +2514,20 @@ class xo {
|
|
|
2503
2514
|
};
|
|
2504
2515
|
}
|
|
2505
2516
|
/**
|
|
2506
|
-
* Used to interrupt socket connection
|
|
2517
|
+
* Used to stop logger and interrupt socket connection
|
|
2518
|
+
* @return void
|
|
2519
|
+
*/
|
|
2520
|
+
async stop() {
|
|
2521
|
+
!this.socket || !this.socket.connected || (clearInterval(this.interval), await this.emitLogs(), this.socket.disconnect());
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
* Used to start logger and reconnect socket connection
|
|
2507
2525
|
* @return void
|
|
2508
2526
|
*/
|
|
2509
|
-
|
|
2510
|
-
|
|
2527
|
+
async start() {
|
|
2528
|
+
this.socket && this.socket.connected || (this.socket.connect(), this.interval = setInterval(async () => {
|
|
2529
|
+
await this.emitLogs();
|
|
2530
|
+
}, this.socketEmitInterval));
|
|
2511
2531
|
}
|
|
2512
2532
|
/**
|
|
2513
2533
|
* Used to overload the global console object by logger methods.
|
|
@@ -2552,7 +2572,7 @@ class xo {
|
|
|
2552
2572
|
* @return string
|
|
2553
2573
|
*/
|
|
2554
2574
|
getStorageName() {
|
|
2555
|
-
const e =
|
|
2575
|
+
const e = So();
|
|
2556
2576
|
return this.system.toString().toUpperCase() + e + Date.now();
|
|
2557
2577
|
}
|
|
2558
2578
|
/**
|
|
@@ -2680,7 +2700,7 @@ class Ro {
|
|
|
2680
2700
|
email: this.eventsSdkClass.options.email && this.eventsSdkClass.options.email,
|
|
2681
2701
|
password: this.eventsSdkClass.options.password && this.eventsSdkClass.options.password
|
|
2682
2702
|
};
|
|
2683
|
-
if (this.storageKey =
|
|
2703
|
+
if (this.storageKey = Dr(JSON.stringify({
|
|
2684
2704
|
...this.eventsSdkClass.options,
|
|
2685
2705
|
loggerSocketConnection: null
|
|
2686
2706
|
}, this.eventsSdkClass.getCircularReplacer())), this.lastLoginTimestamp && this.lastLoginTimestamp + this.delay > (/* @__PURE__ */ new Date()).getTime())
|
|
@@ -2792,10 +2812,10 @@ class Ro {
|
|
|
2792
2812
|
throw new Error("Unauthorized. Invalid token provided");
|
|
2793
2813
|
if (!h.ok && h.status === 403)
|
|
2794
2814
|
throw new Error("Forbidden. Identity token not provided or not valid");
|
|
2795
|
-
const
|
|
2796
|
-
if (
|
|
2797
|
-
throw new Error(
|
|
2798
|
-
return
|
|
2815
|
+
const f = await h.json();
|
|
2816
|
+
if (f.error)
|
|
2817
|
+
throw new Error(f.error);
|
|
2818
|
+
return f;
|
|
2799
2819
|
} catch (h) {
|
|
2800
2820
|
throw this.eventsSdkClass.loggerClass.log({
|
|
2801
2821
|
Message: `External login request error with the login type ${it} ${i === it.TOKEN ? { token: n } : {
|
|
@@ -2860,7 +2880,7 @@ class Ro {
|
|
|
2860
2880
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
2861
2881
|
}
|
|
2862
2882
|
}
|
|
2863
|
-
const
|
|
2883
|
+
const Bo = {
|
|
2864
2884
|
isNewStack: !1,
|
|
2865
2885
|
loginUrl: "https://loginapi.voicenter.co.il/monitorAPI/Login",
|
|
2866
2886
|
refreshTokenUrl: "https://loginapi.voicenter.co.il/monitorAPI/RefreshIdentityToken",
|
|
@@ -2894,13 +2914,13 @@ const Io = {
|
|
|
2894
2914
|
debug: !1
|
|
2895
2915
|
}
|
|
2896
2916
|
};
|
|
2897
|
-
function
|
|
2917
|
+
function _o() {
|
|
2898
2918
|
return typeof window < "u" && (typeof window.navigator > "u" || typeof window.navigator.userAgent > "u") && (window.navigator.userAgent = "react-native"), function t(e, r, n) {
|
|
2899
|
-
function o(h,
|
|
2919
|
+
function o(h, f) {
|
|
2900
2920
|
if (!r[h]) {
|
|
2901
2921
|
if (!e[h]) {
|
|
2902
2922
|
var c = typeof require == "function" && require;
|
|
2903
|
-
if (!
|
|
2923
|
+
if (!f && c)
|
|
2904
2924
|
return c(h, !0);
|
|
2905
2925
|
if (i)
|
|
2906
2926
|
return i(h, !0);
|
|
@@ -2924,12 +2944,12 @@ function Bo() {
|
|
|
2924
2944
|
2: [function(t, e, r) {
|
|
2925
2945
|
function n(c, l) {
|
|
2926
2946
|
typeof c == "object" && (l = c, c = void 0), l = l || {};
|
|
2927
|
-
var p, a = o(c), s = a.source,
|
|
2928
|
-
return l.forceNew || l["force new connection"] || l.multiplex === !1 ? (h("ignoring socket cache for %s", s), p = u(s, l)) : (d
|
|
2947
|
+
var p, a = o(c), s = a.source, d = a.id;
|
|
2948
|
+
return l.forceNew || l["force new connection"] || l.multiplex === !1 ? (h("ignoring socket cache for %s", s), p = u(s, l)) : (f[d] || (h("new io instance for %s", s), f[d] = u(s, l)), p = f[d]), p.socket(a.path);
|
|
2929
2949
|
}
|
|
2930
2950
|
var o = t("./url"), i = t("socket.io-parser"), u = t("./manager"), h = t("debug")("socket.io-client");
|
|
2931
2951
|
e.exports = r = n;
|
|
2932
|
-
var
|
|
2952
|
+
var f = r.managers = {};
|
|
2933
2953
|
r.protocol = i.protocol, r.connect = n, r.Manager = t("./manager"), r.Socket = t("./socket");
|
|
2934
2954
|
}, { "./manager": 3, "./socket": 5, "./url": 6, debug: 10, "socket.io-parser": 44 }],
|
|
2935
2955
|
3: [function(t, e) {
|
|
@@ -2940,7 +2960,7 @@ function Bo() {
|
|
|
2940
2960
|
jitter: this.randomizationFactor()
|
|
2941
2961
|
}), this.timeout(s.timeout == null ? 2e4 : s.timeout), this.readyState = "closed", this.uri = a, this.connected = [], this.encoding = !1, this.packetBuffer = [], this.encoder = new u.Encoder(), this.decoder = new u.Decoder(), this.autoConnect = s.autoConnect !== !1, void (this.autoConnect && this.open())) : new r(a, s);
|
|
2942
2962
|
}
|
|
2943
|
-
var n = (t("./url"), t("engine.io-client")), o = t("./socket"), i = t("component-emitter"), u = t("socket.io-parser"), h = t("./on"),
|
|
2963
|
+
var n = (t("./url"), t("engine.io-client")), o = t("./socket"), i = t("component-emitter"), u = t("socket.io-parser"), h = t("./on"), f = t("component-bind"), c = (t("object-component"), t("debug")("socket.io-client:manager")), l = t("indexof"), p = t("backo2");
|
|
2944
2964
|
e.exports = r, r.prototype.emitAll = function() {
|
|
2945
2965
|
this.emit.apply(this, arguments);
|
|
2946
2966
|
for (var a in this.nsps)
|
|
@@ -2966,22 +2986,22 @@ function Bo() {
|
|
|
2966
2986
|
if (c("readyState %s", this.readyState), ~this.readyState.indexOf("open"))
|
|
2967
2987
|
return this;
|
|
2968
2988
|
c("opening %s", this.uri), this.engine = n(this.uri, this.opts);
|
|
2969
|
-
var s = this.engine,
|
|
2989
|
+
var s = this.engine, d = this;
|
|
2970
2990
|
this.readyState = "opening", this.skipReconnect = !1;
|
|
2971
2991
|
var y = h(s, "open", function() {
|
|
2972
|
-
|
|
2992
|
+
d.onopen(), a && a();
|
|
2973
2993
|
}), g = h(s, "error", function(_) {
|
|
2974
|
-
if (c("connect_error"),
|
|
2994
|
+
if (c("connect_error"), d.cleanup(), d.readyState = "closed", d.emitAll("connect_error", _), a) {
|
|
2975
2995
|
var b = new Error("Connection error");
|
|
2976
2996
|
b.data = _, a(b);
|
|
2977
2997
|
} else
|
|
2978
|
-
|
|
2998
|
+
d.maybeReconnectOnOpen();
|
|
2979
2999
|
});
|
|
2980
3000
|
if (this._timeout !== !1) {
|
|
2981
3001
|
var w = this._timeout;
|
|
2982
3002
|
c("connect attempt will timeout after %d", w);
|
|
2983
3003
|
var B = setTimeout(function() {
|
|
2984
|
-
c("connect attempt timed out after %d", w), y.destroy(), s.close(), s.emit("error", "timeout"),
|
|
3004
|
+
c("connect attempt timed out after %d", w), y.destroy(), s.close(), s.emit("error", "timeout"), d.emitAll("connect_timeout", w);
|
|
2985
3005
|
}, w);
|
|
2986
3006
|
this.subs.push({
|
|
2987
3007
|
destroy: function() {
|
|
@@ -2993,7 +3013,7 @@ function Bo() {
|
|
|
2993
3013
|
}, r.prototype.onopen = function() {
|
|
2994
3014
|
c("open"), this.cleanup(), this.readyState = "open", this.emit("open");
|
|
2995
3015
|
var a = this.engine;
|
|
2996
|
-
this.subs.push(h(a, "data",
|
|
3016
|
+
this.subs.push(h(a, "data", f(this, "ondata"))), this.subs.push(h(this.decoder, "decoded", f(this, "ondecoded"))), this.subs.push(h(a, "error", f(this, "onerror"))), this.subs.push(h(a, "close", f(this, "onclose")));
|
|
2997
3017
|
}, r.prototype.ondata = function(a) {
|
|
2998
3018
|
this.decoder.add(a);
|
|
2999
3019
|
}, r.prototype.ondecoded = function(a) {
|
|
@@ -3004,9 +3024,9 @@ function Bo() {
|
|
|
3004
3024
|
var s = this.nsps[a];
|
|
3005
3025
|
if (!s) {
|
|
3006
3026
|
s = new o(this, a), this.nsps[a] = s;
|
|
3007
|
-
var
|
|
3027
|
+
var d = this;
|
|
3008
3028
|
s.on("connect", function() {
|
|
3009
|
-
s.id =
|
|
3029
|
+
s.id = d.engine.id, ~l(d.connected, s) || d.connected.push(s);
|
|
3010
3030
|
});
|
|
3011
3031
|
}
|
|
3012
3032
|
return s;
|
|
@@ -3016,9 +3036,9 @@ function Bo() {
|
|
|
3016
3036
|
}, r.prototype.packet = function(a) {
|
|
3017
3037
|
c("writing packet %j", a);
|
|
3018
3038
|
var s = this;
|
|
3019
|
-
s.encoding ? s.packetBuffer.push(a) : (s.encoding = !0, this.encoder.encode(a, function(
|
|
3020
|
-
for (var y = 0; y <
|
|
3021
|
-
s.engine.write(
|
|
3039
|
+
s.encoding ? s.packetBuffer.push(a) : (s.encoding = !0, this.encoder.encode(a, function(d) {
|
|
3040
|
+
for (var y = 0; y < d.length; y++)
|
|
3041
|
+
s.engine.write(d[y]);
|
|
3022
3042
|
s.encoding = !1, s.processPacketQueue();
|
|
3023
3043
|
}));
|
|
3024
3044
|
}, r.prototype.processPacketQueue = function() {
|
|
@@ -3043,14 +3063,14 @@ function Bo() {
|
|
|
3043
3063
|
else {
|
|
3044
3064
|
var s = this.backoff.duration();
|
|
3045
3065
|
c("will wait %dms before reconnect attempt", s), this.reconnecting = !0;
|
|
3046
|
-
var
|
|
3066
|
+
var d = setTimeout(function() {
|
|
3047
3067
|
a.skipReconnect || (c("attempting reconnect"), a.emitAll("reconnect_attempt", a.backoff.attempts), a.emitAll("reconnecting", a.backoff.attempts), a.skipReconnect || a.open(function(y) {
|
|
3048
3068
|
y ? (c("reconnect attempt error"), a.reconnecting = !1, a.reconnect(), a.emitAll("reconnect_error", y.data)) : (c("reconnect success"), a.onreconnect());
|
|
3049
3069
|
}));
|
|
3050
3070
|
}, s);
|
|
3051
3071
|
this.subs.push({
|
|
3052
3072
|
destroy: function() {
|
|
3053
|
-
clearTimeout(
|
|
3073
|
+
clearTimeout(d);
|
|
3054
3074
|
}
|
|
3055
3075
|
});
|
|
3056
3076
|
}
|
|
@@ -3082,10 +3102,10 @@ function Bo() {
|
|
|
3082
3102
|
e.exports = r;
|
|
3083
3103
|
}, {}],
|
|
3084
3104
|
5: [function(t, e, r) {
|
|
3085
|
-
function n(s,
|
|
3086
|
-
this.io = s, this.nsp =
|
|
3105
|
+
function n(s, d) {
|
|
3106
|
+
this.io = s, this.nsp = d, this.json = this, this.ids = 0, this.acks = {}, this.io.autoConnect && this.open(), this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0;
|
|
3087
3107
|
}
|
|
3088
|
-
var o = t("socket.io-parser"), i = t("component-emitter"), u = t("to-array"), h = t("./on"),
|
|
3108
|
+
var o = t("socket.io-parser"), i = t("component-emitter"), u = t("to-array"), h = t("./on"), f = t("component-bind"), c = t("debug")("socket.io-client:socket"), l = t("has-binary");
|
|
3089
3109
|
e.exports = n;
|
|
3090
3110
|
var p = {
|
|
3091
3111
|
connect: 1,
|
|
@@ -3102,7 +3122,7 @@ function Bo() {
|
|
|
3102
3122
|
i(n.prototype), n.prototype.subEvents = function() {
|
|
3103
3123
|
if (!this.subs) {
|
|
3104
3124
|
var s = this.io;
|
|
3105
|
-
this.subs = [h(s, "open",
|
|
3125
|
+
this.subs = [h(s, "open", f(this, "onopen")), h(s, "packet", f(this, "onpacket")), h(s, "close", f(this, "onclose"))];
|
|
3106
3126
|
}
|
|
3107
3127
|
}, n.prototype.open = n.prototype.connect = function() {
|
|
3108
3128
|
return this.connected ? this : (this.subEvents(), this.io.open(), this.io.readyState == "open" && this.onopen(), this);
|
|
@@ -3112,10 +3132,10 @@ function Bo() {
|
|
|
3112
3132
|
}, n.prototype.emit = function(s) {
|
|
3113
3133
|
if (p.hasOwnProperty(s))
|
|
3114
3134
|
return a.apply(this, arguments), this;
|
|
3115
|
-
var
|
|
3116
|
-
l(
|
|
3117
|
-
var g = { type: y, data:
|
|
3118
|
-
return typeof
|
|
3135
|
+
var d = u(arguments), y = o.EVENT;
|
|
3136
|
+
l(d) && (y = o.BINARY_EVENT);
|
|
3137
|
+
var g = { type: y, data: d };
|
|
3138
|
+
return typeof d[d.length - 1] == "function" && (c("emitting packet with ack id %d", this.ids), this.acks[this.ids] = d.pop(), g.id = this.ids++), this.connected ? this.packet(g) : this.sendBuffer.push(g), this;
|
|
3119
3139
|
}, n.prototype.packet = function(s) {
|
|
3120
3140
|
s.nsp = this.nsp, this.io.packet(s);
|
|
3121
3141
|
}, n.prototype.onopen = function() {
|
|
@@ -3147,23 +3167,23 @@ function Bo() {
|
|
|
3147
3167
|
this.emit("error", s.data);
|
|
3148
3168
|
}
|
|
3149
3169
|
}, n.prototype.onevent = function(s) {
|
|
3150
|
-
var
|
|
3151
|
-
c("emitting event %j",
|
|
3170
|
+
var d = s.data || [];
|
|
3171
|
+
c("emitting event %j", d), s.id != null && (c("attaching ack callback to event"), d.push(this.ack(s.id))), this.connected ? a.apply(this, d) : this.receiveBuffer.push(d);
|
|
3152
3172
|
}, n.prototype.ack = function(s) {
|
|
3153
|
-
var
|
|
3173
|
+
var d = this, y = !1;
|
|
3154
3174
|
return function() {
|
|
3155
3175
|
if (!y) {
|
|
3156
3176
|
y = !0;
|
|
3157
3177
|
var g = u(arguments);
|
|
3158
3178
|
c("sending ack %j", g);
|
|
3159
3179
|
var w = l(g) ? o.BINARY_ACK : o.ACK;
|
|
3160
|
-
|
|
3180
|
+
d.packet({ type: w, id: s, data: g });
|
|
3161
3181
|
}
|
|
3162
3182
|
};
|
|
3163
3183
|
}, n.prototype.onack = function(s) {
|
|
3164
3184
|
c("calling ack %s with %j", s.id, s.data);
|
|
3165
|
-
var
|
|
3166
|
-
|
|
3185
|
+
var d = this.acks[s.id];
|
|
3186
|
+
d.apply(this, s.data), delete this.acks[s.id];
|
|
3167
3187
|
}, n.prototype.onconnect = function() {
|
|
3168
3188
|
this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered();
|
|
3169
3189
|
}, n.prototype.emitBuffered = function() {
|
|
@@ -3197,8 +3217,8 @@ function Bo() {
|
|
|
3197
3217
|
6: [function(t, e) {
|
|
3198
3218
|
(function(r) {
|
|
3199
3219
|
function n(u, c) {
|
|
3200
|
-
var
|
|
3201
|
-
return u == null && (u = c.protocol + "//" + c.host), typeof u == "string" && (u.charAt(0) == "/" && (u = u.charAt(1) == "/" ? c.protocol + u : c.hostname + u), /^(https?|wss?):\/\//.test(u) || (i("protocol-less url %s", u), u = typeof c < "u" ? c.protocol + "//" + u : "https://" + u), i("parse %s", u),
|
|
3220
|
+
var f = u, c = c || r.location;
|
|
3221
|
+
return u == null && (u = c.protocol + "//" + c.host), typeof u == "string" && (u.charAt(0) == "/" && (u = u.charAt(1) == "/" ? c.protocol + u : c.hostname + u), /^(https?|wss?):\/\//.test(u) || (i("protocol-less url %s", u), u = typeof c < "u" ? c.protocol + "//" + u : "https://" + u), i("parse %s", u), f = o(u)), f.port || (/^(http|ws)$/.test(f.protocol) ? f.port = "80" : /^(http|ws)s$/.test(f.protocol) && (f.port = "443")), f.path = f.path || "/", f.id = f.protocol + "://" + f.host + ":" + f.port, f.href = f.protocol + "://" + f.host + (c && c.port == f.port ? "" : ":" + f.port), f;
|
|
3202
3222
|
}
|
|
3203
3223
|
var o = t("parseuri"), i = t("debug")("socket.io-client:url");
|
|
3204
3224
|
e.exports = n;
|
|
@@ -3261,9 +3281,9 @@ function Bo() {
|
|
|
3261
3281
|
return this;
|
|
3262
3282
|
if (arguments.length == 1)
|
|
3263
3283
|
return delete this._callbacks[o], this;
|
|
3264
|
-
for (var h,
|
|
3265
|
-
if (h = u[
|
|
3266
|
-
u.splice(
|
|
3284
|
+
for (var h, f = 0; f < u.length; f++)
|
|
3285
|
+
if (h = u[f], h === i || h.fn === i) {
|
|
3286
|
+
u.splice(f, 1);
|
|
3267
3287
|
break;
|
|
3268
3288
|
}
|
|
3269
3289
|
return this;
|
|
@@ -3272,7 +3292,7 @@ function Bo() {
|
|
|
3272
3292
|
var i = [].slice.call(arguments, 1), u = this._callbacks[o];
|
|
3273
3293
|
if (u) {
|
|
3274
3294
|
u = u.slice(0);
|
|
3275
|
-
for (var h = 0,
|
|
3295
|
+
for (var h = 0, f = u.length; f > h; ++h)
|
|
3276
3296
|
u[h].apply(this, i);
|
|
3277
3297
|
}
|
|
3278
3298
|
return this;
|
|
@@ -3328,33 +3348,33 @@ function Bo() {
|
|
|
3328
3348
|
}, { "./socket": 13, "engine.io-parser": 25 }],
|
|
3329
3349
|
13: [function(t, e) {
|
|
3330
3350
|
(function(r) {
|
|
3331
|
-
function n(s,
|
|
3351
|
+
function n(s, d) {
|
|
3332
3352
|
if (!(this instanceof n))
|
|
3333
|
-
return new n(s,
|
|
3334
|
-
if (
|
|
3335
|
-
var y =
|
|
3336
|
-
|
|
3353
|
+
return new n(s, d);
|
|
3354
|
+
if (d = d || {}, s && typeof s == "object" && (d = s, s = null), s && (s = l(s), d.host = s.host, d.secure = s.protocol == "https" || s.protocol == "wss", d.port = s.port, s.query && (d.query = s.query)), this.secure = d.secure != null ? d.secure : r.location && location.protocol == "https:", d.host) {
|
|
3355
|
+
var y = d.host.split(":");
|
|
3356
|
+
d.hostname = y.shift(), y.length ? d.port = y.pop() : d.port || (d.port = this.secure ? "443" : "80");
|
|
3337
3357
|
}
|
|
3338
|
-
this.agent =
|
|
3358
|
+
this.agent = d.agent || !1, this.hostname = d.hostname || (r.location ? location.hostname : "localhost"), this.port = d.port || (r.location && location.port ? location.port : this.secure ? 443 : 80), this.query = d.query || {}, typeof this.query == "string" && (this.query = a.decode(this.query)), this.upgrade = d.upgrade !== !1, this.path = (d.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!d.forceJSONP, this.jsonp = d.jsonp !== !1, this.forceBase64 = !!d.forceBase64, this.enablesXDR = !!d.enablesXDR, this.timestampParam = d.timestampParam || "t", this.timestampRequests = d.timestampRequests, this.transports = d.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.callbackBuffer = [], this.policyPort = d.policyPort || 843, this.rememberUpgrade = d.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = d.onlyBinaryUpgrades, this.pfx = d.pfx || null, this.key = d.key || null, this.passphrase = d.passphrase || null, this.cert = d.cert || null, this.ca = d.ca || null, this.ciphers = d.ciphers || null, this.rejectUnauthorized = d.rejectUnauthorized || null, this.open();
|
|
3339
3359
|
}
|
|
3340
3360
|
function o(s) {
|
|
3341
|
-
var
|
|
3361
|
+
var d = {};
|
|
3342
3362
|
for (var y in s)
|
|
3343
|
-
s.hasOwnProperty(y) && (
|
|
3344
|
-
return
|
|
3363
|
+
s.hasOwnProperty(y) && (d[y] = s[y]);
|
|
3364
|
+
return d;
|
|
3345
3365
|
}
|
|
3346
|
-
var i = t("./transports"), u = t("component-emitter"), h = t("debug")("engine.io-client:socket"),
|
|
3366
|
+
var i = t("./transports"), u = t("component-emitter"), h = t("debug")("engine.io-client:socket"), f = t("indexof"), c = t("engine.io-parser"), l = t("parseuri"), p = t("parsejson"), a = t("parseqs");
|
|
3347
3367
|
e.exports = n, n.priorWebsocketSuccess = !1, u(n.prototype), n.protocol = c.protocol, n.Socket = n, n.Transport = t("./transport"), n.transports = t("./transports"), n.parser = t("engine.io-parser"), n.prototype.createTransport = function(s) {
|
|
3348
3368
|
h('creating transport "%s"', s);
|
|
3349
|
-
var
|
|
3350
|
-
|
|
3369
|
+
var d = o(this.query);
|
|
3370
|
+
d.EIO = c.protocol, d.transport = s, this.id && (d.sid = this.id);
|
|
3351
3371
|
var y = new i[s]({
|
|
3352
3372
|
agent: this.agent,
|
|
3353
3373
|
hostname: this.hostname,
|
|
3354
3374
|
port: this.port,
|
|
3355
3375
|
secure: this.secure,
|
|
3356
3376
|
path: this.path,
|
|
3357
|
-
query:
|
|
3377
|
+
query: d,
|
|
3358
3378
|
forceJSONP: this.forceJSONP,
|
|
3359
3379
|
jsonp: this.jsonp,
|
|
3360
3380
|
forceBase64: this.forceBase64,
|
|
@@ -3373,9 +3393,9 @@ function Bo() {
|
|
|
3373
3393
|
});
|
|
3374
3394
|
return y;
|
|
3375
3395
|
}, n.prototype.open = function() {
|
|
3376
|
-
var
|
|
3396
|
+
var d;
|
|
3377
3397
|
if (this.rememberUpgrade && n.priorWebsocketSuccess && this.transports.indexOf("websocket") != -1)
|
|
3378
|
-
|
|
3398
|
+
d = "websocket";
|
|
3379
3399
|
else {
|
|
3380
3400
|
if (this.transports.length == 0) {
|
|
3381
3401
|
var s = this;
|
|
@@ -3383,30 +3403,30 @@ function Bo() {
|
|
|
3383
3403
|
s.emit("error", "No transports available");
|
|
3384
3404
|
}, 0);
|
|
3385
3405
|
}
|
|
3386
|
-
|
|
3406
|
+
d = this.transports[0];
|
|
3387
3407
|
}
|
|
3388
3408
|
this.readyState = "opening";
|
|
3389
|
-
var
|
|
3409
|
+
var d;
|
|
3390
3410
|
try {
|
|
3391
|
-
|
|
3411
|
+
d = this.createTransport(d);
|
|
3392
3412
|
} catch {
|
|
3393
3413
|
return this.transports.shift(), void this.open();
|
|
3394
3414
|
}
|
|
3395
|
-
|
|
3415
|
+
d.open(), this.setTransport(d);
|
|
3396
3416
|
}, n.prototype.setTransport = function(s) {
|
|
3397
3417
|
h("setting transport %s", s.name);
|
|
3398
|
-
var
|
|
3418
|
+
var d = this;
|
|
3399
3419
|
this.transport && (h("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = s, s.on("drain", function() {
|
|
3400
|
-
|
|
3420
|
+
d.onDrain();
|
|
3401
3421
|
}).on("packet", function(y) {
|
|
3402
|
-
|
|
3422
|
+
d.onPacket(y);
|
|
3403
3423
|
}).on("error", function(y) {
|
|
3404
|
-
|
|
3424
|
+
d.onError(y);
|
|
3405
3425
|
}).on("close", function() {
|
|
3406
|
-
|
|
3426
|
+
d.onClose("transport close");
|
|
3407
3427
|
});
|
|
3408
3428
|
}, n.prototype.probe = function(s) {
|
|
3409
|
-
function
|
|
3429
|
+
function d() {
|
|
3410
3430
|
if (C.onlyBinaryUpgrades) {
|
|
3411
3431
|
var E = !this.supportsBinary && C.transport.supportsBinary;
|
|
3412
3432
|
m = m || E;
|
|
@@ -3446,15 +3466,15 @@ function Bo() {
|
|
|
3446
3466
|
S && E.name != S.name && (h('"%s" works - aborting "%s"', E.name, S.name), y());
|
|
3447
3467
|
}
|
|
3448
3468
|
function b() {
|
|
3449
|
-
S.removeListener("open",
|
|
3469
|
+
S.removeListener("open", d), S.removeListener("error", g), S.removeListener("close", w), C.removeListener("close", B), C.removeListener("upgrading", _);
|
|
3450
3470
|
}
|
|
3451
3471
|
h('probing transport "%s"', s);
|
|
3452
3472
|
var S = this.createTransport(s, { probe: 1 }), m = !1, C = this;
|
|
3453
|
-
n.priorWebsocketSuccess = !1, S.once("open",
|
|
3473
|
+
n.priorWebsocketSuccess = !1, S.once("open", d), S.once("error", g), S.once("close", w), this.once("close", B), this.once("upgrading", _), S.open();
|
|
3454
3474
|
}, n.prototype.onOpen = function() {
|
|
3455
3475
|
if (h("socket open"), this.readyState = "open", n.priorWebsocketSuccess = this.transport.name == "websocket", this.emit("open"), this.flush(), this.readyState == "open" && this.upgrade && this.transport.pause) {
|
|
3456
3476
|
h("starting upgrade probes");
|
|
3457
|
-
for (var s = 0,
|
|
3477
|
+
for (var s = 0, d = this.upgrades.length; d > s; s++)
|
|
3458
3478
|
this.probe(this.upgrades[s]);
|
|
3459
3479
|
}
|
|
3460
3480
|
}, n.prototype.onPacket = function(s) {
|
|
@@ -3467,8 +3487,8 @@ function Bo() {
|
|
|
3467
3487
|
this.setPing();
|
|
3468
3488
|
break;
|
|
3469
3489
|
case "error":
|
|
3470
|
-
var
|
|
3471
|
-
|
|
3490
|
+
var d = new Error("server error");
|
|
3491
|
+
d.code = s.data, this.emit("error", d);
|
|
3472
3492
|
break;
|
|
3473
3493
|
case "message":
|
|
3474
3494
|
this.emit("data", s.data), this.emit("message", s.data);
|
|
@@ -3479,10 +3499,10 @@ function Bo() {
|
|
|
3479
3499
|
this.emit("handshake", s), this.id = s.sid, this.transport.query.sid = s.sid, this.upgrades = this.filterUpgrades(s.upgrades), this.pingInterval = s.pingInterval, this.pingTimeout = s.pingTimeout, this.onOpen(), this.readyState != "closed" && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));
|
|
3480
3500
|
}, n.prototype.onHeartbeat = function(s) {
|
|
3481
3501
|
clearTimeout(this.pingTimeoutTimer);
|
|
3482
|
-
var
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
}, s ||
|
|
3502
|
+
var d = this;
|
|
3503
|
+
d.pingTimeoutTimer = setTimeout(function() {
|
|
3504
|
+
d.readyState != "closed" && d.onClose("ping timeout");
|
|
3505
|
+
}, s || d.pingInterval + d.pingTimeout);
|
|
3486
3506
|
}, n.prototype.setPing = function() {
|
|
3487
3507
|
var s = this;
|
|
3488
3508
|
clearTimeout(s.pingIntervalTimer), s.pingIntervalTimer = setTimeout(function() {
|
|
@@ -3496,22 +3516,22 @@ function Bo() {
|
|
|
3496
3516
|
this.writeBuffer.splice(0, this.prevBufferLen), this.callbackBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, this.writeBuffer.length == 0 ? this.emit("drain") : this.flush();
|
|
3497
3517
|
}, n.prototype.flush = function() {
|
|
3498
3518
|
this.readyState != "closed" && this.transport.writable && !this.upgrading && this.writeBuffer.length && (h("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));
|
|
3499
|
-
}, n.prototype.write = n.prototype.send = function(s,
|
|
3500
|
-
return this.sendPacket("message", s,
|
|
3501
|
-
}, n.prototype.sendPacket = function(s,
|
|
3519
|
+
}, n.prototype.write = n.prototype.send = function(s, d) {
|
|
3520
|
+
return this.sendPacket("message", s, d), this;
|
|
3521
|
+
}, n.prototype.sendPacket = function(s, d, y) {
|
|
3502
3522
|
if (this.readyState != "closing" && this.readyState != "closed") {
|
|
3503
|
-
var g = { type: s, data:
|
|
3523
|
+
var g = { type: s, data: d };
|
|
3504
3524
|
this.emit("packetCreate", g), this.writeBuffer.push(g), this.callbackBuffer.push(y), this.flush();
|
|
3505
3525
|
}
|
|
3506
3526
|
}, n.prototype.close = function() {
|
|
3507
3527
|
function s() {
|
|
3508
3528
|
g.onClose("forced close"), h("socket closing - telling transport to close"), g.transport.close();
|
|
3509
3529
|
}
|
|
3510
|
-
function
|
|
3511
|
-
g.removeListener("upgrade",
|
|
3530
|
+
function d() {
|
|
3531
|
+
g.removeListener("upgrade", d), g.removeListener("upgradeError", d), s();
|
|
3512
3532
|
}
|
|
3513
3533
|
function y() {
|
|
3514
|
-
g.once("upgrade",
|
|
3534
|
+
g.once("upgrade", d), g.once("upgradeError", d);
|
|
3515
3535
|
}
|
|
3516
3536
|
if (this.readyState == "opening" || this.readyState == "open") {
|
|
3517
3537
|
this.readyState = "closing";
|
|
@@ -3523,18 +3543,18 @@ function Bo() {
|
|
|
3523
3543
|
return this;
|
|
3524
3544
|
}, n.prototype.onError = function(s) {
|
|
3525
3545
|
h("socket error %j", s), n.priorWebsocketSuccess = !1, this.emit("error", s), this.onClose("transport error", s);
|
|
3526
|
-
}, n.prototype.onClose = function(s,
|
|
3546
|
+
}, n.prototype.onClose = function(s, d) {
|
|
3527
3547
|
if (this.readyState == "opening" || this.readyState == "open" || this.readyState == "closing") {
|
|
3528
3548
|
h('socket close with reason: "%s"', s);
|
|
3529
3549
|
var y = this;
|
|
3530
3550
|
clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), setTimeout(function() {
|
|
3531
3551
|
y.writeBuffer = [], y.callbackBuffer = [], y.prevBufferLen = 0;
|
|
3532
|
-
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", s,
|
|
3552
|
+
}, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", s, d);
|
|
3533
3553
|
}
|
|
3534
3554
|
}, n.prototype.filterUpgrades = function(s) {
|
|
3535
|
-
for (var
|
|
3536
|
-
~
|
|
3537
|
-
return
|
|
3555
|
+
for (var d = [], y = 0, g = s.length; g > y; y++)
|
|
3556
|
+
~f(this.transports, s[y]) && d.push(s[y]);
|
|
3557
|
+
return d;
|
|
3538
3558
|
};
|
|
3539
3559
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
3540
3560
|
}, {
|
|
@@ -3580,8 +3600,8 @@ function Bo() {
|
|
|
3580
3600
|
function o(c) {
|
|
3581
3601
|
var l, p = !1, a = !1, s = c.jsonp !== !1;
|
|
3582
3602
|
if (n.location) {
|
|
3583
|
-
var
|
|
3584
|
-
y || (y =
|
|
3603
|
+
var d = location.protocol == "https:", y = location.port;
|
|
3604
|
+
y || (y = d ? 443 : 80), p = c.hostname != location.hostname || y != c.port, a = c.secure != d;
|
|
3585
3605
|
}
|
|
3586
3606
|
if (c.xdomain = p, c.xscheme = a, l = new i(c), "open" in l && !c.forceJSONP)
|
|
3587
3607
|
return new u(c);
|
|
@@ -3589,8 +3609,8 @@ function Bo() {
|
|
|
3589
3609
|
throw new Error("JSONP disabled");
|
|
3590
3610
|
return new h(c);
|
|
3591
3611
|
}
|
|
3592
|
-
var i = t("xmlhttprequest"), u = t("./polling-xhr"), h = t("./polling-jsonp"),
|
|
3593
|
-
r.polling = o, r.websocket =
|
|
3612
|
+
var i = t("xmlhttprequest"), u = t("./polling-xhr"), h = t("./polling-jsonp"), f = t("./websocket");
|
|
3613
|
+
r.polling = o, r.websocket = f;
|
|
3594
3614
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
3595
3615
|
}, { "./polling-jsonp": 16, "./polling-xhr": 17, "./websocket": 19, xmlhttprequest: 20 }],
|
|
3596
3616
|
16: [function(t, e) {
|
|
@@ -3608,53 +3628,53 @@ function Bo() {
|
|
|
3608
3628
|
}
|
|
3609
3629
|
var i = t("./polling"), u = t("component-inherit");
|
|
3610
3630
|
e.exports = o;
|
|
3611
|
-
var h,
|
|
3631
|
+
var h, f = /\n/g, c = /\\n/g;
|
|
3612
3632
|
u(o, i), o.prototype.supportsBinary = !1, o.prototype.doClose = function() {
|
|
3613
3633
|
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), i.prototype.doClose.call(this);
|
|
3614
3634
|
}, o.prototype.doPoll = function() {
|
|
3615
3635
|
var l = this, p = document.createElement("script");
|
|
3616
|
-
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), p.async = !0, p.src = this.uri(), p.onerror = function(
|
|
3617
|
-
l.onError("jsonp poll error",
|
|
3636
|
+
this.script && (this.script.parentNode.removeChild(this.script), this.script = null), p.async = !0, p.src = this.uri(), p.onerror = function(d) {
|
|
3637
|
+
l.onError("jsonp poll error", d);
|
|
3618
3638
|
};
|
|
3619
3639
|
var a = document.getElementsByTagName("script")[0];
|
|
3620
3640
|
a.parentNode.insertBefore(p, a), this.script = p;
|
|
3621
3641
|
var s = typeof navigator < "u" && /gecko/i.test(navigator.userAgent);
|
|
3622
3642
|
s && setTimeout(function() {
|
|
3623
|
-
var
|
|
3624
|
-
document.body.appendChild(
|
|
3643
|
+
var d = document.createElement("iframe");
|
|
3644
|
+
document.body.appendChild(d), document.body.removeChild(d);
|
|
3625
3645
|
}, 100);
|
|
3626
3646
|
}, o.prototype.doWrite = function(l, p) {
|
|
3627
3647
|
function a() {
|
|
3628
3648
|
s(), p();
|
|
3629
3649
|
}
|
|
3630
3650
|
function s() {
|
|
3631
|
-
if (
|
|
3651
|
+
if (d.iframe)
|
|
3632
3652
|
try {
|
|
3633
|
-
|
|
3653
|
+
d.form.removeChild(d.iframe);
|
|
3634
3654
|
} catch (b) {
|
|
3635
|
-
|
|
3655
|
+
d.onError("jsonp polling iframe removal error", b);
|
|
3636
3656
|
}
|
|
3637
3657
|
try {
|
|
3638
|
-
var _ = '<iframe src="javascript:0" name="' +
|
|
3658
|
+
var _ = '<iframe src="javascript:0" name="' + d.iframeId + '">';
|
|
3639
3659
|
y = document.createElement(_);
|
|
3640
3660
|
} catch {
|
|
3641
|
-
y = document.createElement("iframe"), y.name =
|
|
3661
|
+
y = document.createElement("iframe"), y.name = d.iframeId, y.src = "javascript:0";
|
|
3642
3662
|
}
|
|
3643
|
-
y.id =
|
|
3663
|
+
y.id = d.iframeId, d.form.appendChild(y), d.iframe = y;
|
|
3644
3664
|
}
|
|
3645
|
-
var
|
|
3665
|
+
var d = this;
|
|
3646
3666
|
if (!this.form) {
|
|
3647
3667
|
var y, g = document.createElement("form"), w = document.createElement("textarea"), B = this.iframeId = "eio_iframe_" + this.index;
|
|
3648
3668
|
g.className = "socketio", g.style.position = "absolute", g.style.top = "-1000px", g.style.left = "-1000px", g.target = B, g.method = "POST", g.setAttribute("accept-charset", "utf-8"), w.name = "d", g.appendChild(w), document.body.appendChild(g), this.form = g, this.area = w;
|
|
3649
3669
|
}
|
|
3650
3670
|
this.form.action = this.uri(), s(), l = l.replace(c, `\\
|
|
3651
|
-
`), this.area.value = l.replace(
|
|
3671
|
+
`), this.area.value = l.replace(f, "\\n");
|
|
3652
3672
|
try {
|
|
3653
3673
|
this.form.submit();
|
|
3654
3674
|
} catch {
|
|
3655
3675
|
}
|
|
3656
3676
|
this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
|
|
3657
|
-
|
|
3677
|
+
d.iframe.readyState == "complete" && a();
|
|
3658
3678
|
} : this.iframe.onload = a;
|
|
3659
3679
|
};
|
|
3660
3680
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -3664,9 +3684,9 @@ function Bo() {
|
|
|
3664
3684
|
function n() {
|
|
3665
3685
|
}
|
|
3666
3686
|
function o(a) {
|
|
3667
|
-
if (
|
|
3668
|
-
var s = location.protocol == "https:",
|
|
3669
|
-
|
|
3687
|
+
if (f.call(this, a), r.location) {
|
|
3688
|
+
var s = location.protocol == "https:", d = location.port;
|
|
3689
|
+
d || (d = s ? 443 : 80), this.xd = a.hostname != r.location.hostname || d != a.port, this.xs = a.secure != s;
|
|
3670
3690
|
}
|
|
3671
3691
|
}
|
|
3672
3692
|
function i(a) {
|
|
@@ -3676,26 +3696,26 @@ function Bo() {
|
|
|
3676
3696
|
for (var a in i.requests)
|
|
3677
3697
|
i.requests.hasOwnProperty(a) && i.requests[a].abort();
|
|
3678
3698
|
}
|
|
3679
|
-
var h = t("xmlhttprequest"),
|
|
3680
|
-
e.exports = o, e.exports.Request = i, l(o,
|
|
3699
|
+
var h = t("xmlhttprequest"), f = t("./polling"), c = t("component-emitter"), l = t("component-inherit"), p = t("debug")("engine.io-client:polling-xhr");
|
|
3700
|
+
e.exports = o, e.exports.Request = i, l(o, f), o.prototype.supportsBinary = !0, o.prototype.request = function(a) {
|
|
3681
3701
|
return a = a || {}, a.uri = this.uri(), a.xd = this.xd, a.xs = this.xs, a.agent = this.agent || !1, a.supportsBinary = this.supportsBinary, a.enablesXDR = this.enablesXDR, a.pfx = this.pfx, a.key = this.key, a.passphrase = this.passphrase, a.cert = this.cert, a.ca = this.ca, a.ciphers = this.ciphers, a.rejectUnauthorized = this.rejectUnauthorized, new i(a);
|
|
3682
3702
|
}, o.prototype.doWrite = function(a, s) {
|
|
3683
|
-
var
|
|
3703
|
+
var d = typeof a != "string" && a !== void 0, y = this.request({ method: "POST", data: a, isBinary: d }), g = this;
|
|
3684
3704
|
y.on("success", s), y.on("error", function(w) {
|
|
3685
3705
|
g.onError("xhr post error", w);
|
|
3686
3706
|
}), this.sendXhr = y;
|
|
3687
3707
|
}, o.prototype.doPoll = function() {
|
|
3688
3708
|
p("xhr poll");
|
|
3689
3709
|
var a = this.request(), s = this;
|
|
3690
|
-
a.on("data", function(
|
|
3691
|
-
s.onData(
|
|
3692
|
-
}), a.on("error", function(
|
|
3693
|
-
s.onError("xhr poll error",
|
|
3710
|
+
a.on("data", function(d) {
|
|
3711
|
+
s.onData(d);
|
|
3712
|
+
}), a.on("error", function(d) {
|
|
3713
|
+
s.onError("xhr poll error", d);
|
|
3694
3714
|
}), this.pollXhr = a;
|
|
3695
3715
|
}, c(i.prototype), i.prototype.create = function() {
|
|
3696
3716
|
var a = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR };
|
|
3697
3717
|
a.pfx = this.pfx, a.key = this.key, a.passphrase = this.passphrase, a.cert = this.cert, a.ca = this.ca, a.ciphers = this.ciphers, a.rejectUnauthorized = this.rejectUnauthorized;
|
|
3698
|
-
var s = this.xhr = new h(a),
|
|
3718
|
+
var s = this.xhr = new h(a), d = this;
|
|
3699
3719
|
try {
|
|
3700
3720
|
if (p("xhr open %s: %s", this.method, this.uri), s.open(this.method, this.uri, this.async), this.supportsBinary && (s.responseType = "arraybuffer"), this.method == "POST")
|
|
3701
3721
|
try {
|
|
@@ -3703,17 +3723,17 @@ function Bo() {
|
|
|
3703
3723
|
} catch {
|
|
3704
3724
|
}
|
|
3705
3725
|
"withCredentials" in s && (s.withCredentials = !0), this.hasXDR() ? (s.onload = function() {
|
|
3706
|
-
|
|
3726
|
+
d.onLoad();
|
|
3707
3727
|
}, s.onerror = function() {
|
|
3708
|
-
|
|
3728
|
+
d.onError(s.responseText);
|
|
3709
3729
|
}) : s.onreadystatechange = function() {
|
|
3710
|
-
s.readyState == 4 && (s.status == 200 || s.status == 1223 ?
|
|
3711
|
-
|
|
3730
|
+
s.readyState == 4 && (s.status == 200 || s.status == 1223 ? d.onLoad() : setTimeout(function() {
|
|
3731
|
+
d.onError(s.status);
|
|
3712
3732
|
}, 0));
|
|
3713
3733
|
}, p("xhr data %s", this.data), s.send(this.data);
|
|
3714
3734
|
} catch (y) {
|
|
3715
3735
|
return void setTimeout(function() {
|
|
3716
|
-
|
|
3736
|
+
d.onError(y);
|
|
3717
3737
|
}, 0);
|
|
3718
3738
|
}
|
|
3719
3739
|
r.document && (this.index = i.requestsCount++, i.requests[this.index] = this);
|
|
@@ -3741,8 +3761,8 @@ function Bo() {
|
|
|
3741
3761
|
} catch {
|
|
3742
3762
|
}
|
|
3743
3763
|
a = s === "application/octet-stream" ? this.xhr.response : this.supportsBinary ? "ok" : this.xhr.responseText;
|
|
3744
|
-
} catch (
|
|
3745
|
-
this.onError(
|
|
3764
|
+
} catch (d) {
|
|
3765
|
+
this.onError(d);
|
|
3746
3766
|
}
|
|
3747
3767
|
a != null && this.onData(a);
|
|
3748
3768
|
}, i.prototype.hasXDR = function() {
|
|
@@ -3755,11 +3775,11 @@ function Bo() {
|
|
|
3755
3775
|
18: [function(t, e) {
|
|
3756
3776
|
function r(c) {
|
|
3757
3777
|
var l = c && c.forceBase64;
|
|
3758
|
-
(!
|
|
3778
|
+
(!f || l) && (this.supportsBinary = !1), n.call(this, c);
|
|
3759
3779
|
}
|
|
3760
3780
|
var n = t("../transport"), o = t("parseqs"), i = t("engine.io-parser"), u = t("component-inherit"), h = t("debug")("engine.io-client:polling");
|
|
3761
3781
|
e.exports = r;
|
|
3762
|
-
var
|
|
3782
|
+
var f = function() {
|
|
3763
3783
|
var c = t("xmlhttprequest"), l = new c({ xdomain: !1 });
|
|
3764
3784
|
return l.responseType != null;
|
|
3765
3785
|
}();
|
|
@@ -3820,11 +3840,11 @@ function Bo() {
|
|
|
3820
3840
|
var l = c && c.forceBase64;
|
|
3821
3841
|
l && (this.supportsBinary = !1), n.call(this, c);
|
|
3822
3842
|
}
|
|
3823
|
-
var n = t("../transport"), o = t("engine.io-parser"), i = t("parseqs"), u = t("component-inherit"), h = t("debug")("engine.io-client:websocket"),
|
|
3843
|
+
var n = t("../transport"), o = t("engine.io-parser"), i = t("parseqs"), u = t("component-inherit"), h = t("debug")("engine.io-client:websocket"), f = t("ws");
|
|
3824
3844
|
e.exports = r, u(r, n), r.prototype.name = "websocket", r.prototype.supportsBinary = !0, r.prototype.doOpen = function() {
|
|
3825
3845
|
if (this.check()) {
|
|
3826
3846
|
var c = this.uri(), l = void 0, p = { agent: this.agent };
|
|
3827
|
-
p.pfx = this.pfx, p.key = this.key, p.passphrase = this.passphrase, p.cert = this.cert, p.ca = this.ca, p.ciphers = this.ciphers, p.rejectUnauthorized = this.rejectUnauthorized, this.ws = new
|
|
3847
|
+
p.pfx = this.pfx, p.key = this.key, p.passphrase = this.passphrase, p.cert = this.cert, p.ca = this.ca, p.ciphers = this.ciphers, p.rejectUnauthorized = this.rejectUnauthorized, this.ws = new f(c, l, p), this.ws.binaryType === void 0 && (this.supportsBinary = !1), this.ws.binaryType = "arraybuffer", this.addEventListeners();
|
|
3828
3848
|
}
|
|
3829
3849
|
}, r.prototype.addEventListeners = function() {
|
|
3830
3850
|
var c = this;
|
|
@@ -3849,9 +3869,9 @@ function Bo() {
|
|
|
3849
3869
|
var p = this;
|
|
3850
3870
|
this.writable = !1;
|
|
3851
3871
|
for (var a = 0, s = c.length; s > a; a++)
|
|
3852
|
-
o.encodePacket(c[a], this.supportsBinary, function(
|
|
3872
|
+
o.encodePacket(c[a], this.supportsBinary, function(d) {
|
|
3853
3873
|
try {
|
|
3854
|
-
p.ws.send(
|
|
3874
|
+
p.ws.send(d);
|
|
3855
3875
|
} catch {
|
|
3856
3876
|
h("websocket closed before onclose event");
|
|
3857
3877
|
}
|
|
@@ -3865,7 +3885,7 @@ function Bo() {
|
|
|
3865
3885
|
var c = this.query || {}, l = this.secure ? "wss" : "ws", p = "";
|
|
3866
3886
|
return this.port && (l == "wss" && this.port != 443 || l == "ws" && this.port != 80) && (p = ":" + this.port), this.timestampRequests && (c[this.timestampParam] = +/* @__PURE__ */ new Date()), this.supportsBinary || (c.b64 = 1), c = i.encode(c), c.length && (c = "?" + c), l + "://" + this.hostname + p + this.path + c;
|
|
3867
3887
|
}, r.prototype.check = function() {
|
|
3868
|
-
return !(!
|
|
3888
|
+
return !(!f || "__initialize" in f && this.name === r.prototype.name);
|
|
3869
3889
|
};
|
|
3870
3890
|
}, { "../transport": 14, "component-inherit": 21, debug: 22, "engine.io-parser": 25, parseqs: 33, ws: 35 }],
|
|
3871
3891
|
20: [function(t, e) {
|
|
@@ -3901,35 +3921,35 @@ function Bo() {
|
|
|
3901
3921
|
return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31;
|
|
3902
3922
|
}
|
|
3903
3923
|
function o() {
|
|
3904
|
-
var
|
|
3905
|
-
if (
|
|
3906
|
-
return
|
|
3924
|
+
var f = arguments, c = this.useColors;
|
|
3925
|
+
if (f[0] = (c ? "%c" : "") + this.namespace + (c ? " %c" : " ") + f[0] + (c ? "%c " : " ") + "+" + r.humanize(this.diff), !c)
|
|
3926
|
+
return f;
|
|
3907
3927
|
var l = "color: " + this.color;
|
|
3908
|
-
|
|
3928
|
+
f = [f[0], l, "color: inherit"].concat(Array.prototype.slice.call(f, 1));
|
|
3909
3929
|
var p = 0, a = 0;
|
|
3910
|
-
return
|
|
3930
|
+
return f[0].replace(/%[a-z%]/g, function(s) {
|
|
3911
3931
|
s !== "%%" && (p++, s === "%c" && (a = p));
|
|
3912
|
-
}),
|
|
3932
|
+
}), f.splice(a, 0, l), f;
|
|
3913
3933
|
}
|
|
3914
3934
|
function i() {
|
|
3915
3935
|
return typeof console == "object" && typeof console.log == "function" && Function.prototype.apply.call(console.log, console, arguments);
|
|
3916
3936
|
}
|
|
3917
|
-
function u(
|
|
3937
|
+
function u(f) {
|
|
3918
3938
|
try {
|
|
3919
|
-
|
|
3939
|
+
f == null ? localStorage.removeItem("debug") : localStorage.debug = f;
|
|
3920
3940
|
} catch {
|
|
3921
3941
|
}
|
|
3922
3942
|
}
|
|
3923
3943
|
function h() {
|
|
3924
|
-
var
|
|
3944
|
+
var f;
|
|
3925
3945
|
try {
|
|
3926
|
-
|
|
3946
|
+
f = localStorage.debug;
|
|
3927
3947
|
} catch {
|
|
3928
3948
|
}
|
|
3929
|
-
return
|
|
3949
|
+
return f;
|
|
3930
3950
|
}
|
|
3931
|
-
r = e.exports = t("./debug"), r.log = i, r.formatArgs = o, r.save = u, r.load = h, r.useColors = n, r.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], r.formatters.j = function(
|
|
3932
|
-
return JSON.stringify(
|
|
3951
|
+
r = e.exports = t("./debug"), r.log = i, r.formatArgs = o, r.save = u, r.load = h, r.useColors = n, r.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], r.formatters.j = function(f) {
|
|
3952
|
+
return JSON.stringify(f);
|
|
3933
3953
|
}, r.enable(h());
|
|
3934
3954
|
}, { "./debug": 23 }],
|
|
3935
3955
|
23: [function(t, e, r) {
|
|
@@ -3960,13 +3980,13 @@ function Bo() {
|
|
|
3960
3980
|
b.apply(y, B);
|
|
3961
3981
|
}
|
|
3962
3982
|
a.enabled = !1, s.enabled = !0;
|
|
3963
|
-
var
|
|
3964
|
-
return
|
|
3983
|
+
var d = r.enabled(p) ? s : a;
|
|
3984
|
+
return d.namespace = p, d;
|
|
3965
3985
|
}
|
|
3966
3986
|
function i(p) {
|
|
3967
3987
|
r.save(p);
|
|
3968
|
-
for (var a = (p || "").split(/[\s,]+/), s = a.length,
|
|
3969
|
-
a[
|
|
3988
|
+
for (var a = (p || "").split(/[\s,]+/), s = a.length, d = 0; s > d; d++)
|
|
3989
|
+
a[d] && (p = a[d].replace(/\*/g, ".*?"), p[0] === "-" ? r.skips.push(new RegExp("^" + p.substr(1) + "$")) : r.names.push(new RegExp("^" + p + "$")));
|
|
3970
3990
|
}
|
|
3971
3991
|
function u() {
|
|
3972
3992
|
r.enable("");
|
|
@@ -3981,18 +4001,18 @@ function Bo() {
|
|
|
3981
4001
|
return !0;
|
|
3982
4002
|
return !1;
|
|
3983
4003
|
}
|
|
3984
|
-
function
|
|
4004
|
+
function f(p) {
|
|
3985
4005
|
return p instanceof Error ? p.stack || p.message : p;
|
|
3986
4006
|
}
|
|
3987
|
-
r = e.exports = o, r.coerce =
|
|
4007
|
+
r = e.exports = o, r.coerce = f, r.disable = u, r.enable = i, r.enabled = h, r.humanize = t("ms"), r.names = [], r.skips = [], r.formatters = {};
|
|
3988
4008
|
var c, l = 0;
|
|
3989
4009
|
}, { ms: 24 }],
|
|
3990
4010
|
24: [function(t, e) {
|
|
3991
4011
|
function r(p) {
|
|
3992
4012
|
var a = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(p);
|
|
3993
4013
|
if (a) {
|
|
3994
|
-
var s = parseFloat(a[1]),
|
|
3995
|
-
switch (
|
|
4014
|
+
var s = parseFloat(a[1]), d = (a[2] || "ms").toLowerCase();
|
|
4015
|
+
switch (d) {
|
|
3996
4016
|
case "years":
|
|
3997
4017
|
case "year":
|
|
3998
4018
|
case "y":
|
|
@@ -4004,7 +4024,7 @@ function Bo() {
|
|
|
4004
4024
|
case "hours":
|
|
4005
4025
|
case "hour":
|
|
4006
4026
|
case "h":
|
|
4007
|
-
return s *
|
|
4027
|
+
return s * f;
|
|
4008
4028
|
case "minutes":
|
|
4009
4029
|
case "minute":
|
|
4010
4030
|
case "m":
|
|
@@ -4019,15 +4039,15 @@ function Bo() {
|
|
|
4019
4039
|
}
|
|
4020
4040
|
}
|
|
4021
4041
|
function n(p) {
|
|
4022
|
-
return p >= c ? Math.round(p / c) + "d" : p >=
|
|
4042
|
+
return p >= c ? Math.round(p / c) + "d" : p >= f ? Math.round(p / f) + "h" : p >= h ? Math.round(p / h) + "m" : p >= u ? Math.round(p / u) + "s" : p + "ms";
|
|
4023
4043
|
}
|
|
4024
4044
|
function o(p) {
|
|
4025
|
-
return i(p, c, "day") || i(p,
|
|
4045
|
+
return i(p, c, "day") || i(p, f, "hour") || i(p, h, "minute") || i(p, u, "second") || p + " ms";
|
|
4026
4046
|
}
|
|
4027
4047
|
function i(p, a, s) {
|
|
4028
4048
|
return a > p ? void 0 : 1.5 * a > p ? Math.floor(p / a) + " " + s : Math.ceil(p / a) + " " + s + "s";
|
|
4029
4049
|
}
|
|
4030
|
-
var u = 1e3, h = 60 * u,
|
|
4050
|
+
var u = 1e3, h = 60 * u, f = 60 * h, c = 24 * f, l = 365.25 * c;
|
|
4031
4051
|
e.exports = function(p, a) {
|
|
4032
4052
|
return a = a || {}, typeof p == "string" ? r(p) : a.long ? o(p) : n(p);
|
|
4033
4053
|
};
|
|
@@ -4065,7 +4085,7 @@ function Bo() {
|
|
|
4065
4085
|
var k = new S([v.buffer, m.data]);
|
|
4066
4086
|
return E(k);
|
|
4067
4087
|
}
|
|
4068
|
-
function
|
|
4088
|
+
function f(m, C, E) {
|
|
4069
4089
|
for (var v = new Array(m.length), k = s(m.length, E), T = function(x, A, q) {
|
|
4070
4090
|
C(A, function(j, $) {
|
|
4071
4091
|
v[x] = $, q(j, v);
|
|
@@ -4073,7 +4093,7 @@ function Bo() {
|
|
|
4073
4093
|
}, O = 0; O < m.length; O++)
|
|
4074
4094
|
T(O, m[O], k);
|
|
4075
4095
|
}
|
|
4076
|
-
var c = t("./keys"), l = t("has-binary"), p = t("arraybuffer.slice"), a = t("base64-arraybuffer"), s = t("after"),
|
|
4096
|
+
var c = t("./keys"), l = t("has-binary"), p = t("arraybuffer.slice"), a = t("base64-arraybuffer"), s = t("after"), d = t("utf8"), y = navigator.userAgent.match(/Android/i), g = /PhantomJS/i.test(navigator.userAgent), w = y || g;
|
|
4077
4097
|
r.protocol = 3;
|
|
4078
4098
|
var B = r.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 }, _ = c(B), b = { type: "error", data: "parser error" }, S = t("blob");
|
|
4079
4099
|
r.encodePacket = function(m, C, E, v) {
|
|
@@ -4086,7 +4106,7 @@ function Bo() {
|
|
|
4086
4106
|
if (k && k.base64)
|
|
4087
4107
|
return o(m, v);
|
|
4088
4108
|
var T = B[m.type];
|
|
4089
|
-
return m.data !== void 0 && (T += E ?
|
|
4109
|
+
return m.data !== void 0 && (T += E ? d.encode(String(m.data)) : String(m.data)), v("" + T);
|
|
4090
4110
|
}, r.encodeBase64Packet = function(m, C) {
|
|
4091
4111
|
var E = "b" + r.packets[m.type];
|
|
4092
4112
|
if (S && m.data instanceof S) {
|
|
@@ -4111,7 +4131,7 @@ function Bo() {
|
|
|
4111
4131
|
return r.decodeBase64Packet(m.substr(1), C);
|
|
4112
4132
|
if (E)
|
|
4113
4133
|
try {
|
|
4114
|
-
m =
|
|
4134
|
+
m = d.decode(m);
|
|
4115
4135
|
} catch {
|
|
4116
4136
|
return b;
|
|
4117
4137
|
}
|
|
@@ -4140,7 +4160,7 @@ function Bo() {
|
|
|
4140
4160
|
}
|
|
4141
4161
|
typeof C == "function" && (E = C, C = null);
|
|
4142
4162
|
var T = l(m);
|
|
4143
|
-
return C && T ? S && !w ? r.encodePayloadAsBlob(m, E) : r.encodePayloadAsArrayBuffer(m, E) : m.length ? void
|
|
4163
|
+
return C && T ? S && !w ? r.encodePayloadAsBlob(m, E) : r.encodePayloadAsArrayBuffer(m, E) : m.length ? void f(m, k, function(O, x) {
|
|
4144
4164
|
return E(x.join(""));
|
|
4145
4165
|
}) : E("0:");
|
|
4146
4166
|
}, r.decodePayload = function(m, C, E) {
|
|
@@ -4174,7 +4194,7 @@ function Bo() {
|
|
|
4174
4194
|
return k(null, T);
|
|
4175
4195
|
});
|
|
4176
4196
|
}
|
|
4177
|
-
return m.length ? void
|
|
4197
|
+
return m.length ? void f(m, E, function(v, k) {
|
|
4178
4198
|
var T = k.reduce(function(A, q) {
|
|
4179
4199
|
var j;
|
|
4180
4200
|
return j = typeof q == "string" ? q.length : q.byteLength, A + j.toString().length + j + 2;
|
|
@@ -4211,7 +4231,7 @@ function Bo() {
|
|
|
4211
4231
|
}
|
|
4212
4232
|
});
|
|
4213
4233
|
}
|
|
4214
|
-
|
|
4234
|
+
f(m, E, function(v, k) {
|
|
4215
4235
|
return C(new S(k));
|
|
4216
4236
|
});
|
|
4217
4237
|
}, r.decodePayloadAsBinary = function(m, C, E) {
|
|
@@ -4240,8 +4260,8 @@ function Bo() {
|
|
|
4240
4260
|
k.push(j), v = p(v, A);
|
|
4241
4261
|
}
|
|
4242
4262
|
var X = k.length;
|
|
4243
|
-
k.forEach(function(et,
|
|
4244
|
-
E(r.decodePacket(et, C, !0),
|
|
4263
|
+
k.forEach(function(et, Nt) {
|
|
4264
|
+
E(r.decodePacket(et, C, !0), Nt, X);
|
|
4245
4265
|
});
|
|
4246
4266
|
};
|
|
4247
4267
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -4267,9 +4287,9 @@ function Bo() {
|
|
|
4267
4287
|
function h(c, l) {
|
|
4268
4288
|
if (h.count <= 0)
|
|
4269
4289
|
throw new Error("after called too many times");
|
|
4270
|
-
--h.count, c ? (
|
|
4290
|
+
--h.count, c ? (f = !0, i(c), i = u) : h.count !== 0 || f || i(null, l);
|
|
4271
4291
|
}
|
|
4272
|
-
var
|
|
4292
|
+
var f = !1;
|
|
4273
4293
|
return u = u || n, h.count = o, o === 0 ? i() : h;
|
|
4274
4294
|
}
|
|
4275
4295
|
function n() {
|
|
@@ -4283,24 +4303,24 @@ function Bo() {
|
|
|
4283
4303
|
return r.slice(n, o);
|
|
4284
4304
|
if (0 > n && (n += i), 0 > o && (o += i), o > i && (o = i), n >= i || n >= o || i === 0)
|
|
4285
4305
|
return new ArrayBuffer(0);
|
|
4286
|
-
for (var u = new Uint8Array(r), h = new Uint8Array(o - n),
|
|
4287
|
-
h[c] = u[
|
|
4306
|
+
for (var u = new Uint8Array(r), h = new Uint8Array(o - n), f = n, c = 0; o > f; f++, c++)
|
|
4307
|
+
h[c] = u[f];
|
|
4288
4308
|
return h.buffer;
|
|
4289
4309
|
};
|
|
4290
4310
|
}, {}],
|
|
4291
4311
|
29: [function(t, e, r) {
|
|
4292
4312
|
(function(n) {
|
|
4293
4313
|
r.encode = function(o) {
|
|
4294
|
-
var i, u = new Uint8Array(o), h = u.length,
|
|
4314
|
+
var i, u = new Uint8Array(o), h = u.length, f = "";
|
|
4295
4315
|
for (i = 0; h > i; i += 3)
|
|
4296
|
-
|
|
4297
|
-
return h % 3 === 2 ?
|
|
4316
|
+
f += n[u[i] >> 2], f += n[(3 & u[i]) << 4 | u[i + 1] >> 4], f += n[(15 & u[i + 1]) << 2 | u[i + 2] >> 6], f += n[63 & u[i + 2]];
|
|
4317
|
+
return h % 3 === 2 ? f = f.substring(0, f.length - 1) + "=" : h % 3 === 1 && (f = f.substring(0, f.length - 2) + "=="), f;
|
|
4298
4318
|
}, r.decode = function(o) {
|
|
4299
|
-
var i, u, h,
|
|
4319
|
+
var i, u, h, f, c, l = 0.75 * o.length, p = o.length, a = 0;
|
|
4300
4320
|
o[o.length - 1] === "=" && (l--, o[o.length - 2] === "=" && l--);
|
|
4301
|
-
var s = new ArrayBuffer(l),
|
|
4321
|
+
var s = new ArrayBuffer(l), d = new Uint8Array(s);
|
|
4302
4322
|
for (i = 0; p > i; i += 4)
|
|
4303
|
-
u = n.indexOf(o[i]), h = n.indexOf(o[i + 1]),
|
|
4323
|
+
u = n.indexOf(o[i]), h = n.indexOf(o[i + 1]), f = n.indexOf(o[i + 2]), c = n.indexOf(o[i + 3]), d[a++] = u << 2 | h >> 4, d[a++] = (15 & h) << 4 | f >> 2, d[a++] = (3 & f) << 6 | 63 & c;
|
|
4304
4324
|
return s;
|
|
4305
4325
|
};
|
|
4306
4326
|
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
|
|
@@ -4313,8 +4333,8 @@ function Bo() {
|
|
|
4313
4333
|
if (a.buffer instanceof ArrayBuffer) {
|
|
4314
4334
|
var s = a.buffer;
|
|
4315
4335
|
if (a.byteLength !== s.byteLength) {
|
|
4316
|
-
var
|
|
4317
|
-
|
|
4336
|
+
var d = new Uint8Array(a.byteLength);
|
|
4337
|
+
d.set(new Uint8Array(s, a.byteOffset, a.byteLength)), s = d.buffer;
|
|
4318
4338
|
}
|
|
4319
4339
|
l[p] = s;
|
|
4320
4340
|
}
|
|
@@ -4338,7 +4358,7 @@ function Bo() {
|
|
|
4338
4358
|
} catch {
|
|
4339
4359
|
return !1;
|
|
4340
4360
|
}
|
|
4341
|
-
}(),
|
|
4361
|
+
}(), f = h && function() {
|
|
4342
4362
|
try {
|
|
4343
4363
|
var l = new Blob([new Uint8Array([1, 2])]);
|
|
4344
4364
|
return l.size === 2;
|
|
@@ -4347,7 +4367,7 @@ function Bo() {
|
|
|
4347
4367
|
}
|
|
4348
4368
|
}(), c = u && u.prototype.append && u.prototype.getBlob;
|
|
4349
4369
|
e.exports = function() {
|
|
4350
|
-
return h ?
|
|
4370
|
+
return h ? f ? r.Blob : i : c ? o : void 0;
|
|
4351
4371
|
}();
|
|
4352
4372
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
4353
4373
|
}, {}],
|
|
@@ -4368,14 +4388,14 @@ function Bo() {
|
|
|
4368
4388
|
if (v >= 55296 && 57343 >= v)
|
|
4369
4389
|
throw Error("Lone surrogate U+" + v.toString(16).toUpperCase() + " is not a scalar value");
|
|
4370
4390
|
}
|
|
4371
|
-
function
|
|
4391
|
+
function f(v, k) {
|
|
4372
4392
|
return b(v >> k & 63 | 128);
|
|
4373
4393
|
}
|
|
4374
4394
|
function c(v) {
|
|
4375
4395
|
if (!(4294967168 & v))
|
|
4376
4396
|
return b(v);
|
|
4377
4397
|
var k = "";
|
|
4378
|
-
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (k = b(v >> 18 & 7 | 240), k +=
|
|
4398
|
+
return 4294965248 & v ? 4294901760 & v ? !(4292870144 & v) && (k = b(v >> 18 & 7 | 240), k += f(v, 12), k += f(v, 6)) : (h(v), k = b(v >> 12 & 15 | 224), k += f(v, 6)) : k = b(v >> 6 & 31 | 192), k += b(63 & v | 128);
|
|
4379
4399
|
}
|
|
4380
4400
|
function l(v) {
|
|
4381
4401
|
for (var k, T = i(v), O = T.length, x = -1, A = ""; ++x < O; )
|
|
@@ -4419,16 +4439,16 @@ function Bo() {
|
|
|
4419
4439
|
T.push(k);
|
|
4420
4440
|
return u(T);
|
|
4421
4441
|
}
|
|
4422
|
-
var
|
|
4442
|
+
var d = typeof r == "object" && r, y = typeof e == "object" && e && e.exports == d && e, g = typeof n == "object" && n;
|
|
4423
4443
|
(g.global === g || g.window === g) && (o = g);
|
|
4424
4444
|
var w, B, _, b = String.fromCharCode, S = { version: "2.0.0", encode: l, decode: s };
|
|
4425
|
-
if (
|
|
4445
|
+
if (d && !d.nodeType)
|
|
4426
4446
|
if (y)
|
|
4427
4447
|
y.exports = S;
|
|
4428
4448
|
else {
|
|
4429
4449
|
var m = {}, C = m.hasOwnProperty;
|
|
4430
4450
|
for (var E in S)
|
|
4431
|
-
C.call(S, E) && (
|
|
4451
|
+
C.call(S, E) && (d[E] = S[E]);
|
|
4432
4452
|
}
|
|
4433
4453
|
else
|
|
4434
4454
|
o.utf8 = S;
|
|
@@ -4437,9 +4457,9 @@ function Bo() {
|
|
|
4437
4457
|
}, {}],
|
|
4438
4458
|
32: [function(t, e) {
|
|
4439
4459
|
(function(r) {
|
|
4440
|
-
var n = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, i = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, u = /(?:^|:|,)(?:\s*\[)+/g, h = /^\s+/,
|
|
4460
|
+
var n = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, i = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, u = /(?:^|:|,)(?:\s*\[)+/g, h = /^\s+/, f = /\s+$/;
|
|
4441
4461
|
e.exports = function(c) {
|
|
4442
|
-
return typeof c == "string" && c ? (c = c.replace(h, "").replace(
|
|
4462
|
+
return typeof c == "string" && c ? (c = c.replace(h, "").replace(f, ""), r.JSON && JSON.parse ? JSON.parse(c) : n.test(c.replace(o, "@").replace(i, "]").replace(u, "")) ? new Function("return " + c)() : void 0) : null;
|
|
4443
4463
|
};
|
|
4444
4464
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
4445
4465
|
}, {}],
|
|
@@ -4451,8 +4471,8 @@ function Bo() {
|
|
|
4451
4471
|
return o;
|
|
4452
4472
|
}, r.decode = function(n) {
|
|
4453
4473
|
for (var o = {}, i = n.split("&"), u = 0, h = i.length; h > u; u++) {
|
|
4454
|
-
var
|
|
4455
|
-
o[decodeURIComponent(
|
|
4474
|
+
var f = i[u].split("=");
|
|
4475
|
+
o[decodeURIComponent(f[0])] = decodeURIComponent(f[1]);
|
|
4456
4476
|
}
|
|
4457
4477
|
return o;
|
|
4458
4478
|
};
|
|
@@ -4462,8 +4482,8 @@ function Bo() {
|
|
|
4462
4482
|
e.exports = function(o) {
|
|
4463
4483
|
var i = o, u = o.indexOf("["), h = o.indexOf("]");
|
|
4464
4484
|
u != -1 && h != -1 && (o = o.substring(0, u) + o.substring(u, h).replace(/:/g, ";") + o.substring(h, o.length));
|
|
4465
|
-
for (var
|
|
4466
|
-
c[n[l]] =
|
|
4485
|
+
for (var f = r.exec(o || ""), c = {}, l = 14; l--; )
|
|
4486
|
+
c[n[l]] = f[l] || "";
|
|
4467
4487
|
return u != -1 && h != -1 && (c.source = i, c.host = c.host.substring(1, c.host.length - 1).replace(/;/g, ":"), c.authority = c.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), c.ipv6uri = !0), c;
|
|
4468
4488
|
};
|
|
4469
4489
|
}, {}],
|
|
@@ -4485,8 +4505,8 @@ function Bo() {
|
|
|
4485
4505
|
if (r.Buffer && r.Buffer.isBuffer(h) || r.ArrayBuffer && h instanceof ArrayBuffer || r.Blob && h instanceof Blob || r.File && h instanceof File)
|
|
4486
4506
|
return !0;
|
|
4487
4507
|
if (o(h)) {
|
|
4488
|
-
for (var
|
|
4489
|
-
if (u(h[
|
|
4508
|
+
for (var f = 0; f < h.length; f++)
|
|
4509
|
+
if (u(h[f]))
|
|
4490
4510
|
return !0;
|
|
4491
4511
|
} else if (h && typeof h == "object") {
|
|
4492
4512
|
h.toJSON && (h = h.toJSON());
|
|
@@ -4569,12 +4589,12 @@ function Bo() {
|
|
|
4569
4589
|
if (!p)
|
|
4570
4590
|
return p;
|
|
4571
4591
|
if (i(p)) {
|
|
4572
|
-
var a = { _placeholder: !0, num:
|
|
4573
|
-
return
|
|
4592
|
+
var a = { _placeholder: !0, num: f.length };
|
|
4593
|
+
return f.push(p), a;
|
|
4574
4594
|
}
|
|
4575
4595
|
if (o(p)) {
|
|
4576
|
-
for (var s = new Array(p.length),
|
|
4577
|
-
s[
|
|
4596
|
+
for (var s = new Array(p.length), d = 0; d < p.length; d++)
|
|
4597
|
+
s[d] = h(p[d]);
|
|
4578
4598
|
return s;
|
|
4579
4599
|
}
|
|
4580
4600
|
if (typeof p == "object" && !(p instanceof Date)) {
|
|
@@ -4585,46 +4605,46 @@ function Bo() {
|
|
|
4585
4605
|
}
|
|
4586
4606
|
return p;
|
|
4587
4607
|
}
|
|
4588
|
-
var
|
|
4589
|
-
return l.data = h(c), l.attachments =
|
|
4608
|
+
var f = [], c = u.data, l = u;
|
|
4609
|
+
return l.data = h(c), l.attachments = f.length, { packet: l, buffers: f };
|
|
4590
4610
|
}, r.reconstructPacket = function(u, h) {
|
|
4591
|
-
function
|
|
4611
|
+
function f(c) {
|
|
4592
4612
|
if (c && c._placeholder) {
|
|
4593
4613
|
var l = h[c.num];
|
|
4594
4614
|
return l;
|
|
4595
4615
|
}
|
|
4596
4616
|
if (o(c)) {
|
|
4597
4617
|
for (var p = 0; p < c.length; p++)
|
|
4598
|
-
c[p] =
|
|
4618
|
+
c[p] = f(c[p]);
|
|
4599
4619
|
return c;
|
|
4600
4620
|
}
|
|
4601
4621
|
if (c && typeof c == "object") {
|
|
4602
4622
|
for (var a in c)
|
|
4603
|
-
c[a] =
|
|
4623
|
+
c[a] = f(c[a]);
|
|
4604
4624
|
return c;
|
|
4605
4625
|
}
|
|
4606
4626
|
return c;
|
|
4607
4627
|
}
|
|
4608
|
-
return u.data =
|
|
4628
|
+
return u.data = f(u.data), u.attachments = void 0, u;
|
|
4609
4629
|
}, r.removeBlobs = function(u, h) {
|
|
4610
|
-
function
|
|
4630
|
+
function f(p, a, s) {
|
|
4611
4631
|
if (!p)
|
|
4612
4632
|
return p;
|
|
4613
4633
|
if (n.Blob && p instanceof Blob || n.File && p instanceof File) {
|
|
4614
4634
|
c++;
|
|
4615
|
-
var
|
|
4616
|
-
|
|
4635
|
+
var d = new FileReader();
|
|
4636
|
+
d.onload = function() {
|
|
4617
4637
|
s ? s[a] = this.result : l = this.result, --c || h(l);
|
|
4618
|
-
},
|
|
4638
|
+
}, d.readAsArrayBuffer(p);
|
|
4619
4639
|
} else if (o(p))
|
|
4620
4640
|
for (var y = 0; y < p.length; y++)
|
|
4621
|
-
|
|
4641
|
+
f(p[y], y, p);
|
|
4622
4642
|
else if (p && typeof p == "object" && !i(p))
|
|
4623
4643
|
for (var g in p)
|
|
4624
|
-
|
|
4644
|
+
f(p[g], g, p);
|
|
4625
4645
|
}
|
|
4626
4646
|
var c = 0, l = u;
|
|
4627
|
-
|
|
4647
|
+
f(l), c || h(l);
|
|
4628
4648
|
};
|
|
4629
4649
|
}).call(this, typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
4630
4650
|
}, { "./is-buffer": 45, isarray: 46 }],
|
|
@@ -4685,13 +4705,13 @@ function Bo() {
|
|
|
4685
4705
|
}
|
|
4686
4706
|
return l("decoded %s as %j", y, g), g;
|
|
4687
4707
|
}
|
|
4688
|
-
function
|
|
4708
|
+
function f(y) {
|
|
4689
4709
|
this.reconPack = y, this.buffers = [];
|
|
4690
4710
|
}
|
|
4691
4711
|
function c() {
|
|
4692
4712
|
return { type: r.ERROR, data: "parser error" };
|
|
4693
4713
|
}
|
|
4694
|
-
var l = t("debug")("socket.io-parser"), p = t("json3"), a = (t("isarray"), t("component-emitter")), s = t("./binary"),
|
|
4714
|
+
var l = t("debug")("socket.io-parser"), p = t("json3"), a = (t("isarray"), t("component-emitter")), s = t("./binary"), d = t("./is-buffer");
|
|
4695
4715
|
r.protocol = 4, r.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"], r.CONNECT = 0, r.DISCONNECT = 1, r.EVENT = 2, r.ACK = 3, r.ERROR = 4, r.BINARY_EVENT = 5, r.BINARY_ACK = 6, r.Encoder = n, r.Decoder = u, n.prototype.encode = function(y, g) {
|
|
4696
4716
|
if (l("encoding packet %j", y), r.BINARY_EVENT == y.type || r.BINARY_ACK == y.type)
|
|
4697
4717
|
i(y, g);
|
|
@@ -4702,9 +4722,9 @@ function Bo() {
|
|
|
4702
4722
|
}, a(u.prototype), u.prototype.add = function(y) {
|
|
4703
4723
|
var g;
|
|
4704
4724
|
if (typeof y == "string")
|
|
4705
|
-
g = h(y), r.BINARY_EVENT == g.type || r.BINARY_ACK == g.type ? (this.reconstructor = new
|
|
4725
|
+
g = h(y), r.BINARY_EVENT == g.type || r.BINARY_ACK == g.type ? (this.reconstructor = new f(g), this.reconstructor.reconPack.attachments === 0 && this.emit("decoded", g)) : this.emit("decoded", g);
|
|
4706
4726
|
else {
|
|
4707
|
-
if (!
|
|
4727
|
+
if (!d(y) && !y.base64)
|
|
4708
4728
|
throw new Error("Unknown type: " + y);
|
|
4709
4729
|
if (!this.reconstructor)
|
|
4710
4730
|
throw new Error("got binary data when not reconstructing a packet");
|
|
@@ -4712,13 +4732,13 @@ function Bo() {
|
|
|
4712
4732
|
}
|
|
4713
4733
|
}, u.prototype.destroy = function() {
|
|
4714
4734
|
this.reconstructor && this.reconstructor.finishedReconstruction();
|
|
4715
|
-
},
|
|
4735
|
+
}, f.prototype.takeBinaryData = function(y) {
|
|
4716
4736
|
if (this.buffers.push(y), this.buffers.length == this.reconPack.attachments) {
|
|
4717
4737
|
var g = s.reconstructPacket(this.reconPack, this.buffers);
|
|
4718
4738
|
return this.finishedReconstruction(), g;
|
|
4719
4739
|
}
|
|
4720
4740
|
return null;
|
|
4721
|
-
},
|
|
4741
|
+
}, f.prototype.finishedReconstruction = function() {
|
|
4722
4742
|
this.reconPack = null, this.buffers = [];
|
|
4723
4743
|
};
|
|
4724
4744
|
}, { "./binary": 43, "./is-buffer": 45, "component-emitter": 9, debug: 10, isarray: 46, json3: 47 }],
|
|
@@ -4735,25 +4755,25 @@ function Bo() {
|
|
|
4735
4755
|
}, {}],
|
|
4736
4756
|
47: [function(t, e, r) {
|
|
4737
4757
|
(function(n) {
|
|
4738
|
-
function o(
|
|
4739
|
-
if (o[
|
|
4740
|
-
return o[
|
|
4758
|
+
function o(I) {
|
|
4759
|
+
if (o[I] !== h)
|
|
4760
|
+
return o[I];
|
|
4741
4761
|
var U;
|
|
4742
|
-
if (
|
|
4762
|
+
if (I == "bug-string-char-index")
|
|
4743
4763
|
U = !1;
|
|
4744
|
-
else if (
|
|
4764
|
+
else if (I == "json")
|
|
4745
4765
|
U = o("json-stringify") && o("json-parse");
|
|
4746
4766
|
else {
|
|
4747
|
-
var
|
|
4748
|
-
if (
|
|
4767
|
+
var R, F = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
|
|
4768
|
+
if (I == "json-stringify") {
|
|
4749
4769
|
var N = l.stringify, D = typeof N == "function" && p;
|
|
4750
4770
|
if (D) {
|
|
4751
|
-
(
|
|
4771
|
+
(R = function() {
|
|
4752
4772
|
return 1;
|
|
4753
|
-
}).toJSON =
|
|
4773
|
+
}).toJSON = R;
|
|
4754
4774
|
try {
|
|
4755
|
-
D = N(0) === "0" && N(new Number()) === "0" && N(new String()) == '""' && N(
|
|
4756
|
-
\f\r `] }) == F && N(null,
|
|
4775
|
+
D = N(0) === "0" && N(new Number()) === "0" && N(new String()) == '""' && N(f) === h && N(h) === h && N() === h && N(R) === "1" && N([R]) == "[1]" && N([h]) == "[null]" && N(null) == "null" && N([h, f, null]) == "[null,null,null]" && N({ a: [R, !0, !1, null, `\0\b
|
|
4776
|
+
\f\r `] }) == F && N(null, R) === "1" && N([1, 2], null, 1) == `[
|
|
4757
4777
|
1,
|
|
4758
4778
|
2
|
|
4759
4779
|
]` && N(/* @__PURE__ */ new Date(-864e13)) == '"-271821-04-20T00:00:00.000Z"' && N(/* @__PURE__ */ new Date(864e13)) == '"+275760-09-13T00:00:00.000Z"' && N(/* @__PURE__ */ new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && N(/* @__PURE__ */ new Date(-1)) == '"1969-12-31T23:59:59.999Z"';
|
|
@@ -4763,13 +4783,13 @@ function Bo() {
|
|
|
4763
4783
|
}
|
|
4764
4784
|
U = D;
|
|
4765
4785
|
}
|
|
4766
|
-
if (
|
|
4786
|
+
if (I == "json-parse") {
|
|
4767
4787
|
var P = l.parse;
|
|
4768
4788
|
if (typeof P == "function")
|
|
4769
4789
|
try {
|
|
4770
4790
|
if (P("0") === 0 && !P(!1)) {
|
|
4771
|
-
|
|
4772
|
-
var L =
|
|
4791
|
+
R = P(F);
|
|
4792
|
+
var L = R.a.length == 5 && R.a[0] === 1;
|
|
4773
4793
|
if (L) {
|
|
4774
4794
|
try {
|
|
4775
4795
|
L = !P('" "');
|
|
@@ -4793,9 +4813,9 @@ function Bo() {
|
|
|
4793
4813
|
U = L;
|
|
4794
4814
|
}
|
|
4795
4815
|
}
|
|
4796
|
-
return o[
|
|
4816
|
+
return o[I] = !!U;
|
|
4797
4817
|
}
|
|
4798
|
-
var i, u, h,
|
|
4818
|
+
var i, u, h, f = {}.toString, c = typeof JSON == "object" && JSON, l = typeof r == "object" && r && !r.nodeType && r;
|
|
4799
4819
|
l && c ? (l.stringify = c.stringify, l.parse = c.parse) : l = n.JSON = c || {};
|
|
4800
4820
|
var p = /* @__PURE__ */ new Date(-3509827334573292);
|
|
4801
4821
|
try {
|
|
@@ -4803,55 +4823,55 @@ function Bo() {
|
|
|
4803
4823
|
} catch {
|
|
4804
4824
|
}
|
|
4805
4825
|
if (!o("json")) {
|
|
4806
|
-
var a = "[object Function]", s = "[object Date]",
|
|
4826
|
+
var a = "[object Function]", s = "[object Date]", d = "[object Number]", y = "[object String]", g = "[object Array]", w = "[object Boolean]", B = o("bug-string-char-index");
|
|
4807
4827
|
if (!p)
|
|
4808
|
-
var _ = Math.floor, b = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], S = function(
|
|
4809
|
-
return b[U] + 365 * (
|
|
4828
|
+
var _ = Math.floor, b = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], S = function(I, U) {
|
|
4829
|
+
return b[U] + 365 * (I - 1970) + _((I - 1969 + (U = +(U > 1))) / 4) - _((I - 1901 + U) / 100) + _((I - 1601 + U) / 400);
|
|
4810
4830
|
};
|
|
4811
|
-
(i = {}.hasOwnProperty) || (i = function(
|
|
4812
|
-
var U,
|
|
4813
|
-
return (
|
|
4831
|
+
(i = {}.hasOwnProperty) || (i = function(I) {
|
|
4832
|
+
var U, R = {};
|
|
4833
|
+
return (R.__proto__ = null, R.__proto__ = { toString: 1 }, R).toString != f ? i = function(F) {
|
|
4814
4834
|
var N = this.__proto__, D = F in (this.__proto__ = null, this);
|
|
4815
4835
|
return this.__proto__ = N, D;
|
|
4816
|
-
} : (U =
|
|
4836
|
+
} : (U = R.constructor, i = function(F) {
|
|
4817
4837
|
var N = (this.constructor || U).prototype;
|
|
4818
4838
|
return F in this && !(F in N && this[F] === N[F]);
|
|
4819
|
-
}),
|
|
4839
|
+
}), R = null, i.call(this, I);
|
|
4820
4840
|
});
|
|
4821
|
-
var m = { boolean: 1, number: 1, string: 1, undefined: 1 }, C = function(
|
|
4822
|
-
var
|
|
4823
|
-
return
|
|
4841
|
+
var m = { boolean: 1, number: 1, string: 1, undefined: 1 }, C = function(I, U) {
|
|
4842
|
+
var R = typeof I[U];
|
|
4843
|
+
return R == "object" ? !!I[U] : !m[R];
|
|
4824
4844
|
};
|
|
4825
|
-
if (u = function(
|
|
4826
|
-
var
|
|
4827
|
-
(
|
|
4845
|
+
if (u = function(I, U) {
|
|
4846
|
+
var R, F, N, D = 0;
|
|
4847
|
+
(R = function() {
|
|
4828
4848
|
this.valueOf = 0;
|
|
4829
|
-
}).prototype.valueOf = 0, F = new
|
|
4849
|
+
}).prototype.valueOf = 0, F = new R();
|
|
4830
4850
|
for (N in F)
|
|
4831
4851
|
i.call(F, N) && D++;
|
|
4832
|
-
return
|
|
4833
|
-
var M, J = {}, nt =
|
|
4852
|
+
return R = F = null, D ? u = D == 2 ? function(P, L) {
|
|
4853
|
+
var M, J = {}, nt = f.call(P) == a;
|
|
4834
4854
|
for (M in P)
|
|
4835
4855
|
nt && M == "prototype" || i.call(J, M) || !(J[M] = 1) || !i.call(P, M) || L(M);
|
|
4836
4856
|
} : function(P, L) {
|
|
4837
|
-
var M, J, nt =
|
|
4857
|
+
var M, J, nt = f.call(P) == a;
|
|
4838
4858
|
for (M in P)
|
|
4839
4859
|
nt && M == "prototype" || !i.call(P, M) || (J = M === "constructor") || L(M);
|
|
4840
4860
|
(J || i.call(P, M = "constructor")) && L(M);
|
|
4841
4861
|
} : (F = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], u = function(P, L) {
|
|
4842
|
-
var M, J, nt =
|
|
4862
|
+
var M, J, nt = f.call(P) == a, ot = !nt && typeof P.constructor != "function" && C(P, "hasOwnProperty") ? P.hasOwnProperty : i;
|
|
4843
4863
|
for (M in P)
|
|
4844
4864
|
nt && M == "prototype" || !ot.call(P, M) || L(M);
|
|
4845
4865
|
for (J = F.length; M = F[--J]; ot.call(P, M) && L(M))
|
|
4846
4866
|
;
|
|
4847
|
-
}), u(
|
|
4867
|
+
}), u(I, U);
|
|
4848
4868
|
}, !o("json-stringify")) {
|
|
4849
|
-
var E = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", k = function(
|
|
4850
|
-
return (v + (U || 0)).slice(-
|
|
4851
|
-
}, T = "\\u00", O = function(
|
|
4852
|
-
var U,
|
|
4853
|
-
for (D && (U =
|
|
4854
|
-
var P =
|
|
4869
|
+
var E = { 92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t" }, v = "000000", k = function(I, U) {
|
|
4870
|
+
return (v + (U || 0)).slice(-I);
|
|
4871
|
+
}, T = "\\u00", O = function(I) {
|
|
4872
|
+
var U, R = '"', F = 0, N = I.length, D = N > 10 && B;
|
|
4873
|
+
for (D && (U = I.split("")); N > F; F++) {
|
|
4874
|
+
var P = I.charCodeAt(F);
|
|
4855
4875
|
switch (P) {
|
|
4856
4876
|
case 8:
|
|
4857
4877
|
case 9:
|
|
@@ -4860,87 +4880,87 @@ function Bo() {
|
|
|
4860
4880
|
case 13:
|
|
4861
4881
|
case 34:
|
|
4862
4882
|
case 92:
|
|
4863
|
-
|
|
4883
|
+
R += E[P];
|
|
4864
4884
|
break;
|
|
4865
4885
|
default:
|
|
4866
4886
|
if (32 > P) {
|
|
4867
|
-
|
|
4887
|
+
R += T + k(2, P.toString(16));
|
|
4868
4888
|
break;
|
|
4869
4889
|
}
|
|
4870
|
-
|
|
4890
|
+
R += D ? U[F] : B ? I.charAt(F) : I[F];
|
|
4871
4891
|
}
|
|
4872
4892
|
}
|
|
4873
|
-
return
|
|
4874
|
-
}, x = function(
|
|
4875
|
-
var L, M, J, nt, ot,
|
|
4893
|
+
return R + '"';
|
|
4894
|
+
}, x = function(I, U, R, F, N, D, P) {
|
|
4895
|
+
var L, M, J, nt, ot, Ot, Vt, $t, Gt, Yt, ut, Qt, Ut, xt, Zt, te;
|
|
4876
4896
|
try {
|
|
4877
|
-
L = U[
|
|
4897
|
+
L = U[I];
|
|
4878
4898
|
} catch {
|
|
4879
4899
|
}
|
|
4880
4900
|
if (typeof L == "object" && L)
|
|
4881
|
-
if (M =
|
|
4882
|
-
typeof L.toJSON == "function" && (M !=
|
|
4901
|
+
if (M = f.call(L), M != s || i.call(L, "toJSON"))
|
|
4902
|
+
typeof L.toJSON == "function" && (M != d && M != y && M != g || i.call(L, "toJSON")) && (L = L.toJSON(I));
|
|
4883
4903
|
else if (L > -1 / 0 && 1 / 0 > L) {
|
|
4884
4904
|
if (S) {
|
|
4885
4905
|
for (ot = _(L / 864e5), J = _(ot / 365.2425) + 1970 - 1; S(J + 1, 0) <= ot; J++)
|
|
4886
4906
|
;
|
|
4887
4907
|
for (nt = _((ot - S(J, 0)) / 30.42); S(J, nt + 1) <= ot; nt++)
|
|
4888
4908
|
;
|
|
4889
|
-
ot = 1 + ot - S(J, nt),
|
|
4909
|
+
ot = 1 + ot - S(J, nt), Ot = (L % 864e5 + 864e5) % 864e5, Vt = _(Ot / 36e5) % 24, $t = _(Ot / 6e4) % 60, Gt = _(Ot / 1e3) % 60, Yt = Ot % 1e3;
|
|
4890
4910
|
} else
|
|
4891
|
-
J = L.getUTCFullYear(), nt = L.getUTCMonth(), ot = L.getUTCDate(),
|
|
4892
|
-
L = (0 >= J || J >= 1e4 ? (0 > J ? "-" : "+") + k(6, 0 > J ? -J : J) : k(4, J)) + "-" + k(2, nt + 1) + "-" + k(2, ot) + "T" + k(2,
|
|
4911
|
+
J = L.getUTCFullYear(), nt = L.getUTCMonth(), ot = L.getUTCDate(), Vt = L.getUTCHours(), $t = L.getUTCMinutes(), Gt = L.getUTCSeconds(), Yt = L.getUTCMilliseconds();
|
|
4912
|
+
L = (0 >= J || J >= 1e4 ? (0 > J ? "-" : "+") + k(6, 0 > J ? -J : J) : k(4, J)) + "-" + k(2, nt + 1) + "-" + k(2, ot) + "T" + k(2, Vt) + ":" + k(2, $t) + ":" + k(2, Gt) + "." + k(3, Yt) + "Z";
|
|
4893
4913
|
} else
|
|
4894
4914
|
L = null;
|
|
4895
|
-
if (
|
|
4915
|
+
if (R && (L = R.call(U, I, L)), L === null)
|
|
4896
4916
|
return "null";
|
|
4897
|
-
if (M =
|
|
4917
|
+
if (M = f.call(L), M == w)
|
|
4898
4918
|
return "" + L;
|
|
4899
|
-
if (M ==
|
|
4919
|
+
if (M == d)
|
|
4900
4920
|
return L > -1 / 0 && 1 / 0 > L ? "" + L : "null";
|
|
4901
4921
|
if (M == y)
|
|
4902
4922
|
return O("" + L);
|
|
4903
4923
|
if (typeof L == "object") {
|
|
4904
|
-
for (
|
|
4905
|
-
if (P[
|
|
4924
|
+
for (xt = P.length; xt--; )
|
|
4925
|
+
if (P[xt] === L)
|
|
4906
4926
|
throw TypeError();
|
|
4907
|
-
if (P.push(L), ut = [],
|
|
4908
|
-
for (
|
|
4909
|
-
|
|
4910
|
-
|
|
4927
|
+
if (P.push(L), ut = [], Zt = D, D += N, M == g) {
|
|
4928
|
+
for (Ut = 0, xt = L.length; xt > Ut; Ut++)
|
|
4929
|
+
Qt = x(Ut, L, R, F, N, D, P), ut.push(Qt === h ? "null" : Qt);
|
|
4930
|
+
te = ut.length ? N ? `[
|
|
4911
4931
|
` + D + ut.join(`,
|
|
4912
4932
|
` + D) + `
|
|
4913
|
-
` +
|
|
4933
|
+
` + Zt + "]" : "[" + ut.join(",") + "]" : "[]";
|
|
4914
4934
|
} else
|
|
4915
|
-
u(F || L, function(
|
|
4916
|
-
var
|
|
4917
|
-
|
|
4918
|
-
}),
|
|
4935
|
+
u(F || L, function(ee) {
|
|
4936
|
+
var Le = x(ee, L, R, F, N, D, P);
|
|
4937
|
+
Le !== h && ut.push(O(ee) + ":" + (N ? " " : "") + Le);
|
|
4938
|
+
}), te = ut.length ? N ? `{
|
|
4919
4939
|
` + D + ut.join(`,
|
|
4920
4940
|
` + D) + `
|
|
4921
|
-
` +
|
|
4922
|
-
return P.pop(),
|
|
4941
|
+
` + Zt + "}" : "{" + ut.join(",") + "}" : "{}";
|
|
4942
|
+
return P.pop(), te;
|
|
4923
4943
|
}
|
|
4924
4944
|
};
|
|
4925
|
-
l.stringify = function(
|
|
4945
|
+
l.stringify = function(I, U, R) {
|
|
4926
4946
|
var F, N, D, P;
|
|
4927
4947
|
if (typeof U == "function" || typeof U == "object" && U) {
|
|
4928
|
-
if ((P =
|
|
4948
|
+
if ((P = f.call(U)) == a)
|
|
4929
4949
|
N = U;
|
|
4930
4950
|
else if (P == g) {
|
|
4931
4951
|
D = {};
|
|
4932
|
-
for (var L, M = 0, J = U.length; J > M; L = U[M++], P =
|
|
4952
|
+
for (var L, M = 0, J = U.length; J > M; L = U[M++], P = f.call(L), (P == y || P == d) && (D[L] = 1))
|
|
4933
4953
|
;
|
|
4934
4954
|
}
|
|
4935
4955
|
}
|
|
4936
|
-
if (
|
|
4937
|
-
if ((P =
|
|
4938
|
-
if ((
|
|
4939
|
-
for (F = "",
|
|
4956
|
+
if (R)
|
|
4957
|
+
if ((P = f.call(R)) == d) {
|
|
4958
|
+
if ((R -= R % 1) > 0)
|
|
4959
|
+
for (F = "", R > 10 && (R = 10); F.length < R; F += " ")
|
|
4940
4960
|
;
|
|
4941
4961
|
} else
|
|
4942
|
-
P == y && (F =
|
|
4943
|
-
return x("", (L = {}, L[""] =
|
|
4962
|
+
P == y && (F = R.length <= 10 ? R : R.slice(0, 10));
|
|
4963
|
+
return x("", (L = {}, L[""] = I, L), N, D, F, "", []);
|
|
4944
4964
|
};
|
|
4945
4965
|
}
|
|
4946
4966
|
if (!o("json-parse")) {
|
|
@@ -4948,7 +4968,7 @@ function Bo() {
|
|
|
4948
4968
|
`, 102: "\f", 114: "\r" }, X = function() {
|
|
4949
4969
|
throw A = q = null, SyntaxError();
|
|
4950
4970
|
}, et = function() {
|
|
4951
|
-
for (var
|
|
4971
|
+
for (var I, U, R, F, N, D = q, P = D.length; P > A; )
|
|
4952
4972
|
switch (N = D.charCodeAt(A)) {
|
|
4953
4973
|
case 9:
|
|
4954
4974
|
case 10:
|
|
@@ -4962,9 +4982,9 @@ function Bo() {
|
|
|
4962
4982
|
case 93:
|
|
4963
4983
|
case 58:
|
|
4964
4984
|
case 44:
|
|
4965
|
-
return
|
|
4985
|
+
return I = B ? D.charAt(A) : D[A], A++, I;
|
|
4966
4986
|
case 34:
|
|
4967
|
-
for (
|
|
4987
|
+
for (I = "@", A++; P > A; )
|
|
4968
4988
|
if (N = D.charCodeAt(A), 32 > N)
|
|
4969
4989
|
X();
|
|
4970
4990
|
else if (N == 92)
|
|
@@ -4977,12 +4997,12 @@ function Bo() {
|
|
|
4977
4997
|
case 110:
|
|
4978
4998
|
case 102:
|
|
4979
4999
|
case 114:
|
|
4980
|
-
|
|
5000
|
+
I += $[N], A++;
|
|
4981
5001
|
break;
|
|
4982
5002
|
case 117:
|
|
4983
|
-
for (U = ++A,
|
|
5003
|
+
for (U = ++A, R = A + 4; R > A; A++)
|
|
4984
5004
|
N = D.charCodeAt(A), N >= 48 && 57 >= N || N >= 97 && 102 >= N || N >= 65 && 70 >= N || X();
|
|
4985
|
-
|
|
5005
|
+
I += j("0x" + D.slice(U, A));
|
|
4986
5006
|
break;
|
|
4987
5007
|
default:
|
|
4988
5008
|
X();
|
|
@@ -4992,24 +5012,24 @@ function Bo() {
|
|
|
4992
5012
|
break;
|
|
4993
5013
|
for (N = D.charCodeAt(A), U = A; N >= 32 && N != 92 && N != 34; )
|
|
4994
5014
|
N = D.charCodeAt(++A);
|
|
4995
|
-
|
|
5015
|
+
I += D.slice(U, A);
|
|
4996
5016
|
}
|
|
4997
5017
|
if (D.charCodeAt(A) == 34)
|
|
4998
|
-
return A++,
|
|
5018
|
+
return A++, I;
|
|
4999
5019
|
X();
|
|
5000
5020
|
default:
|
|
5001
5021
|
if (U = A, N == 45 && (F = !0, N = D.charCodeAt(++A)), N >= 48 && 57 >= N) {
|
|
5002
5022
|
for (N == 48 && (N = D.charCodeAt(A + 1), N >= 48 && 57 >= N) && X(), F = !1; P > A && (N = D.charCodeAt(A), N >= 48 && 57 >= N); A++)
|
|
5003
5023
|
;
|
|
5004
5024
|
if (D.charCodeAt(A) == 46) {
|
|
5005
|
-
for (
|
|
5025
|
+
for (R = ++A; P > R && (N = D.charCodeAt(R), N >= 48 && 57 >= N); R++)
|
|
5006
5026
|
;
|
|
5007
|
-
|
|
5027
|
+
R == A && X(), A = R;
|
|
5008
5028
|
}
|
|
5009
5029
|
if (N = D.charCodeAt(A), N == 101 || N == 69) {
|
|
5010
|
-
for (N = D.charCodeAt(++A), (N == 43 || N == 45) && A++,
|
|
5030
|
+
for (N = D.charCodeAt(++A), (N == 43 || N == 45) && A++, R = A; P > R && (N = D.charCodeAt(R), N >= 48 && 57 >= N); R++)
|
|
5011
5031
|
;
|
|
5012
|
-
|
|
5032
|
+
R == A && X(), A = R;
|
|
5013
5033
|
}
|
|
5014
5034
|
return +D.slice(U, A);
|
|
5015
5035
|
}
|
|
@@ -5022,42 +5042,42 @@ function Bo() {
|
|
|
5022
5042
|
X();
|
|
5023
5043
|
}
|
|
5024
5044
|
return "$";
|
|
5025
|
-
},
|
|
5026
|
-
var U,
|
|
5027
|
-
if (
|
|
5028
|
-
if ((B ?
|
|
5029
|
-
return
|
|
5030
|
-
if (
|
|
5031
|
-
for (U = [];
|
|
5032
|
-
|
|
5045
|
+
}, Nt = function(I) {
|
|
5046
|
+
var U, R;
|
|
5047
|
+
if (I == "$" && X(), typeof I == "string") {
|
|
5048
|
+
if ((B ? I.charAt(0) : I[0]) == "@")
|
|
5049
|
+
return I.slice(1);
|
|
5050
|
+
if (I == "[") {
|
|
5051
|
+
for (U = []; I = et(), I != "]"; R || (R = !0))
|
|
5052
|
+
R && (I == "," ? (I = et(), I == "]" && X()) : X()), I == "," && X(), U.push(Nt(I));
|
|
5033
5053
|
return U;
|
|
5034
5054
|
}
|
|
5035
|
-
if (
|
|
5036
|
-
for (U = {};
|
|
5037
|
-
|
|
5055
|
+
if (I == "{") {
|
|
5056
|
+
for (U = {}; I = et(), I != "}"; R || (R = !0))
|
|
5057
|
+
R && (I == "," ? (I = et(), I == "}" && X()) : X()), (I == "," || typeof I != "string" || (B ? I.charAt(0) : I[0]) != "@" || et() != ":") && X(), U[I.slice(1)] = Nt(et());
|
|
5038
5058
|
return U;
|
|
5039
5059
|
}
|
|
5040
5060
|
X();
|
|
5041
5061
|
}
|
|
5042
|
-
return
|
|
5043
|
-
},
|
|
5044
|
-
var F =
|
|
5045
|
-
F === h ? delete
|
|
5046
|
-
},
|
|
5047
|
-
var F, N =
|
|
5062
|
+
return I;
|
|
5063
|
+
}, Be = function(I, U, R) {
|
|
5064
|
+
var F = _e(I, U, R);
|
|
5065
|
+
F === h ? delete I[U] : I[U] = F;
|
|
5066
|
+
}, _e = function(I, U, R) {
|
|
5067
|
+
var F, N = I[U];
|
|
5048
5068
|
if (typeof N == "object" && N)
|
|
5049
|
-
if (
|
|
5069
|
+
if (f.call(N) == g)
|
|
5050
5070
|
for (F = N.length; F--; )
|
|
5051
|
-
|
|
5071
|
+
Be(N, F, R);
|
|
5052
5072
|
else
|
|
5053
5073
|
u(N, function(D) {
|
|
5054
|
-
|
|
5074
|
+
Be(N, D, R);
|
|
5055
5075
|
});
|
|
5056
|
-
return
|
|
5076
|
+
return R.call(I, U, N);
|
|
5057
5077
|
};
|
|
5058
|
-
l.parse = function(
|
|
5059
|
-
var
|
|
5060
|
-
return A = 0, q = "" +
|
|
5078
|
+
l.parse = function(I, U) {
|
|
5079
|
+
var R, F;
|
|
5080
|
+
return A = 0, q = "" + I, R = Nt(et()), et() != "$" && X(), A = q = null, U && f.call(U) == a ? _e((F = {}, F[""] = R, F), "", U) : R;
|
|
5061
5081
|
};
|
|
5062
5082
|
}
|
|
5063
5083
|
}
|
|
@@ -5075,40 +5095,40 @@ function Bo() {
|
|
|
5075
5095
|
}, {}]
|
|
5076
5096
|
}, {}, [1])(1);
|
|
5077
5097
|
}
|
|
5078
|
-
const
|
|
5098
|
+
const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5079
5099
|
__proto__: null,
|
|
5080
|
-
default:
|
|
5081
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5082
|
-
"./v1_3_7.js":
|
|
5083
|
-
}),
|
|
5084
|
-
function
|
|
5100
|
+
default: _o
|
|
5101
|
+
}, Symbol.toStringTag, { value: "Module" })), Uo = /* @__PURE__ */ Object.assign({
|
|
5102
|
+
"./v1_3_7.js": Lo
|
|
5103
|
+
}), Do = /v\d+_\d+_\d+/;
|
|
5104
|
+
function Po(t) {
|
|
5085
5105
|
return typeof t == "function";
|
|
5086
5106
|
}
|
|
5087
|
-
const
|
|
5107
|
+
const be = Object.entries(Uo).reduce(
|
|
5088
5108
|
(t, e) => {
|
|
5089
5109
|
var o;
|
|
5090
|
-
const r = e[1].default, n = (o = e[0].match(
|
|
5091
|
-
return
|
|
5110
|
+
const r = e[1].default, n = (o = e[0].match(Do)) == null ? void 0 : o[0];
|
|
5111
|
+
return Po(r) && n && (t[n] = r()), t;
|
|
5092
5112
|
},
|
|
5093
5113
|
{}
|
|
5094
|
-
),
|
|
5095
|
-
if (t in
|
|
5096
|
-
return
|
|
5114
|
+
), Tr = (t) => {
|
|
5115
|
+
if (t in be)
|
|
5116
|
+
return be[t];
|
|
5097
5117
|
throw new Error(`Socket version ${t} not found`);
|
|
5098
|
-
},
|
|
5099
|
-
...
|
|
5100
|
-
getSocketVersion:
|
|
5101
|
-
makeSocketVersion:
|
|
5118
|
+
}, Fo = (t, ...e) => Tr(t)(...e), jo = {
|
|
5119
|
+
...be,
|
|
5120
|
+
getSocketVersion: Tr,
|
|
5121
|
+
makeSocketVersion: Fo
|
|
5102
5122
|
};
|
|
5103
|
-
var
|
|
5104
|
-
class
|
|
5123
|
+
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 || {});
|
|
5124
|
+
class pe {
|
|
5105
5125
|
static mapExtensionEvent(e) {
|
|
5106
5126
|
var u, h;
|
|
5107
5127
|
const r = e.reason;
|
|
5108
5128
|
let n, o;
|
|
5109
5129
|
e.data.currentCall && (o = this.mapExtensionCall(e, e.data.currentCall));
|
|
5110
5130
|
const i = this.mapExtensionData(e, e.data);
|
|
5111
|
-
return r ===
|
|
5131
|
+
return r === Nr.HANGUP ? n = {
|
|
5112
5132
|
...e,
|
|
5113
5133
|
reason: r,
|
|
5114
5134
|
data: {
|
|
@@ -5117,8 +5137,8 @@ class ce {
|
|
|
5117
5137
|
...o,
|
|
5118
5138
|
duration: o.callAnswered_UTC_CLIENT ? Date.now() - o.callAnswered_UTC_CLIENT : 0
|
|
5119
5139
|
} : void 0,
|
|
5120
|
-
calls: (u = e.data.calls) == null ? void 0 : u.map((
|
|
5121
|
-
const c = this.mapExtensionCall(e,
|
|
5140
|
+
calls: (u = e.data.calls) == null ? void 0 : u.map((f) => {
|
|
5141
|
+
const c = this.mapExtensionCall(e, f);
|
|
5122
5142
|
return {
|
|
5123
5143
|
...c,
|
|
5124
5144
|
duration: c.callAnswered_UTC_CLIENT ? Date.now() - c.callAnswered_UTC_CLIENT : 0
|
|
@@ -5130,7 +5150,7 @@ class ce {
|
|
|
5130
5150
|
data: {
|
|
5131
5151
|
...i,
|
|
5132
5152
|
currentCall: o,
|
|
5133
|
-
calls: (h = e.data.calls) == null ? void 0 : h.map((
|
|
5153
|
+
calls: (h = e.data.calls) == null ? void 0 : h.map((f) => this.mapExtensionCall(e, f))
|
|
5134
5154
|
},
|
|
5135
5155
|
reason: r
|
|
5136
5156
|
}, n;
|
|
@@ -5224,11 +5244,11 @@ class ce {
|
|
|
5224
5244
|
*/
|
|
5225
5245
|
static configureUTCForObject(e, r, n, o) {
|
|
5226
5246
|
const i = (n - o * 60) * 1e3, u = Date.now() - i, h = {};
|
|
5227
|
-
return r.forEach((
|
|
5228
|
-
const c = e[
|
|
5247
|
+
return r.forEach((f) => {
|
|
5248
|
+
const c = e[f.key], l = f.key;
|
|
5229
5249
|
if (c !== 0 && typeof c == "number" && !isNaN(c)) {
|
|
5230
5250
|
let p = c;
|
|
5231
|
-
|
|
5251
|
+
f.format === "ms" && (p = Math.floor(p / 1e3));
|
|
5232
5252
|
const a = (p - o * 60) * 1e3;
|
|
5233
5253
|
this.assignProperty(h, `${l}_UTC`, a), this.assignProperty(h, `${l}_UTC_CLIENT`, a + u);
|
|
5234
5254
|
} else
|
|
@@ -5239,8 +5259,8 @@ class ce {
|
|
|
5239
5259
|
};
|
|
5240
5260
|
}
|
|
5241
5261
|
}
|
|
5242
|
-
var
|
|
5243
|
-
class
|
|
5262
|
+
var Or = /* @__PURE__ */ ((t) => (t.UPDATE_MONITORED_EXTENSIONS = "updateMonitoredExtensions", t.KEEP_ALIVE = "keepAlive", t))(Or || {});
|
|
5263
|
+
class Jo {
|
|
5244
5264
|
constructor(e) {
|
|
5245
5265
|
H(this, "io");
|
|
5246
5266
|
H(this, "ioFunction");
|
|
@@ -5253,7 +5273,7 @@ class Ho {
|
|
|
5253
5273
|
}
|
|
5254
5274
|
getSocketIoFunction(e) {
|
|
5255
5275
|
const r = e.split("v="), n = "v".concat(r[r.length - 1]).replaceAll(".", "_");
|
|
5256
|
-
this.ioFunction =
|
|
5276
|
+
this.ioFunction = jo.getSocketVersion(n);
|
|
5257
5277
|
}
|
|
5258
5278
|
initSocketConnection() {
|
|
5259
5279
|
const e = this.eventsSdkClass.authClass.token, r = this.eventsSdkClass.options.protocol, n = this.eventsSdkClass.server;
|
|
@@ -5308,7 +5328,7 @@ class Ho {
|
|
|
5308
5328
|
initKeepAlive() {
|
|
5309
5329
|
this.clearKeepAliveInterval(), this.keepAliveInterval = setInterval(async () => {
|
|
5310
5330
|
if ((/* @__PURE__ */ new Date()).getTime() > this.lastEventTimestamp + this.eventsSdkClass.options.keepAliveTimeout && this.io && this.eventsSdkClass.authClass.token) {
|
|
5311
|
-
this.eventsSdkClass.emit(
|
|
5331
|
+
this.eventsSdkClass.emit(Or.KEEP_ALIVE, this.eventsSdkClass.authClass.token), this.eventsSdkClass.loggerClass.log({
|
|
5312
5332
|
Message: `Keep alive event emitted with this token: ${this.eventsSdkClass.authClass.token}`,
|
|
5313
5333
|
ActionName: at.WSCONNECT,
|
|
5314
5334
|
isShowClient: !1,
|
|
@@ -5330,10 +5350,10 @@ class Ho {
|
|
|
5330
5350
|
this.eventsSdkClass.eventEmitterClass.emit(z.LOGIN_SUCCESS, e);
|
|
5331
5351
|
}
|
|
5332
5352
|
onQueueEvent(e) {
|
|
5333
|
-
this.eventsSdkClass.eventEmitterClass.emit(z.QUEUE_EVENT,
|
|
5353
|
+
this.eventsSdkClass.eventEmitterClass.emit(z.QUEUE_EVENT, pe.mapQueueEvent(e));
|
|
5334
5354
|
}
|
|
5335
5355
|
onExtensionEvent(e) {
|
|
5336
|
-
const r =
|
|
5356
|
+
const r = pe.mapExtensionEvent(e);
|
|
5337
5357
|
r && this.eventsSdkClass.eventEmitterClass.emit(z.EXTENSION_EVENT, r);
|
|
5338
5358
|
}
|
|
5339
5359
|
onDialerEvent(e) {
|
|
@@ -5343,7 +5363,7 @@ class Ho {
|
|
|
5343
5363
|
this.eventsSdkClass.eventEmitterClass.emit(z.LOGIN_STATUS, e);
|
|
5344
5364
|
}
|
|
5345
5365
|
onAllExtensionStatus(e) {
|
|
5346
|
-
const r =
|
|
5366
|
+
const r = pe.mapAllExtensionStatus(e);
|
|
5347
5367
|
this.eventsSdkClass.eventEmitterClass.emit(z.ALL_EXTENSION_STATUS, r);
|
|
5348
5368
|
}
|
|
5349
5369
|
onAllDialerStatus(e) {
|
|
@@ -5412,7 +5432,7 @@ class Ho {
|
|
|
5412
5432
|
);
|
|
5413
5433
|
}
|
|
5414
5434
|
}
|
|
5415
|
-
class
|
|
5435
|
+
class Vo {
|
|
5416
5436
|
constructor(e) {
|
|
5417
5437
|
H(this, "storageLogger");
|
|
5418
5438
|
this.eventsSdkClass = e, this.eventsSdkClass = e;
|
|
@@ -5428,11 +5448,14 @@ class Jo {
|
|
|
5428
5448
|
this.eventsSdkClass.options.loggerSocketConnection && (e = this.eventsSdkClass.options.loggerSocketConnection), this.eventsSdkClass.socketIoClass.ioFunction && !e && (e = this.eventsSdkClass.socketIoClass.ioFunction(
|
|
5429
5449
|
this.eventsSdkClass.options.loggerServer,
|
|
5430
5450
|
this.eventsSdkClass.options.loggerConnectOptions
|
|
5431
|
-
)), e && (this.storageLogger = new
|
|
5451
|
+
)), e && (this.storageLogger = new Io({
|
|
5432
5452
|
socket: e,
|
|
5433
5453
|
loggerOptions: this.eventsSdkClass.options.loggerConfig
|
|
5434
5454
|
}));
|
|
5435
5455
|
}
|
|
5456
|
+
stop() {
|
|
5457
|
+
this.storageLogger && this.storageLogger.stop();
|
|
5458
|
+
}
|
|
5436
5459
|
log(e) {
|
|
5437
5460
|
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);
|
|
5438
5461
|
}
|
|
@@ -5454,7 +5477,7 @@ class Jo {
|
|
|
5454
5477
|
});
|
|
5455
5478
|
}
|
|
5456
5479
|
}
|
|
5457
|
-
class
|
|
5480
|
+
class $o {
|
|
5458
5481
|
constructor(e) {
|
|
5459
5482
|
H(this, "listeners", {
|
|
5460
5483
|
[z.ALL_EXTENSION_STATUS]: [],
|
|
@@ -5498,7 +5521,7 @@ class Vo {
|
|
|
5498
5521
|
this.allListeners.forEach((o) => o(n));
|
|
5499
5522
|
}
|
|
5500
5523
|
}
|
|
5501
|
-
class
|
|
5524
|
+
class Yo {
|
|
5502
5525
|
constructor(e) {
|
|
5503
5526
|
H(this, "options");
|
|
5504
5527
|
H(this, "servers", []);
|
|
@@ -5509,9 +5532,9 @@ class Go {
|
|
|
5509
5532
|
H(this, "mainServer");
|
|
5510
5533
|
H(this, "alreadyAttemptedOtherServers", []);
|
|
5511
5534
|
H(this, "authClass", new Ro(this));
|
|
5512
|
-
H(this, "socketIoClass", new
|
|
5513
|
-
H(this, "loggerClass", new
|
|
5514
|
-
H(this, "eventEmitterClass", new
|
|
5535
|
+
H(this, "socketIoClass", new Jo(this));
|
|
5536
|
+
H(this, "loggerClass", new Vo(this));
|
|
5537
|
+
H(this, "eventEmitterClass", new $o(this));
|
|
5515
5538
|
H(this, "getCircularReplacer", () => {
|
|
5516
5539
|
const e = /* @__PURE__ */ new WeakSet();
|
|
5517
5540
|
return (r, n) => {
|
|
@@ -5526,7 +5549,7 @@ class Go {
|
|
|
5526
5549
|
};
|
|
5527
5550
|
});
|
|
5528
5551
|
this.options = {
|
|
5529
|
-
...
|
|
5552
|
+
...Bo,
|
|
5530
5553
|
...e
|
|
5531
5554
|
};
|
|
5532
5555
|
}
|
|
@@ -5540,7 +5563,7 @@ class Go {
|
|
|
5540
5563
|
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();
|
|
5541
5564
|
}
|
|
5542
5565
|
disconnect() {
|
|
5543
|
-
this.socketIoClass.doReconnect = !1, this.socketIoClass.closeAllConnections();
|
|
5566
|
+
this.socketIoClass.doReconnect = !1, this.socketIoClass.closeAllConnections(), this.loggerClass.stop();
|
|
5544
5567
|
}
|
|
5545
5568
|
clearKeepAliveInterval() {
|
|
5546
5569
|
this.socketIoClass.clearKeepAliveInterval();
|
|
@@ -5579,18 +5602,18 @@ class Go {
|
|
|
5579
5602
|
}
|
|
5580
5603
|
}
|
|
5581
5604
|
export {
|
|
5582
|
-
|
|
5583
|
-
|
|
5605
|
+
Mo as CallStatusEnum,
|
|
5606
|
+
qo as CallTypeEnum,
|
|
5584
5607
|
mt as ConnectionStatusEnum,
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5608
|
+
zo as DialerTypeEnum,
|
|
5609
|
+
Xo as DirectionEnum,
|
|
5610
|
+
Wo as DoNotCallMeStatusCodeEnum,
|
|
5588
5611
|
z as EventsEnum,
|
|
5589
|
-
|
|
5590
|
-
|
|
5612
|
+
Nr as ExtensionEventReasonEnum,
|
|
5613
|
+
Ko as ExtensionHangupCauseEnum,
|
|
5591
5614
|
it as LoginType,
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5615
|
+
Ho as QueueEventReasonEnum,
|
|
5616
|
+
Or as ServerListenerEventsEnum,
|
|
5617
|
+
Yo as default
|
|
5595
5618
|
};
|
|
5596
5619
|
//# sourceMappingURL=voicenter-events-sdk.es.js.map
|